@evinvest/uikit 0.17.1 → 0.18.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 +12 -6
- package/dist/index.d.ts +1 -1
- package/dist/index.js +12 -12
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/styles/tokens.css +23 -5
package/README.md
CHANGED
|
@@ -51,7 +51,7 @@ your Tailwind v4 entrypoint — this is the load-bearing part of the kit:
|
|
|
51
51
|
| surfaces | `background` `card` `popover` `muted` `hover` |
|
|
52
52
|
| ink | `ink` `ink-mid` `ink-soft` — hierarchy, loudest first |
|
|
53
53
|
| lines | `border` `input` `ring` |
|
|
54
|
-
| roles | `brand` `primary` `secondary` `positive` `accent-trace` `accent-debug` `accent-info` `accent-warn` `accent-error`, each with `on-*` where it gets filled |
|
|
54
|
+
| roles | `brand` `primary` `secondary` `positive` `accent-trace` `accent-debug` `accent-info` `accent-warn` `accent-error`, each with `on-*` where it gets filled; `primary-ink` — the primary role as ink on a surface (`#128377` fill under a white `on-primary`, `#2a9d8f` ink) |
|
|
55
55
|
| scalars | `radius` `control-radius` `control-py` `display-scale` `band-py` `page-max` `page-px` `shadow-*` `font-*` |
|
|
56
56
|
| charts | `chart-1` … `chart-5` |
|
|
57
57
|
|
|
@@ -63,6 +63,17 @@ A surface takes its ink from the scope, so it carries no `-foreground`. A
|
|
|
63
63
|
**filled role** does not — gold wants black and navy wants white regardless of
|
|
64
64
|
polarity — so `on-{role}` exists exactly there.
|
|
65
65
|
|
|
66
|
+
A fill and an ink are different jobs, and `primary` is the one role that
|
|
67
|
+
names them separately: `primary` is the fill (`bg-primary text-on-primary` on
|
|
68
|
+
a button, a checked switch or checkbox — `#128377`, white reads on it at
|
|
69
|
+
4.63:1 and it clears 3:1 against `background`, `secondary`, `card` and
|
|
70
|
+
`popover`) and `primary-ink` is the same hue as ink (`text-primary-ink` on a
|
|
71
|
+
link or eyebrow, a radio dot, a slider range, `border-primary-ink` on a checked
|
|
72
|
+
outline, the focus `ring` — `#2a9d8f`, 5.85:1 on `background`, 4.72:1 on
|
|
73
|
+
`card`). Every other role holds its own label and reads as ink with one value.
|
|
74
|
+
A consumer sheet must define `--primary-ink`; see
|
|
75
|
+
[`docs/spec/accents.md`](../../docs/spec/accents.md).
|
|
76
|
+
|
|
66
77
|
Accents are decorative and **ordered by significance**, quiet to loud. Pick a
|
|
67
78
|
rung by how loud the thing should be, never by what it means; see
|
|
68
79
|
[`docs/spec/accents.md`](../../docs/spec/accents.md). Every consumer defines all
|
|
@@ -78,11 +89,6 @@ state, never its appearance (`Red`) and never its selection (`Default`); see
|
|
|
78
89
|
and carries EV's values: a single dark palette on `:root, .dark`. A consumer
|
|
79
90
|
with two polarities writes its own sheet against the same names.
|
|
80
91
|
|
|
81
|
-
`text-main-mist`, `bg-sidebar`, `text-muted-foreground` and the rest keep
|
|
82
|
-
working, and the current tokens are re-pointed at the old values so rendered
|
|
83
|
-
colour is unchanged. Import it instead while migrating; it goes away once every
|
|
84
|
-
consumer has moved.
|
|
85
|
-
|
|
86
92
|
## Usage
|
|
87
93
|
|
|
88
94
|
```tsx
|
package/dist/index.d.ts
CHANGED
|
@@ -254,7 +254,7 @@ declare const buttonVariantClasses: {
|
|
|
254
254
|
readonly outline: "border bg-transparent shadow-xs hover:bg-hover hover:text-ink";
|
|
255
255
|
readonly ghost: "hover:bg-hover hover:text-ink";
|
|
256
256
|
readonly destructive: "bg-accent-error text-on-accent-error hover:bg-accent-error/90 focus-visible:ring-accent-error/20";
|
|
257
|
-
readonly link: "text-primary underline-offset-4 hover:underline";
|
|
257
|
+
readonly link: "text-primary-ink underline-offset-4 hover:underline";
|
|
258
258
|
};
|
|
259
259
|
type ButtonVariant = keyof typeof buttonVariantClasses;
|
|
260
260
|
declare const buttonSizeClasses: {
|
package/dist/index.js
CHANGED
|
@@ -718,7 +718,7 @@ var buttonVariantClasses = {
|
|
|
718
718
|
"outline": "border bg-transparent shadow-xs hover:bg-hover hover:text-ink",
|
|
719
719
|
"ghost": "hover:bg-hover hover:text-ink",
|
|
720
720
|
"destructive": "bg-accent-error text-on-accent-error hover:bg-accent-error/90 focus-visible:ring-accent-error/20",
|
|
721
|
-
"link": "text-primary underline-offset-4 hover:underline"
|
|
721
|
+
"link": "text-primary-ink underline-offset-4 hover:underline"
|
|
722
722
|
};
|
|
723
723
|
var buttonSizeClasses = {
|
|
724
724
|
"xs": "h-7 gap-1 px-2 text-xs has-[>svg]:px-1.5",
|
|
@@ -940,7 +940,7 @@ var emptyMediaVariants = {
|
|
|
940
940
|
"icon": "bg-muted text-ink flex size-10 shrink-0 items-center justify-center rounded-lg [&_svg:not([class*='size-'])]:size-6"
|
|
941
941
|
};
|
|
942
942
|
var EMPTY_TITLE = "text-lg font-medium tracking-tight";
|
|
943
|
-
var EMPTY_DESCRIPTION = "text-ink-soft [&>a:hover]:text-primary text-sm/relaxed [&>a]:underline [&>a]:underline-offset-4";
|
|
943
|
+
var EMPTY_DESCRIPTION = "text-ink-soft [&>a:hover]:text-primary-ink text-sm/relaxed [&>a]:underline [&>a]:underline-offset-4";
|
|
944
944
|
var EMPTY_CONTENT = "flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance";
|
|
945
945
|
|
|
946
946
|
// src/components/empty.tsx
|
|
@@ -1042,9 +1042,9 @@ var FIELD_SET = "flex flex-col gap-6 has-[>[data-slot=checkbox-group]]:gap-3 has
|
|
|
1042
1042
|
var FIELD_LEGEND = "mb-3 font-medium data-[variant=legend]:text-base data-[variant=label]:text-sm";
|
|
1043
1043
|
var FIELD_GROUP = "group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4";
|
|
1044
1044
|
var FIELD_CONTENT = "group/field-content flex flex-1 flex-col gap-1.5 leading-snug";
|
|
1045
|
-
var FIELD_LABEL = "group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-4 has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary";
|
|
1045
|
+
var FIELD_LABEL = "group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-4 has-data-[state=checked]:bg-primary-ink/5 has-data-[state=checked]:border-primary-ink";
|
|
1046
1046
|
var FIELD_TITLE = "flex w-fit items-center gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50";
|
|
1047
|
-
var FIELD_DESCRIPTION = "text-ink-soft text-sm leading-normal font-normal group-has-[[data-orientation=horizontal]]/field:text-balance last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5 [&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4";
|
|
1047
|
+
var FIELD_DESCRIPTION = "text-ink-soft text-sm leading-normal font-normal group-has-[[data-orientation=horizontal]]/field:text-balance last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5 [&>a:hover]:text-primary-ink [&>a]:underline [&>a]:underline-offset-4";
|
|
1048
1048
|
var FIELD_SEPARATOR = "relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2";
|
|
1049
1049
|
var FIELD_SEPARATOR_LINE = "absolute inset-0 top-1/2 shrink-0 bg-border h-px w-full";
|
|
1050
1050
|
var FIELD_SEPARATOR_CONTENT = "bg-background text-ink-soft relative mx-auto block w-fit px-2";
|
|
@@ -1653,7 +1653,7 @@ var itemMediaVariants = {
|
|
|
1653
1653
|
};
|
|
1654
1654
|
var ITEM_CONTENT = "flex flex-1 flex-col gap-1 [&+[data-slot=item-content]]:flex-none";
|
|
1655
1655
|
var ITEM_TITLE = "flex w-fit items-center gap-2 text-sm leading-snug font-medium";
|
|
1656
|
-
var ITEM_DESCRIPTION = "text-ink-soft line-clamp-2 text-sm leading-normal font-normal text-balance [&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4";
|
|
1656
|
+
var ITEM_DESCRIPTION = "text-ink-soft line-clamp-2 text-sm leading-normal font-normal text-balance [&>a:hover]:text-primary-ink [&>a]:underline [&>a]:underline-offset-4";
|
|
1657
1657
|
var ITEM_ACTIONS = "flex items-center gap-2";
|
|
1658
1658
|
var ITEM_HEADER = "flex basis-full items-center justify-between gap-2";
|
|
1659
1659
|
var ITEM_FOOTER = "flex basis-full items-center justify-between gap-2";
|
|
@@ -1957,8 +1957,8 @@ function PaginationEllipsis({
|
|
|
1957
1957
|
import "react";
|
|
1958
1958
|
|
|
1959
1959
|
// src/generated/progress.ts
|
|
1960
|
-
var PROGRESS_TRACK = "bg-primary/20 relative h-2 w-full overflow-hidden rounded-full";
|
|
1961
|
-
var PROGRESS_INDICATOR = "bg-primary h-full w-full flex-1 transition-all";
|
|
1960
|
+
var PROGRESS_TRACK = "bg-primary-ink/20 relative h-2 w-full overflow-hidden rounded-full";
|
|
1961
|
+
var PROGRESS_INDICATOR = "bg-primary-ink h-full w-full flex-1 transition-all";
|
|
1962
1962
|
|
|
1963
1963
|
// src/components/progress.tsx
|
|
1964
1964
|
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
@@ -2476,7 +2476,7 @@ var SECTION_BASE = "w-full px-[var(--page-px)]";
|
|
|
2476
2476
|
var SECTION_PY = "py-[var(--band-py)]";
|
|
2477
2477
|
var SECTION_PY_TIGHT = "py-[var(--band-py-tight)]";
|
|
2478
2478
|
var SECTION_HEAD = "flex flex-col gap-2 md:gap-3.5";
|
|
2479
|
-
var EYEBROW = "font-medium text-[10px] md:text-[11.5px] tracking-[0.15em] md:tracking-[0.16em] text-primary";
|
|
2479
|
+
var EYEBROW = "font-medium text-[10px] md:text-[11.5px] tracking-[0.15em] md:tracking-[0.16em] text-primary-ink [.bg-primary_&]:text-on-primary";
|
|
2480
2480
|
var DISPLAY_BASE = "font-display [font-weight:700] max-w-[54rem] tracking-[-0.005em] leading-[1.16] md:leading-[1.14] text-[calc(1.5625rem*var(--display-scale))] md:text-[calc(2.625rem*var(--display-scale))]";
|
|
2481
2481
|
var LEDE = "max-w-[52rem] text-[15px] md:text-[17px] leading-[1.58] text-ink-soft";
|
|
2482
2482
|
var PROSE = "text-[14px] md:text-[15px] leading-[1.62] text-ink-soft";
|
|
@@ -2934,7 +2934,7 @@ import * as React45 from "react";
|
|
|
2934
2934
|
|
|
2935
2935
|
// src/generated/radio-group.ts
|
|
2936
2936
|
var RADIO_GROUP_ROOT = "grid gap-3";
|
|
2937
|
-
var RADIO_GROUP_ITEM = "border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-accent-error/20 aria-invalid:border-accent-error aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50";
|
|
2937
|
+
var RADIO_GROUP_ITEM = "border-input text-primary-ink focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-accent-error/20 aria-invalid:border-accent-error aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50";
|
|
2938
2938
|
|
|
2939
2939
|
// src/components/radio-group.tsx
|
|
2940
2940
|
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
@@ -3028,7 +3028,7 @@ function RadioGroupItem({
|
|
|
3028
3028
|
children: /* @__PURE__ */ jsx35(
|
|
3029
3029
|
"svg",
|
|
3030
3030
|
{
|
|
3031
|
-
className: "fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2",
|
|
3031
|
+
className: "fill-primary-ink absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2",
|
|
3032
3032
|
viewBox: "0 0 24 24",
|
|
3033
3033
|
"aria-hidden": "true",
|
|
3034
3034
|
children: /* @__PURE__ */ jsx35("circle", { cx: "12", cy: "12", r: "10" })
|
|
@@ -3046,8 +3046,8 @@ import * as React46 from "react";
|
|
|
3046
3046
|
// src/generated/slider.ts
|
|
3047
3047
|
var SLIDER_ROOT = "relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col";
|
|
3048
3048
|
var SLIDER_TRACK = "bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5";
|
|
3049
|
-
var SLIDER_RANGE = "bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full";
|
|
3050
|
-
var SLIDER_THUMB = "border-primary ring-ring/50 block size-4 shrink-0 rounded-full border bg-ink shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50";
|
|
3049
|
+
var SLIDER_RANGE = "bg-primary-ink absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full";
|
|
3050
|
+
var SLIDER_THUMB = "border-primary-ink ring-ring/50 block size-4 shrink-0 rounded-full border bg-ink shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50";
|
|
3051
3051
|
|
|
3052
3052
|
// src/components/slider.tsx
|
|
3053
3053
|
import { jsx as jsx36, jsxs as jsxs9 } from "react/jsx-runtime";
|