@alfalab/core-components-steps 1.7.4 → 1.8.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 (76) hide show
  1. package/Component.d.ts +8 -33
  2. package/Component.js +6 -3
  3. package/components/step/Component.d.ts +9 -33
  4. package/components/step/Component.js +26 -14
  5. package/components/step/index.css +44 -39
  6. package/components/step-indicator/Component.js +1 -1
  7. package/components/step-indicator/index.css +6 -3
  8. package/cssm/Component.d.ts +8 -33
  9. package/cssm/Component.js +5 -2
  10. package/cssm/components/step/Component.d.ts +9 -33
  11. package/cssm/components/step/Component.js +25 -13
  12. package/cssm/components/step/index.module.css +21 -16
  13. package/cssm/components/step-indicator/index.module.css +4 -1
  14. package/cssm/index.module.css +3 -0
  15. package/cssm/shared/index.d.ts +1 -0
  16. package/cssm/shared/index.js +9 -0
  17. package/cssm/types/common-props.d.ts +41 -0
  18. package/cssm/types/common-props.js +2 -0
  19. package/cssm/utils/getStepsTestIds.d.ts +5 -0
  20. package/cssm/utils/getStepsTestIds.js +14 -0
  21. package/esm/Component.d.ts +8 -33
  22. package/esm/Component.js +6 -3
  23. package/esm/components/step/Component.d.ts +9 -33
  24. package/esm/components/step/Component.js +26 -14
  25. package/esm/components/step/index.css +44 -39
  26. package/esm/components/step-indicator/Component.js +1 -1
  27. package/esm/components/step-indicator/index.css +6 -3
  28. package/esm/index.css +6 -3
  29. package/esm/shared/index.d.ts +1 -0
  30. package/esm/shared/index.js +1 -0
  31. package/esm/types/common-props.d.ts +41 -0
  32. package/esm/types/common-props.js +1 -0
  33. package/esm/utils/getStepsTestIds.d.ts +5 -0
  34. package/esm/utils/getStepsTestIds.js +10 -0
  35. package/index.css +6 -3
  36. package/modern/Component.d.ts +8 -33
  37. package/modern/Component.js +6 -3
  38. package/modern/components/step/Component.d.ts +9 -33
  39. package/modern/components/step/Component.js +27 -13
  40. package/modern/components/step/index.css +44 -39
  41. package/modern/components/step-indicator/Component.js +1 -1
  42. package/modern/components/step-indicator/index.css +6 -3
  43. package/modern/index.css +6 -3
  44. package/modern/shared/index.d.ts +1 -0
  45. package/modern/shared/index.js +1 -0
  46. package/modern/types/common-props.d.ts +41 -0
  47. package/modern/types/common-props.js +1 -0
  48. package/modern/utils/getStepsTestIds.d.ts +5 -0
  49. package/modern/utils/getStepsTestIds.js +10 -0
  50. package/moderncssm/Component.d.ts +8 -33
  51. package/moderncssm/Component.js +5 -2
  52. package/moderncssm/components/step/Component.d.ts +9 -33
  53. package/moderncssm/components/step/Component.js +26 -12
  54. package/moderncssm/components/step/index.module.css +18 -18
  55. package/moderncssm/shared/index.d.ts +1 -0
  56. package/moderncssm/shared/index.js +1 -0
  57. package/moderncssm/types/common-props.d.ts +41 -0
  58. package/moderncssm/types/common-props.js +1 -0
  59. package/moderncssm/utils/getStepsTestIds.d.ts +5 -0
  60. package/moderncssm/utils/getStepsTestIds.js +10 -0
  61. package/package.json +6 -5
  62. package/shared/index.d.ts +1 -0
  63. package/shared/index.js +9 -0
  64. package/shared/package.json +3 -0
  65. package/src/Component.tsx +18 -40
  66. package/src/components/step/Component.tsx +49 -57
  67. package/src/components/step/index.module.css +19 -17
  68. package/src/shared/index.ts +1 -0
  69. package/src/shared/package.json +3 -0
  70. package/src/types/common-props.ts +48 -0
  71. package/src/utils/getStepsTestIds.ts +8 -0
  72. package/types/common-props.d.ts +41 -0
  73. package/types/common-props.js +2 -0
  74. package/utils/getStepsTestIds.d.ts +5 -0
  75. package/utils/getStepsTestIds.js +14 -0
  76. package/@alfalab/icons-glyph/package.json +0 -14
