Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release: 3.0.0-next.16 #226

Merged
merged 3 commits into from
Mar 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,23 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [3.0.0-next.16](https://github.com/LouisMazel/maz-ui/compare/v2.3.13...3.0.0-next.16) (2022-03-17)

### Bug Fixes

- **docs:** aos implementation ([#218](https://github.com/LouisMazel/maz-ui/issues/218)) ([3849e05](https://github.com/LouisMazel/maz-ui/commit/3849e0566973906ae1a557d6dfa230429b550618))
- **docs:** aos installation on client side ([#217](https://github.com/LouisMazel/maz-ui/issues/217)) ([6790515](https://github.com/LouisMazel/maz-ui/commit/67905153973581418b4f807e531b1ee4f01b1331))

### Features

- **lib:** add maz-picker component ([#197](https://github.com/LouisMazel/maz-ui/issues/197)) ([877515e](https://github.com/LouisMazel/maz-ui/commit/877515e585d1aa9a3febd83e222c12346e7401b5))
- **lib:** add wait plugin to manage loading state ([#214](https://github.com/LouisMazel/maz-ui/issues/214)) ([a6a1931](https://github.com/LouisMazel/maz-ui/commit/a6a1931ba7000c5e545cfc4808fe7205809629c4))
- **lib:** adding maz-input-number ([#195](https://github.com/LouisMazel/maz-ui/issues/195)) ([dfb835d](https://github.com/LouisMazel/maz-ui/commit/dfb835d796682955b53dfb82455aefc763895c86))
- **lib:** aos - adding anchor option ([#219](https://github.com/LouisMazel/maz-ui/issues/219)) ([b1c8b02](https://github.com/LouisMazel/maz-ui/commit/b1c8b028286d2154b86c5bb52fa7208d0c347d3e))
- **lib:** export tailwind config ([#201](https://github.com/LouisMazel/maz-ui/issues/201)) ([94fddb9](https://github.com/LouisMazel/maz-ui/commit/94fddb9d35e91a6f649bcb18ae7105048d048584))
- **lib:** maz-switch - new component ([d5e872d](https://github.com/LouisMazel/maz-ui/commit/d5e872dbef4401f923d47d4bc0959b996bb93f68))
- **lib:** MazInput - adding style color for autofill ([#208](https://github.com/LouisMazel/maz-ui/issues/208)) ([b3ae969](https://github.com/LouisMazel/maz-ui/commit/b3ae969584bda0e690179c1b6c9defdc1bbf0425))

# [3.0.0-next.15](https://github.com/LouisMazel/maz-ui/compare/v2.3.13...3.0.0-next.15) (2022-03-17)

### Bug Fixes
Expand Down
20 changes: 17 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,13 @@ build-types-lib:
make --directory=packages/lib build-types

install:
make install-root install-lib install-docs
make install-root install-lib install-docs install-testing

install-root:
npm ci

reinstall-root:
rm -rf node_modules
npm i

install-lib:
Expand All @@ -43,8 +47,11 @@ install-lib:
install-docs:
make --directory=packages/docs install

install-testing:
make --directory=packages/testing install

reinstall:
make reinstall-lib reinstall-docs reinstall-testing
make reinstall-root reinstall-lib reinstall-docs reinstall-testing

reinstall-lib:
make --directory=packages/lib reinstall
Expand Down Expand Up @@ -77,4 +84,11 @@ publish-version-major:
make --directory=packages/lib publish-version-major

commit:
make --directory=packages/lib commit
make --directory=packages/lib commit

release:
npm run release
make install
git add --all
git commit --amend --no-edit
git push origin HEAD --force
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"packages": ["packages/*"],
"loglevel": "verbose",
"version": "3.0.0-next.15",
"version": "3.0.0-next.16",
"npmClientArgs": ["--production=false", "--no-progress"],
"yes": true,
"granularPathspec": false,
Expand Down
22 changes: 22 additions & 0 deletions packages/docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,28 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [3.0.0-next.16](https://github.com/LouisMazel/maz-ui/compare/v2.3.13...3.0.0-next.16) (2022-03-17)


### Bug Fixes

* **docs:** aos implementation ([#218](https://github.com/LouisMazel/maz-ui/issues/218)) ([3849e05](https://github.com/LouisMazel/maz-ui/commit/3849e0566973906ae1a557d6dfa230429b550618))
* **docs:** aos installation on client side ([#217](https://github.com/LouisMazel/maz-ui/issues/217)) ([6790515](https://github.com/LouisMazel/maz-ui/commit/67905153973581418b4f807e531b1ee4f01b1331))


### Features

* **lib:** add maz-picker component ([#197](https://github.com/LouisMazel/maz-ui/issues/197)) ([877515e](https://github.com/LouisMazel/maz-ui/commit/877515e585d1aa9a3febd83e222c12346e7401b5))
* **lib:** add wait plugin to manage loading state ([#214](https://github.com/LouisMazel/maz-ui/issues/214)) ([a6a1931](https://github.com/LouisMazel/maz-ui/commit/a6a1931ba7000c5e545cfc4808fe7205809629c4))
* **lib:** adding maz-input-number ([#195](https://github.com/LouisMazel/maz-ui/issues/195)) ([dfb835d](https://github.com/LouisMazel/maz-ui/commit/dfb835d796682955b53dfb82455aefc763895c86))
* **lib:** aos - adding anchor option ([#219](https://github.com/LouisMazel/maz-ui/issues/219)) ([b1c8b02](https://github.com/LouisMazel/maz-ui/commit/b1c8b028286d2154b86c5bb52fa7208d0c347d3e))
* **lib:** export tailwind config ([#201](https://github.com/LouisMazel/maz-ui/issues/201)) ([94fddb9](https://github.com/LouisMazel/maz-ui/commit/94fddb9d35e91a6f649bcb18ae7105048d048584))
* **lib:** maz-switch - new component ([d5e872d](https://github.com/LouisMazel/maz-ui/commit/d5e872dbef4401f923d47d4bc0959b996bb93f68))





# [3.0.0-next.15](https://github.com/LouisMazel/maz-ui/compare/v2.3.13...3.0.0-next.15) (2022-03-17)


Expand Down
2 changes: 1 addition & 1 deletion packages/docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ serve:
npm run docs:dev

install:
npm i
npm ci

reinstall:
rm -rf ./node_modules
Expand Down
2 changes: 1 addition & 1 deletion packages/docs/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/docs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "docs",
"version": "3.0.0-next.15",
"version": "3.0.0-next.16",
"description": "documentation of maz-ui",
"main": "index.js",
"browser": {
Expand Down
12 changes: 12 additions & 0 deletions packages/lib/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [3.0.0-next.16](https://github.com/LouisMazel/maz-ui-3/compare/v2.3.13...3.0.0-next.16) (2022-03-17)

### Features

- **lib:** add maz-picker component ([#197](https://github.com/LouisMazel/maz-ui-3/issues/197)) ([877515e](https://github.com/LouisMazel/maz-ui-3/commit/877515e585d1aa9a3febd83e222c12346e7401b5))
- **lib:** add wait plugin to manage loading state ([#214](https://github.com/LouisMazel/maz-ui-3/issues/214)) ([a6a1931](https://github.com/LouisMazel/maz-ui-3/commit/a6a1931ba7000c5e545cfc4808fe7205809629c4))
- **lib:** adding maz-input-number ([#195](https://github.com/LouisMazel/maz-ui-3/issues/195)) ([dfb835d](https://github.com/LouisMazel/maz-ui-3/commit/dfb835d796682955b53dfb82455aefc763895c86))
- **lib:** aos - adding anchor option ([#219](https://github.com/LouisMazel/maz-ui-3/issues/219)) ([b1c8b02](https://github.com/LouisMazel/maz-ui-3/commit/b1c8b028286d2154b86c5bb52fa7208d0c347d3e))
- **lib:** export tailwind config ([#201](https://github.com/LouisMazel/maz-ui-3/issues/201)) ([94fddb9](https://github.com/LouisMazel/maz-ui-3/commit/94fddb9d35e91a6f649bcb18ae7105048d048584))
- **lib:** maz-switch - new component ([d5e872d](https://github.com/LouisMazel/maz-ui-3/commit/d5e872dbef4401f923d47d4bc0959b996bb93f68))
- **lib:** MazInput - adding style color for autofill ([#208](https://github.com/LouisMazel/maz-ui-3/issues/208)) ([b3ae969](https://github.com/LouisMazel/maz-ui-3/commit/b3ae969584bda0e690179c1b6c9defdc1bbf0425))

# [3.0.0-next.15](https://github.com/LouisMazel/maz-ui-3/compare/v2.3.13...3.0.0-next.15) (2022-03-17)

### Features
Expand Down
2 changes: 1 addition & 1 deletion packages/lib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ build-watch:
npm run build:watch

install:
npm i
npm ci

reinstall:
rm -rf ./node_modules
Expand Down
4 changes: 2 additions & 2 deletions packages/lib/build/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ if (!argv.package || argv.package === 'modules') {
format: 'esm',
exports: 'named',
compact: true,
sourcemap: true,
// sourcemap: true,
},
plugins: [
peerDepsExternal(),
Expand Down Expand Up @@ -200,7 +200,7 @@ if (!argv.package || argv.package === 'components') {
exports: 'named',
format: 'esm',
compact: true,
sourcemap: true,
// sourcemap: true,
},
plugins: [
peerDepsExternal(),
Expand Down
4 changes: 2 additions & 2 deletions packages/lib/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/lib/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "maz-ui",
"version": "3.0.0-next.15",
"version": "3.0.0-next.16",
"description": "A stand-alone components library for Vue.Js 3 & Nuxt.Js 3",
"author": "Louis Mazel <me@loicmazuel.com>",
"main": "modules/index.js",
Expand Down
108 changes: 108 additions & 0 deletions packages/lib/package/components/MazSwitch.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
<template>
<div class="m-switch" :class="[`--${color}`]">
<input
:id="uniqueId"
v-bind="$attrs"
type="checkbox"
:name="name"
:checked="modelValue"
:disabled="disabled"
class="m-switch__input"
@change="emit"
/>
<label
:for="uniqueId"
class="m-switch__toggle"
:style="[{ '--m-switch-bg-bar': bgColorClassVar } as StyleValue]"
>
<span :style="[bgColorStyle]" />
</label>
</div>
</template>

<script lang="ts">
export type { Color } from './types'
</script>

<script lang="ts" setup>
import { computed, getCurrentInstance, PropType } from 'vue'
import type { StyleValue } from 'vue'
import { Color } from './types'

const props = defineProps({
modelValue: { type: Boolean, required: true },
id: { type: String, default: undefined },
disabled: { type: Boolean, default: false },
name: { type: String, default: undefined },
color: { type: String as PropType<Color>, default: 'primary' },
})

const emits = defineEmits(['update:model-value'])

const uniqueId = computed(
() => props.id ?? `mazSwitch-${getCurrentInstance()?.uid}`,
)

const bgColorClassVar = computed(
() => `var(--maz-color-${props.color}-alpha)`,
)

const bgColorStyle = computed<StyleValue>(() => ({
backgroundColor: props.modelValue
? `var(--maz-color-${props.color})`
: 'var(--maz-color-white)',
}))

const emit = (e: Event) => {
const target = e.target as HTMLInputElement | undefined
emits('update:model-value', target?.checked ?? false)
}
</script>

<style lang="postcss">
.m-switch {
&__input {
@apply maz-absolute;

left: -9999px;
}

&__toggle {
@apply maz-relative maz-block maz-h-6 maz-w-12 maz-cursor-pointer;

transform: translate3d(0, 0, 0);

&::before {
content: '';
transition: all 200ms ease-in-out;

@apply maz-relative maz-top-1 maz-left-1 maz-block maz-h-4 maz-w-10 maz-rounded-full;

background-color: var(--m-switch-bg-bar);
}

& span {
@apply maz-absolute maz-top-0 maz-left-0 maz-block maz-h-6 maz-w-6 maz-rounded-full;

box-shadow: 0 2px 8px 0 rgb(0 0 0 / 20%);
transition: all 200ms ease-in-out;
}
}

&__input:checked + &__toggle {
span {
transform: translateX(1.5em);

&::before {
transform: scale(1);
opacity: 0;
transition: all 400ms ease-in-out;
}
}
}

&__input:disabled + &__toggle {
@apply maz-cursor-not-allowed;
}
}
</style>
3 changes: 3 additions & 0 deletions packages/lib/package/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import { default as MazPicker } from './MazPicker.vue'
import { default as MazSelect } from './MazSelect.vue'
import { default as MazSlider } from './MazSlider.vue'
import { default as MazSpinner } from './MazSpinner.vue'
import { default as MazSwitch } from './MazSwitch.vue'
import { default as MazTabsBar } from './MazTabsBar.vue'
import { default as MazTabsContent } from './MazTabsContent.vue'
import { default as MazTabsContentItem } from './MazTabsContentItem.vue'
Expand Down Expand Up @@ -56,6 +57,7 @@ export {
MazSelect,
MazSlider,
MazSpinner,
MazSwitch,
MazTabsBar,
MazTabsContent,
MazTabsContentItem,
Expand Down Expand Up @@ -88,6 +90,7 @@ export default {
MazSelect,
MazSlider,
MazSpinner,
MazSwitch,
MazTabsBar,
MazTabsContent,
MazTabsContentItem,
Expand Down
15 changes: 15 additions & 0 deletions packages/testing/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,21 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [3.0.0-next.16](https://github.com/LouisMazel/maz-ui/compare/v2.3.13...3.0.0-next.16) (2022-03-17)


### Features

* **lib:** add maz-picker component ([#197](https://github.com/LouisMazel/maz-ui/issues/197)) ([877515e](https://github.com/LouisMazel/maz-ui/commit/877515e585d1aa9a3febd83e222c12346e7401b5))
* **lib:** add wait plugin to manage loading state ([#214](https://github.com/LouisMazel/maz-ui/issues/214)) ([a6a1931](https://github.com/LouisMazel/maz-ui/commit/a6a1931ba7000c5e545cfc4808fe7205809629c4))
* **lib:** export tailwind config ([#201](https://github.com/LouisMazel/maz-ui/issues/201)) ([94fddb9](https://github.com/LouisMazel/maz-ui/commit/94fddb9d35e91a6f649bcb18ae7105048d048584))
* **lib:** maz-switch - new component ([d5e872d](https://github.com/LouisMazel/maz-ui/commit/d5e872dbef4401f923d47d4bc0959b996bb93f68))
* **lib:** MazInput - adding style color for autofill ([#208](https://github.com/LouisMazel/maz-ui/issues/208)) ([b3ae969](https://github.com/LouisMazel/maz-ui/commit/b3ae969584bda0e690179c1b6c9defdc1bbf0425))





# [3.0.0-next.15](https://github.com/LouisMazel/maz-ui/compare/v2.3.13...3.0.0-next.15) (2022-03-17)


Expand Down
3 changes: 3 additions & 0 deletions packages/testing/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
serve:
npm run dev

install:
npm ci

reinstall:
rm -rf ./node_modules
npm i
2 changes: 1 addition & 1 deletion packages/testing/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/testing/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "testing",
"version": "3.0.0-next.15",
"version": "3.0.0-next.16",
"scripts": {
"dev": "vite",
"build": "vite build",
Expand Down