@graphprotocol/gds-css 0.1.1 → 0.2.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.
- package/dist/component-registry.d.ts +112 -40
- package/dist/component-registry.d.ts.map +1 -1
- package/dist/component-registry.js +42 -7
- package/dist/component-registry.js.map +1 -1
- package/dist/css-props/index.d.ts +1 -1
- package/dist/css-props/index.d.ts.map +1 -1
- package/dist/css-props/index.js +1 -1
- package/dist/css-props/index.js.map +1 -1
- package/dist/css-props/parseCSSPropValue.js +1 -1
- package/dist/css-props/parseCSSPropValue.js.map +1 -1
- package/dist/css-props/setupCSSProps.d.ts +7 -0
- package/dist/css-props/setupCSSProps.d.ts.map +1 -0
- package/dist/css-props/{registerCSSProps.js → setupCSSProps.js} +30 -42
- package/dist/css-props/setupCSSProps.js.map +1 -0
- package/dist/css-states/index.d.ts +1 -1
- package/dist/css-states/index.d.ts.map +1 -1
- package/dist/css-states/index.js +1 -1
- package/dist/css-states/index.js.map +1 -1
- package/dist/css-states/setupCSSStates.d.ts +20 -0
- package/dist/css-states/setupCSSStates.d.ts.map +1 -0
- package/dist/css-states/{registerCSSStates.js → setupCSSStates.js} +21 -18
- package/dist/css-states/setupCSSStates.js.map +1 -0
- package/dist/css-states/states.d.ts +1 -0
- package/dist/css-states/states.d.ts.map +1 -1
- package/dist/css-states/states.js +2 -1
- package/dist/css-states/states.js.map +1 -1
- package/dist/design-tokens.generated.d.ts +44 -24
- package/dist/design-tokens.generated.d.ts.map +1 -1
- package/dist/design-tokens.generated.js +82 -10
- package/dist/design-tokens.generated.js.map +1 -1
- package/dist/tailwind-customizations/index.d.ts +2 -2
- package/dist/tailwind-customizations/index.d.ts.map +1 -1
- package/dist/tailwind-customizations/index.js +2 -2
- package/dist/tailwind-customizations/index.js.map +1 -1
- package/dist/tailwind-customizations/setupComponents.d.ts +8 -0
- package/dist/tailwind-customizations/setupComponents.d.ts.map +1 -0
- package/dist/tailwind-customizations/setupComponents.js +75 -0
- package/dist/tailwind-customizations/setupComponents.js.map +1 -0
- package/dist/tailwind-customizations/setupVariants.d.ts +8 -0
- package/dist/tailwind-customizations/setupVariants.d.ts.map +1 -0
- package/dist/tailwind-customizations/{registerVariants.js → setupVariants.js} +7 -7
- package/dist/tailwind-customizations/setupVariants.js.map +1 -0
- package/dist/tailwind-customizations/variants.d.ts.map +1 -1
- package/dist/tailwind-customizations/variants.js +2 -0
- package/dist/tailwind-customizations/variants.js.map +1 -1
- package/dist/tailwind-plugin.js +7 -7
- package/dist/tailwind-plugin.js.map +1 -1
- package/dist/utils/cssUnescape.d.ts +5 -3
- package/dist/utils/cssUnescape.d.ts.map +1 -1
- package/dist/utils/cssUnescape.js +5 -3
- package/dist/utils/cssUnescape.js.map +1 -1
- package/package.json +5 -5
- package/src/component-registry.ts +205 -71
- package/src/css-props/index.ts +1 -1
- package/src/css-props/parseCSSPropValue.ts +1 -1
- package/src/css-props/{registerCSSProps.ts → setupCSSProps.ts} +31 -46
- package/src/css-states/index.ts +1 -1
- package/src/css-states/{registerCSSStates.ts → setupCSSStates.ts} +20 -17
- package/src/css-states/states.ts +2 -1
- package/src/design-tokens.generated.ts +82 -10
- package/src/tailwind-customizations/index.ts +2 -2
- package/src/tailwind-customizations/setupComponents.ts +87 -0
- package/src/tailwind-customizations/{registerVariants.ts → setupVariants.ts} +6 -6
- package/src/tailwind-customizations/variants.ts +11 -15
- package/src/tailwind-plugin.ts +7 -7
- package/src/utils/cssUnescape.ts +5 -3
- package/styles/global.css +4 -3
- package/styles/theme.css +16 -12
- package/styles/typography.css +27 -14
- package/styles/utilities.css +9 -0
- package/dist/css-props/registerCSSProps.d.ts +0 -7
- package/dist/css-props/registerCSSProps.d.ts.map +0 -1
- package/dist/css-props/registerCSSProps.js.map +0 -1
- package/dist/css-states/registerCSSStates.d.ts +0 -23
- package/dist/css-states/registerCSSStates.d.ts.map +0 -1
- package/dist/css-states/registerCSSStates.js.map +0 -1
- package/dist/tailwind-customizations/registerUtilities.d.ts +0 -9
- package/dist/tailwind-customizations/registerUtilities.d.ts.map +0 -1
- package/dist/tailwind-customizations/registerUtilities.js +0 -59
- package/dist/tailwind-customizations/registerUtilities.js.map +0 -1
- package/dist/tailwind-customizations/registerVariants.d.ts +0 -8
- package/dist/tailwind-customizations/registerVariants.d.ts.map +0 -1
- package/dist/tailwind-customizations/registerVariants.js.map +0 -1
- package/src/tailwind-customizations/registerUtilities.ts +0 -65
|
@@ -758,6 +758,30 @@ export const semanticColors = [
|
|
|
758
758
|
"#2d2a3f"
|
|
759
759
|
]
|
|
760
760
|
},
|
|
761
|
+
{
|
|
762
|
+
"name": "brand-subtlest",
|
|
763
|
+
"category": "background",
|
|
764
|
+
"light": [
|
|
765
|
+
"var(--color-brand-100)",
|
|
766
|
+
"#e2dbff"
|
|
767
|
+
],
|
|
768
|
+
"dark": [
|
|
769
|
+
"var(--color-brand-1100)",
|
|
770
|
+
"#19123a"
|
|
771
|
+
]
|
|
772
|
+
},
|
|
773
|
+
{
|
|
774
|
+
"name": "brand-subtler",
|
|
775
|
+
"category": "background",
|
|
776
|
+
"light": [
|
|
777
|
+
"var(--color-brand-200)",
|
|
778
|
+
"#c5b7ff"
|
|
779
|
+
],
|
|
780
|
+
"dark": [
|
|
781
|
+
"var(--color-brand-1000)",
|
|
782
|
+
"#281c5c"
|
|
783
|
+
]
|
|
784
|
+
},
|
|
761
785
|
{
|
|
762
786
|
"name": "brand-subtle",
|
|
763
787
|
"category": "background",
|
|
@@ -1018,6 +1042,30 @@ export const semanticColors = [
|
|
|
1018
1042
|
"#49465d"
|
|
1019
1043
|
]
|
|
1020
1044
|
},
|
|
1045
|
+
{
|
|
1046
|
+
"name": "brand-subtlest",
|
|
1047
|
+
"category": "border",
|
|
1048
|
+
"light": [
|
|
1049
|
+
"var(--color-brand-100)",
|
|
1050
|
+
"#e2dbff"
|
|
1051
|
+
],
|
|
1052
|
+
"dark": [
|
|
1053
|
+
"var(--color-brand-1100)",
|
|
1054
|
+
"#19123a"
|
|
1055
|
+
]
|
|
1056
|
+
},
|
|
1057
|
+
{
|
|
1058
|
+
"name": "brand-subtler",
|
|
1059
|
+
"category": "border",
|
|
1060
|
+
"light": [
|
|
1061
|
+
"var(--color-brand-200)",
|
|
1062
|
+
"#c5b7ff"
|
|
1063
|
+
],
|
|
1064
|
+
"dark": [
|
|
1065
|
+
"var(--color-brand-1000)",
|
|
1066
|
+
"#281c5c"
|
|
1067
|
+
]
|
|
1068
|
+
},
|
|
1021
1069
|
{
|
|
1022
1070
|
"name": "brand-subtle",
|
|
1023
1071
|
"category": "border",
|
|
@@ -1668,10 +1716,12 @@ export const componentColors = [
|
|
|
1668
1716
|
"name": "button-secondary-toggled-idle",
|
|
1669
1717
|
"category": "background",
|
|
1670
1718
|
"light": [
|
|
1719
|
+
"var(--background-color-brand-subtlest)",
|
|
1671
1720
|
"var(--color-brand-100)",
|
|
1672
1721
|
"#e2dbff"
|
|
1673
1722
|
],
|
|
1674
1723
|
"dark": [
|
|
1724
|
+
"var(--background-color-brand-subtlest)",
|
|
1675
1725
|
"var(--color-brand-1100)",
|
|
1676
1726
|
"#19123a"
|
|
1677
1727
|
]
|
|
@@ -1680,10 +1730,12 @@ export const componentColors = [
|
|
|
1680
1730
|
"name": "button-secondary-toggled-hover",
|
|
1681
1731
|
"category": "background",
|
|
1682
1732
|
"light": [
|
|
1733
|
+
"var(--background-color-brand-subtler)",
|
|
1683
1734
|
"var(--color-brand-200)",
|
|
1684
1735
|
"#c5b7ff"
|
|
1685
1736
|
],
|
|
1686
1737
|
"dark": [
|
|
1738
|
+
"var(--background-color-brand-subtler)",
|
|
1687
1739
|
"var(--color-brand-1000)",
|
|
1688
1740
|
"#281c5c"
|
|
1689
1741
|
]
|
|
@@ -1692,22 +1744,26 @@ export const componentColors = [
|
|
|
1692
1744
|
"name": "button-secondary-toggled-active",
|
|
1693
1745
|
"category": "background",
|
|
1694
1746
|
"light": [
|
|
1747
|
+
"var(--background-color-brand-subtlest)",
|
|
1695
1748
|
"var(--color-brand-100)",
|
|
1696
1749
|
"#e2dbff"
|
|
1697
1750
|
],
|
|
1698
1751
|
"dark": [
|
|
1699
|
-
"var(--color-brand-
|
|
1700
|
-
"
|
|
1752
|
+
"var(--background-color-brand-subtlest)",
|
|
1753
|
+
"var(--color-brand-1100)",
|
|
1754
|
+
"#19123a"
|
|
1701
1755
|
]
|
|
1702
1756
|
},
|
|
1703
1757
|
{
|
|
1704
1758
|
"name": "button-secondary-toggled-disabled",
|
|
1705
1759
|
"category": "background",
|
|
1706
1760
|
"light": [
|
|
1761
|
+
"var(--background-color-brand-subtlest)",
|
|
1707
1762
|
"var(--color-brand-100)",
|
|
1708
1763
|
"#e2dbff"
|
|
1709
1764
|
],
|
|
1710
1765
|
"dark": [
|
|
1766
|
+
"var(--background-color-brand-subtlest)",
|
|
1711
1767
|
"var(--color-brand-1100)",
|
|
1712
1768
|
"#19123a"
|
|
1713
1769
|
]
|
|
@@ -2008,10 +2064,12 @@ export const componentColors = [
|
|
|
2008
2064
|
"name": "form-checked-disabled",
|
|
2009
2065
|
"category": "background",
|
|
2010
2066
|
"light": [
|
|
2067
|
+
"var(--background-color-brand-subtler)",
|
|
2011
2068
|
"var(--color-brand-200)",
|
|
2012
2069
|
"#c5b7ff"
|
|
2013
2070
|
],
|
|
2014
2071
|
"dark": [
|
|
2072
|
+
"var(--background-color-brand-subtler)",
|
|
2015
2073
|
"var(--color-brand-1000)",
|
|
2016
2074
|
"#281c5c"
|
|
2017
2075
|
]
|
|
@@ -2068,48 +2126,56 @@ export const componentColors = [
|
|
|
2068
2126
|
"name": "card-primary-idle",
|
|
2069
2127
|
"category": "background",
|
|
2070
2128
|
"light": [
|
|
2129
|
+
"var(--background-color-brand-subtlest)",
|
|
2071
2130
|
"var(--color-brand-100)",
|
|
2072
2131
|
"#e2dbff"
|
|
2073
2132
|
],
|
|
2074
2133
|
"dark": [
|
|
2075
|
-
"var(--color-brand-
|
|
2076
|
-
"
|
|
2134
|
+
"var(--background-color-brand-subtlest)",
|
|
2135
|
+
"var(--color-brand-1100)",
|
|
2136
|
+
"#19123a"
|
|
2077
2137
|
]
|
|
2078
2138
|
},
|
|
2079
2139
|
{
|
|
2080
2140
|
"name": "card-primary-hover",
|
|
2081
2141
|
"category": "background",
|
|
2082
2142
|
"light": [
|
|
2143
|
+
"var(--background-color-brand-subtler)",
|
|
2083
2144
|
"var(--color-brand-200)",
|
|
2084
2145
|
"#c5b7ff"
|
|
2085
2146
|
],
|
|
2086
2147
|
"dark": [
|
|
2087
|
-
"var(--color-brand-
|
|
2088
|
-
"
|
|
2148
|
+
"var(--background-color-brand-subtler)",
|
|
2149
|
+
"var(--color-brand-1000)",
|
|
2150
|
+
"#281c5c"
|
|
2089
2151
|
]
|
|
2090
2152
|
},
|
|
2091
2153
|
{
|
|
2092
2154
|
"name": "card-primary-active",
|
|
2093
2155
|
"category": "background",
|
|
2094
2156
|
"light": [
|
|
2157
|
+
"var(--background-color-brand-subtlest)",
|
|
2095
2158
|
"var(--color-brand-100)",
|
|
2096
2159
|
"#e2dbff"
|
|
2097
2160
|
],
|
|
2098
2161
|
"dark": [
|
|
2099
|
-
"var(--color-brand-
|
|
2100
|
-
"
|
|
2162
|
+
"var(--background-color-brand-subtlest)",
|
|
2163
|
+
"var(--color-brand-1100)",
|
|
2164
|
+
"#19123a"
|
|
2101
2165
|
]
|
|
2102
2166
|
},
|
|
2103
2167
|
{
|
|
2104
2168
|
"name": "card-primary-disabled",
|
|
2105
2169
|
"category": "background",
|
|
2106
2170
|
"light": [
|
|
2171
|
+
"var(--background-color-brand-subtlest)",
|
|
2107
2172
|
"var(--color-brand-100)",
|
|
2108
2173
|
"#e2dbff"
|
|
2109
2174
|
],
|
|
2110
2175
|
"dark": [
|
|
2111
|
-
"var(--color-brand-
|
|
2112
|
-
"
|
|
2176
|
+
"var(--background-color-brand-subtlest)",
|
|
2177
|
+
"var(--color-brand-1100)",
|
|
2178
|
+
"#19123a"
|
|
2113
2179
|
]
|
|
2114
2180
|
},
|
|
2115
2181
|
{
|
|
@@ -2662,10 +2728,12 @@ export const componentColors = [
|
|
|
2662
2728
|
"name": "card-primary-idle",
|
|
2663
2729
|
"category": "border",
|
|
2664
2730
|
"light": [
|
|
2731
|
+
"var(--border-color-brand-subtle)",
|
|
2665
2732
|
"var(--color-brand-300)",
|
|
2666
2733
|
"#a994ff"
|
|
2667
2734
|
],
|
|
2668
2735
|
"dark": [
|
|
2736
|
+
"var(--border-color-brand-subtle)",
|
|
2669
2737
|
"var(--color-brand-800)",
|
|
2670
2738
|
"#3d2b8c"
|
|
2671
2739
|
]
|
|
@@ -2674,10 +2742,12 @@ export const componentColors = [
|
|
|
2674
2742
|
"name": "card-primary-hover",
|
|
2675
2743
|
"category": "border",
|
|
2676
2744
|
"light": [
|
|
2745
|
+
"var(--border-color-brand-muted)",
|
|
2677
2746
|
"var(--color-brand-400)",
|
|
2678
2747
|
"#8c70ff"
|
|
2679
2748
|
],
|
|
2680
2749
|
"dark": [
|
|
2750
|
+
"var(--border-color-brand-muted)",
|
|
2681
2751
|
"var(--color-brand-700)",
|
|
2682
2752
|
"#5138ba"
|
|
2683
2753
|
]
|
|
@@ -2686,10 +2756,12 @@ export const componentColors = [
|
|
|
2686
2756
|
"name": "card-primary-active",
|
|
2687
2757
|
"category": "border",
|
|
2688
2758
|
"light": [
|
|
2759
|
+
"var(--border-color-brand-subtle)",
|
|
2689
2760
|
"var(--color-brand-300)",
|
|
2690
2761
|
"#a994ff"
|
|
2691
2762
|
],
|
|
2692
2763
|
"dark": [
|
|
2764
|
+
"var(--border-color-brand-subtle)",
|
|
2693
2765
|
"var(--color-brand-800)",
|
|
2694
2766
|
"#3d2b8c"
|
|
2695
2767
|
]
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
1
|
+
export { setupComponents } from './setupComponents.ts'
|
|
2
|
+
export { setupVariants } from './setupVariants.ts'
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import type { DeepRecord } from '@graphprotocol/gds-utils'
|
|
2
|
+
|
|
3
|
+
import { getRegisteredComponents } from '../component-registry.ts'
|
|
4
|
+
import type { PluginAPI } from '../types.ts'
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Sets up registered components via the Tailwind plugin. This includes base styles that vary
|
|
8
|
+
* depending on the options used in `createComponent`: container(s) for style/size/scroll queries,
|
|
9
|
+
* stacking context and more for style isolation, and vars for advanced style customizations.
|
|
10
|
+
*/
|
|
11
|
+
export function setupComponents(api: PluginAPI) {
|
|
12
|
+
for (const component of getRegisteredComponents()) {
|
|
13
|
+
api.addBase({
|
|
14
|
+
'@layer components': {
|
|
15
|
+
[`.${component.className}`]: {
|
|
16
|
+
'container-name': component.getContainerNameChain().join(' ') || {},
|
|
17
|
+
...(component.isolate && {
|
|
18
|
+
isolation: 'isolate',
|
|
19
|
+
...(component.isolate !== 'allow-inheritance' && {
|
|
20
|
+
color: 'var(--text-color-default)',
|
|
21
|
+
// font: font-style font-variant font-weight font-stretch font-size/line-height font-family
|
|
22
|
+
font: 'normal normal var(--font-weight-regular) normal var(--text-16)/var(--leading-normal) var(--font-sans)',
|
|
23
|
+
'font-feature-settings': 'initial',
|
|
24
|
+
'font-variation-settings': 'initial',
|
|
25
|
+
'letter-spacing': 'initial',
|
|
26
|
+
'word-spacing': 'initial',
|
|
27
|
+
'text-align': 'initial',
|
|
28
|
+
'text-transform': 'initial',
|
|
29
|
+
'text-indent': 'initial',
|
|
30
|
+
'white-space': 'initial',
|
|
31
|
+
}),
|
|
32
|
+
}),
|
|
33
|
+
...(component.vars && {
|
|
34
|
+
...Object.fromEntries(
|
|
35
|
+
Object.keys(component.vars).map((varName) => [`--gds-var-${varName}`, 'initial']),
|
|
36
|
+
),
|
|
37
|
+
...Object.fromEntries(
|
|
38
|
+
(['&', '& > *'] as const).map((selector) => [
|
|
39
|
+
selector,
|
|
40
|
+
Object.entries(component.vars!).flatMap(([varName, varCSS]) => {
|
|
41
|
+
const requiresNestedSelector = typeof varCSS === 'object'
|
|
42
|
+
if (
|
|
43
|
+
(requiresNestedSelector && selector === '&') ||
|
|
44
|
+
(!requiresNestedSelector && selector === '& > *')
|
|
45
|
+
) {
|
|
46
|
+
return []
|
|
47
|
+
}
|
|
48
|
+
function getDefaultVarRule(cssOrValue: typeof varCSS): DeepRecord<string> {
|
|
49
|
+
if (!cssOrValue) {
|
|
50
|
+
return {}
|
|
51
|
+
}
|
|
52
|
+
if (typeof cssOrValue === 'string') {
|
|
53
|
+
return {
|
|
54
|
+
[`--gds-default-${varName}`]: cssOrValue,
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return Object.fromEntries(
|
|
58
|
+
Object.entries(cssOrValue).map(([selector, nestedCSSOrValue]) => {
|
|
59
|
+
return [selector || '&', getDefaultVarRule(nestedCSSOrValue)]
|
|
60
|
+
}),
|
|
61
|
+
)
|
|
62
|
+
}
|
|
63
|
+
return [
|
|
64
|
+
getDefaultVarRule(varCSS),
|
|
65
|
+
{
|
|
66
|
+
[`--gds-${component.kebabName}-${varName}`]: `var(--gds-var-${varName}, var(--gds-default-${varName}))`,
|
|
67
|
+
},
|
|
68
|
+
]
|
|
69
|
+
}),
|
|
70
|
+
]),
|
|
71
|
+
),
|
|
72
|
+
}),
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
})
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/** Register `var-[var=value]` utilities to override default var values. */
|
|
79
|
+
api.matchUtilities({
|
|
80
|
+
var: (varNameAndValue) => {
|
|
81
|
+
const [varName, ...valueParts] = varNameAndValue.split('=')
|
|
82
|
+
return {
|
|
83
|
+
[`--gds-var-${varName}`]: valueParts.join('='),
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
})
|
|
87
|
+
}
|
|
@@ -50,11 +50,11 @@ function addSimpleVariant(
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
/**
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
53
|
+
* Sets up custom variants via the Tailwind plugin, in addition to those defined in CSS (see
|
|
54
|
+
* `variants.css`). This includes all variants that are too complex or dynamic for
|
|
55
|
+
* `@custom-variant`, which notably doesn't support modifiers.
|
|
56
56
|
*/
|
|
57
|
-
export function
|
|
57
|
+
export function setupVariants(api: PluginAPI) {
|
|
58
58
|
const variantSelectors = getVariantSelectors()
|
|
59
59
|
const registeredComponents = getRegisteredComponents()
|
|
60
60
|
const componentKebabNames = new Set(registeredComponents.map((component) => component.kebabName))
|
|
@@ -63,7 +63,7 @@ export function registerVariants(api: PluginAPI) {
|
|
|
63
63
|
includePositional: !IS_INTELLISENSE,
|
|
64
64
|
})
|
|
65
65
|
|
|
66
|
-
/** Register the base variants, including some overrides required by the CSS
|
|
66
|
+
/** Register the base variants, including some overrides required by the CSS states system. */
|
|
67
67
|
for (const [variant, selector] of objectEntries(variantSelectors)) {
|
|
68
68
|
addSimpleVariant(api, variant, selector, variant === 'clickable')
|
|
69
69
|
}
|
|
@@ -218,7 +218,7 @@ export function registerVariants(api: PluginAPI) {
|
|
|
218
218
|
)
|
|
219
219
|
.join(' or ')})`,
|
|
220
220
|
]
|
|
221
|
-
// Fallback selector for browsers without style query support; see `
|
|
221
|
+
// Fallback selector for browsers without style query support; see `setupCSSProps` for more details
|
|
222
222
|
const onlyEnabledClickables =
|
|
223
223
|
states.includes('hover') || states.includes('active') || states.includes('focus')
|
|
224
224
|
selectors.push(
|
|
@@ -10,6 +10,8 @@ function getClickableSelector(enabled: boolean | 'any' = true) {
|
|
|
10
10
|
summary,
|
|
11
11
|
[role='button'],
|
|
12
12
|
[role='link'],
|
|
13
|
+
[role='checkbox'],
|
|
14
|
+
[role='radio'],
|
|
13
15
|
[role='menuitem'],
|
|
14
16
|
[role='menuitemcheckbox'],
|
|
15
17
|
[role='menuitemradio'],
|
|
@@ -103,21 +105,15 @@ const positionalVariants = ['first', 'last', 'only', 'odd', 'even', 'inert'] as
|
|
|
103
105
|
/** Generate positional variant selectors (`{prefix}-first`, `{prefix}-last`, etc.) */
|
|
104
106
|
function generatePositionalVariantSelectors(prefix: string, baseSelector: string) {
|
|
105
107
|
return {
|
|
106
|
-
...positionalVariants.reduce(
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
{}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
(result, variant) => {
|
|
116
|
-
result[`${prefix}-${variant}`] = `${baseSelector}${staticVariantSelectors[variant]}`
|
|
117
|
-
return result
|
|
118
|
-
},
|
|
119
|
-
{} as Record<string, string>,
|
|
120
|
-
),
|
|
108
|
+
...positionalVariants.reduce<Record<string, string>>((result, variant) => {
|
|
109
|
+
result[`${prefix}-not-${variant}`] =
|
|
110
|
+
`${baseSelector}${wrapSelector(':not', staticVariantSelectors[variant])}`
|
|
111
|
+
return result
|
|
112
|
+
}, {}),
|
|
113
|
+
...positionalVariants.reduce<Record<string, string>>((result, variant) => {
|
|
114
|
+
result[`${prefix}-${variant}`] = `${baseSelector}${staticVariantSelectors[variant]}`
|
|
115
|
+
return result
|
|
116
|
+
}, {}),
|
|
121
117
|
}
|
|
122
118
|
}
|
|
123
119
|
|
package/src/tailwind-plugin.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import createPlugin from 'tailwindcss/plugin'
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { setupCSSProps } from './css-props/setupCSSProps.ts'
|
|
4
|
+
import { setupCSSStates } from './css-states/setupCSSStates.ts'
|
|
5
|
+
import { setupComponents, setupVariants } from './tailwind-customizations/index.ts'
|
|
6
6
|
|
|
7
7
|
const gdsTailwindPlugin: ReturnType<typeof createPlugin> = createPlugin((api) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
setupComponents(api)
|
|
9
|
+
setupVariants(api)
|
|
10
|
+
setupCSSStates(api)
|
|
11
|
+
setupCSSProps(api)
|
|
12
12
|
})
|
|
13
13
|
|
|
14
14
|
export default gdsTailwindPlugin
|
package/src/utils/cssUnescape.ts
CHANGED
|
@@ -9,9 +9,11 @@
|
|
|
9
9
|
*
|
|
10
10
|
* @example
|
|
11
11
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
12
|
+
* ```ts
|
|
13
|
+
* cssUnescape('foo\.bar') // 'foo.bar'
|
|
14
|
+
* cssUnescape('hello\20world') // 'hello world'
|
|
15
|
+
* cssUnescape('test\2d case') // 'test-case'
|
|
16
|
+
* ```
|
|
15
17
|
*
|
|
16
18
|
* @param input - The CSS-escaped string to unescape.
|
|
17
19
|
* @returns The unescaped string.
|
package/styles/global.css
CHANGED
|
@@ -82,7 +82,8 @@
|
|
|
82
82
|
/* Default clickable styles */
|
|
83
83
|
* {
|
|
84
84
|
/* Turn the cursor into a pointer when hovering clickable elements (except checked radio buttons) */
|
|
85
|
-
@apply clickable:
|
|
85
|
+
@apply clickable:cursor-pointer;
|
|
86
|
+
@apply clickable:[[role=radio][aria-checked=true],.gds-checkable-label:has(input[type=radio]:checked)]:cursor-default;
|
|
86
87
|
/* Remove the text cursor of disabled links */
|
|
87
88
|
@apply clickable-disabled:cursor-default;
|
|
88
89
|
/* Set some custom properties to detect the state of the nearest clickable */
|
|
@@ -148,7 +149,7 @@
|
|
|
148
149
|
* `max-width: 100%`, since it allows resizing images/videos that have `width` and `height` HTML attributes just by
|
|
149
150
|
* changing their width in CSS without distorting their aspect ratio. For some reason however, Preflight doesn't apply
|
|
150
151
|
* the same to SVGs even though they also accept `width` and `height` attributes and have an intrinsic aspect ratio.
|
|
151
|
-
* So we add it here.
|
|
152
|
+
* So we add it here.
|
|
152
153
|
*/
|
|
153
154
|
svg {
|
|
154
155
|
@apply h-auto;
|
|
@@ -168,7 +169,7 @@
|
|
|
168
169
|
::file-selector-button,
|
|
169
170
|
label {
|
|
170
171
|
@apply block; /* We almost never want inline form elements, including labels */
|
|
171
|
-
|
|
172
|
+
word-spacing: inherit;
|
|
172
173
|
text-align: inherit;
|
|
173
174
|
text-transform: inherit;
|
|
174
175
|
}
|
package/styles/theme.css
CHANGED
|
@@ -145,6 +145,8 @@
|
|
|
145
145
|
--background-color-elevated: light-dark(var(--color-foam-400), var(--color-space-1400));
|
|
146
146
|
--background-color-strong: light-dark(var(--color-foam-500), var(--color-space-1300));
|
|
147
147
|
|
|
148
|
+
--background-color-brand-subtlest: light-dark(var(--color-brand-100), var(--color-brand-1100));
|
|
149
|
+
--background-color-brand-subtler: light-dark(var(--color-brand-200), var(--color-brand-1000));
|
|
148
150
|
--background-color-brand-subtle: light-dark(var(--color-brand-300), var(--color-brand-800));
|
|
149
151
|
--background-color-brand-muted: light-dark(var(--color-brand-400), var(--color-brand-700));
|
|
150
152
|
--background-color-brand-default: var(--color-brand-500);
|
|
@@ -175,6 +177,8 @@
|
|
|
175
177
|
--border-color-elevated: light-dark(var(--color-foam-800), var(--color-space-1200));
|
|
176
178
|
--border-color-strong: light-dark(var(--color-foam-1000), var(--color-space-1100));
|
|
177
179
|
|
|
180
|
+
--border-color-brand-subtlest: light-dark(var(--color-brand-100), var(--color-brand-1100));
|
|
181
|
+
--border-color-brand-subtler: light-dark(var(--color-brand-200), var(--color-brand-1000));
|
|
178
182
|
--border-color-brand-subtle: light-dark(var(--color-brand-300), var(--color-brand-800));
|
|
179
183
|
--border-color-brand-muted: light-dark(var(--color-brand-400), var(--color-brand-700));
|
|
180
184
|
--border-color-brand-default: var(--color-brand-500);
|
|
@@ -235,10 +239,10 @@
|
|
|
235
239
|
--background-color-button-secondary-hover: var(--background-color-elevated);
|
|
236
240
|
--background-color-button-secondary-active: var(--background-color-muted);
|
|
237
241
|
--background-color-button-secondary-disabled: var(--background-color-default);
|
|
238
|
-
--background-color-button-secondary-toggled-idle:
|
|
239
|
-
--background-color-button-secondary-toggled-hover:
|
|
240
|
-
--background-color-button-secondary-toggled-active:
|
|
241
|
-
--background-color-button-secondary-toggled-disabled:
|
|
242
|
+
--background-color-button-secondary-toggled-idle: var(--background-color-brand-subtlest);
|
|
243
|
+
--background-color-button-secondary-toggled-hover: var(--background-color-brand-subtler);
|
|
244
|
+
--background-color-button-secondary-toggled-active: var(--background-color-brand-subtlest);
|
|
245
|
+
--background-color-button-secondary-toggled-disabled: var(--background-color-brand-subtlest);
|
|
242
246
|
|
|
243
247
|
--background-color-button-tertiary-idle: var(--color-transparent);
|
|
244
248
|
--background-color-button-tertiary-hover: var(--background-color-elevated);
|
|
@@ -303,7 +307,7 @@
|
|
|
303
307
|
--background-color-form-checked-idle: var(--background-color-brand-default);
|
|
304
308
|
--background-color-form-checked-hover: var(--background-color-brand-elevated);
|
|
305
309
|
--background-color-form-checked-active: light-dark(var(--color-brand-300), var(--color-brand-1100));
|
|
306
|
-
--background-color-form-checked-disabled:
|
|
310
|
+
--background-color-form-checked-disabled: var(--background-color-brand-subtler);
|
|
307
311
|
|
|
308
312
|
/* Form handle colors */
|
|
309
313
|
--background-color-form-handle-default: light-dark(var(--color-space-1000), var(--color-white));
|
|
@@ -332,10 +336,10 @@
|
|
|
332
336
|
--border-color-form-status-success-focus: var(--color-status-success-muted);
|
|
333
337
|
|
|
334
338
|
/* Card bg colors */
|
|
335
|
-
--background-color-card-primary-idle:
|
|
336
|
-
--background-color-card-primary-hover:
|
|
337
|
-
--background-color-card-primary-active:
|
|
338
|
-
--background-color-card-primary-disabled:
|
|
339
|
+
--background-color-card-primary-idle: var(--background-color-brand-subtlest);
|
|
340
|
+
--background-color-card-primary-hover: var(--background-color-brand-subtler);
|
|
341
|
+
--background-color-card-primary-active: var(--background-color-brand-subtlest);
|
|
342
|
+
--background-color-card-primary-disabled: var(--background-color-brand-subtlest);
|
|
339
343
|
|
|
340
344
|
--background-color-card-secondary-idle: var(--background-color-muted);
|
|
341
345
|
--background-color-card-secondary-hover: var(--background-color-default);
|
|
@@ -348,9 +352,9 @@
|
|
|
348
352
|
--background-color-card-tertiary-disabled: var(--color-transparent);
|
|
349
353
|
|
|
350
354
|
/* Card border colors */
|
|
351
|
-
--border-color-card-primary-idle:
|
|
352
|
-
--border-color-card-primary-hover:
|
|
353
|
-
--border-color-card-primary-active:
|
|
355
|
+
--border-color-card-primary-idle: var(--border-color-brand-subtle);
|
|
356
|
+
--border-color-card-primary-hover: var(--border-color-brand-muted);
|
|
357
|
+
--border-color-card-primary-active: var(--border-color-brand-subtle);
|
|
354
358
|
--border-color-card-primary-disabled: var(--color-transparent);
|
|
355
359
|
|
|
356
360
|
--border-color-card-secondary-idle: var(--border-color-muted);
|
package/styles/typography.css
CHANGED
|
@@ -74,18 +74,6 @@
|
|
|
74
74
|
--tracking-caption: 0.15em;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
/* Redefine the `normal` and `loose` leadings for every font size utility */
|
|
78
|
-
@utility text-* {
|
|
79
|
-
--gds-font-size: --value(--text-*, [length]);
|
|
80
|
-
--leading-normal: --value(--text-* --line-height);
|
|
81
|
-
--leading-loose: --value(--text-* --line-height--loose);
|
|
82
|
-
/**
|
|
83
|
-
* Ensure changing the font size without specifying a leading uses the last specified one.
|
|
84
|
-
* This makes `prose text-16` work without `text-16` overriding the `loose` leading from `prose`.
|
|
85
|
-
*/
|
|
86
|
-
--tw-leading: --modifier(--leading-*);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
77
|
/* Redefine the `lighter` and `bolder` font weights for every font weight utility */
|
|
90
78
|
@utility font-* {
|
|
91
79
|
--gds-font-weight: --value(--font-weight-*, [integer], [weight]);
|
|
@@ -111,6 +99,31 @@
|
|
|
111
99
|
}
|
|
112
100
|
}
|
|
113
101
|
|
|
102
|
+
/* Redefine the `normal` and `loose` leadings for every font size utility */
|
|
103
|
+
@utility text-* {
|
|
104
|
+
--gds-font-size: --value(--text-*, [length]);
|
|
105
|
+
--leading-normal: --value(--text-* --line-height);
|
|
106
|
+
--leading-loose: --value(--text-* --line-height--loose);
|
|
107
|
+
/**
|
|
108
|
+
* Ensure changing the font size without specifying a leading uses the last specified one.
|
|
109
|
+
* This makes `prose text-16` work without `text-16` overriding the `loose` leading from `prose`.
|
|
110
|
+
*/
|
|
111
|
+
--tw-leading: --modifier(--leading-*);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Add a `text-size-inherit` utility to reset the font size to inherit (`text-inherit` already
|
|
116
|
+
* exists by default, and it resets the color).
|
|
117
|
+
*/
|
|
118
|
+
@utility text-size-inherit {
|
|
119
|
+
font-size: inherit;
|
|
120
|
+
line-height: inherit;
|
|
121
|
+
--gds-font-size: inherit;
|
|
122
|
+
--leading-normal: inherit;
|
|
123
|
+
--leading-loose: inherit;
|
|
124
|
+
--tw-leading: inherit;
|
|
125
|
+
}
|
|
126
|
+
|
|
114
127
|
/**
|
|
115
128
|
* Extend the default `italic` and `not-italic` utilities to work around Safari rendering issues.
|
|
116
129
|
* Safari needs manual `slnt` and `ital` axis settings to properly render a variable font in italic.
|
|
@@ -125,12 +138,12 @@
|
|
|
125
138
|
font-variation-settings: initial;
|
|
126
139
|
}
|
|
127
140
|
|
|
128
|
-
/*
|
|
141
|
+
/* Helper utility to apply the "caption" text style (all caps with letter spacing) */
|
|
129
142
|
@utility text-caption {
|
|
130
143
|
@apply tracking-caption uppercase;
|
|
131
144
|
}
|
|
132
145
|
|
|
133
|
-
/*
|
|
146
|
+
/* Component class to style long-form content with basic spacing and typography defaults */
|
|
134
147
|
@layer base.components {
|
|
135
148
|
.prose {
|
|
136
149
|
@apply text-18/loose text-muted;
|
package/styles/utilities.css
CHANGED
|
@@ -54,6 +54,15 @@
|
|
|
54
54
|
display: var(--gds-display-none, var(--gds-display-outside) var(--gds-display-inside));
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
+
@utility root-contents {
|
|
58
|
+
@variant u {
|
|
59
|
+
--gds-display-outside: block;
|
|
60
|
+
--gds-display-none: initial;
|
|
61
|
+
}
|
|
62
|
+
@variant i {
|
|
63
|
+
display: var(--gds-display-none, contents);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
57
66
|
|
|
58
67
|
/**
|
|
59
68
|
* Extend the display utilities to support the `root-{display}` utilities.
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { PluginAPI } from '../types.ts';
|
|
2
|
-
/**
|
|
3
|
-
* Registers CSS Props functionality in the Tailwind plugin. This includes custom properties,
|
|
4
|
-
* utilities, and variants for prop-based styling.
|
|
5
|
-
*/
|
|
6
|
-
export declare function registerCSSProps(api: PluginAPI): void;
|
|
7
|
-
//# sourceMappingURL=registerCSSProps.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"registerCSSProps.d.ts","sourceRoot":"","sources":["../../src/css-props/registerCSSProps.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAI5C;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,SAAS,QAgQ9C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"registerCSSProps.js","sourceRoot":"","sources":["../../src/css-props/registerCSSProps.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAA;AAE3B,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AAEtD,OAAO,EACL,sBAAsB,EACtB,uBAAuB,GAExB,MAAM,0BAA0B,CAAA;AAEjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAG5D;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,GAAc;IAC7C,MAAM,mBAAmB,GAAG,uBAAuB,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,SAAS,EAAE,EAAE;QACvF,KAAK,MAAM,OAAO,IAAI,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC;YACxD,MAAM,QAAQ,GACZ,QAAQ,CAAC,GAAG,CAAC,OA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