@quieto/design-tokens 0.2.0 → 0.3.0

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.
@@ -59,7 +59,8 @@ The available category types are:
59
59
  - animation
60
60
 
61
61
  `spacing` is the space between things; `size` is the dimensions of things, such as container
62
- widths, which outgrow the spacing scale. `opacity` is transparency, as a number from 0 to 1.
62
+ widths, which outgrow the spacing scale, and icon sizes, under the `icon` sub-category
63
+ (`size.icon.md`). `opacity` is transparency, as a number from 0 to 1.
63
64
 
64
65
  ##### Sub-category (if needed)
65
66
 
@@ -68,6 +69,7 @@ The sub-category identifier signifies any deeper design choices that need to be
68
69
  The available sub-category types are:
69
70
 
70
71
  - color or hue name (i.e. "blue" or "green")
72
+ - icon
71
73
  - font-size
72
74
  - font-family
73
75
  - font-weight
@@ -207,6 +209,10 @@ primary button or the check mark in a checked box. It flips with the mode — li
207
209
  dark in dark — because filled surfaces lighten in dark mode, where light text on them would fall
208
210
  below 4.5:1.
209
211
 
212
+ As a background, `inverse` is that filled surface itself: an element that stands out from the page
213
+ in either mode, such as a tooltip. It is dark in light mode and light in dark mode, and is always
214
+ paired with `inverse` content.
215
+
210
216
  The status roles also have **border** colors, tuned to reach 3:1 against the page. Because that is
211
217
  exactly the requirement for any non-text mark, they are also what solid status indicators use — a
212
218
  progress bar's fill, for example.
@@ -326,6 +332,10 @@ primary button or the check mark in a checked box. It flips with the mode — li
326
332
  dark in dark — because filled surfaces lighten in dark mode, where light text on them would fall
327
333
  below 4.5:1.
328
334
 
335
+ As a background, `inverse` is that filled surface itself: an element that stands out from the page
336
+ in either mode, such as a tooltip. It is dark in light mode and light in dark mode, and is always
337
+ paired with `inverse` content.
338
+
329
339
  The status roles also have **border** colors, tuned to reach 3:1 against the page. Because that is
330
340
  exactly the requirement for any non-text mark, they are also what solid status indicators use — a
331
341
  progress bar's fill, for example.
package/nomenclature.js CHANGED
@@ -97,7 +97,8 @@ export const primitive = {
97
97
  * (container widths, which outgrow the spacing scale), and `opacity` for
98
98
  * transparency. Both were added when the component library first needed them:
99
99
  * before that, the modal's widths and backdrop opacity were raw values with
100
- * nothing to reference.
100
+ * nothing to reference. Icon sizes sit under `size` with the `icon`
101
+ * sub-category (`size.icon.md`), apart from the container widths.
101
102
  */
102
103
  categories: ['color', 'typography', 'spacing', 'size', 'border', 'shadow', 'opacity', 'animation'],
103
104
 
@@ -107,6 +108,7 @@ export const primitive = {
107
108
  * below rather than this list.
108
109
  */
109
110
  subCategories: [
111
+ 'icon',
110
112
  'font-size',
111
113
  'font-family',
112
114
  'font-weight',
@@ -202,7 +204,10 @@ export const semantic = {
202
204
  * button, a check mark in a checked box. Every other role describes what the
203
205
  * element itself means; this one describes what it sits on. It flips with the
204
206
  * mode (light text in light mode, dark in dark) because the filled surfaces
205
- * lighten in dark mode, and light text on them falls below 4.5:1.
207
+ * lighten in dark mode, and light text on them falls below 4.5:1. As a
208
+ * background, it is that filled surface itself, for an element that stands
209
+ * out from the page in either mode, such as a tooltip: dark in light mode,
210
+ * light in dark, always paired with inverse content.
206
211
  */
207
212
  roles: [
208
213
  'default',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quieto/design-tokens",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Three-tier design tokens as CSS custom properties and a typed JS manifest, with light and dark modes.",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/tokens.json CHANGED
@@ -659,6 +659,23 @@
659
659
  "$value": "64rem",
660
660
  "$type": "dimension",
661
661
  "$description": "Container width: page-level content."
662
+ },
663
+ "icon": {
664
+ "sm": {
665
+ "$value": "1rem",
666
+ "$type": "dimension",
667
+ "$description": "Icon: inline with small text, and inside compact controls."
668
+ },
669
+ "md": {
670
+ "$value": "1.25rem",
671
+ "$type": "dimension",
672
+ "$description": "Icon: the default, beside body text and in buttons."
673
+ },
674
+ "lg": {
675
+ "$value": "1.5rem",
676
+ "$type": "dimension",
677
+ "$description": "Icon: standalone, or leading a message."
678
+ }
662
679
  }
663
680
  }
664
681
  },
@@ -901,6 +918,10 @@
901
918
  "raised": {
902
919
  "$value": "{color.neutral.50}",
903
920
  "$type": "color"
921
+ },
922
+ "inverse": {
923
+ "$value": "{color.neutral.900}",
924
+ "$type": "color"
904
925
  }
905
926
  },
906
927
  "content": {
@@ -1105,6 +1126,10 @@
1105
1126
  "raised": {
1106
1127
  "$value": "{color.neutral.800}",
1107
1128
  "$type": "color"
1129
+ },
1130
+ "inverse": {
1131
+ "$value": "{color.neutral.100}",
1132
+ "$type": "color"
1108
1133
  }
1109
1134
  },
1110
1135
  "content": {
@@ -2685,6 +2710,460 @@
2685
2710
  }
2686
2711
  }
