funda-ui 4.6.399 → 4.7.101
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -2
- package/Stepper/index.css +167 -0
- package/Stepper/index.d.ts +26 -0
- package/Stepper/index.js +509 -0
- package/Table/index.css +4 -4
- package/all.d.ts +1 -0
- package/all.js +1 -0
- package/lib/cjs/Stepper/index.d.ts +26 -0
- package/lib/cjs/Stepper/index.js +509 -0
- package/lib/cjs/index.d.ts +1 -0
- package/lib/cjs/index.js +1 -0
- package/lib/css/Stepper/index.css +167 -0
- package/lib/css/Table/index.css +4 -4
- package/lib/esm/Stepper/index.scss +206 -0
- package/lib/esm/Stepper/index.tsx +264 -0
- package/lib/esm/Table/index.scss +2 -2
- package/lib/esm/index.js +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -59,8 +59,7 @@ Here is a table of the components and their status.
|
|
|
59
59
|
| [Event Calendar ✅🔥](packages/EventCalendar/README.md) | | | | |
|
|
60
60
|
| [Event Calendar Timeline ✅🔥](packages/EventCalendarTimeline/README.md) | | | | |
|
|
61
61
|
| [Chatbox ✅🔥🤖](packages/Chatbox/README.md) | | | | |
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
| [Stepper ✅](packages/Stepper/README.md) | | | | |
|
|
64
63
|
|
|
65
64
|
|
|
66
65
|
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
/* ======================================================
|
|
2
|
+
<!-- Stepper -->
|
|
3
|
+
/* ====================================================== */
|
|
4
|
+
.stepper-container {
|
|
5
|
+
--stepper-color-default: #333;
|
|
6
|
+
--stepper-color-active: white;
|
|
7
|
+
--stepper-color-complete: #2563eb;
|
|
8
|
+
--stepper-bg-default: white;
|
|
9
|
+
--stepper-bg-active: #2563eb;
|
|
10
|
+
--stepper-bg-complete: #22c55e;
|
|
11
|
+
--stepper-border-default: #ccc;
|
|
12
|
+
--stepper-border-active: #2563eb;
|
|
13
|
+
--stepper-border-complete: #22c55e;
|
|
14
|
+
--stepper-indicator-size: 0.875rem;
|
|
15
|
+
--stepper-title-size: 0.875rem;
|
|
16
|
+
position: relative;
|
|
17
|
+
/* NAvigation Header (only horizontal) */
|
|
18
|
+
/* Main Navigation */
|
|
19
|
+
/* Each step item (with circle + title) */
|
|
20
|
+
/* Step Indicator */
|
|
21
|
+
/* Title */
|
|
22
|
+
/* Panels Area */
|
|
23
|
+
/* Buttons */
|
|
24
|
+
/* Panel */
|
|
25
|
+
}
|
|
26
|
+
.stepper-container .stepper-header {
|
|
27
|
+
display: flex;
|
|
28
|
+
align-items: center;
|
|
29
|
+
margin-bottom: 1.5rem;
|
|
30
|
+
flex-wrap: nowrap;
|
|
31
|
+
}
|
|
32
|
+
.stepper-container .step-item {
|
|
33
|
+
flex: none;
|
|
34
|
+
display: flex;
|
|
35
|
+
flex-direction: column;
|
|
36
|
+
align-items: center;
|
|
37
|
+
max-width: 100px;
|
|
38
|
+
position: relative;
|
|
39
|
+
z-index: 1;
|
|
40
|
+
}
|
|
41
|
+
.stepper-container .step-item.step-item--clickable {
|
|
42
|
+
cursor: pointer;
|
|
43
|
+
}
|
|
44
|
+
.stepper-container .step-line {
|
|
45
|
+
flex: 1;
|
|
46
|
+
height: 2px;
|
|
47
|
+
background-color: #ddd;
|
|
48
|
+
margin: 0 4px;
|
|
49
|
+
position: relative;
|
|
50
|
+
top: -10px;
|
|
51
|
+
z-index: 0;
|
|
52
|
+
}
|
|
53
|
+
.stepper-container .step-line--complete {
|
|
54
|
+
background-color: var(--stepper-bg-complete);
|
|
55
|
+
}
|
|
56
|
+
.stepper-container .step-line--active {
|
|
57
|
+
background-color: var(--stepper-bg-complete);
|
|
58
|
+
}
|
|
59
|
+
.stepper-container .step-indicator {
|
|
60
|
+
width: 32px;
|
|
61
|
+
height: 32px;
|
|
62
|
+
margin: 0 auto 0.25rem;
|
|
63
|
+
border-radius: 9999px;
|
|
64
|
+
display: flex;
|
|
65
|
+
align-items: center;
|
|
66
|
+
justify-content: center;
|
|
67
|
+
border: 2px solid #ccc;
|
|
68
|
+
font-size: var(--stepper-indicator-size);
|
|
69
|
+
/* default */
|
|
70
|
+
background-color: var(--stepper-bg-default);
|
|
71
|
+
color: var(--stepper-color-default);
|
|
72
|
+
border-color: var(--stepper-border-default);
|
|
73
|
+
}
|
|
74
|
+
.stepper-container .step-indicator--active {
|
|
75
|
+
background-color: var(--stepper-bg-active);
|
|
76
|
+
color: var(--stepper-color-active);
|
|
77
|
+
border-color: var(--stepper-border-active);
|
|
78
|
+
}
|
|
79
|
+
.stepper-container .step-indicator--complete {
|
|
80
|
+
background-color: var(--stepper-bg-complete);
|
|
81
|
+
color: var(--stepper-color-active);
|
|
82
|
+
border-color: var(--stepper-border-complete);
|
|
83
|
+
}
|
|
84
|
+
.stepper-container .step-title {
|
|
85
|
+
font-size: var(--stepper-title-size);
|
|
86
|
+
/* default */
|
|
87
|
+
color: var(--stepper-color-default);
|
|
88
|
+
}
|
|
89
|
+
.stepper-container .step-title--active {
|
|
90
|
+
font-weight: bold;
|
|
91
|
+
}
|
|
92
|
+
.stepper-container .stepper-buttons {
|
|
93
|
+
display: flex;
|
|
94
|
+
justify-content: space-between;
|
|
95
|
+
margin-top: 1rem;
|
|
96
|
+
}
|
|
97
|
+
.stepper-container .stepper-panel {
|
|
98
|
+
width: 100%;
|
|
99
|
+
}
|
|
100
|
+
.stepper-container .stepper-panel-header {
|
|
101
|
+
font-size: 1.25rem;
|
|
102
|
+
font-weight: bold;
|
|
103
|
+
margin-bottom: 1rem;
|
|
104
|
+
display: none;
|
|
105
|
+
}
|
|
106
|
+
.stepper-container .stepper-panel-content {
|
|
107
|
+
width: 100%;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/*------ Verticle ------*/
|
|
111
|
+
.stepper-container.stepper-container--vertical {
|
|
112
|
+
display: flex;
|
|
113
|
+
flex-direction: column;
|
|
114
|
+
gap: 1rem;
|
|
115
|
+
}
|
|
116
|
+
.stepper-container.stepper-container--vertical .vertical-step-row {
|
|
117
|
+
display: flex;
|
|
118
|
+
align-items: flex-start;
|
|
119
|
+
margin-bottom: 1rem;
|
|
120
|
+
}
|
|
121
|
+
.stepper-container.stepper-container--vertical .vertical-step-left {
|
|
122
|
+
flex-shrink: 0;
|
|
123
|
+
width: 50px;
|
|
124
|
+
position: relative;
|
|
125
|
+
}
|
|
126
|
+
.stepper-container.stepper-container--vertical .vertical-step-left .step-item {
|
|
127
|
+
margin-top: 20px;
|
|
128
|
+
}
|
|
129
|
+
.stepper-container.stepper-container--vertical .vertical-step-left .step-line {
|
|
130
|
+
position: absolute;
|
|
131
|
+
left: 20px;
|
|
132
|
+
}
|
|
133
|
+
.stepper-container.stepper-container--vertical .vertical-step-right {
|
|
134
|
+
flex: 1;
|
|
135
|
+
left: 70px;
|
|
136
|
+
width: calc(100% - 70px);
|
|
137
|
+
position: absolute;
|
|
138
|
+
top: 1.5rem;
|
|
139
|
+
}
|
|
140
|
+
.stepper-container.stepper-container--vertical .step-title {
|
|
141
|
+
display: none;
|
|
142
|
+
margin-left: 0.3rem;
|
|
143
|
+
}
|
|
144
|
+
.stepper-container.stepper-container--vertical .stepper-panel-header {
|
|
145
|
+
display: block;
|
|
146
|
+
}
|
|
147
|
+
.stepper-container.stepper-container--vertical .stepper-header {
|
|
148
|
+
display: flex;
|
|
149
|
+
flex-direction: column;
|
|
150
|
+
position: relative;
|
|
151
|
+
padding-left: 2rem;
|
|
152
|
+
}
|
|
153
|
+
.stepper-container.stepper-container--vertical .stepper-header .step-item {
|
|
154
|
+
flex-direction: row;
|
|
155
|
+
max-width: 150px;
|
|
156
|
+
}
|
|
157
|
+
.stepper-container.stepper-container--vertical .stepper-header .step-item:not(:first-child) {
|
|
158
|
+
margin-top: 8px;
|
|
159
|
+
}
|
|
160
|
+
.stepper-container.stepper-container--vertical .step-line {
|
|
161
|
+
flex: auto;
|
|
162
|
+
width: 2px;
|
|
163
|
+
height: 40px;
|
|
164
|
+
margin-top: 4px;
|
|
165
|
+
top: auto;
|
|
166
|
+
left: -24px;
|
|
167
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface StepperPanelProps {
|
|
3
|
+
header: React.ReactNode;
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
style?: React.CSSProperties;
|
|
6
|
+
}
|
|
7
|
+
interface StepperProps {
|
|
8
|
+
wrapperClassName?: string;
|
|
9
|
+
indicatorClickAllowed?: boolean;
|
|
10
|
+
style?: React.CSSProperties;
|
|
11
|
+
initialStep?: number;
|
|
12
|
+
layout?: 'horizontal' | 'vertical';
|
|
13
|
+
completeIcon?: React.ReactNode;
|
|
14
|
+
disableCompleteIcon?: boolean;
|
|
15
|
+
onChange?: (index: number, isLastStepComplete: boolean) => void;
|
|
16
|
+
children: React.ReactElement<StepperPanelProps>[];
|
|
17
|
+
}
|
|
18
|
+
interface StepperRef {
|
|
19
|
+
goto: (index: number) => void;
|
|
20
|
+
next: () => void;
|
|
21
|
+
prev: () => void;
|
|
22
|
+
}
|
|
23
|
+
declare const StepperPanel: React.FC<StepperPanelProps>;
|
|
24
|
+
declare const Stepper: React.ForwardRefExoticComponent<StepperProps & React.RefAttributes<StepperRef>>;
|
|
25
|
+
export { Stepper, StepperPanel };
|
|
26
|
+
export type { StepperProps, StepperPanelProps, StepperRef };
|