Merge branch 'master' into issue-2948

pull/3847/head
Tuğçe Küçükoğlu 2023-05-11 15:14:03 +03:00
commit 53d7c04970
885 changed files with 47113 additions and 3600 deletions

View File

@ -12,6 +12,7 @@ permissions:
jobs: jobs:
build: build:
if: github.repository == 'primefaces/primevue' && github.ref == 'refs/heads/master'
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:

View File

@ -5,7 +5,7 @@ on:
branches: [master] branches: [master]
permissions: permissions:
contents: read contents: write
jobs: jobs:
build: build:
@ -16,10 +16,10 @@ jobs:
node-version: [16.x, 18.x] node-version: [16.x, 18.x]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }} - name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2 uses: actions/setup-node@v3
with: with:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node-version }}
cache: 'npm' cache: 'npm'
@ -31,19 +31,29 @@ jobs:
- name: Lint Check - name: Lint Check
if: ${{ success() }} if: ${{ success() }}
run: | run: |
npm run format:check npm run lint
- name: Code Format - name: Code Format Check
id: codeFormatCheck
if: ${{ success() }} if: ${{ success() }}
run: | run: |
npm run format:check npm run format:check
- name: Code Format
if: always() && steps.codeFormatCheck.outcome == 'failure'
run: |
npm run format
git config user.name "GitHub Actions Bot"
git config user.email "<>"
git commit -a -m "Code Format"
git push
- name: Security Check - name: Security Check
if: ${{ success() }} if: ${{ success() }}
run: | run: |
npm run security:check npm run security:check
#- name: Test - name: Unit Tests Check
# if: ${{ success() }} if: ${{ success() }}
# run: | run: |
# npm run test:unit npm run test:unit

View File

@ -44,6 +44,14 @@ jobs:
run: | run: |
npm run test:unit npm run test:unit
- name: Lint
run: |
npm run lint
- name: Security
run: |
npm run security:check
- name: Add Code Format Fail Comment - name: Add Code Format Fail Comment
if: always() && steps.codeFormat.outcome == 'failure' if: always() && steps.codeFormat.outcome == 'failure'
uses: thollander/actions-comment-pull-request@v1 uses: thollander/actions-comment-pull-request@v1

View File

