@trackunit/react-components 1.7.13 → 1.7.15
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/index.cjs.js +11 -5
- package/index.esm.js +12 -6
- package/package.json +7 -7
- package/src/components/Icon/Icon.d.ts +6 -3
- package/src/components/Icon/Icon.variants.d.ts +1 -1
package/index.cjs.js
CHANGED
|
@@ -69,6 +69,7 @@ const cvaIcon = cssClassVarianceUtilities.cvaMerge(["aspect-square", "inline-gri
|
|
|
69
69
|
transfer: "text-transfer-300",
|
|
70
70
|
in_repair: "text-in_repair-400",
|
|
71
71
|
other_rental_status: "text-other_rental_status-500",
|
|
72
|
+
primary_contrasted: "text-primary_contrasted",
|
|
72
73
|
},
|
|
73
74
|
size: {
|
|
74
75
|
small: "w-4",
|
|
@@ -121,6 +122,7 @@ const iconPalette = {
|
|
|
121
122
|
...uiDesignTokens.utilizationPalette,
|
|
122
123
|
...uiDesignTokens.sitesPalette,
|
|
123
124
|
...uiDesignTokens.rentalStatusPalette,
|
|
125
|
+
...uiDesignTokens.contrastedPalette,
|
|
124
126
|
};
|
|
125
127
|
const iconColorNames = sharedUtils.objectKeys(iconPalette).map(key => stringTs.snakeCase(key));
|
|
126
128
|
const isSafari = () => {
|
|
@@ -484,7 +486,7 @@ const cvaButton = cssClassVarianceUtilities.cvaMerge([
|
|
|
484
486
|
variants: {
|
|
485
487
|
variant: {
|
|
486
488
|
primary: [
|
|
487
|
-
"text-
|
|
489
|
+
"text-primary_contrasted",
|
|
488
490
|
"bg-primary-600",
|
|
489
491
|
"hover:bg-primary-700",
|
|
490
492
|
"active:bg-primary-800",
|
|
@@ -561,13 +563,11 @@ const cvaButton = cssClassVarianceUtilities.cvaMerge([
|
|
|
561
563
|
filled: [
|
|
562
564
|
"group",
|
|
563
565
|
"bg-primary-100",
|
|
564
|
-
"text-
|
|
566
|
+
"text-primary_contrasted",
|
|
565
567
|
"hover:bg-primary-200",
|
|
566
568
|
"hover:text-primary-700",
|
|
567
569
|
"active:bg-primary-200",
|
|
568
|
-
"active:text-primary-700",
|
|
569
570
|
"focus:bg-primary-100",
|
|
570
|
-
"focus:text-primary-600",
|
|
571
571
|
"disabled:bg-transparent",
|
|
572
572
|
"disabled:text-secondary-300",
|
|
573
573
|
],
|
|
@@ -614,7 +614,13 @@ const cvaButton = cssClassVarianceUtilities.cvaMerge([
|
|
|
614
614
|
false: "",
|
|
615
615
|
},
|
|
616
616
|
disabled: {
|
|
617
|
-
true: [
|
|
617
|
+
true: [
|
|
618
|
+
"cursor-not-allowed",
|
|
619
|
+
"pointer-events-none",
|
|
620
|
+
"bg-secondary-200",
|
|
621
|
+
"hover:bg-secondary-200",
|
|
622
|
+
"text-secondary-400",
|
|
623
|
+
],
|
|
618
624
|
false: [],
|
|
619
625
|
},
|
|
620
626
|
loading: {
|
package/index.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { useRef, useMemo, useEffect, useState, useCallback, createElement, useReducer, memo, forwardRef, createContext, useContext, isValidElement, cloneElement, Children } from 'react';
|
|
3
3
|
import { objectKeys, uuidv4, objectEntries, objectValues } from '@trackunit/shared-utils';
|
|
4
|
-
import { intentPalette, generalPalette, criticalityPalette, activityPalette, utilizationPalette, sitesPalette, rentalStatusPalette, themeScreenSizeAsNumber, color } from '@trackunit/ui-design-tokens';
|
|
4
|
+
import { intentPalette, generalPalette, criticalityPalette, activityPalette, utilizationPalette, sitesPalette, rentalStatusPalette, contrastedPalette, themeScreenSizeAsNumber, color } from '@trackunit/ui-design-tokens';
|
|
5
5
|
import { iconNames } from '@trackunit/ui-icons';
|
|
6
6
|
import IconSpriteMicro from '@trackunit/ui-icons/icons-sprite-micro.svg';
|
|
7
7
|
import IconSpriteMini from '@trackunit/ui-icons/icons-sprite-mini.svg';
|
|
@@ -67,6 +67,7 @@ const cvaIcon = cvaMerge(["aspect-square", "inline-grid", "relative"], {
|
|
|
67
67
|
transfer: "text-transfer-300",
|
|
68
68
|
in_repair: "text-in_repair-400",
|
|
69
69
|
other_rental_status: "text-other_rental_status-500",
|
|
70
|
+
primary_contrasted: "text-primary_contrasted",
|
|
70
71
|
},
|
|
71
72
|
size: {
|
|
72
73
|
small: "w-4",
|
|
@@ -119,6 +120,7 @@ const iconPalette = {
|
|
|
119
120
|
...utilizationPalette,
|
|
120
121
|
...sitesPalette,
|
|
121
122
|
...rentalStatusPalette,
|
|
123
|
+
...contrastedPalette,
|
|
122
124
|
};
|
|
123
125
|
const iconColorNames = objectKeys(iconPalette).map(key => snakeCase(key));
|
|
124
126
|
const isSafari = () => {
|
|
@@ -482,7 +484,7 @@ const cvaButton = cvaMerge([
|
|
|
482
484
|
variants: {
|
|
483
485
|
variant: {
|
|
484
486
|
primary: [
|
|
485
|
-
"text-
|
|
487
|
+
"text-primary_contrasted",
|
|
486
488
|
"bg-primary-600",
|
|
487
489
|
"hover:bg-primary-700",
|
|
488
490
|
"active:bg-primary-800",
|
|
@@ -559,13 +561,11 @@ const cvaButton = cvaMerge([
|
|
|
559
561
|
filled: [
|
|
560
562
|
"group",
|
|
561
563
|
"bg-primary-100",
|
|
562
|
-
"text-
|
|
564
|
+
"text-primary_contrasted",
|
|
563
565
|
"hover:bg-primary-200",
|
|
564
566
|
"hover:text-primary-700",
|
|
565
567
|
"active:bg-primary-200",
|
|
566
|
-
"active:text-primary-700",
|
|
567
568
|
"focus:bg-primary-100",
|
|
568
|
-
"focus:text-primary-600",
|
|
569
569
|
"disabled:bg-transparent",
|
|
570
570
|
"disabled:text-secondary-300",
|
|
571
571
|
],
|
|
@@ -612,7 +612,13 @@ const cvaButton = cvaMerge([
|
|
|
612
612
|
false: "",
|
|
613
613
|
},
|
|
614
614
|
disabled: {
|
|
615
|
-
true: [
|
|
615
|
+
true: [
|
|
616
|
+
"cursor-not-allowed",
|
|
617
|
+
"pointer-events-none",
|
|
618
|
+
"bg-secondary-200",
|
|
619
|
+
"hover:bg-secondary-200",
|
|
620
|
+
"text-secondary-400",
|
|
621
|
+
],
|
|
616
622
|
false: [],
|
|
617
623
|
},
|
|
618
624
|
loading: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-components",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.15",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
@@ -17,12 +17,12 @@
|
|
|
17
17
|
"@floating-ui/react": "^0.26.25",
|
|
18
18
|
"string-ts": "^2.0.0",
|
|
19
19
|
"tailwind-merge": "^2.0.0",
|
|
20
|
-
"@trackunit/ui-design-tokens": "1.6.
|
|
21
|
-
"@trackunit/css-class-variance-utilities": "1.6.
|
|
22
|
-
"@trackunit/shared-utils": "1.8.
|
|
23
|
-
"@trackunit/ui-icons": "1.6.
|
|
24
|
-
"@trackunit/react-table-pagination": "1.6.
|
|
25
|
-
"@trackunit/react-test-setup": "1.3.
|
|
20
|
+
"@trackunit/ui-design-tokens": "1.6.13",
|
|
21
|
+
"@trackunit/css-class-variance-utilities": "1.6.12",
|
|
22
|
+
"@trackunit/shared-utils": "1.8.12",
|
|
23
|
+
"@trackunit/ui-icons": "1.6.11",
|
|
24
|
+
"@trackunit/react-table-pagination": "1.6.11",
|
|
25
|
+
"@trackunit/react-test-setup": "1.3.12",
|
|
26
26
|
"@tanstack/react-router": "1.114.29"
|
|
27
27
|
},
|
|
28
28
|
"module": "./index.esm.js",
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import { ActivityColors, CriticalityColors, GeneralColors, IntentColors, RentalStatusColors, SitesColors, UtilizationColors } from "@trackunit/ui-design-tokens";
|
|
1
|
+
import { ActivityColors, ContrastedPaletteColors, CriticalityColors, GeneralColors, IntentColors, RentalStatusColors, SitesColors, UtilizationColors } from "@trackunit/ui-design-tokens";
|
|
2
2
|
import { IconName } from "@trackunit/ui-icons";
|
|
3
3
|
import { CSSProperties } from "react";
|
|
4
4
|
import { CommonProps, Size } from "../../common";
|
|
5
5
|
import { AriaProps } from "../../common/AriaProps";
|
|
6
|
-
export type IconColors = IntentColors | GeneralColors | CriticalityColors | ActivityColors | UtilizationColors | SitesColors | RentalStatusColors;
|
|
6
|
+
export type IconColors = IntentColors | GeneralColors | CriticalityColors | ActivityColors | UtilizationColors | SitesColors | RentalStatusColors | ContrastedPaletteColors;
|
|
7
7
|
export declare const iconPalette: {
|
|
8
|
+
PRIMARY_CONTRASTED: {
|
|
9
|
+
DEFAULT: string;
|
|
10
|
+
};
|
|
8
11
|
ON_RENT: {
|
|
9
12
|
readonly 100: "219 234 254";
|
|
10
13
|
readonly 400: "96 165 250";
|
|
@@ -251,7 +254,7 @@ export declare const iconPalette: {
|
|
|
251
254
|
readonly 900: "127 29 29";
|
|
252
255
|
};
|
|
253
256
|
};
|
|
254
|
-
export declare const iconColorNames: ("info" | "success" | "warning" | "danger" | "primary" | "secondary" | "neutral" | "black" | "white" | "good" | "low" | "critical" | "working" | "idle" | "stopped" | "unknown" | "moving" | "active" | "excessive_usage" | "unused" | "utilized" | "heavily_utilized" | "unknown_utilization" | "site_area" | "site_classic_poi" | "site_classic_zone" | "site_depot" | "site_work_place" | "site_construction_site" | "site_unknown" | "on_rent" | "returned" | "available" | "pickup_ready" | "transfer" | "in_repair" | "other_rental_status")[];
|
|
257
|
+
export declare const iconColorNames: ("info" | "success" | "warning" | "danger" | "primary" | "secondary" | "neutral" | "black" | "white" | "good" | "low" | "critical" | "working" | "idle" | "stopped" | "unknown" | "moving" | "active" | "excessive_usage" | "unused" | "utilized" | "heavily_utilized" | "unknown_utilization" | "site_area" | "site_classic_poi" | "site_classic_zone" | "site_depot" | "site_work_place" | "site_construction_site" | "site_unknown" | "on_rent" | "returned" | "available" | "pickup_ready" | "transfer" | "in_repair" | "other_rental_status" | "primary_contrasted")[];
|
|
255
258
|
type IconPropsSmall = {
|
|
256
259
|
size?: "small";
|
|
257
260
|
type?: "solid";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const cvaIcon: (props?: ({
|
|
2
|
-
color?: "default" | "primary" | "secondary" | "neutral" | "info" | "success" | "warning" | "danger" | "good" | "low" | "critical" | "working" | "idle" | "moving" | "active" | "excessive_usage" | "stopped" | "unknown" | "black" | "white" | "unused" | "utilized" | "heavily_utilized" | "unknown_utilization" | "site_area" | "site_classic_poi" | "site_classic_zone" | "site_depot" | "site_work_place" | "site_construction_site" | "site_unknown" | "on_rent" | "returned" | "available" | "pickup_ready" | "transfer" | "in_repair" | "other_rental_status" | null | undefined;
|
|
2
|
+
color?: "default" | "primary" | "secondary" | "neutral" | "info" | "success" | "warning" | "danger" | "good" | "low" | "critical" | "working" | "idle" | "moving" | "active" | "excessive_usage" | "stopped" | "unknown" | "black" | "white" | "unused" | "utilized" | "heavily_utilized" | "unknown_utilization" | "site_area" | "site_classic_poi" | "site_classic_zone" | "site_depot" | "site_work_place" | "site_construction_site" | "site_unknown" | "on_rent" | "returned" | "available" | "pickup_ready" | "transfer" | "in_repair" | "other_rental_status" | "primary_contrasted" | null | undefined;
|
|
3
3
|
size?: "small" | "medium" | "large" | null | undefined;
|
|
4
4
|
fontSize?: boolean | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|