@trackunit/react-components 0.0.82-alpha-5bc30eb95.0 → 0.0.82

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.
@@ -1,4 +1,5 @@
1
1
  import * as React from "react";
2
+ import "../shared/Button.css";
2
3
  import { ButtonCommonProps, ButtonSize } from "../shared/ButtonProps";
3
4
  export interface IconButtonProps extends ButtonCommonProps {
4
5
  /**
package/index.css ADDED
@@ -0,0 +1,164 @@
1
+ /* CSS related to the Button component */
2
+
3
+ .tu-button {
4
+ @apply flex-row
5
+ inline-flex
6
+ gap-2
7
+ box-border
8
+ justify-center
9
+ items-center
10
+ whitespace-nowrap
11
+ max-w-full
12
+ outline-0
13
+ outline-current
14
+ transition-all
15
+ ease-in-out
16
+ rounded-lg
17
+ cursor-pointer
18
+ flex-none
19
+ py-1.5
20
+ px-3
21
+ h-min
22
+ drop-shadow
23
+ focus:ring
24
+ focus:ring-offset-1
25
+ focus:outline-none
26
+ disabled:cursor-not-allowed
27
+ text-sm
28
+ font-medium
29
+ align-middle;
30
+
31
+ &__spinner {
32
+ @apply w-[1em]
33
+ h-[1em];
34
+ }
35
+
36
+ &--rounded {
37
+ @apply !rounded-full;
38
+ }
39
+
40
+ &--square {
41
+ @apply aspect-square;
42
+ }
43
+
44
+ &--full-width {
45
+ @apply w-full flex-auto;
46
+ }
47
+
48
+ &--small {
49
+ @apply py-1 px-2;
50
+ }
51
+
52
+ &--large {
53
+ @apply py-2 px-4;
54
+ }
55
+
56
+ &--primary {
57
+ @apply bg-primary-600
58
+ text-white
59
+ hover:bg-primary-800
60
+ active:bg-primary-700
61
+ focus:ring-primary-300
62
+ disabled:hover:bg-slate-400
63
+ disabled:bg-slate-400
64
+ disabled:text-slate-200;
65
+ }
66
+
67
+ &--secondary {
68
+ @apply bg-slate-200
69
+ text-slate-600
70
+ hover:bg-slate-400
71
+ hover:text-slate-800
72
+ active:text-slate-700
73
+ active:bg-slate-300
74
+ focus:ring-slate-300
75
+ disabled:bg-slate-200
76
+ disabled:hover:bg-slate-200
77
+ disabled:text-slate-400;
78
+ }
79
+
80
+ &--danger {
81
+ @apply bg-danger-600
82
+ text-white
83
+ hover:bg-danger-800
84
+ active:bg-danger-700
85
+ focus:ring-danger-300
86
+ disabled:bg-slate-200
87
+ disabled:hover:bg-slate-200
88
+ disabled:text-slate-400;
89
+ }
90
+
91
+ &--warning {
92
+ @apply bg-orange-50
93
+ text-orange-600
94
+ hover:bg-orange-200
95
+ hover:text-orange-800
96
+ active:text-orange-700
97
+ active:bg-orange-100
98
+ focus:ring-orange-300
99
+ disabled:bg-orange-50
100
+ disabled:hover:bg-orange-50
101
+ disabled:text-slate-400;
102
+ }
103
+
104
+ &--tertiary {
105
+ @apply bg-white border
106
+ text-slate-600
107
+ active:bg-slate-100
108
+ active:text-slate-700
109
+ focus:ring-slate-300
110
+ hover:bg-slate-200
111
+ hover:text-slate-800
112
+ border-slate-300
113
+ disabled:bg-slate-200
114
+ disabled:hover:bg-slate-200
115
+ disabled:text-slate-400;
116
+ }
117
+
118
+ &--transparent {
119
+ @apply drop-shadow-none;
120
+ }
121
+
122
+ &--transparent-primary {
123
+ @apply text-primary-600
124
+ hover:text-primary-700
125
+ active:bg-primary-700
126
+ focus:ring-primary-300
127
+ hover:bg-primary-500/10
128
+ disabled:hover:bg-transparent;
129
+ }
130
+
131
+ &--transparent-secondary {
132
+ @apply text-neutral-600
133
+ hover:text-neutral-800
134
+ active:text-neutral-700
135
+ active:bg-black/10
136
+ focus:ring-neutral-300
137
+ hover:bg-black/5
138
+ disabled:hover:bg-transparent;
139
+ }
140
+
141
+ &--transparent-danger {
142
+ @apply text-danger-600
143
+ active:bg-danger-600/10
144
+ focus:ring-danger-300
145
+ hover:bg-danger-600/10
146
+ disabled:hover:bg-transparent;
147
+ }
148
+
149
+ &--transparent-warning {
150
+ @apply text-orange-600
151
+ active:bg-orange-500/20
152
+ focus:ring-orange-300
153
+ hover:bg-orange-500/10
154
+ disabled:hover:bg-transparent;
155
+ }
156
+
157
+ &--transparent-tertiary {
158
+ @apply text-slate-600
159
+ active:bg-slate-200/20
160
+ focus:ring-slate-300
161
+ hover:bg-slate-600/10
162
+ disabled:hover:bg-transparent;
163
+ }
164
+ }
package/package.json CHANGED
@@ -1,20 +1,20 @@
1
1
  {
2
2
  "name": "@trackunit/react-components",
3
- "version": "0.0.82-alpha-5bc30eb95.0",
3
+ "version": "0.0.82",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "UNLICENSED",
6
6
  "dependencies": {
7
- "@trackunit/css-core": "0.0.47-alpha-5bc30eb95.0",
8
- "@trackunit/tailwind-styled-components": "0.0.41-alpha-5bc30eb95.0",
7
+ "@trackunit/css-core": "0.0.46",
8
+ "@trackunit/tailwind-styled-components": "0.0.40",
9
9
  "react": "17.0.1",
10
- "@trackunit/ui-design-tokens": "0.0.40-alpha-5bc30eb95.0",
10
+ "@trackunit/ui-design-tokens": "0.0.39",
11
11
  "echarts-for-react": "^3.0.2",
12
12
  "uuid": "^8.3.2",
13
13
  "@react-spring/web": "^9.4.5",
14
14
  "react-use": "^17.3.2",
15
15
  "react-day-picker": "^8.0.3",
16
16
  "date-fns": "^2.28.0",
17
- "@trackunit/ui-icons": "0.0.42-alpha-5bc30eb95.0",
17
+ "@trackunit/ui-icons": "0.0.41",
18
18
  "react-useportal": "^1.0.16",
19
19
  "react-helmet": "^6.1.0",
20
20
  "@popperjs/core": "^2.11.4",