@alfalab/core-components-steps 1.6.3 → 1.7.0

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.
Files changed (36) hide show
  1. package/Component.js +1 -1
  2. package/components/step/Component.js +1 -1
  3. package/components/step/index.css +31 -31
  4. package/components/step-indicator/Component.js +1 -1
  5. package/components/step-indicator/index.css +2 -2
  6. package/esm/Component.js +1 -1
  7. package/esm/components/step/Component.js +1 -1
  8. package/esm/components/step/index.css +31 -31
  9. package/esm/components/step-indicator/Component.js +1 -1
  10. package/esm/components/step-indicator/index.css +2 -2
  11. package/esm/index.css +3 -3
  12. package/index.css +3 -3
  13. package/modern/Component.js +1 -1
  14. package/modern/components/step/Component.js +1 -1
  15. package/modern/components/step/index.css +31 -31
  16. package/modern/components/step-indicator/Component.js +1 -1
  17. package/modern/components/step-indicator/index.css +2 -2
  18. package/modern/index.css +3 -3
  19. package/moderncssm/Component.d.ts +99 -0
  20. package/moderncssm/Component.js +39 -0
  21. package/moderncssm/components/step/Component.d.ts +80 -0
  22. package/moderncssm/components/step/Component.js +89 -0
  23. package/moderncssm/components/step/index.d.ts +1 -0
  24. package/moderncssm/components/step/index.js +1 -0
  25. package/moderncssm/components/step/index.module.css +170 -0
  26. package/moderncssm/components/step-indicator/Component.d.ts +6 -0
  27. package/moderncssm/components/step-indicator/Component.js +8 -0
  28. package/moderncssm/components/step-indicator/index.d.ts +1 -0
  29. package/moderncssm/components/step-indicator/index.js +1 -0
  30. package/moderncssm/components/step-indicator/index.module.css +3 -0
  31. package/moderncssm/index.d.ts +1 -0
  32. package/moderncssm/index.js +1 -0
  33. package/moderncssm/index.module.css +12 -0
  34. package/package.json +4 -4
  35. package/src/components/step/index.module.css +1 -1
  36. package/src/index.module.css +1 -1
