Skip to content

Commit

Permalink
Merge branch 'main' into improve-colorpicker-accessibility
Browse files Browse the repository at this point in the history
  • Loading branch information
alastair-simon authored Jan 8, 2025
2 parents 9755f70 + b4341db commit 972c996
Show file tree
Hide file tree
Showing 83 changed files with 4,613 additions and 321 deletions.
7 changes: 7 additions & 0 deletions .changeset/heavy-falcons-act.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@shopware-ag/meteor-component-library": major
---

Removed locale control from mt-theme-provider.

Controlling the local will still happen via vue-i18n
6 changes: 6 additions & 0 deletions .changeset/neat-pumpkins-juggle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@shopware-ag/meteor-component-library": patch
---

Fixes a issue in the mt-modal that the toggling does not work when it is triggered outside the modal.
Fixes a issue in the mt-modal that it does not work inside transformed elements. This was fixed by moving the modal to the body element using the native Teleport feature of Vue 3.
11 changes: 11 additions & 0 deletions .changeset/wise-melons-smash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
"@shopware-ag/meteor-component-library": major
---

# Add new Text Editor component

This change introduces a new Text Editor component to the Meteor Component Library.

# Updated i18n configuration

We change the 'legacy' mode of i18n to 'false' in the Meteor Component Library configuration to use the new i18n composable.
3 changes: 2 additions & 1 deletion examples/nuxt-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"@shopware-ag/meteor-component-library": "workspace:*",
"nuxt": "^3.10.3",
"vue": "^3.5.0",
"vue-router": "^4.3.0"
"vue-router": "^4.3.0",
"vue-i18n": "^9.9.1"
},
"devDependencies": {
"@playwright/test": "^1.45.0",
Expand Down
11 changes: 11 additions & 0 deletions examples/nuxt-app/plugins/i18n.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { createI18n } from "vue-i18n";

export default defineNuxtPlugin(({ vueApp }) => {
const i18n = createI18n({
legacy: false,
globalInjection: true,
locale: "en",
});

vueApp.use(i18n);
});
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/component-library/.storybook/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import "@shopware-ag/meteor-tokens/administration/dark.css";

const i18n = createI18n({
// something vue-i18n options here ...
legacy: false,
globalInjection: true,
locale: "en",
fallbackLocale: "en",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 24 additions & 3 deletions packages/component-library/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,22 +39,46 @@
"test:storybook": "test-storybook"
},
"dependencies": {
"@codemirror/lang-html": "^6.4.9",
"@floating-ui/dom": "^1.4.3",
"@floating-ui/vue": "^1.1.5",
"@shopware-ag/meteor-icon-kit": "workspace:*",
"@shopware-ag/meteor-tokens": "workspace:*",
"@storybook/addon-a11y": "^8.4.5",
"@testing-library/jest-dom": "^6.4.6",
"@testing-library/vue": "^8.1.0",
"@tiptap/extension-bubble-menu": "^2.10.0",
"@tiptap/extension-bullet-list": "^2.10.0",
"@tiptap/extension-character-count": "^2.10.0",
"@tiptap/extension-color": "^2.9.1",
"@tiptap/extension-highlight": "^2.10.3",
"@tiptap/extension-link": "^2.10.0",
"@tiptap/extension-list-item": "^2.10.0",
"@tiptap/extension-ordered-list": "^2.10.0",
"@tiptap/extension-placeholder": "^2.10.4",
"@tiptap/extension-subscript": "^2.9.1",
"@tiptap/extension-superscript": "^2.9.1",
"@tiptap/extension-table": "^2.10.3",
"@tiptap/extension-table-cell": "^2.10.3",
"@tiptap/extension-table-header": "^2.10.3",
"@tiptap/extension-table-row": "^2.10.3",
"@tiptap/extension-text-align": "^2.9.1",
"@tiptap/extension-text-style": "^2.9.1",
"@tiptap/extension-underline": "^2.9.1",
"@tiptap/pm": "^2.9.1",
"@tiptap/starter-kit": "^2.9.1",
"@tiptap/vue-3": "^2.9.1",
"@vuepic/vue-datepicker": "^10.0.0",
"@vueuse/components": "^10.7.2",
"@vueuse/core": "^10.7.2",
"codemirror": "^6.0.1",
"date-fns": "^2.30.0",
"date-fns-tz": "^2.0.0",
"focus-trap": "^7.5.4",
"inter-ui": "^3.19.3",
"lodash-es": "^4.17.21",
"nanoid": "^5.0.7",
"vue-codemirror6": "^1.3.8",
"vue-i18n": "^9.9.1",
"vue-smooth-reflow": "^0.1.12"
},
Expand Down Expand Up @@ -109,8 +133,5 @@
"vite-plugin-svgstring": "^1.0.0",
"vitest": "^1.1.3",
"vue-tsc": "^2.0.21"
},
"peerDependencies": {
"vue": ">= 3.5.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import { computed, useAttrs } from "vue";
import MtIcon from "../icons-media/mt-icon/mt-icon.vue";
import MtColorBadge from "../feedback-indicator/mt-color-badge/mt-color-badge.vue";
import { useI18n } from "@/composables/useI18n";
import { useI18n } from "vue-i18n";
const props = withDefaults(
defineProps<{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import { computed } from "vue";
import MtIcon from "../../icons-media/mt-icon/mt-icon.vue";
import MtText from "@/components/content/mt-text/mt-text.vue";
import { useFutureFlags } from "@/composables/useFutureFlags";
import { useI18n } from "@/composables/useI18n";
import { useI18n } from "vue-i18n";
const { t } = useI18n({
messages: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,10 @@ $mt-field-transition:
margin-bottom: var(--scale-size-12);
}
&.is--disabled {
cursor: not-allowed;
}
&__hint-wrapper {
display: flex;
justify-content: space-between;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import MtIcon from "../../../icons-media/mt-icon/mt-icon.vue";
import MtTooltipDirective from "../../../../directives/tooltip.directive";
import MtNotificationMixin from "../../../../mixins/notification.mixin";
import { copyToClipboard as copyToClipboardUtil } from "../../../../utils/dom";
import { useI18n } from "@/composables/useI18n";
import { useI18n } from "vue-i18n";
export default defineComponent({
name: "MtFieldCopyable",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import { computed } from "vue";
import MtIcon from "../../../icons-media/mt-icon/mt-icon.vue";
import MtText from "@/components/content/mt-text/mt-text.vue";
import { useI18n } from "@/composables/useI18n";
import { useI18n } from "vue-i18n";
const props = defineProps<{
error?: Record<string, any> | null;
Expand All @@ -25,8 +25,12 @@ const props = defineProps<{
const errorMessage = computed(() => {
if (!props.error) return "";
if (!props.error.code) {
return t(props.error.detail);
}
const translation = t(props.error.code, props.error.parameters || {});
const noTranslationFound = translation === props.error.code;
const noTranslationFound = translation === props.error.code.toString();
return noTranslationFound ? props.error.detail : translation;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<script setup lang="ts">
import { computed } from "vue";
import MtIcon from "@/components/icons-media/mt-icon/mt-icon.vue";
import { useI18n } from "@/composables/useI18n";
import { useI18n } from "vue-i18n";
const { t } = useI18n({
messages: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
import { defineComponent } from "vue";
import MtTooltipDirective from "../../../../directives/tooltip.directive";
import MtIcon from "../../../icons-media/mt-icon/mt-icon.vue";
import { useI18n } from "@/composables/useI18n";
import { useI18n } from "vue-i18n";
export default defineComponent({
name: "MtInheritanceSwitch",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ import {
MtSelectResultRemoveItemSelectByKeyboardListener,
} from "@/helper/provideInjectKeys";
import { ref } from "vue";
import { useI18n } from "@/composables/useI18n";
import { useI18n } from "vue-i18n";
export default defineComponent({
name: "MtSelectResultList",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ const isInsideTooltip = useIsInsideTooltip();
width: 100%;
display: flex;
justify-content: center;
align-items: center;
}
.mt-button--x-small {
Expand Down
Loading

0 comments on commit 972c996

Please sign in to comment.