@rebasepro/ui 0.19.2-canary.g98b88fd → 0.19.2-canary.gef769df
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/index.css +3 -34
- package/dist/index.es.js +4 -22
- package/dist/index.es.js.map +1 -1
- package/dist/src/index.css +3 -34
- package/dist/styles.d.ts +2 -20
- package/package.json +6 -4
package/dist/index.css
CHANGED
|
@@ -166,38 +166,7 @@ html.dark {
|
|
|
166
166
|
@apply text-3xl font-headers font-semibold tracking-display tabular-nums;
|
|
167
167
|
}
|
|
168
168
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
An outset ring is a box-shadow painted beyond the border box, so any ancestor
|
|
172
|
-
that clips cuts it — a scroller, a truncating cell, a max-height collapse.
|
|
173
|
-
That is not a corner case: the drawer's navigation groups clip for their
|
|
174
|
-
collapse animation, and every row in them rendered a ring with three of its
|
|
175
|
-
four sides missing. Tabbing through the panel produced stray blue slivers
|
|
176
|
-
rather than an indicator. An inset ring is painted within the element's own
|
|
177
|
-
box, which is inside any clip rect the element is itself inside, so nothing
|
|
178
|
-
can cut it. Same 2px, same colour, same radius — 2px in rather than 2px out.
|
|
179
|
-
|
|
180
|
-
Written as an override of `--tw-ring-shadow` rather than as `inset-ring-2`
|
|
181
|
-
because that keeps one vocabulary for turning the ring off. Eleven call sites
|
|
182
|
-
already say `ring-0` / `focusedDisabled` to suppress it, and `inset-ring-*`
|
|
183
|
-
is a different variable that none of them would have silenced — every popover
|
|
184
|
-
and bare table input that had opted out would have got a ring back.
|
|
185
|
-
Not `outline` either: 65 call sites carry `outline-none` from the utilities
|
|
186
|
-
layer, which outranks anything a base-layer rule sets, and those controls
|
|
187
|
-
would have been left with no focus indicator at all.
|
|
188
|
-
|
|
189
|
-
A component that wants the ring OUTSIDE (Checkbox, Slider, Avatar — small
|
|
190
|
-
controls with room around them, where an inset ring would sit on the mark
|
|
191
|
-
itself) still says `focus-visible:ring-2` for itself; a utility outranks
|
|
192
|
-
this.
|
|
193
|
-
|
|
194
|
-
The pseudo-class is doubled on purpose — it is not a typo to tidy up. The
|
|
195
|
-
admin imports this sheet into `layer(base)`, where a utility wins whatever
|
|
196
|
-
the specificity, but the docs site imports it unlayered, and there the rule
|
|
197
|
-
competes with `.something:focus` on specificity alone. (0,2,0) is what the
|
|
198
|
-
rule had before this was written, and dropping to (0,1,0) would quietly hand
|
|
199
|
-
those ties to the other rule. */
|
|
200
|
-
:focus-visible:focus-visible {
|
|
201
|
-
@apply outline-none ring-2 ring-primary ring-offset-0 ring-offset-transparent;
|
|
202
|
-
--tw-ring-shadow: inset 0 0 0 2px var(--tw-ring-color, currentcolor);
|
|
169
|
+
:focus-visible {
|
|
170
|
+
@apply outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-0 focus-visible:ring-offset-transparent
|
|
203
171
|
}
|
|
172
|
+
|
package/dist/index.es.js
CHANGED
|
@@ -59,29 +59,11 @@ var controlPaddingMixin = {
|
|
|
59
59
|
xl: "px-6",
|
|
60
60
|
"2xl": "px-10"
|
|
61
61
|
};
|
|
62
|
-
/**
|
|
63
|
-
* Suppress the focus ring on a surface that is focusable but is not a control —
|
|
64
|
-
* a popover panel, a menu container, a bare cell input inside a table that
|
|
65
|
-
* indicates focus by other means.
|
|
66
|
-
*
|
|
67
|
-
* Still expressed as `ring-0`, and that is why the default ring in
|
|
68
|
-
* `index.css` overrides `--tw-ring-shadow` rather than switching to
|
|
69
|
-
* `inset-ring-*`: `inset-ring` is a different variable, which this would not
|
|
70
|
-
* have silenced, and every surface that had opted out would have got a ring
|
|
71
|
-
* back.
|
|
72
|
-
*/
|
|
73
62
|
var focusedDisabled = "focus-visible:ring-0 focus-visible:ring-offset-0";
|
|
74
63
|
var focusedInvisibleMixin = "focus:bg-surface-field-hover";
|
|
75
64
|
/**
|
|
76
|
-
* The focus ring
|
|
77
|
-
*
|
|
78
|
-
* The product's default ring is the `:focus-visible` rule in `index.css`, and
|
|
79
|
-
* that one is drawn *inside* the border box: an outset ring is paint beyond the
|
|
80
|
-
* box, and any ancestor that clips — a scroller, a truncating cell, a
|
|
81
|
-
* max-height collapse — cuts it. This one is still outset because its only
|
|
82
|
-
* caller is a whole field row sitting inside `p-4`/`p-6` of card padding, where
|
|
83
|
-
* there is room around it and nothing clipping within 16px. Reach for it only
|
|
84
|
-
* where that is true; anywhere else, let the default apply.
|
|
65
|
+
* The focus ring — the single most-seen interaction state in the product, and
|
|
66
|
+
* until now the least tended.
|
|
85
67
|
*
|
|
86
68
|
* Three dead declarations were removed rather than reshuffled:
|
|
87
69
|
* `outline-hidden` + `outline-none` — the same instruction twice.
|
|
@@ -4414,7 +4396,7 @@ var FilterChip = React.forwardRef(function FilterChip({ children, active = false
|
|
|
4414
4396
|
type: "button",
|
|
4415
4397
|
onClick,
|
|
4416
4398
|
disabled,
|
|
4417
|
-
className: cls("inline-flex items-center gap-1 rounded-md", "font-medium whitespace-nowrap select-none shrink-0", "transition-colors duration-150", "focus-visible:outline-none focus-visible:ring-primary/50", sizeClasses[size], !disabled && "cursor-pointer", active ? "bg-surface-active text-text-primary dark:text-text-primary-dark" : cls("bg-transparent text-text-secondary dark:text-text-secondary-dark", !disabled && "hover:bg-surface-hover"), disabled && "opacity-50 cursor-not-allowed", className),
|
|
4399
|
+
className: cls("inline-flex items-center gap-1 rounded-md", "font-medium whitespace-nowrap select-none shrink-0", "transition-colors duration-150", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/50", sizeClasses[size], !disabled && "cursor-pointer", active ? "bg-surface-active text-text-primary dark:text-text-primary-dark" : cls("bg-transparent text-text-secondary dark:text-text-secondary-dark", !disabled && "hover:bg-surface-hover"), disabled && "opacity-50 cursor-not-allowed", className),
|
|
4418
4400
|
...rest,
|
|
4419
4401
|
children: [icon, children]
|
|
4420
4402
|
});
|
|
@@ -5724,7 +5706,7 @@ function Tab({ value, className, innerClassName, children, disabled }) {
|
|
|
5724
5706
|
return /* @__PURE__ */ jsx(TabsPrimitive.Trigger, {
|
|
5725
5707
|
value,
|
|
5726
5708
|
disabled,
|
|
5727
|
-
className: cls("inline-flex items-center justify-center whitespace-nowrap text-sm font-medium transition-all", "focus-visible:outline-none focus-visible:ring-surface-400", "disabled:pointer-events-none disabled:opacity-50", variant === "standard" && "rounded-md px-3 py-1 data-[state=active]:bg-surface-lifted data-[state=active]:text-surface-900 data-[state=active]:shadow-sm dark:data-[state=active]:text-surface-50", variant === "boxy" && cls("flex-shrink-0 flex items-center gap-1.5 px-3.5 h-9 cursor-pointer text-xs font-medium transition-colors group relative box-border", "rounded-t-lg -mb-px border border-transparent border-b-0", "data-[state=active]:bg-surface-card data-[state=active]:border-hairline", "data-[state=active]:text-text-primary dark:data-[state=active]:text-text-primary-dark", "text-text-secondary dark:text-text-secondary-dark hover:bg-surface-hover"), variant === "pill" && cls("px-2 py-0.5 rounded-md text-[10px] font-medium transition-colors", "data-[state=active]:bg-primary/10 data-[state=active]:text-primary dark:data-[state=active]:bg-primary/20 dark:data-[state=active]:text-primary", "text-text-disabled dark:text-text-disabled-dark hover:text-text-secondary dark:hover:text-text-secondary-dark"), className, variant === "standard" && innerClassName),
|
|
5709
|
+
className: cls("inline-flex items-center justify-center whitespace-nowrap text-sm font-medium ring-offset-white transition-all", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-surface-400 focus-visible:ring-offset-2", "disabled:pointer-events-none disabled:opacity-50", variant === "standard" && "rounded-md px-3 py-1 data-[state=active]:bg-surface-lifted data-[state=active]:text-surface-900 data-[state=active]:shadow-sm dark:data-[state=active]:text-surface-50", variant === "boxy" && cls("flex-shrink-0 flex items-center gap-1.5 px-3.5 h-9 cursor-pointer text-xs font-medium transition-colors group relative box-border", "rounded-t-lg -mb-px border border-transparent border-b-0", "data-[state=active]:bg-surface-card data-[state=active]:border-hairline", "data-[state=active]:text-text-primary dark:data-[state=active]:text-text-primary-dark", "text-text-secondary dark:text-text-secondary-dark hover:bg-surface-hover"), variant === "pill" && cls("px-2 py-0.5 rounded-md text-[10px] font-medium transition-colors", "data-[state=active]:bg-primary/10 data-[state=active]:text-primary dark:data-[state=active]:bg-primary/20 dark:data-[state=active]:text-primary", "text-text-disabled dark:text-text-disabled-dark hover:text-text-secondary dark:hover:text-text-secondary-dark"), className, variant === "standard" && innerClassName),
|
|
5728
5710
|
children
|
|
5729
5711
|
});
|
|
5730
5712
|
}
|