@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,94 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
Describe this component...
|
|
3
|
-
-->
|
|
4
|
-
<template>
|
|
5
|
-
<div :class="bem()">
|
|
6
|
-
<PxMenu
|
|
7
|
-
ref="menu"
|
|
8
|
-
:items="[
|
|
9
|
-
{
|
|
10
|
-
id: 'copy',
|
|
11
|
-
label: 'Copy',
|
|
12
|
-
icon: iconCopy,
|
|
13
|
-
iconSize: 1,
|
|
14
|
-
handler: onCopy,
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
id: 'paste',
|
|
18
|
-
label: 'Paste',
|
|
19
|
-
icon: iconClipboard,
|
|
20
|
-
iconSize: 1,
|
|
21
|
-
handler: onPaste,
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
id: 'sep1',
|
|
25
|
-
separator: true,
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
id: 'paste2',
|
|
29
|
-
label: 'Paste',
|
|
30
|
-
|
|
31
|
-
iconSize: 1,
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
id: 'paste3',
|
|
35
|
-
label: 'Paste',
|
|
36
|
-
icon: iconClipboard,
|
|
37
|
-
iconSize: 1.5,
|
|
38
|
-
},
|
|
39
|
-
]"
|
|
40
|
-
/>
|
|
41
|
-
|
|
42
|
-
<div :class="bem('target')" v-context-menu:[mydata]="'menu'" v-if="visible">
|
|
43
|
-
Right Click Me!
|
|
44
|
-
</div>
|
|
45
|
-
|
|
46
|
-
<button @click="visible = !visible">{{ visible ? 'Hide' : 'Show' }}</button>
|
|
47
|
-
</div>
|
|
48
|
-
</template>
|
|
49
|
-
|
|
50
|
-
<script>
|
|
51
|
-
import { contextMenuDirective } from '../../components/PxMenu.vue';
|
|
52
|
-
import PxMenu from '../../components/PxMenu.vue';
|
|
53
|
-
|
|
54
|
-
import iconCopy from '../../assets/feather/copy.svg?url';
|
|
55
|
-
import iconClipboard from '../../assets/feather/clipboard.svg?url';
|
|
56
|
-
|
|
57
|
-
export default {
|
|
58
|
-
name: 'demo-px-menu',
|
|
59
|
-
components: { PxMenu },
|
|
60
|
-
directives: { contextMenu: contextMenuDirective },
|
|
61
|
-
// mixins: [ Mixin ],
|
|
62
|
-
// props: { a: { type: Boolean, default: false } },
|
|
63
|
-
data() {
|
|
64
|
-
return {
|
|
65
|
-
visible: true,
|
|
66
|
-
|
|
67
|
-
iconCopy,
|
|
68
|
-
iconClipboard,
|
|
69
|
-
};
|
|
70
|
-
},
|
|
71
|
-
// computed: {},
|
|
72
|
-
// watch: {},
|
|
73
|
-
// mounted() {},
|
|
74
|
-
methods: {
|
|
75
|
-
onCopy(data) {
|
|
76
|
-
console.log('copy: ' + data);
|
|
77
|
-
},
|
|
78
|
-
onPaste(data) {
|
|
79
|
-
console.log('paste: ' + data);
|
|
80
|
-
},
|
|
81
|
-
},
|
|
82
|
-
};
|
|
83
|
-
</script>
|
|
84
|
-
|
|
85
|
-
<style lang="scss">
|
|
86
|
-
@use '../../styles/px.scss' as *;
|
|
87
|
-
.demo-px-menu {
|
|
88
|
-
&__target {
|
|
89
|
-
width: 300px;
|
|
90
|
-
height: 300px;
|
|
91
|
-
background-color: orange;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
</style>
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
Describe this component...
|
|
3
|
-
-->
|
|
4
|
-
<template>
|
|
5
|
-
<div :class="bem()">
|
|
6
|
-
<px-pivot :items="tabs" v-model:selected="selectedTab" />
|
|
7
|
-
<px-slides :items="tabs" v-model:selected="selectedTab" :drag-enabled="false">
|
|
8
|
-
<template #slide="{ item }">
|
|
9
|
-
<div :class="bem('slide')">
|
|
10
|
-
<h1>{{ item.label }}</h1>
|
|
11
|
-
</div>
|
|
12
|
-
</template>
|
|
13
|
-
</px-slides>
|
|
14
|
-
</div>
|
|
15
|
-
</template>
|
|
16
|
-
|
|
17
|
-
<script>
|
|
18
|
-
import PxPivot from '../../components/PxPivot.vue';
|
|
19
|
-
import PxSlides from '../../components/PxSlides.vue';
|
|
20
|
-
import stringToItems from '../../plugins/filters/stringToItems.js';
|
|
21
|
-
|
|
22
|
-
export default {
|
|
23
|
-
name: 'demo-px-pivot',
|
|
24
|
-
components: { PxPivot, PxSlides },
|
|
25
|
-
filters: { stringToItems },
|
|
26
|
-
// mixins: [ Mixin ],
|
|
27
|
-
// props: { a: { type: Boolean, default: false } },
|
|
28
|
-
data() {
|
|
29
|
-
const tabs = stringToItems('Apple, Orange, Banana, Super Delicious Pineapple');
|
|
30
|
-
tabs[1].hideSelector = true;
|
|
31
|
-
|
|
32
|
-
return { tabs, selectedTab: null };
|
|
33
|
-
},
|
|
34
|
-
// computed: {},
|
|
35
|
-
// watch: {},
|
|
36
|
-
// mounted() {},
|
|
37
|
-
// methods: {},
|
|
38
|
-
};
|
|
39
|
-
</script>
|
|
40
|
-
|
|
41
|
-
<style lang="scss">
|
|
42
|
-
.demo-px-pivot {
|
|
43
|
-
overflow-x: hidden;
|
|
44
|
-
padding: 20vh 0 150vh;
|
|
45
|
-
max-width: 100vw;
|
|
46
|
-
|
|
47
|
-
&__slide {
|
|
48
|
-
margin: 0 auto;
|
|
49
|
-
background-color: rgba(gold, 0.1);
|
|
50
|
-
width: 80vw;
|
|
51
|
-
max-width: 600px;
|
|
52
|
-
aspect-ratio: 4 / 3;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
</style>
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
Describe this component...
|
|
3
|
-
-->
|
|
4
|
-
<template>
|
|
5
|
-
<div>
|
|
6
|
-
<px-side-drawer>
|
|
7
|
-
<section>
|
|
8
|
-
<a href="#">Link One</a>
|
|
9
|
-
<a href="#">Link Two</a>
|
|
10
|
-
<a href="#">Link Three</a>
|
|
11
|
-
</section>
|
|
12
|
-
|
|
13
|
-
<section>
|
|
14
|
-
<a href="#">Link Four</a>
|
|
15
|
-
<a href="#">Link Five</a>
|
|
16
|
-
<a href="#">Link Six</a>
|
|
17
|
-
</section>
|
|
18
|
-
|
|
19
|
-
<!-- disabled for now...some weirdness with nested modals -->
|
|
20
|
-
<section v-if="false">
|
|
21
|
-
<px-dropdown
|
|
22
|
-
tag="button"
|
|
23
|
-
trigger="click"
|
|
24
|
-
:items="fruits"
|
|
25
|
-
items-value-property="id"
|
|
26
|
-
items-label-property="name"
|
|
27
|
-
items-key-property="id"
|
|
28
|
-
placeholder="Select a fruit..."
|
|
29
|
-
:use-modal="false"
|
|
30
|
-
></px-dropdown>
|
|
31
|
-
</section>
|
|
32
|
-
|
|
33
|
-
<template #bottom>
|
|
34
|
-
<section>
|
|
35
|
-
<a href="#">Bottom</a>
|
|
36
|
-
<a href="#">Also Bottom</a>
|
|
37
|
-
</section>
|
|
38
|
-
</template>
|
|
39
|
-
</px-side-drawer>
|
|
40
|
-
</div>
|
|
41
|
-
</template>
|
|
42
|
-
|
|
43
|
-
<script>
|
|
44
|
-
import PxSideDrawer from '../../components/PxSideDrawer.vue';
|
|
45
|
-
import PxDropdown from '../../components/PxDropdown.vue';
|
|
46
|
-
import random from '../data/random.js';
|
|
47
|
-
|
|
48
|
-
export default {
|
|
49
|
-
components: { PxSideDrawer, PxDropdown },
|
|
50
|
-
name: 'demo-px-slide-drawer',
|
|
51
|
-
// components: { Component },
|
|
52
|
-
// mixins: [ Mixin ],
|
|
53
|
-
// props: { a: { type: Boolean, default: false } },
|
|
54
|
-
data() {
|
|
55
|
-
return { fruits: random.randomFruits(5) };
|
|
56
|
-
},
|
|
57
|
-
// computed: {},
|
|
58
|
-
// watch: {},
|
|
59
|
-
// mounted() {},
|
|
60
|
-
// methods: {},
|
|
61
|
-
};
|
|
62
|
-
</script>
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
Describe this component...
|
|
3
|
-
-->
|
|
4
|
-
<template>
|
|
5
|
-
<div :class="bem()">
|
|
6
|
-
<div :class="bem('outer')" @click="evenOdd++">
|
|
7
|
-
<px-slide-transition>
|
|
8
|
-
<div v-if="evenOdd % 2" :class="bem('inner', { even: true })" />
|
|
9
|
-
</px-slide-transition>
|
|
10
|
-
<px-slide-transition>
|
|
11
|
-
<div v-if="!(evenOdd % 2)" :class="bem('inner', { odd: true })">
|
|
12
|
-
<div :class="bem('inner-inner')" data-slide>SO INNER</div>
|
|
13
|
-
</div>
|
|
14
|
-
</px-slide-transition>
|
|
15
|
-
</div>
|
|
16
|
-
</div>
|
|
17
|
-
</template>
|
|
18
|
-
|
|
19
|
-
<script>
|
|
20
|
-
import PxSlideTransition from '../../components/PxSlideTransition.vue';
|
|
21
|
-
|
|
22
|
-
export default {
|
|
23
|
-
name: 'demo-px-slide-transition',
|
|
24
|
-
components: { PxSlideTransition },
|
|
25
|
-
// mixins: [ Mixin ],
|
|
26
|
-
// props: { a: { type: Boolean, default: false } },
|
|
27
|
-
data() {
|
|
28
|
-
return { evenOdd: 0 };
|
|
29
|
-
},
|
|
30
|
-
// computed: {},
|
|
31
|
-
// watch: {},
|
|
32
|
-
// mounted() {},
|
|
33
|
-
// methods: {},
|
|
34
|
-
};
|
|
35
|
-
</script>
|
|
36
|
-
|
|
37
|
-
<style lang="scss">
|
|
38
|
-
@use '../../styles/px.scss' as *;
|
|
39
|
-
|
|
40
|
-
.demo-px-slide-transition {
|
|
41
|
-
&__outer {
|
|
42
|
-
width: 300px;
|
|
43
|
-
height: 300px;
|
|
44
|
-
background-color: hotpink;
|
|
45
|
-
border-radius: 50%;
|
|
46
|
-
position: relative;
|
|
47
|
-
margin: 20px auto;
|
|
48
|
-
padding: 30px;
|
|
49
|
-
box-sizing: border-box;
|
|
50
|
-
display: grid;
|
|
51
|
-
grid-template-columns: 100%;
|
|
52
|
-
grid-template-rows: 100%;
|
|
53
|
-
grid-area: content;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
&__inner {
|
|
57
|
-
width: 100%;
|
|
58
|
-
height: 100%;
|
|
59
|
-
border-radius: 50%;
|
|
60
|
-
background-color: gold;
|
|
61
|
-
display: flex;
|
|
62
|
-
align-items: center;
|
|
63
|
-
justify-content: center;
|
|
64
|
-
|
|
65
|
-
grid-area: 1/1/1/1;
|
|
66
|
-
&--even {
|
|
67
|
-
background-color: purple;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
&__inner-inner {
|
|
72
|
-
width: 80%;
|
|
73
|
-
height: 80%;
|
|
74
|
-
background-color: orange;
|
|
75
|
-
display: flex;
|
|
76
|
-
align-items: center;
|
|
77
|
-
justify-content: center;
|
|
78
|
-
font-family: sans-serif;
|
|
79
|
-
font-weight: bold;
|
|
80
|
-
color: white;
|
|
81
|
-
border-radius: 50%;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
</style>
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
Describe this component...
|
|
3
|
-
-->
|
|
4
|
-
<template>
|
|
5
|
-
<px-flex :class="bem()" vertical style="height: 100%" gap="1">
|
|
6
|
-
<px-flex justify="center" gap="1">
|
|
7
|
-
<button @click="clickPrev">Previous</button>
|
|
8
|
-
<button @click="clickNext">Next</button>
|
|
9
|
-
<px-toggle v-model:checked="nested">Nested</px-toggle>
|
|
10
|
-
</px-flex>
|
|
11
|
-
<px-slides :style="{ flex: 1 }" ref="slides" :items="fruits" items-key-property="id">
|
|
12
|
-
<template #slide="{ item, index }">
|
|
13
|
-
<!-- NESTED -->
|
|
14
|
-
<div v-if="nested && index == 0" :class="bem('nested')">
|
|
15
|
-
<img
|
|
16
|
-
data-drag
|
|
17
|
-
:src="item.image"
|
|
18
|
-
:style="{
|
|
19
|
-
aspectRatio: 1,
|
|
20
|
-
width: '50vw',
|
|
21
|
-
objectFit: 'cover',
|
|
22
|
-
borderRadius: '50%',
|
|
23
|
-
}"
|
|
24
|
-
/>
|
|
25
|
-
|
|
26
|
-
<px-slides :items="fruits" items-key-property="id">
|
|
27
|
-
<template #slide="{ item, index }">
|
|
28
|
-
<div :class="bem('item')">
|
|
29
|
-
<div>
|
|
30
|
-
<h1>NESTED {{ item.name }} {{ index }}</h1>
|
|
31
|
-
</div>
|
|
32
|
-
|
|
33
|
-
<img
|
|
34
|
-
data-drag
|
|
35
|
-
:src="item.image"
|
|
36
|
-
:style="{
|
|
37
|
-
aspectRatio: 1,
|
|
38
|
-
width: '50vw',
|
|
39
|
-
objectFit: 'cover',
|
|
40
|
-
borderRadius: '50%',
|
|
41
|
-
}"
|
|
42
|
-
/>
|
|
43
|
-
</div>
|
|
44
|
-
</template>
|
|
45
|
-
</px-slides>
|
|
46
|
-
</div>
|
|
47
|
-
|
|
48
|
-
<!-- NORMAL -->
|
|
49
|
-
<div v-else :class="bem('item')">
|
|
50
|
-
<div>
|
|
51
|
-
<h1>{{ item.name }} {{ index }}</h1>
|
|
52
|
-
</div>
|
|
53
|
-
|
|
54
|
-
<img
|
|
55
|
-
data-drag
|
|
56
|
-
:src="item.image"
|
|
57
|
-
:style="{
|
|
58
|
-
aspectRatio: 1,
|
|
59
|
-
width: '50vw',
|
|
60
|
-
objectFit: 'cover',
|
|
61
|
-
borderRadius: '50%',
|
|
62
|
-
}"
|
|
63
|
-
/>
|
|
64
|
-
</div>
|
|
65
|
-
</template>
|
|
66
|
-
<!-- <template #item="{ item, index, dragX }">
|
|
67
|
-
<div :class="bem('item')" :style="{ transform: `translate(${dragX}px, 0)` }">
|
|
68
|
-
<px-card :class="bem('card')">
|
|
69
|
-
<div :class="bem('no-swiping')">(no swiping)</div>
|
|
70
|
-
<p>{{ item.name }} ({{ index }})</p>
|
|
71
|
-
<div
|
|
72
|
-
:class="bem('graphic')"
|
|
73
|
-
:style="{
|
|
74
|
-
backgroundColor: item.color,
|
|
75
|
-
}"
|
|
76
|
-
></div>
|
|
77
|
-
</px-card>
|
|
78
|
-
</div>
|
|
79
|
-
</template> -->
|
|
80
|
-
</px-slides>
|
|
81
|
-
</px-flex>
|
|
82
|
-
</template>
|
|
83
|
-
|
|
84
|
-
<script>
|
|
85
|
-
import PxFlex from '../../components/PxFlex.vue';
|
|
86
|
-
import PxSlides from '../../components/PxSlides.vue';
|
|
87
|
-
import PxToggle from '../../components/PxToggle.vue';
|
|
88
|
-
|
|
89
|
-
import random from '../data/random.js';
|
|
90
|
-
|
|
91
|
-
export default {
|
|
92
|
-
name: 'demo-px-slides',
|
|
93
|
-
components: { PxSlides, PxFlex, PxToggle },
|
|
94
|
-
// mixins: [ Mixin ],
|
|
95
|
-
// props: { a: { type: Boolean, default: false } },
|
|
96
|
-
data() {
|
|
97
|
-
return { fruits: [], nested: false };
|
|
98
|
-
},
|
|
99
|
-
// computed: {},
|
|
100
|
-
// watch: {},
|
|
101
|
-
mounted() {
|
|
102
|
-
this.fruits = random.randomFruits(3);
|
|
103
|
-
},
|
|
104
|
-
methods: {
|
|
105
|
-
clickPrev() {
|
|
106
|
-
this.$refs.slides.previous();
|
|
107
|
-
},
|
|
108
|
-
clickNext() {
|
|
109
|
-
this.$refs.slides.next();
|
|
110
|
-
},
|
|
111
|
-
},
|
|
112
|
-
};
|
|
113
|
-
</script>
|
|
114
|
-
|
|
115
|
-
<style lang="scss">
|
|
116
|
-
@use '../../styles/px.scss' as *;
|
|
117
|
-
|
|
118
|
-
.demo-px-slides {
|
|
119
|
-
padding: 10px;
|
|
120
|
-
gap: 10px;
|
|
121
|
-
|
|
122
|
-
width: 100vw;
|
|
123
|
-
box-sizing: border-box;
|
|
124
|
-
overflow: hidden;
|
|
125
|
-
height: 100%;
|
|
126
|
-
display: grid;
|
|
127
|
-
grid-template-columns: 100%;
|
|
128
|
-
grid-template-rows: 100%;
|
|
129
|
-
// min-height: 300vh;
|
|
130
|
-
border: 5px solid hotpink;
|
|
131
|
-
|
|
132
|
-
&__nested {
|
|
133
|
-
background-color: gold;
|
|
134
|
-
font-size: 10px;
|
|
135
|
-
opacity: 0.5;
|
|
136
|
-
display: flex;
|
|
137
|
-
> * {
|
|
138
|
-
flex: 1;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
</style>
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
Describe this component...
|
|
3
|
-
-->
|
|
4
|
-
<template>
|
|
5
|
-
<div :class="bem()">
|
|
6
|
-
<px-styles-preview />
|
|
7
|
-
</div>
|
|
8
|
-
</template>
|
|
9
|
-
|
|
10
|
-
<script>
|
|
11
|
-
import PxStylesPreview from '../../components/PxStylesPreview.vue';
|
|
12
|
-
export default {
|
|
13
|
-
components: { PxStylesPreview },
|
|
14
|
-
name: 'demo-px-styles-preview',
|
|
15
|
-
// components: { Component },
|
|
16
|
-
// mixins: [ Mixin ],
|
|
17
|
-
// props: { a: { type: Boolean, default: false } },
|
|
18
|
-
// data() { return { b: 0 }; },
|
|
19
|
-
// computed: {},
|
|
20
|
-
// watch: {},
|
|
21
|
-
// mounted() {},
|
|
22
|
-
// methods: {},
|
|
23
|
-
};
|
|
24
|
-
</script>
|
|
25
|
-
|
|
26
|
-
<style lang="scss">
|
|
27
|
-
// import the library (so we can configure it)
|
|
28
|
-
@use '@thinkpixellab-public/px-styles' as *;
|
|
29
|
-
|
|
30
|
-
.demo-px-styles-preview {
|
|
31
|
-
// add configuration as needed (this is optional)
|
|
32
|
-
@include config('colors:accent', #5157bd);
|
|
33
|
-
@include config('controls:border-radius', 6px);
|
|
34
|
-
|
|
35
|
-
//@include config('font-family', 'Arial');
|
|
36
|
-
|
|
37
|
-
// initialize
|
|
38
|
-
@include init();
|
|
39
|
-
@include boilerplate($scoped: true);
|
|
40
|
-
}
|
|
41
|
-
</style>
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
Describe this component...
|
|
3
|
-
-->
|
|
4
|
-
<template>
|
|
5
|
-
<div>
|
|
6
|
-
<px-swiper :loop="true">
|
|
7
|
-
<px-swiper-slide>
|
|
8
|
-
<div class="swiper-max-width">
|
|
9
|
-
<img class="swiper-img" src="https://picsum.photos/1600/900?grayscale" />
|
|
10
|
-
</div>
|
|
11
|
-
</px-swiper-slide>
|
|
12
|
-
<px-swiper-slide>
|
|
13
|
-
<img class="swiper-img" src="https://picsum.photos/1601/900?grayscale" />
|
|
14
|
-
</px-swiper-slide>
|
|
15
|
-
<px-swiper-slide>
|
|
16
|
-
<img class="swiper-img" src="https://picsum.photos/1602/900?grayscale" />
|
|
17
|
-
</px-swiper-slide>
|
|
18
|
-
</px-swiper>
|
|
19
|
-
</div>
|
|
20
|
-
</template>
|
|
21
|
-
|
|
22
|
-
<script>
|
|
23
|
-
import PxSwiper from '../../components/PxSwiper.vue';
|
|
24
|
-
import PxSwiperSlide from '../../components/PxSwiperSlide.vue';
|
|
25
|
-
export default {
|
|
26
|
-
name: 'demo-px-swiper',
|
|
27
|
-
components: { PxSwiper, PxSwiperSlide },
|
|
28
|
-
// mixins: [ Mixin ],
|
|
29
|
-
// props: { a: { type: Boolean, default: false } },
|
|
30
|
-
// data() { return { b: 0 }; },
|
|
31
|
-
// computed: {},
|
|
32
|
-
// watch: {},
|
|
33
|
-
// mounted() {},
|
|
34
|
-
// methods: {},
|
|
35
|
-
};
|
|
36
|
-
</script>
|
package/dev/demos/DemoPicker.vue
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
<demo-picker :demos="['PxDatePicker', 'PxDropdown']">
|
|
3
|
-
<template #default="{ demoComponent }">
|
|
4
|
-
<component :is="demoComponent" />
|
|
5
|
-
</template>
|
|
6
|
-
</demo-picker>
|
|
7
|
-
-->
|
|
8
|
-
<template>
|
|
9
|
-
<div :class="bem()">
|
|
10
|
-
<div :class="bem('main')">
|
|
11
|
-
<slot name="default" :demoComponent="demoComponent"></slot>
|
|
12
|
-
</div>
|
|
13
|
-
</div>
|
|
14
|
-
</template>
|
|
15
|
-
|
|
16
|
-
<script>
|
|
17
|
-
import { getQueryParam } from '../../utils/utils.js';
|
|
18
|
-
|
|
19
|
-
export default {
|
|
20
|
-
name: 'demo-picker',
|
|
21
|
-
// mixins: [],
|
|
22
|
-
// components: {
|
|
23
|
-
// MyComponent
|
|
24
|
-
// },
|
|
25
|
-
props: {
|
|
26
|
-
demos: { type: Array, default: null },
|
|
27
|
-
storageKey: { type: String, default: 'demo' },
|
|
28
|
-
},
|
|
29
|
-
data() {
|
|
30
|
-
return {
|
|
31
|
-
demoComponent: null,
|
|
32
|
-
dropdownVisible: false,
|
|
33
|
-
};
|
|
34
|
-
},
|
|
35
|
-
mounted() {
|
|
36
|
-
const demo = this.getDemoSelection();
|
|
37
|
-
if (demo && demo.trim()) {
|
|
38
|
-
this.setDemoSelection(demo);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
this.demoComponent = demo;
|
|
42
|
-
console.log(this.demoComponent);
|
|
43
|
-
|
|
44
|
-
document.addEventListener('keydown', e => {
|
|
45
|
-
if (e.key == 'F1') {
|
|
46
|
-
this.dropdownVisible = !this.dropdownVisible;
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
},
|
|
50
|
-
// watch: {},
|
|
51
|
-
// computed: {}
|
|
52
|
-
methods: {
|
|
53
|
-
setDemoSelection(demo) {
|
|
54
|
-
if (window?.localStorage) {
|
|
55
|
-
window.localStorage.setItem(this.storageKey, demo);
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
getDemoSelection() {
|
|
59
|
-
return getQueryParam('demo') || window?.localStorage?.getItem(this.storageKey);
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
};
|
|
63
|
-
</script>
|
|
64
|
-
|
|
65
|
-
<style lang="scss">
|
|
66
|
-
.demo-picker {
|
|
67
|
-
&__main {
|
|
68
|
-
display: grid;
|
|
69
|
-
min-width: 100vw;
|
|
70
|
-
min-height: 100vh;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
&__toolbar {
|
|
74
|
-
background-color: #23272e;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
</style>
|
package/dev/dev.vue
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div id="app">
|
|
3
|
-
<component :is="componentToRender" v-if="componentToRender" />
|
|
4
|
-
</div>
|
|
5
|
-
</template>
|
|
6
|
-
|
|
7
|
-
<script>
|
|
8
|
-
import Vue from 'vue';
|
|
9
|
-
|
|
10
|
-
import PxVueTest from '../components/PxVueTest.vue';
|
|
11
|
-
import DemoPxSlides from './demos/Demo-PxSlides.vue';
|
|
12
|
-
import DemoPxSideDrawer from './demos/Demo-PxSideDrawer.vue';
|
|
13
|
-
import DemoPxCardGrid from './demos/Demo-PxCardGrid.vue';
|
|
14
|
-
import DemoPxSlideTransition from './demos/Demo-PxSlideTransition.vue';
|
|
15
|
-
import DemoPxSwiper from './demos/Demo-PxSwiper.vue';
|
|
16
|
-
import DemoPxBaseDrag from './demos/Demo-PxBaseDrag.vue';
|
|
17
|
-
import DemoPxStylesPreview from './demos/Demo-PxStylesPreview.vue';
|
|
18
|
-
import DemoPxPivot from './demos/Demo-PxPivot.vue';
|
|
19
|
-
import DemoPxFloat from './demos/Demo-PxFloat.vue';
|
|
20
|
-
import DemoPxContain from './demos/Demo-PxContain.vue';
|
|
21
|
-
import DemoPxMenu from './demos/Demo-PxMenu.vue';
|
|
22
|
-
import DemoPxFlip from './demos/Demo-PxFlip.vue';
|
|
23
|
-
|
|
24
|
-
export default Vue.extend({
|
|
25
|
-
components: {
|
|
26
|
-
PxVueTest,
|
|
27
|
-
DemoPxSlides,
|
|
28
|
-
DemoPxSideDrawer,
|
|
29
|
-
DemoPxCardGrid,
|
|
30
|
-
DemoPxSlideTransition,
|
|
31
|
-
DemoPxSwiper,
|
|
32
|
-
DemoPxBaseDrag,
|
|
33
|
-
DemoPxStylesPreview,
|
|
34
|
-
DemoPxPivot,
|
|
35
|
-
DemoPxFloat,
|
|
36
|
-
DemoPxContain,
|
|
37
|
-
DemoPxMenu,
|
|
38
|
-
DemoPxFlip,
|
|
39
|
-
},
|
|
40
|
-
name: 'ServeDev',
|
|
41
|
-
data() {
|
|
42
|
-
return {
|
|
43
|
-
componentToRender: null,
|
|
44
|
-
};
|
|
45
|
-
},
|
|
46
|
-
computed: {},
|
|
47
|
-
mounted() {
|
|
48
|
-
const params = new Proxy(new URLSearchParams(window.location.search), {
|
|
49
|
-
get: (searchParams, prop) => searchParams.get(prop),
|
|
50
|
-
});
|
|
51
|
-
this.componentToRender = params.component || 'DemoPxFlip';
|
|
52
|
-
console.log(`this.componentToRender: ${this.componentToRender}`);
|
|
53
|
-
},
|
|
54
|
-
});
|
|
55
|
-
</script>
|
|
56
|
-
<style>
|
|
57
|
-
html,
|
|
58
|
-
body {
|
|
59
|
-
margin: 0;
|
|
60
|
-
padding: 0;
|
|
61
|
-
min-width: 100vw;
|
|
62
|
-
min-height: 100vh;
|
|
63
|
-
}
|
|
64
|
-
</style>
|
package/dev/serve.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import Vue from 'vue';
|
|
2
|
-
import dev from './dev.vue';
|
|
3
|
-
|
|
4
|
-
import common from '../plugins/common.js';
|
|
5
|
-
Vue.use(common);
|
|
6
|
-
|
|
7
|
-
import commonLib from '../plugins/common-lib.js';
|
|
8
|
-
Vue.use(commonLib);
|
|
9
|
-
|
|
10
|
-
import commonClient from '../plugins/common-client.js';
|
|
11
|
-
Vue.use(commonClient);
|
|
12
|
-
|
|
13
|
-
Vue.config.productionTip = false;
|
|
14
|
-
|
|
15
|
-
new Vue({
|
|
16
|
-
render: h => h(dev),
|
|
17
|
-
}).$mount('#app');
|
package/stories/Intro.mdx
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
### PxVue
|