Refactor #3965 - data-pc-name added

pull/4004/head
Tuğçe Küçükoğlu 2023-05-29 12:19:55 +03:00
parent 2cf86162a6
commit 34a3b7ead0
45 changed files with 48 additions and 48 deletions

View File

@ -1,5 +1,5 @@
<template>
<div :class="cx('root')" :aria-labelledby="ariaLabelledby" :aria-label="ariaLabel" v-bind="ptm('root')">
<div :class="cx('root')" :aria-labelledby="ariaLabelledby" :aria-label="ariaLabel" v-bind="ptm('root')" data-pc-name="avatar">
<slot>
<span v-if="label" :class="cx('label')" v-bind="ptm('label')">{{ label }}</span>
<component v-else-if="$slots.icon" :is="$slots.icon" :class="cx('icon')" v-bind="ptm('icon')" />

View File

@ -1,5 +1,5 @@
<template>
<div :class="cx('root')" v-bind="ptm('root')">
<div :class="cx('root')" v-bind="ptm('root')" data-pc-name="avatargroup">
<slot></slot>
</div>
</template>

View File

@ -1,5 +1,5 @@
<template>
<span :class="cx('root')" v-bind="ptm('root')">
<span :class="cx('root')" v-bind="ptm('root')" data-pc-name="badge">
<slot>{{ value }}</slot>
</span>
</template>

View File

@ -1,5 +1,5 @@
<template>
<nav :class="cx('root')" v-bind="ptm('root')">
<nav :class="cx('root')" v-bind="ptm('root')" data-pc-name="breadcrumb">
<ol :class="cx('menu')" v-bind="ptm('menu')">
<BreadcrumbItem v-if="home" :item="home" :class="cx('home')" :templates="$slots" :exact="exact" :pt="pt" v-bind="ptm('home')" />
<template v-for="(item, i) of model" :key="item.label">

View File

@ -1,5 +1,5 @@
<template>
<span ref="container" :id="id" :class="cx('root')" :style="sx('root')" v-bind="ptm('root')">
<span ref="container" :id="id" :class="cx('root')" :style="sx('root')" v-bind="ptm('root')" data-pc-name="calendar">
<input
v-if="!inline"
:ref="inputRef"

View File

@ -1,5 +1,5 @@
<template>
<div :class="cx('root')" v-bind="ptm('root')">
<div :class="cx('root')" v-bind="ptm('root')" data-pc-name="card">
<div v-if="$slots.header" :class="cx('header')" v-bind="ptm('header')">
<slot name="header"></slot>
</div>

View File

@ -1,5 +1,5 @@
<template>
<div ref="container" :class="cx('root')" :style="sx('root')" @click="onContainerClick($event)" v-bind="ptm('root')">
<div ref="container" :class="cx('root')" :style="sx('root')" @click="onContainerClick($event)" v-bind="ptm('root')" data-pc-name="cascadeselect">
<div :class="cx('hiddenInputWrapper')" :style="sx('hiddenAccessible', isUnstyled)" v-bind="ptm('hiddenInputWrapper')" :data-p-hidden-accessible="true">
<input
ref="focusInput"

View File

@ -1,5 +1,5 @@
<template>
<div :class="cx('root')" @click="onClick($event)" v-bind="ptm('root')">
<div :class="cx('root')" @click="onClick($event)" v-bind="ptm('root')" data-pc-name="checkbox">
<div :class="cx('hiddenInputWrapper')" :style="sx('hiddenAccessible', isUnstyled)" v-bind="ptm('hiddenInputWrapper')" :data-p-hidden-accessible="true">
<input
ref="input"

View File

@ -1,5 +1,5 @@
<template>
<div v-if="visible" :class="cx('root')" :aria-label="label" v-bind="ptm('root')">
<div v-if="visible" :class="cx('root')" :aria-label="label" v-bind="ptm('root')" data-pc-name="chip">
<slot>
<img v-if="image" :src="image" v-bind="ptm('image')" />
<component v-else-if="$slots.icon" :is="$slots.icon" :class="cx('icon')" v-bind="ptm('icon')" />

View File

@ -1,5 +1,5 @@
<template>
<div :class="cx('root')" v-bind="ptm('root')">
<div :class="cx('root')" v-bind="ptm('root')" data-pc-name="chips">
<ul
ref="container"
:class="cx('container')"

View File

