@hilum/ui 2.1.2 → 3.1.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/README.md +2 -1
- package/dist/{chunk-H6JZQWX3.js → chunk-5JX2YKJM.js} +8 -8
- package/dist/{chunk-H6JZQWX3.js.map → chunk-5JX2YKJM.js.map} +1 -1
- package/dist/fonts/gabarito-latin-400-normal.woff2 +0 -0
- package/dist/fonts/gabarito-latin-500-normal.woff2 +0 -0
- package/dist/fonts/gabarito-latin-600-normal.woff2 +0 -0
- package/dist/fonts/gabarito-latin-700-normal.woff2 +0 -0
- package/dist/fonts/gabarito-latin-800-normal.woff2 +0 -0
- package/dist/fonts/gabarito-latin-900-normal.woff2 +0 -0
- package/dist/fonts/gabarito-latin-ext-400-normal.woff2 +0 -0
- package/dist/fonts/gabarito-latin-ext-500-normal.woff2 +0 -0
- package/dist/fonts/gabarito-latin-ext-600-normal.woff2 +0 -0
- package/dist/fonts/gabarito-latin-ext-700-normal.woff2 +0 -0
- package/dist/fonts/gabarito-latin-ext-800-normal.woff2 +0 -0
- package/dist/fonts/gabarito-latin-ext-900-normal.woff2 +0 -0
- package/dist/fonts.css +86 -13
- package/dist/index.d.ts +2 -0
- package/dist/index.js +18 -4
- package/dist/index.js.map +1 -1
- package/dist/tokens.css +6 -6
- package/dist/tokens.d.ts +6 -6
- package/dist/tokens.js +1 -1
- package/llms.txt +7 -6
- package/package.json +2 -2
- package/src/components/input-group.tsx +20 -3
- package/src/tokens/tokens.ts +6 -6
- package/dist/fonts/instrument-serif-latin-400-italic.woff2 +0 -0
- package/dist/fonts/instrument-serif-latin-400-normal.woff2 +0 -0
- package/dist/fonts/instrument-serif-latin-ext-400-italic.woff2 +0 -0
- package/dist/fonts/instrument-serif-latin-ext-400-normal.woff2 +0 -0
package/dist/tokens.css
CHANGED
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
--color-destructive: #dc2626;
|
|
42
42
|
|
|
43
43
|
--font-sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
44
|
-
--font-
|
|
44
|
+
--font-display: Gabarito, Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
45
45
|
--font-mono: ui-monospace, "SFMono-Regular", "Menlo", "Consolas", monospace;
|
|
46
46
|
|
|
47
47
|
--radius-base: 0.5rem;
|
|
@@ -201,35 +201,35 @@
|
|
|
201
201
|
@custom-variant dark (&:where([data-theme="dark"], [data-theme="dark"] *, .dark, .dark *));
|
|
202
202
|
|
|
203
203
|
@utility display-xl {
|
|
204
|
-
font-family: var(--font-
|
|
204
|
+
font-family: var(--font-display);
|
|
205
205
|
font-size: 3rem;
|
|
206
206
|
font-weight: 400;
|
|
207
207
|
line-height: 1.15;
|
|
208
208
|
}
|
|
209
209
|
|
|
210
210
|
@utility display {
|
|
211
|
-
font-family: var(--font-
|
|
211
|
+
font-family: var(--font-display);
|
|
212
212
|
font-size: 2.25rem;
|
|
213
213
|
font-weight: 400;
|
|
214
214
|
line-height: 1.15;
|
|
215
215
|
}
|
|
216
216
|
|
|
217
217
|
@utility heading-xl {
|
|
218
|
-
font-family: var(--font-
|
|
218
|
+
font-family: var(--font-display);
|
|
219
219
|
font-size: 1.875rem;
|
|
220
220
|
font-weight: 400;
|
|
221
221
|
line-height: 1.2;
|
|
222
222
|
}
|
|
223
223
|
|
|
224
224
|
@utility heading {
|
|
225
|
-
font-family: var(--font-
|
|
225
|
+
font-family: var(--font-display);
|
|
226
226
|
font-size: 1.5rem;
|
|
227
227
|
font-weight: 400;
|
|
228
228
|
line-height: 1.2;
|
|
229
229
|
}
|
|
230
230
|
|
|
231
231
|
@utility subheading {
|
|
232
|
-
font-family: var(--font-
|
|
232
|
+
font-family: var(--font-display);
|
|
233
233
|
font-size: 1.25rem;
|
|
234
234
|
font-weight: 400;
|
|
235
235
|
line-height: 1.4;
|
package/dist/tokens.d.ts
CHANGED
|
@@ -122,37 +122,37 @@ declare const tokens: {
|
|
|
122
122
|
};
|
|
123
123
|
readonly fontFamily: {
|
|
124
124
|
readonly sans: "Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif";
|
|
125
|
-
readonly
|
|
125
|
+
readonly display: "Gabarito, Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif";
|
|
126
126
|
readonly mono: "ui-monospace, \"SFMono-Regular\", \"Menlo\", \"Consolas\", monospace";
|
|
127
127
|
};
|
|
128
128
|
/** Type scale utilities — emitted as Tailwind v4 `@utility` blocks. */
|
|
129
129
|
readonly typeScale: {
|
|
130
130
|
readonly "display-xl": {
|
|
131
|
-
readonly family: "
|
|
131
|
+
readonly family: "display";
|
|
132
132
|
readonly size: "3rem";
|
|
133
133
|
readonly weight: 400;
|
|
134
134
|
readonly lineHeight: "1.15";
|
|
135
135
|
};
|
|
136
136
|
readonly display: {
|
|
137
|
-
readonly family: "
|
|
137
|
+
readonly family: "display";
|
|
138
138
|
readonly size: "2.25rem";
|
|
139
139
|
readonly weight: 400;
|
|
140
140
|
readonly lineHeight: "1.15";
|
|
141
141
|
};
|
|
142
142
|
readonly "heading-xl": {
|
|
143
|
-
readonly family: "
|
|
143
|
+
readonly family: "display";
|
|
144
144
|
readonly size: "1.875rem";
|
|
145
145
|
readonly weight: 400;
|
|
146
146
|
readonly lineHeight: "1.2";
|
|
147
147
|
};
|
|
148
148
|
readonly heading: {
|
|
149
|
-
readonly family: "
|
|
149
|
+
readonly family: "display";
|
|
150
150
|
readonly size: "1.5rem";
|
|
151
151
|
readonly weight: 400;
|
|
152
152
|
readonly lineHeight: "1.2";
|
|
153
153
|
};
|
|
154
154
|
readonly subheading: {
|
|
155
|
-
readonly family: "
|
|
155
|
+
readonly family: "display";
|
|
156
156
|
readonly size: "1.25rem";
|
|
157
157
|
readonly weight: 400;
|
|
158
158
|
readonly lineHeight: "1.4";
|
package/dist/tokens.js
CHANGED
package/llms.txt
CHANGED
|
@@ -17,9 +17,10 @@ Peer dependencies: `react@^19`, `react-dom@^19`, `tailwindcss@^4`
|
|
|
17
17
|
/* globals.css */
|
|
18
18
|
@import "tailwindcss";
|
|
19
19
|
@import "@hilum/ui/tokens.css";
|
|
20
|
+
@import "@hilum/ui/fonts.css";
|
|
20
21
|
```
|
|
21
22
|
|
|
22
|
-
|
|
23
|
+
The token import registers all design tokens as CSS custom properties and Tailwind v4 utilities (`bg-brand-primary`, `text-ground-900`, `shadow-natural`, etc.). The font import loads Hilum's self-hosted Inter and Gabarito font files.
|
|
23
24
|
|
|
24
25
|
---
|
|
25
26
|
|
|
@@ -103,11 +104,11 @@ Use as Tailwind utilities (e.g. `className="display"`):
|
|
|
103
104
|
|
|
104
105
|
| Class | Font | Size | Weight | Usage |
|
|
105
106
|
|---|---|---|---|---|
|
|
106
|
-
| `display-xl` |
|
|
107
|
-
| `display` |
|
|
108
|
-
| `heading-xl` |
|
|
109
|
-
| `heading` |
|
|
110
|
-
| `subheading` |
|
|
107
|
+
| `display-xl` | Gabarito | 3rem | 400 | Hero H1 |
|
|
108
|
+
| `display` | Gabarito | 2.25rem | 400 | Page H1 |
|
|
109
|
+
| `heading-xl` | Gabarito | 1.875rem | 400 | Section headings |
|
|
110
|
+
| `heading` | Gabarito | 1.5rem | 400 | Card titles |
|
|
111
|
+
| `subheading` | Gabarito | 1.25rem | 400 | Subheadings |
|
|
111
112
|
| `body-lg` | Inter | 1rem | 400 | Large body text |
|
|
112
113
|
| `body` | Inter | 0.875rem | 400 | Default body |
|
|
113
114
|
| `caption` | Inter | 0.75rem | 400 | Metadata, helper text |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hilum/ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Hilum UI — design system primitives (Button, Input, Dialog, Combobox, …) + tokens + fonts + icons",
|
|
6
6
|
"license": "MIT",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
73
|
"@fontsource-variable/inter": "^5.2.8",
|
|
74
|
-
"@fontsource/
|
|
74
|
+
"@fontsource/gabarito": "^5.2.8",
|
|
75
75
|
"@types/react": "^19.0.0",
|
|
76
76
|
"@types/react-dom": "^19.0.0",
|
|
77
77
|
"tailwindcss": "^4.2.0",
|
|
@@ -7,6 +7,8 @@ interface InputGroupProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
|
7
7
|
trailingAddon?: React.ReactNode;
|
|
8
8
|
leadingIcon?: React.ReactNode;
|
|
9
9
|
trailingIcon?: React.ReactNode;
|
|
10
|
+
trailingAction?: React.ReactNode;
|
|
11
|
+
trailingActionClassName?: string;
|
|
10
12
|
trailingButton?: React.ReactNode;
|
|
11
13
|
error?: boolean;
|
|
12
14
|
pill?: boolean;
|
|
@@ -20,6 +22,8 @@ const InputGroup = React.forwardRef<HTMLInputElement, InputGroupProps>(
|
|
|
20
22
|
trailingAddon,
|
|
21
23
|
leadingIcon,
|
|
22
24
|
trailingIcon,
|
|
25
|
+
trailingAction,
|
|
26
|
+
trailingActionClassName,
|
|
23
27
|
trailingButton,
|
|
24
28
|
error,
|
|
25
29
|
pill,
|
|
@@ -31,7 +35,8 @@ const InputGroup = React.forwardRef<HTMLInputElement, InputGroupProps>(
|
|
|
31
35
|
) => {
|
|
32
36
|
const radius = pill ? "rounded-full" : "rounded-lg";
|
|
33
37
|
const hasLeading = leadingAddon || leadingIcon;
|
|
34
|
-
const
|
|
38
|
+
const hasInsetTrailing = trailingIcon || trailingAction || error;
|
|
39
|
+
const hasTrailing = trailingAddon || hasInsetTrailing || trailingButton;
|
|
35
40
|
|
|
36
41
|
const baseInput = cn(
|
|
37
42
|
"flex h-9 w-full border bg-card body text-foreground placeholder:text-muted-foreground",
|
|
@@ -84,16 +89,17 @@ const InputGroup = React.forwardRef<HTMLInputElement, InputGroupProps>(
|
|
|
84
89
|
? pill
|
|
85
90
|
? "rounded-l-full rounded-r-none pl-9 pr-3"
|
|
86
91
|
: "rounded-l-lg rounded-r-none pl-9 pr-3"
|
|
87
|
-
:
|
|
92
|
+
: hasInsetTrailing
|
|
88
93
|
? cn(radius, "pl-9 pr-9")
|
|
89
94
|
: cn(radius, "pl-9 pr-3")
|
|
90
95
|
: trailingAddon
|
|
91
96
|
? pill
|
|
92
97
|
? "rounded-l-full rounded-r-none px-3"
|
|
93
98
|
: "rounded-l-lg rounded-r-none px-3"
|
|
94
|
-
:
|
|
99
|
+
: hasInsetTrailing
|
|
95
100
|
? cn(radius, "pl-3 pr-9")
|
|
96
101
|
: cn(radius, "px-3"),
|
|
102
|
+
trailingAction && "pr-14",
|
|
97
103
|
className,
|
|
98
104
|
)}
|
|
99
105
|
{...props}
|
|
@@ -108,6 +114,17 @@ const InputGroup = React.forwardRef<HTMLInputElement, InputGroupProps>(
|
|
|
108
114
|
)}
|
|
109
115
|
</div>
|
|
110
116
|
)}
|
|
117
|
+
|
|
118
|
+
{trailingAction && (
|
|
119
|
+
<div
|
|
120
|
+
className={cn(
|
|
121
|
+
"absolute inset-y-0 right-2 flex items-center",
|
|
122
|
+
trailingActionClassName,
|
|
123
|
+
)}
|
|
124
|
+
>
|
|
125
|
+
{trailingAction}
|
|
126
|
+
</div>
|
|
127
|
+
)}
|
|
111
128
|
</div>
|
|
112
129
|
|
|
113
130
|
{/* Trailing addon (text) */}
|
package/src/tokens/tokens.ts
CHANGED
|
@@ -162,17 +162,17 @@ export const tokens = {
|
|
|
162
162
|
|
|
163
163
|
fontFamily: {
|
|
164
164
|
sans: 'Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',
|
|
165
|
-
|
|
165
|
+
display: 'Gabarito, Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',
|
|
166
166
|
mono: 'ui-monospace, "SFMono-Regular", "Menlo", "Consolas", monospace',
|
|
167
167
|
},
|
|
168
168
|
|
|
169
169
|
/** Type scale utilities — emitted as Tailwind v4 `@utility` blocks. */
|
|
170
170
|
typeScale: {
|
|
171
|
-
"display-xl": { family: "
|
|
172
|
-
display: { family: "
|
|
173
|
-
"heading-xl": { family: "
|
|
174
|
-
heading: { family: "
|
|
175
|
-
subheading: { family: "
|
|
171
|
+
"display-xl": { family: "display", size: "3rem", weight: 400, lineHeight: "1.15" },
|
|
172
|
+
display: { family: "display", size: "2.25rem", weight: 400, lineHeight: "1.15" },
|
|
173
|
+
"heading-xl": { family: "display", size: "1.875rem", weight: 400, lineHeight: "1.2" },
|
|
174
|
+
heading: { family: "display", size: "1.5rem", weight: 400, lineHeight: "1.2" },
|
|
175
|
+
subheading: { family: "display", size: "1.25rem", weight: 400, lineHeight: "1.4" },
|
|
176
176
|
"body-lg": { family: "sans", size: "1rem", weight: 400, lineHeight: "1.625" },
|
|
177
177
|
body: { family: "sans", size: "0.875rem", weight: 400, lineHeight: "1.625" },
|
|
178
178
|
"body-sm": { family: "sans", size: "0.75rem", weight: 500, lineHeight: "1.625" },
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|