Merge branch 'master' into v4

pull/5507/head
Cagatay Civici 2024-04-01 01:39:50 +03:00
commit 5700f617cd
12 changed files with 72 additions and 10 deletions

View File

@ -514,7 +514,8 @@
"children": [
{
"name": "Prime Icons",
"to": "/icons"
"to": "/icons",
"badge": "UPDATED"
},
{
"name": "Custom Icons",

View File

@ -251,6 +251,14 @@ export interface DropdownState {
* Defines current options in Dropdown component.
*/
export interface DropdownContext {
/**
* Current item option.
*/
option: any;
/**
* Current item index.
*/
index: number;
/**
* Current selection state of the item as a boolean.
* @defaultValue false

View File

@ -277,6 +277,8 @@ export default {
getPTItemOptions(option, itemOptions, index, key) {
return this.ptm(key, {
context: {
option,
index,
selected: this.isSelected(option),
focused: this.focusedOptionIndex === this.getOptionIndex(index, itemOptions),
disabled: this.isOptionDisabled(option)

View File

@ -272,8 +272,8 @@ export default {
getOptionValue(option) {
return this.optionValue ? ObjectUtils.resolveFieldData(option, this.optionValue) : option;
},
getOptionRenderKey(option) {
return this.dataKey ? ObjectUtils.resolveFieldData(option, this.dataKey) : this.getOptionLabel(option);
getOptionRenderKey(option, index) {
return this.dataKey ? ObjectUtils.resolveFieldData(option, this.dataKey) : this.getOptionLabel(option) + `_${index}`;
},
getHeaderCheckboxPTOptions(key) {
return this.ptm(key, {

View File

@ -23775,6 +23775,22 @@
"description": "Defines current options in Dropdown component.",
"relatedProp": "",
"props": [
{
"name": "option",
"optional": false,
"readonly": false,
"type": "any",
"default": "",
"description": "Current item option."
},
{
"name": "index",
"optional": false,
"readonly": false,
"type": "number",
"default": "",
"description": "Current item index."
},
{
"name": "selected",
"optional": false,

View File

@ -51,6 +51,10 @@
<td>p-overlay-open</td>
<td>Container element when overlay is visible.</td>
</tr>
<tr>
<td>p-focus</td>
<td>Container element when it is in focus.</td>
</tr>
</tbody>
</table>
</div>

8
doc/icons/FigmaDoc.vue Normal file
View File

@ -0,0 +1,8 @@
<template>
<DocSectionText v-bind="$attrs">
<p>
PrimeIcons library is now available on <a href="https://www.figma.com/community/file/1354343849355792252/primeicons" target="_blank" rel="noopener noreferrer">Figma Community</a>. By adding them as a library, you can easily use these
icons in your designs.
</p>
</DocSectionText>
</template>

View File

@ -43,7 +43,24 @@ export default {
},
computed: {
filteredIcons() {
if (this.filter) return this.icons.filter((icon) => icon.properties.name.indexOf(this.filter.toLowerCase()) > -1);
let sanitizedInput = this.filter?.replace(/[^\w\s]/gi, '').replace(/\s/g, '');
if (this.filter)
return this.icons.filter((icon) => {
return (
icon.icon.tags.some((tag) =>
tag
.replace(/[^\w\s]/gi, '')
.replace(/\s/g, '')
.includes(sanitizedInput.toLowerCase())
) ||
icon.properties.name
.replace(/[^\w\s]/gi, '')
.replace(/\s/g, '')
.toLowerCase()
.includes(sanitizedInput.toLowerCase())
);
});
else return this.icons;
}
}

8
package-lock.json generated
View File

@ -32,7 +32,7 @@
"nuxt": "3.3.2",
"prettier": "2.7.1",
"primeflex": "^3.3.1",
"primeicons": "^6.0.1",
"primeicons": "^7.0.0",
"quill": "^1.3.7",
"rollup-plugin-postcss": "^4.0.0",
"rollup-plugin-terser": "^7.0.2",
@ -10924,9 +10924,9 @@
"dev": true
},
"node_modules/primeicons": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/primeicons/-/primeicons-6.0.1.tgz",
"integrity": "sha512-KDeO94CbWI4pKsPnYpA1FPjo79EsY9I+M8ywoPBSf9XMXoe/0crjbUK7jcQEDHuc0ZMRIZsxH3TYLv4TUtHmAA==",
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/primeicons/-/primeicons-7.0.0.tgz",
"integrity": "sha512-jK3Et9UzwzTsd6tzl2RmwrVY/b8raJ3QZLzoDACj+oTJ0oX7L9Hy+XnVwgo4QVKlKpnP/Ur13SXV/pVh4LzaDw==",
"dev": true
},
"node_modules/process-nextick-args": {

View File

@ -60,7 +60,7 @@
"nuxt": "3.3.2",
"prettier": "2.7.1",
"primeflex": "^3.3.1",
"primeicons": "^6.0.1",
"primeicons": "^7.0.0",
"quill": "^1.3.7",
"rollup-plugin-postcss": "^4.0.0",
"rollup-plugin-terser": "^7.0.2",

View File

@ -26,6 +26,7 @@ import BasicDoc from '@/doc/icons/BasicDoc.vue';
import ColorDoc from '@/doc/icons/ColorDoc.vue';
import ConstantsDoc from '@/doc/icons/ConstantsDoc.vue';
import DownloadDoc from '@/doc/icons/DownloadDoc.vue';
import FigmaDoc from '@/doc/icons/FigmaDoc.vue';
import ImportDoc from '@/doc/icons/ImportDoc.vue';
import ListDoc from '@/doc/icons/ListDoc.vue';
import SizeDoc from '@/doc/icons/SizeDoc.vue';
@ -45,6 +46,11 @@ export default {
label: 'Import',
component: ImportDoc
},
{
id: 'figma',
label: 'Figma',
component: FigmaDoc
},
{
id: 'basic',
label: 'Basic',

File diff suppressed because one or more lines are too long