@ -1,5 +1,5 @@
<template>
<div :class="cx('root')" role="separator" :aria-orientation="layout" v-bind="ptm('root')">
<div :class="cx('root')" role="separator" :aria-orientation="layout" v-bind="ptm('root')" data-pc-name="divider">
<div v-if="$slots.default" :class="cx('content')" v-bind="ptm('content')">
<slot></slot>
</div>

View File

@ -1,5 +1,5 @@
<template>
<div ref="container" :id="id" :class="cx('root')" :style="sx('root')" @click="onContainerClick" v-bind="ptm('root')">
<div ref="container" :id="id" :class="cx('root')" :style="sx('root')" @click="onContainerClick" v-bind="ptm('root')" data-pc-name="dropdown">
<input
v-if="editable"
ref="focusInput"

View File

@ -1,5 +1,5 @@
<template>
<div :class="cx('root')" v-bind="ptm('root')">
<div :class="cx('root')" v-bind="ptm('root')" data-pc-name="editor">
<div ref="toolbarElement" :class="cx('toolbar')" v-bind="ptm('toolbar')">
<slot name="toolbar">
<span :class="cx('formats')" v-bind="ptm('formats')">

View File

@ -1,5 +1,5 @@
<template>
<fieldset :class="cx('root')" v-bind="ptm('root')">
<fieldset :class="cx('root')" v-bind="ptm('root')" data-pc-name="fieldset">
<legend :class="cx('legend')" v-bind="ptm('legend')">
<slot v-if="!toggleable" name="legend">
<span :id="ariaId + '_header'" :class="cx('legendtitle')" v-bind="ptm('legendtitle')">{{ legend }}</span>

View File

@ -1,5 +1,5 @@
<template>
<div v-focustrap :class="cx('root')" aria-live="polite" v-bind="ptm('root')">
<div v-focustrap :class="cx('root')" aria-live="polite" v-bind="ptm('root')" data-pc-name="inplace">
<div v-if="!d_active" ref="display" :class="cx('display')" :tabindex="$attrs.tabindex || '0'" role="button" @click="open" @keydown.enter="open" v-bind="{ ...displayProps, ...ptm('display') }">
<slot name="display"></slot>
</div>

View File

@ -1,5 +1,5 @@
<template>
<input :class="cx('root')" :readonly="readonly" @input="onInput" @focus="onFocus" @blur="onBlur" @keydown="onKeyDown" @keypress="onKeyPress" @paste="onPaste" v-bind="ptm('root')" />
<input :class="cx('root')" :readonly="readonly" @input="onInput" @focus="onFocus" @blur="onBlur" @keydown="onKeyDown" @keypress="onKeyPress" @paste="onPaste" v-bind="ptm('root')" data-pc-name="inputmask" />
</template>
<script>

View File

@ -1,5 +1,5 @@
<template>
<span :class="cx('root')" v-bind="ptm('root')">
<span :class="cx('root')" v-bind="ptm('root')" data-pc-name="inputnumber">
<INInputText
ref="input"
:id="inputId"

View File

@ -1,5 +1,5 @@
<template>
<div :class="cx('root')" :style="sx('root')" @click="onClick($event)" v-bind="ptm('root')">
<div :class="cx('root')" :style="sx('root')" @click="onClick($event)" v-bind="ptm('root')" data-pc-name="inputswitch">
<div :class="cx('hiddenInputWrapper')" :style="sx('hiddenAccessible', isUnstyled)" v-bind="ptm('hiddenInputWrapper')" :data-p-hidden-accessible="true">
<input
ref="input"

View File

@ -1,5 +1,5 @@
<template>
<input :class="cx('root')" :value="modelValue" @input="onInput" v-bind="ptm('root')" />
<input :class="cx('root')" :value="modelValue" @input="onInput" v-bind="ptm('root')" data-pc-name="inputtext" />
</template>
<script>

View File

@ -1,5 +1,5 @@
<template>
<div :class="cx('root')" v-bind="ptm('root')">
<div :class="cx('root')" v-bind="ptm('root')" data-pc-name="knob">
<svg
viewBox="0 0 100 100"
role="slider"

View File

@ -1,5 +1,5 @@
<template>
<div :id="id" :class="cx('root')" @focusout="onFocusout" v-bind="ptm('root')">
<div :id="id" :class="cx('root')" @focusout="onFocusout" v-bind="ptm('root')" data-pc-name="listbox">
<span
ref="firstHiddenFocusableElement"
role="presentation"

