@d0rich/esprit-design 0.2.2 → 0.3.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/CHANGELOG.md +42 -0
- package/dist/components/DChip.vue.d.ts +1 -1
- package/dist/components/DPagination.vue.d.ts +2 -2
- package/dist/components/DStats.vue.d.ts +1 -1
- package/dist/components/animations/DAnimationAccordion.vue.d.ts +2 -2
- package/dist/components/animations/DAnimationDefLetterD.vue.d.ts +1 -1
- package/dist/components/animations/DAnimationFloatingLetter.vue.d.ts +2 -2
- package/dist/components/animations/DAnimationHypnosis.vue.d.ts +2 -2
- package/dist/components/animations/DAnimationSpinner.vue.d.ts +2 -2
- package/dist/components/animations/index.d.ts +5 -4
- package/dist/components/buttons/DBigBangButton.vue.d.ts +3 -3
- package/dist/components/buttons/DBigBangButtonAnimation.vue.d.ts +1 -1
- package/dist/components/buttons/DBtn.vue.d.ts +4 -3
- package/dist/components/buttons/index.d.ts +4 -3
- package/dist/components/cards/DCard.vue.d.ts +2 -2
- package/dist/components/cards/DCardTitle.vue.d.ts +1 -1
- package/dist/components/cards/index.d.ts +3 -2
- package/dist/components/content/DAlert.vue.d.ts +2 -2
- package/dist/components/content/DQuote.vue.d.ts +2 -2
- package/dist/components/content/index.d.ts +3 -2
- package/dist/components/index.d.ts +4 -3
- package/dist/components/lists/DActionsFan.vue.d.ts +5 -4
- package/dist/components/lists/DActionsList.vue.d.ts +5 -4
- package/dist/components/lists/index.d.ts +3 -2
- package/dist/components/utils/DWrapBackground.vue.d.ts +4 -3
- package/dist/components/utils/DWrapFocusHighlight.vue.d.ts +2 -2
- package/dist/components/utils/DWrapShape.vue.d.ts +8 -7
- package/dist/components/utils/index.d.ts +4 -3
- package/dist/composables/big-bang-button-utils.d.ts +1 -1
- package/dist/composables/router.d.ts +9 -6
- package/dist/composables/utils.d.ts +1 -0
- package/dist/esprit-design.js +1380 -1344
- package/dist/esprit-design.umd.cjs +13 -13
- package/dist/style.css +1 -1
- package/dist/utils/boundings.d.ts +2 -1
- package/index.html +14 -0
- package/package.json +9 -13
- package/plugins/shadows.js +87 -0
- package/src/components/DChip.vue +32 -0
- package/src/components/DPagination.vue +91 -0
- package/src/components/DStats.vue +514 -0
- package/src/components/animations/DAnimationAccordion.vue +103 -0
- package/src/components/animations/DAnimationDefLetterD.vue +11 -0
- package/src/components/animations/DAnimationFloatingLetter.vue +58 -0
- package/src/components/animations/DAnimationHypnosis.vue +102 -0
- package/src/components/animations/DAnimationSpinner.vue +114 -0
- package/src/components/animations/index.ts +11 -0
- package/src/components/buttons/DBigBangButton.vue +70 -0
- package/src/components/buttons/DBigBangButtonAnimation.vue +117 -0
- package/src/components/buttons/DBtn.vue +107 -0
- package/src/components/buttons/index.ts +5 -0
- package/src/components/cards/DCard.vue +98 -0
- package/src/components/cards/DCardTitle.vue +67 -0
- package/src/components/cards/index.ts +4 -0
- package/src/components/content/DAlert.vue +112 -0
- package/src/components/content/DQuote.vue +71 -0
- package/src/components/content/index.ts +4 -0
- package/src/components/index.ts +12 -0
- package/src/components/lists/DActionsFan.vue +153 -0
- package/src/components/lists/DActionsList.vue +100 -0
- package/src/components/lists/index.ts +4 -0
- package/src/components/utils/DWrapBackground.vue +76 -0
- package/src/components/utils/DWrapFocusHighlight.vue +241 -0
- package/src/components/utils/DWrapShape.vue +170 -0
- package/src/components/utils/index.ts +7 -0
- package/src/composables/big-bang-button-utils.ts +7 -0
- package/src/composables/index.ts +2 -0
- package/src/composables/router.ts +81 -0
- package/src/composables/utils.ts +5 -0
- package/src/index.ts +3 -0
- package/src/style.css +3 -0
- package/src/utils/boundings.ts +35 -0
- package/src/utils/index.ts +3 -0
- package/src/utils/pagination.ts +4 -0
- package/src/utils/polygon-animation.ts +139 -0
- package/src/vite-env.d.ts +1 -0
- package/tailwind.config.js +22 -0
- package/tsconfig.json +25 -0
- package/tsconfig.node.json +10 -0
- package/vite.config.ts +35 -0
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.d-chip{display:inline-block;clip-path:polygon(0 0,100% .2em,calc(100% - .3em) 100%,.2em calc(100% - .3em));padding:.4em}@media print{.d-chip{clip-path:none;padding:0;background:unset!important}}.d-shape,.d-shape>*{@apply relative;}.d-shape__bg-filter{@apply absolute top-0 left-0 w-full h-full;}.d-shape__bg-wrapper{@apply relative w-full h-full;}.d-shape__bg{@apply absolute w-full h-full;}:root{--shape-bubble--right: polygon( 0 calc(100% - 20px), 20px calc(100% - 10px), 25px calc(100% - 15px), 45px calc(100% - 5px), 70px calc(100% - 10px), 100% 100%, calc(100% - 40px) 0, 45px 30px, 40px calc(100% - 30px), 20px calc(100% - 45px), 18px calc(100% - 25px) );--shape-bubble--right__outline: polygon( 0 calc(100% - 20px), 5px calc(100% - 20px), 20px calc(100% - 10px), 25px calc(100% - 15px), 45px calc(100% - 5px), 70px calc(100% - 10px), calc(100% - 20px) calc(100% - 10px), calc(100% - 50px) 7px, 45px 30px, 40px calc(100% - 30px), 20px calc(100% - 45px), 18px calc(100% - 25px), 5px calc(100% - 20px), 0 calc(100% - 20px), 16px calc(100% - 28px), 17px calc(100% - 53px), 39px calc(100% - 40px), 38px 23px, calc(100% - 40px) 0, 100% 100%, 70px calc(100% - 7px), 45px 100%, 25px calc(100% - 11px), 19px calc(100% - 7px), 0 calc(100% - 20px) );--shape-bubble--right__padding: 35px 45px 15px 50px}:root{--shape-bubble--left: polygon( 100% calc(100% - 20px), calc(100% - 20px) calc(100% - 10px), calc(100% - 25px) calc(100% - 15px), calc(100% - 45px) calc(100% - 5px), calc(100% - 70px) calc(100% - 10px), 0 100%, 40px 0, calc(100% - 45px) 30px, calc(100% - 40px) calc(100% - 30px), calc(100% - 20px) calc(100% - 45px), calc(100% - 18px) calc(100% - 25px) );--shape-bubble--left__outline: polygon( 100% calc(100% - 20px), calc(100% - 5px) calc(100% - 20px), calc(100% - 20px) calc(100% - 10px), calc(100% - 25px) calc(100% - 15px), calc(100% - 45px) calc(100% - 5px), calc(100% - 70px) calc(100% - 10px), 20px calc(100% - 10px), 50px 7px, calc(100% - 45px) 30px, calc(100% - 40px) calc(100% - 30px), calc(100% - 20px) calc(100% - 45px), calc(100% - 18px) calc(100% - 25px), calc(100% - 5px) calc(100% - 20px), 100% calc(100% - 20px), calc(100% - 16px) calc(100% - 28px), calc(100% - 17px) calc(100% - 53px), calc(100% - 39px) calc(100% - 40px), calc(100% - 38px) 23px, 40px 0, 0 100%, calc(100% - 70px) calc(100% - 7px), calc(100% - 45px) 100%, calc(100% - 25px) calc(100% - 11px), calc(100% - 19px) calc(100% - 7px), 100% calc(100% - 20px) );--shape-bubble--left__padding: 35px 50px 15px 45px}:root{--shape-card: polygon(2em 0, 0% 100%, 100% calc(100% - 5em), 100% 4em);--shape-card-padding: 4.5em .5em 5.5em 2.5em}:root{--shape-card--dense: polygon( .5em 0, 0% 100%, 100% calc(100% - 2em), 100% 1.5em );--shape-card--dense__outline: polygon( .5em 0, .8em .3em, .4em calc(100% - .7em), calc(100% - .3em) calc(100% - 2em), calc(100% - .4em) 1.5em, .8em .3em, .5em 0, 100% 1em, 100% calc(100% - 1.8em), 0% 100% );--shape-card--dense__padding: 2em .5em 2.5em 1em}.d-focus-hl{@apply relative;}.d-focus-hl--default-color{@apply bg-red-600;}.d-focus-hl:has(.d-focus-hl__hl--negative-tile){@apply w-fit;}.d-focus-hl>.d-focus-hl__hl--negative-tile{width:0%;height:0%;top:50%;left:50%;content:"";opacity:0;pointer-events:none;@apply absolute backdrop-invert transition-all;}.d-focus-hl:hover>.d-focus-hl__hl--negative-tile,*:focus .d-focus-hl__hl--negative-tile{opacity:1;animation:hl--negative-tile-animation linear 1s infinite}.d-focus-hl:hover>.d-focus-hl__hl--negative-tile{width:110%;height:130%;top:-15%;left:-5%}*:focus .d-focus-hl__hl--negative-tile{width:140%!important;height:200%!important;top:-50%!important;left:-20%!important}:is(:is(.router-link-active .d-focus-hl--not-exact:not(.d-focus-hl--no-passive-link),.router-link-exact-active .d-focus-hl--exact:not(.d-focus-hl--no-passive-link)),.d-focus-hl--active) :is(.d-focus-hl__hl--negative-tile){opacity:1;width:120%!important;height:120%!important;top:-10%!important;left:-10%!important}@keyframes hl--negative-tile-animation{0%,to{transform:skew(0) rotate(6deg)}50%{transform:skew(-40deg) rotate(-6deg) scaleX(.8)}}.d-focus-hl:has(.d-focus-hl__hl--list-item,.d-focus-hl__hl--negative-list-item){@apply w-full;}.d-focus-hl>:is(.d-focus-hl__hl--list-item,.d-focus-hl__hl--negative-list-item){width:0%;height:200%;top:-50%;left:0;content:"";margin-left:-1.2em;pointer-events:none;clip-path:polygon(1rem 0,0% 100%,90% 50%);@apply absolute transition-all;}.d-focus-hl>.d-focus-hl__hl--negative-list-item{@apply backdrop-invert;}.d-focus-hl>.d-focus-hl__hl--list-item{@apply -z-10;}:is(.d-focus-hl:hover,*:focus) :is(.d-focus-hl__hl--list-item,.d-focus-hl__hl--negative-list-item){opacity:1;animation:hl--list-item-animation .3s infinite}.d-focus-hl:hover>:is(.d-focus-hl__hl--list-item,.d-focus-hl__hl--negative-list-item){width:200%;height:130%;top:-15%;left:-5%}*:focus :is(.d-focus-hl__hl--list-item,.d-focus-hl__hl--negative-list-item){width:220%!important;height:200%!important;top:-50%!important;left:-5%!important}:is(:is(.router-link-active .d-focus-hl--not-exact:not(.d-focus-hl--no-passive-link),.router-link-exact-active .d-focus-hl--exact:not(.d-focus-hl--no-passive-link)),.d-focus-hl--active) :is(.d-focus-hl__hl--list-item,.d-focus-hl__hl--negative-list-item){opacity:1;width:220%!important;height:130%!important;top:-15%!important;left:-5%!important}@keyframes hl--list-item-animation{0%,to{clip-path:polygon(1em 0,0% 100%,100% 50%)}50%{clip-path:polygon(1em 10%,0% 90%,100% 50%)}}.d-btn{@apply font-extrabold select-none relative inline-block cursor-pointer;}.d-btn--rotated{@apply -rotate-6;}.d-btn--uppercase{@apply uppercase;}.d-btn--capitalize{@apply capitalize;}.d-btn--lowercase{@apply lowercase;}.stats{@apply relative print:hidden;}.stats__bg{@apply fill-neutral-900;}.stats__bg-star--odd{@apply fill-neutral-500;}.stats__bg-star--even{@apply fill-neutral-800;}.stats__single-stat:hover{animation:single-stat-hover 1.5s ease-in-out infinite}.stats__star--light{@apply fill-yellow-400;}.stats__star--dark{@apply fill-yellow-600;}@keyframes single-stat-hover{0%{filter:brightness(1)}50%{filter:brightness(1.35)}to{filter:brightness(1)}}.stats__images{@apply absolute inset-0 pointer-events-none;}.stats__image{width:20%;height:20%;@apply absolute;}.stats__image:nth-child(1){top:2%;left:50%}.stats__image:nth-child(2){top:20%;right:6%}.stats__image:nth-child(3){bottom:8%;right:30%}.stats__image:nth-child(4){bottom:4%;left:10%}.stats__image:nth-child(5){top:30%;left:6%}.stats_titles-layer{@apply absolute inset-0 pointer-events-none;}.stats__group-title{font-size:150px;paint-order:stroke;text-anchor:start;dominant-baseline:text-bottom;font-weight:900;stroke-width:20;@apply fill-black font-sans stroke-yellow-500;}.stats__title{font-size:100px;paint-order:stroke;text-anchor:middle;dominant-baseline:text-top;font-weight:900;stroke-width:20;rotate:5deg;@apply fill-black font-sans stroke-yellow-500;}.stats__title__value{font-size:80px;stroke-width:20;stroke-linejoin:round}.stats__print-value{@apply hidden print:block;}.stats__print-value__group-title{@apply text-lg font-bold;}.stats__print-value__skill{@apply grid grid-cols-[1fr_auto] items-center gap-x-4 gap-y-1;}.stats__print-value--small{@apply hidden flex-wrap gap-2 items-center;}.stats__print-value--small__skill{@apply rounded text-white p-[.3em];}.stats__print-value--small__skill--hidden{@apply hidden;}.stats__print-value--small__skill--3{@apply bg-blue-500 text-xs;}.stats__print-value--small__skill--4{@apply bg-blue-600 text-sm;}.stats__print-value--small__skill--5{@apply bg-blue-700 text-base;}.small-print-stats .stats__print-value{@apply print:hidden;}.small-print-stats .stats__print-value--small{@apply print:flex;}.d-animation-accordion>.d-animation-accordion__section{--accordion-section-min-posion: translate( calc(var(--accordion-section-count) * 50px), 0 );--accordion-section-max-posion: translate( calc(var(--accordion-section-count) * 70px), 0 );transform:var(--accordion-section-min-posion);animation:d-animation-accordion-section-wiggle var(--d-accordion-wiggle-period) ease-in-out infinite alternate calc((var(--accordion-section-count) - 1) * var(--d-accordion-delay))}.d-animation-accordion>.d-animation-accordion__section:nth-child(odd){@apply fill-white;}.d-animation-accordion>.d-animation-accordion__section:nth-child(2){--accordion-section-count: 1}.d-animation-accordion>.d-animation-accordion__section:nth-child(3){--accordion-section-count: 2}.d-animation-accordion>.d-animation-accordion__section:nth-child(4){--accordion-section-count: 3}.d-animation-accordion>.d-animation-accordion__section:nth-child(5){--accordion-section-count: 4}.d-animation-accordion>.d-animation-accordion__section:nth-child(6){--accordion-section-count: 5}.d-animation-accordion>.d-animation-accordion__section:nth-child(7){--accordion-section-count: 6}@keyframes d-animation-accordion-section-wiggle{0%{transform:var(--accordion-section-min-posion)}50%{transform:var(--accordion-section-max-posion)}to{transform:var(--accordion-section-min-posion)}}.d-animation-floating-letter{animation:d-animation-floating-letter-float var(--d-floating-letter-float-period) ease-in-out infinite;transform-origin:315px 315px}@keyframes d-animation-floating-letter-float{0%{transform:translate(0)}50%{transform:translateY(40px)}to{transform:translate(0)}}.d-animation-hypnosis>.d-animation-hypnosis__section{--hypnosis-section-min-posion: scale( calc(var(--hypnosis-section-count) / 12) );--hypnosis-section-max-posion: translate( calc(var(--hypnosis-section-count) / 6) );transform:var(--hypnosis-section-min-posion);transform-origin:315px 315px;animation:d-animation-hypnosis-section-wiggle var(--d-hypnosis-wiggle-period) ease-in-out infinite alternate calc((var(--hypnosis-section-count) - 6) * -1 * var(--d-hypnosis-delay))}.d-animation-hypnosis>.d-animation-hypnosis__section:nth-child(odd){@apply fill-white;}.d-animation-hypnosis>.d-animation-hypnosis__section:nth-child(2){--hypnosis-section-count: 1}.d-animation-hypnosis>.d-animation-hypnosis__section:nth-child(3){--hypnosis-section-count: 2}.d-animation-hypnosis>.d-animation-hypnosis__section:nth-child(4){--hypnosis-section-count: 3}.d-animation-hypnosis>.d-animation-hypnosis__section:nth-child(5){--hypnosis-section-count: 4}.d-animation-hypnosis>.d-animation-hypnosis__section:nth-child(6){--hypnosis-section-count: 5}.d-animation-hypnosis>.d-animation-hypnosis__section:nth-child(7){--hypnosis-section-count: 6}@keyframes d-animation-hypnosis-section-wiggle{0%{transform:var(--hypnosis-section-min-posion)}50%{transform:var(--hypnosis-section-max-posion)}to{transform:var(--hypnosis-section-min-posion)}}.d-animation-spinner__foreground{@apply fill-white;}.d-animation-spinner__background{@apply fill-black;}.d-animation-spinner__blade{--transform-static: scale(.5) rotate(220deg);animation:d-spinner-blade-wiggle var(--d-spinner-blade-wiggle-period) ease-in-out infinite}@keyframes d-spinner-blade-wiggle{0%{transform:translateY(-150px) var(--transform-static)}50%{transform:translateY(-120px) var(--transform-static)}to{transform:translateY(-150px) var(--transform-static)}}.d-animation-spinner__spinner{animation:d-spinner-spin var(--d-spinner-spin-period) linear infinite}@keyframes d-spinner-spin{0%{transform:rotate(0)}to{transform:rotate(-360deg)}}#big-bang-button-animation{overflow:hidden;pointer-events:none;@apply fixed w-full h-full top-0 left-0 text-center uppercase text-7xl md:text-9xl font-extrabold;}#big-bang-button-animation>.bbb__text-container{width:fit-content;margin-left:auto;margin-right:.5em;perspective:200px;transform-origin:right top;transform:rotateY(35deg) rotate(-12deg)}#big-bang-button-animation span{@apply inline-block mx-2;}#big-bang-button-animation span:nth-of-type(3n+1){@apply text-neutral-900 bg-neutral-50;}#big-bang-button-animation span:nth-of-type(4n+3){@apply bg-neutral-900 text-neutral-50;}.big-bang-button{@apply text-3xl font-bold uppercase cursor-pointer;}.big-bang-button:hover>span{@apply inline-block transition-all;}.big-bang-button:hover>span:nth-of-type(4n+1){@apply rotate-12 translate-x-1 -translate-y-2;}.big-bang-button:hover>span:nth-of-type(4n+2){@apply -rotate-6 translate-y-3;}.big-bang-button:hover>span:nth-of-type(4n+3){@apply -rotate-12 translate-x-1 -translate-y-2;}.big-bang-button:hover>span:nth-of-type(4n+4){@apply -rotate-6 translate-x-1 -translate-y-1;}.big-bang-button:hover>span:first{@apply rotate-12 -translate-x-2 -translate-y-2;}.card__content,.card__content--dense{@apply md:text-lg;}.card__content{padding:var(--shape-card-padding);@apply print:p-0;}.card__content--dense{padding:var(--shape-card--dense__padding);@apply print:p-0;}.card--homepage-story .card__content,.card--homepage-skills .card__content{@apply text-black;}.force-light :is(.card__bg,.card__bg--dense){@apply !bg-white dark:bg-white;}.card--homepage-story :is(.card__bg,.card__bg--dense){background:var(--d-card-x-ray--idle__color)}.card--homepage-skills :is(.card__bg,.card__bg--dense){background:var(--d-card-x-ray--action__color)}.card__bg,.card__bg--dense{@apply bg-white dark:bg-neutral-700 print:bg-none;}.card__bg{clip-path:var(--shape-card)}.card__bg--dense{clip-path:var(--shape-card--dense)}@media print{.card__bg{clip-path:none!important;background:none!important}}.card__title{@apply text-2xl md:text-3xl font-semibold -mt-5 mb-3 print:text-base print:ml-0 print:mb-0;}.card__title__content{@apply inline-block -ml-10 print:ml-0;}.card__title__content__text{@apply p-5 text-white dark:text-black print:p-0 print:text-inherit;}.card__title__content__shape{clip-path:polygon(.4em .4em,100% 0%,calc(100% - .4em) calc(100% - .4em),0% 100%);@apply bg-black dark:bg-white print:bg-transparent;}.force-light .card__title__content__text{@apply dark:text-white;}.force-light .card__title__content__shape{@apply dark:bg-black;}@media print{.card__title__content__shape{clip-path:none}}.d-alert{@apply font-dialog text-black dark:text-white mb-6 mt-12;}.d-alert__shape{@apply bg-white dark:bg-black opacity-80;clip-path:var(--shape-card--dense)}.d-alert__outline{@apply absolute inset-0 bg-black dark:bg-white;clip-path:var(--shape-card--dense__outline)}.d-alert--info .d-alert__outline{@apply bg-cyan-500;}.d-alert--question .d-alert__outline{@apply bg-yellow-500;}.d-alert--warning .d-alert__outline{@apply bg-red-500;}.d-alert__body{padding:var(--shape-card--dense__padding)}.d-alert__sign{@apply absolute w-[5em] -top-[1.5em] -left-[1.5em] pointer-events-none sharp-shadow ss-white ss-r-1;}.d-alert--info .d-alert__sign{@apply fill-cyan-500;}.d-alert--question .d-alert__sign{@apply fill-yellow-500;}.d-alert--warning .d-alert__sign{@apply fill-red-500;}.d-blockquote{@apply font-dialog text-black dark:text-white my-6;}.d-blockquote__outline{@apply absolute inset-0 bg-black dark:bg-white;}.d-blockquote__shape{@apply bg-white dark:bg-black opacity-80;}.d-blockquote--right .d-blockquote__body{padding:var(--shape-bubble--right__padding)}.d-blockquote--right .d-blockquote__outline{clip-path:var(--shape-bubble--right__outline)}.d-blockquote--right .d-blockquote__shape{clip-path:var(--shape-bubble--right)}.d-blockquote--left .d-blockquote__body{padding:var(--shape-bubble--left__padding)}.d-blockquote--left .d-blockquote__outline{clip-path:var(--shape-bubble--left__outline)}.d-blockquote--left .d-blockquote__shape{clip-path:var(--shape-bubble--left)}.d-actions-fan__list-item__shape{@apply dark:bg-neutral-900;}.d-actions-fan--right__list-item__shape{clip-path:polygon(calc(100% - 10px) 0,100% 100%,0 40%)}.d-actions-fan--left__list-item__shape{clip-path:polygon(10px 0,0 100%,100% 40%)}.d-actions-fan__list-item{@apply w-full transform -my-8;}.d-actions-fan--right__list-item{@apply origin-left;}.d-actions-fan--left__list-item{@apply origin-right;}.d-actions-fan__list-item__body{@apply px-3 py-2;}.d-actions-fan--right__list-item__body{@apply flex justify-end;}.actions-enter-active,.actions-leave-active{@apply transition-all;}.actions-enter-from{--tw-rotate: -90deg !important;@apply opacity-0;}.actions-leave-to{--tw-rotate: 90deg !important;@apply opacity-0;}.d-actions-list__shape{@apply dark:bg-neutral-900 dark:bg-opacity-80 backdrop-blur;clip-path:polygon(10px 0,0 100%,100% calc(100% - 10px),100% 13px)}.d-actions-list__body{@apply p-7;}.d-actions-list__header{@apply mb-4 font-serif text-lg;}.d-actions-list__list{@apply relative [&_button]:font-sans [&_button]:font-bold [&_button]:text-left font-sans font-bold;}.mbg__main-container{isolation:isolate}.mbg__relative-container{@apply relative w-full h-full;}.mbg__layer{top:0;right:0;bottom:0;left:0;@apply absolute;}.mbg__dots{background:url('data:image/svg+xml;utf8,<svg width="100" height="100" transform="rotate(0)" opacity="0.2" version="1.1" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><g fill="%23250E17"><circle cx="25" cy="25" r="12.5"/><circle cx="75" cy="75" r="12.5"/><circle cx="75" cy="25" r="12.5"/><circle cx="25" cy="75" r="12.5"/></g></svg>');background-size:2rem}.mbg__content{@apply relative z-[1];}
|
|
1
|
+
.d-chip{display:inline-block;clip-path:polygon(0 0,100% .2em,calc(100% - .3em) 100%,.2em calc(100% - .3em));padding:.4em}@media print{.d-chip{clip-path:none;padding:0;background:unset!important}}.d-shape,.d-shape>*{@apply relative;}.d-shape__bg-filter{@apply absolute top-0 left-0 w-full h-full;}.d-shape__bg-wrapper{@apply relative w-full h-full;}.d-shape__bg{@apply absolute w-full h-full;}:root{--shape-bubble--right: polygon( 0 calc(100% - 20px) , 20px calc(100% - 10px) , 25px calc(100% - 15px) , 45px calc(100% - 5px) , 70px calc(100% - 10px) , 100% 100%, calc(100% - 40px) 0, 45px 30px, 40px calc(100% - 30px) , 20px calc(100% - 45px) , 18px calc(100% - 25px) );--shape-bubble--right__outline: polygon( 0 calc(100% - 20px) , 5px calc(100% - 20px) , 20px calc(100% - 10px) , 25px calc(100% - 15px) , 45px calc(100% - 5px) , 70px calc(100% - 10px) , calc(100% - 20px) calc(100% - 10px) , calc(100% - 50px) 7px, 45px 30px, 40px calc(100% - 30px) , 20px calc(100% - 45px) , 18px calc(100% - 25px) , 5px calc(100% - 20px) , 0 calc(100% - 20px) , 16px calc(100% - 28px) , 17px calc(100% - 53px) , 39px calc(100% - 40px) , 38px 23px, calc(100% - 40px) 0, 100% 100%, 70px calc(100% - 7px) , 45px 100%, 25px calc(100% - 11px) , 19px calc(100% - 7px) , 0 calc(100% - 20px) );--shape-bubble--right__padding: 35px 45px 15px 50px}:root{--shape-bubble--left: polygon( 100% calc(100% - 20px) , calc(100% - 20px) calc(100% - 10px) , calc(100% - 25px) calc(100% - 15px) , calc(100% - 45px) calc(100% - 5px) , calc(100% - 70px) calc(100% - 10px) , 0 100%, 40px 0, calc(100% - 45px) 30px, calc(100% - 40px) calc(100% - 30px) , calc(100% - 20px) calc(100% - 45px) , calc(100% - 18px) calc(100% - 25px) );--shape-bubble--left__outline: polygon( 100% calc(100% - 20px) , calc(100% - 5px) calc(100% - 20px) , calc(100% - 20px) calc(100% - 10px) , calc(100% - 25px) calc(100% - 15px) , calc(100% - 45px) calc(100% - 5px) , calc(100% - 70px) calc(100% - 10px) , 20px calc(100% - 10px) , 50px 7px, calc(100% - 45px) 30px, calc(100% - 40px) calc(100% - 30px) , calc(100% - 20px) calc(100% - 45px) , calc(100% - 18px) calc(100% - 25px) , calc(100% - 5px) calc(100% - 20px) , 100% calc(100% - 20px) , calc(100% - 16px) calc(100% - 28px) , calc(100% - 17px) calc(100% - 53px) , calc(100% - 39px) calc(100% - 40px) , calc(100% - 38px) 23px, 40px 0, 0 100%, calc(100% - 70px) calc(100% - 7px) , calc(100% - 45px) 100%, calc(100% - 25px) calc(100% - 11px) , calc(100% - 19px) calc(100% - 7px) , 100% calc(100% - 20px) );--shape-bubble--left__padding: 35px 50px 15px 45px}:root{--shape-card: polygon(2em 0, 0% 100%, 100% calc(100% - 5em) , 100% 4em);--shape-card-padding: 4.5em .5em 5.5em 2.5em}:root{--shape-card--dense: polygon( .5em 0, 0% 100%, 100% calc(100% - 2em) , 100% 1.5em );--shape-card--dense__outline: polygon( .5em 0, .8em .3em, .4em calc(100% - .7em) , calc(100% - .3em) calc(100% - 2em) , calc(100% - .4em) 1.5em, .8em .3em, .5em 0, 100% 1em, 100% calc(100% - 1.8em) , 0% 100% );--shape-card--dense__padding: 2em .5em 2.5em 1em}.d-focus-hl{@apply relative;}.d-focus-hl--default-color{@apply bg-red-600;}.d-focus-hl:has(.d-focus-hl__hl--negative-tile){@apply w-fit;}.d-focus-hl>.d-focus-hl__hl--negative-tile{width:0%;height:0%;top:50%;left:50%;content:"";opacity:0;pointer-events:none;@apply absolute backdrop-invert transition-all;}.d-focus-hl:hover>.d-focus-hl__hl--negative-tile,*:focus .d-focus-hl__hl--negative-tile{opacity:1;animation:hl--negative-tile-animation linear 1s infinite}.d-focus-hl:hover>.d-focus-hl__hl--negative-tile{width:110%;height:130%;top:-15%;left:-5%}*:focus .d-focus-hl__hl--negative-tile{width:140%!important;height:200%!important;top:-50%!important;left:-20%!important}:is(:is(.router-link-active .d-focus-hl--not-exact:not(.d-focus-hl--no-passive-link),.router-link-exact-active .d-focus-hl--exact:not(.d-focus-hl--no-passive-link)),.d-focus-hl--active) :is(.d-focus-hl__hl--negative-tile){opacity:1;width:120%!important;height:120%!important;top:-10%!important;left:-10%!important}@keyframes hl--negative-tile-animation{0%,to{transform:skew(0) rotate(6deg)}50%{transform:skew(-40deg) rotate(-6deg) scaleX(.8)}}.d-focus-hl:has(.d-focus-hl__hl--list-item,.d-focus-hl__hl--negative-list-item){@apply w-full;}.d-focus-hl>:is(.d-focus-hl__hl--list-item,.d-focus-hl__hl--negative-list-item){width:0%;height:200%;top:-50%;left:0;content:"";margin-left:-1.2em;pointer-events:none;clip-path:polygon(1rem 0,0% 100%,90% 50%);@apply absolute transition-all;}.d-focus-hl>.d-focus-hl__hl--negative-list-item{@apply backdrop-invert;}.d-focus-hl>.d-focus-hl__hl--list-item{@apply -z-10;}:is(.d-focus-hl:hover,*:focus) :is(.d-focus-hl__hl--list-item,.d-focus-hl__hl--negative-list-item){opacity:1;animation:hl--list-item-animation .3s infinite}.d-focus-hl:hover>:is(.d-focus-hl__hl--list-item,.d-focus-hl__hl--negative-list-item){width:200%;height:130%;top:-15%;left:-5%}*:focus :is(.d-focus-hl__hl--list-item,.d-focus-hl__hl--negative-list-item){width:220%!important;height:200%!important;top:-50%!important;left:-5%!important}:is(:is(.router-link-active .d-focus-hl--not-exact:not(.d-focus-hl--no-passive-link),.router-link-exact-active .d-focus-hl--exact:not(.d-focus-hl--no-passive-link)),.d-focus-hl--active) :is(.d-focus-hl__hl--list-item,.d-focus-hl__hl--negative-list-item){opacity:1;width:220%!important;height:130%!important;top:-15%!important;left:-5%!important}@keyframes hl--list-item-animation{0%,to{clip-path:polygon(1em 0,0% 100%,100% 50%)}50%{clip-path:polygon(1em 10%,0% 90%,100% 50%)}}.d-btn{@apply font-extrabold select-none relative inline-block cursor-pointer;}.d-btn--rotated{@apply -rotate-6;}.d-btn--uppercase{@apply uppercase;}.d-btn--capitalize{@apply capitalize;}.d-btn--lowercase{@apply lowercase;}.stats{@apply relative print:hidden;}.stats__bg{@apply fill-neutral-900;}.stats__bg-star--odd{@apply fill-neutral-500;}.stats__bg-star--even{@apply fill-neutral-800;}.stats__single-stat:hover{animation:single-stat-hover 1.5s ease-in-out infinite}.stats__star--light{@apply fill-yellow-400;}.stats__star--dark{@apply fill-yellow-600;}@keyframes single-stat-hover{0%{filter:brightness(1)}50%{filter:brightness(1.35)}to{filter:brightness(1)}}.stats__images{@apply absolute inset-0 pointer-events-none;}.stats__image{width:20%;height:20%;@apply absolute;}.stats__image:nth-child(1){top:2%;left:50%}.stats__image:nth-child(2){top:20%;right:6%}.stats__image:nth-child(3){bottom:8%;right:30%}.stats__image:nth-child(4){bottom:4%;left:10%}.stats__image:nth-child(5){top:30%;left:6%}.stats_titles-layer{@apply absolute inset-0 pointer-events-none;}.stats__group-title{font-size:150px;paint-order:stroke;text-anchor:start;dominant-baseline:text-bottom;font-weight:900;stroke-width:20;@apply fill-black font-sans stroke-yellow-500;}.stats__title{font-size:100px;paint-order:stroke;text-anchor:middle;dominant-baseline:text-top;font-weight:900;stroke-width:20;rotate:5deg;@apply fill-black font-sans stroke-yellow-500;}.stats__title__value{font-size:80px;stroke-width:20;stroke-linejoin:round}.stats__print-value{@apply hidden print:block;}.stats__print-value__group-title{@apply text-lg font-bold;}.stats__print-value__skill{@apply grid grid-cols-[1fr_auto] items-center gap-x-4 gap-y-1;}.stats__print-value--small{@apply hidden flex-wrap gap-2 items-center;}.stats__print-value--small__skill{@apply rounded text-white p-[.3em];}.stats__print-value--small__skill--hidden{@apply hidden;}.stats__print-value--small__skill--3{@apply bg-blue-500 text-xs;}.stats__print-value--small__skill--4{@apply bg-blue-600 text-sm;}.stats__print-value--small__skill--5{@apply bg-blue-700 text-base;}.small-print-stats .stats__print-value{@apply print:hidden;}.small-print-stats .stats__print-value--small{@apply print:flex;}.d-animation-accordion>.d-animation-accordion__section{--accordion-section-min-posion: translate( calc(var(--accordion-section-count) * 50px), 0 );--accordion-section-max-posion: translate( calc(var(--accordion-section-count) * 70px), 0 );transform:var(--accordion-section-min-posion);animation:d-animation-accordion-section-wiggle var(--d-accordion-wiggle-period) ease-in-out infinite alternate calc((var(--accordion-section-count) - 1) * var(--d-accordion-delay))}.d-animation-accordion>.d-animation-accordion__section:nth-child(odd){@apply fill-white;}.d-animation-accordion>.d-animation-accordion__section:nth-child(2){--accordion-section-count: 1}.d-animation-accordion>.d-animation-accordion__section:nth-child(3){--accordion-section-count: 2}.d-animation-accordion>.d-animation-accordion__section:nth-child(4){--accordion-section-count: 3}.d-animation-accordion>.d-animation-accordion__section:nth-child(5){--accordion-section-count: 4}.d-animation-accordion>.d-animation-accordion__section:nth-child(6){--accordion-section-count: 5}.d-animation-accordion>.d-animation-accordion__section:nth-child(7){--accordion-section-count: 6}@keyframes d-animation-accordion-section-wiggle{0%{transform:var(--accordion-section-min-posion)}50%{transform:var(--accordion-section-max-posion)}to{transform:var(--accordion-section-min-posion)}}.d-animation-floating-letter{animation:d-animation-floating-letter-float var(--d-floating-letter-float-period) ease-in-out infinite;transform-origin:315px 315px}@keyframes d-animation-floating-letter-float{0%{transform:translate(0)}50%{transform:translateY(40px)}to{transform:translate(0)}}.d-animation-hypnosis>.d-animation-hypnosis__section{--hypnosis-section-min-posion: scale( calc(var(--hypnosis-section-count) / 12) );--hypnosis-section-max-posion: translate( calc(var(--hypnosis-section-count) / 6) );transform:var(--hypnosis-section-min-posion);transform-origin:315px 315px;animation:d-animation-hypnosis-section-wiggle var(--d-hypnosis-wiggle-period) ease-in-out infinite alternate calc((var(--hypnosis-section-count) - 6) * -1 * var(--d-hypnosis-delay))}.d-animation-hypnosis>.d-animation-hypnosis__section:nth-child(odd){@apply fill-white;}.d-animation-hypnosis>.d-animation-hypnosis__section:nth-child(2){--hypnosis-section-count: 1}.d-animation-hypnosis>.d-animation-hypnosis__section:nth-child(3){--hypnosis-section-count: 2}.d-animation-hypnosis>.d-animation-hypnosis__section:nth-child(4){--hypnosis-section-count: 3}.d-animation-hypnosis>.d-animation-hypnosis__section:nth-child(5){--hypnosis-section-count: 4}.d-animation-hypnosis>.d-animation-hypnosis__section:nth-child(6){--hypnosis-section-count: 5}.d-animation-hypnosis>.d-animation-hypnosis__section:nth-child(7){--hypnosis-section-count: 6}@keyframes d-animation-hypnosis-section-wiggle{0%{transform:var(--hypnosis-section-min-posion)}50%{transform:var(--hypnosis-section-max-posion)}to{transform:var(--hypnosis-section-min-posion)}}.d-animation-spinner__foreground{@apply fill-white;}.d-animation-spinner__background{@apply fill-black;}.d-animation-spinner__blade{--transform-static: scale(.5) rotate(220deg);animation:d-spinner-blade-wiggle var(--d-spinner-blade-wiggle-period) ease-in-out infinite}@keyframes d-spinner-blade-wiggle{0%{transform:translateY(-150px) var(--transform-static)}50%{transform:translateY(-120px) var(--transform-static)}to{transform:translateY(-150px) var(--transform-static)}}.d-animation-spinner__spinner{animation:d-spinner-spin var(--d-spinner-spin-period) linear infinite}@keyframes d-spinner-spin{0%{transform:rotate(0)}to{transform:rotate(-360deg)}}#big-bang-button-animation{overflow:hidden;pointer-events:none;@apply fixed w-full h-full top-0 left-0 text-center uppercase text-7xl md:text-9xl font-extrabold;}#big-bang-button-animation>.bbb__text-container{width:fit-content;margin-left:auto;margin-right:.5em;perspective:200px;transform-origin:right top;transform:rotateY(35deg) rotate(-12deg)}#big-bang-button-animation span{@apply inline-block mx-2;}#big-bang-button-animation span:nth-of-type(3n+1){@apply text-neutral-900 bg-neutral-50;}#big-bang-button-animation span:nth-of-type(4n+3){@apply bg-neutral-900 text-neutral-50;}.big-bang-button{@apply text-3xl font-bold uppercase cursor-pointer;}.big-bang-button:hover>span{@apply inline-block transition-all;}.big-bang-button:hover>span:nth-of-type(4n+1){@apply rotate-12 translate-x-1 -translate-y-2;}.big-bang-button:hover>span:nth-of-type(4n+2){@apply -rotate-6 translate-y-3;}.big-bang-button:hover>span:nth-of-type(4n+3){@apply -rotate-12 translate-x-1 -translate-y-2;}.big-bang-button:hover>span:nth-of-type(4n+4){@apply -rotate-6 translate-x-1 -translate-y-1;}.big-bang-button:hover>span:first{@apply rotate-12 -translate-x-2 -translate-y-2;}.card__content,.card__content--dense{@apply md:text-lg;}.card__content{padding:var(--shape-card-padding);@apply print:p-0;}.card__content--dense{padding:var(--shape-card--dense__padding);@apply print:p-0;}.card--homepage-story .card__content,.card--homepage-skills .card__content{@apply text-black;}.force-light :is(.card__bg,.card__bg--dense){@apply !bg-white dark:bg-white;}.card--homepage-story :is(.card__bg,.card__bg--dense){background:var(--d-card-x-ray--idle__color)}.card--homepage-skills :is(.card__bg,.card__bg--dense){background:var(--d-card-x-ray--action__color)}.card__bg,.card__bg--dense{@apply bg-white dark:bg-neutral-700 print:bg-none;}.card__bg{clip-path:var(--shape-card)}.card__bg--dense{clip-path:var(--shape-card--dense)}@media print{.card__bg{clip-path:none!important;background:none!important}}.card__title{@apply text-2xl md:text-3xl font-semibold -mt-5 mb-3 print:text-base print:ml-0 print:mb-0;}.card__title__content{@apply inline-block -ml-10 print:ml-0;}.card__title__content__text{@apply p-5 text-white dark:text-black print:p-0 print:text-inherit;}.card__title__content__shape{clip-path:polygon(.4em .4em,100% 0%,calc(100% - .4em) calc(100% - .4em),0% 100%);@apply bg-black dark:bg-white print:bg-transparent;}.force-light .card__title__content__text{@apply dark:text-white;}.force-light .card__title__content__shape{@apply dark:bg-black;}@media print{.card__title__content__shape{clip-path:none}}.d-alert{@apply font-dialog text-black dark:text-white mb-6 mt-12;}.d-alert__shape{@apply bg-white dark:bg-black opacity-80;clip-path:var(--shape-card--dense)}.d-alert__outline{@apply absolute inset-0 bg-black dark:bg-white;clip-path:var(--shape-card--dense__outline)}.d-alert--info .d-alert__outline{@apply bg-cyan-500;}.d-alert--question .d-alert__outline{@apply bg-yellow-500;}.d-alert--warning .d-alert__outline{@apply bg-red-500;}.d-alert__body{padding:var(--shape-card--dense__padding)}.d-alert__sign{@apply absolute w-[5em] -top-[1.5em] -left-[1.5em] pointer-events-none sharp-shadow ss-white ss-r-1;}.d-alert--info .d-alert__sign{@apply fill-cyan-500;}.d-alert--question .d-alert__sign{@apply fill-yellow-500;}.d-alert--warning .d-alert__sign{@apply fill-red-500;}.d-blockquote{@apply font-dialog text-black dark:text-white my-6;}.d-blockquote__outline{@apply absolute inset-0 bg-black dark:bg-white;}.d-blockquote__shape{@apply bg-white dark:bg-black opacity-80;}.d-blockquote--right .d-blockquote__body{padding:var(--shape-bubble--right__padding)}.d-blockquote--right .d-blockquote__outline{clip-path:var(--shape-bubble--right__outline)}.d-blockquote--right .d-blockquote__shape{clip-path:var(--shape-bubble--right)}.d-blockquote--left .d-blockquote__body{padding:var(--shape-bubble--left__padding)}.d-blockquote--left .d-blockquote__outline{clip-path:var(--shape-bubble--left__outline)}.d-blockquote--left .d-blockquote__shape{clip-path:var(--shape-bubble--left)}.d-actions-fan__list-item__shape{@apply dark:bg-neutral-900;}.d-actions-fan--right__list-item__shape{clip-path:polygon(calc(100% - 10px) 0,100% 100%,0 40%)}.d-actions-fan--left__list-item__shape{clip-path:polygon(10px 0,0 100%,100% 40%)}.d-actions-fan__list-item{@apply w-full transform -my-8;}.d-actions-fan--right__list-item{@apply origin-left;}.d-actions-fan--left__list-item{@apply origin-right;}.d-actions-fan__list-item__body{@apply px-3 py-2;}.d-actions-fan--right__list-item__body{@apply flex justify-end;}.actions-enter-active,.actions-leave-active{@apply transition-all;}.actions-enter-from{--tw-rotate: -90deg !important;@apply opacity-0;}.actions-leave-to{--tw-rotate: 90deg !important;@apply opacity-0;}.d-actions-list__shape{@apply dark:bg-neutral-900 dark:bg-opacity-80 backdrop-blur;clip-path:polygon(10px 0,0 100%,100% calc(100% - 10px),100% 13px)}.d-actions-list__body{@apply p-7;}.d-actions-list__header{@apply mb-4 font-serif text-lg;}.d-actions-list__list{@apply relative [&_button]:font-sans [&_button]:font-bold [&_button]:text-left font-sans font-bold;}.mbg__main-container{isolation:isolate}.mbg__relative-container{@apply relative w-full h-full;}.mbg__layer{top:0;right:0;bottom:0;left:0;@apply absolute;}.mbg__dots{background:url('data:image/svg+xml;utf8,<svg width="100" height="100" transform="rotate(0)" opacity="0.2" version="1.1" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><g fill="%23250E17"><circle cx="25" cy="25" r="12.5"/><circle cx="75" cy="75" r="12.5"/><circle cx="75" cy="25" r="12.5"/><circle cx="25" cy="75" r="12.5"/></g></svg>');background-size:2rem}.mbg__content{@apply relative z-[1];}
|
package/index.html
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<!-- prettier-ignore -->
|
|
2
|
+
<!DOCTYPE html>
|
|
3
|
+
<html lang="en">
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="UTF-8" />
|
|
6
|
+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
7
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
8
|
+
<title>Vite + Vue + TS</title>
|
|
9
|
+
</head>
|
|
10
|
+
<body>
|
|
11
|
+
<div id="app"></div>
|
|
12
|
+
<script type="module" src="/src/main.ts"></script>
|
|
13
|
+
</body>
|
|
14
|
+
</html>
|
package/package.json
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@d0rich/esprit-design",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
7
|
"type": "module",
|
|
8
|
-
"files": [
|
|
9
|
-
"dist"
|
|
10
|
-
],
|
|
11
8
|
"main": "./dist/esprit-design.umd.cjs",
|
|
12
9
|
"module": "./dist/esprit-design.js",
|
|
13
10
|
"types": "./dist/index.d.ts",
|
|
@@ -27,19 +24,18 @@
|
|
|
27
24
|
"preview": "vite preview"
|
|
28
25
|
},
|
|
29
26
|
"dependencies": {
|
|
30
|
-
"@iconify/vue": "^4.1.
|
|
31
|
-
"gsap": "^3.12.
|
|
27
|
+
"@iconify/vue": "^4.1.2",
|
|
28
|
+
"gsap": "^3.12.5",
|
|
32
29
|
"vue": "^3.3.4"
|
|
33
30
|
},
|
|
34
31
|
"devDependencies": {
|
|
35
|
-
"@vitejs/plugin-vue": "^
|
|
32
|
+
"@vitejs/plugin-vue": "^5.0.5",
|
|
36
33
|
"autoprefixer": "^10.4.16",
|
|
37
34
|
"postcss": "^8.4.31",
|
|
38
|
-
"tailwindcss": "^3.
|
|
39
|
-
"typescript": "^5.
|
|
40
|
-
"vite": "^
|
|
41
|
-
"vite-plugin-dts": "^3.
|
|
42
|
-
"vue-router": "^4.
|
|
43
|
-
"vue-tsc": "^1.8.5"
|
|
35
|
+
"tailwindcss": "^3.4.4",
|
|
36
|
+
"typescript": "^5.4.5",
|
|
37
|
+
"vite": "^5.2.13",
|
|
38
|
+
"vite-plugin-dts": "^3.9.1",
|
|
39
|
+
"vue-router": "^4.3.3"
|
|
44
40
|
}
|
|
45
41
|
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
2
|
+
/** @type {import('tailwindcss/plugin')} */
|
|
3
|
+
const plugin = require('tailwindcss/plugin')
|
|
4
|
+
/** @type {import('tailwindcss/colors')} */
|
|
5
|
+
const colors = require('tailwindcss/colors')
|
|
6
|
+
|
|
7
|
+
const X_OFFSET_VAR = '--tw-ss-x-offset'
|
|
8
|
+
const Y_OFFSET_VAR = '--tw-ss-y-offset'
|
|
9
|
+
const COLOR_VAR = '--tw-ss-color'
|
|
10
|
+
|
|
11
|
+
const defaultStyle = {
|
|
12
|
+
[X_OFFSET_VAR]: '0px',
|
|
13
|
+
[Y_OFFSET_VAR]: '0px',
|
|
14
|
+
// [COLOR_VAR]: 'white',
|
|
15
|
+
'--tw-drop-shadow': `drop-shadow(var(${X_OFFSET_VAR}) var(${Y_OFFSET_VAR}) 0px var(${COLOR_VAR}))`,
|
|
16
|
+
filter:
|
|
17
|
+
'var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)'
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function direction2vector(direction) {
|
|
21
|
+
let x = 0
|
|
22
|
+
let y = 0
|
|
23
|
+
if (direction.includes('t')) y = -4
|
|
24
|
+
if (direction.includes('b')) y = 4
|
|
25
|
+
if (direction.includes('l')) x = -4
|
|
26
|
+
if (direction.includes('r')) x = 4
|
|
27
|
+
return { x, y }
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function generateDirections() {
|
|
31
|
+
const directions = ['t', 'tr', 'tl', 'b', 'bl', 'br', 'r', 'l']
|
|
32
|
+
const offsets = [0, 1, 2, 3, 4, 5]
|
|
33
|
+
const result = {}
|
|
34
|
+
for (const dir of directions) {
|
|
35
|
+
const { x, y } = direction2vector(dir)
|
|
36
|
+
for (const offset of offsets) {
|
|
37
|
+
const newVariant = {
|
|
38
|
+
[X_OFFSET_VAR]: x * offset + 'px',
|
|
39
|
+
[Y_OFFSET_VAR]: y * offset + 'px'
|
|
40
|
+
}
|
|
41
|
+
if (x === 0) delete newVariant[X_OFFSET_VAR]
|
|
42
|
+
if (y === 0) delete newVariant[Y_OFFSET_VAR]
|
|
43
|
+
result[`.ss-${dir}-${offset}`] = newVariant
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return result
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function generateColors() {
|
|
50
|
+
const result = {}
|
|
51
|
+
for (const colorKey in colors) {
|
|
52
|
+
if (
|
|
53
|
+
[
|
|
54
|
+
'inherit',
|
|
55
|
+
'current',
|
|
56
|
+
'transparent',
|
|
57
|
+
'warmGray',
|
|
58
|
+
'trueGray',
|
|
59
|
+
'coolGray',
|
|
60
|
+
'blueGray',
|
|
61
|
+
'lightBlue'
|
|
62
|
+
].includes(colorKey)
|
|
63
|
+
) {
|
|
64
|
+
continue
|
|
65
|
+
}
|
|
66
|
+
if (typeof colors[colorKey] === 'string') {
|
|
67
|
+
result[`.ss-${colorKey}`] = {
|
|
68
|
+
[COLOR_VAR]: colors[colorKey]
|
|
69
|
+
}
|
|
70
|
+
} else if (typeof colors[colorKey] === 'object') {
|
|
71
|
+
for (const colorVariantKey in colors[colorKey]) {
|
|
72
|
+
result[`.ss-${colorKey}-${colorVariantKey}`] = {
|
|
73
|
+
[COLOR_VAR]: colors[colorKey][colorVariantKey]
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return result
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
module.exports = plugin(function ({ addUtilities }) {
|
|
82
|
+
addUtilities({
|
|
83
|
+
'.sharp-shadow': defaultStyle,
|
|
84
|
+
...generateDirections(),
|
|
85
|
+
...generateColors()
|
|
86
|
+
})
|
|
87
|
+
})
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
export default {
|
|
3
|
+
name: 'DChip'
|
|
4
|
+
}
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<span class="d-chip">
|
|
9
|
+
<slot />
|
|
10
|
+
</span>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<style>
|
|
14
|
+
.d-chip {
|
|
15
|
+
display: inline-block;
|
|
16
|
+
clip-path: polygon(
|
|
17
|
+
0 0,
|
|
18
|
+
100% 0.2em,
|
|
19
|
+
calc(100% - 0.3em) 100%,
|
|
20
|
+
0.2em calc(100% - 0.3em)
|
|
21
|
+
);
|
|
22
|
+
padding: 0.4em;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@media print {
|
|
26
|
+
.d-chip {
|
|
27
|
+
clip-path: none;
|
|
28
|
+
padding: 0;
|
|
29
|
+
background: unset !important;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
</style>
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
import { Icon } from '@iconify/vue'
|
|
4
|
+
import { useDPaginationUtils } from '../composables/utils'
|
|
5
|
+
import DBtn from './buttons/DBtn.vue'
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
name: 'DPagination',
|
|
9
|
+
components: {
|
|
10
|
+
DBtn,
|
|
11
|
+
Icon
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<script setup lang="ts">
|
|
17
|
+
const props = defineProps({
|
|
18
|
+
currentPage: {
|
|
19
|
+
type: Number,
|
|
20
|
+
default: 1
|
|
21
|
+
},
|
|
22
|
+
allPages: {
|
|
23
|
+
type: Number,
|
|
24
|
+
required: true
|
|
25
|
+
},
|
|
26
|
+
baseLink: {
|
|
27
|
+
type: String,
|
|
28
|
+
required: true
|
|
29
|
+
}
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
const { getLinkToPaginatedPage } = useDPaginationUtils()
|
|
33
|
+
|
|
34
|
+
function getLinkToPage(page: number) {
|
|
35
|
+
return getLinkToPaginatedPage(props.baseLink, page)
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const visiblePages = computed(() => {
|
|
39
|
+
return Array.from({ length: 7 }, (_, i) => i - 3 + props.currentPage).filter(
|
|
40
|
+
(num) => num >= 1 && num <= props.allPages
|
|
41
|
+
)
|
|
42
|
+
})
|
|
43
|
+
</script>
|
|
44
|
+
|
|
45
|
+
<template>
|
|
46
|
+
<nav class="w-fit text-2xl font-bold">
|
|
47
|
+
<DBtn
|
|
48
|
+
v-if="currentPage > 1"
|
|
49
|
+
class="inline-block mx-1"
|
|
50
|
+
:to="getLinkToPage(currentPage - 1)"
|
|
51
|
+
aria-label="Previous page"
|
|
52
|
+
>
|
|
53
|
+
<Icon icon="ic:baseline-arrow-back-ios" />
|
|
54
|
+
</DBtn>
|
|
55
|
+
<DBtn
|
|
56
|
+
v-if="!visiblePages.includes(1)"
|
|
57
|
+
class="inline-block mx-1"
|
|
58
|
+
:to="getLinkToPage(1)"
|
|
59
|
+
aria-label="First page"
|
|
60
|
+
>
|
|
61
|
+
1
|
|
62
|
+
</DBtn>
|
|
63
|
+
<span v-if="!visiblePages.includes(1)" class="mx-1"> ... </span>
|
|
64
|
+
<DBtn
|
|
65
|
+
v-for="number in visiblePages"
|
|
66
|
+
:key="number"
|
|
67
|
+
class="inline-block mx-1"
|
|
68
|
+
:to="getLinkToPage(number)"
|
|
69
|
+
:aria-label="`Page ${number}`"
|
|
70
|
+
>
|
|
71
|
+
{{ number }}
|
|
72
|
+
</DBtn>
|
|
73
|
+
<span v-if="!visiblePages.includes(allPages)" class="mx-1"> ... </span>
|
|
74
|
+
<DBtn
|
|
75
|
+
v-if="!visiblePages.includes(allPages)"
|
|
76
|
+
class="inline-block mx-1"
|
|
77
|
+
:to="getLinkToPage(allPages)"
|
|
78
|
+
:aria-label="`Last page (${allPages})`"
|
|
79
|
+
>
|
|
80
|
+
{{ allPages }}
|
|
81
|
+
</DBtn>
|
|
82
|
+
<DBtn
|
|
83
|
+
v-if="currentPage < allPages"
|
|
84
|
+
class="inline-block mx-1"
|
|
85
|
+
:to="getLinkToPage(currentPage + 1)"
|
|
86
|
+
aria-label="Next page"
|
|
87
|
+
>
|
|
88
|
+
<Icon icon="ic:baseline-arrow-forward-ios" />
|
|
89
|
+
</DBtn>
|
|
90
|
+
</nav>
|
|
91
|
+
</template>
|