@thinkpixellab-public/px-vue 3.0.1
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/.eslintrc.js +14 -0
- package/.prettierrc.js +10 -0
- package/LICENSE.md +9 -0
- package/README.md +83 -0
- package/assets/feather/activity.svg +1 -0
- package/assets/feather/airplay.svg +1 -0
- package/assets/feather/alert-circle.svg +1 -0
- package/assets/feather/alert-octagon.svg +1 -0
- package/assets/feather/alert-triangle.svg +1 -0
- package/assets/feather/align-center.svg +1 -0
- package/assets/feather/align-justify.svg +1 -0
- package/assets/feather/align-left.svg +1 -0
- package/assets/feather/align-right.svg +1 -0
- package/assets/feather/anchor.svg +1 -0
- package/assets/feather/aperture.svg +1 -0
- package/assets/feather/archive.svg +1 -0
- package/assets/feather/arrow-down-circle.svg +1 -0
- package/assets/feather/arrow-down-left.svg +1 -0
- package/assets/feather/arrow-down-right.svg +1 -0
- package/assets/feather/arrow-down.svg +1 -0
- package/assets/feather/arrow-left-circle.svg +1 -0
- package/assets/feather/arrow-left.svg +1 -0
- package/assets/feather/arrow-right-circle.svg +1 -0
- package/assets/feather/arrow-right.svg +1 -0
- package/assets/feather/arrow-up-circle.svg +1 -0
- package/assets/feather/arrow-up-left.svg +1 -0
- package/assets/feather/arrow-up-right.svg +1 -0
- package/assets/feather/arrow-up.svg +1 -0
- package/assets/feather/at-sign.svg +1 -0
- package/assets/feather/award.svg +1 -0
- package/assets/feather/bar-chart-2.svg +1 -0
- package/assets/feather/bar-chart.svg +1 -0
- package/assets/feather/battery-charging.svg +1 -0
- package/assets/feather/battery.svg +1 -0
- package/assets/feather/bell-off.svg +1 -0
- package/assets/feather/bell.svg +1 -0
- package/assets/feather/bluetooth.svg +1 -0
- package/assets/feather/bold.svg +1 -0
- package/assets/feather/book-open.svg +1 -0
- package/assets/feather/book.svg +1 -0
- package/assets/feather/bookmark.svg +1 -0
- package/assets/feather/box.svg +1 -0
- package/assets/feather/briefcase.svg +1 -0
- package/assets/feather/calendar.svg +1 -0
- package/assets/feather/camera-off.svg +1 -0
- package/assets/feather/camera.svg +1 -0
- package/assets/feather/cast.svg +1 -0
- package/assets/feather/check-circle.svg +1 -0
- package/assets/feather/check-square.svg +1 -0
- package/assets/feather/check.svg +1 -0
- package/assets/feather/chevron-down.svg +1 -0
- package/assets/feather/chevron-left.svg +1 -0
- package/assets/feather/chevron-right.svg +1 -0
- package/assets/feather/chevron-up.svg +1 -0
- package/assets/feather/chevrons-down.svg +1 -0
- package/assets/feather/chevrons-left.svg +1 -0
- package/assets/feather/chevrons-right.svg +1 -0
- package/assets/feather/chevrons-up.svg +1 -0
- package/assets/feather/chrome.svg +1 -0
- package/assets/feather/circle.svg +1 -0
- package/assets/feather/clipboard.svg +1 -0
- package/assets/feather/clock.svg +1 -0
- package/assets/feather/cloud-drizzle.svg +1 -0
- package/assets/feather/cloud-lightning.svg +1 -0
- package/assets/feather/cloud-off.svg +1 -0
- package/assets/feather/cloud-rain.svg +1 -0
- package/assets/feather/cloud-snow.svg +1 -0
- package/assets/feather/cloud.svg +1 -0
- package/assets/feather/code.svg +1 -0
- package/assets/feather/codepen.svg +1 -0
- package/assets/feather/codesandbox.svg +1 -0
- package/assets/feather/coffee.svg +1 -0
- package/assets/feather/columns.svg +1 -0
- package/assets/feather/command.svg +1 -0
- package/assets/feather/compass.svg +1 -0
- package/assets/feather/copy.svg +1 -0
- package/assets/feather/corner-down-left.svg +1 -0
- package/assets/feather/corner-down-right.svg +1 -0
- package/assets/feather/corner-left-down.svg +1 -0
- package/assets/feather/corner-left-up.svg +1 -0
- package/assets/feather/corner-right-down.svg +1 -0
- package/assets/feather/corner-right-up.svg +1 -0
- package/assets/feather/corner-up-left.svg +1 -0
- package/assets/feather/corner-up-right.svg +1 -0
- package/assets/feather/cpu.svg +1 -0
- package/assets/feather/credit-card.svg +1 -0
- package/assets/feather/crop.svg +1 -0
- package/assets/feather/crosshair.svg +1 -0
- package/assets/feather/database.svg +1 -0
- package/assets/feather/delete.svg +1 -0
- package/assets/feather/disc.svg +1 -0
- package/assets/feather/divide-circle.svg +1 -0
- package/assets/feather/divide-square.svg +1 -0
- package/assets/feather/divide.svg +1 -0
- package/assets/feather/dollar-sign.svg +1 -0
- package/assets/feather/download-cloud.svg +1 -0
- package/assets/feather/download.svg +1 -0
- package/assets/feather/dribbble.svg +1 -0
- package/assets/feather/droplet.svg +1 -0
- package/assets/feather/edit-2.svg +1 -0
- package/assets/feather/edit-3.svg +1 -0
- package/assets/feather/edit.svg +1 -0
- package/assets/feather/external-link.svg +1 -0
- package/assets/feather/eye-off.svg +1 -0
- package/assets/feather/eye.svg +1 -0
- package/assets/feather/facebook.svg +1 -0
- package/assets/feather/fast-forward.svg +1 -0
- package/assets/feather/feather.svg +1 -0
- package/assets/feather/figma.svg +1 -0
- package/assets/feather/file-minus.svg +1 -0
- package/assets/feather/file-plus.svg +1 -0
- package/assets/feather/file-text.svg +1 -0
- package/assets/feather/file.svg +1 -0
- package/assets/feather/film.svg +1 -0
- package/assets/feather/filter.svg +1 -0
- package/assets/feather/flag.svg +1 -0
- package/assets/feather/folder-minus.svg +1 -0
- package/assets/feather/folder-plus.svg +1 -0
- package/assets/feather/folder.svg +1 -0
- package/assets/feather/framer.svg +1 -0
- package/assets/feather/frown.svg +1 -0
- package/assets/feather/gift.svg +1 -0
- package/assets/feather/git-branch.svg +1 -0
- package/assets/feather/git-commit.svg +1 -0
- package/assets/feather/git-merge.svg +1 -0
- package/assets/feather/git-pull-request.svg +1 -0
- package/assets/feather/github.svg +1 -0
- package/assets/feather/gitlab.svg +1 -0
- package/assets/feather/globe.svg +1 -0
- package/assets/feather/grid.svg +1 -0
- package/assets/feather/hard-drive.svg +1 -0
- package/assets/feather/hash.svg +1 -0
- package/assets/feather/headphones.svg +1 -0
- package/assets/feather/heart.svg +1 -0
- package/assets/feather/help-circle.svg +1 -0
- package/assets/feather/hexagon.svg +1 -0
- package/assets/feather/home.svg +1 -0
- package/assets/feather/image.svg +1 -0
- package/assets/feather/inbox.svg +1 -0
- package/assets/feather/info.svg +1 -0
- package/assets/feather/instagram.svg +1 -0
- package/assets/feather/italic.svg +1 -0
- package/assets/feather/key.svg +1 -0
- package/assets/feather/layers.svg +1 -0
- package/assets/feather/layout.svg +1 -0
- package/assets/feather/life-buoy.svg +1 -0
- package/assets/feather/link-2.svg +1 -0
- package/assets/feather/link.svg +1 -0
- package/assets/feather/linkedin.svg +1 -0
- package/assets/feather/list.svg +1 -0
- package/assets/feather/loader.svg +1 -0
- package/assets/feather/lock.svg +1 -0
- package/assets/feather/log-in.svg +1 -0
- package/assets/feather/log-out.svg +1 -0
- package/assets/feather/mail.svg +1 -0
- package/assets/feather/map-pin.svg +1 -0
- package/assets/feather/map.svg +1 -0
- package/assets/feather/maximize-2.svg +1 -0
- package/assets/feather/maximize.svg +1 -0
- package/assets/feather/meh.svg +1 -0
- package/assets/feather/menu.svg +1 -0
- package/assets/feather/message-circle.svg +1 -0
- package/assets/feather/message-square.svg +1 -0
- package/assets/feather/mic-off.svg +1 -0
- package/assets/feather/mic.svg +1 -0
- package/assets/feather/minimize-2.svg +1 -0
- package/assets/feather/minimize.svg +1 -0
- package/assets/feather/minus-circle.svg +1 -0
- package/assets/feather/minus-square.svg +1 -0
- package/assets/feather/minus.svg +1 -0
- package/assets/feather/monitor.svg +1 -0
- package/assets/feather/moon.svg +1 -0
- package/assets/feather/more-horizontal.svg +1 -0
- package/assets/feather/more-vertical.svg +1 -0
- package/assets/feather/mouse-pointer.svg +1 -0
- package/assets/feather/move.svg +1 -0
- package/assets/feather/music.svg +1 -0
- package/assets/feather/navigation-2.svg +1 -0
- package/assets/feather/navigation.svg +1 -0
- package/assets/feather/octagon.svg +1 -0
- package/assets/feather/package.svg +1 -0
- package/assets/feather/paperclip.svg +1 -0
- package/assets/feather/pause-circle.svg +1 -0
- package/assets/feather/pause.svg +1 -0
- package/assets/feather/pen-tool.svg +1 -0
- package/assets/feather/percent.svg +1 -0
- package/assets/feather/phone-call.svg +1 -0
- package/assets/feather/phone-forwarded.svg +1 -0
- package/assets/feather/phone-incoming.svg +1 -0
- package/assets/feather/phone-missed.svg +1 -0
- package/assets/feather/phone-off.svg +1 -0
- package/assets/feather/phone-outgoing.svg +1 -0
- package/assets/feather/phone.svg +1 -0
- package/assets/feather/pie-chart.svg +1 -0
- package/assets/feather/play-circle.svg +1 -0
- package/assets/feather/play.svg +1 -0
- package/assets/feather/plus-circle.svg +1 -0
- package/assets/feather/plus-square.svg +1 -0
- package/assets/feather/plus.svg +1 -0
- package/assets/feather/pocket.svg +1 -0
- package/assets/feather/power.svg +1 -0
- package/assets/feather/printer.svg +1 -0
- package/assets/feather/radio.svg +1 -0
- package/assets/feather/refresh-ccw.svg +1 -0
- package/assets/feather/refresh-cw.svg +1 -0
- package/assets/feather/repeat.svg +1 -0
- package/assets/feather/rewind.svg +1 -0
- package/assets/feather/rotate-ccw.svg +1 -0
- package/assets/feather/rotate-cw.svg +1 -0
- package/assets/feather/rss.svg +1 -0
- package/assets/feather/save.svg +1 -0
- package/assets/feather/scissors.svg +1 -0
- package/assets/feather/search.svg +1 -0
- package/assets/feather/send.svg +1 -0
- package/assets/feather/server.svg +1 -0
- package/assets/feather/settings.svg +1 -0
- package/assets/feather/share-2.svg +1 -0
- package/assets/feather/share.svg +1 -0
- package/assets/feather/shield-off.svg +1 -0
- package/assets/feather/shield.svg +1 -0
- package/assets/feather/shopping-bag.svg +1 -0
- package/assets/feather/shopping-cart.svg +1 -0
- package/assets/feather/shuffle.svg +1 -0
- package/assets/feather/sidebar.svg +1 -0
- package/assets/feather/skip-back.svg +1 -0
- package/assets/feather/skip-forward.svg +1 -0
- package/assets/feather/slack.svg +1 -0
- package/assets/feather/slash.svg +1 -0
- package/assets/feather/sliders.svg +1 -0
- package/assets/feather/smartphone.svg +1 -0
- package/assets/feather/smile.svg +1 -0
- package/assets/feather/speaker.svg +1 -0
- package/assets/feather/square.svg +1 -0
- package/assets/feather/star.svg +1 -0
- package/assets/feather/stop-circle.svg +1 -0
- package/assets/feather/sun.svg +1 -0
- package/assets/feather/sunrise.svg +1 -0
- package/assets/feather/sunset.svg +1 -0
- package/assets/feather/table.svg +1 -0
- package/assets/feather/tablet.svg +1 -0
- package/assets/feather/tag.svg +1 -0
- package/assets/feather/target.svg +1 -0
- package/assets/feather/terminal.svg +1 -0
- package/assets/feather/thermometer.svg +1 -0
- package/assets/feather/thumbs-down.svg +1 -0
- package/assets/feather/thumbs-up.svg +1 -0
- package/assets/feather/toggle-left.svg +1 -0
- package/assets/feather/toggle-right.svg +1 -0
- package/assets/feather/tool.svg +1 -0
- package/assets/feather/trash-2.svg +1 -0
- package/assets/feather/trash.svg +1 -0
- package/assets/feather/trello.svg +1 -0
- package/assets/feather/trending-down.svg +1 -0
- package/assets/feather/trending-up.svg +1 -0
- package/assets/feather/triangle.svg +1 -0
- package/assets/feather/truck.svg +1 -0
- package/assets/feather/tv.svg +1 -0
- package/assets/feather/twitch.svg +1 -0
- package/assets/feather/twitter.svg +1 -0
- package/assets/feather/type.svg +1 -0
- package/assets/feather/umbrella.svg +1 -0
- package/assets/feather/underline.svg +1 -0
- package/assets/feather/unlock.svg +1 -0
- package/assets/feather/upload-cloud.svg +1 -0
- package/assets/feather/upload.svg +1 -0
- package/assets/feather/user-check.svg +1 -0
- package/assets/feather/user-minus.svg +1 -0
- package/assets/feather/user-plus.svg +1 -0
- package/assets/feather/user-x.svg +1 -0
- package/assets/feather/user.svg +1 -0
- package/assets/feather/users.svg +1 -0
- package/assets/feather/video-off.svg +1 -0
- package/assets/feather/video.svg +1 -0
- package/assets/feather/voicemail.svg +1 -0
- package/assets/feather/volume-1.svg +1 -0
- package/assets/feather/volume-2.svg +1 -0
- package/assets/feather/volume-x.svg +1 -0
- package/assets/feather/volume.svg +1 -0
- package/assets/feather/watch.svg +1 -0
- package/assets/feather/wifi-off.svg +1 -0
- package/assets/feather/wifi.svg +1 -0
- package/assets/feather/wind.svg +1 -0
- package/assets/feather/x-circle.svg +1 -0
- package/assets/feather/x-octagon.svg +1 -0
- package/assets/feather/x-square.svg +1 -0
- package/assets/feather/x.svg +1 -0
- package/assets/feather/youtube.svg +1 -0
- package/assets/feather/zap-off.svg +1 -0
- package/assets/feather/zap.svg +1 -0
- package/assets/feather/zoom-in.svg +1 -0
- package/assets/feather/zoom-out.svg +1 -0
- package/assets/icons/calendar.svg +6 -0
- package/assets/icons/check.svg +1 -0
- package/assets/icons/close-sm.svg +1 -0
- package/assets/icons/close.svg +1 -0
- package/assets/icons/copy.svg +1 -0
- package/assets/icons/dropdown.svg +8 -0
- package/assets/icons/invalid.svg +1 -0
- package/assets/icons/menu.svg +1 -0
- package/assets/icons/nav-next.svg +1 -0
- package/assets/icons/nav-prev.svg +1 -0
- package/assets/icons/sort-asc.svg +1 -0
- package/assets/icons/sort-desc.svg +1 -0
- package/assets/test/README.md +1 -0
- package/assets/test/trash.svg +8 -0
- package/babel.config.js +16 -0
- package/components/PxAspect.vue +127 -0
- package/components/PxAutoClamp.vue +75 -0
- package/components/PxBalancedText.vue +118 -0
- package/components/PxBase.vue +15 -0
- package/components/PxBaseDate.vue +27 -0
- package/components/PxBaseItems.vue +72 -0
- package/components/PxBaseItemsSelect.vue +230 -0
- package/components/PxBaseResize.vue +60 -0
- package/components/PxBaseToggle.vue +56 -0
- package/components/PxBaseVariants.vue +62 -0
- package/components/PxBaseVisible.vue +40 -0
- package/components/PxCalendar.vue +385 -0
- package/components/PxCard.vue +47 -0
- package/components/PxCardGrid.vue +386 -0
- package/components/PxClock.vue +510 -0
- package/components/PxCopyText.vue +78 -0
- package/components/PxDatePicker.vue +249 -0
- package/components/PxDropdown.vue +181 -0
- package/components/PxExpander.vue +46 -0
- package/components/PxFeatherIcon.vue +29 -0
- package/components/PxFeatherIconButton.vue +19 -0
- package/components/PxFit.vue +274 -0
- package/components/PxFlex.vue +93 -0
- package/components/PxFloat.vue +32 -0
- package/components/PxIcon.vue +43 -0
- package/components/PxIconButton.vue +115 -0
- package/components/PxIdUniquer.vue +59 -0
- package/components/PxModal.vue +365 -0
- package/components/PxNineGrid.vue +94 -0
- package/components/PxPivot.vue +207 -0
- package/components/PxPopup.vue +230 -0
- package/components/PxPortal.vue +138 -0
- package/components/PxPortalTarget.vue +25 -0
- package/components/PxProgressCircle.vue +73 -0
- package/components/PxRadioButton.vue +83 -0
- package/components/PxSideDrawer.vue +164 -0
- package/components/PxSlideTransition.vue +116 -0
- package/components/PxSlides.vue +217 -0
- package/components/PxStylesPreview.vue +129 -0
- package/components/PxSvg.vue +157 -0
- package/components/PxSwiper.vue +271 -0
- package/components/PxSwiperSlide.vue +42 -0
- package/components/PxSyncHeight.vue +137 -0
- package/components/PxTable.vue +323 -0
- package/components/PxTabs.vue +1 -0
- package/components/PxTextbox.vue +90 -0
- package/components/PxToggle.vue +125 -0
- package/components/PxToggleButton.vue +139 -0
- package/components/PxToggleButtonList.vue +131 -0
- package/components/PxTransitionExpand.vue +100 -0
- package/components/PxValidator.vue +431 -0
- package/components/PxVueTest.vue +761 -0
- package/components/README.md +0 -0
- package/dev/data/fruits.js +59 -0
- package/dev/data/random.js +13 -0
- package/dev/demos/Demo-PxBaseDrag.vue +94 -0
- package/dev/demos/Demo-PxCardGrid.vue +53 -0
- package/dev/demos/Demo-PxPivot.vue +58 -0
- package/dev/demos/Demo-PxSideDrawer.vue +72 -0
- package/dev/demos/Demo-PxSlideTransition.vue +86 -0
- package/dev/demos/Demo-PxSlides.vue +142 -0
- package/dev/demos/Demo-PxStylesPreview.vue +46 -0
- package/dev/demos/Demo-PxSwiper.vue +44 -0
- package/dev/demos/DemoPicker.vue +79 -0
- package/dev/dev.vue +56 -0
- package/dev/serve.js +17 -0
- package/package.json +45 -0
- package/plugins/common-client.js +13 -0
- package/plugins/common-lib.js +4 -0
- package/plugins/common.js +39 -0
- package/plugins/filters/aspect.js +14 -0
- package/plugins/filters/date.js +26 -0
- package/plugins/filters/kebab.js +9 -0
- package/plugins/filters/phone.js +7 -0
- package/plugins/filters/slug.js +26 -0
- package/plugins/filters/spacenator.js +11 -0
- package/plugins/filters/stringToItems.js +28 -0
- package/plugins/filters/striphtml.js +10 -0
- package/plugins/mixins/eventBus.js +23 -0
- package/px-styles.config.scss +12 -0
- package/styles/helpers.scss +14 -0
- package/styles/px.scss +6 -0
- package/utils/balanceText.js +123 -0
- package/utils/bem.js +99 -0
- package/utils/cardGrid.js +383 -0
- package/utils/cssStr.js +45 -0
- package/utils/drag.js +363 -0
- package/utils/fit.js +73 -0
- package/utils/tween.js +129 -0
- package/utils/utils.js +167 -0
- package/utils/variants.js +33 -0
- package/vue.config.js +12 -0
|
@@ -0,0 +1,761 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
|
|
3
|
+
-->
|
|
4
|
+
<template>
|
|
5
|
+
<div class="px-vue-test">
|
|
6
|
+
<px-tester>
|
|
7
|
+
<px-test test-id="px-nine-grid" name="px-nine-grid" :size="{ h: 300 }">
|
|
8
|
+
<px-nine-grid
|
|
9
|
+
slice="50"
|
|
10
|
+
src="https://harnerdesigns.com/wp-content/uploads/2018/08/border.svg"
|
|
11
|
+
:src-width="300"
|
|
12
|
+
:src-height="300"
|
|
13
|
+
:style="{ width: cssPcnt(1), height: cssPcnt(1) }"
|
|
14
|
+
/>
|
|
15
|
+
</px-test>
|
|
16
|
+
|
|
17
|
+
<px-test test-id="px-card-grd" name="px-card-grid" :size="{ h: 300 }">
|
|
18
|
+
<px-card-grid />
|
|
19
|
+
</px-test>
|
|
20
|
+
|
|
21
|
+
<px-test test-id="px-fit" name="px-fit" :size="{ h: 300 }">
|
|
22
|
+
<px-fit :fits="['lg', 'md', 'sm']" :debug="false">
|
|
23
|
+
<template #default="{ fit }">
|
|
24
|
+
<div :class="`fit fit--${fit}`">
|
|
25
|
+
<span v-if="fit == 'lg'">LARGE</span>
|
|
26
|
+
<span v-if="fit == 'md'">MEDIUM</span>
|
|
27
|
+
<span v-if="fit == 'sm'">SMALL</span>
|
|
28
|
+
One Two Three Four Five Size Seven Eight Nine Ten
|
|
29
|
+
</div>
|
|
30
|
+
</template>
|
|
31
|
+
</px-fit>
|
|
32
|
+
</px-test>
|
|
33
|
+
|
|
34
|
+
<px-test test-id="px-table" name="px-table" :size="{ h: 300 }">
|
|
35
|
+
<!--
|
|
36
|
+
id: 'orange',
|
|
37
|
+
name: 'Orange',
|
|
38
|
+
color: 'orange',
|
|
39
|
+
deliciousNess: 8,
|
|
40
|
+
lastPurchase: new Date('2022-02-01T00:00:00.000Z'),
|
|
41
|
+
|
|
42
|
+
-->
|
|
43
|
+
|
|
44
|
+
<px-table
|
|
45
|
+
:items="fruits"
|
|
46
|
+
items-key-property="id"
|
|
47
|
+
:columns="[
|
|
48
|
+
{
|
|
49
|
+
property: 'name',
|
|
50
|
+
align: 'start',
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
template: 'color',
|
|
54
|
+
headerTemplate: 'color-header',
|
|
55
|
+
label: 'COLOR',
|
|
56
|
+
sortable: false,
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
property: 'deliciousNess',
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
property: 'description',
|
|
63
|
+
overflow: 'ellipsis',
|
|
64
|
+
align: 'start',
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
property: 'lastPurchase',
|
|
68
|
+
},
|
|
69
|
+
]"
|
|
70
|
+
>
|
|
71
|
+
<!-- color column slot -->
|
|
72
|
+
<template #color="{ item }">
|
|
73
|
+
<div
|
|
74
|
+
:style="{
|
|
75
|
+
width: '1em',
|
|
76
|
+
height: '1em',
|
|
77
|
+
borderRadius: '50%',
|
|
78
|
+
backgroundColor: item.color,
|
|
79
|
+
}"
|
|
80
|
+
/>
|
|
81
|
+
</template>
|
|
82
|
+
|
|
83
|
+
<!-- color-header column header slot -->
|
|
84
|
+
<template #color-header>
|
|
85
|
+
<div
|
|
86
|
+
:style="{
|
|
87
|
+
width: '1em',
|
|
88
|
+
height: '1em',
|
|
89
|
+
borderRadius: '50%',
|
|
90
|
+
background: 'silver',
|
|
91
|
+
}"
|
|
92
|
+
/>
|
|
93
|
+
</template>
|
|
94
|
+
</px-table>
|
|
95
|
+
</px-test>
|
|
96
|
+
<px-test test-id="px-validator" name="px-validator">
|
|
97
|
+
<px-flex vertical :style="{ maxWidth: '400px', margin: '0 auto' }" gap="1">
|
|
98
|
+
<span>Has errors: {{ !allValid }}</span>
|
|
99
|
+
|
|
100
|
+
<px-validator
|
|
101
|
+
:value="validateThree"
|
|
102
|
+
@valid-changed="onValidChanged"
|
|
103
|
+
:rules="{
|
|
104
|
+
apple: val => {
|
|
105
|
+
if (val !== 'apple') {
|
|
106
|
+
return 'Must be apple';
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
}"
|
|
110
|
+
>
|
|
111
|
+
<px-dropdown
|
|
112
|
+
v-model="validateThree"
|
|
113
|
+
tag="button"
|
|
114
|
+
trigger="click"
|
|
115
|
+
:items="fruits"
|
|
116
|
+
items-value-property="id"
|
|
117
|
+
items-label-property="name"
|
|
118
|
+
items-key-property="id"
|
|
119
|
+
placeholder="Select a fruit..."
|
|
120
|
+
></px-dropdown>
|
|
121
|
+
</px-validator>
|
|
122
|
+
|
|
123
|
+
PHONE
|
|
124
|
+
<br />
|
|
125
|
+
<px-validator
|
|
126
|
+
:value="validateOne"
|
|
127
|
+
rules="required phone"
|
|
128
|
+
@valid-changed="onValidChanged"
|
|
129
|
+
>
|
|
130
|
+
<template #default="v">
|
|
131
|
+
<px-textbox
|
|
132
|
+
v-model="validateOne"
|
|
133
|
+
:class="[v.class, v.requiredClass, v.violationClasses]"
|
|
134
|
+
/>
|
|
135
|
+
</template>
|
|
136
|
+
</px-validator>
|
|
137
|
+
|
|
138
|
+
<px-validator
|
|
139
|
+
:value="validateTwo"
|
|
140
|
+
rules="required"
|
|
141
|
+
@valid-changed="onValidChanged"
|
|
142
|
+
>
|
|
143
|
+
<template #default="v">
|
|
144
|
+
<px-textbox
|
|
145
|
+
v-model="validateTwo"
|
|
146
|
+
:class="[v.class, v.requiredClass, v.violationClasses]"
|
|
147
|
+
/>
|
|
148
|
+
</template>
|
|
149
|
+
</px-validator>
|
|
150
|
+
</px-flex>
|
|
151
|
+
</px-test>
|
|
152
|
+
|
|
153
|
+
<px-test test-id="px-progress-circle" name="px-progress-circle">
|
|
154
|
+
<px-progress-circle
|
|
155
|
+
:progress="0.5"
|
|
156
|
+
:stroke-width="4"
|
|
157
|
+
style="width: 60px; color: black"
|
|
158
|
+
/>
|
|
159
|
+
</px-test>
|
|
160
|
+
|
|
161
|
+
<px-test test-id="px-aspect" name="px-aspect">
|
|
162
|
+
<px-aspect :debug="true">
|
|
163
|
+
<div :style="{ backgroundColor: 'gold' }">
|
|
164
|
+
Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.
|
|
165
|
+
Nullam id dolor id nibh ultricies vehicula ut id elit. Sed posuere
|
|
166
|
+
consectetur est at lobortis. Duis mollis, est non commodo luctus, nisi erat
|
|
167
|
+
porttitor ligula, eget lacinia odio sem nec elit. Vivamus sagittis lacus vel
|
|
168
|
+
augue laoreet rutrum faucibus dolor auctor. Nullam id dolor id nibh
|
|
169
|
+
ultricies vehicula ut id elit. Sed posuere consectetur est at lobortis. Duis
|
|
170
|
+
mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia
|
|
171
|
+
odio sem nec elit.
|
|
172
|
+
</div>
|
|
173
|
+
|
|
174
|
+
<img
|
|
175
|
+
:style="{ opacity: 0.5 }"
|
|
176
|
+
src="https://images.unsplash.com/photo-1650923500748-eee80ee6e7d1?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1920&q=80"
|
|
177
|
+
/>
|
|
178
|
+
</px-aspect>
|
|
179
|
+
</px-test>
|
|
180
|
+
|
|
181
|
+
<px-test test-id="px-swiper-cards" name="Card Swiper">
|
|
182
|
+
<div>
|
|
183
|
+
<px-swiper>
|
|
184
|
+
<px-swiper-slide>
|
|
185
|
+
<px-card>This is some content</px-card>
|
|
186
|
+
</px-swiper-slide>
|
|
187
|
+
<px-swiper-slide>
|
|
188
|
+
<px-card>This is some content</px-card>
|
|
189
|
+
</px-swiper-slide>
|
|
190
|
+
<px-swiper-slide>
|
|
191
|
+
<px-card>This is some content</px-card>
|
|
192
|
+
</px-swiper-slide>
|
|
193
|
+
</px-swiper>
|
|
194
|
+
</div>
|
|
195
|
+
|
|
196
|
+
<!-- <px-swiper :loop="true">
|
|
197
|
+
<px-swiper-slide>
|
|
198
|
+
<div class="swiper-max-width">
|
|
199
|
+
<img
|
|
200
|
+
class="swiper-img"
|
|
201
|
+
src="https://picsum.photos/1600/900?grayscale"
|
|
202
|
+
/>
|
|
203
|
+
</div>
|
|
204
|
+
</px-swiper-slide>
|
|
205
|
+
<px-swiper-slide>
|
|
206
|
+
<img class="swiper-img" src="https://picsum.photos/1601/900?grayscale" />
|
|
207
|
+
</px-swiper-slide>
|
|
208
|
+
<px-swiper-slide>
|
|
209
|
+
<img class="swiper-img" src="https://picsum.photos/1602/900?grayscale" />
|
|
210
|
+
</px-swiper-slide>
|
|
211
|
+
</px-swiper> -->
|
|
212
|
+
</px-test>
|
|
213
|
+
|
|
214
|
+
<px-test test-id="px-date-picker" name="px-date-picker">
|
|
215
|
+
<px-flex vertical align="center" gap="1">
|
|
216
|
+
<span>Selected Date: {{ currentDateNull }}</span>
|
|
217
|
+
<px-date-picker mode="textbox" v-model="currentDateNull" />
|
|
218
|
+
<px-date-picker mode="textbox" clock v-model="currentDateNull" />
|
|
219
|
+
<px-date-picker v-model="currentDateNull" />
|
|
220
|
+
<px-date-picker time v-model="currentDateNull" />
|
|
221
|
+
</px-flex>
|
|
222
|
+
</px-test>
|
|
223
|
+
|
|
224
|
+
<px-test test-id="px-clock" name="px-clock">
|
|
225
|
+
<px-clock v-model="currentDate" />
|
|
226
|
+
Selected Date: {{ currentDate }}
|
|
227
|
+
</px-test>
|
|
228
|
+
|
|
229
|
+
<px-test test-id="px-calendar" name="px-calendar">
|
|
230
|
+
<px-calendar v-model="currentDate" />
|
|
231
|
+
Selected Date: {{ currentDate }}
|
|
232
|
+
</px-test>
|
|
233
|
+
|
|
234
|
+
<px-test test-id="single-vs-multiple" name="Single vs Multiple Selection">
|
|
235
|
+
<px-flex align="center" gap="1">
|
|
236
|
+
<!-- dynamic select -->
|
|
237
|
+
|
|
238
|
+
<px-toggle-button-list
|
|
239
|
+
:multi-select="supportsMultiSelect"
|
|
240
|
+
:items="fruits"
|
|
241
|
+
items-key-property="id"
|
|
242
|
+
items-value-property="id"
|
|
243
|
+
items-label-property="name"
|
|
244
|
+
v-model="currentFruitOrFruits"
|
|
245
|
+
></px-toggle-button-list>
|
|
246
|
+
|
|
247
|
+
<px-toggle v-model="supportsMultiSelect">Multi-select</px-toggle>
|
|
248
|
+
<span>{{ currentFruitOrFruits }}</span>
|
|
249
|
+
</px-flex>
|
|
250
|
+
</px-test>
|
|
251
|
+
|
|
252
|
+
<px-test test-id="px-textbox" name="px-textbox">
|
|
253
|
+
<px-flex :vertical="true" :gap="1">
|
|
254
|
+
<div>currentText: {{ currentText }}</div>
|
|
255
|
+
|
|
256
|
+
<px-textbox v-model="currentText" placeholder="Say what you want..." />
|
|
257
|
+
|
|
258
|
+
<px-textbox
|
|
259
|
+
multiline
|
|
260
|
+
v-model="currentText"
|
|
261
|
+
rows="5"
|
|
262
|
+
placeholder="Say it longer..."
|
|
263
|
+
/>
|
|
264
|
+
|
|
265
|
+
<px-textbox type="password" />
|
|
266
|
+
<px-textbox :value="'hello@thinkpixellab.com'" type="email" />
|
|
267
|
+
</px-flex>
|
|
268
|
+
</px-test>
|
|
269
|
+
|
|
270
|
+
<px-test test-id="px-dropdown" name="px-dropdown">
|
|
271
|
+
<px-flex gap="1" align="center" justify="center">
|
|
272
|
+
<px-dropdown
|
|
273
|
+
v-model="currentFruit"
|
|
274
|
+
tag="button"
|
|
275
|
+
trigger="click"
|
|
276
|
+
:items="fruits"
|
|
277
|
+
items-value-property="id"
|
|
278
|
+
items-label-property="name"
|
|
279
|
+
items-key-property="id"
|
|
280
|
+
placeholder="Select a fruit..."
|
|
281
|
+
>
|
|
282
|
+
Button Label
|
|
283
|
+
|
|
284
|
+
<template #popup>
|
|
285
|
+
<div class="popup-menu">
|
|
286
|
+
<button>Menu Option 1</button>
|
|
287
|
+
<button>Menu Option 2</button>
|
|
288
|
+
</div>
|
|
289
|
+
</template>
|
|
290
|
+
</px-dropdown>
|
|
291
|
+
<span>{{ currentFruit }}</span>
|
|
292
|
+
</px-flex>
|
|
293
|
+
</px-test>
|
|
294
|
+
|
|
295
|
+
<px-test test-id="px-popup" name="px-popup">
|
|
296
|
+
<px-flex vertical gap="1" align="center">
|
|
297
|
+
<px-popup tag="button" trigger="click">
|
|
298
|
+
Click This Button
|
|
299
|
+
|
|
300
|
+
<template #popup>
|
|
301
|
+
<px-flex vertical class="popup-menu">
|
|
302
|
+
<button>Option 1</button>
|
|
303
|
+
<button>Option 2</button>
|
|
304
|
+
<button>Option 3</button>
|
|
305
|
+
<button>Option 4</button>
|
|
306
|
+
</px-flex>
|
|
307
|
+
</template>
|
|
308
|
+
</px-popup>
|
|
309
|
+
|
|
310
|
+
<px-popup tag="button" trigger="hover">
|
|
311
|
+
Hover Over This
|
|
312
|
+
|
|
313
|
+
<template #popup>
|
|
314
|
+
<px-flex vertical class="popup-menu">
|
|
315
|
+
<button>Option 1</button>
|
|
316
|
+
<button>Option 2</button>
|
|
317
|
+
<button>Option 3</button>
|
|
318
|
+
<button>Option 4</button>
|
|
319
|
+
</px-flex>
|
|
320
|
+
</template>
|
|
321
|
+
</px-popup>
|
|
322
|
+
|
|
323
|
+
<px-popup tag="button" trigger="contextmenu">
|
|
324
|
+
Context Menu
|
|
325
|
+
|
|
326
|
+
<template #popup>
|
|
327
|
+
<px-flex vertical class="popup-menu">
|
|
328
|
+
<button>Option 1</button>
|
|
329
|
+
<button>Option 2</button>
|
|
330
|
+
<button>Option 3</button>
|
|
331
|
+
<button>Option 4</button>
|
|
332
|
+
</px-flex>
|
|
333
|
+
</template>
|
|
334
|
+
</px-popup>
|
|
335
|
+
</px-flex>
|
|
336
|
+
</px-test>
|
|
337
|
+
|
|
338
|
+
<px-test test-id="px-swiper" name="px-swiper" :size="{ w: 1440 }">
|
|
339
|
+
<px-swiper :loop="true">
|
|
340
|
+
<px-swiper-slide>
|
|
341
|
+
<div class="swiper-max-width">
|
|
342
|
+
<img
|
|
343
|
+
class="swiper-img"
|
|
344
|
+
src="https://picsum.photos/1600/900?grayscale"
|
|
345
|
+
/>
|
|
346
|
+
</div>
|
|
347
|
+
</px-swiper-slide>
|
|
348
|
+
<px-swiper-slide>
|
|
349
|
+
<img class="swiper-img" src="https://picsum.photos/1601/900?grayscale" />
|
|
350
|
+
</px-swiper-slide>
|
|
351
|
+
<px-swiper-slide>
|
|
352
|
+
<img class="swiper-img" src="https://picsum.photos/1602/900?grayscale" />
|
|
353
|
+
</px-swiper-slide>
|
|
354
|
+
</px-swiper>
|
|
355
|
+
</px-test>
|
|
356
|
+
|
|
357
|
+
<px-test test-id="px-icon-button" name="px-icon-button">
|
|
358
|
+
<px-flex gap="3" justify="center">
|
|
359
|
+
<px-icon-button :src="require('../assets/test/trash.svg')" />
|
|
360
|
+
|
|
361
|
+
<px-icon-button :src="require('../assets/test/trash.svg')" variant="basic" />
|
|
362
|
+
<px-icon-button
|
|
363
|
+
:src="require('../assets/test/trash.svg')"
|
|
364
|
+
variant="basic accent-hover"
|
|
365
|
+
/>
|
|
366
|
+
<px-icon-button
|
|
367
|
+
:src="require('../assets/test/trash.svg')"
|
|
368
|
+
variant="default accent-hover"
|
|
369
|
+
/>
|
|
370
|
+
<px-icon v-if="false" :src="require('../assets/test/trash.svg')" />
|
|
371
|
+
<px-svg v-if="false" :src="require('../assets/test/trash.svg')" />
|
|
372
|
+
</px-flex>
|
|
373
|
+
</px-test>
|
|
374
|
+
|
|
375
|
+
<px-test test-id="toggle-button-list" name="px-toggle-button-list">
|
|
376
|
+
<px-toggle-button-list
|
|
377
|
+
:items="fruits"
|
|
378
|
+
items-value-property="id"
|
|
379
|
+
items-label-property="name"
|
|
380
|
+
items-key-property="id"
|
|
381
|
+
/>
|
|
382
|
+
|
|
383
|
+
<br />
|
|
384
|
+
|
|
385
|
+
<px-toggle-button-list
|
|
386
|
+
:items="fruits"
|
|
387
|
+
items-value-property="id"
|
|
388
|
+
items-label-property="name"
|
|
389
|
+
items-key-property="id"
|
|
390
|
+
:multi-select="true"
|
|
391
|
+
@change="toggleButtonChange"
|
|
392
|
+
/>
|
|
393
|
+
|
|
394
|
+
<br />
|
|
395
|
+
|
|
396
|
+
<px-toggle-button-list
|
|
397
|
+
:items="fruits"
|
|
398
|
+
items-value-property="id"
|
|
399
|
+
items-label-property="name"
|
|
400
|
+
items-key-property="id"
|
|
401
|
+
variant="radio"
|
|
402
|
+
/>
|
|
403
|
+
|
|
404
|
+
<br />
|
|
405
|
+
|
|
406
|
+
<px-toggle-button-list
|
|
407
|
+
:items="fruits"
|
|
408
|
+
items-value-property="id"
|
|
409
|
+
items-label-property="name"
|
|
410
|
+
items-key-property="id"
|
|
411
|
+
variant="vertical radio"
|
|
412
|
+
/>
|
|
413
|
+
|
|
414
|
+
<br />
|
|
415
|
+
|
|
416
|
+
<px-toggle-button-list
|
|
417
|
+
:items="fruits"
|
|
418
|
+
items-value-property="id"
|
|
419
|
+
items-label-property="name"
|
|
420
|
+
items-key-property="id"
|
|
421
|
+
variant="default connected"
|
|
422
|
+
/>
|
|
423
|
+
|
|
424
|
+
<br />
|
|
425
|
+
|
|
426
|
+
<px-toggle-button-list
|
|
427
|
+
:items="fruits"
|
|
428
|
+
items-value-property="id"
|
|
429
|
+
items-label-property="name"
|
|
430
|
+
items-key-property="id"
|
|
431
|
+
>
|
|
432
|
+
<template v-slot:item="{ item, checked }">
|
|
433
|
+
<span
|
|
434
|
+
:style="{
|
|
435
|
+
width: '0.5em',
|
|
436
|
+
height: '0.5em',
|
|
437
|
+
backgroundColor: item.color,
|
|
438
|
+
display: 'inline-block',
|
|
439
|
+
transform: checked ? 'scale(1.5)' : null,
|
|
440
|
+
}"
|
|
441
|
+
></span>
|
|
442
|
+
{{ item.name }}
|
|
443
|
+
</template>
|
|
444
|
+
</px-toggle-button-list>
|
|
445
|
+
|
|
446
|
+
<br />
|
|
447
|
+
|
|
448
|
+
<px-toggle-button-list
|
|
449
|
+
:items="fruits"
|
|
450
|
+
items-value-property="id"
|
|
451
|
+
items-label-property="name"
|
|
452
|
+
items-key-property="id"
|
|
453
|
+
variant="outline"
|
|
454
|
+
/>
|
|
455
|
+
|
|
456
|
+
<br />
|
|
457
|
+
|
|
458
|
+
<px-toggle-button-list
|
|
459
|
+
:items="fruits"
|
|
460
|
+
items-value-property="id"
|
|
461
|
+
items-label-property="name"
|
|
462
|
+
items-key-property="id"
|
|
463
|
+
variant="connected outline"
|
|
464
|
+
/>
|
|
465
|
+
|
|
466
|
+
<br />
|
|
467
|
+
|
|
468
|
+
<div style="max-width: 400px">
|
|
469
|
+
<px-toggle-button-list
|
|
470
|
+
:items="fruits"
|
|
471
|
+
items-value-property="id"
|
|
472
|
+
items-label-property="name"
|
|
473
|
+
items-key-property="id"
|
|
474
|
+
variant="default wrap"
|
|
475
|
+
/>
|
|
476
|
+
</div>
|
|
477
|
+
|
|
478
|
+
<br />
|
|
479
|
+
|
|
480
|
+
<px-toggle-button-list
|
|
481
|
+
:items="fruits"
|
|
482
|
+
items-value-property="id"
|
|
483
|
+
items-label-property="name"
|
|
484
|
+
items-key-property="id"
|
|
485
|
+
variant="tags wrap"
|
|
486
|
+
:multi-select="true"
|
|
487
|
+
/>
|
|
488
|
+
</px-test>
|
|
489
|
+
|
|
490
|
+
<px-test test-id="px-flex" name="px-flex">
|
|
491
|
+
<px-flex gap="2" class="flex-test" justify="center">
|
|
492
|
+
<px-flex :vertical="true" class="flex-test" gap="1">
|
|
493
|
+
<div class="flex-item"></div>
|
|
494
|
+
<div class="flex-item flex-item--small"></div>
|
|
495
|
+
<div class="flex-item"></div>
|
|
496
|
+
</px-flex>
|
|
497
|
+
|
|
498
|
+
<px-flex :vertical="true" :reverse="true" class="flex-test" gap="1">
|
|
499
|
+
<div class="flex-item"></div>
|
|
500
|
+
<div class="flex-item flex-item--small"></div>
|
|
501
|
+
<div class="flex-item"></div>
|
|
502
|
+
</px-flex>
|
|
503
|
+
|
|
504
|
+
<px-flex align-y="center" :vertical="false" class="flex-test" gap="20px">
|
|
505
|
+
<div class="flex-item"></div>
|
|
506
|
+
<div class="flex-item flex-item--small"></div>
|
|
507
|
+
<div class="flex-item"></div>
|
|
508
|
+
</px-flex>
|
|
509
|
+
|
|
510
|
+
<px-flex class="flex-test" :reverse="true" gap="0.5">
|
|
511
|
+
<div class="flex-item"></div>
|
|
512
|
+
<div class="flex-item flex-item--small"></div>
|
|
513
|
+
<div class="flex-item"></div>
|
|
514
|
+
</px-flex>
|
|
515
|
+
</px-flex>
|
|
516
|
+
</px-test>
|
|
517
|
+
|
|
518
|
+
<px-test test-id="px-toggle" name="px-toggle">
|
|
519
|
+
<px-toggle>Test</px-toggle>
|
|
520
|
+
</px-test>
|
|
521
|
+
|
|
522
|
+
<px-test test-id="px-toggle-button" name="px-toggle">
|
|
523
|
+
<div>
|
|
524
|
+
<px-toggle-button>Test</px-toggle-button>
|
|
525
|
+
</div>
|
|
526
|
+
</px-test>
|
|
527
|
+
</px-tester>
|
|
528
|
+
</div>
|
|
529
|
+
</template>
|
|
530
|
+
|
|
531
|
+
<script>
|
|
532
|
+
// import { mapState } from 'vuex';
|
|
533
|
+
// import Component from '~/components/Component.vue';
|
|
534
|
+
import { PxTester, PxTest } from '@thinkpixellab/px-vue-tester';
|
|
535
|
+
import PxToggle from './PxToggle.vue';
|
|
536
|
+
import PxToggleButton from './PxToggleButton.vue';
|
|
537
|
+
import PxFlex from './PxFlex.vue';
|
|
538
|
+
import PxToggleButtonList from './PxToggleButtonList.vue';
|
|
539
|
+
import PxIconButton from './PxIconButton.vue';
|
|
540
|
+
import PxIcon from './PxIcon.vue';
|
|
541
|
+
import PxSvg from './PxSvg.vue';
|
|
542
|
+
import PxSwiper from './PxSwiper.vue';
|
|
543
|
+
import PxSwiperSlide from './PxSwiperSlide.vue';
|
|
544
|
+
import PxDropdown from './PxDropdown.vue';
|
|
545
|
+
import PxPopup from './PxPopup.vue';
|
|
546
|
+
import PxTextbox from './PxTextbox.vue';
|
|
547
|
+
import PxCalendar from './PxCalendar.vue';
|
|
548
|
+
import PxClock from './PxClock.vue';
|
|
549
|
+
import PxDatePicker from './PxDatePicker.vue';
|
|
550
|
+
import PxCard from './PxCard.vue';
|
|
551
|
+
import PxAspect from './PxAspect.vue';
|
|
552
|
+
import PxProgressCircle from './PxProgressCircle.vue';
|
|
553
|
+
import PxValidator from './PxValidator.vue';
|
|
554
|
+
import PxTable from './PxTable.vue';
|
|
555
|
+
import PxFit from './PxFit.vue';
|
|
556
|
+
import PxCardGrid from './PxCardGrid.vue';
|
|
557
|
+
import PxNineGrid from './PxNineGrid.vue';
|
|
558
|
+
|
|
559
|
+
export default {
|
|
560
|
+
name: 'px-vue-test',
|
|
561
|
+
components: {
|
|
562
|
+
PxTester,
|
|
563
|
+
PxTest,
|
|
564
|
+
PxToggle,
|
|
565
|
+
PxToggleButton,
|
|
566
|
+
PxFlex,
|
|
567
|
+
PxToggleButtonList,
|
|
568
|
+
PxIconButton,
|
|
569
|
+
PxIcon,
|
|
570
|
+
PxSvg,
|
|
571
|
+
PxSwiper,
|
|
572
|
+
PxSwiperSlide,
|
|
573
|
+
PxPopup,
|
|
574
|
+
PxDropdown,
|
|
575
|
+
PxTextbox,
|
|
576
|
+
PxCalendar,
|
|
577
|
+
PxClock,
|
|
578
|
+
PxDatePicker,
|
|
579
|
+
PxCard,
|
|
580
|
+
PxAspect,
|
|
581
|
+
PxProgressCircle,
|
|
582
|
+
PxValidator,
|
|
583
|
+
PxTable,
|
|
584
|
+
PxFit,
|
|
585
|
+
PxCardGrid,
|
|
586
|
+
PxNineGrid,
|
|
587
|
+
},
|
|
588
|
+
|
|
589
|
+
data() {
|
|
590
|
+
return {
|
|
591
|
+
validateOne: null,
|
|
592
|
+
validateTwo: null,
|
|
593
|
+
validateThree: null,
|
|
594
|
+
validation: {},
|
|
595
|
+
|
|
596
|
+
currentDate: new Date(),
|
|
597
|
+
currentDateNull: null,
|
|
598
|
+
supportsMultiSelect: false,
|
|
599
|
+
currentFruitOrFruits: null,
|
|
600
|
+
currentFruits: ['orange', 'apple'],
|
|
601
|
+
currentFruit: 'orange',
|
|
602
|
+
fruits: [
|
|
603
|
+
{
|
|
604
|
+
id: 'apple',
|
|
605
|
+
name: 'Apple',
|
|
606
|
+
color: 'red',
|
|
607
|
+
deliciousNess: 7,
|
|
608
|
+
description:
|
|
609
|
+
'Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Etiam porta sem malesuada magna mollis euismod. Nulla vitae elit libero, a pharetra augue.',
|
|
610
|
+
lastPurchase: new Date('2022-03-01T00:00:00.000Z'),
|
|
611
|
+
},
|
|
612
|
+
{
|
|
613
|
+
id: 'orange',
|
|
614
|
+
name: 'Orange',
|
|
615
|
+
color: 'orange',
|
|
616
|
+
deliciousNess: 8,
|
|
617
|
+
description:
|
|
618
|
+
'Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod.',
|
|
619
|
+
lastPurchase: new Date('2022-02-01T00:00:00.000Z'),
|
|
620
|
+
},
|
|
621
|
+
{
|
|
622
|
+
id: 'lime',
|
|
623
|
+
name: 'Lime',
|
|
624
|
+
color: 'yellowgreen',
|
|
625
|
+
deliciousNess: 3,
|
|
626
|
+
description:
|
|
627
|
+
'Donec sed odio dui. Nullam id dolor id nibh ultricies vehicula ut id elit.',
|
|
628
|
+
lastPurchase: new Date('2022-01-01T00:00:00.000Z'),
|
|
629
|
+
},
|
|
630
|
+
{
|
|
631
|
+
id: 'banana',
|
|
632
|
+
name: 'Banana',
|
|
633
|
+
color: 'gold',
|
|
634
|
+
deliciousNess: 7,
|
|
635
|
+
description: 'Donec id elit non mi porta gravida at eget metus.',
|
|
636
|
+
lastPurchase: new Date('2021-12-01T00:00:00.000Z'),
|
|
637
|
+
},
|
|
638
|
+
{
|
|
639
|
+
id: 'grape',
|
|
640
|
+
name: 'Grape',
|
|
641
|
+
color: 'purple',
|
|
642
|
+
deliciousNess: 5,
|
|
643
|
+
description:
|
|
644
|
+
'Etiam porta sem malesuada magna mollis euismod. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.',
|
|
645
|
+
lastPurchase: new Date('2021-11-01T00:00:00.000Z'),
|
|
646
|
+
},
|
|
647
|
+
{
|
|
648
|
+
id: 'strawberry',
|
|
649
|
+
name: 'Strawberry',
|
|
650
|
+
color: 'pink',
|
|
651
|
+
deliciousNess: 9,
|
|
652
|
+
description: 'Donec ullamcorper nulla non metus auctor fringilla.',
|
|
653
|
+
lastPurchase: new Date('2021-10-01T00:00:00.000Z'),
|
|
654
|
+
},
|
|
655
|
+
],
|
|
656
|
+
currentText: 'Howdy',
|
|
657
|
+
};
|
|
658
|
+
},
|
|
659
|
+
computed: {
|
|
660
|
+
allValid() {
|
|
661
|
+
return Object.values(this.validation).reduce((acc, val) => {
|
|
662
|
+
return acc && val;
|
|
663
|
+
}, true);
|
|
664
|
+
},
|
|
665
|
+
},
|
|
666
|
+
methods: {
|
|
667
|
+
toggleButtonChange(nv) {
|
|
668
|
+
console.log(`selectedKeys: 👉 ${JSON.stringify(nv, null, 4)}`);
|
|
669
|
+
},
|
|
670
|
+
onValidChanged(isValid, id) {
|
|
671
|
+
this.$set(this.validation, id, isValid);
|
|
672
|
+
},
|
|
673
|
+
},
|
|
674
|
+
};
|
|
675
|
+
</script>
|
|
676
|
+
|
|
677
|
+
<style lang="scss">
|
|
678
|
+
@use '../styles/px.scss' as *;
|
|
679
|
+
|
|
680
|
+
.px-vue-test {
|
|
681
|
+
.fit {
|
|
682
|
+
white-space: nowrap;
|
|
683
|
+
color: black;
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
.fit--sm {
|
|
687
|
+
font-size: 12px;
|
|
688
|
+
color: red;
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
.fit--md {
|
|
692
|
+
font-size: 18px;
|
|
693
|
+
color: purple;
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
.fit--lg {
|
|
697
|
+
font-size: 24px;
|
|
698
|
+
color: blue;
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
.swiper-max-width {
|
|
702
|
+
max-width: 800px;
|
|
703
|
+
margin: 0 auto;
|
|
704
|
+
img {
|
|
705
|
+
width: 100%;
|
|
706
|
+
height: 100%;
|
|
707
|
+
object-fit: contain;
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
.swiper-img {
|
|
711
|
+
width: 100%;
|
|
712
|
+
font-size: 0;
|
|
713
|
+
display: block;
|
|
714
|
+
width: 100%;
|
|
715
|
+
height: 100%;
|
|
716
|
+
object-fit: contain;
|
|
717
|
+
}
|
|
718
|
+
.flex-item {
|
|
719
|
+
background-color: accent();
|
|
720
|
+
width: 80px;
|
|
721
|
+
height: 80px;
|
|
722
|
+
border-radius: 10px;
|
|
723
|
+
&--small {
|
|
724
|
+
width: 50px;
|
|
725
|
+
height: 50px;
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
&:nth-child(2) {
|
|
729
|
+
background-color: accent(2);
|
|
730
|
+
}
|
|
731
|
+
&:nth-child(3) {
|
|
732
|
+
background-color: accent(4);
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
.flex-test {
|
|
736
|
+
border: 2px dashed gray();
|
|
737
|
+
padding: 2px;
|
|
738
|
+
border-radius: 12px;
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
// custom toggle button variant
|
|
742
|
+
.px-toggle-button-list--tags {
|
|
743
|
+
.px-toggle-button-list__button {
|
|
744
|
+
@include button(
|
|
745
|
+
(
|
|
746
|
+
font-size: fs(xs),
|
|
747
|
+
background-color: #f6c268,
|
|
748
|
+
border-radius: 2px,
|
|
749
|
+
min-height: 2em,
|
|
750
|
+
min-width: 0,
|
|
751
|
+
padding: 0 0.5em,
|
|
752
|
+
checked: (
|
|
753
|
+
background-color: accent(-2),
|
|
754
|
+
color: white,
|
|
755
|
+
),
|
|
756
|
+
)
|
|
757
|
+
);
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
</style>
|