@trackunit/ui-design-tokens 0.0.67-alpha-47c0e3bbca.0 → 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/index.cjs +172 -31
- package/index.js +163 -32
- package/package.json +1 -1
- package/src/index.d.ts +4 -0
- package/src/tokens/borderRadius.d.ts +14 -0
- package/src/tokens/elevation.d.ts +20 -6
- package/src/tokens/screenSize.d.ts +12 -0
- package/src/tokens/size.d.ts +48 -16
- package/src/tokens/typography.d.ts +45 -6
- package/src/tokens/zIndex.d.ts +8 -0
package/index.cjs
CHANGED
|
@@ -2,6 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* A collection of all the tokens related to border radius in the theme.
|
|
7
|
+
*/
|
|
8
|
+
const themeBorderRadius = {
|
|
9
|
+
none: "0",
|
|
10
|
+
sm: "0.125rem",
|
|
11
|
+
DEFAULT: "0.25rem",
|
|
12
|
+
md: "0.375rem",
|
|
13
|
+
lg: "0.5rem",
|
|
14
|
+
xl: "0.75rem",
|
|
15
|
+
"2xl": "1rem",
|
|
16
|
+
"3xl": "1.5rem",
|
|
17
|
+
full: "9999px",
|
|
18
|
+
};
|
|
19
|
+
|
|
5
20
|
const DEFAULT_CHART_COLORS = [
|
|
6
21
|
"#2580C7",
|
|
7
22
|
"#36A2DA",
|
|
@@ -559,64 +574,180 @@ function color(ColorKey, arg2, arg3) {
|
|
|
559
574
|
const isOutputOption = (something) => typeof something === "string" && outputOptions.includes(something);
|
|
560
575
|
const isValidVariant = (availableVariants, something) => Boolean(availableVariants[something]);
|
|
561
576
|
|
|
577
|
+
/**
|
|
578
|
+
* A collection of all the tokens related to elevation in the theme.
|
|
579
|
+
*/
|
|
580
|
+
const themeBoxShadow = {
|
|
581
|
+
sm: "0 1px 2px 0 rgb(0 0 0 / 0.05)",
|
|
582
|
+
DEFAULT: "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",
|
|
583
|
+
md: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",
|
|
584
|
+
lg: "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",
|
|
585
|
+
xl: "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)",
|
|
586
|
+
"2xl": "0 25px 50px -12px rgb(0 0 0 / 0.25)",
|
|
587
|
+
inner: "inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",
|
|
588
|
+
none: "none",
|
|
589
|
+
active: "0px 0px 1px 1px rgba(26, 27, 28, 0.13), 0px 1px 1px rgba(26, 27, 28, 0.15)",
|
|
590
|
+
};
|
|
562
591
|
/**
|
|
563
592
|
* Elevation is based on N100 with an alpha channel. E(X)A variants
|
|
564
593
|
* are for active versions(e.g. hover).
|
|
565
594
|
*/
|
|
566
595
|
const elevation = {
|
|
567
|
-
E05:
|
|
568
|
-
E10:
|
|
569
|
-
E10A:
|
|
570
|
-
E20:
|
|
571
|
-
E30:
|
|
572
|
-
E40:
|
|
596
|
+
E05: `var(${themeBoxShadow.sm})`,
|
|
597
|
+
E10: `var(${themeBoxShadow.DEFAULT})`,
|
|
598
|
+
E10A: `var(${themeBoxShadow.md})`,
|
|
599
|
+
E20: `var(${themeBoxShadow.lg})`,
|
|
600
|
+
E30: `var(${themeBoxShadow.xl})`,
|
|
601
|
+
E40: `var(${themeBoxShadow["2xl"]})`,
|
|
573
602
|
};
|
|
574
603
|
|
|
604
|
+
/**
|
|
605
|
+
* A collection of all the tokens related to screen size in the theme.
|
|
606
|
+
*/
|
|
607
|
+
const themeScreenSize = {
|
|
608
|
+
xs: "0px",
|
|
609
|
+
sm: "480px",
|
|
610
|
+
md: "768px",
|
|
611
|
+
lg: "1024px",
|
|
612
|
+
xl: "1200px",
|
|
613
|
+
"2xl": "1600px",
|
|
614
|
+
"3xl": "1900px",
|
|
615
|
+
};
|
|
616
|
+
|
|
617
|
+
/**
|
|
618
|
+
* A collection of all the tokens related to sizes in the theme.
|
|
619
|
+
*/
|
|
620
|
+
const themeSpacing = {
|
|
621
|
+
px: "1px",
|
|
622
|
+
"0": "0px",
|
|
623
|
+
"0.5": "0.125rem",
|
|
624
|
+
"1": "0.25rem",
|
|
625
|
+
"1.5": "0.375rem",
|
|
626
|
+
"2": "0.5rem",
|
|
627
|
+
"2.5": "0.625rem",
|
|
628
|
+
"3": "0.75rem",
|
|
629
|
+
"3.5": "0.875rem",
|
|
630
|
+
"4": "1rem",
|
|
631
|
+
"5": "1.25rem",
|
|
632
|
+
"6": "1.5rem",
|
|
633
|
+
"7": "1.75rem",
|
|
634
|
+
"8": "2rem",
|
|
635
|
+
"9": "2.25rem",
|
|
636
|
+
"10": "2.5rem",
|
|
637
|
+
"11": "2.75rem",
|
|
638
|
+
"12": "3rem",
|
|
639
|
+
"14": "3.5rem",
|
|
640
|
+
"16": "4rem",
|
|
641
|
+
"20": "5rem",
|
|
642
|
+
"24": "6rem",
|
|
643
|
+
"28": "7rem",
|
|
644
|
+
"32": "8rem",
|
|
645
|
+
"36": "9rem",
|
|
646
|
+
"40": "10rem",
|
|
647
|
+
"44": "11rem",
|
|
648
|
+
"48": "12rem",
|
|
649
|
+
"52": "13rem",
|
|
650
|
+
"56": "14rem",
|
|
651
|
+
"60": "15rem",
|
|
652
|
+
"64": "16rem",
|
|
653
|
+
"72": "18rem",
|
|
654
|
+
"80": "20rem",
|
|
655
|
+
"96": "24rem",
|
|
656
|
+
};
|
|
575
657
|
const size = {
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
/** --spacing-4: 1rem; */
|
|
585
|
-
medium: "var(--spacing-4)",
|
|
586
|
-
/** --spacing-6: 1.5rem; */
|
|
587
|
-
large: "var(--spacing-6)",
|
|
588
|
-
/** --spacing-8: 2rem; */
|
|
589
|
-
giant: "var(--spacing-8)",
|
|
590
|
-
/** --spacing-10: 2.5rem; */
|
|
591
|
-
enormous: "var(--spacing-10)",
|
|
658
|
+
none: `var(${themeSpacing[0]})`,
|
|
659
|
+
tiny: `var(${themeSpacing[1]})`,
|
|
660
|
+
mini: `var(${themeSpacing[2]})`,
|
|
661
|
+
small: `var(${themeSpacing[3]})`,
|
|
662
|
+
medium: `var(${themeSpacing[4]})`,
|
|
663
|
+
large: `var(${themeSpacing[6]})`,
|
|
664
|
+
giant: `var(${themeSpacing[8]})`,
|
|
665
|
+
enormous: `var(${themeSpacing[10]})`,
|
|
592
666
|
};
|
|
593
667
|
|
|
668
|
+
/**
|
|
669
|
+
* A collection of all the tokens related to typography in the theme.
|
|
670
|
+
*/
|
|
671
|
+
const themeFontSize = {
|
|
672
|
+
xs: "0.75rem",
|
|
673
|
+
sm: "0.875rem",
|
|
674
|
+
base: "1rem",
|
|
675
|
+
lg: "1.125rem",
|
|
676
|
+
xl: "1.25rem",
|
|
677
|
+
"2xl": "1.5rem",
|
|
678
|
+
"3xl": "1.875rem",
|
|
679
|
+
"4xl": "2.25rem",
|
|
680
|
+
"5xl": "3rem",
|
|
681
|
+
"6xl": "3.75rem",
|
|
682
|
+
"7xl": "4.5rem",
|
|
683
|
+
"8xl": "6rem",
|
|
684
|
+
"9xl": "8rem",
|
|
685
|
+
};
|
|
686
|
+
const themeLineHeight = {
|
|
687
|
+
xs: "1rem",
|
|
688
|
+
sm: "1.25rem",
|
|
689
|
+
base: "1.5rem",
|
|
690
|
+
lg: "1.75rem",
|
|
691
|
+
xl: "1.75rem",
|
|
692
|
+
"2xl": "2rem",
|
|
693
|
+
"3xl": "2.25rem",
|
|
694
|
+
"4xl": "2.5rem",
|
|
695
|
+
"5xl": "2.75rem",
|
|
696
|
+
"6xl": "3rem",
|
|
697
|
+
"7xl": "3.25rem",
|
|
698
|
+
"8xl": "3.5rem",
|
|
699
|
+
"9xl": "3.75rem",
|
|
700
|
+
};
|
|
701
|
+
const themeFontWeight = {
|
|
702
|
+
thin: 100,
|
|
703
|
+
extralight: 200,
|
|
704
|
+
light: 300,
|
|
705
|
+
normal: 400,
|
|
706
|
+
medium: 500,
|
|
707
|
+
bold: 600,
|
|
708
|
+
extrabold: 700,
|
|
709
|
+
black: 800,
|
|
710
|
+
};
|
|
594
711
|
/**
|
|
595
712
|
* Based on a root size of 16px.
|
|
596
713
|
*/
|
|
597
714
|
const fontSize = {
|
|
598
|
-
primary:
|
|
599
|
-
secondary:
|
|
600
|
-
tertiary:
|
|
601
|
-
subtitle:
|
|
602
|
-
body:
|
|
603
|
-
small:
|
|
715
|
+
primary: `var(${themeFontSize["3xl"]})`,
|
|
716
|
+
secondary: `var(${themeFontSize.lg})`,
|
|
717
|
+
tertiary: `var(${themeFontSize.base})`,
|
|
718
|
+
subtitle: `var(${themeFontSize.base})`,
|
|
719
|
+
body: `var(${themeFontSize.sm})`,
|
|
720
|
+
small: `var(${themeFontSize.xs})`, // 12px
|
|
604
721
|
};
|
|
605
722
|
/**
|
|
606
723
|
* Primary font weights.
|
|
607
724
|
*/
|
|
608
725
|
const fontWeight = {
|
|
609
|
-
|
|
610
|
-
|
|
726
|
+
thin: themeFontWeight.thin,
|
|
727
|
+
extralight: themeFontWeight.extralight,
|
|
728
|
+
light: themeFontWeight.light,
|
|
729
|
+
normal: themeFontWeight.normal,
|
|
730
|
+
medium: themeFontWeight.medium,
|
|
731
|
+
bold: themeFontWeight.bold,
|
|
732
|
+
extrabold: themeFontWeight.extrabold,
|
|
733
|
+
black: themeFontWeight.black,
|
|
611
734
|
};
|
|
612
735
|
|
|
613
|
-
const
|
|
736
|
+
const themeZIndex = {
|
|
614
737
|
hidden: -1,
|
|
615
738
|
default: 1,
|
|
616
739
|
top: 5,
|
|
617
740
|
overlay: 10,
|
|
618
741
|
popover: 20,
|
|
619
742
|
toast: 100,
|
|
743
|
+
};
|
|
744
|
+
const zIndex = {
|
|
745
|
+
hidden: themeZIndex.hidden,
|
|
746
|
+
default: themeZIndex.default,
|
|
747
|
+
top: themeZIndex.top,
|
|
748
|
+
overlay: themeZIndex.overlay,
|
|
749
|
+
popover: themeZIndex.popover,
|
|
750
|
+
toast: themeZIndex.toast,
|
|
620
751
|
};
|
|
621
752
|
|
|
622
753
|
const tokens = {
|
|
@@ -641,8 +772,18 @@ exports.groupedPalettes = groupedPalettes;
|
|
|
641
772
|
exports.intentPalette = intentPalette;
|
|
642
773
|
exports.rentalStatusPalette = rentalStatusPalette;
|
|
643
774
|
exports.sitesPalette = sitesPalette;
|
|
775
|
+
exports.size = size;
|
|
644
776
|
exports.tailwindPalette = tailwindPalette;
|
|
777
|
+
exports.themeBorderRadius = themeBorderRadius;
|
|
778
|
+
exports.themeBoxShadow = themeBoxShadow;
|
|
645
779
|
exports.themeColors = themeColors;
|
|
780
|
+
exports.themeFontSize = themeFontSize;
|
|
781
|
+
exports.themeFontWeight = themeFontWeight;
|
|
782
|
+
exports.themeLineHeight = themeLineHeight;
|
|
783
|
+
exports.themeScreenSize = themeScreenSize;
|
|
784
|
+
exports.themeSpacing = themeSpacing;
|
|
785
|
+
exports.themeZIndex = themeZIndex;
|
|
646
786
|
exports.tokens = tokens;
|
|
647
787
|
exports.trackunitPalette = trackunitPalette;
|
|
648
788
|
exports.utilizationPalette = utilizationPalette;
|
|
789
|
+
exports.zIndex = zIndex;
|
package/index.js
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A collection of all the tokens related to border radius in the theme.
|
|
3
|
+
*/
|
|
4
|
+
const themeBorderRadius = {
|
|
5
|
+
none: "0",
|
|
6
|
+
sm: "0.125rem",
|
|
7
|
+
DEFAULT: "0.25rem",
|
|
8
|
+
md: "0.375rem",
|
|
9
|
+
lg: "0.5rem",
|
|
10
|
+
xl: "0.75rem",
|
|
11
|
+
"2xl": "1rem",
|
|
12
|
+
"3xl": "1.5rem",
|
|
13
|
+
full: "9999px",
|
|
14
|
+
};
|
|
15
|
+
|
|
1
16
|
const DEFAULT_CHART_COLORS = [
|
|
2
17
|
"#2580C7",
|
|
3
18
|
"#36A2DA",
|
|
@@ -555,64 +570,180 @@ function color(ColorKey, arg2, arg3) {
|
|
|
555
570
|
const isOutputOption = (something) => typeof something === "string" && outputOptions.includes(something);
|
|
556
571
|
const isValidVariant = (availableVariants, something) => Boolean(availableVariants[something]);
|
|
557
572
|
|
|
573
|
+
/**
|
|
574
|
+
* A collection of all the tokens related to elevation in the theme.
|
|
575
|
+
*/
|
|
576
|
+
const themeBoxShadow = {
|
|
577
|
+
sm: "0 1px 2px 0 rgb(0 0 0 / 0.05)",
|
|
578
|
+
DEFAULT: "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",
|
|
579
|
+
md: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",
|
|
580
|
+
lg: "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",
|
|
581
|
+
xl: "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)",
|
|
582
|
+
"2xl": "0 25px 50px -12px rgb(0 0 0 / 0.25)",
|
|
583
|
+
inner: "inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",
|
|
584
|
+
none: "none",
|
|
585
|
+
active: "0px 0px 1px 1px rgba(26, 27, 28, 0.13), 0px 1px 1px rgba(26, 27, 28, 0.15)",
|
|
586
|
+
};
|
|
558
587
|
/**
|
|
559
588
|
* Elevation is based on N100 with an alpha channel. E(X)A variants
|
|
560
589
|
* are for active versions(e.g. hover).
|
|
561
590
|
*/
|
|
562
591
|
const elevation = {
|
|
563
|
-
E05:
|
|
564
|
-
E10:
|
|
565
|
-
E10A:
|
|
566
|
-
E20:
|
|
567
|
-
E30:
|
|
568
|
-
E40:
|
|
592
|
+
E05: `var(${themeBoxShadow.sm})`,
|
|
593
|
+
E10: `var(${themeBoxShadow.DEFAULT})`,
|
|
594
|
+
E10A: `var(${themeBoxShadow.md})`,
|
|
595
|
+
E20: `var(${themeBoxShadow.lg})`,
|
|
596
|
+
E30: `var(${themeBoxShadow.xl})`,
|
|
597
|
+
E40: `var(${themeBoxShadow["2xl"]})`,
|
|
569
598
|
};
|
|
570
599
|
|
|
600
|
+
/**
|
|
601
|
+
* A collection of all the tokens related to screen size in the theme.
|
|
602
|
+
*/
|
|
603
|
+
const themeScreenSize = {
|
|
604
|
+
xs: "0px",
|
|
605
|
+
sm: "480px",
|
|
606
|
+
md: "768px",
|
|
607
|
+
lg: "1024px",
|
|
608
|
+
xl: "1200px",
|
|
609
|
+
"2xl": "1600px",
|
|
610
|
+
"3xl": "1900px",
|
|
611
|
+
};
|
|
612
|
+
|
|
613
|
+
/**
|
|
614
|
+
* A collection of all the tokens related to sizes in the theme.
|
|
615
|
+
*/
|
|
616
|
+
const themeSpacing = {
|
|
617
|
+
px: "1px",
|
|
618
|
+
"0": "0px",
|
|
619
|
+
"0.5": "0.125rem",
|
|
620
|
+
"1": "0.25rem",
|
|
621
|
+
"1.5": "0.375rem",
|
|
622
|
+
"2": "0.5rem",
|
|
623
|
+
"2.5": "0.625rem",
|
|
624
|
+
"3": "0.75rem",
|
|
625
|
+
"3.5": "0.875rem",
|
|
626
|
+
"4": "1rem",
|
|
627
|
+
"5": "1.25rem",
|
|
628
|
+
"6": "1.5rem",
|
|
629
|
+
"7": "1.75rem",
|
|
630
|
+
"8": "2rem",
|
|
631
|
+
"9": "2.25rem",
|
|
632
|
+
"10": "2.5rem",
|
|
633
|
+
"11": "2.75rem",
|
|
634
|
+
"12": "3rem",
|
|
635
|
+
"14": "3.5rem",
|
|
636
|
+
"16": "4rem",
|
|
637
|
+
"20": "5rem",
|
|
638
|
+
"24": "6rem",
|
|
639
|
+
"28": "7rem",
|
|
640
|
+
"32": "8rem",
|
|
641
|
+
"36": "9rem",
|
|
642
|
+
"40": "10rem",
|
|
643
|
+
"44": "11rem",
|
|
644
|
+
"48": "12rem",
|
|
645
|
+
"52": "13rem",
|
|
646
|
+
"56": "14rem",
|
|
647
|
+
"60": "15rem",
|
|
648
|
+
"64": "16rem",
|
|
649
|
+
"72": "18rem",
|
|
650
|
+
"80": "20rem",
|
|
651
|
+
"96": "24rem",
|
|
652
|
+
};
|
|
571
653
|
const size = {
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
/** --spacing-4: 1rem; */
|
|
581
|
-
medium: "var(--spacing-4)",
|
|
582
|
-
/** --spacing-6: 1.5rem; */
|
|
583
|
-
large: "var(--spacing-6)",
|
|
584
|
-
/** --spacing-8: 2rem; */
|
|
585
|
-
giant: "var(--spacing-8)",
|
|
586
|
-
/** --spacing-10: 2.5rem; */
|
|
587
|
-
enormous: "var(--spacing-10)",
|
|
654
|
+
none: `var(${themeSpacing[0]})`,
|
|
655
|
+
tiny: `var(${themeSpacing[1]})`,
|
|
656
|
+
mini: `var(${themeSpacing[2]})`,
|
|
657
|
+
small: `var(${themeSpacing[3]})`,
|
|
658
|
+
medium: `var(${themeSpacing[4]})`,
|
|
659
|
+
large: `var(${themeSpacing[6]})`,
|
|
660
|
+
giant: `var(${themeSpacing[8]})`,
|
|
661
|
+
enormous: `var(${themeSpacing[10]})`,
|
|
588
662
|
};
|
|
589
663
|
|
|
664
|
+
/**
|
|
665
|
+
* A collection of all the tokens related to typography in the theme.
|
|
666
|
+
*/
|
|
667
|
+
const themeFontSize = {
|
|
668
|
+
xs: "0.75rem",
|
|
669
|
+
sm: "0.875rem",
|
|
670
|
+
base: "1rem",
|
|
671
|
+
lg: "1.125rem",
|
|
672
|
+
xl: "1.25rem",
|
|
673
|
+
"2xl": "1.5rem",
|
|
674
|
+
"3xl": "1.875rem",
|
|
675
|
+
"4xl": "2.25rem",
|
|
676
|
+
"5xl": "3rem",
|
|
677
|
+
"6xl": "3.75rem",
|
|
678
|
+
"7xl": "4.5rem",
|
|
679
|
+
"8xl": "6rem",
|
|
680
|
+
"9xl": "8rem",
|
|
681
|
+
};
|
|
682
|
+
const themeLineHeight = {
|
|
683
|
+
xs: "1rem",
|
|
684
|
+
sm: "1.25rem",
|
|
685
|
+
base: "1.5rem",
|
|
686
|
+
lg: "1.75rem",
|
|
687
|
+
xl: "1.75rem",
|
|
688
|
+
"2xl": "2rem",
|
|
689
|
+
"3xl": "2.25rem",
|
|
690
|
+
"4xl": "2.5rem",
|
|
691
|
+
"5xl": "2.75rem",
|
|
692
|
+
"6xl": "3rem",
|
|
693
|
+
"7xl": "3.25rem",
|
|
694
|
+
"8xl": "3.5rem",
|
|
695
|
+
"9xl": "3.75rem",
|
|
696
|
+
};
|
|
697
|
+
const themeFontWeight = {
|
|
698
|
+
thin: 100,
|
|
699
|
+
extralight: 200,
|
|
700
|
+
light: 300,
|
|
701
|
+
normal: 400,
|
|
702
|
+
medium: 500,
|
|
703
|
+
bold: 600,
|
|
704
|
+
extrabold: 700,
|
|
705
|
+
black: 800,
|
|
706
|
+
};
|
|
590
707
|
/**
|
|
591
708
|
* Based on a root size of 16px.
|
|
592
709
|
*/
|
|
593
710
|
const fontSize = {
|
|
594
|
-
primary:
|
|
595
|
-
secondary:
|
|
596
|
-
tertiary:
|
|
597
|
-
subtitle:
|
|
598
|
-
body:
|
|
599
|
-
small:
|
|
711
|
+
primary: `var(${themeFontSize["3xl"]})`,
|
|
712
|
+
secondary: `var(${themeFontSize.lg})`,
|
|
713
|
+
tertiary: `var(${themeFontSize.base})`,
|
|
714
|
+
subtitle: `var(${themeFontSize.base})`,
|
|
715
|
+
body: `var(${themeFontSize.sm})`,
|
|
716
|
+
small: `var(${themeFontSize.xs})`, // 12px
|
|
600
717
|
};
|
|
601
718
|
/**
|
|
602
719
|
* Primary font weights.
|
|
603
720
|
*/
|
|
604
721
|
const fontWeight = {
|
|
605
|
-
|
|
606
|
-
|
|
722
|
+
thin: themeFontWeight.thin,
|
|
723
|
+
extralight: themeFontWeight.extralight,
|
|
724
|
+
light: themeFontWeight.light,
|
|
725
|
+
normal: themeFontWeight.normal,
|
|
726
|
+
medium: themeFontWeight.medium,
|
|
727
|
+
bold: themeFontWeight.bold,
|
|
728
|
+
extrabold: themeFontWeight.extrabold,
|
|
729
|
+
black: themeFontWeight.black,
|
|
607
730
|
};
|
|
608
731
|
|
|
609
|
-
const
|
|
732
|
+
const themeZIndex = {
|
|
610
733
|
hidden: -1,
|
|
611
734
|
default: 1,
|
|
612
735
|
top: 5,
|
|
613
736
|
overlay: 10,
|
|
614
737
|
popover: 20,
|
|
615
738
|
toast: 100,
|
|
739
|
+
};
|
|
740
|
+
const zIndex = {
|
|
741
|
+
hidden: themeZIndex.hidden,
|
|
742
|
+
default: themeZIndex.default,
|
|
743
|
+
top: themeZIndex.top,
|
|
744
|
+
overlay: themeZIndex.overlay,
|
|
745
|
+
popover: themeZIndex.popover,
|
|
746
|
+
toast: themeZIndex.toast,
|
|
616
747
|
};
|
|
617
748
|
|
|
618
749
|
const tokens = {
|
|
@@ -624,4 +755,4 @@ const tokens = {
|
|
|
624
755
|
fontFamily: `'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif`,
|
|
625
756
|
};
|
|
626
757
|
|
|
627
|
-
export { DEFAULT_CHART_COLORS, activityPalette, color, criticalityPalette, elevation, fontSize, fontWeight, generalPalette, getReorderedChartColors, groupedPalettes, intentPalette, rentalStatusPalette, sitesPalette, tailwindPalette, themeColors, tokens, trackunitPalette, utilizationPalette };
|
|
758
|
+
export { DEFAULT_CHART_COLORS, activityPalette, color, criticalityPalette, elevation, fontSize, fontWeight, generalPalette, getReorderedChartColors, groupedPalettes, intentPalette, rentalStatusPalette, sitesPalette, size, tailwindPalette, themeBorderRadius, themeBoxShadow, themeColors, themeFontSize, themeFontWeight, themeLineHeight, themeScreenSize, themeSpacing, themeZIndex, tokens, trackunitPalette, utilizationPalette, zIndex };
|
package/package.json
CHANGED
package/src/index.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
export * from "./tokens/borderRadius";
|
|
1
2
|
export * from "./tokens/chartColorsDefault";
|
|
2
3
|
export * from "./tokens/colors/index";
|
|
3
4
|
export * from "./tokens/elevation";
|
|
5
|
+
export * from "./tokens/screenSize";
|
|
6
|
+
export * from "./tokens/size";
|
|
4
7
|
export * from "./tokens/tokens";
|
|
5
8
|
export * from "./tokens/typography";
|
|
9
|
+
export * from "./tokens/zIndex";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A collection of all the tokens related to border radius in the theme.
|
|
3
|
+
*/
|
|
4
|
+
export declare const themeBorderRadius: {
|
|
5
|
+
readonly none: "0";
|
|
6
|
+
readonly sm: "0.125rem";
|
|
7
|
+
readonly DEFAULT: "0.25rem";
|
|
8
|
+
readonly md: "0.375rem";
|
|
9
|
+
readonly lg: "0.5rem";
|
|
10
|
+
readonly xl: "0.75rem";
|
|
11
|
+
readonly "2xl": "1rem";
|
|
12
|
+
readonly "3xl": "1.5rem";
|
|
13
|
+
readonly full: "9999px";
|
|
14
|
+
};
|
|
@@ -1,13 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A collection of all the tokens related to elevation in the theme.
|
|
3
|
+
*/
|
|
4
|
+
export declare const themeBoxShadow: {
|
|
5
|
+
readonly sm: "0 1px 2px 0 rgb(0 0 0 / 0.05)";
|
|
6
|
+
readonly DEFAULT: "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)";
|
|
7
|
+
readonly md: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)";
|
|
8
|
+
readonly lg: "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)";
|
|
9
|
+
readonly xl: "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)";
|
|
10
|
+
readonly "2xl": "0 25px 50px -12px rgb(0 0 0 / 0.25)";
|
|
11
|
+
readonly inner: "inset 0 2px 4px 0 rgb(0 0 0 / 0.05)";
|
|
12
|
+
readonly none: "none";
|
|
13
|
+
readonly active: "0px 0px 1px 1px rgba(26, 27, 28, 0.13), 0px 1px 1px rgba(26, 27, 28, 0.15)";
|
|
14
|
+
};
|
|
1
15
|
/**
|
|
2
16
|
* Elevation is based on N100 with an alpha channel. E(X)A variants
|
|
3
17
|
* are for active versions(e.g. hover).
|
|
4
18
|
*/
|
|
5
19
|
export declare const elevation: {
|
|
6
|
-
readonly E05: "var(
|
|
7
|
-
readonly E10: "var(
|
|
8
|
-
readonly E10A: "var(
|
|
9
|
-
readonly E20: "var(
|
|
10
|
-
readonly E30: "var(
|
|
11
|
-
readonly E40: "var(
|
|
20
|
+
readonly E05: "var(0 1px 2px 0 rgb(0 0 0 / 0.05))";
|
|
21
|
+
readonly E10: "var(0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1))";
|
|
22
|
+
readonly E10A: "var(0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1))";
|
|
23
|
+
readonly E20: "var(0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1))";
|
|
24
|
+
readonly E30: "var(0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1))";
|
|
25
|
+
readonly E40: "var(0 25px 50px -12px rgb(0 0 0 / 0.25))";
|
|
12
26
|
};
|
|
13
27
|
export type Elevation = typeof elevation;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A collection of all the tokens related to screen size in the theme.
|
|
3
|
+
*/
|
|
4
|
+
export declare const themeScreenSize: {
|
|
5
|
+
readonly xs: "0px";
|
|
6
|
+
readonly sm: "480px";
|
|
7
|
+
readonly md: "768px";
|
|
8
|
+
readonly lg: "1024px";
|
|
9
|
+
readonly xl: "1200px";
|
|
10
|
+
readonly "2xl": "1600px";
|
|
11
|
+
readonly "3xl": "1900px";
|
|
12
|
+
};
|
package/src/tokens/size.d.ts
CHANGED
|
@@ -1,19 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A collection of all the tokens related to sizes in the theme.
|
|
3
|
+
*/
|
|
4
|
+
export declare const themeSpacing: {
|
|
5
|
+
readonly px: "1px";
|
|
6
|
+
readonly "0": "0px";
|
|
7
|
+
readonly "0.5": "0.125rem";
|
|
8
|
+
readonly "1": "0.25rem";
|
|
9
|
+
readonly "1.5": "0.375rem";
|
|
10
|
+
readonly "2": "0.5rem";
|
|
11
|
+
readonly "2.5": "0.625rem";
|
|
12
|
+
readonly "3": "0.75rem";
|
|
13
|
+
readonly "3.5": "0.875rem";
|
|
14
|
+
readonly "4": "1rem";
|
|
15
|
+
readonly "5": "1.25rem";
|
|
16
|
+
readonly "6": "1.5rem";
|
|
17
|
+
readonly "7": "1.75rem";
|
|
18
|
+
readonly "8": "2rem";
|
|
19
|
+
readonly "9": "2.25rem";
|
|
20
|
+
readonly "10": "2.5rem";
|
|
21
|
+
readonly "11": "2.75rem";
|
|
22
|
+
readonly "12": "3rem";
|
|
23
|
+
readonly "14": "3.5rem";
|
|
24
|
+
readonly "16": "4rem";
|
|
25
|
+
readonly "20": "5rem";
|
|
26
|
+
readonly "24": "6rem";
|
|
27
|
+
readonly "28": "7rem";
|
|
28
|
+
readonly "32": "8rem";
|
|
29
|
+
readonly "36": "9rem";
|
|
30
|
+
readonly "40": "10rem";
|
|
31
|
+
readonly "44": "11rem";
|
|
32
|
+
readonly "48": "12rem";
|
|
33
|
+
readonly "52": "13rem";
|
|
34
|
+
readonly "56": "14rem";
|
|
35
|
+
readonly "60": "15rem";
|
|
36
|
+
readonly "64": "16rem";
|
|
37
|
+
readonly "72": "18rem";
|
|
38
|
+
readonly "80": "20rem";
|
|
39
|
+
readonly "96": "24rem";
|
|
40
|
+
};
|
|
1
41
|
export declare const size: {
|
|
2
|
-
|
|
3
|
-
readonly
|
|
4
|
-
|
|
5
|
-
readonly
|
|
6
|
-
|
|
7
|
-
readonly
|
|
8
|
-
|
|
9
|
-
readonly
|
|
10
|
-
/** --spacing-4: 1rem; */
|
|
11
|
-
readonly medium: "var(--spacing-4)";
|
|
12
|
-
/** --spacing-6: 1.5rem; */
|
|
13
|
-
readonly large: "var(--spacing-6)";
|
|
14
|
-
/** --spacing-8: 2rem; */
|
|
15
|
-
readonly giant: "var(--spacing-8)";
|
|
16
|
-
/** --spacing-10: 2.5rem; */
|
|
17
|
-
readonly enormous: "var(--spacing-10)";
|
|
42
|
+
readonly none: "var(0px)";
|
|
43
|
+
readonly tiny: "var(0.25rem)";
|
|
44
|
+
readonly mini: "var(0.5rem)";
|
|
45
|
+
readonly small: "var(0.75rem)";
|
|
46
|
+
readonly medium: "var(1rem)";
|
|
47
|
+
readonly large: "var(1.5rem)";
|
|
48
|
+
readonly giant: "var(2rem)";
|
|
49
|
+
readonly enormous: "var(2.5rem)";
|
|
18
50
|
};
|
|
19
51
|
export type Size = typeof size;
|
|
@@ -1,20 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A collection of all the tokens related to typography in the theme.
|
|
3
|
+
*/
|
|
4
|
+
export declare const themeFontSize: {
|
|
5
|
+
readonly xs: "0.75rem";
|
|
6
|
+
readonly sm: "0.875rem";
|
|
7
|
+
readonly base: "1rem";
|
|
8
|
+
readonly lg: "1.125rem";
|
|
9
|
+
readonly xl: "1.25rem";
|
|
10
|
+
readonly "2xl": "1.5rem";
|
|
11
|
+
readonly "3xl": "1.875rem";
|
|
12
|
+
readonly "4xl": "2.25rem";
|
|
13
|
+
readonly "5xl": "3rem";
|
|
14
|
+
readonly "6xl": "3.75rem";
|
|
15
|
+
readonly "7xl": "4.5rem";
|
|
16
|
+
readonly "8xl": "6rem";
|
|
17
|
+
readonly "9xl": "8rem";
|
|
18
|
+
};
|
|
19
|
+
export type ThemeFontSize = typeof themeFontSize;
|
|
20
|
+
export type fontSizeKeys = keyof typeof themeFontSize;
|
|
21
|
+
export declare const themeLineHeight: {
|
|
22
|
+
[key in fontSizeKeys]: string;
|
|
23
|
+
};
|
|
24
|
+
export declare const themeFontWeight: {
|
|
25
|
+
readonly thin: 100;
|
|
26
|
+
readonly extralight: 200;
|
|
27
|
+
readonly light: 300;
|
|
28
|
+
readonly normal: 400;
|
|
29
|
+
readonly medium: 500;
|
|
30
|
+
readonly bold: 600;
|
|
31
|
+
readonly extrabold: 700;
|
|
32
|
+
readonly black: 800;
|
|
33
|
+
};
|
|
1
34
|
/**
|
|
2
35
|
* Based on a root size of 16px.
|
|
3
36
|
*/
|
|
4
37
|
export declare const fontSize: {
|
|
5
|
-
readonly primary: "var(
|
|
6
|
-
readonly secondary: "var(
|
|
7
|
-
readonly tertiary: "var(
|
|
8
|
-
readonly subtitle: "var(
|
|
9
|
-
readonly body: "var(
|
|
10
|
-
readonly small: "var(
|
|
38
|
+
readonly primary: "var(1.875rem)";
|
|
39
|
+
readonly secondary: "var(1.125rem)";
|
|
40
|
+
readonly tertiary: "var(1rem)";
|
|
41
|
+
readonly subtitle: "var(1rem)";
|
|
42
|
+
readonly body: "var(0.875rem)";
|
|
43
|
+
readonly small: "var(0.75rem)";
|
|
11
44
|
};
|
|
12
45
|
export type FontSize = typeof fontSize;
|
|
13
46
|
/**
|
|
14
47
|
* Primary font weights.
|
|
15
48
|
*/
|
|
16
49
|
export declare const fontWeight: {
|
|
50
|
+
readonly thin: 100;
|
|
51
|
+
readonly extralight: 200;
|
|
52
|
+
readonly light: 300;
|
|
17
53
|
readonly normal: 400;
|
|
54
|
+
readonly medium: 500;
|
|
18
55
|
readonly bold: 600;
|
|
56
|
+
readonly extrabold: 700;
|
|
57
|
+
readonly black: 800;
|
|
19
58
|
};
|
|
20
59
|
export type FontWeight = typeof fontWeight;
|
package/src/tokens/zIndex.d.ts
CHANGED