mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
Fixed #4530 - Export styles of all components
This commit is contained in:
parent
7b6d458067
commit
dc2913e887
463 changed files with 10696 additions and 9670 deletions
|
@ -1,61 +1,6 @@
|
|||
<script>
|
||||
import BaseComponent from 'primevue/basecomponent';
|
||||
import { useStyle } from 'primevue/usestyle';
|
||||
|
||||
const styles = `
|
||||
@layer primevue {
|
||||
.p-splitbutton {
|
||||
display: inline-flex;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.p-splitbutton .p-splitbutton-defaultbutton,
|
||||
.p-splitbutton.p-button-rounded > .p-splitbutton-defaultbutton.p-button,
|
||||
.p-splitbutton.p-button-outlined > .p-splitbutton-defaultbutton.p-button {
|
||||
flex: 1 1 auto;
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
border-right: 0 none;
|
||||
}
|
||||
|
||||
.p-splitbutton-menubutton,
|
||||
.p-splitbutton.p-button-rounded > .p-splitbutton-menubutton.p-button,
|
||||
.p-splitbutton.p-button-outlined > .p-splitbutton-menubutton.p-button {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-top-left-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
|
||||
.p-splitbutton .p-menu {
|
||||
min-width: 100%;
|
||||
}
|
||||
|
||||
.p-fluid .p-splitbutton {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const classes = {
|
||||
root: ({ props }) => [
|
||||
'p-splitbutton p-component',
|
||||
{
|
||||
[`p-button-${props.severity}`]: props.severity,
|
||||
'p-button-raised': props.raised,
|
||||
'p-button-rounded': props.rounded,
|
||||
'p-button-text': props.text,
|
||||
'p-button-outlined': props.outlined,
|
||||
'p-button-sm': props.size === 'small',
|
||||
'p-button-lg': props.size === 'large'
|
||||
}
|
||||
],
|
||||
button: 'p-splitbutton-defaultbutton',
|
||||
menuButton: 'p-splitbutton-menubutton'
|
||||
};
|
||||
|
||||
const { load: loadStyle } = useStyle(styles, { name: 'splitbutton', manual: true });
|
||||
import SplitButtonStyle from 'primevue/splitbutton/style';
|
||||
|
||||
export default {
|
||||
name: 'BaseSplitButton',
|
||||
|
@ -138,10 +83,7 @@ export default {
|
|||
default: false
|
||||
}
|
||||
},
|
||||
css: {
|
||||
classes,
|
||||
loadStyle
|
||||
},
|
||||
style: SplitButtonStyle,
|
||||
provide() {
|
||||
return {
|
||||
$parentInstance: this
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"main": "./splitbutton.cjs.js",
|
||||
"module": "./splitbutton.esm.js",
|
||||
"unpkg": "./splitbutton.min.js",
|
||||
"types": "./SplitButton.d.ts",
|
||||
"browser": {
|
||||
"./sfc": "./SplitButton.vue"
|
||||
}
|
||||
}
|
||||
"main": "./splitbutton.cjs.js",
|
||||
"module": "./splitbutton.esm.js",
|
||||
"unpkg": "./splitbutton.min.js",
|
||||
"types": "./SplitButton.d.ts",
|
||||
"browser": {
|
||||
"./sfc": "./SplitButton.vue"
|
||||
}
|
||||
}
|
||||
|
|
60
components/lib/splitbutton/style/SplitButtonStyle.js
Normal file
60
components/lib/splitbutton/style/SplitButtonStyle.js
Normal file
|
@ -0,0 +1,60 @@
|
|||
import BaseStyle from 'primevue/base/style';
|
||||
|
||||
const css = `
|
||||
@layer primevue {
|
||||
.p-splitbutton {
|
||||
display: inline-flex;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.p-splitbutton .p-splitbutton-defaultbutton,
|
||||
.p-splitbutton.p-button-rounded > .p-splitbutton-defaultbutton.p-button,
|
||||
.p-splitbutton.p-button-outlined > .p-splitbutton-defaultbutton.p-button {
|
||||
flex: 1 1 auto;
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
border-right: 0 none;
|
||||
}
|
||||
|
||||
.p-splitbutton-menubutton,
|
||||
.p-splitbutton.p-button-rounded > .p-splitbutton-menubutton.p-button,
|
||||
.p-splitbutton.p-button-outlined > .p-splitbutton-menubutton.p-button {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-top-left-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
|
||||
.p-splitbutton .p-menu {
|
||||
min-width: 100%;
|
||||
}
|
||||
|
||||
.p-fluid .p-splitbutton {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const classes = {
|
||||
root: ({ props }) => [
|
||||
'p-splitbutton p-component',
|
||||
{
|
||||
[`p-button-${props.severity}`]: props.severity,
|
||||
'p-button-raised': props.raised,
|
||||
'p-button-rounded': props.rounded,
|
||||
'p-button-text': props.text,
|
||||
'p-button-outlined': props.outlined,
|
||||
'p-button-sm': props.size === 'small',
|
||||
'p-button-lg': props.size === 'large'
|
||||
}
|
||||
],
|
||||
button: 'p-splitbutton-defaultbutton',
|
||||
menuButton: 'p-splitbutton-menubutton'
|
||||
};
|
||||
|
||||
export default BaseStyle.extend({
|
||||
name: 'splitbutton',
|
||||
css,
|
||||
classes
|
||||
});
|
5
components/lib/splitbutton/style/package.json
Normal file
5
components/lib/splitbutton/style/package.json
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"main": "./splitbuttonstyle.cjs.js",
|
||||
"module": "./splitbuttonstyle.esm.js",
|
||||
"unpkg": "./splitbuttonstyle.min.js"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue