From ddeaab525a909b13e250dfbb4dcae5b805ddb1d8 Mon Sep 17 00:00:00 2001 From: tugcekucukoglu Date: Mon, 15 Apr 2024 11:08:42 +0300 Subject: [PATCH] New *ButtonProps properties added - I --- components/lib/carousel/BaseCarousel.vue | 12 +- components/lib/carousel/Carousel.d.ts | 41 ++- components/lib/carousel/Carousel.vue | 39 ++- components/lib/dialog/BaseDialog.vue | 20 +- components/lib/dialog/Dialog.d.ts | 47 ++- components/lib/dialog/Dialog.vue | 44 ++- components/lib/panel/BasePanel.vue | 10 +- components/lib/panel/Panel.d.ts | 30 +- components/lib/panel/Panel.vue | 23 +- components/lib/scrolltop/BaseScrollTop.vue | 6 + components/lib/scrolltop/ScrollTop.d.ts | 31 +- components/lib/scrolltop/ScrollTop.vue | 25 +- components/lib/sidebar/BaseSidebar.vue | 6 + components/lib/sidebar/Sidebar.d.ts | 29 +- components/lib/sidebar/Sidebar.vue | 29 +- .../themes/primeone/base/carousel/index.js | 5 + .../lib/themes/primeone/base/toast/index.js | 2 +- components/lib/toast/BaseToast.vue | 6 +- components/lib/toast/Toast.d.ts | 39 ++- components/lib/toast/ToastMessage.vue | 10 +- doc/common/apidoc/index.json | 327 +++++++++++------- doc/panel/TemplateDoc.vue | 16 +- doc/scrolltop/ElementDoc.vue | 24 +- 23 files changed, 543 insertions(+), 278 deletions(-) diff --git a/components/lib/carousel/BaseCarousel.vue b/components/lib/carousel/BaseCarousel.vue index aebfa47c4..b46c931f2 100644 --- a/components/lib/carousel/BaseCarousel.vue +++ b/components/lib/carousel/BaseCarousel.vue @@ -48,12 +48,16 @@ export default { default: true }, prevButtonProps: { - type: null, - default: null + type: Object, + default: () => { + return { severity: 'secondary', text: true, rounded: true }; + } }, nextButtonProps: { - type: null, - default: null + type: Object, + default: () => { + return { severity: 'secondary', text: true, rounded: true }; + } } }, style: CarouselStyle, diff --git a/components/lib/carousel/Carousel.d.ts b/components/lib/carousel/Carousel.d.ts index 4cfa9f355..88535818e 100755 --- a/components/lib/carousel/Carousel.d.ts +++ b/components/lib/carousel/Carousel.d.ts @@ -7,8 +7,9 @@ * @module carousel * */ -import { ButtonHTMLAttributes, VNode } from 'vue'; +import { VNode } from 'vue'; import { ComponentHooks } from '../basecomponent'; +import { ButtonPassThroughOptions } from '../button'; import { PassThroughOptions } from '../passthrough'; import { ClassComponent, DesignToken, GlobalComponentConstructor, PassThrough } from '../ts-helpers'; @@ -48,6 +49,20 @@ export interface CarouselPassThroughMethodOptions { global: object | undefined; } +/** + * Custom shared passthrough(pt) option method. + */ +export interface CarouselSharedPassThroughMethodOptions { + /** + * Defines valid properties. + */ + props: CarouselProps; + /** + * Defines current inline state. + */ + state: CarouselState; +} + /** * Custom passthrough(pt) options. * @see {@link CarouselProps.pt} @@ -71,12 +86,9 @@ export interface CarouselPassThroughOptions { container?: CarouselPassThroughOptionType; /** * Used to pass attributes to the previous button's DOM element. + * @see {@link ButtonPassThroughOptions} */ - previousButton?: CarouselPassThroughOptionType; - /** - * Used to pass attributes to the previous button icon's DOM element. - */ - previousButtonIcon?: CarouselPassThroughOptionType; + previousButton?: ButtonPassThroughOptions; /** * Used to pass attributes to the items content's DOM element. */ @@ -95,12 +107,9 @@ export interface CarouselPassThroughOptions { item?: CarouselPassThroughOptionType; /** * Used to pass attributes to the next button's DOM element. + * @see {@link ButtonPassThroughOptions} */ - nextButton?: CarouselPassThroughOptionType; - /** - * Used to pass attributes to the next button icon's DOM element. - */ - nextButtonIcon?: CarouselPassThroughOptionType; + nextButton?: ButtonPassThroughOptions; /** * Used to pass attributes to the indicators's DOM element. */ @@ -288,13 +297,15 @@ export interface CarouselProps { */ showIndicators?: boolean | undefined; /** - * Used to pass all properties of the HTMLButtonElement to the previous navigation button. + * Used to pass attributes to the previous Button component. + * @defaultValue { severity: 'secondary', text: true, rounded: true } */ - prevButtonProps?: ButtonHTMLAttributes | undefined; + prevButtonProps?: object | undefined; /** - * Used to pass all properties of the HTMLButtonElement to the next navigation button. + * Used to pass attributes to the next Button component. + * @defaultValue { severity: 'secondary', text: true, rounded: true } */ - nextButtonProps?: ButtonHTMLAttributes | undefined; + nextButtonProps?: object | undefined; /** * It generates scoped CSS variables using design tokens for the component. */ diff --git a/components/lib/carousel/Carousel.vue b/components/lib/carousel/Carousel.vue index 3b9a3e0c5..d40302f4c 100755 --- a/components/lib/carousel/Carousel.vue +++ b/components/lib/carousel/Carousel.vue @@ -5,21 +5,23 @@
- + +
@@ -58,22 +60,23 @@
- - + +
  • @@ -99,6 +102,7 @@ diff --git a/components/lib/sidebar/BaseSidebar.vue b/components/lib/sidebar/BaseSidebar.vue index f8acee993..f36650cba 100644 --- a/components/lib/sidebar/BaseSidebar.vue +++ b/components/lib/sidebar/BaseSidebar.vue @@ -34,6 +34,12 @@ export default { type: Boolean, default: true }, + closeButtonProps: { + type: Object, + default: () => { + return { severity: 'secondary', text: true, rounded: true }; + } + }, closeIcon: { type: String, default: undefined diff --git a/components/lib/sidebar/Sidebar.d.ts b/components/lib/sidebar/Sidebar.d.ts index fc15776cf..7b4a110b2 100755 --- a/components/lib/sidebar/Sidebar.d.ts +++ b/components/lib/sidebar/Sidebar.d.ts @@ -9,6 +9,7 @@ */ import { TransitionProps, VNode } from 'vue'; import { ComponentHooks } from '../basecomponent'; +import { ButtonPassThroughOptions } from '../button'; import { PassThroughOptions } from '../passthrough'; import { ClassComponent, DesignToken, GlobalComponentConstructor, PassThrough } from '../ts-helpers'; @@ -46,6 +47,20 @@ export interface SidebarPassThroughMethodOptions { global: object | undefined; } +/** + * Custom shared passthrough(pt) option method. + */ +export interface SidebarSharedPassThroughMethodOptions { + /** + * Defines valid properties. + */ + props: SidebarProps; + /** + * Defines current inline state. + */ + state: SidebarState; +} + /** * Custom passthrough(pt) options. * @see {@link SidebarProps.pt} @@ -64,13 +79,10 @@ export interface SidebarPassThroughOptions { */ title?: SidebarPassThroughOptionType; /** - * Used to pass attributes to the close button's DOM element. + * Used to pass attributes to the previous button's DOM element. + * @see {@link ButtonPassThroughOptions} */ - closeButton?: SidebarPassThroughOptionType; - /** - * Used to pass attributes to the close icon's DOM element. - */ - closeIcon?: SidebarPassThroughOptionType; + toggler?: ButtonPassThroughOptions; /** * Used to pass attributes to the content's DOM element. */ @@ -146,6 +158,11 @@ export interface SidebarProps { * @defaultValue true */ showCloseIcon?: boolean | undefined; + /** + * Used to pass the custom value to read for the button inside the component. + * @defaultValue { severity: 'secondary', text: true, rounded: true } + */ + closeButtonProps?: object | undefined; /** * Icon to display in the sidebar close button. * @deprecated since v3.27.0. Use 'closeicon' slot. diff --git a/components/lib/sidebar/Sidebar.vue b/components/lib/sidebar/Sidebar.vue index 0ea45a489..5a6e2edac 100755 --- a/components/lib/sidebar/Sidebar.vue +++ b/components/lib/sidebar/Sidebar.vue @@ -9,11 +9,24 @@
    {{ header }}
    - +
@@ -26,6 +39,7 @@