@porsche-design-system/components-vue 3.18.0 → 3.19.0-rc.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/CHANGELOG.md CHANGED
@@ -14,6 +14,31 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0),
14
14
 
15
15
  ### [Unreleased]
16
16
 
17
+ ### [3.19.0-rc.1] - 2024-09-06
18
+
19
+ #### Changed
20
+
21
+ - `Canvas`: Improve UX ([#3494](https://github.com/porsche-design-system/porsche-design-system/pull/3494))
22
+
23
+ ### [3.19.0-rc.0] - 2024-09-03
24
+
25
+ #### Added
26
+
27
+ - `componentsReady()`: Introduce optional `readyState` parameter
28
+ ([#3460](https://github.com/porsche-design-system/porsche-design-system/pull/3460))
29
+ - `Carousel`: introduce `focusOnCenterSlide` & `gradientColor` props
30
+ ([#3488](https://github.com/porsche-design-system/porsche-design-system/pull/3488))
31
+
32
+ #### Changed
33
+
34
+ - `Text Field Wrapper`: width calculation of counter and unit element are now CSS based in relation to the number of
35
+ characters ([#3472](https://github.com/porsche-design-system/porsche-design-system/pull/3472))
36
+
37
+ #### Fixed
38
+
39
+ - `jsdom-polyfill`: errors from included polyfill packages
40
+ ([3481](https://github.com/porsche-design-system/porsche-design-system/pull/3481))
41
+
17
42
  ### [3.18.0] - 2024-08-21
18
43
 
19
44
  ### [3.18.0-rc.0] - 2024-08-21
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),s=require("../../utils.cjs"),m=e.defineComponent({__name:"CanvasWrapper",props:{sidebarEndOpen:{type:Boolean,default:!1},sidebarEndWidth:{default:"medium"},sidebarStartOpen:{type:Boolean,default:!1},sidebarStartWidth:{default:"medium"}},emits:["dismissSidebarEnd","dismissSidebarStart"],setup(o,{emit:d}){const a=s.usePrefix("p-canvas"),i=o,t=e.ref(),n=d,r=()=>s.syncProperties(t,i);return e.onMounted(()=>{r(),s.addEventListenerToElementRef(t,"dismissSidebarEnd",n),s.addEventListenerToElementRef(t,"dismissSidebarStart",n)}),e.onUpdated(r),(p,c)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(a)),{ref_key:"pdsComponentRef",ref:t},{default:e.withCtx(()=>[e.renderSlot(p.$slots,"default")]),_:3},512))}});module.exports=m;
1
+ "use strict";const e=require("vue"),t=require("../../utils.cjs"),u=e.defineComponent({__name:"CanvasWrapper",props:{sidebarEndIcon:{default:"configurate"},sidebarEndOpen:{type:Boolean,default:!1},sidebarStartIcon:{default:"menu-lines"},sidebarStartOpen:{type:Boolean,default:!1},theme:{}},setup(c){const p=t.usePrefix("p-canvas"),n=c,o=e.ref(),r=e.inject(t.themeInjectionKey),a=()=>t.syncProperties(o,{...n,theme:n.theme||r.value});return e.onMounted(a),e.onUpdated(a),e.watch(r,s=>{t.syncProperties(o,{theme:n.theme||s})}),(s,d)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(p)),{ref_key:"pdsComponentRef",ref:o},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"default")]),_:3},512))}});module.exports=u;
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),t=require("../../utils.cjs"),p=e.defineComponent({__name:"CarouselWrapper",props:{activeSlideIndex:{default:0},alignHeader:{default:"start"},aria:{},description:{},disablePagination:{},heading:{},headingSize:{default:"x-large"},intl:{},pagination:{default:!0},rewind:{type:Boolean,default:!0},skipLinkTarget:{},slidesPerPage:{default:1},theme:{},width:{default:"basic"},wrapContent:{type:Boolean}},emits:["carouselChange","update"],setup(d,{emit:l}){const c=t.usePrefix("p-carousel"),a=d,n=e.ref(),r=l,s=e.inject(t.themeInjectionKey),i=()=>t.syncProperties(n,{...a,theme:a.theme||s.value});return e.onMounted(()=>{i(),t.addEventListenerToElementRef(n,"carouselChange",r),t.addEventListenerToElementRef(n,"update",r)}),e.onUpdated(i),e.watch(s,o=>{t.syncProperties(n,{theme:a.theme||o})}),(o,u)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(c)),{ref_key:"pdsComponentRef",ref:n},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:3},512))}});module.exports=p;
1
+ "use strict";const e=require("vue"),t=require("../../utils.cjs"),c=e.defineComponent({__name:"CarouselWrapper",props:{activeSlideIndex:{default:0},alignHeader:{default:"start"},aria:{},description:{},disablePagination:{},focusOnCenterSlide:{type:Boolean,default:!1},gradientColor:{default:"none"},heading:{},headingSize:{default:"x-large"},intl:{},pagination:{default:!0},rewind:{type:Boolean,default:!0},skipLinkTarget:{},slidesPerPage:{default:1},theme:{},width:{default:"basic"},wrapContent:{type:Boolean}},emits:["carouselChange","update"],setup(d,{emit:l}){const u=t.usePrefix("p-carousel"),o=d,n=e.ref(),r=l,s=e.inject(t.themeInjectionKey),i=()=>t.syncProperties(n,{...o,theme:o.theme||s.value});return e.onMounted(()=>{i(),t.addEventListenerToElementRef(n,"carouselChange",r),t.addEventListenerToElementRef(n,"update",r)}),e.onUpdated(i),e.watch(s,a=>{t.syncProperties(n,{theme:o.theme||a})}),(a,p)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(u)),{ref_key:"pdsComponentRef",ref:n},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:3},512))}});module.exports=c;
@@ -1,32 +1,44 @@
1
- import type { CanvasSidebarEndWidth, CanvasSidebarStartWidth } from '../types';
1
+ import type { CanvasSidebarEndIcon, CanvasSidebarStartIcon, Theme } from '../types';
2
2
  type PCanvasProps = {
3
+ /**
4
+ * The icon to toggle the Sidebar on the end side
5
+ */
6
+ sidebarEndIcon?: CanvasSidebarEndIcon;
7
+ /**
8
+ * Open Sidebar on the end side
9
+ */
3
10
  sidebarEndOpen?: boolean;
4
11
  /**
5
- * Defines the width of the sidebar on the end side
12
+ * The icon to toggle the Sidebar on the start side
6
13
  */
7
- sidebarEndWidth?: CanvasSidebarEndWidth;
14
+ sidebarStartIcon?: CanvasSidebarStartIcon;
8
15
  /**
9
16
  * Open Sidebar on the start side
10
17
  */
11
18
  sidebarStartOpen?: boolean;
12
19
  /**
13
- * Defines the width of the sidebar on the start side
20
+ * Adapts the color depending on the theme. Has no effect when "inherit" is set as color prop.
14
21
  */
15
- sidebarStartWidth?: CanvasSidebarStartWidth;
22
+ theme?: Theme;
16
23
  };
