@justin_evo/evo-ui 1.2.0 → 1.2.1

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 (77) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +70 -70
  3. package/dist/declarations.d.ts +6 -6
  4. package/package.json +52 -52
  5. package/src/Alert/Alert.tsx +49 -49
  6. package/src/AutoComplete/AutoComplete.tsx +810 -810
  7. package/src/Badge/Badge.tsx +53 -53
  8. package/src/Breadcrumb/Breadcrumb.tsx +53 -53
  9. package/src/Button/Button.tsx +125 -125
  10. package/src/Card/Card.tsx +257 -257
  11. package/src/Checkbox/Checkbox.tsx +59 -59
  12. package/src/CommandPalette/CommandPalette.tsx +185 -185
  13. package/src/Container/Container.tsx +31 -31
  14. package/src/Divider/Divider.tsx +31 -31
  15. package/src/Form/Form.tsx +185 -185
  16. package/src/Grid/Grid.tsx +66 -66
  17. package/src/ImageCropper/ImageCropper.tsx +911 -911
  18. package/src/Input/Input.tsx +74 -74
  19. package/src/Modal/Modal.tsx +77 -77
  20. package/src/Nav/Nav.tsx +708 -708
  21. package/src/Notification/Notification.tsx +1503 -1503
  22. package/src/Pagination/Pagination.tsx +76 -76
  23. package/src/Radio/Radio.tsx +69 -69
  24. package/src/RichTextArea/RichTextArea.tsx +886 -886
  25. package/src/Select/Select.tsx +515 -515
  26. package/src/Skeleton/Skeleton.tsx +70 -70
  27. package/src/Stack/Stack.tsx +52 -52
  28. package/src/Table/Table.tsx +335 -335
  29. package/src/Tabs/Tabs.tsx +90 -90
  30. package/src/Theme/ThemeProvider.tsx +253 -253
  31. package/src/Theme/ThemeToggle.tsx +79 -79
  32. package/src/Toggle/Toggle.tsx +48 -48
  33. package/src/Tooltip/Tooltip.tsx +38 -38
  34. package/src/TopNav/TopNav.tsx +1163 -1163
  35. package/src/TreeSelect/TreeSelect.tsx +825 -825
  36. package/src/css/alert.module.scss +93 -93
  37. package/src/css/autocomplete.module.scss +416 -416
  38. package/src/css/badge.module.scss +82 -82
  39. package/src/css/base/_color.scss +159 -159
  40. package/src/css/base/_theme.scss +237 -237
  41. package/src/css/base/_variables.scss +161 -161
  42. package/src/css/breadcrumb.module.scss +50 -50
  43. package/src/css/button.module.scss +385 -385
  44. package/src/css/card.module.scss +217 -217
  45. package/src/css/checkbox.module.scss +123 -123
  46. package/src/css/commandpalette.module.scss +211 -211
  47. package/src/css/container.module.scss +18 -18
  48. package/src/css/divider.module.scss +41 -41
  49. package/src/css/form.module.scss +245 -245
  50. package/src/css/imagecropper.module.scss +397 -397
  51. package/src/css/input.module.scss +89 -89
  52. package/src/css/modal.module.scss +105 -105
  53. package/src/css/nav.module.scss +494 -494
  54. package/src/css/notification.module.scss +691 -691
  55. package/src/css/pagination.module.scss +63 -63
  56. package/src/css/radio.module.scss +89 -89
  57. package/src/css/richtextarea.module.scss +307 -307
  58. package/src/css/select.module.scss +525 -525
  59. package/src/css/skeleton.module.scss +30 -30
  60. package/src/css/table.module.scss +386 -386
  61. package/src/css/tabs.module.scss +63 -63
  62. package/src/css/theme-toggle.module.scss +83 -83
  63. package/src/css/toggle.module.scss +54 -54
  64. package/src/css/tooltip.module.scss +97 -97
  65. package/src/css/topnav.module.scss +568 -568
  66. package/src/css/treeselect.module.scss +558 -558
  67. package/src/css/utilities/_borders.scss +111 -111
  68. package/src/css/utilities/_colors.scss +66 -66
  69. package/src/css/utilities/_effects.scss +216 -216
  70. package/src/css/utilities/_layout.scss +181 -181
  71. package/src/css/utilities/_position.scss +75 -75
  72. package/src/css/utilities/_sizing.scss +138 -138
  73. package/src/css/utilities/_spacing.scss +99 -99
  74. package/src/css/utilities/_typography.scss +121 -121
  75. package/src/css/utilities/index.scss +24 -24
  76. package/src/declarations.d.ts +6 -6
  77. package/src/index.ts +60 -60
