@trackunit/react-components 0.0.66-alpha-5162616e1.0 → 0.0.68
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/index.js +161 -161
- package/package.json +6 -6
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/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,14 +240,14 @@ 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
252
|
|
|
253
253
|
const IconButton = React.forwardRef((_a, ref) => {
|
|
@@ -272,7 +272,7 @@ const IconButton = React.forwardRef((_a, ref) => {
|
|
|
272
272
|
}));
|
|
273
273
|
});
|
|
274
274
|
const StyledButton = tw(Button)`
|
|
275
|
-
${p => p.$circular ? tws`button--rounded` : null}
|
|
275
|
+
${p => p.$circular ? tws`tu-button--rounded` : null}
|
|
276
276
|
`;
|
|
277
277
|
|
|
278
278
|
/**
|
|
@@ -726,39 +726,39 @@ const Alert = ({
|
|
|
726
726
|
}));
|
|
727
727
|
};
|
|
728
728
|
const CloseButtonContainer = tw.div`
|
|
729
|
-
${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`}
|
|
730
730
|
`;
|
|
731
731
|
|
|
732
732
|
const getBackgroundColor = () => ({
|
|
733
733
|
$intent
|
|
734
734
|
}) => {
|
|
735
735
|
const colors = {
|
|
736
|
-
danger: tws`alert--danger`,
|
|
737
|
-
warning: tws`alert--warning`,
|
|
738
|
-
success: tws`alert--success`,
|
|
739
|
-
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`
|
|
740
740
|
};
|
|
741
741
|
return colors[$intent];
|
|
742
742
|
};
|
|
743
743
|
|
|
744
744
|
const Container$7 = tw.div`
|
|
745
|
-
alert
|
|
746
|
-
${p => p.$inline ? tws`alert--inline` : null}
|
|
745
|
+
tu-alert
|
|
746
|
+
${p => p.$inline ? tws`tu-alert--inline` : null}
|
|
747
747
|
${getBackgroundColor()}
|
|
748
748
|
`;
|
|
749
749
|
const Content$2 = tw.div`
|
|
750
|
-
${p => p.$inline ? tws`alert__content--inline` : tws`alert__content`}
|
|
750
|
+
${p => p.$inline ? tws`tu-alert__content--inline` : tws`tu-alert__content`}
|
|
751
751
|
`;
|
|
752
752
|
const Description$1 = tw(Text)`
|
|
753
|
-
${p => p.$hasTitle ? tws`alert__description` : null}
|
|
753
|
+
${p => p.$hasTitle ? tws`tu-alert__description` : null}
|
|
754
754
|
`;
|
|
755
755
|
const RightAligned = tw.div`
|
|
756
|
-
alert__right-aligned
|
|
757
|
-
${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}
|
|
758
758
|
`;
|
|
759
759
|
const IconContainer$1 = tw.div`
|
|
760
|
-
alert__icon-container
|
|
761
|
-
${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}
|
|
762
762
|
`;
|
|
763
763
|
|
|
764
764
|
/**
|
|
@@ -803,7 +803,7 @@ const getSizeModifierClass$1 = () => ({
|
|
|
803
803
|
$variant
|
|
804
804
|
}) => {
|
|
805
805
|
const sizeModifierClass = {
|
|
806
|
-
large: tws`badge--large`,
|
|
806
|
+
large: tws`tu-badge--large`,
|
|
807
807
|
default: ""
|
|
808
808
|
};
|
|
809
809
|
return sizeModifierClass[$size];
|
|
@@ -814,20 +814,20 @@ const getBadgeModifierClass = () => ({
|
|
|
814
814
|
$subtle
|
|
815
815
|
}) => {
|
|
816
816
|
const colorClasses = {
|
|
817
|
-
primary: $subtle ? tws`badge--primary-subtle` : tws`badge--primary`,
|
|
818
|
-
accent: $subtle ? tws`badge--accent-subtle` : tws`badge--accent`,
|
|
819
|
-
success: $subtle ? tws`badge--success-subtle` : tws`badge--success`,
|
|
820
|
-
danger: $subtle ? tws`badge--danger-subtle` : tws`badge--danger`,
|
|
821
|
-
warning: $subtle ? tws`badge--warning-subtle` : tws`badge--warning`,
|
|
822
|
-
info: $subtle ? tws`badge--info-subtle` : tws`badge--info`,
|
|
823
|
-
neutral: $subtle ? tws`badge--neutral-subtle` : tws`badge--neutral`,
|
|
824
|
-
good: $subtle ? tws`badge--good-subtle` : tws`badge--good`,
|
|
825
|
-
low: $subtle ? tws`badge--low-subtle` : tws`badge--low`,
|
|
826
|
-
critical: $subtle ? tws`badge--critical-subtle` : tws`badge--critical`,
|
|
827
|
-
working: $subtle ? tws`badge--working-subtle` : tws`badge--working`,
|
|
828
|
-
idle: $subtle ? tws`badge--idle-subtle` : tws`badge--idle`,
|
|
829
|
-
stopped: $subtle ? tws`badge--stopped-subtle` : tws`badge--stopped`,
|
|
830
|
-
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`
|
|
831
831
|
};
|
|
832
832
|
return colorClasses[$color];
|
|
833
833
|
};
|
|
@@ -836,13 +836,13 @@ const StyledText$3 = tw.text`
|
|
|
836
836
|
${p => {
|
|
837
837
|
switch (p.$variant) {
|
|
838
838
|
case "badge":
|
|
839
|
-
return tws`badge`;
|
|
839
|
+
return tws`tu-badge`;
|
|
840
840
|
|
|
841
841
|
case "pill":
|
|
842
|
-
return tws`badge--pill`;
|
|
842
|
+
return tws`tu-badge--pill`;
|
|
843
843
|
|
|
844
844
|
default:
|
|
845
|
-
return tws`badge`;
|
|
845
|
+
return tws`tu-badge`;
|
|
846
846
|
}
|
|
847
847
|
}}
|
|
848
848
|
${getBadgeModifierClass()}
|
|
@@ -890,7 +890,7 @@ const BaseInput = React.forwardRef((_a, ref) => {
|
|
|
890
890
|
})) : null, jsx("input", Object.assign({
|
|
891
891
|
ref: ref,
|
|
892
892
|
"data-testid": dataTestId,
|
|
893
|
-
className: tws`input__field`
|
|
893
|
+
className: tws`tu-input__field`
|
|
894
894
|
}, rest)), suffix !== null && addonBefore !== suffix ? jsx(InputSuffix, Object.assign({
|
|
895
895
|
"data-testid": `${dataTestId}-suffix`
|
|
896
896
|
}, {
|
|
@@ -903,28 +903,28 @@ const BaseInput = React.forwardRef((_a, ref) => {
|
|
|
903
903
|
}));
|
|
904
904
|
});
|
|
905
905
|
const InputPrefix = tw.div`
|
|
906
|
-
input__prefix
|
|
906
|
+
tu-input__prefix
|
|
907
907
|
`;
|
|
908
908
|
const InputSuffix = tw.div`
|
|
909
|
-
input__suffix
|
|
909
|
+
tu-input__suffix
|
|
910
910
|
`;
|
|
911
911
|
const AddonBefore = tw.div`
|
|
912
|
-
input__addon-before
|
|
912
|
+
tu-input__addon-before
|
|
913
913
|
`;
|
|
914
914
|
const AddonAfter = tw.div`
|
|
915
|
-
input__addon-after
|
|
915
|
+
tu-input__addon-after
|
|
916
916
|
`;
|
|
917
917
|
const InputContainer = tw.div`
|
|
918
|
-
input
|
|
918
|
+
tu-input
|
|
919
919
|
${({
|
|
920
920
|
$invalid
|
|
921
|
-
}) => $invalid ? tws`input--invalid` : null}
|
|
921
|
+
}) => $invalid ? tws`tu-input--invalid` : null}
|
|
922
922
|
${({
|
|
923
923
|
$disabled
|
|
924
|
-
}) => $disabled ? tws`input--disabled` : null}
|
|
924
|
+
}) => $disabled ? tws`tu-input--disabled` : null}
|
|
925
925
|
${({
|
|
926
926
|
$fieldSize
|
|
927
|
-
}) => $fieldSize === "small" ? tws`input--small` : null}
|
|
927
|
+
}) => $fieldSize === "small" ? tws`tu-input--small` : null}
|
|
928
928
|
`;
|
|
929
929
|
|
|
930
930
|
const ROLE_CARD = "region";
|
|
@@ -981,10 +981,10 @@ const getOverflow$1 = () => ({
|
|
|
981
981
|
};
|
|
982
982
|
|
|
983
983
|
const StyledCard$1 = tw.div`
|
|
984
|
-
card
|
|
984
|
+
tu-card
|
|
985
985
|
${p => p.$fullHeight ? `h-full` : null}
|
|
986
986
|
|
|
987
|
-
${p => p.onClick && `card--clickable`}
|
|
987
|
+
${p => p.onClick && `tu-card--clickable`}
|
|
988
988
|
${getOverflow$1()}
|
|
989
989
|
`;
|
|
990
990
|
|
|
@@ -1113,7 +1113,7 @@ const getOverflow = () => ({
|
|
|
1113
1113
|
|
|
1114
1114
|
const StyledDensityContainer = tw(DensityContainer)`
|
|
1115
1115
|
${getOverflow()}
|
|
1116
|
-
card__body
|
|
1116
|
+
tu-card__body
|
|
1117
1117
|
`;
|
|
1118
1118
|
|
|
1119
1119
|
/**
|
|
@@ -1189,10 +1189,10 @@ const getVariantStyles = () => ({
|
|
|
1189
1189
|
$variant
|
|
1190
1190
|
}) => {
|
|
1191
1191
|
const variants = {
|
|
1192
|
-
primary: tws`heading--primary`,
|
|
1193
|
-
secondary: tws`heading--secondary`,
|
|
1194
|
-
tertiary: tws`heading--tertiary`,
|
|
1195
|
-
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`
|
|
1196
1196
|
};
|
|
1197
1197
|
return variants[$variant];
|
|
1198
1198
|
};
|
|
@@ -1201,13 +1201,13 @@ const getFontColor = () => ({
|
|
|
1201
1201
|
$inverted,
|
|
1202
1202
|
$subtle
|
|
1203
1203
|
}) => {
|
|
1204
|
-
const subtle = $inverted ? tws`heading--subtle-inverted` : tws`heading--subtle`;
|
|
1205
|
-
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;
|
|
1206
1206
|
return $subtle ? subtle : inverted;
|
|
1207
1207
|
};
|
|
1208
1208
|
|
|
1209
1209
|
const StyledHeading = tw.div`
|
|
1210
|
-
heading
|
|
1210
|
+
tu-heading
|
|
1211
1211
|
${getFontColor()}
|
|
1212
1212
|
${getVariantStyles()}
|
|
1213
1213
|
`;
|
|
@@ -1373,10 +1373,10 @@ const Chart = ({
|
|
|
1373
1373
|
}));
|
|
1374
1374
|
};
|
|
1375
1375
|
const SpinnerContainer = tw.div`
|
|
1376
|
-
chart-spinner-container
|
|
1376
|
+
tu-chart-spinner-container
|
|
1377
1377
|
`;
|
|
1378
1378
|
const ChartContainer = tw.div`
|
|
1379
|
-
chart-container
|
|
1379
|
+
tu-chart-container
|
|
1380
1380
|
`;
|
|
1381
1381
|
|
|
1382
1382
|
/**
|
|
@@ -1515,13 +1515,13 @@ const Checkbox = React.forwardRef((_a, ref) => {
|
|
|
1515
1515
|
}));
|
|
1516
1516
|
});
|
|
1517
1517
|
const StyledCheckIcon = tw(CheckIcon)`
|
|
1518
|
-
checkbox--icon
|
|
1518
|
+
tu-checkbox--icon
|
|
1519
1519
|
`;
|
|
1520
1520
|
const StyledIndeterminateIcon = tw(IndeterminateIcon)`
|
|
1521
|
-
checkbox--icon
|
|
1521
|
+
tu-checkbox--icon
|
|
1522
1522
|
`;
|
|
1523
1523
|
const CheckboxWrapper = tw.span`
|
|
1524
|
-
checkbox
|
|
1524
|
+
tu-checkbox
|
|
1525
1525
|
transition
|
|
1526
1526
|
${({
|
|
1527
1527
|
$checked,
|
|
@@ -1529,36 +1529,36 @@ const CheckboxWrapper = tw.span`
|
|
|
1529
1529
|
$indeterminate
|
|
1530
1530
|
}) => {
|
|
1531
1531
|
if ($disabled) {
|
|
1532
|
-
return tws`checkbox--disabled`;
|
|
1532
|
+
return tws`tu-checkbox--disabled`;
|
|
1533
1533
|
}
|
|
1534
1534
|
|
|
1535
|
-
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`;
|
|
1536
1536
|
}}
|
|
1537
1537
|
|
|
1538
1538
|
${({
|
|
1539
1539
|
$isInvalid
|
|
1540
1540
|
}) => {
|
|
1541
1541
|
if ($isInvalid) {
|
|
1542
|
-
return tws`checkbox--invalid`;
|
|
1542
|
+
return tws`tu-checkbox--invalid`;
|
|
1543
1543
|
}
|
|
1544
1544
|
|
|
1545
1545
|
return tws``;
|
|
1546
1546
|
}}
|
|
1547
1547
|
`;
|
|
1548
1548
|
const HiddenInput$1 = tw.input`
|
|
1549
|
-
checkbox--input
|
|
1549
|
+
tu-checkbox--input
|
|
1550
1550
|
`;
|
|
1551
1551
|
const CheckboxContainer = tw.label`
|
|
1552
|
-
checkbox--container group
|
|
1552
|
+
tu-checkbox--container group
|
|
1553
1553
|
`;
|
|
1554
1554
|
const Label$4 = tw.label`
|
|
1555
|
-
checkbox__label
|
|
1555
|
+
tu-checkbox__label
|
|
1556
1556
|
${({
|
|
1557
1557
|
$disabled
|
|
1558
|
-
}) => $disabled ? tws`checkbox-item--disabled` : null}
|
|
1558
|
+
}) => $disabled ? tws`tu-checkbox-item--disabled` : null}
|
|
1559
1559
|
${({
|
|
1560
1560
|
$isInvalid
|
|
1561
|
-
}) => $isInvalid ? tws`checkbox--invalid` : null}
|
|
1561
|
+
}) => $isInvalid ? tws`tu-checkbox--invalid` : null}
|
|
1562
1562
|
`;
|
|
1563
1563
|
|
|
1564
1564
|
/**
|
|
@@ -1620,17 +1620,17 @@ const Collapse = ({
|
|
|
1620
1620
|
}));
|
|
1621
1621
|
};
|
|
1622
1622
|
const Rotate = tw(Icon$1)`
|
|
1623
|
-
${p => p.$expanded ? tws`icon--animated-rotate-expanded` : null}
|
|
1624
|
-
icon--animated-rotate
|
|
1623
|
+
${p => p.$expanded ? tws`tu-icon--animated-rotate-expanded` : null}
|
|
1624
|
+
tu-icon--animated-rotate
|
|
1625
1625
|
`;
|
|
1626
1626
|
const StyledCollapse = tw.div`
|
|
1627
|
-
collapse
|
|
1627
|
+
tu-collapse
|
|
1628
1628
|
`;
|
|
1629
1629
|
const CollapseLabel = tw.div`
|
|
1630
|
-
collapse__label
|
|
1630
|
+
tu-collapse__label
|
|
1631
1631
|
`;
|
|
1632
1632
|
const LabelContainer = tw.div`
|
|
1633
|
-
collapse__label__container
|
|
1633
|
+
tu-collapse__label__container
|
|
1634
1634
|
`;
|
|
1635
1635
|
|
|
1636
1636
|
const Collapsible = ({
|
|
@@ -1670,10 +1670,10 @@ const Collapsible = ({
|
|
|
1670
1670
|
};
|
|
1671
1671
|
|
|
1672
1672
|
const AnimatedCollapsible = tw(animated.div)`
|
|
1673
|
-
collapsible--animated
|
|
1673
|
+
tu-collapsible--animated
|
|
1674
1674
|
`;
|
|
1675
1675
|
const StyledCollapsible = tw.div`
|
|
1676
|
-
collapsible
|
|
1676
|
+
tu-collapsible
|
|
1677
1677
|
`;
|
|
1678
1678
|
|
|
1679
1679
|
/**
|
|
@@ -2341,11 +2341,11 @@ const Flex$1 = tw.div`
|
|
|
2341
2341
|
inline-flex
|
|
2342
2342
|
`;
|
|
2343
2343
|
const Container$4 = tw(AnimatedPopover)`
|
|
2344
|
-
tooltip__container
|
|
2344
|
+
tu-tooltip__container
|
|
2345
2345
|
`;
|
|
2346
2346
|
const Content$1 = tw.div`
|
|
2347
|
-
tooltip__content
|
|
2348
|
-
${p => p.$mode === "light" ? tws`tooltip--light` : null}
|
|
2347
|
+
tu-tooltip__content
|
|
2348
|
+
${p => p.$mode === "light" ? tws`tu-tooltip--light` : null}
|
|
2349
2349
|
`;
|
|
2350
2350
|
|
|
2351
2351
|
/**
|
|
@@ -2384,7 +2384,7 @@ const Tip = _a => {
|
|
|
2384
2384
|
}));
|
|
2385
2385
|
};
|
|
2386
2386
|
const TipContainer = tw.span`
|
|
2387
|
-
tip
|
|
2387
|
+
tu-tip
|
|
2388
2388
|
`;
|
|
2389
2389
|
|
|
2390
2390
|
/**
|
|
@@ -2435,7 +2435,7 @@ const FormGroup = ({
|
|
|
2435
2435
|
}));
|
|
2436
2436
|
};
|
|
2437
2437
|
const FormGroupRoot = tw.label`
|
|
2438
|
-
formgroup
|
|
2438
|
+
tu-formgroup
|
|
2439
2439
|
`; // TODO: Update and use Label component instead
|
|
2440
2440
|
|
|
2441
2441
|
const StyledTitle = tw.span`
|
|
@@ -2446,16 +2446,16 @@ const StyledTitle = tw.span`
|
|
|
2446
2446
|
mb-1
|
|
2447
2447
|
`;
|
|
2448
2448
|
const ContainerBefore = tw.div`
|
|
2449
|
-
formGroup-container-before
|
|
2449
|
+
tu-formGroup-container-before
|
|
2450
2450
|
`;
|
|
2451
2451
|
const ContainerAfter = tw.div`
|
|
2452
|
-
formGroup-container-after
|
|
2452
|
+
tu-formGroup-container-after
|
|
2453
2453
|
${({
|
|
2454
2454
|
$isInvalid
|
|
2455
|
-
}) => $isInvalid ? tws`formGroup-container-after--invalid` : null}
|
|
2455
|
+
}) => $isInvalid ? tws`tu-formGroup-container-after--invalid` : null}
|
|
2456
2456
|
`;
|
|
2457
2457
|
const HelpAddon = tw.span`
|
|
2458
|
-
formGroup-helpAddon
|
|
2458
|
+
tu-formGroup-helpAddon
|
|
2459
2459
|
`;
|
|
2460
2460
|
|
|
2461
2461
|
/**
|
|
@@ -2498,52 +2498,52 @@ const Indicator$1 = _a => {
|
|
|
2498
2498
|
}));
|
|
2499
2499
|
};
|
|
2500
2500
|
const Container$3 = tw.div`
|
|
2501
|
-
indicator
|
|
2501
|
+
tu-indicator
|
|
2502
2502
|
${({
|
|
2503
2503
|
$color
|
|
2504
2504
|
}) => {
|
|
2505
2505
|
switch ($color) {
|
|
2506
2506
|
case colors.PRIMARY:
|
|
2507
|
-
return tws`indicator--primary`;
|
|
2507
|
+
return tws`tu-indicator--primary`;
|
|
2508
2508
|
|
|
2509
2509
|
case colors.ACCENT:
|
|
2510
|
-
return tws`indicator--accent`;
|
|
2510
|
+
return tws`tu-indicator--accent`;
|
|
2511
2511
|
|
|
2512
2512
|
case colors.NEUTRAL:
|
|
2513
|
-
return tws`indicator--neutral`;
|
|
2513
|
+
return tws`tu-indicator--neutral`;
|
|
2514
2514
|
|
|
2515
2515
|
case colors.INFO:
|
|
2516
|
-
return tws`indicator--info`;
|
|
2516
|
+
return tws`tu-indicator--info`;
|
|
2517
2517
|
|
|
2518
2518
|
case colors.SUCCESS:
|
|
2519
|
-
return tws`indicator--success`;
|
|
2519
|
+
return tws`tu-indicator--success`;
|
|
2520
2520
|
|
|
2521
2521
|
case colors.WARNING:
|
|
2522
|
-
return tws`indicator--warning`;
|
|
2522
|
+
return tws`tu-indicator--warning`;
|
|
2523
2523
|
|
|
2524
2524
|
case colors.DANGER:
|
|
2525
|
-
return tws`indicator--danger`;
|
|
2525
|
+
return tws`tu-indicator--danger`;
|
|
2526
2526
|
|
|
2527
2527
|
case colors.GOOD:
|
|
2528
|
-
return tws`indicator--good`;
|
|
2528
|
+
return tws`tu-indicator--good`;
|
|
2529
2529
|
|
|
2530
2530
|
case colors.LOW:
|
|
2531
|
-
return tws`indicator--low`;
|
|
2531
|
+
return tws`tu-indicator--low`;
|
|
2532
2532
|
|
|
2533
2533
|
case colors.CRITICAL:
|
|
2534
|
-
return tws`indicator--critical`;
|
|
2534
|
+
return tws`tu-indicator--critical`;
|
|
2535
2535
|
|
|
2536
2536
|
case colors.WORKING:
|
|
2537
|
-
return tws`indicator--working`;
|
|
2537
|
+
return tws`tu-indicator--working`;
|
|
2538
2538
|
|
|
2539
2539
|
case colors.IDLE:
|
|
2540
|
-
return tws`indicator--idle`;
|
|
2540
|
+
return tws`tu-indicator--idle`;
|
|
2541
2541
|
|
|
2542
2542
|
case colors.STOPPED:
|
|
2543
|
-
return tws`indicator--stopped`;
|
|
2543
|
+
return tws`tu-indicator--stopped`;
|
|
2544
2544
|
|
|
2545
2545
|
case colors.UNKNOWN:
|
|
2546
|
-
return tws`indicator--unknown`;
|
|
2546
|
+
return tws`tu-indicator--unknown`;
|
|
2547
2547
|
|
|
2548
2548
|
default:
|
|
2549
2549
|
return "";
|
|
@@ -2551,16 +2551,16 @@ const Container$3 = tw.div`
|
|
|
2551
2551
|
}}
|
|
2552
2552
|
`;
|
|
2553
2553
|
const IconBackground = tw.div`
|
|
2554
|
-
indicator__icon-background
|
|
2554
|
+
tu-indicator__icon-background
|
|
2555
2555
|
|
|
2556
2556
|
${({
|
|
2557
2557
|
$withBackground
|
|
2558
2558
|
}) => {
|
|
2559
|
-
return $withBackground ? "" : "indicator__icon-background--none";
|
|
2559
|
+
return $withBackground ? "" : "tu-indicator__icon-background--none";
|
|
2560
2560
|
}}
|
|
2561
2561
|
`;
|
|
2562
2562
|
const Label$3 = tw.div`
|
|
2563
|
-
indicator__label
|
|
2563
|
+
tu-indicator__label
|
|
2564
2564
|
`;
|
|
2565
2565
|
|
|
2566
2566
|
/**
|
|
@@ -2602,7 +2602,7 @@ const Label$2 = ({
|
|
|
2602
2602
|
});
|
|
2603
2603
|
};
|
|
2604
2604
|
const Description = tw(Text)`
|
|
2605
|
-
label
|
|
2605
|
+
tu-label
|
|
2606
2606
|
`;
|
|
2607
2607
|
|
|
2608
2608
|
/**
|
|
@@ -2725,16 +2725,16 @@ const MenuItem = ({
|
|
|
2725
2725
|
}));
|
|
2726
2726
|
};
|
|
2727
2727
|
const Container$2 = tw.div`
|
|
2728
|
-
group menuItem
|
|
2728
|
+
group tu-menuItem
|
|
2729
2729
|
`;
|
|
2730
2730
|
const Content = tw.div`
|
|
2731
|
-
menuItem__content
|
|
2731
|
+
tu-menuItem__content
|
|
2732
2732
|
`;
|
|
2733
2733
|
const Icon = tw.div`
|
|
2734
|
-
menuItem__icon
|
|
2734
|
+
tu-menuItem__icon
|
|
2735
2735
|
`;
|
|
2736
2736
|
const Label = tw.div`
|
|
2737
|
-
menuItem__label
|
|
2737
|
+
tu-menuItem__label
|
|
2738
2738
|
`;
|
|
2739
2739
|
|
|
2740
2740
|
/**
|
|
@@ -2772,13 +2772,13 @@ const MenuList = _a => {
|
|
|
2772
2772
|
});
|
|
2773
2773
|
};
|
|
2774
2774
|
const Wrapper = tw.div`
|
|
2775
|
-
menuList__wrapper
|
|
2775
|
+
tu-menuList__wrapper
|
|
2776
2776
|
`;
|
|
2777
2777
|
const Container$1 = tw.div`
|
|
2778
|
-
menuList
|
|
2778
|
+
tu-menuList
|
|
2779
2779
|
`;
|
|
2780
2780
|
const Divider = tw.div`
|
|
2781
|
-
menuList__divider
|
|
2781
|
+
tu-menuList__divider
|
|
2782
2782
|
`;
|
|
2783
2783
|
|
|
2784
2784
|
/**
|
|
@@ -2830,7 +2830,7 @@ const ModalBackdrop = ({
|
|
|
2830
2830
|
});
|
|
2831
2831
|
};
|
|
2832
2832
|
const Backdrop = tw(animated.div)`
|
|
2833
|
-
modal--backdrop
|
|
2833
|
+
tu-modal--backdrop
|
|
2834
2834
|
`;
|
|
2835
2835
|
|
|
2836
2836
|
/** Preferred usage is with useModal(), so the modal is placed at highest level. */
|
|
@@ -2888,21 +2888,21 @@ const getCardMaxWidth = () => ({
|
|
|
2888
2888
|
}) => {
|
|
2889
2889
|
maxWidth = maxWidth ? maxWidth : "full";
|
|
2890
2890
|
const widths = {
|
|
2891
|
-
slim: tws`modal-card--slim`,
|
|
2892
|
-
narrow: tws`modal-card--narrow`,
|
|
2893
|
-
wide: tws`modal-card--wide`,
|
|
2894
|
-
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`,
|
|
2895
2895
|
full: ""
|
|
2896
2896
|
};
|
|
2897
2897
|
return widths[maxWidth];
|
|
2898
2898
|
};
|
|
2899
2899
|
|
|
2900
2900
|
const StyledCard = tw(Card)`
|
|
2901
|
-
modal__card
|
|
2901
|
+
tu-modal__card
|
|
2902
2902
|
${getCardMaxWidth()}
|
|
2903
2903
|
`;
|
|
2904
2904
|
const StyledDiv = tw.div`
|
|
2905
|
-
modal__container
|
|
2905
|
+
tu-modal__container
|
|
2906
2906
|
`;
|
|
2907
2907
|
const AnimatedDiv = animated(StyledDiv);
|
|
2908
2908
|
|
|
@@ -3004,7 +3004,7 @@ const FilterListMapLayout = ({
|
|
|
3004
3004
|
children: children
|
|
3005
3005
|
});
|
|
3006
3006
|
const Layout$4 = tw.span`
|
|
3007
|
-
layout-FilterListMap
|
|
3007
|
+
tu-layout-FilterListMap
|
|
3008
3008
|
`;
|
|
3009
3009
|
|
|
3010
3010
|
/**
|
|
@@ -3031,17 +3031,17 @@ const FullWidthRepeatingLayout = ({
|
|
|
3031
3031
|
children: children
|
|
3032
3032
|
}));
|
|
3033
3033
|
const Layout$3 = tw.span`
|
|
3034
|
-
layout-FullWidthRepeatingLayout
|
|
3034
|
+
tu-layout-FullWidthRepeatingLayout
|
|
3035
3035
|
|
|
3036
3036
|
${({
|
|
3037
3037
|
$rowSizing
|
|
3038
3038
|
}) => {
|
|
3039
3039
|
switch ($rowSizing) {
|
|
3040
3040
|
case "MinContent":
|
|
3041
|
-
return tws` layout-FullWidthRepeatingLayout--MinContent`;
|
|
3041
|
+
return tws` tu-layout-FullWidthRepeatingLayout--MinContent`;
|
|
3042
3042
|
|
|
3043
3043
|
case "Equal":
|
|
3044
|
-
return tws` layout-FullWidthRepeatingLayout--Equal`;
|
|
3044
|
+
return tws` tu-layout-FullWidthRepeatingLayout--Equal`;
|
|
3045
3045
|
|
|
3046
3046
|
case "Unmanaged":
|
|
3047
3047
|
default:
|
|
@@ -3097,17 +3097,17 @@ const IntrinsicallyResponsiveGrid = ({
|
|
|
3097
3097
|
children: children
|
|
3098
3098
|
}));
|
|
3099
3099
|
const Layout$2 = tw.span`
|
|
3100
|
-
layout-IntrinsicallyResponsiveGrid
|
|
3100
|
+
tu-layout-IntrinsicallyResponsiveGrid
|
|
3101
3101
|
${({
|
|
3102
3102
|
$occupation
|
|
3103
3103
|
}) => {
|
|
3104
3104
|
switch ($occupation) {
|
|
3105
3105
|
case "auto-fit":
|
|
3106
|
-
return tws`layout-IntrinsicallyResponsiveGrid--fit`;
|
|
3106
|
+
return tws`tu-layout-IntrinsicallyResponsiveGrid--fit`;
|
|
3107
3107
|
|
|
3108
3108
|
case "auto-fill":
|
|
3109
3109
|
default:
|
|
3110
|
-
return tws`layout-IntrinsicallyResponsiveGrid--fill`;
|
|
3110
|
+
return tws`tu-layout-IntrinsicallyResponsiveGrid--fill`;
|
|
3111
3111
|
}
|
|
3112
3112
|
}}
|
|
3113
3113
|
|
|
@@ -3116,17 +3116,17 @@ const Layout$2 = tw.span`
|
|
|
3116
3116
|
}) => {
|
|
3117
3117
|
switch ($minColumnWidth) {
|
|
3118
3118
|
case "slim":
|
|
3119
|
-
return tws`layout-IntrinsicallyResponsiveGrid--slim`;
|
|
3119
|
+
return tws`tu-layout-IntrinsicallyResponsiveGrid--slim`;
|
|
3120
3120
|
|
|
3121
3121
|
case "narrow":
|
|
3122
|
-
return tws`layout-IntrinsicallyResponsiveGrid--narrow`;
|
|
3122
|
+
return tws`tu-layout-IntrinsicallyResponsiveGrid--narrow`;
|
|
3123
3123
|
|
|
3124
3124
|
case "wide":
|
|
3125
|
-
return tws`layout-IntrinsicallyResponsiveGrid--wide`;
|
|
3125
|
+
return tws`tu-layout-IntrinsicallyResponsiveGrid--wide`;
|
|
3126
3126
|
|
|
3127
3127
|
case "normal":
|
|
3128
3128
|
default:
|
|
3129
|
-
return tws`layout-IntrinsicallyResponsiveGrid--normal`;
|
|
3129
|
+
return tws`tu-layout-IntrinsicallyResponsiveGrid--normal`;
|
|
3130
3130
|
}
|
|
3131
3131
|
}}
|
|
3132
3132
|
|
|
@@ -3181,7 +3181,7 @@ const TitleNavContentLayout = ({
|
|
|
3181
3181
|
children: children
|
|
3182
3182
|
});
|
|
3183
3183
|
const Layout$1 = tw.div`
|
|
3184
|
-
layout-TitleNavContentLayout
|
|
3184
|
+
tu-layout-TitleNavContentLayout
|
|
3185
3185
|
`;
|
|
3186
3186
|
|
|
3187
3187
|
/**
|
|
@@ -3197,7 +3197,7 @@ const TwoColumnLayout = ({
|
|
|
3197
3197
|
children: children
|
|
3198
3198
|
});
|
|
3199
3199
|
const Layout = tw.div`
|
|
3200
|
-
layout-TwoColumnLayout
|
|
3200
|
+
tu-layout-TwoColumnLayout
|
|
3201
3201
|
`;
|
|
3202
3202
|
|
|
3203
3203
|
/**
|
|
@@ -3225,15 +3225,15 @@ const MultiRowTableCell = ({
|
|
|
3225
3225
|
}));
|
|
3226
3226
|
};
|
|
3227
3227
|
const Root$1 = tw(GridArea)`
|
|
3228
|
-
multi-row-table-cell-container
|
|
3228
|
+
tu-multi-row-table-cell-container
|
|
3229
3229
|
`;
|
|
3230
3230
|
const Header = tw.div`
|
|
3231
|
-
multi-row-table-cell
|
|
3232
|
-
multi-row-table-cell__header
|
|
3231
|
+
tu-multi-row-table-cell
|
|
3232
|
+
tu-multi-row-table-cell__header
|
|
3233
3233
|
`;
|
|
3234
3234
|
const Secondary = tw.div`
|
|
3235
|
-
multi-row-table-cell
|
|
3236
|
-
multi-row-table-cell__secondary
|
|
3235
|
+
tu-multi-row-table-cell
|
|
3236
|
+
tu-multi-row-table-cell__secondary
|
|
3237
3237
|
`;
|
|
3238
3238
|
|
|
3239
3239
|
/**
|
|
@@ -3329,7 +3329,7 @@ const Spacer = ({
|
|
|
3329
3329
|
});
|
|
3330
3330
|
};
|
|
3331
3331
|
const Space = tw.div`
|
|
3332
|
-
${p => `${p.border ? `spacer--border` : null}`}
|
|
3332
|
+
${p => `${p.border ? `tu-spacer--border` : null}`}
|
|
3333
3333
|
${GetSpacerHeight()}
|
|
3334
3334
|
`;
|
|
3335
3335
|
|
|
@@ -3576,11 +3576,11 @@ const SelectContainer = ({
|
|
|
3576
3576
|
}));
|
|
3577
3577
|
};
|
|
3578
3578
|
const Container = tw.label`
|
|
3579
|
-
select__container
|
|
3579
|
+
tu-select__container
|
|
3580
3580
|
`;
|
|
3581
3581
|
const InformativeText$1 = tw(Text)`
|
|
3582
|
-
informative-text
|
|
3583
|
-
${p => p.$hasError ? `informative-text--error` : null}
|
|
3582
|
+
tu-informative-text
|
|
3583
|
+
${p => p.$hasError ? `tu-informative-text--error` : null}
|
|
3584
3584
|
`;
|
|
3585
3585
|
|
|
3586
3586
|
const getSelectHeight = size => {
|
|
@@ -3850,7 +3850,7 @@ const SkeletonLines = memo(({
|
|
|
3850
3850
|
});
|
|
3851
3851
|
});
|
|
3852
3852
|
const SkeletonLine = tw.div`
|
|
3853
|
-
skeleton-line
|
|
3853
|
+
tu-skeleton-line
|
|
3854
3854
|
`;
|
|
3855
3855
|
|
|
3856
3856
|
/**
|
|
@@ -4017,10 +4017,10 @@ const StyledTextArea = tw.textarea`
|
|
|
4017
4017
|
|
|
4018
4018
|
${({
|
|
4019
4019
|
$hasError
|
|
4020
|
-
}) => $hasError ? tws`input--invalid` : null}
|
|
4020
|
+
}) => $hasError ? tws`tu-input--invalid` : null}
|
|
4021
4021
|
${({
|
|
4022
4022
|
disabled
|
|
4023
|
-
}) => disabled ? tws`input--disabled` : null}
|
|
4023
|
+
}) => disabled ? tws`tu-input--disabled` : null}
|
|
4024
4024
|
${({
|
|
4025
4025
|
$resize
|
|
4026
4026
|
}) => {
|
|
@@ -4211,7 +4211,7 @@ const SwitchContainer = tw.label`
|
|
|
4211
4211
|
active:shadow
|
|
4212
4212
|
`;
|
|
4213
4213
|
const HiddenInput = tw.input`
|
|
4214
|
-
absolute
|
|
4214
|
+
absolute
|
|
4215
4215
|
opacity-0
|
|
4216
4216
|
-z-10
|
|
4217
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.68",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
|
-
"license": "
|
|
5
|
+
"license": "MIT",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@trackunit/css-core": "0.0.43
|
|
8
|
-
"@trackunit/tailwind-styled-components": "0.0.39
|
|
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.38
|
|
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.40
|
|
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",
|