2687
2712
  },
2713
+ "component/icon": {
2714
+ "icon": {
2715
+ "sm": {
2716
+ "width": {
2717
+ "$value": "{size.icon.sm}",
2718
+ "$type": "dimension"
2719
+ }
2720
+ },
2721
+ "md": {
2722
+ "width": {
2723
+ "$value": "{size.icon.md}",
2724
+ "$type": "dimension"
2725
+ }
2726
+ },
2727
+ "lg": {
2728
+ "width": {
2729
+ "$value": "{size.icon.lg}",
2730
+ "$type": "dimension"
2731
+ }
2732
+ }
2733
+ }
2734
+ },
2735
+ "component/select": {
2736
+ "select": {
2737
+ "gap": {
2738
+ "$value": "{spacing.100}",
2739
+ "$type": "dimension"
2740
+ },
2741
+ "duration": {
2742
+ "$value": "{animation.default}",
2743
+ "$type": "duration"
2744
+ },
2745
+ "label": {
2746
+ "font-size": {
2747
+ "$value": "{typography.font-size.200}",
2748
+ "$type": "dimension"
2749
+ },
2750
+ "font-weight": {
2751
+ "$value": "{typography.font-weight.medium}",
2752
+ "$type": "fontWeight"
2753
+ },
2754
+ "color": {
2755
+ "content": {
2756
+ "rest": {
2757
+ "$value": "{color.content.default}",
2758
+ "$type": "color"
2759
+ },
2760
+ "disabled": {
2761
+ "$value": "{color.content.subtle}",
2762
+ "$type": "color"
2763
+ }
2764
+ }
2765
+ }
2766
+ },
2767
+ "hint": {
2768
+ "font-size": {
2769
+ "$value": "{typography.font-size.100}",
2770
+ "$type": "dimension"
2771
+ },
2772
+ "color": {
2773
+ "content": {
2774
+ "rest": {
2775
+ "$value": "{color.content.subtle}",
2776
+ "$type": "color"
2777
+ }
2778
+ }
2779
+ }
2780
+ },
2781
+ "error": {
2782
+ "color": {
2783
+ "content": {
2784
+ "rest": {
2785
+ "$value": "{color.content.error}",
2786
+ "$type": "color"
2787
+ }
2788
+ }
2789
+ }
2790
+ },
2791
+ "control": {
2792
+ "padding-block": {
2793
+ "$value": "{spacing.200}",
2794
+ "$type": "dimension"
2795
+ },
2796
+ "padding-inline": {
2797
+ "$value": "{spacing.300}",
2798
+ "$type": "dimension"
2799
+ },
2800
+ "font-size": {
2801
+ "$value": "{typography.font-size.200}",
2802
+ "$type": "dimension"
2803
+ },
2804
+ "line-height": {
2805
+ "$value": "{typography.line-height.normal}",
2806
+ "$type": "number"
2807
+ },
2808
+ "border-radius": {
2809
+ "$value": "{radius.default}",
2810
+ "$type": "dimension"
2811
+ },
2812
+ "border-width": {
2813
+ "$value": "{border.default}",
2814
+ "$type": "dimension"
2815
+ },
2816
+ "color": {
2817
+ "background": {
2818
+ "rest": {
2819
+ "$value": "{color.background.default}",
2820
+ "$type": "color"
2821
+ },
2822
+ "disabled": {
2823
+ "$value": "{color.background.subtle}",
2824
+ "$type": "color"
2825
+ }
2826
+ },
2827
+ "border": {
2828
+ "rest": {
2829
+ "$value": "{color.border.control}",
2830
+ "$type": "color"
2831
+ },
2832
+ "focus": {
2833
+ "$value": "{color.border.primary}",
2834
+ "$type": "color"
2835
+ },
2836
+ "disabled": {
2837
+ "$value": "{color.border.subtle}",
2838
+ "$type": "color"
2839
+ }
2840
+ },
2841
+ "content": {
2842
+ "rest": {
2843
+ "$value": "{color.content.default}",
2844
+ "$type": "color"
2845
+ },
2846
+ "disabled": {
2847
+ "$value": "{color.content.subtle}",
2848
+ "$type": "color"
2849
+ }
2850
+ }
2851
+ }
2852
+ },
2853
+ "invalid": {
2854
+ "color": {
2855
+ "border": {
2856
+ "rest": {
2857
+ "$value": "{color.border.error}",
2858
+ "$type": "color"
2859
+ }
2860
+ }
2861
+ }
2862
+ },
2863
+ "placeholder": {
2864
+ "color": {
2865
+ "content": {
2866
+ "rest": {
2867
+ "$value": "{color.content.subtle}",
2868
+ "$type": "color"
2869
+ }
2870
+ }
2871
+ }
2872
+ },
2873
+ "icon": {
2874
+ "color": {
2875
+ "content": {
2876
+ "rest": {
2877
+ "$value": "{color.content.subtle}",
2878
+ "$type": "color"
2879
+ }
2880
+ }
2881
+ }
2882
+ }
2883
+ }
2884
+ },
2885
+ "component/alert": {
2886
+ "alert": {
2887
+ "gap": {
2888
+ "$value": "{spacing.300}",
2889
+ "$type": "dimension"
2890
+ },
2891
+ "padding": {
2892
+ "$value": "{spacing.400}",
2893
+ "$type": "dimension"
2894
+ },
2895
+ "border-radius": {
2896
+ "$value": "{radius.default}",
2897
+ "$type": "dimension"
2898
+ },
2899
+ "border-width": {
2900
+ "$value": "{border.default}",
2901
+ "$type": "dimension"
2902
+ },
2903
+ "font-size": {
2904
+ "$value": "{typography.font-size.200}",
2905
+ "$type": "dimension"
2906
+ },
2907
+ "line-height": {
2908
+ "$value": "{typography.line-height.normal}",
2909
+ "$type": "number"
2910
+ },
2911
+ "color": {
2912
+ "content": {
2913
+ "rest": {
2914
+ "$value": "{color.content.default}",
2915
+ "$type": "color"
2916
+ }
2917
+ }
2918
+ },
2919
+ "heading": {
2920
+ "font-weight": {
2921
+ "$value": "{typography.font-weight.semibold}",
2922
+ "$type": "fontWeight"
2923
+ }
2924
+ },
2925
+ "info": {
2926
+ "color": {
2927
+ "background": {
2928
+ "rest": {
2929
+ "$value": "{color.background.info}",
2930
+ "$type": "color"
2931
+ }
2932
+ },
2933
+ "border": {
2934
+ "rest": {
2935
+ "$value": "{color.border.info}",
2936
+ "$type": "color"
2937
+ }
2938
+ },
2939
+ "content": {
2940
+ "rest": {
2941
+ "$value": "{color.content.info}",
2942
+ "$type": "color"
2943
+ }
2944
+ }
2945
+ }
2946
+ },
2947
+ "success": {
2948
+ "color": {
2949
+ "background": {
2950
+ "rest": {
2951
+ "$value": "{color.background.success}",
2952
+ "$type": "color"
2953
+ }
2954
+ },
2955
+ "border": {
2956
+ "rest": {
2957
+ "$value": "{color.border.success}",
2958
+ "$type": "color"
2959
+ }
2960
+ },
2961
+ "content": {
2962
+ "rest": {
2963
+ "$value": "{color.content.success}",
2964
+ "$type": "color"
2965
+ }
2966
+ }
2967
+ }
2968
+ },
2969
+ "warning": {
2970
+ "color": {
2971
+ "background": {
2972
+ "rest": {
2973
+ "$value": "{color.background.warning}",
2974
+ "$type": "color"
2975
+ }
2976
+ },
2977
+ "border": {
2978
+ "rest": {
2979
+ "$value": "{color.border.warning}",
2980
+ "$type": "color"
2981
+ }
2982
+ },
2983
+ "content": {
2984
+ "rest": {
2985
+ "$value": "{color.content.warning}",
2986
+ "$type": "color"
2987
+ }
2988
+ }
2989
+ }
2990
+ },
2991
+ "error": {
2992
+ "color": {
2993
+ "background": {
2994
+ "rest": {
2995
+ "$value": "{color.background.error}",
2996
+ "$type": "color"
2997
+ }
2998
+ },
2999
+ "border": {
3000
+ "rest": {
3001
+ "$value": "{color.border.error}",
3002
+ "$type": "color"
3003
+ }
3004
+ },
3005
+ "content": {
3006
+ "rest": {
3007
+ "$value": "{color.content.error}",
3008
+ "$type": "color"
3009
+ }
3010
+ }
3011
+ }
3012
+ }
3013
+ }
3014
+ },
3015
+ "component/tooltip": {
3016
+ "tooltip": {
3017
+ "gap": {
3018
+ "$value": "{spacing.200}",
3019
+ "$type": "dimension"
3020
+ },
3021
+ "padding-block": {
3022
+ "$value": "{spacing.100}",
3023
+ "$type": "dimension"
3024
+ },
3025
+ "padding-inline": {
3026
+ "$value": "{spacing.200}",
3027
+ "$type": "dimension"
3028
+ },
3029
+ "max-width": {
3030
+ "$value": "{size.sm}",
3031
+ "$type": "dimension"
3032
+ },
3033
+ "border-radius": {
3034
+ "$value": "{radius.subtle}",
3035
+ "$type": "dimension"
3036
+ },
3037
+ "font-size": {
3038
+ "$value": "{typography.font-size.100}",
3039
+ "$type": "dimension"
3040
+ },
3041
+ "line-height": {
3042
+ "$value": "{typography.line-height.snug}",
3043
+ "$type": "number"
3044
+ },
3045
+ "duration": {
3046
+ "$value": "{animation.default}",
3047
+ "$type": "duration"
3048
+ },
3049
+ "color": {
3050
+ "background": {
3051
+ "rest": {
3052
+ "$value": "{color.background.inverse}",
3053
+ "$type": "color"
3054
+ }
3055
+ },
3056
+ "content": {
3057
+ "rest": {
3058
+ "$value": "{color.content.inverse}",
3059
+ "$type": "color"
3060
+ }
3061
+ }
3062
+ }
3063
+ }
3064
+ },
3065
+ "component/menu": {
3066
+ "menu": {
3067
+ "gap": {
3068
+ "$value": "{spacing.100}",
3069
+ "$type": "dimension"
3070
+ },
3071
+ "padding": {
3072
+ "$value": "{spacing.100}",
3073
+ "$type": "dimension"
3074
+ },
3075
+ "border-radius": {
3076
+ "$value": "{radius.default}",
3077
+ "$type": "dimension"
3078
+ },
3079
+ "border-width": {
3080
+ "$value": "{border.default}",
3081
+ "$type": "dimension"
3082
+ },
3083
+ "box-shadow": {
3084
+ "$value": "{elevation.default}",
3085
+ "$type": "shadow"
3086
+ },
3087
+ "color": {
3088
+ "background": {
3089
+ "rest": {
3090
+ "$value": "{color.background.raised}",
3091
+ "$type": "color"
3092
+ }
3093
+ },
3094
+ "border": {
3095
+ "rest": {
3096
+ "$value": "{color.border.subtle}",
3097
+ "$type": "color"
3098
+ }
3099
+ }
3100
+ },
3101
+ "item": {
3102
+ "gap": {
3103
+ "$value": "{spacing.200}",
3104
+ "$type": "dimension"
3105
+ },
3106
+ "padding-block": {
3107
+ "$value": "{spacing.200}",
3108
+ "$type": "dimension"
3109
+ },
3110
+ "padding-inline": {
3111
+ "$value": "{spacing.300}",
3112
+ "$type": "dimension"
3113
+ },
3114
+ "border-radius": {
3115
+ "$value": "{radius.subtle}",
3116
+ "$type": "dimension"
3117
+ },
3118
+ "font-size": {
3119
+ "$value": "{typography.font-size.200}",
3120
+ "$type": "dimension"
3121
+ },
3122
+ "line-height": {
3123
+ "$value": "{typography.line-height.normal}",
3124
+ "$type": "number"
3125
+ },
3126
+ "color": {
3127
+ "background": {
3128
+ "hover": {
3129
+ "$value": "{color.background.subtle}",
3130
+ "$type": "color"
3131
+ }
3132
+ },
3133
+ "content": {
3134
+ "rest": {
3135
+ "$value": "{color.content.default}",
3136
+ "$type": "color"
3137
+ },
3138
+ "disabled": {
3139
+ "$value": "{color.content.subtle}",
3140
+ "$type": "color"
3141
+ }
3142
+ }
3143
+ }
3144
+ },
3145
+ "item-icon": {
3146
+ "color": {
3147
+ "content": {
3148
+ "rest": {
3149
+ "$value": "{color.content.subtle}",
3150
+ "$type": "color"
3151
+ }
3152
+ }
3153
+ }
3154
+ },
3155
+ "item-danger": {
3156
+ "color": {
3157
+ "content": {
3158
+ "rest": {
3159
+ "$value": "{color.content.danger}",
3160
+ "$type": "color"
3161
+ }
3162
+ }
3163
+ }
3164
+ }
3165
+ }
3166
+ },
2688
3167
  "$themes": [
2689
3168
  {
2690
3169
  "id": "light",
@@ -2712,7 +3191,12 @@
2712
3191
  "component/progress-bar": "enabled",
2713
3192
  "component/accordion": "enabled",
2714
3193
  "component/tabs": "enabled",
2715
- "component/modal": "enabled"
3194
+ "component/modal": "enabled",
3195
+ "component/icon": "enabled",
3196
+ "component/select": "enabled",
3197
+ "component/alert": "enabled",
3198
+ "component/tooltip": "enabled",
3199
+ "component/menu": "enabled"
2716
3200
  },
2717
3201
  "$figmaStyleReferences": {},
2718
3202
  "$figmaVariableReferences": {},
@@ -2745,7 +3229,12 @@
2745
3229
  "component/progress-bar": "enabled",
2746
3230
  "component/accordion": "enabled",
2747
3231
  "component/tabs": "enabled",
2748
- "component/modal": "enabled"
3232
+ "component/modal": "enabled",
3233
+ "component/icon": "enabled",
3234
+ "component/select": "enabled",
3235
+ "component/alert": "enabled",
3236
+ "component/tooltip": "enabled",
3237
+ "component/menu": "enabled"
2749
3238
  },
2750
3239
  "$figmaStyleReferences": {},
2751
3240
  "$figmaVariableReferences": {},
@@ -2777,7 +3266,12 @@
2777
3266
  "component/progress-bar",
2778
3267
  "component/accordion",
2779
3268
  "component/tabs",
2780
- "component/modal"
3269
+ "component/modal",
3270
+ "component/icon",
3271
+ "component/select",
3272
+ "component/alert",
3273
+ "component/tooltip",
3274
+ "component/menu"
2781
3275
  ]
2782
3276
  }
2783
3277
  }