Skip to content

Commit 08d72a7

Browse files
committed
refactor: update deprecated start/end utilities to inset-s/e
1 parent 82f3f53 commit 08d72a7

File tree

22 files changed

+271
-274
lines changed

22 files changed

+271
-274
lines changed

.changeset/calm-frogs-report.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@resolid/react-ui": patch
3+
---
4+
5+
refactor: update deprecated start/end utilities to inset-s/e

packages/react-ui/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,16 @@
5858
"@types/react-dom": "^19.2.3",
5959
"babel-plugin-react-compiler": "^1.0.0",
6060
"jsdom": "^27.4.0",
61+
"react": "^19.2.4",
62+
"react-dom": "^19.2.4",
6163
"tsdown": "^0.20.3",
6264
"vitest": "^4.0.18",
6365
"vitest-axe": "pre"
6466
},
6567
"peerDependencies": {
6668
"react": "^19.2.4",
6769
"react-dom": "^19.2.4",
68-
"tailwindcss": "^4.1.18"
70+
"tailwindcss": "^4.2.0"
6971
},
7072
"publishConfig": {
7173
"access": "public",

packages/react-ui/src/components/avatar/avatar-indicator.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export const AvatarIndicator = (
2121
return (
2222
<div
2323
className={tx(
24-
"absolute end-0 flex items-center justify-center",
24+
"absolute inset-e-0 flex items-center justify-center",
2525
direction == "rtl" ? "-translate-x-1/10" : "translate-x-1/10",
2626
position == "top" ? "top-0 -translate-y-1/10" : "bottom-0 translate-y-1/10",
2727
className,

packages/react-ui/src/components/combobox/combobox-trigger.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@ export const ComboboxTrigger = (
4040
as={"button"}
4141
render={render}
4242
ref={refs}
43-
className={tx("absolute end-0 top-0 bottom-0 outline-none", selectSizeStyles[size].chevron)}
43+
className={tx(
44+
"absolute inset-e-0 top-0 bottom-0 outline-none",
45+
selectSizeStyles[size].chevron,
46+
)}
4447
onClick={handleClick}
4548
onFocus={handleFocus}
4649
aria-haspopup="listbox"

packages/react-ui/src/components/drawer/drawer-content.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,22 @@ import { useDrawer } from "./drawer-context";
1212

1313
const placementStyles = {
1414
start: {
15-
base: "start-0 top-0 bottom-0",
15+
base: "inset-s-0 top-0 bottom-0",
1616
open: "translate-x-none",
1717
close: "-translate-x-full",
1818
},
1919
end: {
20-
base: "end-0 top-0 bottom-0",
20+
base: "inset-e-0 top-0 bottom-0",
2121
open: "translate-x-none",
2222
close: "translate-x-full",
2323
},
2424
top: {
25-
base: "top-0 start-0 end-0",
25+
base: "top-0 inset-s-0 inset-e-0",
2626
open: "translate-y-none",
2727
close: "-translate-y-full",
2828
},
2929
bottom: {
30-
base: "bottom-0 start-0 end-0",
30+
base: "bottom-0 inset-s-0 inset-e-0",
3131
open: "translate-y-none",
3232
close: "translate-y-full",
3333
},

packages/react-ui/src/components/input/input-base.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ export const InputBase = (
109109
} as CSSProperties
110110
}
111111
>
112-
{prefix && <InputAffix className={"start-0 w-(--pw)"}>{prefix}</InputAffix>}
112+
{prefix && <InputAffix className={"inset-s-0 w-(--pw)"}>{prefix}</InputAffix>}
113113
<input
114114
ref={refs}
115115
className={tx(
@@ -133,7 +133,7 @@ export const InputBase = (
133133
onChange={handleChange}
134134
{...rest}
135135
/>
136-
{suffix && <InputAffix className={"end-0 w-(--sw)"}>{suffix}</InputAffix>}
136+
{suffix && <InputAffix className={"inset-e-0 w-(--sw)"}>{suffix}</InputAffix>}
137137
</div>
138138
);
139139
};

packages/react-ui/src/components/select/select-chevron.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export const SelectChevron = ({ className }: { className: string }): JSX.Element
66
return (
77
<span
88
className={tx(
9-
"pointer-events-none absolute end-0 top-0 bottom-0 flex items-center justify-center",
9+
"pointer-events-none absolute inset-e-0 top-0 bottom-0 flex items-center justify-center",
1010
className,
1111
)}
1212
>

packages/react-ui/src/components/slider/slider-mark.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,15 @@ export const SliderMark = ({
5252
: "-translate-x-1/2",
5353
vertical
5454
? "bottom-[calc(var(--s-mark-s)+var(--s-mark-o))]"
55-
: "start-[calc(var(--s-mark-s)+var(--s-mark-o))]",
55+
: "inset-s-[calc(var(--s-mark-s)+var(--s-mark-o))]",
5656
)}
5757
>
5858
{mark.label && (
5959
<span
60-
className={tx("absolute text-sm leading-none", vertical ? "start-3.5" : "top-3.5")}
60+
className={tx(
61+
"absolute text-sm leading-none",
62+
vertical ? "inset-s-3.5" : "top-3.5",
63+
)}
6164
>
6265
{mark.label}
6366
</span>

packages/react-ui/src/components/slider/slider-thumb.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ export const SliderThumb = (
145145
className={tx(
146146
vertical
147147
? "bottom-[calc(var(--s-thumb-s0)+var(--s-thumb-o0))]"
148-
: "start-[calc(var(--s-thumb-s0)+var(--s-thumb-o0))]",
148+
: "inset-s-[calc(var(--s-thumb-s0)+var(--s-thumb-o0))]",
149149
className,
150150
)}
151151
onKeyDown={(e) => {
@@ -159,7 +159,7 @@ export const SliderThumb = (
159159
className={tx(
160160
vertical
161161
? "bottom-[calc(var(--s-thumb-s1)+var(--s-thumb-o1))]"
162-
: "start-[calc(var(--s-thumb-s1)+var(--s-thumb-o1))]",
162+
: "inset-s-[calc(var(--s-thumb-s1)+var(--s-thumb-o1))]",
163163
className,
164164
)}
165165
onKeyDown={(e) => {
@@ -177,7 +177,7 @@ export const SliderThumb = (
177177
className={tx(
178178
vertical
179179
? "bottom-[calc(var(--s-thumb-s0)+var(--s-thumb-o0))]"
180-
: "start-[calc(var(--s-thumb-s0)+var(--s-thumb-o0))]",
180+
: "inset-s-[calc(var(--s-thumb-s0)+var(--s-thumb-o0))]",
181181
className,
182182
)}
183183
onKeyDown={(e) => {

packages/react-ui/src/components/slider/slider-track.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export const SliderTrack = (props: PrimitiveProps<"div">): JSX.Element => {
2828
inverted ? "bg-bg-subtle" : colorStyle,
2929
vertical
3030
? "top-(--s-track-e) bottom-(--s-track-s) w-full"
31-
: "start-(--s-track-s) end-(--s-track-e) h-full",
31+
: "inset-s-(--s-track-s) inset-e-(--s-track-e) h-full",
3232
)}
3333
/>
3434
</div>

0 commit comments

Comments
 (0)