@trackunit/react-components 0.0.64 → 0.0.67
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.
- package/README.md +1 -1
- package/components/Tip/Tip.d.ts +1 -4
- package/index.js +179 -192
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ At this point this library is only developed by Trackunit Employees.
|
|
|
12
12
|
For development related information see the [development readme](https://github.com/Trackunit/manager/blob/master/libs/react/components/DEVELOPMENT.md).
|
|
13
13
|
|
|
14
14
|
## Trackunit
|
|
15
|
-
This package was developed by Trackunit ApS.
|
|
15
|
+
This package was developed by Trackunit ApS.
|
|
16
16
|
Trackunit is the leading SaaS-based IoT solution for the construction industry, offering an ecosystem of hardware, fleet management software & telematics.
|
|
17
17
|
|
|
18
18
|

|
package/components/Tip/Tip.d.ts
CHANGED
|
@@ -16,7 +16,4 @@ export interface TipProps extends CommonProps {
|
|
|
16
16
|
* @param {TipProps} props - The props for the Tip component
|
|
17
17
|
* @returns {JSX.Element} Tip component
|
|
18
18
|
*/
|
|
19
|
-
export declare const Tip: {
|
|
20
|
-
({ children, iconProps, tooltipProps, dataTestId, ...rest }: TipProps): JSX.Element;
|
|
21
|
-
displayName: string;
|
|
22
|
-
};
|
|
19
|
+
export declare const Tip: ({ children, iconProps, tooltipProps, dataTestId, ...rest }: TipProps) => JSX.Element;
|
package/index.js
CHANGED
|
@@ -123,10 +123,10 @@ const getSpinnerStyles = () => ({
|
|
|
123
123
|
}) => {
|
|
124
124
|
switch ($size) {
|
|
125
125
|
case "small":
|
|
126
|
-
return tws`spinner--small`;
|
|
126
|
+
return tws`tu-spinner--small`;
|
|
127
127
|
|
|
128
128
|
case "large":
|
|
129
|
-
return tws`spinner--large`;
|
|
129
|
+
return tws`tu-spinner--large`;
|
|
130
130
|
|
|
131
131
|
case "regular":
|
|
132
132
|
default:
|
|
@@ -135,13 +135,13 @@ const getSpinnerStyles = () => ({
|
|
|
135
135
|
};
|
|
136
136
|
|
|
137
137
|
const StyledSpinner$1 = tw.span`
|
|
138
|
-
spinner
|
|
139
|
-
${p => p.$mode === "dark" ? tws`spinner--dark` : null}
|
|
138
|
+
tu-spinner
|
|
139
|
+
${p => p.$mode === "dark" ? tws`tu-spinner--dark` : null}
|
|
140
140
|
${getSpinnerStyles()}
|
|
141
141
|
`;
|
|
142
142
|
const Container$8 = tw.div`
|
|
143
|
-
spinner--container
|
|
144
|
-
${p => p.$centered ? tws`spinner--container-centered` : null}
|
|
143
|
+
tu-spinner--container
|
|
144
|
+
${p => p.$centered ? tws`tu-spinner--container-centered` : null}
|
|
145
145
|
`;
|
|
146
146
|
|
|
147
147
|
/**
|
|
@@ -156,18 +156,18 @@ const getStyles = () => ({
|
|
|
156
156
|
}) => {
|
|
157
157
|
const styles = {
|
|
158
158
|
filled: {
|
|
159
|
-
primary: tws`button--primary`,
|
|
160
|
-
secondary: tws`button--secondary`,
|
|
161
|
-
danger: tws`button--danger`,
|
|
162
|
-
tertiary: tws`button--tertiary`,
|
|
163
|
-
warning: tws`button--warning`
|
|
159
|
+
primary: tws`tu-button--primary`,
|
|
160
|
+
secondary: tws`tu-button--secondary`,
|
|
161
|
+
danger: tws`tu-button--danger`,
|
|
162
|
+
tertiary: tws`tu-button--tertiary`,
|
|
163
|
+
warning: tws`tu-button--warning`
|
|
164
164
|
},
|
|
165
165
|
transparent: {
|
|
166
|
-
primary: tws`button--transparent button--transparent-primary`,
|
|
167
|
-
secondary: tws`button--transparent button--transparent-secondary`,
|
|
168
|
-
danger: tws`button--transparent button--transparent-danger`,
|
|
169
|
-
tertiary: tws`button--transparent button--transparent-tertiary`,
|
|
170
|
-
warning: tws`button--transparent button--transparent-warning`
|
|
166
|
+
primary: tws`tu-button--transparent tu-button--transparent-primary`,
|
|
167
|
+
secondary: tws`tu-button--transparent tu-button--transparent-secondary`,
|
|
168
|
+
danger: tws`tu-button--transparent tu-button--transparent-danger`,
|
|
169
|
+
tertiary: tws`tu-button--transparent tu-button--transparent-tertiary`,
|
|
170
|
+
warning: tws`tu-button--transparent tu-button--transparent-warning`
|
|
171
171
|
}
|
|
172
172
|
};
|
|
173
173
|
return styles[$variant][$intent];
|
|
@@ -183,10 +183,10 @@ const getPadding = () => ({
|
|
|
183
183
|
}) => {
|
|
184
184
|
switch ($size) {
|
|
185
185
|
case "small":
|
|
186
|
-
return tws`button--small`;
|
|
186
|
+
return tws`tu-button--small`;
|
|
187
187
|
|
|
188
188
|
case "large":
|
|
189
|
-
return tws`button--large`;
|
|
189
|
+
return tws`tu-button--large`;
|
|
190
190
|
|
|
191
191
|
default:
|
|
192
192
|
return "";
|
|
@@ -240,16 +240,15 @@ const Button = React.forwardRef((_a, ref) => {
|
|
|
240
240
|
}));
|
|
241
241
|
});
|
|
242
242
|
const StyledButton$1 = tw.button`
|
|
243
|
-
button
|
|
244
|
-
${p => p.$square ? tws`button--square` : null}
|
|
245
|
-
${p => p.$fullWidth ? tws`button--fullWidth` : null}
|
|
243
|
+
tu-button
|
|
244
|
+
${p => p.$square ? tws`tu-button--square` : null}
|
|
245
|
+
${p => p.$fullWidth ? tws`tu-button--fullWidth` : null}
|
|
246
246
|
${getStyles()}
|
|
247
247
|
${getPadding()}
|
|
248
248
|
`;
|
|
249
249
|
const StyledSpinner = tw(Spinner)`
|
|
250
|
-
button__spinner
|
|
250
|
+
tu-button__spinner
|
|
251
251
|
`;
|
|
252
|
-
Button.displayName = "Button";
|
|
253
252
|
|
|
254
253
|
const IconButton = React.forwardRef((_a, ref) => {
|
|
255
254
|
var {
|
|
@@ -272,9 +271,8 @@ const IconButton = React.forwardRef((_a, ref) => {
|
|
|
272
271
|
children: loading ? jsx(Spinner, {}) : icon
|
|
273
272
|
}));
|
|
274
273
|
});
|
|
275
|
-
IconButton.displayName = "IconButton";
|
|
276
274
|
const StyledButton = tw(Button)`
|
|
277
|
-
${p => p.$circular ? tws`button--rounded` : null}
|
|
275
|
+
${p => p.$circular ? tws`tu-button--rounded` : null}
|
|
278
276
|
`;
|
|
279
277
|
|
|
280
278
|
/**
|
|
@@ -728,39 +726,39 @@ const Alert = ({
|
|
|
728
726
|
}));
|
|
729
727
|
};
|
|
730
728
|
const CloseButtonContainer = tw.div`
|
|
731
|
-
${p => p.$inline ? tws`alert__close-button-container--inline` : tws`alert__close-button-container`}
|
|
729
|
+
${p => p.$inline ? tws`tu-alert__close-button-container--inline` : tws`tu-alert__close-button-container`}
|
|
732
730
|
`;
|
|
733
731
|
|
|
734
732
|
const getBackgroundColor = () => ({
|
|
735
733
|
$intent
|
|
736
734
|
}) => {
|
|
737
735
|
const colors = {
|
|
738
|
-
danger: tws`alert--danger`,
|
|
739
|
-
warning: tws`alert--warning`,
|
|
740
|
-
success: tws`alert--success`,
|
|
741
|
-
info: tws`alert--info`
|
|
736
|
+
danger: tws`tu-alert--danger`,
|
|
737
|
+
warning: tws`tu-alert--warning`,
|
|
738
|
+
success: tws`tu-alert--success`,
|
|
739
|
+
info: tws`tu-alert--info`
|
|
742
740
|
};
|
|
743
741
|
return colors[$intent];
|
|
744
742
|
};
|
|
745
743
|
|
|
746
744
|
const Container$7 = tw.div`
|
|
747
|
-
alert
|
|
748
|
-
${p => p.$inline ? tws`alert--inline` : null}
|
|
745
|
+
tu-alert
|
|
746
|
+
${p => p.$inline ? tws`tu-alert--inline` : null}
|
|
749
747
|
${getBackgroundColor()}
|
|
750
748
|
`;
|
|
751
749
|
const Content$2 = tw.div`
|
|
752
|
-
${p => p.$inline ? tws`alert__content--inline` : tws`alert__content`}
|
|
750
|
+
${p => p.$inline ? tws`tu-alert__content--inline` : tws`tu-alert__content`}
|
|
753
751
|
`;
|
|
754
752
|
const Description$1 = tw(Text)`
|
|
755
|
-
${p => p.$hasTitle ? tws`alert__description` : null}
|
|
753
|
+
${p => p.$hasTitle ? tws`tu-alert__description` : null}
|
|
756
754
|
`;
|
|
757
755
|
const RightAligned = tw.div`
|
|
758
|
-
alert__right-aligned
|
|
759
|
-
${p => p.$inline ? tws`alert__right-aligned--inline` : null}
|
|
756
|
+
tu-alert__right-aligned
|
|
757
|
+
${p => p.$inline ? tws`tu-alert__right-aligned--inline` : null}
|
|
760
758
|
`;
|
|
761
759
|
const IconContainer$1 = tw.div`
|
|
762
|
-
alert__icon-container
|
|
763
|
-
${p => p.$inline ? tws`alert__icon-container--inline` : null}
|
|
760
|
+
tu-alert__icon-container
|
|
761
|
+
${p => p.$inline ? tws`tu-alert__icon-container--inline` : null}
|
|
764
762
|
`;
|
|
765
763
|
|
|
766
764
|
/**
|
|
@@ -805,7 +803,7 @@ const getSizeModifierClass$1 = () => ({
|
|
|
805
803
|
$variant
|
|
806
804
|
}) => {
|
|
807
805
|
const sizeModifierClass = {
|
|
808
|
-
large: tws`badge--large`,
|
|
806
|
+
large: tws`tu-badge--large`,
|
|
809
807
|
default: ""
|
|
810
808
|
};
|
|
811
809
|
return sizeModifierClass[$size];
|
|
@@ -816,20 +814,20 @@ const getBadgeModifierClass = () => ({
|
|
|
816
814
|
$subtle
|
|
817
815
|
}) => {
|
|
818
816
|
const colorClasses = {
|
|
819
|
-
primary: $subtle ? tws`badge--primary-subtle` : tws`badge--primary`,
|
|
820
|
-
accent: $subtle ? tws`badge--accent-subtle` : tws`badge--accent`,
|
|
821
|
-
success: $subtle ? tws`badge--success-subtle` : tws`badge--success`,
|
|
822
|
-
danger: $subtle ? tws`badge--danger-subtle` : tws`badge--danger`,
|
|
823
|
-
warning: $subtle ? tws`badge--warning-subtle` : tws`badge--warning`,
|
|
824
|
-
info: $subtle ? tws`badge--info-subtle` : tws`badge--info`,
|
|
825
|
-
neutral: $subtle ? tws`badge--neutral-subtle` : tws`badge--neutral`,
|
|
826
|
-
good: $subtle ? tws`badge--good-subtle` : tws`badge--good`,
|
|
827
|
-
low: $subtle ? tws`badge--low-subtle` : tws`badge--low`,
|
|
828
|
-
critical: $subtle ? tws`badge--critical-subtle` : tws`badge--critical`,
|
|
829
|
-
working: $subtle ? tws`badge--working-subtle` : tws`badge--working`,
|
|
830
|
-
idle: $subtle ? tws`badge--idle-subtle` : tws`badge--idle`,
|
|
831
|
-
stopped: $subtle ? tws`badge--stopped-subtle` : tws`badge--stopped`,
|
|
832
|
-
unknown: $subtle ? tws`badge--unknown-subtle` : tws`badge--unknown`
|
|
817
|
+
primary: $subtle ? tws`tu-badge--primary-subtle` : tws`tu-badge--primary`,
|
|
818
|
+
accent: $subtle ? tws`tu-badge--accent-subtle` : tws`tu-badge--accent`,
|
|
819
|
+
success: $subtle ? tws`tu-badge--success-subtle` : tws`tu-badge--success`,
|
|
820
|
+
danger: $subtle ? tws`tu-badge--danger-subtle` : tws`tu-badge--danger`,
|
|
821
|
+
warning: $subtle ? tws`tu-badge--warning-subtle` : tws`tu-badge--warning`,
|
|
822
|
+
info: $subtle ? tws`tu-badge--info-subtle` : tws`tu-badge--info`,
|
|
823
|
+
neutral: $subtle ? tws`tu-badge--neutral-subtle` : tws`badge--neutral`,
|
|
824
|
+
good: $subtle ? tws`tu-badge--good-subtle` : tws`tu-badge--good`,
|
|
825
|
+
low: $subtle ? tws`tu-badge--low-subtle` : tws`tu-badge--low`,
|
|
826
|
+
critical: $subtle ? tws`tu-badge--critical-subtle` : tws`tu-badge--critical`,
|
|
827
|
+
working: $subtle ? tws`tu-badge--working-subtle` : tws`tu-badge--working`,
|
|
828
|
+
idle: $subtle ? tws`tu-badge--idle-subtle` : tws`tu-badge--idle`,
|
|
829
|
+
stopped: $subtle ? tws`tu-badge--stopped-subtle` : tws`tu-badge--stopped`,
|
|
830
|
+
unknown: $subtle ? tws`tu-badge--unknown-subtle` : tws`tu-badge--unknown`
|
|
833
831
|
};
|
|
834
832
|
return colorClasses[$color];
|
|
835
833
|
};
|
|
@@ -838,13 +836,13 @@ const StyledText$3 = tw.text`
|
|
|
838
836
|
${p => {
|
|
839
837
|
switch (p.$variant) {
|
|
840
838
|
case "badge":
|
|
841
|
-
return tws`badge`;
|
|
839
|
+
return tws`tu-badge`;
|
|
842
840
|
|
|
843
841
|
case "pill":
|
|
844
|
-
return tws`badge--pill`;
|
|
842
|
+
return tws`tu-badge--pill`;
|
|
845
843
|
|
|
846
844
|
default:
|
|
847
|
-
return tws`badge`;
|
|
845
|
+
return tws`tu-badge`;
|
|
848
846
|
}
|
|
849
847
|
}}
|
|
850
848
|
${getBadgeModifierClass()}
|
|
@@ -892,7 +890,7 @@ const BaseInput = React.forwardRef((_a, ref) => {
|
|
|
892
890
|
})) : null, jsx("input", Object.assign({
|
|
893
891
|
ref: ref,
|
|
894
892
|
"data-testid": dataTestId,
|
|
895
|
-
className: tws`input__field`
|
|
893
|
+
className: tws`tu-input__field`
|
|
896
894
|
}, rest)), suffix !== null && addonBefore !== suffix ? jsx(InputSuffix, Object.assign({
|
|
897
895
|
"data-testid": `${dataTestId}-suffix`
|
|
898
896
|
}, {
|
|
@@ -905,30 +903,29 @@ const BaseInput = React.forwardRef((_a, ref) => {
|
|
|
905
903
|
}));
|
|
906
904
|
});
|
|
907
905
|
const InputPrefix = tw.div`
|
|
908
|
-
input__prefix
|
|
906
|
+
tu-input__prefix
|
|
909
907
|
`;
|
|
910
908
|
const InputSuffix = tw.div`
|
|
911
|
-
input__suffix
|
|
909
|
+
tu-input__suffix
|
|
912
910
|
`;
|
|
913
911
|
const AddonBefore = tw.div`
|
|
914
|
-
input__addon-before
|
|
912
|
+
tu-input__addon-before
|
|
915
913
|
`;
|
|
916
914
|
const AddonAfter = tw.div`
|
|
917
|
-
input__addon-after
|
|
915
|
+
tu-input__addon-after
|
|
918
916
|
`;
|
|
919
917
|
const InputContainer = tw.div`
|
|
920
|
-
input
|
|
918
|
+
tu-input
|
|
921
919
|
${({
|
|
922
920
|
$invalid
|
|
923
|
-
}) => $invalid ? tws`input--invalid` : null}
|
|
921
|
+
}) => $invalid ? tws`tu-input--invalid` : null}
|
|
924
922
|
${({
|
|
925
923
|
$disabled
|
|
926
|
-
}) => $disabled ? tws`input--disabled` : null}
|
|
924
|
+
}) => $disabled ? tws`tu-input--disabled` : null}
|
|
927
925
|
${({
|
|
928
926
|
$fieldSize
|
|
929
|
-
}) => $fieldSize === "small" ? tws`input--small` : null}
|
|
927
|
+
}) => $fieldSize === "small" ? tws`tu-input--small` : null}
|
|
930
928
|
`;
|
|
931
|
-
BaseInput.displayName = "BaseInput";
|
|
932
929
|
|
|
933
930
|
const ROLE_CARD = "region";
|
|
934
931
|
/**
|
|
@@ -984,10 +981,10 @@ const getOverflow$1 = () => ({
|
|
|
984
981
|
};
|
|
985
982
|
|
|
986
983
|
const StyledCard$1 = tw.div`
|
|
987
|
-
card
|
|
984
|
+
tu-card
|
|
988
985
|
${p => p.$fullHeight ? `h-full` : null}
|
|
989
986
|
|
|
990
|
-
${p => p.onClick && `card--clickable`}
|
|
987
|
+
${p => p.onClick && `tu-card--clickable`}
|
|
991
988
|
${getOverflow$1()}
|
|
992
989
|
`;
|
|
993
990
|
|
|
@@ -1116,7 +1113,7 @@ const getOverflow = () => ({
|
|
|
1116
1113
|
|
|
1117
1114
|
const StyledDensityContainer = tw(DensityContainer)`
|
|
1118
1115
|
${getOverflow()}
|
|
1119
|
-
card__body
|
|
1116
|
+
tu-card__body
|
|
1120
1117
|
`;
|
|
1121
1118
|
|
|
1122
1119
|
/**
|
|
@@ -1192,10 +1189,10 @@ const getVariantStyles = () => ({
|
|
|
1192
1189
|
$variant
|
|
1193
1190
|
}) => {
|
|
1194
1191
|
const variants = {
|
|
1195
|
-
primary: tws`heading--primary`,
|
|
1196
|
-
secondary: tws`heading--secondary`,
|
|
1197
|
-
tertiary: tws`heading--tertiary`,
|
|
1198
|
-
subtitle: tws`heading--subtitle`
|
|
1192
|
+
primary: tws`tu-heading--primary`,
|
|
1193
|
+
secondary: tws`tu-heading--secondary`,
|
|
1194
|
+
tertiary: tws`tu-heading--tertiary`,
|
|
1195
|
+
subtitle: tws`tu-heading--subtitle`
|
|
1199
1196
|
};
|
|
1200
1197
|
return variants[$variant];
|
|
1201
1198
|
};
|
|
@@ -1204,13 +1201,13 @@ const getFontColor = () => ({
|
|
|
1204
1201
|
$inverted,
|
|
1205
1202
|
$subtle
|
|
1206
1203
|
}) => {
|
|
1207
|
-
const subtle = $inverted ? tws`heading--subtle-inverted` : tws`heading--subtle`;
|
|
1208
|
-
const inverted = $inverted ? tws`heading--inverted` : null;
|
|
1204
|
+
const subtle = $inverted ? tws`tu-heading--subtle-inverted` : tws`tu-heading--subtle`;
|
|
1205
|
+
const inverted = $inverted ? tws`tu-heading--inverted` : null;
|
|
1209
1206
|
return $subtle ? subtle : inverted;
|
|
1210
1207
|
};
|
|
1211
1208
|
|
|
1212
1209
|
const StyledHeading = tw.div`
|
|
1213
|
-
heading
|
|
1210
|
+
tu-heading
|
|
1214
1211
|
${getFontColor()}
|
|
1215
1212
|
${getVariantStyles()}
|
|
1216
1213
|
`;
|
|
@@ -1376,10 +1373,10 @@ const Chart = ({
|
|
|
1376
1373
|
}));
|
|
1377
1374
|
};
|
|
1378
1375
|
const SpinnerContainer = tw.div`
|
|
1379
|
-
chart-spinner-container
|
|
1376
|
+
tu-chart-spinner-container
|
|
1380
1377
|
`;
|
|
1381
1378
|
const ChartContainer = tw.div`
|
|
1382
|
-
chart-container
|
|
1379
|
+
tu-chart-container
|
|
1383
1380
|
`;
|
|
1384
1381
|
|
|
1385
1382
|
/**
|
|
@@ -1517,15 +1514,14 @@ const Checkbox = React.forwardRef((_a, ref) => {
|
|
|
1517
1514
|
})), children]
|
|
1518
1515
|
}));
|
|
1519
1516
|
});
|
|
1520
|
-
Checkbox.displayName = "Checkbox";
|
|
1521
1517
|
const StyledCheckIcon = tw(CheckIcon)`
|
|
1522
|
-
checkbox--icon
|
|
1518
|
+
tu-checkbox--icon
|
|
1523
1519
|
`;
|
|
1524
1520
|
const StyledIndeterminateIcon = tw(IndeterminateIcon)`
|
|
1525
|
-
checkbox--icon
|
|
1521
|
+
tu-checkbox--icon
|
|
1526
1522
|
`;
|
|
1527
1523
|
const CheckboxWrapper = tw.span`
|
|
1528
|
-
checkbox
|
|
1524
|
+
tu-checkbox
|
|
1529
1525
|
transition
|
|
1530
1526
|
${({
|
|
1531
1527
|
$checked,
|
|
@@ -1533,36 +1529,36 @@ const CheckboxWrapper = tw.span`
|
|
|
1533
1529
|
$indeterminate
|
|
1534
1530
|
}) => {
|
|
1535
1531
|
if ($disabled) {
|
|
1536
|
-
return tws`checkbox--disabled`;
|
|
1532
|
+
return tws`tu-checkbox--disabled`;
|
|
1537
1533
|
}
|
|
1538
1534
|
|
|
1539
|
-
return $indeterminate ? tws`checkbox--indeterminate` : $checked ? tws`checkbox--selected` : tws`checkbox--deselected`;
|
|
1535
|
+
return $indeterminate ? tws`tu-checkbox--indeterminate` : $checked ? tws`tu-checkbox--selected` : tws`tu-checkbox--deselected`;
|
|
1540
1536
|
}}
|
|
1541
1537
|
|
|
1542
1538
|
${({
|
|
1543
1539
|
$isInvalid
|
|
1544
1540
|
}) => {
|
|
1545
1541
|
if ($isInvalid) {
|
|
1546
|
-
return tws`checkbox--invalid`;
|
|
1542
|
+
return tws`tu-checkbox--invalid`;
|
|
1547
1543
|
}
|
|
1548
1544
|
|
|
1549
1545
|
return tws``;
|
|
1550
1546
|
}}
|
|
1551
1547
|
`;
|
|
1552
1548
|
const HiddenInput$1 = tw.input`
|
|
1553
|
-
checkbox--input
|
|
1549
|
+
tu-checkbox--input
|
|
1554
1550
|
`;
|
|
1555
1551
|
const CheckboxContainer = tw.label`
|
|
1556
|
-
checkbox--container group
|
|
1552
|
+
tu-checkbox--container group
|
|
1557
1553
|
`;
|
|
1558
1554
|
const Label$4 = tw.label`
|
|
1559
|
-
checkbox__label
|
|
1555
|
+
tu-checkbox__label
|
|
1560
1556
|
${({
|
|
1561
1557
|
$disabled
|
|
1562
|
-
}) => $disabled ? tws`checkbox-item--disabled` : null}
|
|
1558
|
+
}) => $disabled ? tws`tu-checkbox-item--disabled` : null}
|
|
1563
1559
|
${({
|
|
1564
1560
|
$isInvalid
|
|
1565
|
-
}) => $isInvalid ? tws`checkbox--invalid` : null}
|
|
1561
|
+
}) => $isInvalid ? tws`tu-checkbox--invalid` : null}
|
|
1566
1562
|
`;
|
|
1567
1563
|
|
|
1568
1564
|
/**
|
|
@@ -1624,17 +1620,17 @@ const Collapse = ({
|
|
|
1624
1620
|
}));
|
|
1625
1621
|
};
|
|
1626
1622
|
const Rotate = tw(Icon$1)`
|
|
1627
|
-
${p => p.$expanded ? tws`icon--animated-rotate-expanded` : null}
|
|
1628
|
-
icon--animated-rotate
|
|
1623
|
+
${p => p.$expanded ? tws`tu-icon--animated-rotate-expanded` : null}
|
|
1624
|
+
tu-icon--animated-rotate
|
|
1629
1625
|
`;
|
|
1630
1626
|
const StyledCollapse = tw.div`
|
|
1631
|
-
collapse
|
|
1627
|
+
tu-collapse
|
|
1632
1628
|
`;
|
|
1633
1629
|
const CollapseLabel = tw.div`
|
|
1634
|
-
collapse__label
|
|
1630
|
+
tu-collapse__label
|
|
1635
1631
|
`;
|
|
1636
1632
|
const LabelContainer = tw.div`
|
|
1637
|
-
collapse__label__container
|
|
1633
|
+
tu-collapse__label__container
|
|
1638
1634
|
`;
|
|
1639
1635
|
|
|
1640
1636
|
const Collapsible = ({
|
|
@@ -1674,10 +1670,10 @@ const Collapsible = ({
|
|
|
1674
1670
|
};
|
|
1675
1671
|
|
|
1676
1672
|
const AnimatedCollapsible = tw(animated.div)`
|
|
1677
|
-
collapsible--animated
|
|
1673
|
+
tu-collapsible--animated
|
|
1678
1674
|
`;
|
|
1679
1675
|
const StyledCollapsible = tw.div`
|
|
1680
|
-
collapsible
|
|
1676
|
+
tu-collapsible
|
|
1681
1677
|
`;
|
|
1682
1678
|
|
|
1683
1679
|
/**
|
|
@@ -1910,7 +1906,6 @@ const AnimatedPopover = React.forwardRef(({
|
|
|
1910
1906
|
}))]
|
|
1911
1907
|
});
|
|
1912
1908
|
});
|
|
1913
|
-
AnimatedPopover.displayName = "AnimatedPopover";
|
|
1914
1909
|
const Backdrop$1 = tw.div`
|
|
1915
1910
|
fixed
|
|
1916
1911
|
inset-0
|
|
@@ -2346,11 +2341,11 @@ const Flex$1 = tw.div`
|
|
|
2346
2341
|
inline-flex
|
|
2347
2342
|
`;
|
|
2348
2343
|
const Container$4 = tw(AnimatedPopover)`
|
|
2349
|
-
tooltip__container
|
|
2344
|
+
tu-tooltip__container
|
|
2350
2345
|
`;
|
|
2351
2346
|
const Content$1 = tw.div`
|
|
2352
|
-
tooltip__content
|
|
2353
|
-
${p => p.$mode === "light" ? tws`tooltip--light` : null}
|
|
2347
|
+
tu-tooltip__content
|
|
2348
|
+
${p => p.$mode === "light" ? tws`tu-tooltip--light` : null}
|
|
2354
2349
|
`;
|
|
2355
2350
|
|
|
2356
2351
|
/**
|
|
@@ -2389,9 +2384,8 @@ const Tip = _a => {
|
|
|
2389
2384
|
}));
|
|
2390
2385
|
};
|
|
2391
2386
|
const TipContainer = tw.span`
|
|
2392
|
-
tip
|
|
2387
|
+
tu-tip
|
|
2393
2388
|
`;
|
|
2394
|
-
Tip.displayName = "Tip";
|
|
2395
2389
|
|
|
2396
2390
|
/**
|
|
2397
2391
|
* The FormGroup component should be used to wrap any Input element that needs a label.
|
|
@@ -2441,7 +2435,7 @@ const FormGroup = ({
|
|
|
2441
2435
|
}));
|
|
2442
2436
|
};
|
|
2443
2437
|
const FormGroupRoot = tw.label`
|
|
2444
|
-
formgroup
|
|
2438
|
+
tu-formgroup
|
|
2445
2439
|
`; // TODO: Update and use Label component instead
|
|
2446
2440
|
|
|
2447
2441
|
const StyledTitle = tw.span`
|
|
@@ -2452,16 +2446,16 @@ const StyledTitle = tw.span`
|
|
|
2452
2446
|
mb-1
|
|
2453
2447
|
`;
|
|
2454
2448
|
const ContainerBefore = tw.div`
|
|
2455
|
-
formGroup-container-before
|
|
2449
|
+
tu-formGroup-container-before
|
|
2456
2450
|
`;
|
|
2457
2451
|
const ContainerAfter = tw.div`
|
|
2458
|
-
formGroup-container-after
|
|
2452
|
+
tu-formGroup-container-after
|
|
2459
2453
|
${({
|
|
2460
2454
|
$isInvalid
|
|
2461
|
-
}) => $isInvalid ? tws`formGroup-container-after--invalid` : null}
|
|
2455
|
+
}) => $isInvalid ? tws`tu-formGroup-container-after--invalid` : null}
|
|
2462
2456
|
`;
|
|
2463
2457
|
const HelpAddon = tw.span`
|
|
2464
|
-
formGroup-helpAddon
|
|
2458
|
+
tu-formGroup-helpAddon
|
|
2465
2459
|
`;
|
|
2466
2460
|
|
|
2467
2461
|
/**
|
|
@@ -2504,52 +2498,52 @@ const Indicator$1 = _a => {
|
|
|
2504
2498
|
}));
|
|
2505
2499
|
};
|
|
2506
2500
|
const Container$3 = tw.div`
|
|
2507
|
-
indicator
|
|
2501
|
+
tu-indicator
|
|
2508
2502
|
${({
|
|
2509
2503
|
$color
|
|
2510
2504
|
}) => {
|
|
2511
2505
|
switch ($color) {
|
|
2512
2506
|
case colors.PRIMARY:
|
|
2513
|
-
return tws`indicator--primary`;
|
|
2507
|
+
return tws`tu-indicator--primary`;
|
|
2514
2508
|
|
|
2515
2509
|
case colors.ACCENT:
|
|
2516
|
-
return tws`indicator--accent`;
|
|
2510
|
+
return tws`tu-indicator--accent`;
|
|
2517
2511
|
|
|
2518
2512
|
case colors.NEUTRAL:
|
|
2519
|
-
return tws`indicator--neutral`;
|
|
2513
|
+
return tws`tu-indicator--neutral`;
|
|
2520
2514
|
|
|
2521
2515
|
case colors.INFO:
|
|
2522
|
-
return tws`indicator--info`;
|
|
2516
|
+
return tws`tu-indicator--info`;
|
|
2523
2517
|
|
|
2524
2518
|
case colors.SUCCESS:
|
|
2525
|
-
return tws`indicator--success`;
|
|
2519
|
+
return tws`tu-indicator--success`;
|
|
2526
2520
|
|
|
2527
2521
|
case colors.WARNING:
|
|
2528
|
-
return tws`indicator--warning`;
|
|
2522
|
+
return tws`tu-indicator--warning`;
|
|
2529
2523
|
|
|
2530
2524
|
case colors.DANGER:
|
|
2531
|
-
return tws`indicator--danger`;
|
|
2525
|
+
return tws`tu-indicator--danger`;
|
|
2532
2526
|
|
|
2533
2527
|
case colors.GOOD:
|
|
2534
|
-
return tws`indicator--good`;
|
|
2528
|
+
return tws`tu-indicator--good`;
|
|
2535
2529
|
|
|
2536
2530
|
case colors.LOW:
|
|
2537
|
-
return tws`indicator--low`;
|
|
2531
|
+
return tws`tu-indicator--low`;
|
|
2538
2532
|
|
|
2539
2533
|
case colors.CRITICAL:
|
|
2540
|
-
return tws`indicator--critical`;
|
|
2534
|
+
return tws`tu-indicator--critical`;
|
|
2541
2535
|
|
|
2542
2536
|
case colors.WORKING:
|
|
2543
|
-
return tws`indicator--working`;
|
|
2537
|
+
return tws`tu-indicator--working`;
|
|
2544
2538
|
|
|
2545
2539
|
case colors.IDLE:
|
|
2546
|
-
return tws`indicator--idle`;
|
|
2540
|
+
return tws`tu-indicator--idle`;
|
|
2547
2541
|
|
|
2548
2542
|
case colors.STOPPED:
|
|
2549
|
-
return tws`indicator--stopped`;
|
|
2543
|
+
return tws`tu-indicator--stopped`;
|
|
2550
2544
|
|
|
2551
2545
|
case colors.UNKNOWN:
|
|
2552
|
-
return tws`indicator--unknown`;
|
|
2546
|
+
return tws`tu-indicator--unknown`;
|
|
2553
2547
|
|
|
2554
2548
|
default:
|
|
2555
2549
|
return "";
|
|
@@ -2557,16 +2551,16 @@ const Container$3 = tw.div`
|
|
|
2557
2551
|
}}
|
|
2558
2552
|
`;
|
|
2559
2553
|
const IconBackground = tw.div`
|
|
2560
|
-
indicator__icon-background
|
|
2554
|
+
tu-indicator__icon-background
|
|
2561
2555
|
|
|
2562
2556
|
${({
|
|
2563
2557
|
$withBackground
|
|
2564
2558
|
}) => {
|
|
2565
|
-
return $withBackground ? "" : "indicator__icon-background--none";
|
|
2559
|
+
return $withBackground ? "" : "tu-indicator__icon-background--none";
|
|
2566
2560
|
}}
|
|
2567
2561
|
`;
|
|
2568
2562
|
const Label$3 = tw.div`
|
|
2569
|
-
indicator__label
|
|
2563
|
+
tu-indicator__label
|
|
2570
2564
|
`;
|
|
2571
2565
|
|
|
2572
2566
|
/**
|
|
@@ -2608,7 +2602,7 @@ const Label$2 = ({
|
|
|
2608
2602
|
});
|
|
2609
2603
|
};
|
|
2610
2604
|
const Description = tw(Text)`
|
|
2611
|
-
label
|
|
2605
|
+
tu-label
|
|
2612
2606
|
`;
|
|
2613
2607
|
|
|
2614
2608
|
/**
|
|
@@ -2731,16 +2725,16 @@ const MenuItem = ({
|
|
|
2731
2725
|
}));
|
|
2732
2726
|
};
|
|
2733
2727
|
const Container$2 = tw.div`
|
|
2734
|
-
group menuItem
|
|
2728
|
+
group tu-menuItem
|
|
2735
2729
|
`;
|
|
2736
2730
|
const Content = tw.div`
|
|
2737
|
-
menuItem__content
|
|
2731
|
+
tu-menuItem__content
|
|
2738
2732
|
`;
|
|
2739
2733
|
const Icon = tw.div`
|
|
2740
|
-
menuItem__icon
|
|
2734
|
+
tu-menuItem__icon
|
|
2741
2735
|
`;
|
|
2742
2736
|
const Label = tw.div`
|
|
2743
|
-
menuItem__label
|
|
2737
|
+
tu-menuItem__label
|
|
2744
2738
|
`;
|
|
2745
2739
|
|
|
2746
2740
|
/**
|
|
@@ -2778,13 +2772,13 @@ const MenuList = _a => {
|
|
|
2778
2772
|
});
|
|
2779
2773
|
};
|
|
2780
2774
|
const Wrapper = tw.div`
|
|
2781
|
-
menuList__wrapper
|
|
2775
|
+
tu-menuList__wrapper
|
|
2782
2776
|
`;
|
|
2783
2777
|
const Container$1 = tw.div`
|
|
2784
|
-
menuList
|
|
2778
|
+
tu-menuList
|
|
2785
2779
|
`;
|
|
2786
2780
|
const Divider = tw.div`
|
|
2787
|
-
menuList__divider
|
|
2781
|
+
tu-menuList__divider
|
|
2788
2782
|
`;
|
|
2789
2783
|
|
|
2790
2784
|
/**
|
|
@@ -2836,7 +2830,7 @@ const ModalBackdrop = ({
|
|
|
2836
2830
|
});
|
|
2837
2831
|
};
|
|
2838
2832
|
const Backdrop = tw(animated.div)`
|
|
2839
|
-
modal--backdrop
|
|
2833
|
+
tu-modal--backdrop
|
|
2840
2834
|
`;
|
|
2841
2835
|
|
|
2842
2836
|
/** Preferred usage is with useModal(), so the modal is placed at highest level. */
|
|
@@ -2894,21 +2888,21 @@ const getCardMaxWidth = () => ({
|
|
|
2894
2888
|
}) => {
|
|
2895
2889
|
maxWidth = maxWidth ? maxWidth : "full";
|
|
2896
2890
|
const widths = {
|
|
2897
|
-
slim: tws`modal-card--slim`,
|
|
2898
|
-
narrow: tws`modal-card--narrow`,
|
|
2899
|
-
wide: tws`modal-card--wide`,
|
|
2900
|
-
normal: tws`modal-card--normal`,
|
|
2891
|
+
slim: tws`tu-modal-card--slim`,
|
|
2892
|
+
narrow: tws`tu-modal-card--narrow`,
|
|
2893
|
+
wide: tws`tu-modal-card--wide`,
|
|
2894
|
+
normal: tws`tu-modal-card--normal`,
|
|
2901
2895
|
full: ""
|
|
2902
2896
|
};
|
|
2903
2897
|
return widths[maxWidth];
|
|
2904
2898
|
};
|
|
2905
2899
|
|
|
2906
2900
|
const StyledCard = tw(Card)`
|
|
2907
|
-
modal__card
|
|
2901
|
+
tu-modal__card
|
|
2908
2902
|
${getCardMaxWidth()}
|
|
2909
2903
|
`;
|
|
2910
2904
|
const StyledDiv = tw.div`
|
|
2911
|
-
modal__container
|
|
2905
|
+
tu-modal__container
|
|
2912
2906
|
`;
|
|
2913
2907
|
const AnimatedDiv = animated(StyledDiv);
|
|
2914
2908
|
|
|
@@ -3010,7 +3004,7 @@ const FilterListMapLayout = ({
|
|
|
3010
3004
|
children: children
|
|
3011
3005
|
});
|
|
3012
3006
|
const Layout$4 = tw.span`
|
|
3013
|
-
layout-FilterListMap
|
|
3007
|
+
tu-layout-FilterListMap
|
|
3014
3008
|
`;
|
|
3015
3009
|
|
|
3016
3010
|
/**
|
|
@@ -3037,17 +3031,17 @@ const FullWidthRepeatingLayout = ({
|
|
|
3037
3031
|
children: children
|
|
3038
3032
|
}));
|
|
3039
3033
|
const Layout$3 = tw.span`
|
|
3040
|
-
layout-FullWidthRepeatingLayout
|
|
3034
|
+
tu-layout-FullWidthRepeatingLayout
|
|
3041
3035
|
|
|
3042
3036
|
${({
|
|
3043
3037
|
$rowSizing
|
|
3044
3038
|
}) => {
|
|
3045
3039
|
switch ($rowSizing) {
|
|
3046
3040
|
case "MinContent":
|
|
3047
|
-
return tws` layout-FullWidthRepeatingLayout--MinContent`;
|
|
3041
|
+
return tws` tu-layout-FullWidthRepeatingLayout--MinContent`;
|
|
3048
3042
|
|
|
3049
3043
|
case "Equal":
|
|
3050
|
-
return tws` layout-FullWidthRepeatingLayout--Equal`;
|
|
3044
|
+
return tws` tu-layout-FullWidthRepeatingLayout--Equal`;
|
|
3051
3045
|
|
|
3052
3046
|
case "Unmanaged":
|
|
3053
3047
|
default:
|
|
@@ -3103,17 +3097,17 @@ const IntrinsicallyResponsiveGrid = ({
|
|
|
3103
3097
|
children: children
|
|
3104
3098
|
}));
|
|
3105
3099
|
const Layout$2 = tw.span`
|
|
3106
|
-
layout-IntrinsicallyResponsiveGrid
|
|
3100
|
+
tu-layout-IntrinsicallyResponsiveGrid
|
|
3107
3101
|
${({
|
|
3108
3102
|
$occupation
|
|
3109
3103
|
}) => {
|
|
3110
3104
|
switch ($occupation) {
|
|
3111
3105
|
case "auto-fit":
|
|
3112
|
-
return tws`layout-IntrinsicallyResponsiveGrid--fit`;
|
|
3106
|
+
return tws`tu-layout-IntrinsicallyResponsiveGrid--fit`;
|
|
3113
3107
|
|
|
3114
3108
|
case "auto-fill":
|
|
3115
3109
|
default:
|
|
3116
|
-
return tws`layout-IntrinsicallyResponsiveGrid--fill`;
|
|
3110
|
+
return tws`tu-layout-IntrinsicallyResponsiveGrid--fill`;
|
|
3117
3111
|
}
|
|
3118
3112
|
}}
|
|
3119
3113
|
|
|
@@ -3122,17 +3116,17 @@ const Layout$2 = tw.span`
|
|
|
3122
3116
|
}) => {
|
|
3123
3117
|
switch ($minColumnWidth) {
|
|
3124
3118
|
case "slim":
|
|
3125
|
-
return tws`layout-IntrinsicallyResponsiveGrid--slim`;
|
|
3119
|
+
return tws`tu-layout-IntrinsicallyResponsiveGrid--slim`;
|
|
3126
3120
|
|
|
3127
3121
|
case "narrow":
|
|
3128
|
-
return tws`layout-IntrinsicallyResponsiveGrid--narrow`;
|
|
3122
|
+
return tws`tu-layout-IntrinsicallyResponsiveGrid--narrow`;
|
|
3129
3123
|
|
|
3130
3124
|
case "wide":
|
|
3131
|
-
return tws`layout-IntrinsicallyResponsiveGrid--wide`;
|
|
3125
|
+
return tws`tu-layout-IntrinsicallyResponsiveGrid--wide`;
|
|
3132
3126
|
|
|
3133
3127
|
case "normal":
|
|
3134
3128
|
default:
|
|
3135
|
-
return tws`layout-IntrinsicallyResponsiveGrid--normal`;
|
|
3129
|
+
return tws`tu-layout-IntrinsicallyResponsiveGrid--normal`;
|
|
3136
3130
|
}
|
|
3137
3131
|
}}
|
|
3138
3132
|
|
|
@@ -3187,7 +3181,7 @@ const TitleNavContentLayout = ({
|
|
|
3187
3181
|
children: children
|
|
3188
3182
|
});
|
|
3189
3183
|
const Layout$1 = tw.div`
|
|
3190
|
-
layout-TitleNavContentLayout
|
|
3184
|
+
tu-layout-TitleNavContentLayout
|
|
3191
3185
|
`;
|
|
3192
3186
|
|
|
3193
3187
|
/**
|
|
@@ -3203,7 +3197,7 @@ const TwoColumnLayout = ({
|
|
|
3203
3197
|
children: children
|
|
3204
3198
|
});
|
|
3205
3199
|
const Layout = tw.div`
|
|
3206
|
-
layout-TwoColumnLayout
|
|
3200
|
+
tu-layout-TwoColumnLayout
|
|
3207
3201
|
`;
|
|
3208
3202
|
|
|
3209
3203
|
/**
|
|
@@ -3231,15 +3225,15 @@ const MultiRowTableCell = ({
|
|
|
3231
3225
|
}));
|
|
3232
3226
|
};
|
|
3233
3227
|
const Root$1 = tw(GridArea)`
|
|
3234
|
-
multi-row-table-cell-container
|
|
3228
|
+
tu-multi-row-table-cell-container
|
|
3235
3229
|
`;
|
|
3236
3230
|
const Header = tw.div`
|
|
3237
|
-
multi-row-table-cell
|
|
3238
|
-
multi-row-table-cell__header
|
|
3231
|
+
tu-multi-row-table-cell
|
|
3232
|
+
tu-multi-row-table-cell__header
|
|
3239
3233
|
`;
|
|
3240
3234
|
const Secondary = tw.div`
|
|
3241
|
-
multi-row-table-cell
|
|
3242
|
-
multi-row-table-cell__secondary
|
|
3235
|
+
tu-multi-row-table-cell
|
|
3236
|
+
tu-multi-row-table-cell__secondary
|
|
3243
3237
|
`;
|
|
3244
3238
|
|
|
3245
3239
|
/**
|
|
@@ -3252,7 +3246,6 @@ const NumberInput = forwardRef((props, ref) => jsx(BaseInput, Object.assign({
|
|
|
3252
3246
|
ref: ref,
|
|
3253
3247
|
type: "number"
|
|
3254
3248
|
}, props)));
|
|
3255
|
-
NumberInput.displayName = "NumberInput";
|
|
3256
3249
|
|
|
3257
3250
|
/**
|
|
3258
3251
|
* The number field component is used for entering numeric values and includes controls for incrementally increasing or decreasing the value.
|
|
@@ -3297,7 +3290,6 @@ const NumberField = forwardRef((_a, ref) => {
|
|
|
3297
3290
|
}))
|
|
3298
3291
|
}));
|
|
3299
3292
|
});
|
|
3300
|
-
NumberField.displayName = "NumberField";
|
|
3301
3293
|
|
|
3302
3294
|
const GetSpacerHeight = () => ({
|
|
3303
3295
|
minHeight
|
|
@@ -3337,7 +3329,7 @@ const Spacer = ({
|
|
|
3337
3329
|
});
|
|
3338
3330
|
};
|
|
3339
3331
|
const Space = tw.div`
|
|
3340
|
-
${p => `${p.border ? `spacer--border` : null}`}
|
|
3332
|
+
${p => `${p.border ? `tu-spacer--border` : null}`}
|
|
3341
3333
|
${GetSpacerHeight()}
|
|
3342
3334
|
`;
|
|
3343
3335
|
|
|
@@ -3584,11 +3576,11 @@ const SelectContainer = ({
|
|
|
3584
3576
|
}));
|
|
3585
3577
|
};
|
|
3586
3578
|
const Container = tw.label`
|
|
3587
|
-
select__container
|
|
3579
|
+
tu-select__container
|
|
3588
3580
|
`;
|
|
3589
3581
|
const InformativeText$1 = tw(Text)`
|
|
3590
|
-
informative-text
|
|
3591
|
-
${p => p.$hasError ? `informative-text--error` : null}
|
|
3582
|
+
tu-informative-text
|
|
3583
|
+
${p => p.$hasError ? `tu-informative-text--error` : null}
|
|
3592
3584
|
`;
|
|
3593
3585
|
|
|
3594
3586
|
const getSelectHeight = size => {
|
|
@@ -3858,9 +3850,8 @@ const SkeletonLines = memo(({
|
|
|
3858
3850
|
});
|
|
3859
3851
|
});
|
|
3860
3852
|
const SkeletonLine = tw.div`
|
|
3861
|
-
skeleton-line
|
|
3853
|
+
tu-skeleton-line
|
|
3862
3854
|
`;
|
|
3863
|
-
SkeletonLines.displayName = "SkeletonLines";
|
|
3864
3855
|
|
|
3865
3856
|
/**
|
|
3866
3857
|
* Tags allow users to enter information and filter content.
|
|
@@ -3900,7 +3891,7 @@ const Tag = _a => {
|
|
|
3900
3891
|
style: {
|
|
3901
3892
|
"-webkit-transition": "-webkit-transform 0.150s"
|
|
3902
3893
|
},
|
|
3903
|
-
className: size === "default" ? tws`tag__icon` : tws`tag__icon tag__icon--small`
|
|
3894
|
+
className: size === "default" ? tws`tu-tag__icon` : tws`tu-tag__icon tu-tag__icon--small`
|
|
3904
3895
|
})
|
|
3905
3896
|
}))]
|
|
3906
3897
|
}));
|
|
@@ -3911,8 +3902,8 @@ const getSizeModifierClass = () => ({
|
|
|
3911
3902
|
$withXIcon
|
|
3912
3903
|
}) => {
|
|
3913
3904
|
const tagSizeModifierClass = {
|
|
3914
|
-
default: $withXIcon ? tws`tag--withIcon ` : tws` `,
|
|
3915
|
-
small: $withXIcon ? tws`tag--small tag--withIcon` : tws`tag--small`
|
|
3905
|
+
default: $withXIcon ? tws`tu-tag--withIcon ` : tws` `,
|
|
3906
|
+
small: $withXIcon ? tws`tu-tag--small tu-tag--withIcon` : tws`tu-tag--small`
|
|
3916
3907
|
};
|
|
3917
3908
|
return tagSizeModifierClass[$size];
|
|
3918
3909
|
};
|
|
@@ -3921,26 +3912,26 @@ const getColorModifierClass = () => ({
|
|
|
3921
3912
|
$color
|
|
3922
3913
|
}) => {
|
|
3923
3914
|
const colorClasses = {
|
|
3924
|
-
primary: tws`tag--primary`,
|
|
3925
|
-
accent: tws`tag--accent`,
|
|
3926
|
-
success: tws`tag--success`,
|
|
3927
|
-
danger: tws`tag--danger`,
|
|
3928
|
-
warning: tws`tag--warning`,
|
|
3929
|
-
info: tws`tag--info`,
|
|
3930
|
-
neutral: tws`tag--neutral`,
|
|
3931
|
-
good: tws`tag--good`,
|
|
3932
|
-
low: tws`tag--low`,
|
|
3933
|
-
critical: tws`tag--critical`,
|
|
3934
|
-
working: tws`tag--working`,
|
|
3935
|
-
idle: tws`tag--idle`,
|
|
3936
|
-
stopped: tws`tag--stopped`,
|
|
3937
|
-
unknown: tws`tag--unknown`
|
|
3915
|
+
primary: tws`tu-tag--primary`,
|
|
3916
|
+
accent: tws`tu-tag--accent`,
|
|
3917
|
+
success: tws`tu-tag--success`,
|
|
3918
|
+
danger: tws`tu-tag--danger`,
|
|
3919
|
+
warning: tws`tu-tag--warning`,
|
|
3920
|
+
info: tws`tu-tag--info`,
|
|
3921
|
+
neutral: tws`tu-tag--neutral`,
|
|
3922
|
+
good: tws`tu-tag--good`,
|
|
3923
|
+
low: tws`tu-tag--low`,
|
|
3924
|
+
critical: tws`tu-tag--critical`,
|
|
3925
|
+
working: tws`tu-tag--working`,
|
|
3926
|
+
idle: tws`tu-tag--idle`,
|
|
3927
|
+
stopped: tws`tu-tag--stopped`,
|
|
3928
|
+
unknown: tws`tu-tag--unknown`
|
|
3938
3929
|
};
|
|
3939
3930
|
return colorClasses[$color];
|
|
3940
3931
|
};
|
|
3941
3932
|
|
|
3942
3933
|
const StyledText = tw.text`
|
|
3943
|
-
tag
|
|
3934
|
+
tu-tag
|
|
3944
3935
|
${getSizeModifierClass()}
|
|
3945
3936
|
${getColorModifierClass()}
|
|
3946
3937
|
`;
|
|
@@ -4007,7 +3998,6 @@ const TextArea = React.forwardRef(({
|
|
|
4007
3998
|
}))]
|
|
4008
3999
|
}));
|
|
4009
4000
|
});
|
|
4010
|
-
TextArea.displayName = "TextArea";
|
|
4011
4001
|
const TextAreaContainer = tw.div``;
|
|
4012
4002
|
const StyledTextArea = tw.textarea`
|
|
4013
4003
|
input
|
|
@@ -4027,10 +4017,10 @@ const StyledTextArea = tw.textarea`
|
|
|
4027
4017
|
|
|
4028
4018
|
${({
|
|
4029
4019
|
$hasError
|
|
4030
|
-
}) => $hasError ? tws`input--invalid` : null}
|
|
4020
|
+
}) => $hasError ? tws`tu-input--invalid` : null}
|
|
4031
4021
|
${({
|
|
4032
4022
|
disabled
|
|
4033
|
-
}) => disabled ? tws`input--disabled` : null}
|
|
4023
|
+
}) => disabled ? tws`tu-input--disabled` : null}
|
|
4034
4024
|
${({
|
|
4035
4025
|
$resize
|
|
4036
4026
|
}) => {
|
|
@@ -4069,7 +4059,6 @@ const TextInput = forwardRef((props, ref) => jsx(BaseInput, Object.assign({
|
|
|
4069
4059
|
ref: ref,
|
|
4070
4060
|
type: "text"
|
|
4071
4061
|
}, props)));
|
|
4072
|
-
TextInput.displayName = "TextInput";
|
|
4073
4062
|
|
|
4074
4063
|
/**
|
|
4075
4064
|
* The TextLengthIndicator component shows a `{length}/{maxLength}` label.
|
|
@@ -4147,7 +4136,6 @@ const TextField = React.forwardRef((_a, ref) => {
|
|
|
4147
4136
|
}))
|
|
4148
4137
|
}));
|
|
4149
4138
|
});
|
|
4150
|
-
TextField.displayName = "TextField";
|
|
4151
4139
|
|
|
4152
4140
|
const Toggle = React.forwardRef(({
|
|
4153
4141
|
toggled = false,
|
|
@@ -4194,7 +4182,6 @@ const Toggle = React.forwardRef(({
|
|
|
4194
4182
|
}))]
|
|
4195
4183
|
});
|
|
4196
4184
|
});
|
|
4197
|
-
Toggle.displayName = "Toggle";
|
|
4198
4185
|
const Switch = tw.span`
|
|
4199
4186
|
rounded-full
|
|
4200
4187
|
bg-white
|
|
@@ -4224,7 +4211,7 @@ const SwitchContainer = tw.label`
|
|
|
4224
4211
|
active:shadow
|
|
4225
4212
|
`;
|
|
4226
4213
|
const HiddenInput = tw.input`
|
|
4227
|
-
absolute
|
|
4214
|
+
absolute
|
|
4228
4215
|
opacity-0
|
|
4229
4216
|
-z-10
|
|
4230
4217
|
`;
|
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.67",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@trackunit/css-core": "0.0.
|
|
8
|
-
"@trackunit/tailwind-styled-components": "0.0.
|
|
7
|
+
"@trackunit/css-core": "0.0.43",
|
|
8
|
+
"@trackunit/tailwind-styled-components": "0.0.39",
|
|
9
9
|
"react": "17.0.1",
|
|
10
|
-
"@trackunit/ui-design-tokens": "0.0.
|
|
10
|
+
"@trackunit/ui-design-tokens": "0.0.38",
|
|
11
11
|
"echarts-for-react": "^3.0.2",
|
|
12
12
|
"uuid": "^8.3.2",
|
|
13
13
|
"@react-spring/web": "^9.4.4",
|
|
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.
|
|
17
|
+
"@trackunit/ui-icons": "0.0.40",
|
|
18
18
|
"react-useportal": "^1.0.16",
|
|
19
19
|
"react-helmet": "^6.1.0",
|
|
20
20
|
"@popperjs/core": "^2.11.4",
|