@ -1,5 +1,53 @@
# Changelog # Changelog
## [3.28.0](https://github.com/primefaces/primevue/tree/3.28.0) (2023-05-02)
[Full Changelog](https://github.com/primefaces/primevue/compare/3.27.0...3.28.0)
**Implemented New Features and Enhancements:**
- New passthrough\(pt\) property implementation for Chart & FileUpload & Message Components [\#3911](https://github.com/primefaces/primevue/issues/3911)
- New passthrough\(pt\) property implementation for Menu Components [\#3907](https://github.com/primefaces/primevue/issues/3907)
- Button: No label [\#3905](https://github.com/primefaces/primevue/issues/3905)
- Add global `pt` option to PrimeVue config [\#3902](https://github.com/primefaces/primevue/issues/3902)
- New passthrough\(pt\) property implementation for Button Components [\#3889](https://github.com/primefaces/primevue/issues/3889)
- New passthrough\(pt\) property implementation for Overlay Components [\#3885](https://github.com/primefaces/primevue/issues/3885)
- New passthrough\(pt\) property implementation for Misc Components [\#3879](https://github.com/primefaces/primevue/issues/3879)
**Fixed bugs:**
- Message: wrong close icon size [\#3908](https://github.com/primefaces/primevue/issues/3908)
- Panel: Header accessibility issue [\#3904](https://github.com/primefaces/primevue/issues/3904)
- Calendar: Material theme icons not visible [\#3903](https://github.com/primefaces/primevue/issues/3903)
- Password: Incorrect onClick property as scope for custom icons [\#3900](https://github.com/primefaces/primevue/issues/3900)
- AutoComplete: class style and click event refactor on `removetokenicon` scoped slot [\#3899](https://github.com/primefaces/primevue/issues/3899)
- Dropdown: Selection is not working correctly with falsy values [\#3891](https://github.com/primefaces/primevue/issues/3891)
## [3.27.0](https://github.com/primefaces/primevue/tree/3.27.0) (2023-04-19)
[Full Changelog](https://github.com/primefaces/primevue/compare/3.26.1...3.27.0)
**Implemented New Features and Enhancements:**
- Add icon templating support to components [\#3833](https://github.com/primefaces/primevue/issues/3833)
- Improve icon implementation in core [\#3832](https://github.com/primefaces/primevue/issues/3832)
- Add new Icon components [\#3829](https://github.com/primefaces/primevue/issues/3829)
- Panel: Footer Templating [\#3820](https://github.com/primefaces/primevue/issues/3820)
- AutoComplete: NumpadEnter is not recognised [\#3816](https://github.com/primefaces/primevue/issues/3816)
- Calendar: Emit year-change event via navBackward and navForward [\#3811](https://github.com/primefaces/primevue/issues/3811)
- New passthrough\(pt\) property implementation for Panel Components [\#3797](https://github.com/primefaces/primevue/issues/3797)
- Galleria: Play and Pause [\#3619](https://github.com/primefaces/primevue/issues/3619)
**Fixed bugs:**
- TabView: Scrollable Starting/Ending Nav Arrow Blocks First/Last Tab [\#3849](https://github.com/primefaces/primevue/issues/3849)
- DataTable Filter with Calendar is not showing in proper location [\#3632](https://github.com/primefaces/primevue/issues/3632)
**Deprecated:**
- Deprecated `indicator` slot [\#3871](https://github.com/primefaces/primevue/issues/3871)
- FullCalendar: Deprecated component [\#3827](https://github.com/primefaces/primevue/issues/3827)
## [3.26.1](https://github.com/primefaces/primevue/tree/3.26.1) (2023-03-27) ## [3.26.1](https://github.com/primefaces/primevue/tree/3.26.1) (2023-03-27)
[Full Changelog](https://github.com/primefaces/primevue/compare/3.26.0...3.26.1) [Full Changelog](https://github.com/primefaces/primevue/compare/3.26.0...3.26.1)

View File

@ -15,10 +15,10 @@ PrimeVue is available at [npm](https://www.npmjs.com/package/primevue).
```` ````
// with npm // with npm
npm install primevue primeicons npm install primevue
// with yarn // with yarn
yarn add primevue primeicons yarn add primevue
```` ````
## Plugin ## Plugin
@ -44,16 +44,13 @@ import 'primevue/resources/themes/lara-light-blue/theme.css';
// core // core
import 'primevue/resources/primevue.min.css'; import 'primevue/resources/primevue.min.css';
// icons
import 'primeicons/primeicons.css';
``` ```
Each PrimeVue theme has its own font family so it is suggested to apply it to your application for a unified look. Each PrimeVue theme has its own font family so it is suggested to apply it to your application for a unified look.
``` ```
body { body {
font-family: (--font-family); font-family: var(--font-family);
} }
``` ```
@ -96,12 +93,11 @@ Open the nuxt configuration file and add the css dependencies.
export default defineNuxtConfig({ export default defineNuxtConfig({
css: [ css: [
"primevue/resources/themes/lara-light-blue/theme.css", "primevue/resources/themes/lara-light-blue/theme.css",
"primevue/resources/primevue.css", "primevue/resources/primevue.css"
"primeicons/primeicons.css"
], ],
build: { build: {
transpile: ["primevue"] transpile: ["primevue"]
} }
}) })
``` ```

View File

@ -250,6 +250,12 @@ const AutoCompleteProps = [
type: 'string', type: 'string',
default: 'null', default: 'null',
description: 'Identifier of the underlying input element.' description: 'Identifier of the underlying input element.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];

View File

@ -28,6 +28,19 @@ const AvatarProps = [
type: 'string', type: 'string',
default: 'square', default: 'square',
description: 'Shape of the element, valid options are "square" and "circle".' description: 'Shape of the element, valid options are "square" and "circle".'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
}
];
const AvatarSlots = [
{
name: 'icon',
description: 'Custom icon template.'
} }
]; ];
@ -43,6 +56,7 @@ module.exports = {
name: 'Avatar', name: 'Avatar',
description: 'Avatar represents people using icons, labels and images.', description: 'Avatar represents people using icons, labels and images.',
props: AvatarProps, props: AvatarProps,
slots: AvatarSlots,
events: AvatarEvents events: AvatarEvents
} }
}; };

View File

@ -1,7 +1,47 @@
const AvatarGroupProps = [
{
name: 'label',
type: 'string',
default: 'null',
description: 'Defines the text to display.'
},
{
name: 'icon',
type: 'string',
default: 'null',
description: 'Defines the icon to display.'
},
{
name: 'image',
type: 'string',
default: 'null',
description: 'Defines the image to display.'
},
{
name: 'size',
type: 'string',
default: 'null',
description: 'Size of the element, valid options are "large" and "xlarge".'
},
{
name: 'shape',
type: 'string',
default: 'square',
description: 'Shape of the element, valid options are "square" and "circle".'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
}
];
module.exports = { module.exports = {
avatargroup: { avatargroup: {
name: 'AvatarGroup', name: 'AvatarGroup',
'doc-url': 'avatar', 'doc-url': 'avatar',
description: 'A set of Avatars can be displayed together using the AvatarGroup component.' description: 'A set of Avatars can be displayed together using the AvatarGroup component.',
props: AvatarGroupProps
} }
}; };

View File

@ -16,6 +16,12 @@ const BadgeProps = [
type: 'string', type: 'string',
default: 'null', default: 'null',
description: 'Size of the badge, valid options are "large" and "xlarge".' description: 'Size of the badge, valid options are "large" and "xlarge".'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];

View File

@ -22,6 +22,12 @@ const BlockUIProps = [
type: 'boolean', type: 'boolean',
default: 'true', default: 'true',
description: 'Whether to automatically manage layering.' description: 'Whether to automatically manage layering.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];

View File

@ -16,6 +16,12 @@ const BreadcrumbProps = [
type: 'boolean', type: 'boolean',
default: 'true', default: 'true',
description: "Whether to apply 'router-link-active-exact' class if route exactly matches the item path." description: "Whether to apply 'router-link-active-exact' class if route exactly matches the item path."
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];
@ -27,6 +33,10 @@ const BreadcrumbSlots = [
{ {
name: 'separator', name: 'separator',
description: 'Custom separator template.' description: 'Custom separator template.'
},
{
name: 'itemicon',
description: 'Custom item icon template.'
} }
]; ];

View File

@ -94,6 +94,25 @@ const ButtonProps = [
type: 'boolean', type: 'boolean',
default: 'false', default: 'false',
description: 'Add a plain textual class to the button without a background initially.' description: 'Add a plain textual class to the button without a background initially.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
}
];
const ButtonEvents = [];
const ButtonSlots = [
{
name: 'icon',
description: 'Custom icon template.'
},
{
name: 'loadingicon',
description: 'Custom loading icon template.'
} }
]; ];
@ -101,6 +120,8 @@ module.exports = {
button: { button: {
name: 'Button', name: 'Button',
description: 'Button is an extension to standard button element with icons and theming.', description: 'Button is an extension to standard button element with icons and theming.',
props: ButtonProps props: ButtonProps,
events: ButtonEvents,
slots: ButtonSlots
} }
}; };

View File

@ -316,6 +316,12 @@ const CalendarProps = [
type: 'object', type: 'object',
default: 'null', default: 'null',
description: 'Uses to pass all properties of the HTMLDivElement to the overlay panel inside the component.' description: 'Uses to pass all properties of the HTMLDivElement to the overlay panel inside the component.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];
@ -462,11 +468,11 @@ const CalendarSlots = [
description: 'Custom content for the calendar decade.' description: 'Custom content for the calendar decade.'
}, },
{ {
name: 'triggericon', name: 'dropdownicon',
description: 'Custom trigger icon template.' description: 'Custom dropdown icon template.'
}, },
{ {
name: 'previcon', name: 'previousicon',
description: 'Custom previous icon template.' description: 'Custom previous icon template.'
}, },
{ {

View File

@ -82,10 +82,20 @@ const CarouselProps = [
type: 'boolean', type: 'boolean',
default: 'true', default: 'true',
description: 'Whether to display indicator container.' description: 'Whether to display indicator container.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];
const CarouselSlots = [ const CarouselSlots = [
{
name: 'header',
description: 'Custom content for the component header.'
},
{ {
name: 'header', name: 'header',
description: 'Custom content for the component header.' description: 'Custom content for the component header.'
@ -99,7 +109,7 @@ const CarouselSlots = [
description: 'Custom content for the component item.' description: 'Custom content for the component item.'
}, },
{ {
name: 'previcon', name: 'previousicon',
description: 'Custom previous icon template.' description: 'Custom previous icon template.'
}, },
{ {

View File

@ -184,6 +184,12 @@ const CascadeSelectProps = [
type: 'string', type: 'string',
default: 'null', default: 'null',
description: 'Identifier of the underlying input element.' description: 'Identifier of the underlying input element.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];
@ -284,6 +290,14 @@ const CascadeSelectSlots = [
name: 'indicator', name: 'indicator',
description: 'Custom content for the dropdown indicator.' description: 'Custom content for the dropdown indicator.'
}, },
{
name: 'dropdownicon',
description: 'Custom dropdown icon template.'
},
{
name: 'loadingicon',
description: 'Custom loading icon template.'
},
{ {
name: 'optiongroupicon', name: 'optiongroupicon',
description: 'Custom content for the option group icon.' description: 'Custom content for the option group icon.'

View File

@ -34,6 +34,12 @@ const ChartProps = [
type: 'number', type: 'number',
default: '150', default: '150',
description: 'Height of the chart in non-responsive mode.' description: 'Height of the chart in non-responsive mode.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];

View File

@ -88,6 +88,12 @@ const CheckboxProps = [
type: 'string', type: 'string',
default: 'null', default: 'null',
description: 'Used to define a string that labels the element.' description: 'Used to define a string that labels the element.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];

View File

@ -28,6 +28,12 @@ const ChipProps = [
type: 'string', type: 'string',
default: 'pi pi-times-circle', default: 'pi pi-times-circle',
description: 'Icon of the remove element.' description: 'Icon of the remove element.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];
@ -45,11 +51,23 @@ const ChipEvents = [
} }
]; ];
const ChipSlots = [
{
name: 'icon',
description: 'Custom icon template of chip component.'
},
{
name: 'removeicon',
description: 'Custom remove icon template of chip component.'
}
];
module.exports = { module.exports = {
chip: { chip: {
name: 'Chip', name: 'Chip',
description: 'Chip represents entities using icons, labels and images', description: 'Chip represents entities using icons, labels and images',
props: ChipProps, props: ChipProps,
events: ChipEvents events: ChipEvents,
slots: ChipSlots
} }
}; };

View File

@ -64,6 +64,12 @@ const ChipsProps = [
type: 'object', type: 'object',
default: 'null', default: 'null',
description: 'Uses to pass all properties of the HTMLInputElement to the focusable input element inside the component.' description: 'Uses to pass all properties of the HTMLInputElement to the focusable input element inside the component.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];

View File

@ -70,6 +70,12 @@ const ColorPickerProps = [
type: 'string', type: 'string',
default: 'null', default: 'null',
description: 'Used to define a string that labels the element.' description: 'Used to define a string that labels the element.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];

View File

@ -250,6 +250,12 @@ const ColumnProps = [
type: 'boolean', type: 'boolean',
default: 'false', default: 'false',
description: 'Whether the column is rendered.' description: 'Whether the column is rendered.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];
@ -289,6 +295,62 @@ const ColumnSlots = [
{ {
name: 'filterapply', name: 'filterapply',
description: "Custom content for the filter menu's apply section" description: "Custom content for the filter menu's apply section"
},
{
name: 'loading',
description: 'Custom loading template.'
},
{
name: 'rowtogglericon',
description: 'Custom row toggler icon template.'
},
{
name: 'rowtogglericon',
description: 'Custom row toggler icon template.'
},
{
name: 'rowcheckboxicon',
description: 'Custom row checkbox icon template.'
},
{
name: 'roweditoriniticon',
description: 'Custom row editor init icon template.'
},
{
name: 'roweditorsaveicon',
description: 'Custom row editor save icon template.'
},
{
name: 'roweditorcancelicon',
description: 'Custom row editor cancel icon template.'
},
{
name: 'filtericon',
description: 'Custom filter icon template.'
},
{
name: 'filterclearicon',
description: 'Custom filter clear icon template.'
},
{
name: 'filterremoveicon',
description: 'Custom filter remove icon template.'
},
{
name: 'filteraddicon',
description: 'Custom filter add icon template.'
},
{
name: 'sorticon',
description: 'Custom sort icon template.'
},
{
name: 'headercheckboxicon',
description: 'Custom header checkbox icon template.'
},
{
name: 'rowreordericon',
description: 'Custom row reorder icon template.'
} }
]; ];

View File

@ -1,7 +1,23 @@
const ColumnGroupProps = [
{
name: 'type',
type: 'string',
default: 'null',
description: 'Defines the type of the group.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
}
];
module.exports = { module.exports = {
columngroup: { columngroup: {
name: 'ColumnGroup', name: 'ColumnGroup',
description: 'Columns can be grouped at header and footer sections by defining a ColumnGroup with nested rows and columns', description: 'Columns can be grouped at header and footer sections by defining a ColumnGroup with nested rows and columns',
'doc-url': 'datatable' 'doc-url': 'datatable',
props: ColumnGroupProps
} }
}; };

View File

@ -16,13 +16,31 @@ const ConfirmDialogProps = [
type: 'boolean', type: 'boolean',
default: 'true', default: 'true',
description: 'Whether the dialog can be relocated by dragging.' description: 'Whether the dialog can be relocated by dragging.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];
const ConfirmDialogSlots = [ const ConfirmDialogSlots = [
{ {
name: 'message', name: 'message',
description: 'Custom content for the component.' description: 'Custom icon template.'
},
{
name: 'icon',
description: 'Custom icon template.'
},
{
name: 'accepticon',
description: 'Custom accept icon template.'
},
{
name: 'rejecticon',
description: 'Custom reject icon template.'
} }
]; ];

View File

@ -4,6 +4,12 @@ const ConfirmPopupProps = [
type: 'string', type: 'string',
default: 'null', default: 'null',
description: 'Optional key to match the key of the confirmation, useful to target a specific confirm dialog instance.' description: 'Optional key to match the key of the confirmation, useful to target a specific confirm dialog instance.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];
@ -11,6 +17,18 @@ const ConfirmPopupSlots = [
{ {
name: 'message', name: 'message',
description: 'Custom content for the component.' description: 'Custom content for the component.'
},
{
name: 'icon',
description: 'Custom icon template.'
},
{
name: 'accepticon',
description: 'Custom accept icon template.'
},
{
name: 'rejecticon',
description: 'Custom reject icon template.'
} }
]; ];

View File

@ -34,6 +34,12 @@ const ContextMenuProps = [
type: 'boolean', type: 'boolean',
default: 'true', default: 'true',
description: "Whether to apply 'router-link-active-exact' class if route exactly matches the item path." description: "Whether to apply 'router-link-active-exact' class if route exactly matches the item path."
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];
@ -45,6 +51,10 @@ const ContextMenuSlots = [
{ {
name: 'submenuicon', name: 'submenuicon',
description: 'Custom submenu icon template.' description: 'Custom submenu icon template.'
},
{
name: 'itemicon',
description: 'Custom item icon template.'
} }
]; ];

View File

@ -377,6 +377,12 @@ const DataTableProps = [
type: 'string', type: 'string',
default: 'null', default: 'null',
description: 'Style class of the table element.' description: 'Style class of the table element.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];
@ -1120,31 +1126,67 @@ const DataTableEvents = [
const DataTableSlots = [ const DataTableSlots = [
{ {
name: 'header', name: 'header',
description: "Custom content for the component's header" description: "Custom content for the component's header."
}, },
{ {
name: 'paginatorstart', name: 'paginatorstart',
description: "Custom content for the component paginator's left side" description: "Custom content for the component paginator's left side."
}, },
{ {
name: 'paginatorend', name: 'paginatorend',
description: "Custom content for the component paginator's right side" description: "Custom content for the component paginator's right side."
}, },
{ {
name: 'footer', name: 'footer',
description: "Custom content for the component's footer" description: "Custom content for the component's footer."
}, },
{ {
name: 'groupheader', name: 'groupheader',
description: "Custom content for the component's subgroup header" description: "Custom content for the component's subgroup header."
}, },
{ {
name: 'groupfooter', name: 'groupfooter',
description: "Custom content for the component's subgroup footer" description: "Custom content for the component's subgroup footer."
}, },
{ {
name: 'expansion', name: 'loading',
description: "Custom content for the component's expanded content" description: 'Custom loading template.'
},
{
name: 'loadingicon',
description: 'Custom loading icon template.'
},
{
name: 'reorderindicatorupicon',
description: 'Custom reorder indicator up icon template.'
},
{
name: 'reorderindicatordownicon',
description: 'Custom reorder indicator down icon template.'
},
{
name: 'rowgrouptogglericon',
description: 'Custom rowgroup toggler icon template.'
},
{
name: 'paginatorfirstpagelinkicon',
description: 'Custom paginator first page link icon template.'
},
{
name: 'paginatorprevpagelinkicon',
description: 'Custom paginator prev page link icon template.'
},
{
name: 'paginatornextpagelinkicon',
description: 'Custom paginator next page link icon template.'
},
{
name: 'paginatorlastpagelinkicon',
description: 'Custom paginator last page link icon template.'
},
{
name: 'empty',
description: 'Custom empty template.'
} }
]; ];

View File

@ -94,6 +94,12 @@ const DataViewProps = [
type: 'string', type: 'string',
default: 'null', default: 'null',
description: 'Name of the data that uniquely identifies the a record in the data.' description: 'Name of the data that uniquely identifies the a record in the data.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];

View File

@ -4,6 +4,12 @@ const DataViewLayoutOptionsProps = [
type: 'string', type: 'string',
default: 'null', default: 'null',
description: 'Value of the component.' description: 'Value of the component.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];

View File

@ -130,6 +130,12 @@ const DialogProps = [
type: 'string', type: 'string',
default: 'body', default: 'body',
description: 'A valid query selector or an HTMLElement to specify where the dialog gets attached. Special keywords are "body" for document body and "self" for the element itself.' description: 'A valid query selector or an HTMLElement to specify where the dialog gets attached. Special keywords are "body" for document body and "self" for the element itself.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];
@ -189,6 +195,14 @@ const DialogSlots = [
{ {
name: 'footer', name: 'footer',
description: "Custom content for the component's footer" description: "Custom content for the component's footer"
},
{
name: 'closeicon',
description: 'Custom close icon template.'
},
{
name: 'maximizeicon',
description: 'Custom maximizeicon icon template of dialog.'
} }
]; ];

View File

@ -34,6 +34,12 @@ const DockProps = [
type: 'object', type: 'object',
default: 'null', default: 'null',
description: "Whether to display the tooltip on items. The modifiers of tooltip can be used like an object in it. Valid keys are 'event' and 'position'." description: "Whether to display the tooltip on items. The modifiers of tooltip can be used like an object in it. Valid keys are 'event' and 'position'."
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];

View File

@ -256,6 +256,12 @@ const DropdownProps = [
type: 'string', type: 'string',
default: 'null', default: 'null',
description: 'Identifier of the underlying input element.' description: 'Identifier of the underlying input element.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];
@ -372,6 +378,22 @@ const DropdownSlots = [
{ {
name: 'loader', name: 'loader',
description: 'Custom content for the virtual scroller loader items' description: 'Custom content for the virtual scroller loader items'
},
{
name: 'clearicon',
description: 'Custom clear icon template.'
},
{
name: 'dropdownicon',
description: 'Custom dropdown icon template.'
},
{
name: 'loadingicon',
description: 'Custom loading icon template.'
},
{
name: 'filtericon',
description: 'Custom filter icon template.'
} }
]; ];

View File

@ -34,6 +34,12 @@ const EditorProps = [
type: 'object', type: 'object',
default: 'null', default: 'null',
description: 'Modules configuration, see <a href="http://quilljs.com/docs/modules/">here</a> for available options.' description: 'Modules configuration, see <a href="http://quilljs.com/docs/modules/">here</a> for available options.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];

View File

@ -142,6 +142,12 @@ const FileUploadProps = [
type: 'string', type: 'string',
default: 'null', default: 'null',
description: 'Style class of the component.' description: 'Style class of the component.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];
@ -276,9 +282,33 @@ const FileUploadEvents = [
]; ];
const FileUploadSlots = [ const FileUploadSlots = [
{
name: 'header',
description: 'Custom header template.'
},
{
name: 'content',
description: 'Custom content template.'
},
{ {
name: 'empty', name: 'empty',
description: 'Custom content when there is no selected file' description: 'Custom content when there is no selected file'
},
{
name: 'chooseicon',
description: 'Custom choose icon template.'
},
{
name: 'uploadicon',
description: 'Custom upload icon template.'
},
{
name: 'cancelicon',
description: 'Custom cancel icon template.'
},
{
name: 'fileremoveicon',
description: 'Custom remove icon template for each file.'
} }
]; ];

View File

@ -142,6 +142,12 @@ const GalleriaProps = [
type: 'any', type: 'any',
default: 'null', default: 'null',
description: "Style class of the component on fullscreen mode. Otherwise, the 'class' property can be used." description: "Style class of the component on fullscreen mode. Otherwise, the 'class' property can be used."
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];
@ -175,7 +181,7 @@ const GalleriaSlots = [
description: 'Custom close icon template.' description: 'Custom close icon template.'
}, },
{ {
name: 'previtemicon', name: 'previousitemicon',
description: 'Custom navigator previous item icon template.' description: 'Custom navigator previous item icon template.'
}, },
{ {
@ -183,7 +189,7 @@ const GalleriaSlots = [
description: 'Custom navigator next item icon template.' description: 'Custom navigator next item icon template.'
}, },
{ {
name: 'prevthumbnailicon', name: 'previousthumbnailicon',
description: 'Custom thumbnail previous icon template.' description: 'Custom thumbnail previous icon template.'
}, },
{ {

View File

@ -22,6 +22,12 @@ const ImageProps = [
type: 'boolean', type: 'boolean',
default: 'false', default: 'false',
description: 'Disable the zoom-out button' description: 'Disable the zoom-out button'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];
@ -64,6 +70,14 @@ const ImageSlots = [
{ {
name: 'close', name: 'close',
description: 'Custom content for the component close.' description: 'Custom content for the component close.'
},
{
name: 'image',
description: 'Custom content for the component image.'
},
{
name: 'preview',
description: 'Custom content for the component preview.'
} }
]; ];

View File

@ -10,13 +10,19 @@ const InlineMessageProps = [
type: 'string', type: 'string',
default: 'undefined', default: 'undefined',
description: 'Display a custom icon for the message.' description: 'Display a custom icon for the message.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];
const MessageSlots = [ const MessageSlots = [
{ {
name: 'messageicon', name: 'icon',
description: 'Custom message icon template.' description: 'Custom icon template.'
} }
]; ];

View File

@ -16,6 +16,12 @@ const InplaceProps = [
type: 'boolean', type: 'boolean',
default: 'false', default: 'false',
description: 'When present, it specifies that the element should be disabled.' description: 'When present, it specifies that the element should be disabled.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];
@ -47,11 +53,15 @@ const InplaceEvents = [
const InplaceSlots = [ const InplaceSlots = [
{ {
name: 'display', name: 'display',
description: 'Output content' description: 'Custom display template.'
}, },
{ {
name: 'content', name: 'content',
description: 'Actual content' description: 'Custom content template.'
},
{
name: 'closeicon',
description: 'Custom close icon template.'
} }
]; ];

View File

@ -28,6 +28,12 @@ const InputMaskProps = [
type: 'boolean', type: 'boolean',
default: 'false', default: 'false',
description: 'Defines if model sets the raw unmasked value to bound value or the formatted mask value.' description: 'Defines if model sets the raw unmasked value to bound value or the formatted mask value.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];

View File

@ -182,6 +182,12 @@ const InputNumberProps = [
type: 'object', type: 'object',
default: 'null', default: 'null',
description: 'Uses to pass all properties of the HTMLButtonElement to decrement button inside the component.' description: 'Uses to pass all properties of the HTMLButtonElement to decrement button inside the component.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];

View File

@ -40,6 +40,12 @@ const InputSwitchProps = [
type: 'object', type: 'object',
default: 'null', default: 'null',
description: 'Uses to pass all properties of the HTMLInputElement to the focusable input element inside the component.' description: 'Uses to pass all properties of the HTMLInputElement to the focusable input element inside the component.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];

View File

@ -4,6 +4,12 @@ const InputTextProps = [
type: 'any', type: 'any',
default: 'null', default: 'null',
description: 'Value of the component.' description: 'Value of the component.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];

View File

@ -94,6 +94,12 @@ const KnobProps = [
type: 'string', type: 'string',
default: 'null', default: 'null',
description: 'Used to define a string that labels the element.' description: 'Used to define a string that labels the element.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];

View File

@ -173,6 +173,12 @@ const ListboxProps = [
type: 'string', type: 'string',
default: 'null', default: 'null',
description: 'Identifier of the underlying input element.' description: 'Identifier of the underlying input element.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];

View File

@ -16,6 +16,12 @@ const MegaMenuProps = [
type: 'boolean', type: 'boolean',
default: 'true', default: 'true',
description: "Whether to apply 'router-link-active-exact' class if route exactly matches the item path." description: "Whether to apply 'router-link-active-exact' class if route exactly matches the item path."
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];
@ -35,6 +41,10 @@ const MegaMenuSlots = [
{ {
name: 'submenuicon', name: 'submenuicon',
description: 'Custom submenu icon template.' description: 'Custom submenu icon template.'
},
{
name: 'itemicon',
description: 'Custom item icon template.'
} }
]; ];

View File

@ -34,6 +34,12 @@ const MenuProps = [
type: 'boolean', type: 'boolean',
default: 'true', default: 'true',
description: "Whether to apply 'router-link-active-exact' class if route exactly matches the item path." description: "Whether to apply 'router-link-active-exact' class if route exactly matches the item path."
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];
@ -60,6 +66,10 @@ const MenuSlots = [
{ {
name: 'item', name: 'item',
description: 'Template of a menuitem.' description: 'Template of a menuitem.'
},
{
name: 'itemicon',
description: 'Custom item icon template.'
} }
]; ];

View File

@ -10,6 +10,12 @@ const MenubarProps = [
type: 'boolean', type: 'boolean',
default: 'true', default: 'true',
description: "Whether to apply 'router-link-active-exact' class if route exactly matches the item path." description: "Whether to apply 'router-link-active-exact' class if route exactly matches the item path."
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];
@ -33,6 +39,10 @@ const MenubarSlots = [
{ {
name: 'submenuicon', name: 'submenuicon',
description: 'Custom submenu icon template.' description: 'Custom submenu icon template.'
},
{
name: 'itemicon',
description: 'Custom item icon template.'
} }
]; ];

View File

@ -34,6 +34,12 @@ const MessageProps = [
type: 'string', type: 'string',
default: 'undefined', default: 'undefined',
description: 'Display a custom close icon for the message.' description: 'Display a custom close icon for the message.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];

View File

@ -292,6 +292,12 @@ const MultiSelectProps = [
type: 'string', type: 'string',
default: 'null', default: 'null',
description: 'Identifier of the underlying input element.' description: 'Identifier of the underlying input element.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];
@ -448,6 +454,14 @@ const MultiSelectSlots = [
{ {
name: 'itemcheckboxicon', name: 'itemcheckboxicon',
description: 'Custom item checkbox icon template.' description: 'Custom item checkbox icon template.'
},
{
name: 'loadingicon',
description: 'Custom loading icon template.'
},
{
name: 'dropdownicon',
description: 'Custom dropdown icon template.'
} }
]; ];

View File

@ -47,6 +47,12 @@ const OrderListProps = [
type: 'boolean', type: 'boolean',
default: 'false', default: 'false',
description: 'Whether to displays rows with alternating colors.' description: 'Whether to displays rows with alternating colors.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];

View File

@ -28,6 +28,12 @@ const OrganizationChartProps = [
type: 'object', type: 'object',
default: 'null', default: 'null',
description: 'A map instance of key-value pairs to represented the collapsed nodes.' description: 'A map instance of key-value pairs to represented the collapsed nodes.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];

View File

@ -46,6 +46,12 @@ const OverlayPanelProps = [
type: 'string', type: 'string',
default: 'undefined', default: 'undefined',
description: 'Display a custom close icon for the message.' description: 'Display a custom close icon for the message.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];

View File

@ -46,6 +46,12 @@ const PaginatorProps = [
type: 'boolean', type: 'boolean',
default: 'true', default: 'true',
description: 'Whether to show the paginator even there is only one page.' description: 'Whether to show the paginator even there is only one page.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];
@ -80,11 +86,11 @@ const PaginatorEvents = [
const PaginatorSlots = [ const PaginatorSlots = [
{ {
name: 'left', name: 'start',
description: "Custom content for the component's left side." description: "Custom content for the component's left side."
}, },
{ {
name: 'right', name: 'end',
description: "Custom content for the component's right side." description: "Custom content for the component's right side."
}, },
{ {

View File

@ -16,6 +16,12 @@ const PanelMenuProps = [
type: 'boolean', type: 'boolean',
default: 'true', default: 'true',
description: "Whether to apply 'router-link-active-exact' class if route exactly matches the item path." description: "Whether to apply 'router-link-active-exact' class if route exactly matches the item path."
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];
@ -27,6 +33,14 @@ const PanelMenuSlots = [
{ {
name: 'submenuicon', name: 'submenuicon',
description: 'Custom submenu icon template.' description: 'Custom submenu icon template.'
},
{
name: 'headericon',
description: 'Custom header icon template.'
},
{
name: 'itemicon',
description: 'Custom item icon template.'
} }
]; ];

View File

@ -136,6 +136,12 @@ const PasswordProps = [
type: 'object', type: 'object',
default: 'null', default: 'null',
description: 'Uses to pass all properties of the HTMLDivElement to the overlay panel inside the component.' description: 'Uses to pass all properties of the HTMLDivElement to the overlay panel inside the component.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];

View File

@ -59,6 +59,12 @@ const PickListProps = [
type: 'boolean', type: 'boolean',
default: 'true', default: 'true',
description: 'Whether to show buttons of target list.' description: 'Whether to show buttons of target list.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];
@ -172,6 +178,10 @@ const PickListEvents = [
]; ];
const PickListSlots = [ const PickListSlots = [
{
name: 'header',
description: 'Custom header template.'
},
{ {
name: 'sourceheader', name: 'sourceheader',
description: "Custom content for the component's source header." description: "Custom content for the component's source header."

View File

@ -16,6 +16,12 @@ const ProgressbarProps = [
type: 'boolean', type: 'boolean',
default: 'true', default: 'true',
description: 'Whether to display the progress bar value.' description: 'Whether to display the progress bar value.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];

View File

@ -16,6 +16,12 @@ const ProgressSpinnerProps = [
type: 'string', type: 'string',
default: '2s', default: '2s',
description: 'Duration of the rotate animation.' description: 'Duration of the rotate animation.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];

View File

@ -58,6 +58,12 @@ const RadioButtonProps = [
type: 'string', type: 'string',
default: 'null', default: 'null',
description: 'Used to define a string that labels the element.' description: 'Used to define a string that labels the element.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];

View File

@ -46,6 +46,27 @@ const RatingProps = [
type: 'string', type: 'string',
default: 'null', default: 'null',
description: 'Icon for the cancelable state.' description: 'Icon for the cancelable state.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
}
];
const RatingSlots = [
{
name: 'cancelicon',
description: 'Custom cancel icon template.'
},
{
name: 'onicon',
description: 'Custom on icon template.'
},
{
name: 'officon',
description: 'Custom off icon template.'
} }
]; ];
@ -73,6 +94,7 @@ module.exports = {
name: 'rating', name: 'rating',
description: 'Rating component is a star based selection input.', description: 'Rating component is a star based selection input.',
props: RatingProps, props: RatingProps,
slots: RatingSlots,
events: RatingEvents events: RatingEvents
} }
}; };

View File

@ -1,7 +1,23 @@
const RowProps = [
{
name: 'type',
type: 'string',
default: 'null',
description: 'Defines the type of the group.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
}
];
module.exports = { module.exports = {
row: { row: {
name: 'Row', name: 'Row',
description: 'DataTable can be grouped by defining a Row component with nested columns', description: 'DataTable can be grouped by defining a Row component with nested columns',
'doc-url': 'datatable' 'doc-url': 'datatable',
props: RowProps
} }
}; };

View File

@ -22,6 +22,12 @@ const ScrollTopProps = [
type: 'string', type: 'string',
default: 'smooth', default: 'smooth',
description: 'Defines the scrolling behavi, "smooth" adds an animation and "auto" scrolls with a jump.' description: 'Defines the scrolling behavi, "smooth" adds an animation and "auto" scrolls with a jump.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];

View File

@ -58,6 +58,12 @@ const SelectButtonProps = [
type: 'string', type: 'string',
default: 'null', default: 'null',
description: 'Identifier of the underlying element.' description: 'Identifier of the underlying element.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];

View File

@ -58,6 +58,12 @@ const SidebarProps = [
type: 'string', type: 'string',
default: 'undefined', default: 'undefined',
description: 'Icon to display in the sidebar close button.' description: 'Icon to display in the sidebar close button.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];
@ -80,6 +86,10 @@ const SidebarSlots = [
{ {
name: 'header', name: 'header',
description: 'Custom content for the component header.' description: 'Custom content for the component header.'
},
{
name: 'closeicon',
description: 'Custom close icon template.'
} }
]; ];

View File

@ -34,6 +34,12 @@ const SkeletonProps = [
type: 'string', type: 'string',
default: 'wave', default: 'wave',
description: 'Type of the animation, valid options are "wave" and "none".' description: 'Type of the animation, valid options are "wave" and "none".'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];

View File

@ -58,6 +58,12 @@ const SliderProps = [
type: 'string', type: 'string',
default: 'null', default: 'null',
description: 'Used to define a string that labels the element.' description: 'Used to define a string that labels the element.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];

View File

@ -106,6 +106,12 @@ const SpeedDialProps = [
type: 'object', type: 'object',
default: 'null', default: 'null',
description: "Whether to display the tooltip on items. The modifiers of tooltip can be used like an object in it. Valid keys are 'event' and 'position'." description: "Whether to display the tooltip on items. The modifiers of tooltip can be used like an object in it. Valid keys are 'event' and 'position'."
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];
@ -137,8 +143,12 @@ const SpeedDialSlots = [
description: 'Custom content for the item' description: 'Custom content for the item'
}, },
{ {
name: 'toggle', name: 'button',
description: 'toggle: toggle metadata' description: 'Custom button template.'
},
{
name: 'icon',
description: 'Custom icon template.'
} }
]; ];

View File

@ -100,6 +100,12 @@ const SplitButtonProps = [
type: 'boolean', type: 'boolean',
default: 'false', default: 'false',
description: 'Add a plain textual class to the button without a background initially.' description: 'Add a plain textual class to the button without a background initially.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];
@ -117,11 +123,23 @@ const SplitButtonEvents = [
} }
]; ];
const SplitButtonSlots = [
{
name: 'icon',
description: 'Custom icon template.'
},
{
name: 'menubuttonicon',
description: 'Custom menu button icon template.'
}
];
module.exports = { module.exports = {
splitbutton: { splitbutton: {
name: 'SplitButton', name: 'SplitButton',
description: 'SplitButton groups a set of commands in an overlay with a default command.', description: 'SplitButton groups a set of commands in an overlay with a default command.',
props: SplitButtonProps, props: SplitButtonProps,
events: SplitButtonEvents events: SplitButtonEvents,
slots: SplitButtonSlots
} }
}; };

View File

@ -22,6 +22,12 @@ const StepsProps = [
type: 'boolean', type: 'boolean',
default: 'true', default: 'true',
description: "Whether to apply 'router-link-active-exact' class if route exactly matches the item path." description: "Whether to apply 'router-link-active-exact' class if route exactly matches the item path."
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];

View File

@ -16,6 +16,12 @@ const TabMenuProps = [
type: 'number', type: 'number',
default: '0', default: '0',
description: 'Active index of menuitem.' description: 'Active index of menuitem.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];
@ -42,6 +48,10 @@ const TabMenuSlots = [
{ {
name: 'item', name: 'item',
description: 'Template of a menuitem.' description: 'Template of a menuitem.'
},
{
name: 'itemicon',
description: 'Custom item icon template.'
} }
]; ];

View File

@ -41,6 +41,18 @@ const TabViewProps = [
default: 'null', default: 'null',
description: 'Uses to pass all properties of the HTMLButtonElement to the next button.' description: 'Uses to pass all properties of the HTMLButtonElement to the next button.'
}, },
{
name: 'prevIcon',
type: 'string',
default: 'null',
description: 'Prev icon of the scrollable tabview.'
},
{
name: 'nextIcon',
type: 'string',
default: 'null',
description: 'Next icon of the scrollable tabview.'
},
{ {
name: 'pt', name: 'pt',
type: 'any', type: 'any',

View File

@ -22,6 +22,19 @@ const TagProps = [
type: 'string', type: 'string',
default: 'null', default: 'null',
description: 'Icon of the tag to display next to the value.' description: 'Icon of the tag to display next to the value.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
}
];
const TagSlots = [
{
name: 'icon',
description: 'custom icon template.'
} }
]; ];
@ -29,6 +42,7 @@ module.exports = {
tag: { tag: {
name: 'Tag', name: 'Tag',
description: 'Tag component is used to categorize content.', description: 'Tag component is used to categorize content.',
props: TagProps props: TagProps,
slots: TagSlots
} }
}; };

View File

@ -10,6 +10,12 @@ const TerminalProps = [
type: 'string', type: 'string',
default: 'null', default: 'null',
description: 'Prompt text for each command.' description: 'Prompt text for each command.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];

View File

@ -10,6 +10,12 @@ const TextareaProps = [
type: 'boolean', type: 'boolean',
default: 'false', default: 'false',
description: 'When present, height of textarea changes as being typed.' description: 'When present, height of textarea changes as being typed.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];

View File

@ -34,6 +34,12 @@ const TieredMenuProps = [
type: 'boolean', type: 'boolean',
default: 'true', default: 'true',
description: "Whether to apply 'router-link-active-exact' class if route exactly matches the item path." description: "Whether to apply 'router-link-active-exact' class if route exactly matches the item path."
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];
@ -45,6 +51,10 @@ const TieredMenuSlots = [
{ {
name: 'submenuicon', name: 'submenuicon',
description: 'Custom submenu icon template.' description: 'Custom submenu icon template.'
},
{
name: 'itemicon',
description: 'Custom item icon template.'
} }
]; ];

View File

@ -22,6 +22,12 @@ const TimelineProps = [
type: 'string', type: 'string',
default: 'null', default: 'null',
description: 'Name of the field that uniquely identifies the a record in the data.' description: 'Name of the field that uniquely identifies the a record in the data.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];

View File

@ -28,6 +28,12 @@ const ToastProps = [
type: 'object', type: 'object',
default: 'null', default: 'null',
description: 'Object literal to define widths per screen size.' description: 'Object literal to define widths per screen size.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];
@ -60,6 +66,14 @@ const ToastSlots = [
{ {
name: 'message', name: 'message',
description: 'Custom content for the toast message' description: 'Custom content for the toast message'
},
{
name: 'icon',
description: 'Custom icon template.'
},
{
name: 'closeicon',
description: 'Custom close icon template.'
} }
]; ];

View File

@ -70,6 +70,12 @@ const ToggleButtonProps = [
type: 'object', type: 'object',
default: 'null', default: 'null',
description: 'Uses to pass all properties of the HTMLInputElement to the focusable input element inside the component.' description: 'Uses to pass all properties of the HTMLInputElement to the focusable input element inside the component.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];
@ -109,11 +115,19 @@ const ToggleButtonEvents = [
} }
]; ];
const ToggleButtonSlots = [
{
name: 'icon',
description: 'custom icon template.'
}
];
module.exports = { module.exports = {
togglebutton: { togglebutton: {
name: 'ToggleButton', name: 'ToggleButton',
description: 'ToggleButton is used to select a boolean value using a button.', description: 'ToggleButton is used to select a boolean value using a button.',
props: ToggleButtonProps, props: ToggleButtonProps,
slots: ToggleButtonSlots,
events: ToggleButtonEvents events: ToggleButtonEvents
} }
}; };

View File

@ -21,6 +21,10 @@ const ToolbarSlots = [
{ {
name: 'end', name: 'end',
description: "Custom content for the component's right side" description: "Custom content for the component's right side"
},
{
name: 'center',
description: "Custom content for the component's center"
} }
]; ];

View File

@ -77,6 +77,12 @@ const TreeProps = [
type: 'string', type: 'string',
default: 'null', default: 'null',
description: 'Height of the scroll viewport in fixed units or the "flex" keyword for a dynamic size.' description: 'Height of the scroll viewport in fixed units or the "flex" keyword for a dynamic size.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];

View File

@ -101,6 +101,12 @@ const TreeSelectProps = [
type: 'string', type: 'string',
default: 'null', default: 'null',
description: 'Used to define a string that labels the element.' description: 'Used to define a string that labels the element.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];
@ -196,8 +202,16 @@ const TreeSelectSlots = [
description: 'Custom content when there is no data to display' description: 'Custom content when there is no data to display'
}, },
{ {
name: 'indicator', name: 'triggericon',
description: 'Custom content for the dropdown indicator' description: 'Custom content for the dropdown indicator'
},
{
name: 'itemtogglericon',
description: 'Custom item toggler icon template.'
},
{
name: 'itemcheckboxicon',
description: 'Custom item checkbox icon template.'
} }
]; ];

View File

@ -221,6 +221,12 @@ const TreeTableProps = [
type: 'string', type: 'string',
default: 'null', default: 'null',
description: 'Defines the responsive mode, currently only option is scroll.' description: 'Defines the responsive mode, currently only option is scroll.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];
@ -443,23 +449,55 @@ const TreeTableEvents = [
const TreeTableSlots = [ const TreeTableSlots = [
{ {
name: 'header', name: 'header',
description: "Custom content for the component's header" description: "Custom content for the component's header."
}, },
{ {
name: 'paginatorstart', name: 'paginatorstart',
description: "Custom content for the component paginator's left side" description: "Custom content for the component paginator's left side."
}, },
{ {
name: 'paginatorend', name: 'paginatorend',
description: "Custom content for the component paginator's right side" description: "Custom content for the component paginator's right side."
}, },
{ {
name: 'empty', name: 'empty',
description: 'Custom content when there is no data to display' description: 'Custom content when there is no data to display.'
}, },
{ {
name: 'footer', name: 'footer',
description: "Custom content for the component's footer" description: "Custom content for the component's footer."
},
{
name: 'loadingicon',
description: 'Custom loading icon template.'
},
{
name: 'togglericon',
description: 'Custom toggler icon template.'
},
{
name: 'checkboxicon',
description: 'Custom checkbox icon template.'
},
{
name: 'sorticon',
description: 'Custom sort icon template.'
},
{
name: 'paginatorfirstpagelinkicon',
description: 'Custom paginator first page link icon template.'
},
{
name: 'paginatorprevpagelinkicon',
description: 'Custom paginator prev page link icon template.'
},
{
name: 'paginatornextpagelinkicon',
description: 'Custom paginator next page link icon template.'
},
{
name: 'paginatorlastpagelinkicon',
description: 'Custom paginator last page link icon template.'
} }
]; ];

View File

@ -40,6 +40,12 @@ const TriStateCheckboxProps = [
type: 'string', type: 'string',
default: 'null', default: 'null',
description: 'Used to define a string that labels the element.' description: 'Used to define a string that labels the element.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];

View File

@ -101,6 +101,12 @@ const VirtualScrollerProps = [
type: 'number|string', type: 'number|string',
default: '0', default: '0',
description: 'Index of the element in tabbing order.' description: 'Index of the element in tabbing order.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
} }
]; ];

View File

@ -1,8 +1,8 @@
{ {
"id": 36, "id": 37,
"content": "Introducing the all-new Apollo Vite Template", "content": "Unstyled mode preview featuring Tailwind.",
"linkText": "View Demo", "linkText": "Learn More",
"linkHref": "https://www.primefaces.org/apollo-vue", "linkHref": "https://youtu.be/JpYIX3V96gs",
"backgroundStyle": "background-color:#4f8ff7", "backgroundStyle": "background-color:#4f8ff7",
"textStyle": "color:#ffffff;font-weight:500", "textStyle": "color:#ffffff;font-weight:500",
"linkStyle": "color:#ffffff;font-weight:700;text-decoration: underline;" "linkStyle": "color:#ffffff;font-weight:700;text-decoration: underline;"

View File

@ -455,9 +455,18 @@
"to": "/uikit" "to": "/uikit"
}, },
{ {
"name": "PrimeIcons", "name": "Icons",
"icon": "pi pi-eye", "icon": "pi pi-eye",
"to": "/icons" "children": [
{
"name": "Prime Icons",
"to": "/icons"
},
{
"name": "Custom Icons",
"to": "/customicons"
}
]
}, },
{ {
"name": "Templates", "name": "Templates",

View File

@ -14,7 +14,7 @@ function copyDependencies(inFolder, outFolder) {
} }
copyDependencies('./components/lib/', 'dist/'); copyDependencies('./components/lib/', 'dist/');
copyDependencies('./components/lib/icon/', 'dist/icon/'); copyDependencies('./components/lib/icons/', 'dist/icons/');
fs.copySync(path.resolve(__dirname, './components/lib/ts-helpers.d.ts'), 'dist/ts-helpers.d.ts'); fs.copySync(path.resolve(__dirname, './components/lib/ts-helpers.d.ts'), 'dist/ts-helpers.d.ts');
fs.copySync(path.resolve(__dirname, './package-build.json'), 'dist/package.json'); fs.copySync(path.resolve(__dirname, './package-build.json'), 'dist/package.json');

View File

@ -49,7 +49,7 @@ export default {
}; };
}, },
mounted() { mounted() {
this.tab = this.$route.hash.includes('api') ? 1 : 0; this.tab = this.$route.hash.includes('api') ? 1 : this.$route.hash.includes('pt') ? 2 : 0;
} }
}; };
</script> </script>

View File

@ -2,7 +2,7 @@ import pkg from '../../../package.json';
import { services } from './services'; import { services } from './services';
const PrimeVue = { const PrimeVue = {
version: '^3.26.1', version: '^3.28.0',
description: description:
'PrimeVue is an open source UI library for Vue featuring a rich set of 80+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with PrimeBlock, which has 400+ ready to use UI blocks to build spectacular applications in no time.' 'PrimeVue is an open source UI library for Vue featuring a rich set of 80+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with PrimeBlock, which has 400+ ready to use UI blocks to build spectacular applications in no time.'
}; };

View File

@ -43,8 +43,8 @@
<script> <script>
import BaseComponent from 'primevue/basecomponent'; import BaseComponent from 'primevue/basecomponent';
import ChevronDownIcon from 'primevue/icon/chevrondown'; import ChevronDownIcon from 'primevue/icons/chevrondown';
import ChevronRightIcon from 'primevue/icon/chevronright'; import ChevronRightIcon from 'primevue/icons/chevronright';
import Ripple from 'primevue/ripple'; import Ripple from 'primevue/ripple';
import { DomHandler, UniqueComponentId } from 'primevue/utils'; import { DomHandler, UniqueComponentId } from 'primevue/utils';

View File

@ -37,19 +37,19 @@ export interface AccordionTabPassThroughOptions {
/** /**
* Uses to pass attributes to the headeraction's DOM element. * Uses to pass attributes to the headeraction's DOM element.
*/ */
headeraction?: AccordionTabPassThroughOptionType; headerAction?: AccordionTabPassThroughOptionType;
/** /**
* Uses to pass attributes to the headericon's DOM element. * Uses to pass attributes to the headericon's DOM element.
*/ */
headericon?: AccordionTabPassThroughOptionType; headerIcon?: AccordionTabPassThroughOptionType;
/** /**
* Uses to pass attributes to the headertitle's DOM element. * Uses to pass attributes to the headertitle's DOM element.
*/ */
headertitle?: AccordionTabPassThroughOptionType; headerTitle?: AccordionTabPassThroughOptionType;
/** /**
* Uses to pass attributes to the toggleablecontent's DOM element. * Uses to pass attributes to the toggleablecontent's DOM element.
*/ */
toggleablecontent?: AccordionTabPassThroughOptionType; toggleableContent?: AccordionTabPassThroughOptionType;
/** /**
* Uses to pass attributes to the content's DOM element. * Uses to pass attributes to the content's DOM element.
*/ */

View File

@ -8,8 +8,20 @@
* *
*/ */
import { HTMLAttributes, InputHTMLAttributes, VNode } from 'vue'; import { HTMLAttributes, InputHTMLAttributes, VNode } from 'vue';
import { ButtonPassThroughOptionType } from '../button';
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers'; import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
import { VirtualScrollerItemOptions, VirtualScrollerProps } from '../virtualscroller'; import { VirtualScrollerItemOptions, VirtualScrollerPassThroughOptionType, VirtualScrollerProps } from '../virtualscroller';
export declare type AutoCompletePassThroughOptionType = AutoCompletePassThroughAttributes | ((options: AutoCompletePassThroughMethodOptions) => AutoCompletePassThroughAttributes) | null | undefined;
/**
* Custom passthrough(pt) option method.
*/
export interface AutoCompletePassThroughMethodOptions {
props: AutoCompleteProps;
state: AutoCompleteState;
context: AutoCompleteContext;
}
/** /**
* Custom change event. * Custom change event.
@ -78,6 +90,141 @@ export interface AutoCompleteCompleteEvent {
query: string; query: string;
} }
/**
* Custom passthrough(pt) options.
* @see {@link AutoCompleteProps.pt}
*/
export interface AutoCompletePassThroughOptions {
/**
* Uses to pass attributes to the root's DOM element.
*/
root?: AutoCompletePassThroughOptionType;
/**
* Uses to pass attributes to the input's DOM element.
*/
input?: AutoCompletePassThroughOptionType;
/**
* Uses to pass attributes to the container's DOM element.
*/
container?: AutoCompletePassThroughOptionType;
/**
* Uses to pass attributes to the token' DOM element.
*/
token?: AutoCompletePassThroughOptionType;
/**
* Uses to pass attributes to the token label's DOM element.
*/
tokenLabel?: AutoCompletePassThroughOptionType;
/**
* Uses to pass attributes to the remove token icon's DOM element.
*/
removeTokenIcon?: AutoCompletePassThroughOptionType;
/**
* Uses to pass attributes to the loading icon's DOM element.
*/
loadingIcon?: AutoCompletePassThroughOptionType;
/**
* Uses to pass attributes to the Button component.
*/
dropdownButton?: ButtonPassThroughOptionType;
/**
* Uses to pass attributes to the search result message's DOM element.
*/
searchResultMessage?: AutoCompletePassThroughOptionType;
/**
* Uses to pass attributes to the panel's DOM element.
*/
panel?: AutoCompletePassThroughOptionType;
/**
* Uses to pass attributes to the VirtualScroller component.
* @see {@link VirtualScrollerPassThroughOptionType}
*/
virtualScroller?: VirtualScrollerPassThroughOptionType;
/**
* Uses to pass attributes to the list's DOM element.
*/
list?: AutoCompletePassThroughOptionType;
/**
* Uses to pass attributes to the item group's DOM element.
*/
itemGroup?: AutoCompletePassThroughOptionType;
/**
* Uses to pass attributes to the item's DOM element.
*/
item?: AutoCompletePassThroughOptionType;
/**
* Uses to pass attributes to the empty message's DOM element.
*/
emptyMessage?: AutoCompletePassThroughOptionType;
/**
* Uses to pass attributes to the selected message's DOM element.
*/
selectedMessage?: AutoCompletePassThroughOptionType;
}
/**
* Custom passthrough attributes for each DOM elements
*/
export interface AutoCompletePassThroughAttributes {
[key: string]: any;
}
/**
* Defines current inline state in AutoComplete component.
*/
export interface AutoCompleteState {
/**
* Current id state as a string.
*/
id: string;
/**
* Current focused state as a boolean.
* @defaultValue false
*/
focused: boolean;
/**
* Current focused item index as a number.
* @defaultvalue -1
*/
focusedOptionIndex: number;
/**
* Current focused item index as a number.
* @defaultvalue -1
*/
focusedMultipleOptionIndex: number;
/**
* Current overlay visible state as a boolean.
* @defaultValue false
*/
overlayVisible: boolean;
/**
* Current search state as a boolean.
* @defaultValue false
*/
searching: boolean;
}
/**
* Defines current options in AutoComplete component.
*/
export interface AutoCompleteContext {
/**
* Current selection state of the item as a boolean.
* @defaultValue false
*/
selected: boolean;
/**
* Current focus state of the item as a boolean.
* @defaultValue false
*/
focused: boolean;
/**
* Current disabled state of the item as a boolean.
* @defaultValue false
*/
disabled: boolean;
}
/** /**
* Defines valid properties in AutoComplete component. * Defines valid properties in AutoComplete component.
*/ */
@ -206,6 +353,7 @@ export interface AutoCompleteProps {
panelProps?: HTMLAttributes | undefined; panelProps?: HTMLAttributes | undefined;
/** /**
* Icon to display in the dropdown. * Icon to display in the dropdown.
* @deprecated since v3.27.0. Use 'dropdownicon' slot.
*/ */
dropdownIcon?: string | undefined; dropdownIcon?: string | undefined;
/** /**
@ -214,10 +362,12 @@ export interface AutoCompleteProps {
dropdownClass?: string | object | undefined; dropdownClass?: string | object | undefined;
/** /**
* Icon to display in loading state. * Icon to display in loading state.
* @deprecated since v3.27.0. Use 'loadingicon' slot.
*/ */
loadingIcon?: string | undefined; loadingIcon?: string | undefined;
/** /**
* Icon to display in chip remove action. * Icon to display in chip remove action.
* @deprecated since v3.27.0. Use 'removetokenicon' slot.
*/ */
removeTokenIcon?: string | undefined; removeTokenIcon?: string | undefined;
/** /**
@ -271,6 +421,11 @@ export interface AutoCompleteProps {
* Identifier of the underlying input element. * Identifier of the underlying input element.
*/ */
'aria-labelledby'?: string | undefined; 'aria-labelledby'?: string | undefined;
/**
* Uses to pass attributes to DOM elements inside the component.
* @type {AutoCompletePassThroughOptions}
*/
pt?: AutoCompletePassThroughOptions;
} }
/** /**
@ -410,7 +565,16 @@ export interface AutoCompleteSlots {
/** /**
* Custom remove token icon template in multiple mode. * Custom remove token icon template in multiple mode.
*/ */
removetokenicon(): VNode[]; removetokenicon(scope: {
/**
* Style class of the icon.
*/
class: string;
/**
* Remove token icon function.
*/
onClick: void;
}): VNode[];
/** /**
* Custom loading icon template. * Custom loading icon template.
*/ */

View File

@ -1,5 +1,5 @@
<template> <template>
<div ref="container" :class="containerClass" @click="onContainerClick"> <div ref="container" :class="containerClass" @click="onContainerClick" v-bind="ptm('root')">
<input <input
v-if="!multiple" v-if="!multiple"
ref="focusInput" ref="focusInput"
@ -25,7 +25,7 @@
@keydown="onKeyDown" @keydown="onKeyDown"
@input="onInput" @input="onInput"
@change="onChange" @change="onChange"
v-bind="inputProps" v-bind="{ ...inputProps, ...ptm('input') }"
/> />
<ul <ul
v-if="multiple" v-if="multiple"
@ -38,6 +38,7 @@
@focus="onMultipleContainerFocus" @focus="onMultipleContainerFocus"
@blur="onMultipleContainerBlur" @blur="onMultipleContainerBlur"
@keydown="onMultipleContainerKeyDown" @keydown="onMultipleContainerKeyDown"
v-bind="ptm('container')"
> >
<li <li
v-for="(option, i) of modelValue" v-for="(option, i) of modelValue"
@ -49,15 +50,16 @@
:aria-selected="true" :aria-selected="true"
:aria-setsize="modelValue.length" :aria-setsize="modelValue.length"
:aria-posinset="i + 1" :aria-posinset="i + 1"
v-bind="ptm('token')"
> >
<slot name="chip" :value="option"> <slot name="chip" :value="option">
<span class="p-autocomplete-token-label">{{ getOptionLabel(option) }}</span> <span class="p-autocomplete-token-label" v-bind="ptm('tokenLabel')">{{ getOptionLabel(option) }}</span>
</slot> </slot>
<slot name="removetokenicon"> <slot name="removetokenicon" class="p-autocomplete-token-icon" :onClick="(event) => removeOption(event, i)">
<component :is="removeTokenIcon ? 'span' : 'TimesCircleIcon'" :class="['p-autocomplete-token-icon', removeTokenIcon]" @click="removeOption($event, i)" aria-hidden="true" /> <component :is="removeTokenIcon ? 'span' : 'TimesCircleIcon'" :class="['p-autocomplete-token-icon', removeTokenIcon]" @click="removeOption($event, i)" aria-hidden="true" v-bind="ptm('removeTokenIcon')" />
</slot> </slot>
</li> </li>
<li class="p-autocomplete-input-token" role="option"> <li class="p-autocomplete-input-token" role="option" v-bind="ptm('token')">
<input <input
ref="focusInput" ref="focusInput"
:id="inputId" :id="inputId"
@ -81,30 +83,48 @@
@keydown="onKeyDown" @keydown="onKeyDown"
@input="onInput" @input="onInput"
@change="onChange" @change="onChange"
v-bind="inputProps" v-bind="{ ...inputProps, ...ptm('input') }"
/> />
</li> </li>
</ul> </ul>
<slot v-if="searching" name="loadingicon"> <slot v-if="searching" name="loadingicon">
<component :is="loadingIcon ? 'i' : 'SpinnerIcon'" :class="['p-autocomplete-loader', loadingIcon]" spin aria-hidden="true" /> <i v-if="loadingIcon" :class="['p-autocomplete-loader pi-spin', loadingIcon]" aria-hidden="true" v-bind="ptm('loadingIcon')" />
<SpinnerIcon v-else class="p-autocomplete-loader" spin aria-hidden="true" v-bind="ptm('loadingIcon')" />
</slot> </slot>
<Button v-if="dropdown" ref="dropdownButton" type="button" tabindex="-1" :class="['p-autocomplete-dropdown', dropdownClass]" :disabled="disabled" aria-hidden="true" @click="onDropdownClick"> <Button v-if="dropdown" ref="dropdownButton" type="button" tabindex="-1" :class="['p-autocomplete-dropdown', dropdownClass]" :disabled="disabled" aria-hidden="true" @click="onDropdownClick" :pt="ptm('dropdownButton')">
<slot name="dropdownicon"> <template #icon>
<component :is="dropdownIcon ? 'span' : 'ChevronDownIcon'" :class="dropdownIcon" /> <slot name="dropdownicon">
</slot> <component :is="dropdownIcon ? 'span' : 'ChevronDownIcon'" :class="dropdownIcon" v-bind="ptm('dropdownButton')['icon']" />
</slot>
</template>
</Button> </Button>
<span role="status" aria-live="polite" class="p-hidden-accessible"> <span role="status" aria-live="polite" class="p-hidden-accessible" v-bind="ptm('hiddenSearchResult')">
{{ searchResultMessageText }} {{ searchResultMessageText }}
</span> </span>
<Portal :appendTo="appendTo"> <Portal :appendTo="appendTo">
<transition name="p-connected-overlay" @enter="onOverlayEnter" @after-enter="onOverlayAfterEnter" @leave="onOverlayLeave" @after-leave="onOverlayAfterLeave"> <transition name="p-connected-overlay" @enter="onOverlayEnter" @after-enter="onOverlayAfterEnter" @leave="onOverlayLeave" @after-leave="onOverlayAfterLeave">
<div v-if="overlayVisible" :ref="overlayRef" :class="panelStyleClass" :style="{ ...panelStyle, 'max-height': virtualScrollerDisabled ? scrollHeight : '' }" @click="onOverlayClick" @keydown="onOverlayKeyDown" v-bind="panelProps"> <div
v-if="overlayVisible"
:ref="overlayRef"
:class="panelStyleClass"
:style="{ ...panelStyle, 'max-height': virtualScrollerDisabled ? scrollHeight : '' }"
@click="onOverlayClick"
@keydown="onOverlayKeyDown"
v-bind="{ ...panelProps, ...ptm('panel') }"
>
<slot name="header" :value="modelValue" :suggestions="visibleOptions"></slot> <slot name="header" :value="modelValue" :suggestions="visibleOptions"></slot>
<VirtualScroller :ref="virtualScrollerRef" v-bind="virtualScrollerOptions" :style="{ height: scrollHeight }" :items="visibleOptions" :tabindex="-1" :disabled="virtualScrollerDisabled"> <VirtualScroller :ref="virtualScrollerRef" v-bind="{ ...virtualScrollerOptions, ...ptm('virtualScroller') }" :style="{ height: scrollHeight }" :items="visibleOptions" :tabindex="-1" :disabled="virtualScrollerDisabled">
<template v-slot:content="{ styleClass, contentRef, items, getItemOptions, contentStyle, itemSize }"> <template v-slot:content="{ styleClass, contentRef, items, getItemOptions, contentStyle, itemSize }">
<ul :ref="(el) => listRef(el, contentRef)" :id="id + '_list'" :class="['p-autocomplete-items', styleClass]" :style="contentStyle" role="listbox"> <ul :ref="(el) => listRef(el, contentRef)" :id="id + '_list'" :class="['p-autocomplete-items', styleClass]" :style="contentStyle" role="listbox" v-bind="ptm('list')">
<template v-for="(option, i) of items" :key="getOptionRenderKey(option, getOptionIndex(i, getItemOptions))"> <template v-for="(option, i) of items" :key="getOptionRenderKey(option, getOptionIndex(i, getItemOptions))">
<li v-if="isOptionGroup(option)" :id="id + '_' + getOptionIndex(i, getItemOptions)" :style="{ height: itemSize ? itemSize + 'px' : undefined }" class="p-autocomplete-item-group" role="option"> <li
v-if="isOptionGroup(option)"
:id="id + '_' + getOptionIndex(i, getItemOptions)"
:style="{ height: itemSize ? itemSize + 'px' : undefined }"
class="p-autocomplete-item-group"
role="option"
v-bind="ptm('itemGroup')"
>
<slot name="optiongroup" :option="option.optionGroup" :item="option.optionGroup" :index="getOptionIndex(i, getItemOptions)">{{ getOptionGroupLabel(option.optionGroup) }}</slot> <slot name="optiongroup" :option="option.optionGroup" :item="option.optionGroup" :index="getOptionIndex(i, getItemOptions)">{{ getOptionGroupLabel(option.optionGroup) }}</slot>
</li> </li>
<li <li
@ -121,13 +141,14 @@
:aria-posinset="getAriaPosInset(getOptionIndex(i, getItemOptions))" :aria-posinset="getAriaPosInset(getOptionIndex(i, getItemOptions))"
@click="onOptionSelect($event, option)" @click="onOptionSelect($event, option)"
@mousemove="onOptionMouseMove($event, getOptionIndex(i, getItemOptions))" @mousemove="onOptionMouseMove($event, getOptionIndex(i, getItemOptions))"
v-bind="getPTOptions(option, getItemOptions, i, 'item')"
> >
<slot v-if="$slots.option" name="option" :option="option" :index="getOptionIndex(i, getItemOptions)">{{ getOptionLabel(option) }}</slot> <slot v-if="$slots.option" name="option" :option="option" :index="getOptionIndex(i, getItemOptions)">{{ getOptionLabel(option) }}</slot>
<slot v-else name="item" :item="option" :index="getOptionIndex(i, getItemOptions)">{{ getOptionLabel(option) }}</slot> <slot v-else name="item" :item="option" :index="getOptionIndex(i, getItemOptions)">{{ getOptionLabel(option) }}</slot>
<!--TODO: Deprecated since v3.16.0--> <!--TODO: Deprecated since v3.16.0-->
</li> </li>
</template> </template>
<li v-if="!items || (items && items.length === 0)" class="p-autocomplete-empty-message" role="option"> <li v-if="!items || (items && items.length === 0)" class="p-autocomplete-empty-message" role="option" v-bind="ptm('emptyMessage')">
<slot name="empty">{{ searchResultMessageText }}</slot> <slot name="empty">{{ searchResultMessageText }}</slot>
</li> </li>
</ul> </ul>
@ -137,7 +158,7 @@
</template> </template>
</VirtualScroller> </VirtualScroller>
<slot name="footer" :value="modelValue" :suggestions="visibleOptions"></slot> <slot name="footer" :value="modelValue" :suggestions="visibleOptions"></slot>
<span role="status" aria-live="polite" class="p-hidden-accessible"> <span role="status" aria-live="polite" class="p-hidden-accessible" v-bind="ptm('hiddenSelectedMessage')">
{{ selectedMessageText }} {{ selectedMessageText }}
</span> </span>
</div> </div>
@ -147,10 +168,11 @@
</template> </template>
<script> <script>
import BaseComponent from 'primevue/basecomponent';
import Button from 'primevue/button'; import Button from 'primevue/button';
import ChevronDownIcon from 'primevue/icon/chevrondown'; import ChevronDownIcon from 'primevue/icons/chevrondown';
import SpinnerIcon from 'primevue/icon/spinner'; import SpinnerIcon from 'primevue/icons/spinner';
import TimesCircleIcon from 'primevue/icon/timescircle'; import TimesCircleIcon from 'primevue/icons/timescircle';
import OverlayEventBus from 'primevue/overlayeventbus'; import OverlayEventBus from 'primevue/overlayeventbus';
import Portal from 'primevue/portal'; import Portal from 'primevue/portal';
import Ripple from 'primevue/ripple'; import Ripple from 'primevue/ripple';
@ -159,6 +181,7 @@ import VirtualScroller from 'primevue/virtualscroller';
export default { export default {
name: 'AutoComplete', name: 'AutoComplete',
extends: BaseComponent,
emits: ['update:modelValue', 'change', 'focus', 'blur', 'item-select', 'item-unselect', 'dropdown-click', 'clear', 'complete', 'before-show', 'before-hide', 'show', 'hide'], emits: ['update:modelValue', 'change', 'focus', 'blur', 'item-select', 'item-unselect', 'dropdown-click', 'clear', 'complete', 'before-show', 'before-hide', 'show', 'hide'],
props: { props: {
modelValue: null, modelValue: null,
@ -386,6 +409,15 @@ export default {
getOptionRenderKey(option, index) { getOptionRenderKey(option, index) {
return (this.dataKey ? ObjectUtils.resolveFieldData(option, this.dataKey) : this.getOptionLabel(option)) + '_' + index; return (this.dataKey ? ObjectUtils.resolveFieldData(option, this.dataKey) : this.getOptionLabel(option)) + '_' + index;
}, },
getPTOptions(option, itemOptions, index, key) {
return this.ptm(key, {
context: {
selected: this.isSelected(option),
focused: this.focusedOptionIndex === this.getOptionIndex(index, itemOptions),
disabled: this.isOptionDisabled(option)
}
});
},
isOptionDisabled(option) { isOptionDisabled(option) {
return this.optionDisabled ? ObjectUtils.resolveFieldData(option, this.optionDisabled) : false; return this.optionDisabled ? ObjectUtils.resolveFieldData(option, this.optionDisabled) : false;
}, },

View File

@ -9,6 +9,45 @@
import { VNode } from 'vue'; import { VNode } from 'vue';
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers'; import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
export declare type AvatarPassThroughOptionType = AvatarPassThroughAttributes | ((options: AvatarPassThroughMethodOptions) => AvatarPassThroughAttributes) | null | undefined;
/**
* Custom passthrough(pt) option method.
*/
export interface AvatarPassThroughMethodOptions {
props: AvatarProps;
}
/**
* Custom passthrough attributes for each DOM elements
*/
export interface AvatarPassThroughAttributes {
[key: string]: any;
}
/**
* Custom passthrough(pt) options.
* @see {@link AvatarProps.pt}
*/
export interface AvatarPassThroughOptions {
/**
* Uses to pass attributes to the root's DOM element.
*/
root?: AvatarPassThroughOptionType;
/**
* Uses to pass attributes to the label's DOM element.
*/
label?: AvatarPassThroughOptionType;
/**
* Uses to pass attributes to the icon's DOM element.
*/
icon?: AvatarPassThroughOptionType;
/**
* Uses to pass attributes to the image's DOM element.
*/
image?: AvatarPassThroughOptionType;
}
/** /**
* Defines valid properties in Avatar component. * Defines valid properties in Avatar component.
*/ */
@ -19,6 +58,7 @@ export interface AvatarProps {
label?: string | undefined; label?: string | undefined;
/** /**
* Defines the icon to display. * Defines the icon to display.
* @deprecated since v3.27.0. Use 'icon' slot.
*/ */
icon?: string | undefined; icon?: string | undefined;
/** /**
@ -43,6 +83,11 @@ export interface AvatarProps {
* Establishes relationships between the component and label(s) where its value should be one or more element IDs. * Establishes relationships between the component and label(s) where its value should be one or more element IDs.
*/ */
'aria-labelledby'?: string | undefined; 'aria-labelledby'?: string | undefined;
/**
* Uses to pass attributes to DOM elements inside the component.
* @type {AvatarPassThroughOptions}
*/
pt?: AvatarPassThroughOptions;
} }
/** /**
@ -53,6 +98,10 @@ export interface AvatarSlots {
* Content can easily be customized with the default slot instead of using the built-in modes. * Content can easily be customized with the default slot instead of using the built-in modes.
*/ */
default(): VNode[]; default(): VNode[];
/**
* Custom icon template.
*/
icon(): VNode[];
} }
/** /**

View File

@ -1,16 +1,20 @@
<template> <template>
<div :class="containerClass" :aria-labelledby="ariaLabelledby" :aria-label="ariaLabel"> <div :class="containerClass" :aria-labelledby="ariaLabelledby" :aria-label="ariaLabel" v-bind="ptm('root')">
<slot> <slot>
<span v-if="label" class="p-avatar-text">{{ label }}</span> <span v-if="label" class="p-avatar-text" v-bind="ptm('label')">{{ label }}</span>
<span v-else-if="icon" :class="iconClass"></span> <component v-else-if="$slots.icon" :is="$slots.icon" class="p-avatar-icon" v-bind="ptm('icon')" />
<img v-else-if="image" :src="image" :alt="ariaLabel" @error="onError" /> <span v-else-if="icon" :class="['p-avatar-icon', icon]" v-bind="ptm('icon')" />
<img v-else-if="image" :src="image" :alt="ariaLabel" @error="onError" v-bind="ptm('image')" />
</slot> </slot>
</div> </div>
</template> </template>
<script> <script>
import BaseComponent from 'primevue/basecomponent';
export default { export default {
name: 'Avatar', name: 'Avatar',
extends: BaseComponent,
emits: ['error'], emits: ['error'],
props: { props: {
label: { label: {
@ -58,9 +62,6 @@ export default {
'p-avatar-xl': this.size === 'xlarge' 'p-avatar-xl': this.size === 'xlarge'
} }
]; ];
},
iconClass() {
return ['p-avatar-icon', this.icon];
} }
} }
}; };

View File

@ -9,10 +9,36 @@
*/ */
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers'; import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
export declare type AvatarGroupPassThroughOptionType = AvatarGroupPassThroughAttributes | null | undefined;
/**
* Custom passthrough attributes for each DOM elements
*/
export interface AvatarGroupPassThroughAttributes {
[key: string]: any;
}
/**
* Custom passthrough(pt) options.
* @see {@link AvatarGroupProps.pt}
*/
export interface AvatarGroupPassThroughOptions {
/**
* Uses to pass attributes to the root's DOM element.
*/
root?: AvatarGroupPassThroughOptionType;
}
/** /**
* Defines valid properties in AvatarGroup component. * Defines valid properties in AvatarGroup component.
*/ */
export interface AvatarGroupProps {} export interface AvatarGroupProps {
/**
* Uses to pass attributes to DOM elements inside the component.
* @type {AvatarGroupPassThroughOptions}
*/
pt?: AvatarGroupPassThroughOptions;
}
/** /**
* Defines valid slots in AvatarGroup component. * Defines valid slots in AvatarGroup component.

View File

@ -1,12 +1,15 @@
<template> <template>
<div class="p-avatar-group p-component"> <div class="p-avatar-group p-component" v-bind="ptm('root')">
<slot></slot> <slot></slot>
</div> </div>
</template> </template>
<script> <script>
import BaseComponent from 'primevue/basecomponent';
export default { export default {
name: 'AvatarGroup' name: 'AvatarGroup',
extends: BaseComponent
}; };
</script> </script>

View File

@ -10,6 +10,33 @@
import { VNode } from 'vue'; import { VNode } from 'vue';
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers'; import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
export declare type BadgePassThroughOptionType = BadgePassThroughAttributes | ((options: BadgePassThroughMethodOptions) => BadgePassThroughAttributes) | null | undefined;
/**
* Custom passthrough(pt) option method.
*/
export interface BadgePassThroughMethodOptions {
props: BadgeProps;
}
/**
* Custom passthrough attributes for each DOM elements
*/
export interface BadgePassThroughAttributes {
[key: string]: any;
}
/**
* Custom passthrough(pt) options.
* @see {@link BadgeProps.pt}
*/
export interface BadgePassThroughOptions {
/**
* Uses to pass attributes to the root's DOM element.
*/
root?: BadgePassThroughOptionType;
}
/** /**
* Defines valid properties in Badge component. * Defines valid properties in Badge component.
*/ */
@ -26,6 +53,11 @@ export interface BadgeProps {
* Size of the badge, valid options are 'large' and 'xlarge'. * Size of the badge, valid options are 'large' and 'xlarge'.
*/ */
size?: 'large' | 'xlarge' | null | undefined; size?: 'large' | 'xlarge' | null | undefined;
/**
* Uses to pass attributes to DOM elements inside the component.
* @type {BadgePassThroughOptions}
*/
pt?: BadgePassThroughOptions;
} }
/** /**

View File

@ -1,14 +1,16 @@
<template> <template>
<span :class="badgeClass"> <span :class="badgeClass" v-bind="ptm('root')">
<slot>{{ value }}</slot> <slot>{{ value }}</slot>
</span> </span>
</template> </template>
<script> <script>
import BaseComponent from 'primevue/basecomponent';
import { ObjectUtils } from 'primevue/utils'; import { ObjectUtils } from 'primevue/utils';
export default { export default {
name: 'Badge', name: 'Badge',
extends: BaseComponent,
props: { props: {
value: { value: {
type: [String, Number], type: [String, Number],

View File

@ -1,25 +1,46 @@
<script> <script>
import { ObjectUtils } from 'primevue/utils'; import { ObjectUtils } from 'primevue/utils';
import { mergeProps } from 'vue';
export default { export default {
name: 'BaseComponent', name: 'BaseComponent',
props: { props: {
pt: { pt: {
type: Object, type: Object,
value: {} default: undefined
} }
}, },
methods: { methods: {
getPTItem(obj = {}, key = '') { getOption(obj = {}, key = '') {
const fKey = ObjectUtils.convertToFlatCase(key); const fKey = ObjectUtils.convertToFlatCase(key);
return obj[Object.keys(obj).find((k) => ObjectUtils.convertToFlatCase(k) === fKey) || '']; return obj[Object.keys(obj).find((k) => ObjectUtils.convertToFlatCase(k) === fKey) || ''];
}, },
getPTValue(obj = {}, key = '', params = {}) {
const self = ObjectUtils.getItemValue(this.getOption(obj, key), params);
const globalPT = ObjectUtils.getItemValue(this.getOption(this.defaultPT, key), params);
const merged = mergeProps(self, globalPT);
return merged;
/*
* @todo: The 'class' option in self can always be more powerful to style the component easily.
*
* return self && self['class'] ? { ...merged, ...{ class: self['class'] } } : merged;
*/
},
ptm(key = '', params = {}) { ptm(key = '', params = {}) {
return ObjectUtils.getItemValue(this.getPTItem(this.pt, key), { props: this.$props, state: this.$data, ...params }); return this.getPTValue(this.pt, key, { props: this.$props, state: this.$data, ...params });
}, },
ptmo(obj = {}, key = '', params = {}) { ptmo(obj = {}, key = '', params = {}) {
return ObjectUtils.getItemValue(this.getPTItem(obj, key), params); return this.getPTValue(obj, key, params);
}
},
computed: {
defaultPT() {
return ObjectUtils.getItemValue(this.getOption(this.$primevue.config.pt, this.$.type.name), this.defaultsParams);
},
defaultsParams() {
return { instance: this.$ };
} }
} }
}; };

View File

@ -6,11 +6,11 @@ export default {
props: { props: {
label: { label: {
type: String, type: String,
value: undefined default: undefined
}, },
spin: { spin: {
type: Boolean, type: Boolean,
value: false default: false
} }
}, },
methods: { methods: {
@ -33,11 +33,8 @@ export default {
}; };
</script> </script>
<style> <style>
/* Theme */
.p-icon { .p-icon {
display: inline-block; display: inline-block;
width: 1rem;
height: 1rem;
} }
.p-icon-spin { .p-icon-spin {

Some files were not shown because too many files have changed in this diff Show More