17
24
  declare function __VLS_template(): {
18
25
  default?(_: {}): any;
19
26
  };
20
27
  declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<PCanvasProps>, {
28
+ sidebarEndIcon: string;
29
+ sidebarEndOpen: boolean;
30
+ sidebarStartIcon: string;
31
+ sidebarStartOpen: boolean;
32
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<PCanvasProps>, {
33
+ sidebarEndIcon: string;
21
34
  sidebarEndOpen: boolean;
22
- sidebarEndWidth: string;
35
+ sidebarStartIcon: string;
23
36
  sidebarStartOpen: boolean;
24
- sidebarStartWidth: string;
25
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any, string, import("vue").PublicProps, any, {
37
+ }>>>, {
38
+ sidebarEndIcon: CanvasSidebarEndIcon;
26
39
  sidebarEndOpen: boolean;
27
- sidebarEndWidth: CanvasSidebarEndWidth;
40
+ sidebarStartIcon: CanvasSidebarStartIcon;
28
41
  sidebarStartOpen: boolean;
29
- sidebarStartWidth: CanvasSidebarStartWidth;
30
42
  }, {}>;
31
43
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
32
44
  export default _default;
@@ -1,29 +1,29 @@
1
- import { defineComponent as p, ref as m, onMounted as f, onUpdated as l, openBlock as c, createBlock as u, resolveDynamicComponent as b, unref as S, withCtx as C, renderSlot as _ } from "vue";
2
- import { usePrefix as y, addEventListenerToElementRef as s, syncProperties as E } from "../../utils.mjs";
3
- const k = /* @__PURE__ */ p({
1
+ import { defineComponent as c, ref as f, inject as d, onMounted as m, onUpdated as l, watch as i, openBlock as u, createBlock as h, resolveDynamicComponent as y, unref as C, withCtx as _, renderSlot as b } from "vue";
2
+ import { usePrefix as v, themeInjectionKey as B, syncProperties as r } from "../../utils.mjs";
3
+ const I = /* @__PURE__ */ c({
4
4
  __name: "CanvasWrapper",
5
5
  props: {
6
+ sidebarEndIcon: { default: "configurate" },
6
7
  sidebarEndOpen: { type: Boolean, default: !1 },
7
- sidebarEndWidth: { default: "medium" },
8
+ sidebarStartIcon: { default: "menu-lines" },
8
9
  sidebarStartOpen: { type: Boolean, default: !1 },
9
- sidebarStartWidth: { default: "medium" }
10
+ theme: {}
10
11
  },
11
- emits: ["dismissSidebarEnd", "dismissSidebarStart"],
12
- setup(o, { emit: r }) {
13
- const a = y("p-canvas"), d = o, e = m(), t = r, n = () => E(e, d);
14
- return f(() => {
15
- n(), s(e, "dismissSidebarEnd", t), s(e, "dismissSidebarStart", t);
16
- }), l(n), (i, h) => (c(), u(b(S(a)), {
12
+ setup(s) {
13
+ const p = v("p-canvas"), e = s, t = f(), o = d(B), a = () => r(t, { ...e, theme: e.theme || o.value });
14
+ return m(a), l(a), i(o, (n) => {
15
+ r(t, { theme: e.theme || n });
16
+ }), (n, k) => (u(), h(y(C(p)), {
17
17
  ref_key: "pdsComponentRef",
18
- ref: e
18
+ ref: t
19
19
  }, {
20
- default: C(() => [
21
- _(i.$slots, "default")
20
+ default: _(() => [
21
+ b(n.$slots, "default")
22
22
  ]),
23
23
  _: 3
24
24
  }, 512));
25
25
  }
26
26
  });
27
27
  export {
28
- k as default
28
+ I as default
29
29
  };
@@ -1,4 +1,4 @@
1
- import type { CarouselAlignHeader, SelectedAriaAttributes, CarouselAriaAttribute, BreakpointCustomizable, CarouselHeadingSize, CarouselInternationalization, Theme, CarouselWidth } from '../types';
1
+ import type { CarouselAlignHeader, SelectedAriaAttributes, CarouselAriaAttribute, BreakpointCustomizable, CarouselGradientColor, CarouselHeadingSize, CarouselInternationalization, Theme, CarouselWidth } from '../types';
2
2
  type PCarouselProps = {
3
3
  /**
4
4
  * Defines which slide to be active (zero-based numbering).
@@ -20,6 +20,14 @@ type PCarouselProps = {
20
20
  * @deprecated since v3.0.0, will be removed with next major release, use `pagination` instead. If true, the carousel will not show pagination bullets at the bottom.
21
21
  */
22
22
  disablePagination?: BreakpointCustomizable<boolean>;
23
+ /**
24
+ * Indicates whether focus should be set on the center slide. If true, the carousel loops by individual slide; otherwise, it loops by page.
25
+ */
26
+ focusOnCenterSlide?: boolean;
27
+ /**
28
+ * Adapts the background gradient for the left and right edge.
29
+ */
30
+ gradientColor?: CarouselGradientColor;
23
31
  /**
24
32
  * Defines the heading used in the carousel.
25
33
  */
@@ -68,6 +76,8 @@ declare function __VLS_template(): {
68
76
  declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<PCarouselProps>, {
69
77
  activeSlideIndex: number;
70
78
  alignHeader: string;
79
+ focusOnCenterSlide: boolean;
80
+ gradientColor: string;
71
81
  headingSize: string;
72
82
  pagination: boolean;
73
83
  rewind: boolean;
@@ -79,6 +89,8 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
79
89
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<PCarouselProps>, {
80
90
  activeSlideIndex: number;
81
91
  alignHeader: string;
92
+ focusOnCenterSlide: boolean;
93
+ gradientColor: string;
82
94
  headingSize: string;
83
95
  pagination: boolean;
84
96
  rewind: boolean;
@@ -91,6 +103,8 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
91
103
  width: CarouselWidth;
92
104
  activeSlideIndex: number;
93
105
  alignHeader: CarouselAlignHeader;
106
+ focusOnCenterSlide: boolean;
107
+ gradientColor: CarouselGradientColor;
94
108
  headingSize: CarouselHeadingSize;
95
109
  pagination: BreakpointCustomizable<boolean>;
96
110
  rewind: boolean;
@@ -1,6 +1,6 @@
1
- import { defineComponent as c, ref as u, inject as f, onMounted as m, onUpdated as h, watch as g, openBlock as C, createBlock as y, resolveDynamicComponent as _, unref as w, withCtx as P, renderSlot as k } from "vue";
2
- import { usePrefix as x, themeInjectionKey as v, addEventListenerToElementRef as i, syncProperties as s } from "../../utils.mjs";
3
- const S = /* @__PURE__ */ c({
1
+ import { defineComponent as u, ref as f, inject as c, onMounted as m, onUpdated as h, watch as g, openBlock as C, createBlock as y, resolveDynamicComponent as _, unref as w, withCtx as P, renderSlot as k } from "vue";
2
+ import { usePrefix as x, themeInjectionKey as B, addEventListenerToElementRef as i, syncProperties as s } from "../../utils.mjs";
3
+ const b = /* @__PURE__ */ u({
4
4
  __name: "CarouselWrapper",
5
5
  props: {
6
6
  activeSlideIndex: { default: 0 },
@@ -8,6 +8,8 @@ const S = /* @__PURE__ */ c({
8
8
  aria: {},
9
9
  description: {},
10
10
  disablePagination: {},
11
+ focusOnCenterSlide: { type: Boolean, default: !1 },
12
+ gradientColor: { default: "none" },
11
13
  heading: {},
12
14
  headingSize: { default: "x-large" },
13
15
  intl: {},
@@ -20,13 +22,13 @@ const S = /* @__PURE__ */ c({
20
22
  wrapContent: { type: Boolean }
21
23
  },
22
24
  emits: ["carouselChange", "update"],
23
- setup(d, { emit: p }) {
24
- const l = x("p-carousel"), t = d, e = u(), a = p, o = f(v), r = () => s(e, { ...t, theme: t.theme || o.value });
25
+ setup(d, { emit: l }) {
26
+ const p = x("p-carousel"), t = d, e = f(), a = l, o = c(B), r = () => s(e, { ...t, theme: t.theme || o.value });
25
27
  return m(() => {
26
28
  r(), i(e, "carouselChange", a), i(e, "update", a);
27
29
  }), h(r), g(o, (n) => {
28
30
  s(e, { theme: t.theme || n });
29
- }), (n, B) => (C(), y(_(w(l)), {
31
+ }), (n, v) => (C(), y(_(w(p)), {
30
32
  ref_key: "pdsComponentRef",
31
33
  ref: e
32
34
  }, {
@@ -38,5 +40,5 @@ const S = /* @__PURE__ */ c({
38
40
  }
39
41
  });
40
42
  export {
41
- S as default
43
+ b as default
42
44
  };
@@ -46,8 +46,8 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
46
46
  scrollbar: boolean;
47
47
  }>>>, {
48
48
  scrollbar: boolean;
49
- alignScrollIndicator: ScrollerAlignScrollIndicator;
50
49
  gradientColor: ScrollerGradientColor;
50
+ alignScrollIndicator: ScrollerAlignScrollIndicator;
51
51
  }, {}>;
52
52
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
53
53
  export default _default;
@@ -684,18 +684,19 @@ export type ButtonTileSize = TileSize;
684
684
  export type ButtonTileBackground = TileBackground;
685
685
  export type ButtonTileWeight = TileWeight;
686
686
  export type ButtonTileAlign = TileAlign;
687
- declare const CANVAS_SIDEBAR_WIDTHS: readonly [
688
- "medium",
689
- "large"
690
- ];
691
- export type CanvasSidebarWidth = (typeof CANVAS_SIDEBAR_WIDTHS)[number];
692
- export type CanvasSidebarStartWidth = CanvasSidebarWidth;
693
- export type CanvasSidebarEndWidth = CanvasSidebarWidth;
687
+ export type CanvasSidebarStartIcon = IconName;
688
+ export type CanvasSidebarEndIcon = IconName;
694
689
  declare const CAROUSEL_WIDTHS: readonly [
695
690
  "basic",
696
691
  "extended"
697
692
  ];
698
693
  export type CarouselWidth = (typeof CAROUSEL_WIDTHS)[number];
694
+ declare const CAROUSEL_GRADIENT_COLORS: readonly [
695
+ "background-base",
696
+ "background-surface",
697
+ "none"
698
+ ];
699
+ export type CarouselGradientColor = (typeof CAROUSEL_GRADIENT_COLORS)[number];
699
700
  declare const CAROUSEL_ALIGN_HEADERS: readonly [
700
701
  "start",
701
702
  "center",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@porsche-design-system/components-vue",
3
- "version": "3.18.0",
3
+ "version": "3.19.0-rc.1",
4
4
  "description": "Porsche Design System is a component library designed to help developers create the best experience for software or services distributed by Dr. Ing. h.c. F. Porsche AG.",
5
5
  "keywords": [
6
6
  "porsche",
@@ -17,7 +17,7 @@
17
17
  "license": "SEE LICENSE IN LICENSE",
18
18
  "homepage": "https://designsystem.porsche.com",
19
19
  "dependencies": {
20
- "@porsche-design-system/components-js": "3.18.0"
20
+ "@porsche-design-system/components-js": "3.19.0-rc.1"
21
21
  },
22
22
  "peerDependencies": {
23
23
  "vue": ">=3.0.0 <4.0.0"