@@ -0,0 +1,48 @@
1
+ import { ReactNode } from 'react';
2
+
3
+ /** Обобщенный набор типов который подходит для Steps, но также прокинут в дочерний Step */
4
+ export type CommonProps = {
5
+ /**
6
+ * Идентификатор для систем автоматизированного тестирования
7
+ */
8
+ dataTestId?: string;
9
+
10
+ /**
11
+ * Дочерние элементы
12
+ */
13
+ children: ReactNode;
14
+
15
+ /**
16
+ * Управление ориентацией компонента
17
+ * @default false
18
+ */
19
+ isVerticalAlign?: boolean;
20
+
21
+ /**
22
+ * Управление отображением номера шага
23
+ */
24
+ ordered?: boolean;
25
+
26
+ /**
27
+ * Включение / отключение интерактивности шагов
28
+ */
29
+ interactive?: boolean;
30
+
31
+ /**
32
+ * Растягивание шагов на всю ширину блока для вертикальной ориентации
33
+ * @default false
34
+ */
35
+ fullWidth?: boolean;
36
+
37
+ /**
38
+ * Минимальное расстояние между шагами для горизонтального расположения компонента
39
+ * @default 24
40
+ * @description Значение 8 устарело и будет удалено в будущих версиях. Используйте 16, 24 или 32.
41
+ */
42
+ minSpaceBetweenSteps?: 8 | 16 | 24 | 32;
43
+
44
+ /**
45
+ * Цвет тире выполненного шага
46
+ */
47
+ completedDashColor?: string;
48
+ };
@@ -0,0 +1,8 @@
1
+ import { getDataTestId } from '@alfalab/core-components-shared';
2
+
3
+ export function getStepsTestIds(dataTestId: string) {
4
+ return {
5
+ steps: dataTestId,
6
+ step: getDataTestId(dataTestId, 'step'),
7
+ };
8
+ }
@@ -0,0 +1,41 @@
1
+ import { ReactNode } from 'react';
2
+ /** Обобщенный набор типов который подходит для Steps, но также прокинут в дочерний Step */
3
+ type CommonProps = {
4
+ /**
5
+ * Идентификатор для систем автоматизированного тестирования
6
+ */
7
+ dataTestId?: string;
8
+ /**
9
+ * Дочерние элементы
10
+ */
11
+ children: ReactNode;
12
+ /**
13
+ * Управление ориентацией компонента
14
+ * @default false
15
+ */
16
+ isVerticalAlign?: boolean;
17
+ /**
18
+ * Управление отображением номера шага
19
+ */
20
+ ordered?: boolean;
21
+ /**
22
+ * Включение / отключение интерактивности шагов
23
+ */
24
+ interactive?: boolean;
25
+ /**
26
+ * Растягивание шагов на всю ширину блока для вертикальной ориентации
27
+ * @default false
28
+ */
29
+ fullWidth?: boolean;
30
+ /**
31
+ * Минимальное расстояние между шагами для горизонтального расположения компонента
32
+ * @default 24
33
+ * @description Значение 8 устарело и будет удалено в будущих версиях. Используйте 16, 24 или 32.
34
+ */
35
+ minSpaceBetweenSteps?: 8 | 16 | 24 | 32;
36
+ /**
37
+ * Цвет тире выполненного шага
38
+ */
39
+ completedDashColor?: string;
40
+ };
41
+ export { CommonProps };
@@ -0,0 +1,2 @@
1
+ 'use strict';
2
+
@@ -0,0 +1,5 @@
1
+ declare function getStepsTestIds(dataTestId: string): {
2
+ steps: string;
3
+ step: string;
4
+ };
5
+ export { getStepsTestIds };
@@ -0,0 +1,14 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var coreComponentsShared = require('@alfalab/core-components-shared');
6
+
7
+ function getStepsTestIds(dataTestId) {
8
+ return {
9
+ steps: dataTestId,
10
+ step: coreComponentsShared.getDataTestId(dataTestId, 'step'),
11
+ };
12
+ }
13
+
14
+ exports.getStepsTestIds = getStepsTestIds;
@@ -1,14 +0,0 @@
1
- {
2
- "name": "@alfalab/icons-glyph",
3
- "version": "2.140.0",
4
- "license": "MIT",
5
- "peerDependencies": {
6
- "react": ">=16.8.0",
7
- "react-dom": ">=16.8.0"
8
- },
9
- "main": "./index.js",
10
- "module": "./esm/index.js",
11
- "publishConfig": {
12
- "access": "public"
13
- }
14
- }