@@ -0,0 +1,170 @@
1
+ /* */
2
+
3
+ :root {
4
+ --steps-option-svg-color: var(--color-light-status-positive);
5
+ --steps-dash-border: 2px solid var(--color-light-status-positive);
6
+ }
7
+
8
+ .step {
9
+ display: flex;
10
+ outline: none
11
+ }
12
+
13
+ .step:not(.vertical) {
14
+ align-items: center;
15
+ }
16
+
17
+ .step.interactive:not(.disabled):hover {
18
+ cursor: pointer;
19
+ }
20
+
21
+ .step.disabled:hover .text {
22
+ background: unset;
23
+ }
24
+
25
+ .step.disabled .indicator {
26
+ cursor: unset;
27
+ }
28
+
29
+ .indicator {
30
+ cursor: pointer;
31
+ display: flex;
32
+ align-items: center;
33
+ margin-right: var(--gap-4)
34
+ }
35
+
36
+ .indicator.vertical {
37
+ flex-direction: column;
38
+ margin-right: var(--gap-8);
39
+ }
40
+
41
+ .option {
42
+ font-size: 14px;
43
+ line-height: 20px;
44
+ font-weight: 700;
45
+
46
+ display: flex;
47
+ align-items: center;
48
+ justify-content: center;
49
+ color: var(--color-light-text-primary);
50
+ background: var(--color-light-neutral-translucent-300);
51
+ min-width: 24px;
52
+ height: 24px;
53
+ border-radius: var(--border-radius-circle)
54
+ }
55
+
56
+ .option.vertical {
57
+ margin-top: var(--gap-8);
58
+ }
59
+
60
+ .dash {
61
+ flex: 1 1 auto;
62
+ min-width: 24px;
63
+ border-top: 2px solid var(--color-light-neutral-translucent-300);
64
+ margin-right: var(--gap-8)
65
+ }
66
+
67
+ .dash.size-16 {
68
+ min-width: 16px;
69
+ }
70
+
71
+ .dash.size-8 {
72
+ min-width: 8px;
73
+ }
74
+
75
+ .dash.completed {
76
+ border-top: var(--steps-dash-border);
77
+ }
78
+
79
+ .dash.vertical {
80
+ min-width: unset;
81
+ min-height: 24px;
82
+ margin-right: 0;
83
+ margin-top: var(--gap-8);
84
+ border-left: 2px solid var(--color-light-neutral-translucent-300);
85
+ border-top: none
86
+ }
87
+
88
+ .dash.vertical.size-16 {
89
+ min-height: 16px;
90
+ }
91
+
92
+ .dash.vertical.size-8 {
93
+ min-height: 8px;
94
+ }
95
+
96
+ .dash.completed.vertical {
97
+ border-left: var(--steps-dash-border);
98
+ }
99
+
100
+ .text {
101
+ font-size: 16px;
102
+ line-height: 24px;
103
+ font-weight: 400;
104
+
105
+ transition: background 0.2s;
106
+ padding: var(--gap-8);
107
+ color: var(--color-light-text-primary);
108
+ border-radius: var(--gap-8);
109
+ height: min-content
110
+ }
111
+
112
+ .text.interactive:not(.disabled):hover {
113
+ background: var(--color-light-transparent-default-hover);
114
+ }
115
+
116
+ .text.interactive:not(.disabled):active {
117
+ background: var(--color-light-transparent-default-press);
118
+ }
119
+
120
+ .focused {
121
+ outline: var(--gap-2) solid var(--focus-color);
122
+ outline-offset: var(--gap-2);
123
+ }
124
+
125
+ .selected .text {
126
+ color: var(--color-light-text-primary);
127
+ }
128
+
129
+ .selected .option {
130
+ color: var(--color-light-text-primary-inverted);
131
+ background: var(--color-light-neutral-translucent-1300);
132
+ }
133
+
134
+ .checkbox {
135
+ display: flex;
136
+ justify-content: center;
137
+ align-items: center;
138
+ border-radius: var(--border-radius-circle);
139
+ width: 20px;
140
+ height: 20px;
141
+ border: 2px solid var(--color-light-neutral-translucent-300);
142
+ }
143
+
144
+ .dot {
145
+ width: 10px;
146
+ height: 10px;
147
+ border-radius: var(--border-radius-circle);
148
+ background: var(--color-light-neutral-translucent-300);
149
+ }
150
+
151
+ .selected .checkbox {
152
+ border: 2px solid var(--color-light-neutral-translucent-1300)
153
+ }
154
+
155
+ .selected .checkbox .dot {
156
+ background: var(--color-light-neutral-translucent-1300);
157
+ }
158
+
159
+ .option:not(.error).unordered {
160
+ background: unset;
161
+ }
162
+
163
+ .completedIndicator > [class*='positive'] {
164
+ color: var(--steps-option-svg-color);
165
+ background-color: var(--steps-option-svg-color);
166
+ }
167
+
168
+ .fullWidth {
169
+ width: 100%;
170
+ }
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import React from 'react';
3
+ import { BadgeProps } from "@alfalab/core-components-badge";
4
+ type StepIndicatorProps = Pick<BadgeProps, 'content' | 'iconColor' | 'className'>;
5
+ declare const StepIndicator: React.FC<StepIndicatorProps>;
6
+ export { StepIndicatorProps, StepIndicator };
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import cn from 'classnames';
3
+ import { Badge } from '@alfalab/core-components-badge/moderncssm';
4
+ import styles from './index.module.css';
5
+
6
+ const StepIndicator = ({ content, iconColor, className }) => (React.createElement(Badge, { size: 'l', view: 'icon', iconColor: iconColor, className: cn(styles.component, className), content: content }));
7
+
8
+ export { StepIndicator };
@@ -0,0 +1 @@
1
+ export * from "./Component";
@@ -0,0 +1 @@
1
+ export { StepIndicator } from './Component.js';
@@ -0,0 +1,3 @@
1
+ .component.component {
2
+ padding: 0;
3
+ }
@@ -0,0 +1 @@
1
+ export * from "./Component";
@@ -0,0 +1 @@
1
+ export { Steps } from './Component.js';
@@ -0,0 +1,12 @@
1
+ /* */
2
+
3
+ .component {
4
+ display: flex;
5
+ align-items: center;
6
+ flex-direction: row
7
+ }
8
+
9
+ .component.vertical {
10
+ flex-direction: column;
11
+ align-items: flex-start;
12
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfalab/core-components-steps",
3
- "version": "1.6.3",
3
+ "version": "1.7.0",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -14,12 +14,12 @@
14
14
  "react": "^16.9.0 || ^17.0.1 || ^18.0.0"
15
15
  },
16
16
  "dependencies": {
17
- "@alfalab/core-components-badge": "^5.5.3",
17
+ "@alfalab/core-components-badge": "^5.6.0",
18
18
  "@alfalab/hooks": "^1.13.0",
19
19
  "@alfalab/icons-glyph": "^2.139.0",
20
20
  "classnames": "^2.3.1",
21
21
  "tslib": "^2.4.0"
22
22
  },
23
- "themesVersion": "13.0.2",
24
- "varsVersion": "9.11.1"
23
+ "themesVersion": "13.1.0",
24
+ "varsVersion": "9.12.0"
25
25
  }
@@ -1,4 +1,4 @@
1
- @import '@alfalab/core-components-themes/src/default.css';
1
+ @import '@alfalab/core-components-vars/src/index.css';
2
2
 
3
3
  :root {
4
4
  --steps-option-svg-color: var(--color-light-status-positive);
@@ -1,4 +1,4 @@
1
- @import '@alfalab/core-components-themes/src/default.css';
1
+ @import '@alfalab/core-components-vars/src/index.css';
2
2
 
3
3
  .component {
4
4
  display: flex;