mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
Fixed #5266 - New Stepper component
This commit is contained in:
parent
3ddf127783
commit
62e6aaeb28
17 changed files with 976 additions and 0 deletions
3
components/lib/stepper/style/StepperStyle.d.ts
vendored
Normal file
3
components/lib/stepper/style/StepperStyle.d.ts
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
import { BaseStyle } from '../../base/style';
|
||||
|
||||
export interface StepperStyle extends BaseStyle {}
|
46
components/lib/stepper/style/StepperStyle.js
Normal file
46
components/lib/stepper/style/StepperStyle.js
Normal file
|
@ -0,0 +1,46 @@
|
|||
import BaseStyle from 'primevue/base/style';
|
||||
|
||||
const classes = {
|
||||
root: ({ props }) => [
|
||||
'p-stepper p-component',
|
||||
{
|
||||
'p-stepper-horizontal': props.orientation === 'horizontal',
|
||||
'p-stepper-vertical': props.orientation === 'vertical',
|
||||
'p-readonly': props.linear
|
||||
}
|
||||
],
|
||||
navContainer: 'p-stepper-nav-container',
|
||||
nav: 'p-stepper-nav',
|
||||
stepper: {
|
||||
header: ({ instance, step, index }) => [
|
||||
'p-stepper-header',
|
||||
{
|
||||
'p-highlight': instance.isStepActive(index),
|
||||
'p-disabled': instance.isItemDisabled(step, index)
|
||||
}
|
||||
],
|
||||
action: 'p-stepper-action',
|
||||
number: 'p-stepper-number',
|
||||
title: 'p-stepper-title',
|
||||
separator: 'p-stepper-separator',
|
||||
toggleableContent: 'p-stepper-toggleable-content',
|
||||
content: ({ props }) => [
|
||||
'p-stepper-content',
|
||||
{
|
||||
'p-toggleable-content': props.orientation === 'vertical'
|
||||
}
|
||||
]
|
||||
},
|
||||
panelContainer: 'p-stepper-panels',
|
||||
panel: ({ instance, props, index }) => [
|
||||
'p-stepper-panel',
|
||||
{
|
||||
'p-stepper-panel-active': props.orientation === 'vertical' && instance.isStepActive(index)
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
export default BaseStyle.extend({
|
||||
name: 'stepper',
|
||||
classes
|
||||
});
|
6
components/lib/stepper/style/package.json
Normal file
6
components/lib/stepper/style/package.json
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"main": "./stepperpanel.cjs.js",
|
||||
"module": "./stepperpanel.esm.js",
|
||||
"unpkg": "./stepperpanel.min.js",
|
||||
"types": "./StepperPanel.d.ts"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue