@smart-react-components/ui 2.0.16 → 2.0.18

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.
@@ -52,46 +52,49 @@ exports.default = (0, styled_components_1.default)(Div_1.default).attrs(({ hasIc
52
52
  font-size: ${t.$.size.badge[v].iconSize};
53
53
  }
54
54
  `,
55
- }))(({ theme, hasIconLeft, hasIconRight, isClickable, isFixedSize, isOutline, isSoft, palette, shape }) => `
55
+ }))(({ theme, hasIconLeft, hasIconRight, isClickable, isFixedSize, isOutline, isSoft, palette, shape }) => {
56
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
57
+ return `
56
58
  display: inline-flex;
57
59
  font-family: ${theme.$.fontFamily.badge};
58
60
  word-break: break-word;
59
61
  word-wrap: break-word;
60
62
 
61
63
  .src-badge-content {
62
- border-color: ${!isSoft ? theme.$.palette[palette].main : theme.$.palette[palette].soft};
63
64
  border-radius: ${(isFixedSize && shape === 'rounded') ? '100%' : theme.$.radius.badge[shape]};
64
65
  }
65
66
 
66
67
  ${isSoft
67
- ? `
68
+ ? `
68
69
  font-weight: ${theme.$.fontWeight.bold};
69
70
  `
70
- : ''}
71
+ : ''}
71
72
 
72
73
  ${!isOutline
73
- ? `
74
+ ? `
74
75
  .src-badge-content {
75
76
  ${!isSoft
76
- ? `
77
- background: ${theme.$.palette[palette].main};
78
- color: ${theme.$.palette[palette].font};
79
- fill: ${theme.$.palette[palette].font};
77
+ ? `
78
+ background: ${(_b = (_a = theme.$.palette[palette].badge) === null || _a === void 0 ? void 0 : _a.background) !== null && _b !== void 0 ? _b : theme.$.palette[palette].main};
79
+ border-color: ${(_d = (_c = theme.$.palette[palette].badge) === null || _c === void 0 ? void 0 : _c.border) !== null && _d !== void 0 ? _d : theme.$.palette[palette].main};
80
+ color: ${(_f = (_e = theme.$.palette[palette].badge) === null || _e === void 0 ? void 0 : _e.font) !== null && _f !== void 0 ? _f : theme.$.palette[palette].font};
81
+ fill: ${(_h = (_g = theme.$.palette[palette].badge) === null || _g === void 0 ? void 0 : _g.font) !== null && _h !== void 0 ? _h : theme.$.palette[palette].font};
80
82
  `
81
- : `
83
+ : `
82
84
  background: ${theme.$.palette[palette].soft};
85
+ border-color: ${theme.$.palette[palette].soft};
83
86
  color: ${theme.$.palette[palette].softFont};
84
87
  fill: ${theme.$.palette[palette].softFont};
85
88
  `}
86
89
  }
87
90
 
88
91
  ${isClickable
89
- ? `
92
+ ? `
90
93
  cursor: ${theme.$.cursor.badgeClickable};
91
94
 
92
95
  &:active {
93
96
  ${!isSoft
94
- ? `
97
+ ? `
95
98
  .src-badge-content {
96
99
  background: ${theme.$.palette[palette].dynamicer};
97
100
  border-color: ${theme.$.palette[palette].dynamicer};
@@ -102,7 +105,7 @@ exports.default = (0, styled_components_1.default)(Div_1.default).attrs(({ hasIc
102
105
  border-color: ${theme.$.palette[palette].dynamicest};
103
106
  }
104
107
  `
105
- : `
108
+ : `
106
109
  .src-badge-content {
107
110
  background: ${theme.$.palette[palette].softDynamicer};
108
111
  border-color: ${theme.$.palette[palette].softDynamicer};
@@ -115,26 +118,28 @@ exports.default = (0, styled_components_1.default)(Div_1.default).attrs(({ hasIc
115
118
  `}
116
119
  }
117
120
  `
118
- : ''}
121
+ : ''}
119
122
  `
120
- : `
123
+ : `
121
124
  .src-badge-content {
122
125
  ${!isSoft
123
- ? `
124
- color: ${theme.$.palette[palette].main};
125
- fill: ${theme.$.palette[palette].main};
126
+ ? `
127
+ border-color: ${(_l = (_k = (_j = theme.$.palette[palette].badge) === null || _j === void 0 ? void 0 : _j.outline) === null || _k === void 0 ? void 0 : _k.border) !== null && _l !== void 0 ? _l : theme.$.palette[palette].main};
128
+ color: ${(_p = (_o = (_m = theme.$.palette[palette].badge) === null || _m === void 0 ? void 0 : _m.outline) === null || _o === void 0 ? void 0 : _o.font) !== null && _p !== void 0 ? _p : theme.$.palette[palette].main};
129
+ fill: ${(_s = (_r = (_q = theme.$.palette[palette].badge) === null || _q === void 0 ? void 0 : _q.outline) === null || _r === void 0 ? void 0 : _r.font) !== null && _s !== void 0 ? _s : theme.$.palette[palette].main};
126
130
  `
127
- : `
131
+ : `
132
+ border-color: ${theme.$.palette[palette].soft};
128
133
  color: ${theme.$.palette[palette].soft};
129
134
  fill: ${theme.$.palette[palette].soft};
130
135
  `}
131
136
  }
132
137
 
133
138
  ${isClickable
134
- ? `
139
+ ? `
135
140
  &:active {
136
141
  ${!isSoft
137
- ? `
142
+ ? `
138
143
  .src-badge-content {
139
144
  background: ${theme.$.palette[palette].main};
140
145
  color: ${theme.$.palette[palette].font};
@@ -147,7 +152,7 @@ exports.default = (0, styled_components_1.default)(Div_1.default).attrs(({ hasIc
147
152
  fill: ${theme.$.palette[palette].font};
148
153
  }
149
154
  `
150
- : `
155
+ : `
151
156
  .src-badge-content {
152
157
  background: ${theme.$.palette[palette].soft};
153
158
  color: ${theme.$.palette[palette].softFont};
@@ -162,39 +167,40 @@ exports.default = (0, styled_components_1.default)(Div_1.default).attrs(({ hasIc
162
167
  `}
163
168
  }
164
169
  `
165
- : ''}
170
+ : ''}
166
171
  `}
167
172
 
168
173
  .src-badge-content {
169
174
  ${isFixedSize
170
- ? `
175
+ ? `
171
176
  align-items: center;
172
177
  display: inline-flex;
173
178
  justify-content: center;
174
179
  `
175
- : ''}
180
+ : ''}
176
181
 
177
182
  ${hasIconLeft
178
- ? `
183
+ ? `
179
184
  border-left: 0;
180
185
  border-bottom-left-radius: 0;
181
186
  border-top-left-radius: 0;
182
187
  `
183
- : ''}
188
+ : ''}
184
189
 
185
190
  ${hasIconRight
186
- ? `
191
+ ? `
187
192
  border-right: 0;
188
193
  border-bottom-right-radius: 0;
189
194
  border-top-right-radius: 0;
190
195
  `
191
- : ''}
196
+ : ''}
192
197
  }
193
198
 
194
199
  ${isClickable
195
- ? `
200
+ ? `
196
201
  cursor: default;
197
202
  user-select: none;
198
203
  `
199
- : ''}
200
- `);
204
+ : ''}
205
+ `;
206
+ });
@@ -101,7 +101,7 @@ exports.default = (0, styled_components_1.default)(Table_1.default).attrs({
101
101
 
102
102
  ${((_t = (_s = theme.$.palette[palette].table) === null || _s === void 0 ? void 0 : _s.even) === null || _t === void 0 ? void 0 : _t.font)
103
103
  ? `
104
- border-color: ${(_v = (_u = theme.$.palette[palette].table) === null || _u === void 0 ? void 0 : _u.even) === null || _v === void 0 ? void 0 : _v.font};
104
+ color: ${(_v = (_u = theme.$.palette[palette].table) === null || _u === void 0 ? void 0 : _u.even) === null || _v === void 0 ? void 0 : _v.font};
105
105
  `
106
106
  : ''}
107
107
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smart-react-components/ui",
3
- "version": "2.0.16",
3
+ "version": "2.0.18",
4
4
  "license": "MIT",
5
5
  "main": "index.js",
6
6
  "description": "SRC UI includes React and Styled components.",
@@ -64,9 +64,9 @@
64
64
  "test": "jest"
65
65
  },
66
66
  "devDependencies": {
67
- "@smart-react-components/core": "2.0.13",
68
- "@smart-react-components/router": "2.0.11",
69
- "@smart-react-components/transition": "2.0.12",
67
+ "@smart-react-components/core": "2.0.14",
68
+ "@smart-react-components/router": "2.0.12",
69
+ "@smart-react-components/transition": "2.0.13",
70
70
  "@testing-library/react": "13.4.0",
71
71
  "@types/jest": "29.0.1",
72
72
  "@types/react": "18.0.19",
@@ -83,9 +83,9 @@
83
83
  "typescript": "4.8.3"
84
84
  },
85
85
  "peerDependencies": {
86
- "@smart-react-components/core": "^2.0.13",
87
- "@smart-react-components/router": "^2.0.11",
88
- "@smart-react-components/transition": "^2.0.12",
86
+ "@smart-react-components/core": "^2.0.14",
87
+ "@smart-react-components/router": "^2.0.12",
88
+ "@smart-react-components/transition": "^2.0.13",
89
89
  "react": "^18.2.0",
90
90
  "react-dom": "^18.2.0",
91
91
  "styled-components": "^5.3.5"