@abhir9/pd-design-system 0.1.26 → 0.1.28

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/dist/index.cjs CHANGED
@@ -144,7 +144,7 @@ function getAvailableIconNames() {
144
144
  );
145
145
  }
146
146
  var buttonVariants = classVarianceAuthority.cva(
147
- "pd-inline-flex pd-items-center pd-justify-center pd-font-medium pd-transition-colors pd-focus-visible:outline-none pd-focus-visible:ring-2 pd-focus-visible:ring-[var(--pd-border-blue)] pd-focus-visible:ring-offset-2 pd-disabled:pointer-events-none pd-disabled:cursor-not-allowed pd-disabled:hover:pd-bg-[inherit] pd-disabled:hover:pd-text-[inherit] pd-disabled:hover:pd-border-[inherit] pd-disabled:active:pd-bg-[inherit] pd-disabled:active:pd-text-[inherit] pd-disabled:active:pd-border-[inherit] [font-family:var(--pd-font-sans,Gist,sans-serif)] [gap:var(--pd-button-gap)] [border-radius:var(--pd-radius-button)] pd-shadow-none",
147
+ "pd-inline-flex pd-items-center pd-justify-center pd-font-medium pd-transition-colors pd-focus-visible:outline-none pd-focus-visible:ring-2 pd-focus-visible:ring-[var(--pd-border-blue)] pd-focus-visible:ring-offset-2 pd-disabled:pointer-events-none pd-disabled:cursor-not-allowed pd-disabled:hover:pd-bg-[inherit] pd-disabled:hover:pd-text-[inherit] pd-disabled:hover:pd-border-[inherit] pd-disabled:active:pd-bg-[inherit] pd-disabled:active:pd-text-[inherit] pd-disabled:active:pd-border-[inherit] [font-family:var(--pd-font-sans,Geist,sans-serif)] [gap:var(--pd-button-gap)] [border-radius:var(--pd-radius-button)] pd-shadow-none",
148
148
  {
149
149
  variants: {
150
150
  variant: {
@@ -162,7 +162,7 @@ var buttonVariants = classVarianceAuthority.cva(
162
162
  },
163
163
  size: {
164
164
  sm: "[padding-top:var(--pd-button-padding-sm-vertical)] [padding-bottom:var(--pd-button-padding-sm-vertical)] [padding-left:var(--pd-button-padding-sm-horizontal)] [padding-right:var(--pd-button-padding-sm-horizontal)] pd-text-xs [line-height:var(--pd-button-line-height-sm)] [letter-spacing:var(--pd-button-letter-spacing)]",
165
- md: "[padding-top:var(--pd-button-padding-md-vertical)] [padding-bottom:var(--pd-button-padding-md-vertical)] [padding-left:var(--pd-button-padding-md-horizontal)] [padding-right:var(--pd-button-padding-md-horizontal)] pd-text-sm [line-height:var(--pd-button-line-height-md)] [letter-spacing:var(--pd-button-letter-spacing)]",
165
+ md: "[padding-top:var(--pd-button-padding-md-vertical)] [padding-bottom:var(--pd-button-padding-md-vertical)] [padding-left:var(--pd-button-padding-md-horizontal)] [padding-right:var(--pd-button-padding-md-horizontal)] pd-text-xs [line-height:var(--pd-button-line-height-md)] [letter-spacing:var(--pd-button-letter-spacing)]",
166
166
  lg: "[padding-top:var(--pd-button-padding-lg-vertical)] [padding-bottom:var(--pd-button-padding-lg-vertical)] [padding-left:var(--pd-button-padding-lg-horizontal)] [padding-right:var(--pd-button-padding-lg-horizontal)] pd-text-base [line-height:var(--pd-button-line-height-lg)] [letter-spacing:var(--pd-button-letter-spacing)]"
167
167
  }
168
168
  },
@@ -584,7 +584,7 @@ var ButtonGroupComponent = React.forwardRef(
584
584
  ButtonGroupComponent.displayName = "ButtonGroup";
585
585
  var ButtonGroup = React.memo(ButtonGroupComponent);
586
586
 
587
- // src/tokens/base.ts
587
+ // src/tokens/tokens.ts
588
588
  var neutral = {
589
589
  100: "#FFFFFF",
590
590
  200: "#EDEDED",
@@ -666,69 +666,10 @@ var colorPrimitives = {
666
666
  green,
667
667
  yellow
668
668
  };
669
- var colors = {
670
- // Neutral palette (mapped from new scale)
671
- white: neutral[100],
672
- black: neutral[950],
673
- gray50: neutral[200],
674
- gray100: neutral[300],
675
- gray200: neutral[400],
676
- gray300: neutral[500],
677
- gray400: neutral[500],
678
- gray500: neutral[500],
679
- gray600: neutral[600],
680
- gray700: neutral[700],
681
- gray800: neutral[800],
682
- gray900: neutral[900],
683
- // Primary palette (mapped from blue)
684
- blue50: blue[100],
685
- blue100: blue[100],
686
- blue200: blue[200],
687
- blue300: blue[300],
688
- blue400: blue[400],
689
- blue500: blue[500],
690
- blue600: blue[600],
691
- blue700: blue[700],
692
- blue800: blue[800],
693
- blue900: blue[900],
694
- // Success palette (mapped from green)
695
- green50: green[100],
696
- green100: green[100],
697
- green200: green[200],
698
- green300: green[300],
699
- green400: green[400],
700
- green500: green[500],
701
- green600: green[600],
702
- green700: green[700],
703
- green800: green[800],
704
- green900: green[900],
705
- // Warning palette (mapped from yellow)
706
- yellow50: yellow[100],
707
- yellow100: yellow[100],
708
- yellow200: yellow[200],
709
- yellow300: yellow[300],
710
- yellow400: yellow[400],
711
- yellow500: yellow[500],
712
- yellow600: yellow[600],
713
- yellow700: yellow[700],
714
- yellow800: yellow[800],
715
- yellow900: yellow[900],
716
- // Danger palette (mapped from red)
717
- red50: red[100],
718
- red100: red[100],
719
- red200: red[200],
720
- red300: red[300],
721
- red400: red[400],
722
- red500: red[500],
723
- red600: red[600],
724
- red700: red[700],
725
- red800: red[800],
726
- red900: red[900]
727
- };
728
669
  var typography = {
729
670
  fontFamily: {
730
- sans: ["Gist", "-apple-system", "BlinkMacSystemFont", "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "sans-serif"],
731
- mono: ["Gist Mono", "Menlo", "Monaco", "Consolas", "Liberation Mono", "Courier New", "monospace"]
671
+ sans: ["Geist", "-apple-system", "BlinkMacSystemFont", "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "sans-serif"],
672
+ mono: ["Geist Mono", "Menlo", "Monaco", "Consolas", "Liberation Mono", "Courier New", "monospace"]
732
673
  },
733
674
  fontSize: {
734
675
  xs: "0.75em",
@@ -747,8 +688,16 @@ var typography = {
747
688
  // 30px
748
689
  "4xl": "2.25em",
749
690
  // 36px
750
- "5xl": "3em"
691
+ "5xl": "3em",
751
692
  // 48px
693
+ "6xl": "3.75em",
694
+ // 60px
695
+ "7xl": "4.5em",
696
+ // 72px
697
+ "8xl": "6em",
698
+ // 96px
699
+ "9xl": "8em"
700
+ // 128px
752
701
  },
753
702
  fontWeight: {
754
703
  normal: "400",
@@ -761,18 +710,40 @@ var typography = {
761
710
  normal: "1.5",
762
711
  relaxed: "1.75"
763
712
  },
713
+ // Tailwind fontSize lineHeight mappings (for use in tailwind.config.js)
714
+ fontSizeLineHeight: {
715
+ xs: "1em",
716
+ // 16px for 12px font
717
+ sm: "1.25em",
718
+ // 20px for 14px font
719
+ base: "1.5em",
720
+ // 24px for 16px font
721
+ lg: "1.75em",
722
+ // 28px for 18px font
723
+ xl: "1.75em",
724
+ // 28px for 20px font
725
+ "2xl": "2em",
726
+ "3xl": "2.25em",
727
+ "4xl": "2.5em",
728
+ "5xl": "1",
729
+ "6xl": "1",
730
+ "7xl": "1",
731
+ "8xl": "1",
732
+ "9xl": "1"
733
+ },
764
734
  letterSpacing: {
765
735
  tight: "-0.025em",
766
736
  normal: "0",
767
737
  wide: "0.025em",
768
738
  wider: "0.05em",
769
739
  widest: "0.1em",
770
- button: "0.00625em"
771
- // 0.1px
740
+ button: "0.00833em"
741
+ // 0.1px for 12px font
772
742
  }
773
743
  };
774
744
  var spacing = {
775
- 0: "0",
745
+ 0: "0em",
746
+ // 0px
776
747
  1: "0.25em",
777
748
  // 4px
778
749
  2: "0.5em",
@@ -785,18 +756,14 @@ var spacing = {
785
756
  // 20px
786
757
  6: "1.5em",
787
758
  // 24px
759
+ 7: "1.75em",
760
+ // 28px
788
761
  8: "2em",
789
762
  // 32px
790
- 10: "2.5em",
763
+ 9: "2.25em",
764
+ // 36px
765
+ 10: "2.5em"
791
766
  // 40px
792
- 12: "3em",
793
- // 48px
794
- 16: "4em",
795
- // 64px
796
- 20: "5em",
797
- // 80px
798
- 24: "6em"
799
- // 96px
800
767
  };
801
768
  var radius = {
802
769
  none: "0",
@@ -816,7 +783,27 @@ var radius = {
816
783
  // 24px
817
784
  full: "9999px",
818
785
  button: "0.5em"
819
- // 8px - button border radius
786
+ // 8px - button border radius
787
+ };
788
+ var shadows = {
789
+ sm: "0 1px 2px 0 rgb(0 0 0 / 0.05)",
790
+ base: "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",
791
+ md: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",
792
+ lg: "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",
793
+ xl: "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)",
794
+ "2xl": "0 25px 50px -12px rgb(0 0 0 / 0.25)",
795
+ inner: "inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",
796
+ none: "none"
797
+ };
798
+ var zIndex = {
799
+ base: 0,
800
+ dropdown: 1e3,
801
+ sticky: 1020,
802
+ fixed: 1030,
803
+ modalBackdrop: 1040,
804
+ modal: 1050,
805
+ popover: 1060,
806
+ tooltip: 1070
820
807
  };
821
808
  var button = {
822
809
  padding: {
@@ -828,9 +815,9 @@ var button = {
828
815
  },
829
816
  md: {
830
817
  vertical: "0.625em",
831
- // 10px
818
+ // 10px
832
819
  horizontal: "1em"
833
- // 16px
820
+ // 16px
834
821
  },
835
822
  lg: {
836
823
  vertical: "0.75em",
@@ -840,186 +827,157 @@ var button = {
840
827
  }
841
828
  },
842
829
  gap: "0.5em",
843
- // 8px - gap between icon and text
830
+ // 8px - gap between icon and text
844
831
  lineHeight: {
845
832
  sm: "1.333em",
846
- // 16px for 12px font (133.333%)
847
- md: "1.1875em",
848
- // 19px for 14px font (135.7%)
849
- lg: "1.3125em"
850
- // 21px for 16px font (131.25%)
833
+ md: "1.333em",
834
+ // 16px for 12px font-size (1.333 × 12px = 16px)
835
+ lg: "1.333em"
851
836
  },
852
- letterSpacing: "0.00625em"
853
- // 0.1px
854
- };
855
- var shadows = {
856
- sm: "0 1px 2px 0 rgb(0 0 0 / 0.05)",
857
- base: "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",
858
- md: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",
859
- lg: "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",
860
- xl: "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)",
861
- "2xl": "0 25px 50px -12px rgb(0 0 0 / 0.25)",
862
- inner: "inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",
863
- none: "none"
837
+ letterSpacing: "0.00833em"
838
+ // 0.1px for 12px font
864
839
  };
865
- var zIndex = {
866
- base: 0,
867
- dropdown: 1e3,
868
- sticky: 1020,
869
- fixed: 1030,
870
- modalBackdrop: 1040,
871
- modal: 1050,
872
- popover: 1060,
873
- tooltip: 1070
874
- };
875
- var COLOR_SCALES = [100, 200, 300, 400, 500, 600, 700, 800, 900, 950, 1e3];
876
-
877
- // src/tokens/semantic.ts
878
- var borderTokens = {
879
- dark: {
880
- primary: neutral[700],
881
- secondary: neutral[800],
882
- subtle: neutral[800],
883
- invert: neutral[100],
884
- onColor: neutral[950],
885
- blue: blue[400],
886
- blueSubtle: blue[800],
887
- blueOnHover: blue[500],
888
- red: red[400],
889
- redSubtle: red[900],
890
- redOnHover: red[500],
891
- orange: orange[400],
892
- orangeSubtle: orange[900],
893
- orangeOnHover: orange[500],
894
- yellow: yellow[400],
895
- yellowSubtle: yellow[900],
896
- yellowOnHover: yellow[500],
897
- green: green[600],
898
- greenSubtle: green[900],
899
- greenOnHover: green[700]
900
- },
840
+ var semanticTokens = {
901
841
  light: {
902
- primary: neutral[400],
903
- secondary: neutral[300],
904
- subtle: neutral[300],
905
- invert: neutral[950],
906
- onColor: neutral[100],
907
- blue: blue[500],
908
- blueSubtle: blue[300],
909
- blueOnHover: blue[700],
910
- red: red[600],
911
- redSubtle: red[300],
912
- redOnHover: red[700],
913
- orange: orange[600],
914
- orangeSubtle: orange[300],
915
- orangeOnHover: orange[700],
916
- yellow: yellow[600],
917
- yellowSubtle: yellow[300],
918
- yellowOnHover: yellow[700],
919
- green: green[600],
920
- greenSubtle: green[300],
921
- greenOnHover: green[700]
922
- }
923
- };
924
- var contentTokens = {
925
- dark: {
926
- primary: neutral[300],
927
- secondary: neutral[500],
928
- subtle: neutral[700],
929
- onColor: neutral[950],
930
- alwaysWhite: neutral[100],
931
- alwaysBlack: neutral[950],
932
- onColorInverse: neutral[100],
933
- blue: blue[400],
934
- blueDisabled: blue[800],
935
- blueOnHover: blue[500],
936
- green: green[600],
937
- greenDisabled: green[800],
938
- greenOnHover: green[500],
939
- red: red[400],
940
- redDisabled: red[800],
941
- redOnHover: red[300],
942
- orange: orange[400],
943
- orangeDisabled: orange[800],
944
- orangeOnHover: orange[300],
945
- yellow: yellow[400],
946
- yellowDisabled: yellow[800],
947
- yellowOnHover: yellow[300]
842
+ border: {
843
+ primary: neutral[400],
844
+ secondary: neutral[300],
845
+ subtle: neutral[300],
846
+ invert: neutral[950],
847
+ onColor: neutral[100],
848
+ blue: blue[500],
849
+ blueSubtle: blue[300],
850
+ blueOnHover: blue[700],
851
+ red: red[600],
852
+ redSubtle: red[300],
853
+ redOnHover: red[700],
854
+ orange: orange[600],
855
+ orangeSubtle: orange[300],
856
+ orangeOnHover: orange[700],
857
+ yellow: yellow[600],
858
+ yellowSubtle: yellow[300],
859
+ yellowOnHover: yellow[700],
860
+ green: green[600],
861
+ greenSubtle: green[300],
862
+ greenOnHover: green[700]
863
+ },
864
+ content: {
865
+ primary: neutral[900],
866
+ secondary: neutral[600],
867
+ subtle: neutral[400],
868
+ onColor: neutral[100],
869
+ alwaysWhite: neutral[100],
870
+ alwaysBlack: neutral[950],
871
+ onColorInverse: neutral[950],
872
+ blue: blue[500],
873
+ blueDisabled: blue[400],
874
+ blueOnHover: blue[600],
875
+ green: green[700],
876
+ greenDisabled: green[400],
877
+ greenOnHover: green[600],
878
+ red: red[600],
879
+ redDisabled: red[400],
880
+ redOnHover: red[700],
881
+ orange: orange[600],
882
+ orangeDisabled: orange[400],
883
+ orangeOnHover: orange[700],
884
+ yellow: yellow[600],
885
+ yellowDisabled: yellow[400],
886
+ yellowOnHover: yellow[700]
887
+ },
888
+ background: {
889
+ primary: neutral[100],
890
+ system: neutral[1e3],
891
+ secondary: neutral[200],
892
+ tertiary: neutral[300],
893
+ invert: neutral[950],
894
+ invertLight: neutral[900],
895
+ green: green[100],
896
+ greenOnHover: green[200],
897
+ red: red[100],
898
+ redOnHover: red[200],
899
+ orange: orange[100],
900
+ orangeOnHover: orange[200],
901
+ yellow: orange[100],
902
+ yellowOnHover: orange[200],
903
+ low: neutral[200],
904
+ lowOnHover: neutral[300],
905
+ info: blue[100],
906
+ infoOnHover: blue[300],
907
+ base: neutral[100]
908
+ }
948
909
  },
949
- light: {
950
- primary: neutral[900],
951
- secondary: neutral[600],
952
- subtle: neutral[400],
953
- onColor: neutral[100],
954
- alwaysWhite: neutral[100],
955
- alwaysBlack: neutral[950],
956
- onColorInverse: neutral[950],
957
- blue: blue[500],
958
- blueDisabled: blue[400],
959
- blueOnHover: blue[600],
960
- green: green[700],
961
- greenDisabled: green[400],
962
- greenOnHover: green[600],
963
- red: red[600],
964
- redDisabled: red[400],
965
- redOnHover: red[700],
966
- orange: orange[600],
967
- orangeDisabled: orange[400],
968
- orangeOnHover: orange[700],
969
- yellow: yellow[600],
970
- yellowDisabled: yellow[400],
971
- yellowOnHover: yellow[700]
972
- }
973
- };
974
- var backgroundTokens = {
975
910
  dark: {
976
- primary: neutral[950],
977
- system: neutral[950],
978
- secondary: neutral[900],
979
- tertiary: neutral[800],
980
- invert: neutral[100],
981
- invertLight: neutral[300],
982
- green: green[950],
983
- greenOnHover: green[900],
984
- red: red[950],
985
- redOnHover: red[900],
986
- orange: orange[950],
987
- orangeOnHover: orange[900],
988
- yellow: yellow[950],
989
- yellowOnHover: yellow[900],
990
- low: neutral[900],
991
- lowOnHover: neutral[800],
992
- info: blue[950],
993
- infoOnHover: blue[900],
994
- base: neutral[950]
995
- },
996
- light: {
997
- primary: neutral[100],
998
- system: neutral[1e3],
999
- secondary: neutral[200],
1000
- tertiary: neutral[300],
1001
- invert: neutral[950],
1002
- invertLight: neutral[900],
1003
- green: green[100],
1004
- greenOnHover: green[200],
1005
- red: red[100],
1006
- redOnHover: red[200],
1007
- orange: orange[100],
1008
- orangeOnHover: orange[200],
1009
- yellow: orange[100],
1010
- yellowOnHover: orange[200],
1011
- low: neutral[200],
1012
- lowOnHover: neutral[300],
1013
- info: blue[100],
1014
- infoOnHover: blue[300],
1015
- base: neutral[100]
911
+ border: {
912
+ primary: neutral[700],
913
+ secondary: neutral[800],
914
+ subtle: neutral[800],
915
+ invert: neutral[100],
916
+ onColor: neutral[950],
917
+ blue: blue[400],
918
+ blueSubtle: blue[800],
919
+ blueOnHover: blue[500],
920
+ red: red[400],
921
+ redSubtle: red[900],
922
+ redOnHover: red[500],
923
+ orange: orange[400],
924
+ orangeSubtle: orange[900],
925
+ orangeOnHover: orange[500],
926
+ yellow: yellow[400],
927
+ yellowSubtle: yellow[900],
928
+ yellowOnHover: yellow[500],
929
+ green: green[600],
930
+ greenSubtle: green[900],
931
+ greenOnHover: green[700]
932
+ },
933
+ content: {
934
+ primary: neutral[300],
935
+ secondary: neutral[500],
936
+ subtle: neutral[700],
937
+ onColor: neutral[950],
938
+ alwaysWhite: neutral[100],
939
+ alwaysBlack: neutral[950],
940
+ onColorInverse: neutral[100],
941
+ blue: blue[400],
942
+ blueDisabled: blue[800],
943
+ blueOnHover: blue[500],
944
+ green: green[600],
945
+ greenDisabled: green[800],
946
+ greenOnHover: green[500],
947
+ red: red[400],
948
+ redDisabled: red[800],
949
+ redOnHover: red[300],
950
+ orange: orange[400],
951
+ orangeDisabled: orange[800],
952
+ orangeOnHover: orange[300],
953
+ yellow: yellow[400],
954
+ yellowDisabled: yellow[800],
955
+ yellowOnHover: yellow[300]
956
+ },
957
+ background: {
958
+ primary: neutral[950],
959
+ system: neutral[950],
960
+ secondary: neutral[900],
961
+ tertiary: neutral[800],
962
+ invert: neutral[100],
963
+ invertLight: neutral[300],
964
+ green: green[950],
965
+ greenOnHover: green[900],
966
+ red: red[950],
967
+ redOnHover: red[900],
968
+ orange: orange[950],
969
+ orangeOnHover: orange[900],
970
+ yellow: yellow[950],
971
+ yellowOnHover: yellow[900],
972
+ low: neutral[900],
973
+ lowOnHover: neutral[800],
974
+ info: blue[950],
975
+ infoOnHover: blue[900],
976
+ base: neutral[950]
977
+ }
1016
978
  }
1017
979
  };
1018
- var semanticTokens = {
1019
- border: borderTokens,
1020
- content: contentTokens,
1021
- background: backgroundTokens
1022
- };
980
+ var COLOR_SCALES = [100, 200, 300, 400, 500, 600, 700, 800, 900, 950, 1e3];
1023
981
  var VARIANTS = ["primary", "secondary", "ghost", "destructive"];
1024
982
  var INTENTS = ["primary", "success", "warning", "danger", "neutral"];
1025
983
  var SIZES = ["sm", "md", "lg"];
@@ -1027,91 +985,65 @@ var BUTTON_TYPES = ["button", "submit", "reset"];
1027
985
  var INPUT_TYPES = ["text", "email", "password", "number", "tel", "url", "search"];
1028
986
  var ORIENTATIONS = ["horizontal", "vertical"];
1029
987
  var SURFACE_LEVELS = ["base", "elevated", "overlay"];
1030
- function createSemanticTokens(mode) {
1031
- const isLight = mode === "light";
1032
- const border = isLight ? borderTokens.light : borderTokens.dark;
1033
- const content = isLight ? contentTokens.light : contentTokens.dark;
1034
- const background = isLight ? backgroundTokens.light : backgroundTokens.dark;
1035
- return {
1036
- intent: {
1037
- primary: {
1038
- color: content.secondary,
1039
- colorHover: isLight ? neutral[700] : neutral[300],
1040
- colorActive: isLight ? neutral[800] : neutral[200],
1041
- background: background.secondary,
1042
- backgroundHover: background.lowOnHover,
1043
- backgroundActive: background.tertiary,
1044
- border: border.primary,
1045
- text: content.primary,
1046
- textMuted: content.subtle
1047
- },
1048
- success: {
1049
- color: isLight ? green[600] : green[600],
1050
- colorHover: isLight ? green[700] : green[500],
1051
- colorActive: isLight ? green[800] : green[700],
1052
- background: background.green,
1053
- backgroundHover: background.greenOnHover,
1054
- backgroundActive: isLight ? green[300] : green[800],
1055
- border: border.green,
1056
- text: content.green,
1057
- textMuted: isLight ? green[700] : green[300]
1058
- },
1059
- warning: {
1060
- color: isLight ? yellow[600] : yellow[400],
1061
- colorHover: isLight ? yellow[700] : yellow[300],
1062
- colorActive: isLight ? yellow[800] : yellow[500],
1063
- background: background.yellow,
1064
- backgroundHover: background.yellowOnHover,
1065
- backgroundActive: isLight ? yellow[200] : yellow[900],
1066
- border: border.yellow,
1067
- text: content.yellow,
1068
- textMuted: isLight ? yellow[700] : yellow[300]
1069
- },
1070
- danger: {
1071
- color: isLight ? red[600] : red[400],
1072
- colorHover: isLight ? red[700] : red[300],
1073
- colorActive: isLight ? red[800] : red[500],
1074
- background: background.red,
1075
- backgroundHover: background.redOnHover,
1076
- backgroundActive: isLight ? red[200] : red[900],
1077
- border: border.red,
1078
- text: content.red,
1079
- textMuted: isLight ? red[700] : red[300]
1080
- },
1081
- neutral: {
1082
- color: content.secondary,
1083
- colorHover: isLight ? neutral[700] : neutral[300],
1084
- colorActive: isLight ? neutral[800] : neutral[200],
1085
- background: background.secondary,
1086
- backgroundHover: background.lowOnHover,
1087
- backgroundActive: background.tertiary,
1088
- border: border.primary,
1089
- text: content.primary,
1090
- textMuted: content.subtle
1091
- }
1092
- },
1093
- surface: {
1094
- base: {
1095
- background: background.primary,
1096
- border: border.primary
1097
- },
1098
- elevated: {
1099
- background: background.secondary,
1100
- border: border.secondary
1101
- },
1102
- overlay: {
1103
- background: isLight ? "rgba(0, 0, 0, 0.5)" : "rgba(0, 0, 0, 0.7)",
1104
- border: "transparent"
1105
- }
1106
- },
1107
- text: {
1108
- heading: content.primary,
1109
- body: content.primary,
1110
- muted: content.subtle,
1111
- disabled: isLight ? content.subtle : neutral[600]
1112
- }
1113
- };
1114
- }
988
+ var colors = {
989
+ // Neutral palette
990
+ white: neutral[100],
991
+ black: neutral[950],
992
+ gray50: neutral[200],
993
+ gray100: neutral[300],
994
+ gray200: neutral[400],
995
+ gray300: neutral[500],
996
+ gray400: neutral[500],
997
+ gray500: neutral[500],
998
+ gray600: neutral[600],
999
+ gray700: neutral[700],
1000
+ gray800: neutral[800],
1001
+ gray900: neutral[900],
1002
+ // Primary palette (mapped from blue)
1003
+ blue50: blue[100],
1004
+ blue100: blue[100],
1005
+ blue200: blue[200],
1006
+ blue300: blue[300],
1007
+ blue400: blue[400],
1008
+ blue500: blue[500],
1009
+ blue600: blue[600],
1010
+ blue700: blue[700],
1011
+ blue800: blue[800],
1012
+ blue900: blue[900],
1013
+ // Success palette (mapped from green)
1014
+ green50: green[100],
1015
+ green100: green[100],
1016
+ green200: green[200],
1017
+ green300: green[300],
1018
+ green400: green[400],
1019
+ green500: green[500],
1020
+ green600: green[600],
1021
+ green700: green[700],
1022
+ green800: green[800],
1023
+ green900: green[900],
1024
+ // Warning palette (mapped from yellow)
1025
+ yellow50: yellow[100],
1026
+ yellow100: yellow[100],
1027
+ yellow200: yellow[200],
1028
+ yellow300: yellow[300],
1029
+ yellow400: yellow[400],
1030
+ yellow500: yellow[500],
1031
+ yellow600: yellow[600],
1032
+ yellow700: yellow[700],
1033
+ yellow800: yellow[800],
1034
+ yellow900: yellow[900],
1035
+ // Danger palette (mapped from red)
1036
+ red50: red[100],
1037
+ red100: red[100],
1038
+ red200: red[200],
1039
+ red300: red[300],
1040
+ red400: red[400],
1041
+ red500: red[500],
1042
+ red600: red[600],
1043
+ red700: red[700],
1044
+ red800: red[800],
1045
+ red900: red[900]
1046
+ };
1115
1047
 
1116
1048
  // src/theme/theme.ts
1117
1049
  function resolveThemeMode(mode) {
@@ -1125,147 +1057,31 @@ function resolveThemeMode(mode) {
1125
1057
  }
1126
1058
  function createTheme(name, mode) {
1127
1059
  const resolvedMode = resolveThemeMode(mode);
1128
- const semantic = createSemanticTokens(resolvedMode);
1060
+ const semantic = semanticTokens[resolvedMode];
1129
1061
  const cssVariables = {
1130
1062
  // Base colors
1131
- "--color-white": colors.white,
1132
- "--color-black": colors.black,
1133
- // Intent colors
1134
- "--intent-primary": semantic.intent.primary.color,
1135
- "--intent-primary-hover": semantic.intent.primary.colorHover,
1136
- "--intent-primary-active": semantic.intent.primary.colorActive,
1137
- "--intent-primary-bg": semantic.intent.primary.background,
1138
- "--intent-primary-bg-hover": semantic.intent.primary.backgroundHover,
1139
- "--intent-primary-bg-active": semantic.intent.primary.backgroundActive,
1140
- "--intent-primary-border": semantic.intent.primary.border,
1141
- "--intent-primary-text": semantic.intent.primary.text,
1142
- "--intent-success": semantic.intent.success.color,
1143
- "--intent-success-hover": semantic.intent.success.colorHover,
1144
- "--intent-success-active": semantic.intent.success.colorActive,
1145
- "--intent-success-bg": semantic.intent.success.background,
1146
- "--intent-success-bg-hover": semantic.intent.success.backgroundHover,
1147
- "--intent-success-bg-active": semantic.intent.success.backgroundActive,
1148
- "--intent-success-border": semantic.intent.success.border,
1149
- "--intent-success-text": semantic.intent.success.text,
1150
- "--intent-warning": semantic.intent.warning.color,
1151
- "--intent-warning-hover": semantic.intent.warning.colorHover,
1152
- "--intent-warning-active": semantic.intent.warning.colorActive,
1153
- "--intent-warning-bg": semantic.intent.warning.background,
1154
- "--intent-warning-bg-hover": semantic.intent.warning.backgroundHover,
1155
- "--intent-warning-bg-active": semantic.intent.warning.backgroundActive,
1156
- "--intent-warning-border": semantic.intent.warning.border,
1157
- "--intent-warning-text": semantic.intent.warning.text,
1158
- "--intent-danger": semantic.intent.danger.color,
1159
- "--intent-danger-hover": semantic.intent.danger.colorHover,
1160
- "--intent-danger-active": semantic.intent.danger.colorActive,
1161
- "--intent-danger-bg": semantic.intent.danger.background,
1162
- "--intent-danger-bg-hover": semantic.intent.danger.backgroundHover,
1163
- "--intent-danger-bg-active": semantic.intent.danger.backgroundActive,
1164
- "--intent-danger-border": semantic.intent.danger.border,
1165
- "--intent-danger-text": semantic.intent.danger.text,
1166
- "--intent-neutral": semantic.intent.neutral.color,
1167
- "--intent-neutral-hover": semantic.intent.neutral.colorHover,
1168
- "--intent-neutral-active": semantic.intent.neutral.colorActive,
1169
- "--intent-neutral-bg": semantic.intent.neutral.background,
1170
- "--intent-neutral-bg-hover": semantic.intent.neutral.backgroundHover,
1171
- "--intent-neutral-bg-active": semantic.intent.neutral.backgroundActive,
1172
- "--intent-neutral-border": semantic.intent.neutral.border,
1173
- "--intent-neutral-text": semantic.intent.neutral.text,
1174
- // Surface
1175
- "--surface-base": semantic.surface.base.background,
1176
- "--surface-base-border": semantic.surface.base.border,
1177
- "--surface-elevated": semantic.surface.elevated.background,
1178
- "--surface-elevated-border": semantic.surface.elevated.border,
1179
- "--surface-overlay": semantic.surface.overlay.background,
1180
- // Text
1181
- "--text-heading": semantic.text.heading,
1182
- "--text-body": semantic.text.body,
1183
- "--text-muted": semantic.text.muted,
1184
- "--text-disabled": semantic.text.disabled,
1185
- // Spacing
1186
- "--spacing-0": spacing[0],
1187
- "--spacing-1": spacing[1],
1188
- "--spacing-2": spacing[2],
1189
- "--spacing-3": spacing[3],
1190
- "--spacing-4": spacing[4],
1191
- "--spacing-5": spacing[5],
1192
- "--spacing-6": spacing[6],
1193
- "--spacing-8": spacing[8],
1194
- "--spacing-10": spacing[10],
1195
- "--spacing-12": spacing[12],
1196
- "--spacing-16": spacing[16],
1197
- "--spacing-20": spacing[20],
1198
- "--spacing-24": spacing[24],
1199
- // Radius
1200
- "--radius-none": radius.none,
1201
- "--radius-sm": radius.sm,
1202
- "--radius-base": radius.base,
1203
- "--radius-md": radius.md,
1204
- "--radius-lg": radius.lg,
1205
- "--radius-xl": radius.xl,
1206
- "--radius-2xl": radius["2xl"],
1207
- "--radius-3xl": radius["3xl"],
1208
- "--radius-full": radius.full,
1209
- // Shadows
1210
- "--shadow-sm": shadows.sm,
1211
- "--shadow-base": shadows.base,
1212
- "--shadow-md": shadows.md,
1213
- "--shadow-lg": shadows.lg,
1214
- "--shadow-xl": shadows.xl,
1215
- "--shadow-2xl": shadows["2xl"],
1216
- "--shadow-inner": shadows.inner,
1217
- "--shadow-none": shadows.none,
1218
- // Z-index
1219
- "--z-dropdown": String(zIndex.dropdown),
1220
- "--z-sticky": String(zIndex.sticky),
1221
- "--z-fixed": String(zIndex.fixed),
1222
- "--z-modal-backdrop": String(zIndex.modalBackdrop),
1223
- "--z-modal": String(zIndex.modal),
1224
- "--z-popover": String(zIndex.popover),
1225
- "--z-tooltip": String(zIndex.tooltip),
1226
- // Typography
1227
- "--font-sans": typography.fontFamily.sans.join(", "),
1228
- "--font-mono": typography.fontFamily.mono.join(", "),
1229
- "--font-size-xs": typography.fontSize.xs,
1230
- "--font-size-sm": typography.fontSize.sm,
1231
- "--font-size-base": typography.fontSize.base,
1232
- "--font-size-lg": typography.fontSize.lg,
1233
- "--font-size-xl": typography.fontSize.xl,
1234
- "--font-size-2xl": typography.fontSize["2xl"],
1235
- "--font-size-3xl": typography.fontSize["3xl"],
1236
- "--font-size-4xl": typography.fontSize["4xl"],
1237
- "--font-size-5xl": typography.fontSize["5xl"],
1238
- "--font-weight-normal": typography.fontWeight.normal,
1239
- "--font-weight-medium": typography.fontWeight.medium,
1240
- "--font-weight-semibold": typography.fontWeight.semibold,
1241
- "--font-weight-bold": typography.fontWeight.bold,
1242
- "--line-height-tight": typography.lineHeight.tight,
1243
- "--line-height-normal": typography.lineHeight.normal,
1244
- "--line-height-relaxed": typography.lineHeight.relaxed,
1245
- // Note: --background-*, --content-*, --border-* variables are already defined in tokens.css
1246
- // via legacy mappings. We only set shadcn/ui compatibility variables here.
1247
- // All semantic tokens (background, content, border) are available via tokens.css
1248
- // which provides both --pd-* and legacy --* variables.
1249
- // shadcn/ui CSS variable mappings for compatibility (these are NOT in tokens.css)
1250
- "--background": semantic.surface.base.background,
1251
- "--foreground": semantic.text.body,
1252
- "--card": semantic.surface.elevated.background,
1253
- "--card-foreground": semantic.text.body,
1254
- "--popover": semantic.surface.elevated.background,
1255
- "--popover-foreground": semantic.text.body,
1256
- "--primary": semantic.intent.primary.color,
1257
- "--primary-foreground": colors.white,
1258
- "--secondary": semantic.intent.neutral.background,
1259
- "--secondary-foreground": semantic.intent.neutral.text,
1260
- "--muted": semantic.intent.neutral.background,
1261
- "--muted-foreground": semantic.text.muted,
1262
- "--accent": semantic.intent.primary.background,
1263
- "--accent-foreground": semantic.intent.primary.text,
1264
- "--destructive": semantic.intent.danger.color,
1265
- "--destructive-foreground": colors.white,
1266
- "--border": semantic.intent.neutral.border,
1267
- "--input": semantic.intent.neutral.border,
1268
- "--ring": semantic.intent.primary.color,
1063
+ "--color-white": neutral[100],
1064
+ "--color-black": neutral[950],
1065
+ // shadcn/ui CSS variable mappings for compatibility
1066
+ "--background": semantic.background.primary,
1067
+ "--foreground": semantic.content.primary,
1068
+ "--card": semantic.background.secondary,
1069
+ "--card-foreground": semantic.content.primary,
1070
+ "--popover": semantic.background.secondary,
1071
+ "--popover-foreground": semantic.content.primary,
1072
+ "--primary": semantic.content.secondary,
1073
+ "--primary-foreground": neutral[100],
1074
+ "--secondary": semantic.background.secondary,
1075
+ "--secondary-foreground": semantic.content.primary,
1076
+ "--muted": semantic.background.secondary,
1077
+ "--muted-foreground": semantic.content.subtle,
1078
+ "--accent": semantic.background.secondary,
1079
+ "--accent-foreground": semantic.content.primary,
1080
+ "--destructive": resolvedMode === "light" ? semantic.content.red : semantic.content.red,
1081
+ "--destructive-foreground": neutral[100],
1082
+ "--border": semantic.border.primary,
1083
+ "--input": semantic.border.primary,
1084
+ "--ring": semantic.content.secondary,
1269
1085
  "--radius": radius.md
1270
1086
  };
1271
1087
  return {
@@ -1565,6 +1381,105 @@ function useTheme() {
1565
1381
  return context;
1566
1382
  }
1567
1383
 
1384
+ // src/tokens/semantic.ts
1385
+ var borderTokens = {
1386
+ light: semanticTokens.light.border,
1387
+ dark: semanticTokens.dark.border
1388
+ };
1389
+ var contentTokens = {
1390
+ light: semanticTokens.light.content,
1391
+ dark: semanticTokens.dark.content
1392
+ };
1393
+ var backgroundTokens = {
1394
+ light: semanticTokens.light.background,
1395
+ dark: semanticTokens.dark.background
1396
+ };
1397
+ function createSemanticTokens(mode) {
1398
+ const isLight = mode === "light";
1399
+ const border = isLight ? borderTokens.light : borderTokens.dark;
1400
+ const content = isLight ? contentTokens.light : contentTokens.dark;
1401
+ const background = isLight ? backgroundTokens.light : backgroundTokens.dark;
1402
+ return {
1403
+ intent: {
1404
+ primary: {
1405
+ color: content.secondary,
1406
+ colorHover: isLight ? neutral[700] : neutral[300],
1407
+ colorActive: isLight ? neutral[800] : neutral[200],
1408
+ background: background.secondary,
1409
+ backgroundHover: background.lowOnHover,
1410
+ backgroundActive: background.tertiary,
1411
+ border: border.primary,
1412
+ text: content.primary,
1413
+ textMuted: content.subtle
1414
+ },
1415
+ success: {
1416
+ color: isLight ? green[600] : green[600],
1417
+ colorHover: isLight ? green[700] : green[500],
1418
+ colorActive: isLight ? green[800] : green[700],
1419
+ background: background.green,
1420
+ backgroundHover: background.greenOnHover,
1421
+ backgroundActive: isLight ? green[300] : green[800],
1422
+ border: border.green,
1423
+ text: content.green,
1424
+ textMuted: isLight ? green[700] : green[300]
1425
+ },
1426
+ warning: {
1427
+ color: isLight ? yellow[600] : yellow[400],
1428
+ colorHover: isLight ? yellow[700] : yellow[300],
1429
+ colorActive: isLight ? yellow[800] : yellow[500],
1430
+ background: background.yellow,
1431
+ backgroundHover: background.yellowOnHover,
1432
+ backgroundActive: isLight ? yellow[200] : yellow[900],
1433
+ border: border.yellow,
1434
+ text: content.yellow,
1435
+ textMuted: isLight ? yellow[700] : yellow[300]
1436
+ },
1437
+ danger: {
1438
+ color: isLight ? red[600] : red[400],
1439
+ colorHover: isLight ? red[700] : red[300],
1440
+ colorActive: isLight ? red[800] : red[500],
1441
+ background: background.red,
1442
+ backgroundHover: background.redOnHover,
1443
+ backgroundActive: isLight ? red[200] : red[900],
1444
+ border: border.red,
1445
+ text: content.red,
1446
+ textMuted: isLight ? red[700] : red[300]
1447
+ },
1448
+ neutral: {
1449
+ color: content.secondary,
1450
+ colorHover: isLight ? neutral[700] : neutral[300],
1451
+ colorActive: isLight ? neutral[800] : neutral[200],
1452
+ background: background.secondary,
1453
+ backgroundHover: background.lowOnHover,
1454
+ backgroundActive: background.tertiary,
1455
+ border: border.primary,
1456
+ text: content.primary,
1457
+ textMuted: content.subtle
1458
+ }
1459
+ },
1460
+ surface: {
1461
+ base: {
1462
+ background: background.primary,
1463
+ border: border.primary
1464
+ },
1465
+ elevated: {
1466
+ background: background.secondary,
1467
+ border: border.secondary
1468
+ },
1469
+ overlay: {
1470
+ background: isLight ? "rgba(0, 0, 0, 0.5)" : "rgba(0, 0, 0, 0.7)",
1471
+ border: "transparent"
1472
+ }
1473
+ },
1474
+ text: {
1475
+ heading: content.primary,
1476
+ body: content.primary,
1477
+ muted: content.subtle,
1478
+ disabled: isLight ? content.subtle : neutral[600]
1479
+ }
1480
+ };
1481
+ }
1482
+
1568
1483
  // src/tokens/index.ts
1569
1484
  var tokens = {
1570
1485
  colors: {
@@ -1580,13 +1495,7 @@ var tokens = {
1580
1495
  // Legacy color names (for backward compatibility)
1581
1496
  legacy: colors
1582
1497
  },
1583
- semantic: {
1584
- border: borderTokens,
1585
- content: contentTokens,
1586
- background: backgroundTokens,
1587
- // Full semantic tokens object
1588
- all: semanticTokens
1589
- },
1498
+ semantic: semanticTokens,
1590
1499
  spacing,
1591
1500
  typography,
1592
1501
  radius,