@jiwambe/components 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/LICENSE +21 -0
- package/README.md +367 -0
- package/dist/client.d.ts +40 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +46 -0
- package/dist/client.js.map +1 -0
- package/dist/components/Accordion/Accordion.d.ts +74 -0
- package/dist/components/Accordion/Accordion.d.ts.map +1 -0
- package/dist/components/Accordion/Accordion.js +297 -0
- package/dist/components/Accordion/Accordion.js.map +1 -0
- package/dist/components/Box/Box.d.ts +56 -0
- package/dist/components/Box/Box.d.ts.map +1 -0
- package/dist/components/Box/Box.js +51 -0
- package/dist/components/Box/Box.js.map +1 -0
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +66 -0
- package/dist/components/Breadcrumb/Breadcrumb.d.ts.map +1 -0
- package/dist/components/Button/Button.d.ts +54 -0
- package/dist/components/Button/Button.d.ts.map +1 -0
- package/dist/components/Button/Button.js +92 -0
- package/dist/components/Button/Button.js.map +1 -0
- package/dist/components/Card/Card.d.ts +54 -0
- package/dist/components/Card/Card.d.ts.map +1 -0
- package/dist/components/Card/Card.js +98 -0
- package/dist/components/Card/Card.js.map +1 -0
- package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +61 -0
- package/dist/components/CheckboxGroup/CheckboxGroup.d.ts.map +1 -0
- package/dist/components/CheckboxGroup/CheckboxGroup.js +205 -0
- package/dist/components/CheckboxGroup/CheckboxGroup.js.map +1 -0
- package/dist/components/Container/Container.d.ts +72 -0
- package/dist/components/Container/Container.d.ts.map +1 -0
- package/dist/components/Container/Container.js +69 -0
- package/dist/components/Container/Container.js.map +1 -0
- package/dist/components/DateInput/DateInput.d.ts +61 -0
- package/dist/components/DateInput/DateInput.d.ts.map +1 -0
- package/dist/components/DateInput/DateInput.js +234 -0
- package/dist/components/DateInput/DateInput.js.map +1 -0
- package/dist/components/Divider/Divider.d.ts +44 -0
- package/dist/components/Divider/Divider.d.ts.map +1 -0
- package/dist/components/Divider/Divider.js +35 -0
- package/dist/components/Divider/Divider.js.map +1 -0
- package/dist/components/Drawer/Drawer.d.ts +35 -0
- package/dist/components/Drawer/Drawer.d.ts.map +1 -0
- package/dist/components/Drawer/Drawer.js +37 -0
- package/dist/components/Drawer/Drawer.js.map +1 -0
- package/dist/components/FAQ/FAQ.d.ts +40 -0
- package/dist/components/FAQ/FAQ.d.ts.map +1 -0
- package/dist/components/FAQ/FAQ.js +161 -0
- package/dist/components/FAQ/FAQ.js.map +1 -0
- package/dist/components/Grid/Grid.d.ts +61 -0
- package/dist/components/Grid/Grid.d.ts.map +1 -0
- package/dist/components/Grid/Grid.js +95 -0
- package/dist/components/Grid/Grid.js.map +1 -0
- package/dist/components/Icon/Icon.d.ts +21 -0
- package/dist/components/Icon/Icon.d.ts.map +1 -0
- package/dist/components/Icon/Icon.js +167 -0
- package/dist/components/Icon/Icon.js.map +1 -0
- package/dist/components/Link/Link.d.ts +49 -0
- package/dist/components/Link/Link.d.ts.map +1 -0
- package/dist/components/Link/Link.js +70 -0
- package/dist/components/Link/Link.js.map +1 -0
- package/dist/components/List/List.d.ts +36 -0
- package/dist/components/List/List.d.ts.map +1 -0
- package/dist/components/List/List.js +42 -0
- package/dist/components/List/List.js.map +1 -0
- package/dist/components/List/index.d.ts +3 -0
- package/dist/components/List/index.d.ts.map +1 -0
- package/dist/components/Overlay/Overlay.d.ts +35 -0
- package/dist/components/Overlay/Overlay.d.ts.map +1 -0
- package/dist/components/Overlay/Overlay.js +51 -0
- package/dist/components/Overlay/Overlay.js.map +1 -0
- package/dist/components/PhoneInput/PhoneInput.d.ts +55 -0
- package/dist/components/PhoneInput/PhoneInput.d.ts.map +1 -0
- package/dist/components/PhoneInput/PhoneInput.js +255 -0
- package/dist/components/PhoneInput/PhoneInput.js.map +1 -0
- package/dist/components/Popover/Popover.d.ts +46 -0
- package/dist/components/Popover/Popover.d.ts.map +1 -0
- package/dist/components/Popover/Popover.js +57 -0
- package/dist/components/Popover/Popover.js.map +1 -0
- package/dist/components/ProductImage/ProductImage.d.ts +78 -0
- package/dist/components/ProductImage/ProductImage.d.ts.map +1 -0
- package/dist/components/ProductImage/ProductImage.js +220 -0
- package/dist/components/ProductImage/ProductImage.js.map +1 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts +63 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts.map +1 -0
- package/dist/components/RadioGroup/RadioGroup.js +233 -0
- package/dist/components/RadioGroup/RadioGroup.js.map +1 -0
- package/dist/components/Section/Section.d.ts +44 -0
- package/dist/components/Section/Section.d.ts.map +1 -0
- package/dist/components/Section/Section.js +48 -0
- package/dist/components/Section/Section.js.map +1 -0
- package/dist/components/Select/Select.d.ts +47 -0
- package/dist/components/Select/Select.d.ts.map +1 -0
- package/dist/components/Select/Select.js +153 -0
- package/dist/components/Select/Select.js.map +1 -0
- package/dist/components/SelectTab/SelectTab.d.ts +62 -0
- package/dist/components/SelectTab/SelectTab.d.ts.map +1 -0
- package/dist/components/SelectTab/SelectTab.js +192 -0
- package/dist/components/SelectTab/SelectTab.js.map +1 -0
- package/dist/components/Skeleton/Skeleton.d.ts +87 -0
- package/dist/components/Skeleton/Skeleton.d.ts.map +1 -0
- package/dist/components/Skeleton/Skeleton.js +97 -0
- package/dist/components/Skeleton/Skeleton.js.map +1 -0
- package/dist/components/Skeleton/index.d.ts +3 -0
- package/dist/components/Skeleton/index.d.ts.map +1 -0
- package/dist/components/Slider/Slider.d.ts +47 -0
- package/dist/components/Slider/Slider.d.ts.map +1 -0
- package/dist/components/Slider/Slider.js +147 -0
- package/dist/components/Slider/Slider.js.map +1 -0
- package/dist/components/Stack/Stack.d.ts +145 -0
- package/dist/components/Stack/Stack.d.ts.map +1 -0
- package/dist/components/Stack/Stack.js +80 -0
- package/dist/components/Stack/Stack.js.map +1 -0
- package/dist/components/Tab/Tab.d.ts +38 -0
- package/dist/components/Tab/Tab.d.ts.map +1 -0
- package/dist/components/Tab/Tab.js +146 -0
- package/dist/components/Tab/Tab.js.map +1 -0
- package/dist/components/TextArea/TextArea.d.ts +32 -0
- package/dist/components/TextArea/TextArea.d.ts.map +1 -0
- package/dist/components/TextArea/TextArea.js +118 -0
- package/dist/components/TextArea/TextArea.js.map +1 -0
- package/dist/components/TextInput/TextInput.d.ts +35 -0
- package/dist/components/TextInput/TextInput.d.ts.map +1 -0
- package/dist/components/TextInput/TextInput.js +128 -0
- package/dist/components/TextInput/TextInput.js.map +1 -0
- package/dist/components/Toggle/Toggle.d.ts +83 -0
- package/dist/components/Toggle/Toggle.d.ts.map +1 -0
- package/dist/components/Toggle/Toggle.js +121 -0
- package/dist/components/Toggle/Toggle.js.map +1 -0
- package/dist/components/Typography/Typography.d.ts +321 -0
- package/dist/components/Typography/Typography.d.ts.map +1 -0
- package/dist/components/Typography/Typography.js +21 -0
- package/dist/components/Typography/Typography.js.map +1 -0
- package/dist/components/UploadInput/UploadInput.d.ts +39 -0
- package/dist/components/UploadInput/UploadInput.d.ts.map +1 -0
- package/dist/components/UploadInput/UploadInput.js +297 -0
- package/dist/components/UploadInput/UploadInput.js.map +1 -0
- package/dist/components/index.d.ts +65 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +69 -0
- package/dist/index.js.map +1 -0
- package/dist/plugin/jiwambe-plugin.d.ts +37 -0
- package/dist/plugin/jiwambe-plugin.d.ts.map +1 -0
- package/dist/plugin/jiwambe-plugin.js +640 -0
- package/dist/plugin/jiwambe-plugin.js.map +1 -0
- package/dist/server.d.ts +22 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +23 -0
- package/dist/server.js.map +1 -0
- package/dist/types/index.d.ts +103 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/layout.d.ts +138 -0
- package/dist/types/layout.d.ts.map +1 -0
- package/dist/types/list.d.ts +69 -0
- package/dist/types/list.d.ts.map +1 -0
- package/dist/types/list.js +9 -0
- package/dist/types/list.js.map +1 -0
- package/dist/types/skeleton.d.ts +38 -0
- package/dist/types/skeleton.d.ts.map +1 -0
- package/dist/types/skeleton.js +13 -0
- package/dist/types/skeleton.js.map +1 -0
- package/dist/types/spacing.d.ts +105 -0
- package/dist/types/spacing.d.ts.map +1 -0
- package/dist/utils/layoutClasses.d.ts +44 -0
- package/dist/utils/layoutClasses.d.ts.map +1 -0
- package/dist/utils/layoutClasses.js +88 -0
- package/dist/utils/layoutClasses.js.map +1 -0
- package/dist/utils/responsive-props.d.ts +60 -0
- package/dist/utils/responsive-props.d.ts.map +1 -0
- package/dist/utils/responsive-props.js +184 -0
- package/dist/utils/responsive-props.js.map +1 -0
- package/dist/utils/spacing.d.ts +52 -0
- package/dist/utils/spacing.d.ts.map +1 -0
- package/dist/utils/spacing.js +625 -0
- package/dist/utils/spacing.js.map +1 -0
- package/package.json +96 -0
- package/tailwind.preset.d.ts +3 -0
- package/tailwind.preset.ts +21 -0
|
@@ -0,0 +1,640 @@
|
|
|
1
|
+
import plugin from "tailwindcss/plugin";
|
|
2
|
+
const baseColors = {
|
|
3
|
+
// Neutral
|
|
4
|
+
"neutral-0": "#FFFFFF",
|
|
5
|
+
"neutral-25": "#FAFBFB",
|
|
6
|
+
"neutral-50": "#F5F6F6",
|
|
7
|
+
"neutral-100": "#E5E8E7",
|
|
8
|
+
"neutral-150": "#DADEDC",
|
|
9
|
+
"neutral-200": "#CED3D2",
|
|
10
|
+
"neutral-250": "#BDC4C3",
|
|
11
|
+
"neutral-300": "#ABB5B3",
|
|
12
|
+
"neutral-350": "#97A2A0",
|
|
13
|
+
"neutral-400": "#828E8C",
|
|
14
|
+
"neutral-450": "#74817F",
|
|
15
|
+
"neutral-500": "#667472",
|
|
16
|
+
"neutral-600": "#586261",
|
|
17
|
+
"neutral-700": "#4B5353",
|
|
18
|
+
"neutral-800": "#424847",
|
|
19
|
+
"neutral-850": "#393F3E",
|
|
20
|
+
"neutral-900": "#303635",
|
|
21
|
+
"neutral-950": "#181B1B",
|
|
22
|
+
"neutral-950--t75": "rgba(24, 27, 27, 0.75)",
|
|
23
|
+
"neutral-950--t50": "rgba(24, 27, 27, 0.50)",
|
|
24
|
+
"neutral-950--t25": "rgba(24, 27, 27, 0.25)",
|
|
25
|
+
"neutral-950--t10": "rgba(24, 27, 27, 0.10)",
|
|
26
|
+
// Green
|
|
27
|
+
"green-50": "#ECF9F3",
|
|
28
|
+
"green-100": "#D9F2E7",
|
|
29
|
+
"green-150": "#C7ECDE",
|
|
30
|
+
"green-200": "#B4E6D4",
|
|
31
|
+
"green-250": "#9ADEC8",
|
|
32
|
+
"green-300": "#80D5BB",
|
|
33
|
+
"green-350": "#64C9AB",
|
|
34
|
+
"green-400": "#4DC2A3",
|
|
35
|
+
"green-450": "#33B897",
|
|
36
|
+
"green-500": "#19AE8A",
|
|
37
|
+
"green-600": "#109274",
|
|
38
|
+
"green-700": "#0D755F",
|
|
39
|
+
"green-800": "#0B6556",
|
|
40
|
+
"green-850": "#065E4F",
|
|
41
|
+
"green-900": "#005748",
|
|
42
|
+
"green-950": "#00332A",
|
|
43
|
+
"green-950--t75": "rgba(0, 51, 42, 0.75)",
|
|
44
|
+
"green-950--t50": "rgba(0, 51, 42, 0.50)",
|
|
45
|
+
"green-950--t25": "rgba(0, 51, 42, 0.25)",
|
|
46
|
+
"green-950--t10": "rgba(0, 51, 42, 0.10)",
|
|
47
|
+
// Red
|
|
48
|
+
"red-50": "#FEF3F1",
|
|
49
|
+
"red-100": "#FCE6E3",
|
|
50
|
+
"red-150": "#FAD5D1",
|
|
51
|
+
"red-200": "#F8C4BF",
|
|
52
|
+
"red-250": "#F9ADA5",
|
|
53
|
+
"red-300": "#F9958B",
|
|
54
|
+
"red-400": "#F67265",
|
|
55
|
+
"red-500": "#F34F3F",
|
|
56
|
+
"red-600": "#E52B19",
|
|
57
|
+
"red-700": "#CF2717",
|
|
58
|
+
"red-800": "#93251A",
|
|
59
|
+
"red-850": "#791F16",
|
|
60
|
+
"red-900": "#5F1811",
|
|
61
|
+
"red-950": "#340D09",
|
|
62
|
+
"red-950--t75": "rgba(52, 13, 9, 0.75)",
|
|
63
|
+
"red-950--t50": "rgba(52, 13, 9, 0.50)",
|
|
64
|
+
"red-950--t25": "rgba(52, 13, 9, 0.25)",
|
|
65
|
+
"red-950--t10": "rgba(52, 13, 9, 0.10)",
|
|
66
|
+
// Yellow
|
|
67
|
+
"yellow-50": "#FEFCF1",
|
|
68
|
+
"yellow-100": "#FCF8E3",
|
|
69
|
+
"yellow-150": "#FAF4D1",
|
|
70
|
+
"yellow-200": "#F8EFBF",
|
|
71
|
+
"yellow-250": "#F9EBA5",
|
|
72
|
+
"yellow-300": "#F9E68B",
|
|
73
|
+
"yellow-350": "#F8E278",
|
|
74
|
+
"yellow-400": "#F7DE64",
|
|
75
|
+
"yellow-500": "#F3D53F",
|
|
76
|
+
"yellow-600": "#EBC714",
|
|
77
|
+
"yellow-700": "#BC8E10",
|
|
78
|
+
"yellow-800": "#826217",
|
|
79
|
+
"yellow-850": "#6D5213",
|
|
80
|
+
"yellow-900": "#57410F",
|
|
81
|
+
"yellow-950": "#2B2108",
|
|
82
|
+
"yellow-950--t75": "rgba(43, 33, 8, 0.75)",
|
|
83
|
+
"yellow-950--t50": "rgba(43, 33, 8, 0.50)",
|
|
84
|
+
"yellow-950--t25": "rgba(43, 33, 8, 0.25)",
|
|
85
|
+
"yellow-950--t10": "rgba(43, 33, 8, 0.10)"
|
|
86
|
+
};
|
|
87
|
+
function resolve(ref, opacity) {
|
|
88
|
+
const hex = baseColors[ref];
|
|
89
|
+
if (!hex) return ref;
|
|
90
|
+
if (opacity === void 0 || opacity === 100) return hex;
|
|
91
|
+
const r = parseInt(hex.slice(1, 3), 16);
|
|
92
|
+
const g = parseInt(hex.slice(3, 5), 16);
|
|
93
|
+
const b = parseInt(hex.slice(5, 7), 16);
|
|
94
|
+
return `rgba(${r}, ${g}, ${b}, ${(opacity / 100).toFixed(2)})`;
|
|
95
|
+
}
|
|
96
|
+
function defaultSemanticColors() {
|
|
97
|
+
return {
|
|
98
|
+
// Text
|
|
99
|
+
"text-primary": resolve("neutral-950"),
|
|
100
|
+
"text-secondary": resolve("neutral-950", 75),
|
|
101
|
+
"text-disabled": resolve("neutral-950", 50),
|
|
102
|
+
"text-primary-inverse": resolve("neutral-0"),
|
|
103
|
+
"text-secondary-inverse": resolve("neutral-0", 75),
|
|
104
|
+
"text-inverse-disabled": resolve("neutral-0", 50),
|
|
105
|
+
"text-action-primary": resolve("neutral-0"),
|
|
106
|
+
"text-action-primary-disabled": resolve("neutral-0", 50),
|
|
107
|
+
"text-action-secondary": resolve("neutral-950"),
|
|
108
|
+
"text-action-secondary-disabled": resolve("neutral-950", 50),
|
|
109
|
+
"text-action-tertiary": resolve("neutral-0"),
|
|
110
|
+
"text-action-tertiary-hover": resolve("neutral-0", 75),
|
|
111
|
+
"text-action-tertiary-disabled": resolve("neutral-0", 50),
|
|
112
|
+
"text-err": resolve("red-950"),
|
|
113
|
+
"text-err-disabled": resolve("red-950", 50),
|
|
114
|
+
// Link
|
|
115
|
+
"link-primary": resolve("green-900"),
|
|
116
|
+
"link-primary-hover": resolve("green-950", 75),
|
|
117
|
+
"link-primary-disabled": resolve("green-950", 50),
|
|
118
|
+
"link-secondary": resolve("neutral-950"),
|
|
119
|
+
"link-secondary-hover": resolve("neutral-950", 75),
|
|
120
|
+
"link-secondary-disabled": resolve("neutral-950", 50),
|
|
121
|
+
"link-tertiary": resolve("neutral-950", 50),
|
|
122
|
+
"link-tertiary-hover": resolve("neutral-950", 25),
|
|
123
|
+
"link-tertiary-disabled": resolve("neutral-950", 25),
|
|
124
|
+
"link-inverse": resolve("neutral-0"),
|
|
125
|
+
"link-inverse-hover": resolve("neutral-0", 75),
|
|
126
|
+
"link-inverse-disabled": resolve("neutral-0", 50),
|
|
127
|
+
// Background fills
|
|
128
|
+
"fill-bg-primary": resolve("neutral-0"),
|
|
129
|
+
"fill-bg-secondary": resolve("neutral-50"),
|
|
130
|
+
"fill-bg-tertiary": resolve("green-900"),
|
|
131
|
+
"fill-bg-err": resolve("red-100"),
|
|
132
|
+
"fill-bg-info": resolve("neutral-0"),
|
|
133
|
+
"fill-bg-dimmer": resolve("neutral-950", 75),
|
|
134
|
+
// Action fills
|
|
135
|
+
"fill-action-primary": resolve("green-900"),
|
|
136
|
+
"fill-action-primary-hover": resolve("green-950"),
|
|
137
|
+
"fill-action-primary-active": resolve("green-950"),
|
|
138
|
+
"fill-action-primary-focus": resolve("green-900"),
|
|
139
|
+
"fill-action-primary-selected": resolve("green-900"),
|
|
140
|
+
"fill-action-primary-disabled": resolve("green-900"),
|
|
141
|
+
"fill-action-secondary": resolve("neutral-100"),
|
|
142
|
+
"fill-action-secondary-hover": resolve("neutral-200"),
|
|
143
|
+
"fill-action-secondary-active": resolve("neutral-200"),
|
|
144
|
+
"fill-action-secondary-focus": resolve("neutral-100"),
|
|
145
|
+
"fill-action-secondary-selected": resolve("neutral-100"),
|
|
146
|
+
"fill-action-secondary-disabled": resolve("neutral-100"),
|
|
147
|
+
"fill-action-inverse": resolve("neutral-0"),
|
|
148
|
+
"fill-action-inverse-hover": resolve("neutral-0", 90),
|
|
149
|
+
"fill-action-inverse-active": resolve("neutral-0", 90),
|
|
150
|
+
"fill-action-inverse-focus": resolve("neutral-0"),
|
|
151
|
+
"fill-action-inverse-selected": resolve("neutral-0"),
|
|
152
|
+
"fill-action-inverse-disabled": resolve("neutral-0"),
|
|
153
|
+
"fill-action-ghost": resolve("neutral-0", 0),
|
|
154
|
+
"fill-action-ghost-hover": resolve("neutral-0", 10),
|
|
155
|
+
"fill-action-ghost-active": resolve("neutral-0", 10),
|
|
156
|
+
"fill-action-ghost-focus": resolve("neutral-0", 0),
|
|
157
|
+
"fill-action-ghost-selected": resolve("neutral-0", 0),
|
|
158
|
+
"fill-action-ghost-disabled": resolve("neutral-0", 0),
|
|
159
|
+
// Form fills
|
|
160
|
+
"fill-form-primary": resolve("neutral-0"),
|
|
161
|
+
"fill-form-primary-hover": resolve("neutral-0"),
|
|
162
|
+
"fill-form-primary-active": resolve("neutral-0"),
|
|
163
|
+
"fill-form-primary-focus": resolve("neutral-0"),
|
|
164
|
+
"fill-form-primary-selected": resolve("neutral-0"),
|
|
165
|
+
"fill-form-primary-disabled": resolve("neutral-0"),
|
|
166
|
+
// Borders
|
|
167
|
+
"border-light": resolve("neutral-100"),
|
|
168
|
+
"border-heavy": resolve("neutral-200"),
|
|
169
|
+
"border-inverse": resolve("neutral-0"),
|
|
170
|
+
"border-focus": resolve("green-900"),
|
|
171
|
+
"border-err": resolve("red-800"),
|
|
172
|
+
// Form borders
|
|
173
|
+
"border-form-primary": resolve("neutral-300"),
|
|
174
|
+
"border-form-primary-hover": resolve("neutral-600"),
|
|
175
|
+
"border-form-primary-active": resolve("green-900"),
|
|
176
|
+
"border-form-primary-focus": resolve("green-900"),
|
|
177
|
+
"border-form-primary-selected": resolve("green-900"),
|
|
178
|
+
"border-form-primary-disabled": resolve("neutral-200"),
|
|
179
|
+
// Icons
|
|
180
|
+
"icon-primary": resolve("neutral-950"),
|
|
181
|
+
"icon-primary-disabled": resolve("neutral-950", 50),
|
|
182
|
+
"icon-inverse": resolve("neutral-0"),
|
|
183
|
+
"icon-inverse-disabled": resolve("neutral-0", 50),
|
|
184
|
+
"icon-err": resolve("red-950"),
|
|
185
|
+
"icon-err-disabled": resolve("red-950", 50)
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
const fontFamilyPrimary = '"Instrument Sans", sans-serif';
|
|
189
|
+
const fontFamilySecondary = '"Inter", sans-serif';
|
|
190
|
+
const typographyTokens = {
|
|
191
|
+
"title-sm": {
|
|
192
|
+
fontFamily: fontFamilyPrimary,
|
|
193
|
+
fontSize: "1.0625rem",
|
|
194
|
+
fontWeight: "600",
|
|
195
|
+
lineHeight: "1.2",
|
|
196
|
+
letterSpacing: "-0.005em",
|
|
197
|
+
textWrap: "balance"
|
|
198
|
+
},
|
|
199
|
+
"title-md": {
|
|
200
|
+
fontFamily: fontFamilyPrimary,
|
|
201
|
+
fontSize: "1.1875rem",
|
|
202
|
+
fontWeight: "600",
|
|
203
|
+
lineHeight: "1.2",
|
|
204
|
+
letterSpacing: "0.02em",
|
|
205
|
+
textWrap: "balance"
|
|
206
|
+
},
|
|
207
|
+
"title-lg": {
|
|
208
|
+
fontFamily: fontFamilyPrimary,
|
|
209
|
+
fontSize: "clamp(1.5625rem, 1.4375rem + 0.625vw, 2rem)",
|
|
210
|
+
fontWeight: "600",
|
|
211
|
+
lineHeight: "1.1",
|
|
212
|
+
letterSpacing: "-0.005em",
|
|
213
|
+
textWrap: "balance"
|
|
214
|
+
},
|
|
215
|
+
"title-xl": {
|
|
216
|
+
fontFamily: fontFamilyPrimary,
|
|
217
|
+
fontSize: "clamp(3rem, 2.7857rem + 1.0714vw, 3.75rem)",
|
|
218
|
+
fontWeight: "680",
|
|
219
|
+
lineHeight: "1.1",
|
|
220
|
+
letterSpacing: "-0.005em",
|
|
221
|
+
textWrap: "balance"
|
|
222
|
+
},
|
|
223
|
+
"text-xs": {
|
|
224
|
+
fontFamily: fontFamilySecondary,
|
|
225
|
+
fontSize: "0.75rem",
|
|
226
|
+
fontWeight: "400",
|
|
227
|
+
lineHeight: "1.4",
|
|
228
|
+
letterSpacing: "-0.005em",
|
|
229
|
+
textWrap: "pretty"
|
|
230
|
+
},
|
|
231
|
+
"text-xs-bold": {
|
|
232
|
+
fontFamily: fontFamilySecondary,
|
|
233
|
+
fontSize: "0.75rem",
|
|
234
|
+
fontWeight: "600",
|
|
235
|
+
lineHeight: "1.4",
|
|
236
|
+
letterSpacing: "-0.005em",
|
|
237
|
+
textWrap: "pretty"
|
|
238
|
+
},
|
|
239
|
+
"text-sm": {
|
|
240
|
+
fontFamily: fontFamilySecondary,
|
|
241
|
+
fontSize: "1rem",
|
|
242
|
+
fontWeight: "400",
|
|
243
|
+
lineHeight: "1.4",
|
|
244
|
+
textWrap: "pretty"
|
|
245
|
+
},
|
|
246
|
+
"text-sm-bold": {
|
|
247
|
+
fontFamily: fontFamilySecondary,
|
|
248
|
+
fontSize: "1rem",
|
|
249
|
+
fontWeight: "600",
|
|
250
|
+
lineHeight: "1.4",
|
|
251
|
+
textWrap: "pretty"
|
|
252
|
+
},
|
|
253
|
+
"text-md": {
|
|
254
|
+
fontFamily: fontFamilySecondary,
|
|
255
|
+
fontSize: "1.125rem",
|
|
256
|
+
fontWeight: "400",
|
|
257
|
+
lineHeight: "1.4",
|
|
258
|
+
textWrap: "pretty"
|
|
259
|
+
},
|
|
260
|
+
"text-md-bold": {
|
|
261
|
+
fontFamily: fontFamilySecondary,
|
|
262
|
+
fontSize: "1.125rem",
|
|
263
|
+
fontWeight: "600",
|
|
264
|
+
lineHeight: "1.4",
|
|
265
|
+
textWrap: "pretty"
|
|
266
|
+
},
|
|
267
|
+
"text-xl": {
|
|
268
|
+
fontFamily: fontFamilyPrimary,
|
|
269
|
+
fontSize: "clamp(3rem, 2.7857rem + 1.0714vw, 3.75rem)",
|
|
270
|
+
fontWeight: "680",
|
|
271
|
+
lineHeight: "1.1",
|
|
272
|
+
letterSpacing: "-0.005em",
|
|
273
|
+
textWrap: "pretty"
|
|
274
|
+
},
|
|
275
|
+
"form-text": {
|
|
276
|
+
fontFamily: fontFamilySecondary,
|
|
277
|
+
fontSize: "1.125rem",
|
|
278
|
+
fontWeight: "400",
|
|
279
|
+
lineHeight: "1.4",
|
|
280
|
+
textWrap: "pretty"
|
|
281
|
+
},
|
|
282
|
+
"form-label": {
|
|
283
|
+
fontFamily: fontFamilyPrimary,
|
|
284
|
+
fontSize: "1.1875rem",
|
|
285
|
+
fontWeight: "600",
|
|
286
|
+
lineHeight: "1.2",
|
|
287
|
+
letterSpacing: "-0.005em",
|
|
288
|
+
textWrap: "balance"
|
|
289
|
+
},
|
|
290
|
+
"btn-small": {
|
|
291
|
+
fontFamily: fontFamilySecondary,
|
|
292
|
+
fontSize: "1rem",
|
|
293
|
+
fontWeight: "500",
|
|
294
|
+
lineHeight: "1.4"
|
|
295
|
+
},
|
|
296
|
+
"btn-reg": {
|
|
297
|
+
fontFamily: fontFamilySecondary,
|
|
298
|
+
fontSize: "1.125rem",
|
|
299
|
+
fontWeight: "500",
|
|
300
|
+
lineHeight: "1.4"
|
|
301
|
+
},
|
|
302
|
+
"link-md": {
|
|
303
|
+
fontFamily: fontFamilyPrimary,
|
|
304
|
+
fontSize: "1.1875rem",
|
|
305
|
+
fontWeight: "600",
|
|
306
|
+
lineHeight: "1.2",
|
|
307
|
+
letterSpacing: "0.02em"
|
|
308
|
+
}
|
|
309
|
+
};
|
|
310
|
+
const spacingTokens = {
|
|
311
|
+
// Fixed
|
|
312
|
+
"space-0": "0rem",
|
|
313
|
+
"space-0-25": "0.0625rem",
|
|
314
|
+
"space-1": "0.25rem",
|
|
315
|
+
"space-2": "0.5rem",
|
|
316
|
+
"space-3": "0.75rem",
|
|
317
|
+
"space-4": "1rem",
|
|
318
|
+
"space-5": "1.25rem",
|
|
319
|
+
"space-6": "1.5rem",
|
|
320
|
+
"space-8": "2rem",
|
|
321
|
+
"space-9": "2.25rem",
|
|
322
|
+
"space-12": "3rem",
|
|
323
|
+
"space-16": "4rem",
|
|
324
|
+
"space-18": "4.5rem",
|
|
325
|
+
"space-24": "6rem",
|
|
326
|
+
"space-30": "7.5rem",
|
|
327
|
+
"space-36": "9rem",
|
|
328
|
+
"space-48": "12rem",
|
|
329
|
+
"space-72": "18rem",
|
|
330
|
+
// Fluid
|
|
331
|
+
"space-fluid-1-2": "clamp(0.25rem, 0.1706rem + 0.3968vw, 0.5rem)",
|
|
332
|
+
"space-fluid-2-4": "clamp(0.5rem, 0.3413rem + 0.7937vw, 1rem)",
|
|
333
|
+
"space-fluid-4-5": "clamp(1rem, 0.9206rem + 0.3968vw, 1.25rem)",
|
|
334
|
+
"space-fluid-4-6": "clamp(1rem, 0.8413rem + 0.7937vw, 1.5rem)",
|
|
335
|
+
"space-fluid-4-8": "clamp(1rem, 0.6825rem + 1.5873vw, 2rem)",
|
|
336
|
+
"space-fluid-4-9": "clamp(1rem, 0.6032rem + 1.9841vw, 2.25rem)",
|
|
337
|
+
"space-fluid-5-6": "clamp(1.25rem, 1.1706rem + 0.3968vw, 1.5rem)",
|
|
338
|
+
"space-fluid-6-9": "clamp(1.5rem, 1.2619rem + 1.1905vw, 2.25rem)",
|
|
339
|
+
"space-fluid-8-16": "clamp(2rem, 1.3651rem + 3.1746vw, 4rem)",
|
|
340
|
+
"space-fluid-16-18": "clamp(4rem, 3.8413rem + 0.7937vw, 4.5rem)",
|
|
341
|
+
"space-fluid-30-36": "clamp(7.5rem, 7.0238rem + 2.381vw, 9rem)",
|
|
342
|
+
"space-fluid-48-72": "clamp(12rem, 10.0952rem + 9.5238vw, 18rem)"
|
|
343
|
+
};
|
|
344
|
+
const borderWidthTokens = {
|
|
345
|
+
"border-none": "0",
|
|
346
|
+
"border-xs": ".0625rem",
|
|
347
|
+
"border-sm": ".078125rem",
|
|
348
|
+
"border-md": ".09375rem"
|
|
349
|
+
};
|
|
350
|
+
const borderRadiusTokens = {
|
|
351
|
+
"rad-none": "0",
|
|
352
|
+
"rad-xs": ".375rem",
|
|
353
|
+
"rad-sm": ".75rem",
|
|
354
|
+
"rad-md": "1rem",
|
|
355
|
+
"rad-lg": "1.25rem",
|
|
356
|
+
"rad-xl": "1.5rem",
|
|
357
|
+
"rad-rounded": "100rem"
|
|
358
|
+
};
|
|
359
|
+
const elevationTokens = {
|
|
360
|
+
"elevation-low": "0 2px 8px 0 var(--col-neutral-950--t10)",
|
|
361
|
+
"elevation-normal": "0 2px 8px 4px var(--col-neutral-950--t10)"
|
|
362
|
+
};
|
|
363
|
+
const canonicalColourPrimitives = {
|
|
364
|
+
"col-neutral-0": "hsla(0, 0%, 100%, 1)",
|
|
365
|
+
"col-neutral-0--t0": "hsla(0, 0%, 100%, 0)",
|
|
366
|
+
"col-neutral-0--t10": "hsla(0, 0%, 100%, 0.1)",
|
|
367
|
+
"col-neutral-0--t25": "hsla(0, 0%, 100%, 0.25)",
|
|
368
|
+
"col-neutral-0--t50": "hsla(0, 0%, 100%, 0.5)",
|
|
369
|
+
"col-neutral-0--t75": "hsla(0, 0%, 100%, 0.75)",
|
|
370
|
+
"col-neutral-0--t90": "hsla(0, 0%, 100%, 0.9)",
|
|
371
|
+
"col-neutral-50": "hsla(180, 5%, 96%, 1)",
|
|
372
|
+
"col-neutral-100": "hsla(160, 6%, 90%, 1)",
|
|
373
|
+
"col-neutral-200": "hsla(168, 5%, 82%, 1)",
|
|
374
|
+
"col-neutral-300": "hsla(168, 6%, 69%, 1)",
|
|
375
|
+
"col-neutral-400": "hsla(170, 5%, 53%, 1)",
|
|
376
|
+
"col-neutral-500": "hsla(171, 6%, 43%, 1)",
|
|
377
|
+
"col-neutral-600": "hsla(174, 5%, 36%, 1)",
|
|
378
|
+
"col-neutral-700": "hsla(180, 5%, 31%, 1)",
|
|
379
|
+
"col-neutral-800": "hsla(170, 4%, 27%, 1)",
|
|
380
|
+
"col-neutral-900": "hsla(170, 6%, 20%, 1)",
|
|
381
|
+
"col-neutral-950": "hsla(180, 5%, 10%, 1)",
|
|
382
|
+
"col-neutral-950--t10": "hsla(180, 5%, 10%, 0.1)",
|
|
383
|
+
"col-neutral-950--t25": "hsla(180, 5%, 10%, 0.25)",
|
|
384
|
+
"col-neutral-950--t50": "hsla(180, 5%, 10%, 0.5)",
|
|
385
|
+
"col-neutral-950--t75": "hsla(180, 5%, 10%, 0.75)",
|
|
386
|
+
"col-neutral-950--t90": "hsla(180, 5%, 10%, 0.9)",
|
|
387
|
+
"col-green-50": "hsla(156, 24%, 96%, 1)",
|
|
388
|
+
"col-green-100": "hsla(154, 49%, 90%, 1)",
|
|
389
|
+
"col-green-200": "hsla(158, 50%, 80%, 1)",
|
|
390
|
+
"col-green-300": "hsla(162, 50%, 67%, 1)",
|
|
391
|
+
"col-green-400": "hsla(164, 52%, 52%, 1)",
|
|
392
|
+
"col-green-500": "hsla(166, 75%, 39%, 1)",
|
|
393
|
+
"col-green-600": "hsla(166, 80%, 32%, 1)",
|
|
394
|
+
"col-green-700": "hsla(167, 80%, 25%, 1)",
|
|
395
|
+
"col-green-800": "hsla(170, 80%, 22%, 1)",
|
|
396
|
+
"col-green-900": "hsla(170, 100%, 17%, 1)",
|
|
397
|
+
"col-green-950": "hsla(170, 100%, 10%, 1)",
|
|
398
|
+
"col-green-950--t10": "hsla(170, 100%, 10%, 0.1)",
|
|
399
|
+
"col-green-950--t50": "hsla(170, 100%, 10%, 0.5)",
|
|
400
|
+
"col-green-950--t75": "hsla(170, 100%, 10%, 0.75)",
|
|
401
|
+
"col-green-950--t90": "hsla(170, 100%, 10%, 0.9)",
|
|
402
|
+
"col-red-50": "hsla(7, 60%, 97%, 1)",
|
|
403
|
+
"col-red-100": "hsla(7, 81%, 94%, 1)",
|
|
404
|
+
"col-red-200": "hsla(5, 80%, 86%, 1)",
|
|
405
|
+
"col-red-300": "hsla(5, 90%, 76%, 1)",
|
|
406
|
+
"col-red-400": "hsla(5, 90%, 68%, 1)",
|
|
407
|
+
"col-red-500": "hsla(5, 88%, 60%, 1)",
|
|
408
|
+
"col-red-600": "hsla(5, 80%, 50%, 1)",
|
|
409
|
+
"col-red-700": "hsla(5, 80%, 45%, 1)",
|
|
410
|
+
"col-red-800": "hsla(5, 70%, 34%, 1)",
|
|
411
|
+
"col-red-900": "hsla(5, 70%, 22%, 1)",
|
|
412
|
+
"col-red-950": "hsla(5, 70%, 12%, 1)",
|
|
413
|
+
"col-red-950--t10": "hsla(5, 70%, 12%, 0.1)",
|
|
414
|
+
"col-red-950--t50": "hsla(5, 70%, 12%, 0.5)",
|
|
415
|
+
"col-red-950--t75": "hsla(5, 70%, 12%, 0.75)",
|
|
416
|
+
"col-red-950--t90": "hsla(5, 70%, 12%, 0.9)",
|
|
417
|
+
"col-yellow-50": "hsla(47, 60%, 97%, 1)",
|
|
418
|
+
"col-yellow-100": "hsla(50, 81%, 94%, 1)",
|
|
419
|
+
"col-yellow-200": "hsla(50, 80%, 86%, 1)",
|
|
420
|
+
"col-yellow-300": "hsla(50, 90%, 76%, 1)",
|
|
421
|
+
"col-yellow-400": "hsla(50, 90%, 68%, 1)",
|
|
422
|
+
"col-yellow-500": "hsla(50, 88%, 60%, 1)",
|
|
423
|
+
"col-yellow-600": "hsla(50, 84%, 50%, 1)",
|
|
424
|
+
"col-yellow-700": "hsla(44, 84%, 40%, 1)",
|
|
425
|
+
"col-yellow-800": "hsla(42, 70%, 30%, 1)",
|
|
426
|
+
"col-yellow-900": "hsla(42, 71%, 20%, 1)",
|
|
427
|
+
"col-yellow-950": "hsla(42, 69%, 10%, 1)",
|
|
428
|
+
"col-yellow-950--t10": "hsla(42, 69%, 10%, 0.1)",
|
|
429
|
+
"col-yellow-950--t50": "hsla(42, 69%, 10%, 0.5)",
|
|
430
|
+
"col-yellow-950--t75": "hsla(42, 69%, 10%, 0.75)",
|
|
431
|
+
"col-yellow-950--t90": "hsla(42, 69%, 10%, 0.9)"
|
|
432
|
+
};
|
|
433
|
+
const canonicalTransitionPrimitives = {
|
|
434
|
+
"trans-timing-light": "ease-out",
|
|
435
|
+
"trans-timing-normal": "ease-out",
|
|
436
|
+
"trans-timing-heavy": "ease-in",
|
|
437
|
+
"trans-duration-snap": "30ms",
|
|
438
|
+
"trans-duration-normal": "120ms",
|
|
439
|
+
"trans-duration-slow": "300ms"
|
|
440
|
+
};
|
|
441
|
+
const canonicalTypographyPrimitives = {
|
|
442
|
+
"font-size-fluid-25-32": "clamp(1.5625rem, 1.4375rem + 0.625vw, 2rem)",
|
|
443
|
+
"font-size-fluid-48-60": "clamp(3rem, 2.7857rem + 1.0714vw, 3.75rem)",
|
|
444
|
+
"font-family-primary": '"Instrument Sans", sans-serif',
|
|
445
|
+
"font-family-secondary": "'Inter', system-ui, sans-serif",
|
|
446
|
+
"font-size-a-sm": "1.0625rem",
|
|
447
|
+
"font-size-a-md": "1.1875rem",
|
|
448
|
+
"font-size-a-lg-fluid": "var(--font-size-fluid-25-32)",
|
|
449
|
+
"font-size-a-xl-fluid": "var(--font-size-fluid-48-60)",
|
|
450
|
+
"font-size-b-xs": "0.75rem",
|
|
451
|
+
"font-size-b-sm": "1rem",
|
|
452
|
+
"font-size-b-md": "1.125rem",
|
|
453
|
+
"font-weight-xs": "400",
|
|
454
|
+
"font-weight-sm": "500",
|
|
455
|
+
"font-weight-md": "600",
|
|
456
|
+
"font-weight-lg": "680",
|
|
457
|
+
"font-line-tight": "1.1",
|
|
458
|
+
"font-line-normal": "1.2",
|
|
459
|
+
"font-line-loose": "1.4",
|
|
460
|
+
"font-ltrspc-xs": "-0.005em",
|
|
461
|
+
"font-ltrspc-sm": "0.01em",
|
|
462
|
+
"font-ltrspc-md": "0.02em"
|
|
463
|
+
};
|
|
464
|
+
const screens = {
|
|
465
|
+
xs: "0px",
|
|
466
|
+
sm: "600px",
|
|
467
|
+
md: "800px",
|
|
468
|
+
lg: "940px",
|
|
469
|
+
xl: "1440px"
|
|
470
|
+
};
|
|
471
|
+
function mergeTypography(base, overrides) {
|
|
472
|
+
if (!overrides) return base;
|
|
473
|
+
const merged = { ...base };
|
|
474
|
+
for (const [key, partial] of Object.entries(overrides)) {
|
|
475
|
+
merged[key] = { ...merged[key] ?? {}, ...partial };
|
|
476
|
+
}
|
|
477
|
+
return merged;
|
|
478
|
+
}
|
|
479
|
+
function resolvedFontFamilies(options) {
|
|
480
|
+
var _a, _b;
|
|
481
|
+
return {
|
|
482
|
+
primary: ((_a = options == null ? void 0 : options.fontFamily) == null ? void 0 : _a.primary) ?? fontFamilyPrimary,
|
|
483
|
+
secondary: ((_b = options == null ? void 0 : options.fontFamily) == null ? void 0 : _b.secondary) ?? fontFamilySecondary
|
|
484
|
+
};
|
|
485
|
+
}
|
|
486
|
+
const jiwambePlugin = plugin.withOptions(
|
|
487
|
+
(options) => {
|
|
488
|
+
return ({ addBase, addUtilities }) => {
|
|
489
|
+
const fonts = resolvedFontFamilies(options);
|
|
490
|
+
const mergedColors = { ...defaultSemanticColors(), ...(options == null ? void 0 : options.colors) ?? {} };
|
|
491
|
+
const mergedSpacing = { ...spacingTokens, ...(options == null ? void 0 : options.spacing) ?? {} };
|
|
492
|
+
const mergedBorderWidth = { ...borderWidthTokens, ...(options == null ? void 0 : options.borderWidth) ?? {} };
|
|
493
|
+
const mergedBorderRadius = { ...borderRadiusTokens, ...(options == null ? void 0 : options.borderRadius) ?? {} };
|
|
494
|
+
const mergedElevation = { ...elevationTokens, ...(options == null ? void 0 : options.elevation) ?? {} };
|
|
495
|
+
const mergedTypography = mergeTypography(typographyTokens, options == null ? void 0 : options.typography);
|
|
496
|
+
const cssVars = {};
|
|
497
|
+
for (const [key, value] of Object.entries(baseColors)) {
|
|
498
|
+
cssVars[`--color-${key}`] = value;
|
|
499
|
+
}
|
|
500
|
+
for (const [key, value] of Object.entries(mergedColors)) {
|
|
501
|
+
cssVars[`--color-${key}`] = value;
|
|
502
|
+
}
|
|
503
|
+
if (mergedColors["text-secondary"]) {
|
|
504
|
+
cssVars["--col-text-secondary"] = mergedColors["text-secondary"];
|
|
505
|
+
}
|
|
506
|
+
for (const [key, value] of Object.entries(mergedSpacing)) {
|
|
507
|
+
cssVars[`--${key}`] = value;
|
|
508
|
+
}
|
|
509
|
+
for (const [key, value] of Object.entries(mergedBorderWidth)) {
|
|
510
|
+
cssVars[`--${key}`] = value;
|
|
511
|
+
}
|
|
512
|
+
for (const [key, value] of Object.entries(mergedBorderRadius)) {
|
|
513
|
+
cssVars[`--${key}`] = value;
|
|
514
|
+
}
|
|
515
|
+
for (const [key, value] of Object.entries(mergedElevation)) {
|
|
516
|
+
cssVars[`--${key}`] = value;
|
|
517
|
+
}
|
|
518
|
+
cssVars["--font-family-primary"] = fonts.primary;
|
|
519
|
+
cssVars["--font-family-secondary"] = fonts.secondary;
|
|
520
|
+
for (const [key, value] of Object.entries(canonicalColourPrimitives)) {
|
|
521
|
+
cssVars[`--${key}`] = value;
|
|
522
|
+
}
|
|
523
|
+
for (const [key, value] of Object.entries(canonicalTransitionPrimitives)) {
|
|
524
|
+
cssVars[`--${key}`] = value;
|
|
525
|
+
}
|
|
526
|
+
for (const [key, value] of Object.entries(canonicalTypographyPrimitives)) {
|
|
527
|
+
cssVars[`--${key}`] = value;
|
|
528
|
+
}
|
|
529
|
+
addBase({ ":root": cssVars });
|
|
530
|
+
addBase({
|
|
531
|
+
"@keyframes jiwambe-shimmer": {
|
|
532
|
+
"0%": {
|
|
533
|
+
backgroundPosition: "-200% 0"
|
|
534
|
+
},
|
|
535
|
+
"100%": {
|
|
536
|
+
backgroundPosition: "200% 0"
|
|
537
|
+
}
|
|
538
|
+
},
|
|
539
|
+
".jiwambe-skeleton": {
|
|
540
|
+
backgroundColor: "var(--col-neutral-100)",
|
|
541
|
+
backgroundImage: [
|
|
542
|
+
"linear-gradient(",
|
|
543
|
+
" 90deg,",
|
|
544
|
+
" var(--col-neutral-100) 25%,",
|
|
545
|
+
" var(--col-neutral-50) 50%,",
|
|
546
|
+
" var(--col-neutral-100) 75%",
|
|
547
|
+
")"
|
|
548
|
+
].join(""),
|
|
549
|
+
backgroundSize: "200% 100%",
|
|
550
|
+
backgroundRepeat: "no-repeat",
|
|
551
|
+
animation: "jiwambe-shimmer 1.5s ease-in-out infinite"
|
|
552
|
+
}
|
|
553
|
+
});
|
|
554
|
+
addBase({
|
|
555
|
+
".jiwambe-list": {
|
|
556
|
+
paddingLeft: "var(--space-6)",
|
|
557
|
+
margin: "0"
|
|
558
|
+
},
|
|
559
|
+
".jiwambe-list--unstyled": {
|
|
560
|
+
paddingLeft: "0",
|
|
561
|
+
listStyle: "none"
|
|
562
|
+
},
|
|
563
|
+
".jiwambe-list--disc li::marker": {
|
|
564
|
+
color: "var(--col-text-secondary)"
|
|
565
|
+
},
|
|
566
|
+
".jiwambe-list--decimal li::marker": {
|
|
567
|
+
color: "var(--col-text-secondary)",
|
|
568
|
+
fontVariantNumeric: "tabular-nums"
|
|
569
|
+
},
|
|
570
|
+
".jiwambe-list--none": {
|
|
571
|
+
listStyle: "none",
|
|
572
|
+
paddingLeft: "0"
|
|
573
|
+
},
|
|
574
|
+
".jiwambe-list-item": {
|
|
575
|
+
paddingLeft: "var(--space-1)"
|
|
576
|
+
},
|
|
577
|
+
".jiwambe-list-item + .jiwambe-list-item": {
|
|
578
|
+
marginTop: "var(--space-0)"
|
|
579
|
+
}
|
|
580
|
+
});
|
|
581
|
+
const typographyUtilities = {};
|
|
582
|
+
for (const [name, def] of Object.entries(mergedTypography)) {
|
|
583
|
+
const styles = {
|
|
584
|
+
"font-family": def.fontFamily,
|
|
585
|
+
"font-size": def.fontSize,
|
|
586
|
+
"font-weight": def.fontWeight,
|
|
587
|
+
"line-height": def.lineHeight
|
|
588
|
+
};
|
|
589
|
+
if (def.letterSpacing) styles["letter-spacing"] = def.letterSpacing;
|
|
590
|
+
if (def.textWrap) styles["text-wrap"] = def.textWrap;
|
|
591
|
+
typographyUtilities[`.text-${name}`] = styles;
|
|
592
|
+
}
|
|
593
|
+
addUtilities(typographyUtilities);
|
|
594
|
+
};
|
|
595
|
+
},
|
|
596
|
+
(options) => {
|
|
597
|
+
const fonts = resolvedFontFamilies(options);
|
|
598
|
+
const mergedColors = { ...defaultSemanticColors(), ...(options == null ? void 0 : options.colors) ?? {} };
|
|
599
|
+
const mergedSpacing = { ...spacingTokens, ...(options == null ? void 0 : options.spacing) ?? {} };
|
|
600
|
+
const mergedBorderWidth = { ...borderWidthTokens, ...(options == null ? void 0 : options.borderWidth) ?? {} };
|
|
601
|
+
const mergedBorderRadius = { ...borderRadiusTokens, ...(options == null ? void 0 : options.borderRadius) ?? {} };
|
|
602
|
+
const mergedElevation = { ...elevationTokens, ...(options == null ? void 0 : options.elevation) ?? {} };
|
|
603
|
+
const allColors = {};
|
|
604
|
+
for (const [key, value] of Object.entries(baseColors)) {
|
|
605
|
+
allColors[key] = value;
|
|
606
|
+
}
|
|
607
|
+
for (const [key, value] of Object.entries(mergedColors)) {
|
|
608
|
+
allColors[key] = value;
|
|
609
|
+
}
|
|
610
|
+
const spacingExtension = {};
|
|
611
|
+
for (const key of Object.keys(mergedSpacing)) {
|
|
612
|
+
spacingExtension[key] = `var(--${key})`;
|
|
613
|
+
if (key.startsWith("space-fluid-")) {
|
|
614
|
+
const shortKey = key.replace(/^space-/, "");
|
|
615
|
+
spacingExtension[shortKey] = `var(--${key})`;
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
return {
|
|
619
|
+
theme: {
|
|
620
|
+
screens,
|
|
621
|
+
extend: {
|
|
622
|
+
colors: allColors,
|
|
623
|
+
spacing: spacingExtension,
|
|
624
|
+
borderWidth: mergedBorderWidth,
|
|
625
|
+
borderRadius: mergedBorderRadius,
|
|
626
|
+
boxShadow: mergedElevation,
|
|
627
|
+
fontFamily: {
|
|
628
|
+
primary: [fonts.primary],
|
|
629
|
+
secondary: [fonts.secondary]
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
};
|
|
634
|
+
}
|
|
635
|
+
);
|
|
636
|
+
export {
|
|
637
|
+
jiwambePlugin as default,
|
|
638
|
+
resolve
|
|
639
|
+
};
|
|
640
|
+
//# sourceMappingURL=jiwambe-plugin.js.map
|