Skip to content

Commit

Permalink
Merge branch 'master' of github.com:didix16/primereact
Browse files Browse the repository at this point in the history
  • Loading branch information
didix16 committed May 14, 2024
2 parents 524ab3a + fee2bdf commit 79ab790
Show file tree
Hide file tree
Showing 56 changed files with 4,436 additions and 831 deletions.
24 changes: 0 additions & 24 deletions components/doc/common/apidoc/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -10029,14 +10029,6 @@
"default": "",
"description": "Used to get the child elements of the component."
},
{
"name": "className",
"optional": true,
"readonly": false,
"type": "string",
"default": "",
"description": "Style class of the element."
},
{
"name": "data",
"optional": true,
Expand All @@ -10053,14 +10045,6 @@
"default": "",
"description": "Height of the chart in non-responsive mode."
},
{
"name": "id",
"optional": true,
"readonly": false,
"type": "string",
"default": "",
"description": "Unique identifier of the element."
},
{
"name": "options",
"optional": true,
Expand Down Expand Up @@ -10093,14 +10077,6 @@
"default": "",
"description": "Used to configure passthrough(pt) options of the component."
},
{
"name": "style",
"optional": true,
"readonly": false,
"type": "CSSProperties",
"default": "",
"description": "Inline style of the element."
},
{
"name": "type",
"optional": true,
Expand Down
14 changes: 1 addition & 13 deletions components/lib/chart/chart.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,7 @@ export interface ChartPassThroughOptions {
* Defines valid properties in Chart component.
* @group Properties
*/
export interface ChartProps {
/**
* Unique identifier of the element.
*/
id?: string | undefined;
export interface ChartProps extends Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, 'ref' | 'content' | 'pt'> {
/**
* Type of the chart.
*/
Expand All @@ -74,14 +70,6 @@ export interface ChartProps {
* Height of the chart in non-responsive mode.
*/
height?: string | undefined;
/**
* Inline style of the element.
*/
style?: React.CSSProperties | undefined;
/**
* Style class of the element.
*/
className?: string | undefined;
/**
* ARIA label for the chart canvas. Defaults to options.plugins.title.text if available.
* @default options.plugins.title.text
Expand Down
3 changes: 2 additions & 1 deletion components/lib/inputnumber/InputNumber.js
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,8 @@ export const InputNumber = React.memo(
if (sign.isMinusSign) {
const isNewMinusSign = minusCharIndex === -1;

if (isNewMinusSign && (selectionStart === 0 || selectionStart === currencyCharIndex + 1)) {
// #6522 - Selected negative value can't be overwritten with a minus ('-') symbol
if (selectionStart === 0 || selectionStart === currencyCharIndex + 1) {
newValueStr = inputValue;

if (isNewMinusSign || selectionEnd !== 0) {
Expand Down
80 changes: 0 additions & 80 deletions components/lib/tabview/TabViewBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,85 +23,6 @@ const classes = {
}
};

const styles = `
@layer primereact {
.p-tabview-nav-container {
position: relative;
}
.p-tabview-scrollable .p-tabview-nav-container {
overflow: hidden;
}
.p-tabview-nav-content {
overflow-x: auto;
overflow-y: hidden;
scroll-behavior: smooth;
scrollbar-width: none;
overscroll-behavior: contain auto;
position: relative;
}
.p-tabview-nav {
display: flex;
margin: 0;
padding: 0;
list-style-type: none;
flex: 1 1 auto;
}
.p-tabview-nav-link {
cursor: pointer;
user-select: none;
display: flex;
align-items: center;
position: relative;
text-decoration: none;
overflow: hidden;
}
.p-tabview-ink-bar {
display: none;
z-index: 1;
}
.p-tabview-nav-link:focus {
z-index: 1;
}
.p-tabview-close {
z-index: 1;
}
.p-tabview-title {
line-height: 1;
white-space: nowrap;
}
.p-tabview-nav-btn {
position: absolute;
top: 0;
z-index: 2;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.p-tabview-nav-prev {
left: 0;
}
.p-tabview-nav-next {
right: 0;
}
.p-tabview-nav-content::-webkit-scrollbar {
display: none;
}
}
`;

const inlineStyles = {
tab: {
header: ({ headerStyle, _style }) => ({ ...(headerStyle || {}), ...(_style || {}) }),
Expand Down Expand Up @@ -129,7 +50,6 @@ export const TabViewBase = ComponentBase.extend({
},
css: {
classes,
styles,
inlineStyles
}
});
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"build:lib": "NODE_ENV=production INPUT_DIR=components/lib/ OUTPUT_DIR=dist/ npm run build:package",
"build:package": "npm run build:check && rollup -c && gulp build-resources && npm run build:api",
"dev:link": "NPM_LINK=true NODE_ENV=production INPUT_DIR=components/lib/ OUTPUT_DIR=dist/ npm run build:package:dev",
"dev:link:windows": "set NPM_LINK=true && set NODE_ENV=production&& set INPUT_DIR=components/lib/&& set OUTPUT_DIR=dist/&& npm run build:package:dev",
"build:package:dev": "npm run build:check && rollup -c --watch && gulp build-resources && npm run build:api",
"dev:link:windows": "set \"NPM_LINK=true\" && set \"NODE_ENV=production\" && set \"INPUT_DIR=components/lib/\" && set \"OUTPUT_DIR=dist/\" && npm run build:package:dev",
"build:package:dev": "npm run build:check && gulp build-resources && npm run build:api && rollup -c --watch",
"build:api": "npm run apiwebtypes && npm run apidoc",
"build:check": "npm run lint && npm run format:check && npm run type:check && npm run security:check",
"security:check": "npm audit --production --audit-level high",
Expand Down
62 changes: 62 additions & 0 deletions public/themes/arya-blue/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -4660,6 +4660,68 @@
outline-offset: 0;
box-shadow: 0 0 0 1px #93cbf9;
}
.p-tabview-nav-container {
position: relative;
}
.p-tabview-scrollable .p-tabview-nav-container {
overflow: hidden;
}
.p-tabview-nav-content {
overflow-x: auto;
overflow-y: hidden;
scroll-behavior: smooth;
scrollbar-width: none;
overscroll-behavior: contain auto;
position: relative;
}
.p-tabview-nav {
display: flex;
margin: 0;
padding: 0;
list-style-type: none;
flex: 1 1 auto;
}
.p-tabview-nav-link {
cursor: pointer;
user-select: none;
display: flex;
align-items: center;
position: relative;
text-decoration: none;
overflow: hidden;
}
.p-tabview-ink-bar {
display: none;
z-index: 1;
}
.p-tabview-nav-link:focus {
z-index: 1;
}
.p-tabview-close {
z-index: 1;
}
.p-tabview-title {
line-height: 1;
white-space: nowrap;
}
.p-tabview-nav-btn {
position: absolute;
top: 0;
z-index: 2;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.p-tabview-nav-prev {
left: 0;
}
.p-tabview-nav-next {
right: 0;
}
.p-tabview-nav-content::-webkit-scrollbar {
display: none;
}
.p-tabview .p-tabview-nav {
background: transparent;
border: 1px solid #383838;
Expand Down
62 changes: 62 additions & 0 deletions public/themes/arya-green/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -4660,6 +4660,68 @@
outline-offset: 0;
box-shadow: 0 0 0 1px #a7d8a9;
}
.p-tabview-nav-container {
position: relative;
}
.p-tabview-scrollable .p-tabview-nav-container {
overflow: hidden;
}
.p-tabview-nav-content {
overflow-x: auto;
overflow-y: hidden;
scroll-behavior: smooth;
scrollbar-width: none;
overscroll-behavior: contain auto;
position: relative;
}
.p-tabview-nav {
display: flex;
margin: 0;
padding: 0;
list-style-type: none;
flex: 1 1 auto;
}
.p-tabview-nav-link {
cursor: pointer;
user-select: none;
display: flex;
align-items: center;
position: relative;
text-decoration: none;
overflow: hidden;
}
.p-tabview-ink-bar {
display: none;
z-index: 1;
}
.p-tabview-nav-link:focus {
z-index: 1;
}
.p-tabview-close {
z-index: 1;
}
.p-tabview-title {
line-height: 1;
white-space: nowrap;
}
.p-tabview-nav-btn {
position: absolute;
top: 0;
z-index: 2;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.p-tabview-nav-prev {
left: 0;
}
.p-tabview-nav-next {
right: 0;
}
.p-tabview-nav-content::-webkit-scrollbar {
display: none;
}
.p-tabview .p-tabview-nav {
background: transparent;
border: 1px solid #383838;
Expand Down
62 changes: 62 additions & 0 deletions public/themes/arya-orange/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -4660,6 +4660,68 @@
outline-offset: 0;
box-shadow: 0 0 0 1px #ffe284;
}
.p-tabview-nav-container {
position: relative;
}
.p-tabview-scrollable .p-tabview-nav-container {
overflow: hidden;
}
.p-tabview-nav-content {
overflow-x: auto;
overflow-y: hidden;
scroll-behavior: smooth;
scrollbar-width: none;
overscroll-behavior: contain auto;
position: relative;
}
.p-tabview-nav {
display: flex;
margin: 0;
padding: 0;
list-style-type: none;
flex: 1 1 auto;
}
.p-tabview-nav-link {
cursor: pointer;
user-select: none;
display: flex;
align-items: center;
position: relative;
text-decoration: none;
overflow: hidden;
}
.p-tabview-ink-bar {
display: none;
z-index: 1;
}
.p-tabview-nav-link:focus {
z-index: 1;
}
.p-tabview-close {
z-index: 1;
}
.p-tabview-title {
line-height: 1;
white-space: nowrap;
}
.p-tabview-nav-btn {
position: absolute;
top: 0;
z-index: 2;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.p-tabview-nav-prev {
left: 0;
}
.p-tabview-nav-next {
right: 0;
}
.p-tabview-nav-content::-webkit-scrollbar {
display: none;
}
.p-tabview .p-tabview-nav {
background: transparent;
border: 1px solid #383838;
Expand Down
Loading

0 comments on commit 79ab790

Please sign in to comment.