Skip to content

Commit da77580

Browse files
fix: change data-p-* as data-*
1 parent dbb4d41 commit da77580

9 files changed

Lines changed: 15 additions & 15 deletions

File tree

apps/showcase/demo/primitives/fileupload/basic-demo.module.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
background-color 200ms ease;
9595
}
9696

97-
.content[data-p-highlight="true"] {
97+
.content[data-highlight="true"] {
9898
border-color: var(--p-primary-color);
9999
background: light-dark(var(--p-primary-50), rgba(var(--p-primary-500), 0.05));
100100
}

apps/showcase/demo/primitives/splitter/basic-demo.module.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
outline-offset: -1px;
2929
}
3030

31-
.gutter[data-p-disabled] {
31+
.gutter[data-disabled] {
3232
pointer-events: none;
3333
opacity: 0.4;
3434
cursor: default;

apps/showcase/docs/headless/fileupload/features.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,10 @@ fileupload.removeUploadedFile(0); // Remove first uploaded file
146146

147147
### Drag-and-Drop Feedback
148148

149-
The `contentProps` object includes drag event handlers and a callback ref for the drop zone. The content element receives `data-p-highlight="true"` during drag-over.
149+
The `contentProps` object includes drag event handlers and a callback ref for the drop zone. The content element receives `data-highlight="true"` during drag-over.
150150

151151
```css
152-
[data-scope='fileupload'][data-part='content'][data-p-highlight='true'] {
152+
[data-scope='fileupload'][data-part='content'][data-highlight='true'] {
153153
border-color: var(--primary);
154154
background: var(--primary-bg);
155155
}

apps/showcase/docs/headless/splitter/features.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ const gutterProps = getGutterProps(0, { disabled: true });
131131
cursor: row-resize;
132132
user-select: none;
133133
}
134-
[data-p-disabled] {
134+
[data-disabled] {
135135
pointer-events: none;
136136
opacity: 0.4;
137137
}

apps/showcase/docs/primitives/fileupload/features.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@ Default elements: `Root`=`div`, `Content`=`div`, `List`=`div`, `ItemGroup`=`div`
9696

9797
<DocApiTable name="FileUploadContent" category="api" />
9898

99-
| Attribute | Value |
100-
| ------------------ | --------------------------------------------- |
101-
| `data-p-highlight` | `"true"` when files are dragged over the zone |
99+
| Attribute | Value |
100+
| ---------------- | --------------------------------------------- |
101+
| `data-highlight` | `"true"` when files are dragged over the zone |
102102

103103
### FileUploadList
104104

apps/showcase/docs/primitives/splitter/features.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Sub-components accept a render function as children, providing access to the com
6363
| ------------------ | --------------------------------- |
6464
| `data-orientation` | `"horizontal"` or `"vertical"` |
6565
| `data-resizing` | Present during a resize operation |
66-
| `data-p-disabled` | Present when disabled |
66+
| `data-disabled` | Present when disabled |
6767

6868
### SplitterPanel
6969

@@ -83,7 +83,7 @@ Sub-components accept a render function as children, providing access to the com
8383
| ------------------ | --------------------------------- |
8484
| `data-orientation` | `"horizontal"` or `"vertical"` |
8585
| `data-resizing` | Present during a resize operation |
86-
| `data-p-disabled` | Present when disabled |
86+
| `data-disabled` | Present when disabled |
8787

8888
### SplitterThumb
8989

packages/@primereact/headless/src/fileupload/useFileUpload.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ export const useFileUpload = withHeadless({
268268
if (!props.disabled && (!hasFiles || props.multiple)) {
269269
// !isUnstyled &&
270270
addClass(contentRef.current as HTMLDivElement, 'p-fileupload-highlight');
271-
(contentRef.current as HTMLDivElement).setAttribute('data-p-highlight', 'true');
271+
(contentRef.current as HTMLDivElement).setAttribute('data-highlight', 'true');
272272
event.stopPropagation();
273273
event.preventDefault();
274274
}
@@ -278,15 +278,15 @@ export const useFileUpload = withHeadless({
278278
if (!props.disabled) {
279279
// !isUnstyled &&
280280
removeClass(contentRef.current as HTMLDivElement, 'p-fileupload-highlight');
281-
(contentRef.current as HTMLDivElement).setAttribute('data-p-highlight', 'false');
281+
(contentRef.current as HTMLDivElement).setAttribute('data-highlight', 'false');
282282
}
283283
};
284284

285285
const onDrop = (event: DragEvent) => {
286286
if (!props.disabled) {
287287
// !isUnstyled &&
288288
removeClass(contentRef.current as HTMLDivElement, 'p-fileupload-highlight');
289-
(contentRef.current as HTMLDivElement).setAttribute('data-p-highlight', 'false');
289+
(contentRef.current as HTMLDivElement).setAttribute('data-highlight', 'false');
290290
event.stopPropagation();
291291
event.preventDefault();
292292

packages/@primereact/styles/src/splitter/Splitter.style.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export const style = /*css*/ `
8383
cursor: row-resize;
8484
}
8585
86-
.p-splitter-gutter[data-p-disabled] {
86+
.p-splitter-gutter[data-disabled] {
8787
cursor: default;
8888
pointer-events: none;
8989
opacity: 0.4;

packages/@primereact/types/src/primitive/stepper/StepperPanel.types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export interface StepperPanelElementProps {
6767
/**
6868
* Whether the panel is active.
6969
*/
70-
'data-p-active': boolean;
70+
'data-active': boolean;
7171
}
7272

7373
/**

0 commit comments

Comments
 (0)