indicator-ui 0.0.15 → 0.0.17

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 (58) hide show
  1. package/dist/index.css +458 -7
  2. package/dist/index.css.map +1 -1
  3. package/dist/index.js +308 -0
  4. package/dist/index.js.map +1 -1
  5. package/dist/scss/styles/mixins/modify-svg.scss +5 -1
  6. package/dist/scss/test/global.scss +2 -0
  7. package/dist/scss/ui/Buttons/styles/mixins/baseButton.scss +1 -1
  8. package/dist/scss/ui/Buttons/styles/mixins/button.scss +1 -1
  9. package/dist/scss/ui/Buttons/styles/mixins/properties/large.scss +1 -1
  10. package/dist/scss/ui/Buttons/styles/mixins/properties/link-black.scss +1 -1
  11. package/dist/scss/ui/Buttons/styles/mixins/properties/link-color.scss +1 -1
  12. package/dist/scss/ui/Buttons/styles/mixins/properties/link-gray.scss +1 -1
  13. package/dist/scss/ui/Buttons/styles/mixins/properties/medium.scss +1 -1
  14. package/dist/scss/ui/Buttons/styles/mixins/properties/primary.scss +1 -1
  15. package/dist/scss/ui/Buttons/styles/mixins/properties/secondary-color.scss +1 -1
  16. package/dist/scss/ui/Buttons/styles/mixins/properties/secondary-gray.scss +1 -1
  17. package/dist/scss/ui/Buttons/styles/mixins/properties/small.scss +1 -1
  18. package/dist/scss/ui/Buttons/styles/mixins/properties/tab-active.scss +1 -1
  19. package/dist/scss/ui/Buttons/styles/mixins/properties/tab.scss +1 -1
  20. package/dist/scss/ui/Buttons/styles/mixins/properties/tertiary-color.scss +1 -1
  21. package/dist/scss/ui/Buttons/styles/mixins/properties/tertiary-gray.scss +1 -0
  22. package/dist/scss/ui/Buttons/styles/mixins/properties/tertiary-white.scss +1 -1
  23. package/dist/scss/ui/Buttons/styles/mixins/properties/ultra.scss +1 -1
  24. package/dist/scss/ui/CheckboxMark/index.scss +1 -0
  25. package/dist/scss/ui/CheckboxMark/styles/index.scss +1 -0
  26. package/dist/scss/ui/CheckboxMark/styles/mixins/base.scss +26 -0
  27. package/dist/scss/ui/CheckboxMark/styles/mixins/checkbox-mark.scss +92 -0
  28. package/dist/scss/ui/CheckboxMark/styles/mixins/index.scss +3 -0
  29. package/dist/scss/ui/CheckboxMark/styles/mixins/properties/checkbox.scss +3 -0
  30. package/dist/scss/ui/CheckboxMark/styles/mixins/properties/checked.scss +20 -0
  31. package/dist/scss/ui/CheckboxMark/styles/mixins/properties/correct.scss +41 -0
  32. package/dist/scss/ui/CheckboxMark/styles/mixins/properties/disabled.scss +27 -0
  33. package/dist/scss/ui/CheckboxMark/styles/mixins/properties/error.scss +22 -0
  34. package/dist/scss/ui/CheckboxMark/styles/mixins/properties/incorrect.scss +41 -0
  35. package/dist/scss/ui/CheckboxMark/styles/mixins/properties/indeterminate.scss +17 -0
  36. package/dist/scss/ui/CheckboxMark/styles/mixins/properties/index.scss +8 -0
  37. package/dist/scss/ui/CheckboxMark/styles/mixins/properties/radio.scss +15 -0
  38. package/dist/scss/ui/MicroButton/styles/mixins/base-button.scss +1 -1
  39. package/dist/scss/ui/MicroButton/styles/mixins/index.scss +2 -1
  40. package/dist/scss/ui/MicroButton/styles/mixins/micro-button.scss +1 -1
  41. package/dist/scss/ui/index.scss +2 -1
  42. package/dist/types/src/test/pages/CheckboxMarkPage.d.ts +1 -0
  43. package/dist/types/src/test/pages/CheckboxPage.d.ts +1 -0
  44. package/dist/types/src/test/pages/index.d.ts +3 -0
  45. package/dist/types/src/ui/Checkbox/index.d.ts +2 -0
  46. package/dist/types/src/ui/Checkbox/styles/index.d.ts +1 -0
  47. package/dist/types/src/ui/Checkbox/types/CheckboxTypes.d.ts +33 -0
  48. package/dist/types/src/ui/Checkbox/types/index.d.ts +1 -0
  49. package/dist/types/src/ui/Checkbox/ui/Checkbox.d.ts +2 -0
  50. package/dist/types/src/ui/Checkbox/ui/index.d.ts +1 -0
  51. package/dist/types/src/ui/CheckboxMark/index.d.ts +2 -0
  52. package/dist/types/src/ui/CheckboxMark/styles/index.d.ts +1 -0
  53. package/dist/types/src/ui/CheckboxMark/types/CheckboxMarkTypes.d.ts +43 -0
  54. package/dist/types/src/ui/CheckboxMark/types/index.d.ts +1 -0
  55. package/dist/types/src/ui/CheckboxMark/ui/CheckboxMark.d.ts +3 -0
  56. package/dist/types/src/ui/CheckboxMark/ui/index.d.ts +1 -0
  57. package/dist/types/src/ui/index.d.ts +2 -0
  58. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- @mixin modify-svg($stroke: null, $fill: null) {
1
+ @mixin modify-svg($stroke: null, $fill: null, $stroke-width: null) {
2
2
  & {
3
3
  svg {
4
4
  * {
@@ -9,6 +9,10 @@
9
9
  @if ($fill != null) {
10
10
  fill: $fill;
11
11
  }
12
+
13
+ @if ($stroke-width != null) {
14
+ stroke-width: $stroke-width;
15
+ }
12
16
  }
13
17
 
14
18
  & {
@@ -1,3 +1,5 @@
1
+ @import 'colors.css';
2
+
1
3
  * {
2
4
  margin: 0;
3
5
  padding: 0;
@@ -1,6 +1,6 @@
1
1
  @use '../../../../styles' as *;
2
2
 
3
- @mixin baseButton() {
3
+ @mixin base-button() {
4
4
  @include modify-flex(row, center, center);
5
5
 
6
6
  .icon {
@@ -3,7 +3,7 @@
3
3
 
4
4
  @mixin insertButton() {
5
5
  .button {
6
- @include baseButton.baseButton();
6
+ @include baseButton.base-button();
7
7
 
8
8
  &.small {
9
9
  @include properties.smallButton;
@@ -15,6 +15,6 @@
15
15
 
16
16
  .text {
17
17
  padding: 0 6px;
18
- @include fnt-flex($size: 14, $line-height: 20, $weight: 500);
18
+ @include fnt-flex($size: 14, $line-height: 20);
19
19
  }
20
20
  }
@@ -9,8 +9,8 @@
9
9
  }
10
10
 
11
11
  .text {
12
- color: var(--gray-700);
13
12
  padding: 0 !important;
13
+ @include fnt-flex($weight: 400, $color: var(--gray-700));
14
14
  }
15
15
 
16
16
  &:hover {
@@ -9,8 +9,8 @@
9
9
  }
10
10
 
11
11
  .text {
12
- color: var(--blue-dark-500);
13
12
  padding: 0 !important;
13
+ @include fnt-flex($weight: 400, $color: var(--blue-dark-500));
14
14
  }
15
15
 
16
16
  &:hover {
@@ -9,8 +9,8 @@
9
9
  }
10
10
 
11
11
  .text {
12
- color: var(--gray-400);
13
12
  padding: 0 !important;
13
+ @include fnt-flex($weight: 400, $color: var(--gray-400));
14
14
  }
15
15
 
16
16
  &:hover {
@@ -15,6 +15,6 @@
15
15
 
16
16
  .text {
17
17
  padding: 0 8px;
18
- @include fnt-flex($size: 14, $line-height: 20, $weight: 500);
18
+ @include fnt-flex($size: 14, $line-height: 20);
19
19
  }
20
20
  }
@@ -10,7 +10,7 @@
10
10
  }
11
11
 
12
12
  .text {
13
- color: var(--base-white);
13
+ @include fnt-flex($weight: 500, $color: var(--base-white));
14
14
  }
15
15
 
16
16
  &:hover {
@@ -10,7 +10,7 @@
10
10
  }
11
11
 
12
12
  .text {
13
- color: var(--blue-dark-500);
13
+ @include fnt-flex($weight: 500, $color: var(--blue-dark-500));
14
14
  }
15
15
 
16
16
  &:hover {
@@ -10,7 +10,7 @@
10
10
  }
11
11
 
12
12
  .text {
13
- color: var(--gray-700);
13
+ @include fnt-flex($weight: 500, $color: var(--gray-700));
14
14
  }
15
15
 
16
16
  &:hover {
@@ -15,6 +15,6 @@
15
15
 
16
16
  .text {
17
17
  padding: 0 4px;
18
- @include fnt-flex($size: 14, $line-height: 16, $weight: 500);
18
+ @include fnt-flex($size: 14, $line-height: 16);
19
19
  }
20
20
  }
@@ -10,7 +10,7 @@
10
10
  }
11
11
 
12
12
  .text {
13
- color: var(--gray-700);
13
+ @include fnt-flex($weight: 500, $color: var(--gray-700));
14
14
  }
15
15
 
16
16
  &:hover {
@@ -10,7 +10,7 @@
10
10
  }
11
11
 
12
12
  .text {
13
- color: var(--gray-500);
13
+ @include fnt-flex($weight: 500, $color: var(--gray-500));
14
14
  }
15
15
 
16
16
  &:hover {
@@ -11,7 +11,7 @@
11
11
 
12
12
  &:hover {
13
13
  .text {
14
- color: var(--blue-dark-700);
14
+ @include fnt-flex($weight: 400, $color: var(--blue-dark-700));
15
15
  }
16
16
 
17
17
  .icon {
@@ -7,6 +7,7 @@
7
7
 
8
8
  .text {
9
9
  color: var(--gray-700);
10
+ @include fnt-flex($weight: 400, $color: var(--gray-400));
10
11
  }
11
12
 
12
13
  &:hover {
@@ -6,7 +6,7 @@
6
6
  }
7
7
 
8
8
  .text {
9
- color: var(--blue-dark-100);
9
+ @include fnt-flex($weight: 400, $color: var(--blue-dark-100));
10
10
  }
11
11
 
12
12
  &:hover {
@@ -15,6 +15,6 @@
15
15
 
16
16
  .text {
17
17
  padding: 0 12px;
18
- @include fnt-flex($size: 18, $line-height: 24, $weight: 500);
18
+ @include fnt-flex($size: 18, $line-height: 24);
19
19
  }
20
20
  }
@@ -0,0 +1 @@
1
+ @forward "styles";
@@ -0,0 +1 @@
1
+ @forward "mixins";
@@ -0,0 +1,26 @@
1
+ @use '../../../../styles' as *;
2
+
3
+ @mixin checkbox-mark-base-hover() {
4
+ background-color: var(--blue-dark-50);
5
+ box-shadow: 0 0 0 1px var(--blue-dark-200);
6
+ }
7
+
8
+ @mixin checkbox-mark-base() {
9
+ width: 20px;
10
+ height: 20px;
11
+
12
+ background-color: var(--base-white);
13
+ box-shadow: 0 0 0 1px var(--gray-300);
14
+ cursor: pointer;
15
+ overflow: hidden;
16
+
17
+ @include centerInsideContent();
18
+ @include modify-svg($stroke-width: 4) {
19
+ width: 14px;
20
+ height: 14px;
21
+ flex: none;
22
+ }
23
+ &:hover {
24
+ @include checkbox-mark-base-hover();
25
+ }
26
+ }
@@ -0,0 +1,92 @@
1
+ @use 'base';
2
+ @use 'properties';
3
+
4
+ @mixin checkbox-mark() {
5
+ .checkboxMark {
6
+ @include base.checkbox-mark-base();
7
+
8
+ &.checkbox {
9
+ @include properties.checkbox();
10
+ }
11
+
12
+ &.radio {
13
+ @include properties.radio();
14
+ }
15
+
16
+ &.checked {
17
+ @include properties.checked();
18
+ }
19
+
20
+ &.indeterminate {
21
+ @include properties.indeterminate();
22
+ }
23
+
24
+ &.error {
25
+ @include properties.error();
26
+ }
27
+
28
+ &.disabled {
29
+ @include properties.disabled();
30
+ }
31
+
32
+ &.correct {
33
+ &.checked {
34
+ @include properties.correct-checked();
35
+
36
+ &.disabled {
37
+ @include properties.correct-disabled();
38
+ }
39
+ }
40
+ }
41
+
42
+ &.incorrect {
43
+ &.checked {
44
+ @include properties.incorrect-checked();
45
+
46
+ &.disabled {
47
+ @include properties.incorrect-disabled();
48
+ }
49
+ }
50
+ }
51
+
52
+ &.hover {
53
+ @include base.checkbox-mark-base-hover();
54
+
55
+ &.checked {
56
+ @include properties.checked-hover();
57
+ }
58
+
59
+ &.indeterminate {
60
+ @include properties.indeterminate-hover();
61
+ }
62
+
63
+ &.error {
64
+ @include properties.error-hover();
65
+ }
66
+
67
+ &.disabled {
68
+ @include properties.disabled-hover();
69
+ }
70
+
71
+ &.correct {
72
+ &.checked {
73
+ @include properties.correct-checked-hover();
74
+
75
+ &.disabled {
76
+ @include properties.correct-disabled-hover();
77
+ }
78
+ }
79
+ }
80
+
81
+ &.incorrect {
82
+ &.checked {
83
+ @include properties.incorrect-checked-hover();
84
+
85
+ &.disabled {
86
+ @include properties.incorrect-disabled-hover();
87
+ }
88
+ }
89
+ }
90
+ }
91
+ }
92
+ }
@@ -0,0 +1,3 @@
1
+ @forward "checkbox-mark";
2
+ @forward "properties";
3
+ @forward "base";
@@ -0,0 +1,3 @@
1
+ @mixin checkbox() {
2
+ border-radius: 6px;
3
+ }
@@ -0,0 +1,20 @@
1
+ @use '../../../../../styles' as *;
2
+
3
+ @mixin checked-hover() {
4
+ box-shadow: 0 0 0 1px var(--blue-dark-400);
5
+ }
6
+
7
+ @mixin checked() {
8
+ background-color: var(--blue-dark-50);
9
+ box-shadow: 0 0 0 1px var(--blue-dark-200);
10
+
11
+ @include modify-svg($stroke: var(--blue-dark-500));
12
+
13
+ &:after {
14
+ display: block;
15
+ }
16
+
17
+ &:hover {
18
+ @include checked-hover();
19
+ }
20
+ }
@@ -0,0 +1,41 @@
1
+ @use '../../../../../styles' as *;
2
+
3
+ @mixin correct-checked-hover() {
4
+ background-color: var(--blue-dark-600);
5
+ box-shadow: none;
6
+ }
7
+
8
+ @mixin correct-disabled-hover() {
9
+ background-color: var(--gray-300);
10
+ box-shadow: none;
11
+ }
12
+
13
+ @mixin correct-checked() {
14
+ background-color: var(--blue-dark-500);
15
+ box-shadow: none;
16
+ @include fnt($size: 14, $line-height: 14, $weight: 500, $color: var(--base-white));
17
+ @include modify-svg($stroke: var(--base-white));
18
+
19
+ &:after {
20
+ display: none;
21
+ }
22
+
23
+ &:hover {
24
+ @include correct-checked-hover();
25
+ }
26
+ }
27
+
28
+ @mixin correct-disabled() {
29
+ background-color: var(--gray-300);
30
+ box-shadow: none;
31
+ @include fnt($size: 14, $line-height: 14, $weight: 500, $color: var(--base-white));
32
+ @include modify-svg($stroke: var(--base-white));
33
+
34
+ &:after {
35
+ display: none;
36
+ }
37
+
38
+ &:hover {
39
+ @include correct-disabled-hover();
40
+ }
41
+ }
@@ -0,0 +1,27 @@
1
+ @use '../../../../../styles' as *;
2
+
3
+ @mixin disabled-hover() {
4
+ background-color: var(--gray-100);
5
+ box-shadow: 0 0 0 1px var(--gray-300);
6
+
7
+ @include modify-svg($stroke: var(--gray-300));
8
+ @include fnt-flex($color: var(--gray-300));
9
+ }
10
+
11
+ @mixin disabled() {
12
+ cursor: default;
13
+
14
+ background-color: var(--gray-100);
15
+ box-shadow: 0 0 0 1px var(--gray-300);
16
+
17
+ &:after {
18
+ background-color: var(--gray-300);
19
+ }
20
+
21
+ @include modify-svg($stroke: var(--gray-300));
22
+ @include fnt-flex($color: var(--gray-300));
23
+
24
+ &:hover {
25
+ @include disabled-hover();
26
+ }
27
+ }
@@ -0,0 +1,22 @@
1
+ @use '../../../../../styles' as *;
2
+
3
+ @mixin error-hover() {
4
+ background-color: var(--error-50);
5
+ box-shadow: 0 0 0 1px var(--error-400);
6
+ }
7
+
8
+ @mixin error() {
9
+ background-color: var(--error-50);
10
+ box-shadow: 0 0 0 1px var(--error-200);
11
+
12
+ @include modify-svg($stroke: var(--error-500));
13
+ @include fnt-flex($color: var(--error-500));
14
+
15
+ &:after {
16
+ background-color: var(--error-500);
17
+ }
18
+
19
+ &:hover {
20
+ @include error-hover();
21
+ }
22
+ }
@@ -0,0 +1,41 @@
1
+ @use '../../../../../styles' as *;
2
+
3
+ @mixin incorrect-checked-hover() {
4
+ background-color: var(--error-600);
5
+ box-shadow: none;
6
+ }
7
+
8
+ @mixin incorrect-disabled-hover() {
9
+ background-color: var(--gray-300);
10
+ box-shadow: none;
11
+ }
12
+
13
+ @mixin incorrect-checked() {
14
+ background-color: var(--error-500);
15
+ box-shadow: none;
16
+ @include fnt($size: 14, $line-height: 14, $weight: 500, $color: var(--base-white));
17
+ @include modify-svg($stroke: var(--base-white));
18
+
19
+ &:after {
20
+ display: none;
21
+ }
22
+
23
+ &:hover {
24
+ @include incorrect-checked-hover();
25
+ }
26
+ }
27
+
28
+ @mixin incorrect-disabled() {
29
+ background-color: var(--gray-300);
30
+ box-shadow: none;
31
+ @include fnt($size: 14, $line-height: 14, $weight: 500, $color: var(--base-white));
32
+ @include modify-svg($stroke: var(--base-white));
33
+
34
+ &:after {
35
+ display: none;
36
+ }
37
+
38
+ &:hover {
39
+ @include incorrect-disabled-hover();
40
+ }
41
+ }
@@ -0,0 +1,17 @@
1
+ @use '../../../../../styles' as *;
2
+
3
+ @mixin indeterminate-hover() {
4
+ box-shadow: 0 0 0 1px var(--blue-dark-400);
5
+ }
6
+
7
+ @mixin indeterminate() {
8
+ background-color: var(--blue-dark-50);
9
+ box-shadow: 0 0 0 1px var(--blue-dark-200);
10
+
11
+ @include modify-svg($stroke: var(--blue-dark-500));
12
+ @include fnt($size: 14, $line-height: 14, $weight: 500, $color: var(--blue-dark-500));
13
+
14
+ &:hover {
15
+ @include indeterminate-hover();
16
+ }
17
+ }
@@ -0,0 +1,8 @@
1
+ @forward "checkbox";
2
+ @forward "radio";
3
+ @forward "checked";
4
+ @forward "incorrect";
5
+ @forward "correct";
6
+ @forward "disabled";
7
+ @forward "error";
8
+ @forward "indeterminate";
@@ -0,0 +1,15 @@
1
+ @use '../../../../../styles' as *;
2
+
3
+ @mixin radio() {
4
+ border-radius: 50%;
5
+
6
+ &:after {
7
+ display: none;
8
+ flex: none;
9
+ content: '';
10
+ width: 8px;
11
+ height: 8px;
12
+ border-radius: 50%;
13
+ background-color: var(--blue-dark-500);
14
+ }
15
+ }
@@ -1,6 +1,6 @@
1
1
  @use '../../../../styles' as *;
2
2
 
3
- @mixin base-button() {
3
+ @mixin base-micro-button() {
4
4
  width: fit-content;
5
5
  height: fit-content;
6
6
  @include modify-flex(row, center, center);
@@ -1 +1,2 @@
1
- @forward "micro-button";
1
+ @forward "micro-button";
2
+ @forward "base-button";
@@ -3,7 +3,7 @@
3
3
 
4
4
  @mixin micro-button() {
5
5
  .button {
6
- @include base-button.base-button();
6
+ @include base-button.base-micro-button();
7
7
 
8
8
  &.light {
9
9
  @include properties.light();
@@ -1,2 +1,3 @@
1
1
  @forward "Buttons";
2
- @forward "MicroButton";
2
+ @forward "MicroButton";
3
+ @forward "CheckboxMark";
@@ -0,0 +1 @@
1
+ export declare function CheckboxMarkPage(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function CheckboxPage(): import("react/jsx-runtime").JSX.Element;
@@ -3,3 +3,6 @@ export * from './HomePage';
3
3
  export * from './ButtonsPage';
4
4
  export * from './MicroButtonsPage';
5
5
  export * from './FieldsPage';
6
+ export * from './CheckboxMarkPage';
7
+ export * from './FormBuilderPage';
8
+ export * from './CheckboxPage';
@@ -0,0 +1,2 @@
1
+ export * from './ui';
2
+ export * from './types';
@@ -0,0 +1 @@
1
+ export { default as CheckboxStyle } from './Checkbox.module.scss';
@@ -0,0 +1,33 @@
1
+ import React from "react";
2
+ import { CheckboxMarkIndeterminateType, CheckboxMarkRelationType, CheckboxMarkTypeType } from "../../CheckboxMark";
3
+ export type CheckboxClassNameType = {
4
+ checkbox?: string;
5
+ disabled?: string;
6
+ error?: string;
7
+ textBlock?: string;
8
+ text?: string;
9
+ indeterminate?: string;
10
+ supportingText?: string;
11
+ widthFill?: string;
12
+ heightFill?: string;
13
+ widthHug?: string;
14
+ heightHug?: string;
15
+ };
16
+ export type CheckboxPropsType = {
17
+ checked?: boolean;
18
+ type?: CheckboxMarkTypeType;
19
+ subtype?: CheckboxMarkRelationType;
20
+ indeterminate?: CheckboxMarkIndeterminateType;
21
+ error?: boolean;
22
+ disabled?: boolean;
23
+ text?: React.ReactNode;
24
+ onClick?: () => void;
25
+ supportingText?: React.ReactNode;
26
+ width?: 'fill' | 'hug';
27
+ height?: 'fill' | 'hug';
28
+ /**
29
+ * Добавочные имена стилей. ```className="main-style addition-style-1 addition-style-2..."```
30
+ * */
31
+ additionStyle?: string | string[];
32
+ className?: CheckboxClassNameType;
33
+ };
@@ -0,0 +1 @@
1
+ export * from './CheckboxTypes';
@@ -0,0 +1,2 @@
1
+ import { CheckboxPropsType } from "../types";
2
+ export declare function Checkbox({ checked, type, error, subtype, disabled, text, supportingText, indeterminate, onClick, width, height, className, }: CheckboxPropsType): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./Checkbox";
@@ -0,0 +1,2 @@
1
+ export * from './ui';
2
+ export * from './types';
@@ -0,0 +1 @@
1
+ export { default as CheckboxMarkStyle } from './CheckboxMark.module.scss';