@@ -1,63 +1,63 @@
1
- @use 'base/variables' as *;
2
- @use 'base/color' as *;
3
-
4
- .tabs {
5
- width: 100%;
6
- font-family: $font-sans;
7
- }
8
-
9
- .tabList {
10
- display: flex;
11
- gap: 0.125rem;
12
- border-bottom: 1px solid $color-border;
13
- }
14
-
15
- .tab {
16
- position: relative;
17
- padding: 0.5rem 1rem;
18
- font-size: $text-sm;
19
- font-weight: 500;
20
- color: $color-text-secondary;
21
- background: transparent;
22
- border: none;
23
- border-radius: $radius-sm $radius-sm 0 0;
24
- cursor: pointer;
25
- transition: color $transition-fast, background-color $transition-fast;
26
- font-family: $font-sans;
27
-
28
- &::after {
29
- content: '';
30
- position: absolute;
31
- bottom: -1px;
32
- left: 0;
33
- right: 0;
34
- height: 2px;
35
- background-color: transparent;
36
- transition: background-color $transition-fast;
37
- border-radius: 2px 2px 0 0;
38
- }
39
-
40
- &:hover:not(.disabled):not(.active) {
41
- color: $color-text-primary;
42
- background-color: $color-surface-hover;
43
- }
44
-
45
- &.active {
46
- color: $evo-primary-color;
47
- &::after { background-color: $evo-primary-color; }
48
- }
49
-
50
- &.disabled {
51
- opacity: 0.4;
52
- cursor: not-allowed;
53
- pointer-events: none;
54
- }
55
- }
56
-
57
- .tabPanel {
58
- padding: 1.25rem 0;
59
- color: $color-text-secondary;
60
- font-size: $text-sm;
61
- line-height: 1.6;
62
- font-family: $font-sans;
63
- }
1
+ @use 'base/variables' as *;
2
+ @use 'base/color' as *;
3
+
4
+ .tabs {
5
+ width: 100%;
6
+ font-family: $font-sans;
7
+ }
8
+
9
+ .tabList {
10
+ display: flex;
11
+ gap: 0.125rem;
12
+ border-bottom: 1px solid $color-border;
13
+ }
14
+
15
+ .tab {
16
+ position: relative;
17
+ padding: 0.5rem 1rem;
18
+ font-size: $text-sm;
19
+ font-weight: 500;
20
+ color: $color-text-secondary;
21
+ background: transparent;
22
+ border: none;
23
+ border-radius: $radius-sm $radius-sm 0 0;
24
+ cursor: pointer;
25
+ transition: color $transition-fast, background-color $transition-fast;
26
+ font-family: $font-sans;
27
+
28
+ &::after {
29
+ content: '';
30
+ position: absolute;
31
+ bottom: -1px;
32
+ left: 0;
33
+ right: 0;
34
+ height: 2px;
35
+ background-color: transparent;
36
+ transition: background-color $transition-fast;
37
+ border-radius: 2px 2px 0 0;
38
+ }
39
+
40
+ &:hover:not(.disabled):not(.active) {
41
+ color: $color-text-primary;
42
+ background-color: $color-surface-hover;
43
+ }
44
+
45
+ &.active {
46
+ color: $evo-primary-color;
47
+ &::after { background-color: $evo-primary-color; }
48
+ }
49
+
50
+ &.disabled {
51
+ opacity: 0.4;
52
+ cursor: not-allowed;
53
+ pointer-events: none;
54
+ }
55
+ }
56
+
57
+ .tabPanel {
58
+ padding: 1.25rem 0;
59
+ color: $color-text-secondary;
60
+ font-size: $text-sm;
61
+ line-height: 1.6;
62
+ font-family: $font-sans;
63
+ }
@@ -1,83 +1,83 @@
1
- @use 'base/variables' as *;
2
-
3
- // ==========================================================
4
- // Theme toggle — animated sun/moon switch.
5
- // All colors come from theme tokens so it auto-themes itself.
6
- // ==========================================================
7
-
8
- .toggle {
9
- display: inline-flex;
10
- align-items: center;
11
- justify-content: center;
12
- padding: 0;
13
- background: transparent;
14
- border: none;
15
- cursor: pointer;
16
- font: inherit;
17
- color: inherit;
18
- -webkit-tap-highlight-color: transparent;
19
-
20
- &:focus-visible {
21
- outline: 2px solid $evo-primary-focus;
22
- outline-offset: 3px;
23
- border-radius: $radius-full;
24
- }
25
- }
26
-
27
- .track {
28
- position: relative;
29
- display: inline-block;
30
- background: $color-surface-elevated;
31
- border: 1px solid $color-border;
32
- border-radius: $radius-full;
33
- transition: background-color $transition-fast, border-color $transition-fast;
34
- overflow: hidden;
35
- }
36
-
37
- .thumb {
38
- position: absolute;
39
- top: 50%;
40
- transform: translate(0, -50%);
41
- display: inline-flex;
42
- align-items: center;
43
- justify-content: center;
44
- background-color: $color-background;
45
- color: $evo-primary-color;
46
- border-radius: 50%;
47
- box-shadow: 0 2px 6px rgb(0 0 0 / 0.18);
48
- transition: transform $transition-normal cubic-bezier(0.34, 1.56, 0.64, 1),
49
- background-color $transition-fast;
50
-
51
- svg {
52
- position: absolute;
53
- width: 60%;
54
- height: 60%;
55
- transition: opacity $transition-fast ease, transform $transition-normal ease;
56
- }
57
- }
58
-
59
- // Sun visible in light, moon visible in dark
60
- .sun { opacity: 1; transform: rotate(0); }
61
- .moon { opacity: 0; transform: rotate(-90deg); }
62
-
63
- [data-theme-state='dark'] {
64
- .sun { opacity: 0; transform: rotate(90deg); }
65
- .moon { opacity: 1; transform: rotate(0); }
66
- }
67
-
68
- // ---- Sizes ----
69
- .sm {
70
- .track { width: 36px; height: 20px; }
71
- .thumb { width: 16px; height: 16px; left: 2px; }
72
- &[data-theme-state='dark'] .thumb { transform: translate(16px, -50%); }
73
- }
74
- .md {
75
- .track { width: 48px; height: 26px; }
76
- .thumb { width: 22px; height: 22px; left: 2px; }
77
- &[data-theme-state='dark'] .thumb { transform: translate(22px, -50%); }
78
- }
79
- .lg {
80
- .track { width: 60px; height: 32px; }
81
- .thumb { width: 28px; height: 28px; left: 2px; }
82
- &[data-theme-state='dark'] .thumb { transform: translate(28px, -50%); }
83
- }
1
+ @use 'base/variables' as *;
2
+
3
+ // ==========================================================
4
+ // Theme toggle — animated sun/moon switch.
5
+ // All colors come from theme tokens so it auto-themes itself.
6
+ // ==========================================================
7
+
8
+ .toggle {
9
+ display: inline-flex;
10
+ align-items: center;
11
+ justify-content: center;
12
+ padding: 0;
13
+ background: transparent;
14
+ border: none;
15
+ cursor: pointer;
16
+ font: inherit;
17
+ color: inherit;
18
+ -webkit-tap-highlight-color: transparent;
19
+
20
+ &:focus-visible {
21
+ outline: 2px solid $evo-primary-focus;
22
+ outline-offset: 3px;
23
+ border-radius: $radius-full;
24
+ }
25
+ }
26
+
27
+ .track {
28
+ position: relative;
29
+ display: inline-block;
30
+ background: $color-surface-elevated;
31
+ border: 1px solid $color-border;
32
+ border-radius: $radius-full;
33
+ transition: background-color $transition-fast, border-color $transition-fast;
34
+ overflow: hidden;
35
+ }
36
+
37
+ .thumb {
38
+ position: absolute;
39
+ top: 50%;
40
+ transform: translate(0, -50%);
41
+ display: inline-flex;
42
+ align-items: center;
43
+ justify-content: center;
44
+ background-color: $color-background;
45
+ color: $evo-primary-color;
46
+ border-radius: 50%;
47
+ box-shadow: 0 2px 6px rgb(0 0 0 / 0.18);
48
+ transition: transform $transition-normal cubic-bezier(0.34, 1.56, 0.64, 1),
49
+ background-color $transition-fast;
50
+
51
+ svg {
52
+ position: absolute;
53
+ width: 60%;
54
+ height: 60%;
55
+ transition: opacity $transition-fast ease, transform $transition-normal ease;
56
+ }
57
+ }
58
+
59
+ // Sun visible in light, moon visible in dark
60
+ .sun { opacity: 1; transform: rotate(0); }
61
+ .moon { opacity: 0; transform: rotate(-90deg); }
62
+
63
+ [data-theme-state='dark'] {
64
+ .sun { opacity: 0; transform: rotate(90deg); }
65
+ .moon { opacity: 1; transform: rotate(0); }
66
+ }
67
+
68
+ // ---- Sizes ----
69
+ .sm {
70
+ .track { width: 36px; height: 20px; }
71
+ .thumb { width: 16px; height: 16px; left: 2px; }
72
+ &[data-theme-state='dark'] .thumb { transform: translate(16px, -50%); }
73
+ }
74
+ .md {
75
+ .track { width: 48px; height: 26px; }
76
+ .thumb { width: 22px; height: 22px; left: 2px; }
77
+ &[data-theme-state='dark'] .thumb { transform: translate(22px, -50%); }
78
+ }
79
+ .lg {
80
+ .track { width: 60px; height: 32px; }
81
+ .thumb { width: 28px; height: 28px; left: 2px; }
82
+ &[data-theme-state='dark'] .thumb { transform: translate(28px, -50%); }
83
+ }
@@ -1,54 +1,54 @@
1
- @use 'base/variables' as *;
2
- @use 'base/color' as *;
3
-
4
- .toggleWrapper {
5
- display: inline-flex;
6
- align-items: center;
7
- gap: 0.5rem;
8
- cursor: pointer;
9
- font-family: $font-sans;
10
-
11
- &.disabled {
12
- opacity: 0.5;
13
- cursor: not-allowed;
14
- pointer-events: none;
15
- }
16
- }
17
-
18
- .hiddenInput {
19
- position: absolute;
20
- opacity: 0;
21
- width: 0;
22
- height: 0;
23
- }
24
-
25
- .track {
26
- position: relative;
27
- display: inline-block;
28
- background-color: $color-border-strong;
29
- border-radius: $radius-full;
30
- transition: background-color $transition-fast;
31
- flex-shrink: 0;
32
-
33
- &.sm { width: 1.75rem; height: 1rem; }
34
- &.md { width: 2.25rem; height: 1.25rem; }
35
- &.lg { width: 2.75rem; height: 1.5rem; }
36
-
37
- &.on { background-color: $evo-primary-color; }
38
- }
39
-
40
- .thumb {
41
- position: absolute;
42
- top: 2px;
43
- left: 2px;
44
- background-color: $color-background;
45
- border-radius: 50%;
46
- transition: transform $transition-fast;
47
- box-shadow: 0 1px 3px rgb(0 0 0 / 0.25);
48
- }
49
-
50
- .label {
51
- font-size: $text-sm;
52
- color: $color-text-primary;
53
- user-select: none;
54
- }
1
+ @use 'base/variables' as *;
2
+ @use 'base/color' as *;
3
+
4
+ .toggleWrapper {
5
+ display: inline-flex;
6
+ align-items: center;
7
+ gap: 0.5rem;
8
+ cursor: pointer;
9
+ font-family: $font-sans;
10
+
11
+ &.disabled {
12
+ opacity: 0.5;
13
+ cursor: not-allowed;
14
+ pointer-events: none;
15
+ }
16
+ }
17
+
18
+ .hiddenInput {
19
+ position: absolute;
20
+ opacity: 0;
21
+ width: 0;
22
+ height: 0;
23
+ }
24
+
25
+ .track {
26
+ position: relative;
27
+ display: inline-block;
28
+ background-color: $color-border-strong;
29
+ border-radius: $radius-full;
30
+ transition: background-color $transition-fast;
31
+ flex-shrink: 0;
32
+
33
+ &.sm { width: 1.75rem; height: 1rem; }
34
+ &.md { width: 2.25rem; height: 1.25rem; }
35
+ &.lg { width: 2.75rem; height: 1.5rem; }
36
+
37
+ &.on { background-color: $evo-primary-color; }
38
+ }
39
+
40
+ .thumb {
41
+ position: absolute;
42
+ top: 2px;
43
+ left: 2px;
44
+ background-color: $color-background;
45
+ border-radius: 50%;
46
+ transition: transform $transition-fast;
47
+ box-shadow: 0 1px 3px rgb(0 0 0 / 0.25);
48
+ }
49
+
50
+ .label {
51
+ font-size: $text-sm;
52
+ color: $color-text-primary;
53
+ user-select: none;
54
+ }
@@ -1,97 +1,97 @@
1
- @use 'base/variables' as *;
2
- @use 'base/color' as *;
3
-
4
- @keyframes tooltipFadeIn {
5
- from { opacity: 0; transform: scale(0.95); }
6
- to { opacity: 1; transform: scale(1); }
7
- }
8
-
9
- .wrapper {
10
- position: relative;
11
- display: inline-flex;
12
- align-items: center;
13
- }
14
-
15
- .tooltip {
16
- position: absolute;
17
- z-index: 9000;
18
- padding: 0.375rem 0.625rem;
19
- background-color: $color-surface-elevated;
20
- color: $color-text-primary;
21
- font-size: $text-xs;
22
- font-family: $font-sans;
23
- border-radius: $radius-sm;
24
- white-space: nowrap;
25
- box-shadow: $shadow-lg;
26
- border: 1px solid $color-border;
27
- pointer-events: none;
28
- animation: tooltipFadeIn 150ms ease;
29
- line-height: 1.4;
30
-
31
- &.top {
32
- bottom: calc(100% + 8px);
33
- left: 50%;
34
- transform: translateX(-50%);
35
- }
36
-
37
- &.bottom {
38
- top: calc(100% + 8px);
39
- left: 50%;
40
- transform: translateX(-50%);
41
- }
42
-
43
- &.left {
44
- right: calc(100% + 8px);
45
- top: 50%;
46
- transform: translateY(-50%);
47
- }
48
-
49
- &.right {
50
- left: calc(100% + 8px);
51
- top: 50%;
52
- transform: translateY(-50%);
53
- }
54
- }
55
-
56
- .arrow {
57
- position: absolute;
58
- width: 0;
59
- height: 0;
60
- border: 5px solid transparent;
61
-
62
- .top & {
63
- top: 100%;
64
- left: 50%;
65
- transform: translateX(-50%);
66
- border-top-color: $color-surface-elevated;
67
- border-bottom: none;
68
- border-top-width: 5px;
69
- }
70
-
71
- .bottom & {
72
- bottom: 100%;
73
- left: 50%;
74
- transform: translateX(-50%);
75
- border-bottom-color: $color-surface-elevated;
76
- border-top: none;
77
- border-bottom-width: 5px;
78
- }
79
-
80
- .left & {
81
- left: 100%;
82
- top: 50%;
83
- transform: translateY(-50%);
84
- border-left-color: $color-surface-elevated;
85
- border-right: none;
86
- border-left-width: 5px;
87
- }
88
-
89
- .right & {
90
- right: 100%;
91
- top: 50%;
92
- transform: translateY(-50%);
93
- border-right-color: $color-surface-elevated;
94
- border-left: none;
95
- border-right-width: 5px;
96
- }
97
- }
1
+ @use 'base/variables' as *;
2
+ @use 'base/color' as *;
3
+
4
+ @keyframes tooltipFadeIn {
5
+ from { opacity: 0; transform: scale(0.95); }
6
+ to { opacity: 1; transform: scale(1); }
7
+ }
8
+
9
+ .wrapper {
10
+ position: relative;
11
+ display: inline-flex;
12
+ align-items: center;
13
+ }
14
+
15
+ .tooltip {
16
+ position: absolute;
17
+ z-index: 9000;
18
+ padding: 0.375rem 0.625rem;
19
+ background-color: $color-surface-elevated;
20
+ color: $color-text-primary;
21
+ font-size: $text-xs;
22
+ font-family: $font-sans;
23
+ border-radius: $radius-sm;
24
+ white-space: nowrap;
25
+ box-shadow: $shadow-lg;
26
+ border: 1px solid $color-border;
27
+ pointer-events: none;
28
+ animation: tooltipFadeIn 150ms ease;
29
+ line-height: 1.4;
30
+
31
+ &.top {
32
+ bottom: calc(100% + 8px);
33
+ left: 50%;
34
+ transform: translateX(-50%);
35
+ }
36
+
37
+ &.bottom {
38
+ top: calc(100% + 8px);
39
+ left: 50%;
40
+ transform: translateX(-50%);
41
+ }
42
+
43
+ &.left {
44
+ right: calc(100% + 8px);
45
+ top: 50%;
46
+ transform: translateY(-50%);
47
+ }
48
+
49
+ &.right {
50
+ left: calc(100% + 8px);
51
+ top: 50%;
52
+ transform: translateY(-50%);
53
+ }
54
+ }
55
+
56
+ .arrow {
57
+ position: absolute;
58
+ width: 0;
59
+ height: 0;
60
+ border: 5px solid transparent;
61
+
62
+ .top & {
63
+ top: 100%;
64
+ left: 50%;
65
+ transform: translateX(-50%);
66
+ border-top-color: $color-surface-elevated;
67
+ border-bottom: none;
68
+ border-top-width: 5px;
69
+ }
70
+
71
+ .bottom & {
72
+ bottom: 100%;
73
+ left: 50%;
74
+ transform: translateX(-50%);
75
+ border-bottom-color: $color-surface-elevated;
76
+ border-top: none;
77
+ border-bottom-width: 5px;
78
+ }
79
+
80
+ .left & {
81
+ left: 100%;
82
+ top: 50%;
83
+ transform: translateY(-50%);
84
+ border-left-color: $color-surface-elevated;
85
+ border-right: none;
86
+ border-left-width: 5px;
87
+ }
88
+
89
+ .right & {
90
+ right: 100%;
91
+ top: 50%;
92
+ transform: translateY(-50%);
93
+ border-right-color: $color-surface-elevated;
94
+ border-left: none;
95
+ border-right-width: 5px;
96
+ }
97
+ }