View File

@ -1,6 +1,6 @@
<template>
<transition name="p-message" appear>
<div v-show="visible" :class="cx('root')" role="alert" aria-live="assertive" aria-atomic="true" v-bind="ptm('root')">
<div v-show="visible" :class="cx('root')" role="alert" aria-live="assertive" aria-atomic="true" v-bind="ptm('root')" data-pc-name="message">
<div :class="cx('wrapper')" v-bind="ptm('wrapper')">
<slot name="messageicon" class="p-message-icon">
<component :is="icon ? 'span' : iconComponent" :class="cx('icon')" v-bind="ptm('icon')"></component>
@ -20,13 +20,13 @@
</template>
<script>
import BaseMessage from './BaseMessage.vue';
import CheckIcon from 'primevue/icons/check';
import ExclamationTriangleIcon from 'primevue/icons/exclamationtriangle';
import InfoCircleIcon from 'primevue/icons/infocircle';
import TimesIcon from 'primevue/icons/times';
import TimesCircleIcon from 'primevue/icons/timescircle';
import Ripple from 'primevue/ripple';
import BaseMessage from './BaseMessage.vue';
export default {
name: 'Message',

View File

@ -1,5 +1,5 @@
<template>
<div ref="container" :class="cx('root')" @click="onContainerClick" v-bind="ptm('root')">
<div ref="container" :class="cx('root')" @click="onContainerClick" v-bind="ptm('root')" data-pc-name="multiselect">
<div :class="cx('hiddenInputWrapper')" :style="sx('hiddenAccessible', isUnstyled)" v-bind="ptm('hiddenInputWrapper')" :data-p-hidden-accessible="true">
<input
ref="focusInput"

View File

@ -1,5 +1,5 @@
<template>
<div :class="cx('root')" v-bind="ptm('root')">
<div :class="cx('root')" v-bind="ptm('root')" data-pc-name="panel">
<div :class="cx('header')" v-bind="ptm('header')">
<slot :id="ariaId + '_header'" name="header" :class="cx('title')">
<span v-if="header" :id="ariaId + '_header'" :class="cx('title')" v-bind="ptm('title')">{{ header }}</span>

View File

@ -1,5 +1,5 @@
<template>
<div :class="cx('root')" :style="sx('root')" v-bind="ptm('root')">
<div :class="cx('root')" :style="sx('root')" v-bind="ptm('root')" data-pc-name="password">
<PInputText
ref="input"
:id="inputId"

View File

@ -1,5 +1,5 @@
<template>
<div role="progressbar" :class="cx('root')" aria-valuemin="0" :aria-valuenow="value" aria-valuemax="100" v-bind="ptm('root')">
<div role="progressbar" :class="cx('root')" aria-valuemin="0" :aria-valuenow="value" aria-valuemax="100" v-bind="ptm('root')" data-pc-name="progressbar">
<div v-if="determinate" :class="cx('value')" :style="progressStyle" v-bind="ptm('value')">
<div v-if="value != null && value !== 0 && showValue" :class="cx('label')" v-bind="ptm('label')">
<slot>{{ value + '%' }}</slot>

View File

@ -1,5 +1,5 @@
<template>
<div :class="cx('root')" role="progressbar" v-bind="ptm('root')">
<div :class="cx('root')" role="progressbar" v-bind="ptm('root')" data-pc-name="progressspinner">
<svg :class="cx('spinner')" viewBox="25 25 50 50" :style="svgStyle" v-bind="ptm('spinner')">
<circle :class="cx('circle')" cx="50" cy="50" r="20" :fill="fill" :stroke-width="strokeWidth" strokeMiterlimit="10" v-bind="ptm('circle')" />
</svg>

View File

@ -1,5 +1,5 @@
<template>
<div :class="cx('root')" @click="onClick($event)" v-bind="ptm('root')">
<div :class="cx('root')" @click="onClick($event)" v-bind="ptm('root')" data-pc-name="radiobutton">
<div :class="cx('hiddenInputWrapper')" :style="sx('hiddenAccessible', isUnstyled)" v-bind="ptm('hiddenInputWrapper')" :data-p-hidden-accessible="true">
<input ref="input" :id="inputId" type="radio" :name="name" :checked="checked" :disabled="disabled" :value="value" :aria-labelledby="ariaLabelledby" :aria-label="ariaLabel" @focus="onFocus" @blur="onBlur" v-bind="ptm('hiddenInput')" />
</div>

View File

@ -1,5 +1,5 @@
<template>
<div :class="cx('root')" v-bind="ptm('root')">
<div :class="cx('root')" v-bind="ptm('root')" data-pc-name="rating">
<div v-if="cancel" :class="cx('cancelItem')" @click="onOptionClick($event, 0)" v-bind="ptm('cancelItem')" :data-p-focused="focusedOptionIndex === 0">
<span :class="cx('hiddenCancelInputWrapper')" :style="sx('hiddenAccessible', isUnstyled)" v-bind="ptm('hiddenCancelInputWrapper')" :data-p-hidden-accessible="true">
<input

View File

@ -1,5 +1,5 @@
<template>
<div :class="cx('root')" v-bind="ptm('root')">
<div :class="cx('root')" v-bind="ptm('root')" data-pc-name="scrollpanel">
<div :class="cx('wrapper')" v-bind="ptm('wrapper')">
<div ref="content" :class="cx('content')" @scroll="onScroll" @mouseenter="moveBar" v-bind="ptm('content')">
<slot></slot>
@ -36,8 +36,8 @@
</template>
<script>
import BaseScrollPanel from './BaseScrollPanel.vue';
import { DomHandler, UniqueComponentId } from 'primevue/utils';
import BaseScrollPanel from './BaseScrollPanel.vue';
export default {
name: 'ScrollPanel',

View File

@ -1,6 +1,6 @@
<template>
<transition name="p-scrolltop" appear @enter="onEnter" @after-leave="onAfterLeave">
<button v-if="visible" :ref="containerRef" :class="cx('root')" @click="onClick" type="button" :aria-label="scrollTopAriaLabel" v-bind="ptm('root')">
<button v-if="visible" :ref="containerRef" :class="cx('root')" @click="onClick" type="button" :aria-label="scrollTopAriaLabel" v-bind="ptm('root')" data-pc-name="scrolltop">
<slot name="icon" :class="cx('icon')">
<component :is="icon ? 'span' : 'ChevronUpIcon'" :class="[cx('icon'), icon]" v-bind="ptm('icon')" />
</slot>

View File

@ -1,5 +1,5 @@
<template>
<div ref="container" :class="cx('root')" role="group" :aria-labelledby="ariaLabelledby" v-bind="ptm('root')">
<div ref="container" :class="cx('root')" role="group" :aria-labelledby="ariaLabelledby" v-bind="ptm('root')" data-pc-name="selectbutton">
<div
v-for="(option, i) of options"
:key="getOptionRenderKey(option)"

View File

@ -1,5 +1,5 @@
<template>
<div :class="cx('root')" :style="[sx('root'), containerStyle]" aria-hidden="true" v-bind="ptm('root')"></div>
<div :class="cx('root')" :style="[sx('root'), containerStyle]" aria-hidden="true" v-bind="ptm('root')" data-pc-name="skeleton"></div>
</template>
<script>

View File

@ -1,5 +1,5 @@
<template>
<div :class="cx('root')" @click="onBarClick" v-bind="ptm('root')" :data-p-sliding="false">
<div :class="cx('root')" @click="onBarClick" v-bind="ptm('root')" :data-p-sliding="false" data-pc-name="slider">
<span :class="cx('range')" :style="[sx('range'), rangeStyle]" v-bind="ptm('range')"></span>
<span
v-if="!range"

View File

@ -1,5 +1,5 @@
<template>
<div :class="cx('root')" :style="sx('root')" :data-p-resizing="false" v-bind="ptm('root')">
<div :class="cx('root')" :style="sx('root')" :data-p-resizing="false" v-bind="ptm('root')" data-pc-name="splitter">
<template v-for="(panel, i) of panels" :key="i">
<component :is="panel" tabindex="-1"></component>
<div

View File

@ -1,5 +1,5 @@
<template>
<div ref="container" :class="cx('root')" data-pc-name="splitterpanel" v-bind="ptm('root')">
<div ref="container" :class="cx('root')" v-bind="ptm('root')" data-pc-name="splitterpanel">
<slot></slot>
</div>
</template>

View File

@ -1,5 +1,5 @@
<template>
<div :class="cx('root')" v-bind="ptm('root')">
<div :class="cx('root')" v-bind="ptm('root')" data-pc-name="tabview">
<div :class="cx('navContainer')" v-bind="ptm('navContainer')">
<button
v-if="scrollable && !isPrevButtonDisabled"

View File

@ -1,5 +1,5 @@
<template>
<span :class="cx('root')" v-bind="ptm('root')">
<span :class="cx('root')" v-bind="ptm('root')" data-pc-name="tag">
<component v-if="$slots.icon" :is="$slots.icon" :class="cx('icon')" v-bind="ptm('icon')" />
<span v-else-if="icon" :class="[cx('icon'), icon]" v-bind="ptm('icon')"></span>
<slot>

View File

@ -1,5 +1,5 @@
<template>
<div :class="cx('root')" @click="onClick" v-bind="ptm('root')">
<div :class="cx('root')" @click="onClick" v-bind="ptm('root')" data-pc-name="terminal">
<div v-if="welcomeMessage" v-bind="ptm('welcomeMessage')">{{ welcomeMessage }}</div>
<div :class="cx('content')" v-bind="ptm('content')">
<div v-for="(command, i) of commands" :key="command.text + i.toString()" v-bind="ptm('commands')">
@ -16,8 +16,8 @@
</template>
<script>
import BaseTerminal from './BaseTerminal.vue';
import TerminalService from 'primevue/terminalservice';
import BaseTerminal from './BaseTerminal.vue';
export default {
name: 'Terminal',

View File

@ -1,5 +1,5 @@
<template>
<textarea :class="cx('root')" :value="modelValue" @input="onInput" v-bind="ptm('root')"></textarea>
<textarea :class="cx('root')" :value="modelValue" @input="onInput" v-bind="ptm('root')" data-pc-name="textarea"></textarea>
</template>
<script>

View File

@ -1,5 +1,5 @@
<template>
<div ref="container" v-ripple :class="cx('root')" @click="onClick($event)" v-bind="ptm('root')" :data-p-active="modelValue === true">
<div ref="container" v-ripple :class="cx('root')" @click="onClick($event)" v-bind="ptm('root')" :data-p-active="modelValue === true" data-pc-name="togglebutton">
<span :class="cx('hiddenInputWrapper')" :style="sx('hiddenAccessible', isUnstyled)" v-bind="ptm('hiddenInputWrapper')" :data-p-hidden-accessible="true">
<input
:id="inputId"

View File

@ -1,5 +1,5 @@
<template>
<div :class="cx('root')" role="toolbar" :aria-labelledby="ariaLabelledby" data-pc-name="toolbar" data-pc-section="root" v-bind="ptm('root')">
<div :class="cx('root')" role="toolbar" :aria-labelledby="ariaLabelledby" v-bind="ptm('root')" data-pc-name="toolbar">
<div :class="cx('start')" data-pc-section="start" v-bind="ptm('start')">
<slot name="start"></slot>
</div>

View File

@ -1,5 +1,5 @@
<template>
<div :class="cx('root')" v-bind="ptm('root')">
<div :class="cx('root')" v-bind="ptm('root')" data-pc-name="tree">
<template v-if="loading">
<div :class="cx('loadingOverlay')" v-bind="ptm('loadingOverlay')">
<slot name="loadingicon" :class="cx('loadingIcon')">

View File

@ -1,5 +1,5 @@
<template>
<div ref="container" :class="cx('root')" :style="sx('root')" @click="onClick" v-bind="ptm('root')">
<div ref="container" :class="cx('root')" :style="sx('root')" @click="onClick" v-bind="ptm('root')" data-pc-name="treeselect">
<div :class="cx('hiddenInputWrapper')" :style="sx('hiddenAccessible', isUnstyled)" v-bind="ptm('hiddenInputWrapper')" :data-p-hidden-accessible="true">
<input
ref="focusInput"

View File

@ -1,5 +1,5 @@
<template>
<div :class="cx('root')" @click="onClick($event)" v-bind="ptm('root')">
<div :class="cx('root')" @click="onClick($event)" v-bind="ptm('root')" data-pc-name="tristatecheckbox">
<div :class="cx('hiddenInputWrapper')" :style="sx('hiddenAccessible', isUnstyled)" v-bind="ptm('hiddenInputWrapper')" :data-p-hidden-accessible="true">
<input
ref="input"