@codefast/ui 0.4.0-canary.4 → 0.4.0-canary.5
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/CHANGELOG.md +52 -0
- package/dist/components/accordion.mjs +1 -1
- package/dist/components/alert-dialog.mjs +2 -2
- package/dist/components/alert.mjs +1 -1
- package/dist/components/avatar.mjs +1 -1
- package/dist/components/calendar.mjs +5 -5
- package/dist/components/carousel.mjs +4 -4
- package/dist/components/checkbox-cards.mjs +6 -6
- package/dist/components/checkbox-group.mjs +6 -6
- package/dist/components/checkbox.mjs +6 -6
- package/dist/components/command.mjs +3 -3
- package/dist/components/context-menu.mjs +9 -9
- package/dist/components/dialog.mjs +2 -2
- package/dist/components/drawer.mjs +2 -2
- package/dist/components/dropdown-menu.mjs +9 -9
- package/dist/components/field.mjs +2 -2
- package/dist/components/input-otp.mjs +1 -1
- package/dist/components/item.mjs +1 -1
- package/dist/components/menubar.mjs +9 -9
- package/dist/components/native-select.mjs +2 -2
- package/dist/components/navigation-menu.mjs +4 -4
- package/dist/components/pagination.mjs +2 -2
- package/dist/components/radio-cards.mjs +1 -1
- package/dist/components/radio-group.mjs +1 -1
- package/dist/components/radio.mjs +1 -1
- package/dist/components/resizable.mjs +1 -1
- package/dist/components/select.mjs +4 -4
- package/dist/components/sheet.mjs +1 -1
- package/dist/components/sidebar.mjs +7 -7
- package/dist/components/switch.mjs +2 -2
- package/dist/components/table.mjs +2 -2
- package/dist/components/tabs.mjs +1 -1
- package/dist/components/toggle-group.mjs +1 -1
- package/dist/components/tooltip.mjs +1 -1
- package/dist/variants/alert.mjs +1 -1
- package/dist/variants/badge.mjs +1 -1
- package/dist/variants/button-group.mjs +2 -2
- package/dist/variants/button.mjs +4 -4
- package/dist/variants/input-group.mjs +3 -3
- package/dist/variants/input-number.mjs +3 -3
- package/dist/variants/scroll-area.mjs +1 -1
- package/dist/variants/sheet.mjs +2 -2
- package/dist/variants/sidebar.mjs +1 -1
- package/dist/variants/toggle.mjs +3 -3
- package/package.json +5 -5
- package/src/components/accordion.tsx +1 -1
- package/src/components/alert-dialog.tsx +2 -2
- package/src/components/alert.tsx +1 -1
- package/src/components/avatar.tsx +1 -1
- package/src/components/calendar.tsx +7 -7
- package/src/components/carousel.tsx +6 -6
- package/src/components/checkbox-cards.tsx +6 -5
- package/src/components/checkbox-group.tsx +5 -4
- package/src/components/checkbox.tsx +5 -4
- package/src/components/command.tsx +3 -3
- package/src/components/context-menu.tsx +9 -9
- package/src/components/dialog.tsx +2 -2
- package/src/components/drawer.tsx +2 -2
- package/src/components/dropdown-menu.tsx +9 -9
- package/src/components/field.tsx +2 -2
- package/src/components/input-otp.tsx +1 -1
- package/src/components/item.tsx +1 -1
- package/src/components/menubar.tsx +9 -9
- package/src/components/native-select.tsx +2 -2
- package/src/components/navigation-menu.tsx +4 -4
- package/src/components/pagination.tsx +2 -2
- package/src/components/radio-cards.tsx +1 -1
- package/src/components/radio-group.tsx +1 -1
- package/src/components/radio.tsx +1 -1
- package/src/components/resizable.tsx +1 -1
- package/src/components/select.tsx +4 -4
- package/src/components/sheet.tsx +1 -1
- package/src/components/sidebar.tsx +7 -7
- package/src/components/switch.tsx +2 -2
- package/src/components/table.tsx +2 -2
- package/src/components/tabs.tsx +2 -2
- package/src/components/toggle-group.tsx +1 -1
- package/src/components/tooltip.tsx +1 -1
- package/src/css/foundation/base.css +24 -0
- package/src/css/foundation/motion.css +48 -15
- package/src/css/foundation/source.css +7 -0
- package/src/css/foundation/tokens.css +36 -0
- package/src/css/foundation/variants.css +13 -5
- package/src/css/preset.css +8 -0
- package/src/css/style.css +8 -0
- package/src/css/themes/amber.css +29 -0
- package/src/css/themes/blue.css +29 -0
- package/src/css/themes/cyan.css +29 -0
- package/src/css/themes/emerald.css +29 -0
- package/src/css/themes/fuchsia.css +29 -0
- package/src/css/themes/gray.css +29 -0
- package/src/css/themes/green.css +29 -0
- package/src/css/themes/indigo.css +29 -0
- package/src/css/themes/lime.css +29 -0
- package/src/css/themes/neutral.css +29 -0
- package/src/css/themes/orange.css +29 -0
- package/src/css/themes/pink.css +29 -0
- package/src/css/themes/purple.css +29 -0
- package/src/css/themes/red.css +29 -0
- package/src/css/themes/rose.css +29 -0
- package/src/css/themes/sky.css +29 -0
- package/src/css/themes/slate.css +29 -0
- package/src/css/themes/stone.css +29 -0
- package/src/css/themes/teal.css +29 -0
- package/src/css/themes/violet.css +29 -0
- package/src/css/themes/yellow.css +29 -0
- package/src/css/themes/zinc.css +29 -0
- package/src/variants/alert.ts +1 -1
- package/src/variants/badge.ts +1 -1
- package/src/variants/button-group.ts +2 -2
- package/src/variants/button.ts +4 -4
- package/src/variants/input-group.ts +3 -3
- package/src/variants/input-number.ts +3 -3
- package/src/variants/scroll-area.ts +1 -1
- package/src/variants/sheet.ts +2 -2
- package/src/variants/sidebar.ts +1 -1
- package/src/variants/toggle.ts +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,57 @@
|
|
|
1
1
|
# @codefast/ui
|
|
2
2
|
|
|
3
|
+
## 0.4.0-canary.5
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#503](https://github.com/codefastlabs/codefast/pull/503) [`4738966`](https://github.com/codefastlabs/codefast/commit/473896609b6e4c4713fb8b391e7e6088b31f1cab) Thanks [@thevuong](https://github.com/thevuong)! - feat(checkbox): render the indeterminate state across the checkbox family — fill the box and swap to a minus icon when `data-state="indeterminate"`, with a matching `data-indeterminate` variant
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- [#502](https://github.com/codefastlabs/codefast/pull/502) [`5a61b82`](https://github.com/codefastlabs/codefast/commit/5a61b827ba2a99920dcbf10d2589dfa59c3aa682) Thanks [@thevuong](https://github.com/thevuong)! - feat(motion): add control duration tokens and apply them to form controls
|
|
12
|
+
|
|
13
|
+
Define two semantic timing tokens in the motion foundation and use them across Switch, Checkbox (+ Cards/Group) and Radio (+ Group/Cards):
|
|
14
|
+
|
|
15
|
+
- `--transition-duration-control: 200ms` — container/ring (switch track, checkbox & radio box)
|
|
16
|
+
- `--transition-duration-control-indicator: 300ms` — the moving part (switch thumb, check/dot, native radio dot)
|
|
17
|
+
|
|
18
|
+
They live in the `--transition-duration-*` namespace so they mint clean `duration-control` / `duration-control-indicator` utilities. Because `animate-in` falls back to `--tw-duration`, the same `duration-*` utility drives both the state transitions and the indicator keyframes — one token, one utility, no arbitrary `duration-(--…)` syntax.
|
|
19
|
+
|
|
20
|
+
- [#502](https://github.com/codefastlabs/codefast/pull/502) [`4da0e77`](https://github.com/codefastlabs/codefast/commit/4da0e77e7a7a3fe83709cba44ac8c2013f57755b) Thanks [@thevuong](https://github.com/thevuong)! - style(controls): differentiate motion tokens by role across form controls
|
|
21
|
+
|
|
22
|
+
Apply the design system's motion curves consistently: containers/rings use `ease-snappy`, while the moving/appearing indicators use `ease-spring`.
|
|
23
|
+
|
|
24
|
+
- Switch thumb now eases with `ease-spring` (the positional slide); the track keeps `ease-snappy`.
|
|
25
|
+
- Checkbox, CheckboxCards and CheckboxGroup indicators spring-scale in (`animate-in zoom-in-50 ease-spring`) instead of appearing instantly.
|
|
26
|
+
- RadioGroup and RadioCards dots spring-scale in, centering preserved.
|
|
27
|
+
|
|
28
|
+
- [#502](https://github.com/codefastlabs/codefast/pull/502) [`930a916`](https://github.com/codefastlabs/codefast/commit/930a91678b6d370a273dc21b88a3e4fe06710b63) Thanks [@thevuong](https://github.com/thevuong)! - style(switch, checkbox): apply the ease-snappy motion token to control transitions
|
|
29
|
+
|
|
30
|
+
Switch (track + thumb slide) and the Checkbox family previously used bare `transition-*` utilities, falling back to Tailwind's hardcoded default curve. They now use the design system's `--ease-snappy` token so the timing stays consistent with the rest of the motion system and follows future theme retunes.
|
|
31
|
+
|
|
32
|
+
- [#501](https://github.com/codefastlabs/codefast/pull/501) [`5469e9d`](https://github.com/codefastlabs/codefast/commit/5469e9d9c8c998258f5b008655943a6404b48edf) Thanks [@thevuong](https://github.com/thevuong)! - Migrate physical CSS direction utilities to their logical (start/end) equivalents so components mirror correctly under RTL.
|
|
33
|
+
|
|
34
|
+
- [#502](https://github.com/codefastlabs/codefast/pull/502) [`9813afd`](https://github.com/codefastlabs/codefast/commit/9813afdbe4f5049e720820a048c304a5165c5b0c) Thanks [@thevuong](https://github.com/thevuong)! - style(radio): spring the native radio dot, matching RadioGroup
|
|
35
|
+
|
|
36
|
+
The native `Radio` input drew its dot with a `::before` that doubled as the unchecked fill, so animating it made the dot shrink in — the opposite of the Radix-based RadioGroup/RadioCards dots, which scale up. Move the inner fill onto the input's own `bg-background`/`bg-input` so `::before` is purely the dot, then scale it `0 → 1` with `before:transition-transform before:ease-spring` on check. The dot now grows in with the same spring curve as the other radios; the static appearance is unchanged in light and dark.
|
|
37
|
+
|
|
38
|
+
- [#501](https://github.com/codefastlabs/codefast/pull/501) [`f84c59f`](https://github.com/codefastlabs/codefast/commit/f84c59f176033344002abc473747314d8800233d) Thanks [@thevuong](https://github.com/thevuong)! - fix(ui): flip transforms and resize cursors under `dir="rtl"`
|
|
39
|
+
|
|
40
|
+
Logical properties (`start-*`) flip in RTL but the paired `translate-x`/`cursor`
|
|
41
|
+
utilities do not, leaving elements offset. Add `rtl:` overrides so Dialog and
|
|
42
|
+
AlertDialog stay centred, the Switch thumb slides the correct way, and the
|
|
43
|
+
Carousel buttons, Resizable handle, Select popper offset, Sidebar rail cursors,
|
|
44
|
+
and RadioCards indicator all mirror correctly.
|
|
45
|
+
|
|
46
|
+
- [#502](https://github.com/codefastlabs/codefast/pull/502) [`3647cb2`](https://github.com/codefastlabs/codefast/commit/3647cb28a72616a26f9b0e943217790b2735a7fd) Thanks [@thevuong](https://github.com/thevuong)! - refactor(switch): align default size to the spacing grid
|
|
47
|
+
|
|
48
|
+
Replace the hand-computed `h-[18.4px]` track and `translate-x-[calc(100%-2px)]` thumb offsets with on-grid utilities (`h-4.5`, `translate-x-3.5`/`translate-x-2.5`). The checked thumb travel is unchanged (14px default, 10px small); the default track is 0.4px shorter (18.4px → 18px).
|
|
49
|
+
|
|
50
|
+
- [#497](https://github.com/codefastlabs/codefast/pull/497) [`a9ead5c`](https://github.com/codefastlabs/codefast/commit/a9ead5c97d442093dbd0fab2a846325e6310160f) Thanks [@thevuong](https://github.com/thevuong)! - Replace directional `text-left` utilities with logical `text-start` in accordion, alert-dialog, drawer, field, item, table, alert, and sidebar so text alignment follows the document direction in RTL layouts.
|
|
51
|
+
|
|
52
|
+
- Updated dependencies []:
|
|
53
|
+
- @codefast/tailwind-variants@0.4.0-canary.5
|
|
54
|
+
|
|
3
55
|
## 0.4.0-canary.4
|
|
4
56
|
|
|
5
57
|
### Minor Changes
|
|
@@ -30,7 +30,7 @@ function AccordionTrigger({ children, className, ...props }) {
|
|
|
30
30
|
return /* @__PURE__ */ jsx(Accordion$1.Header, {
|
|
31
31
|
className: "flex",
|
|
32
32
|
children: /* @__PURE__ */ jsxs(Accordion$1.Trigger, {
|
|
33
|
-
className: cn("group/accordion-trigger relative flex flex-1 items-start justify-between rounded-md border border-transparent py-4 text-
|
|
33
|
+
className: cn("group/accordion-trigger relative flex flex-1 items-start justify-between rounded-md border border-transparent py-4 text-start text-sm font-medium transition-all outline-none hover:underline focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:after:border-ring disabled:pointer-events-none disabled:opacity-50 **:data-[slot=accordion-trigger-icon]:ms-auto **:data-[slot=accordion-trigger-icon]:size-4 **:data-[slot=accordion-trigger-icon]:text-muted-foreground", className),
|
|
34
34
|
"data-slot": "accordion-trigger",
|
|
35
35
|
...props,
|
|
36
36
|
children: [
|
|
@@ -31,7 +31,7 @@ function AlertDialogContent({ className, size = "default", ...props }) {
|
|
|
31
31
|
className: "fixed inset-0 z-50 bg-black/10 ease-gentle supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:animation-duration-overlay-in data-open:fade-in-0 data-closed:animate-out data-closed:ease-exit data-closed:animation-duration-overlay-out data-closed:fade-out-0",
|
|
32
32
|
"data-slot": "alert-dialog-overlay"
|
|
33
33
|
}), /* @__PURE__ */ jsx(AlertDialog$1.Content, {
|
|
34
|
-
className: cn("group/alert-dialog-content fixed
|
|
34
|
+
className: cn("group/alert-dialog-content fixed start-1/2 top-1/2 z-50 flex max-h-[calc(100dvh-2rem)] w-full -translate-x-1/2 -translate-y-1/2 flex-col gap-6 overflow-y-auto rounded-xl bg-popover p-6 text-popover-foreground ring-1 ring-foreground/10 ease-ui outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-lg rtl:translate-x-1/2 data-open:animate-in data-open:animation-duration-overlay-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:ease-exit data-closed:animation-duration-overlay-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
|
|
35
35
|
"data-size": size,
|
|
36
36
|
"data-slot": "alert-dialog-content",
|
|
37
37
|
...props
|
|
@@ -43,7 +43,7 @@ function AlertDialogContent({ className, size = "default", ...props }) {
|
|
|
43
43
|
*/
|
|
44
44
|
function AlertDialogHeader({ className, ...props }) {
|
|
45
45
|
return /* @__PURE__ */ jsx("div", {
|
|
46
|
-
className: cn("grid shrink-0 grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-
|
|
46
|
+
className: cn("grid shrink-0 grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-start sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]", className),
|
|
47
47
|
"data-slot": "alert-dialog-header",
|
|
48
48
|
...props
|
|
49
49
|
});
|
|
@@ -41,7 +41,7 @@ function AlertDescription({ className, ...props }) {
|
|
|
41
41
|
*/
|
|
42
42
|
function AlertAction({ className, ...props }) {
|
|
43
43
|
return /* @__PURE__ */ jsx("div", {
|
|
44
|
-
className: cn("absolute top-2.5
|
|
44
|
+
className: cn("absolute end-3 top-2.5", className),
|
|
45
45
|
"data-slot": "alert-action",
|
|
46
46
|
...props
|
|
47
47
|
});
|
|
@@ -38,7 +38,7 @@ function AvatarFallback({ className, ...props }) {
|
|
|
38
38
|
*/
|
|
39
39
|
function AvatarBadge({ className, ...props }) {
|
|
40
40
|
return /* @__PURE__ */ jsx("span", {
|
|
41
|
-
className: cn("absolute
|
|
41
|
+
className: cn("absolute end-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-primary text-primary-foreground bg-blend-color ring-2 ring-background select-none", "group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden", "group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2", "group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2", className),
|
|
42
42
|
"data-slot": "avatar-badge",
|
|
43
43
|
...props
|
|
44
44
|
});
|
|
@@ -25,17 +25,17 @@ function Calendar({ buttonVariant = "ghost", captionLayout = "label", className,
|
|
|
25
25
|
dropdowns: cn("flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium", defaultClassNames.dropdowns),
|
|
26
26
|
dropdown_root: cn("relative rounded-(--cell-radius) border border-input shadow-xs has-focus:border-ring has-focus:ring-3 has-focus:ring-ring/50", defaultClassNames.dropdown_root),
|
|
27
27
|
dropdown: cn("absolute inset-0 bg-popover opacity-0", defaultClassNames.dropdown),
|
|
28
|
-
caption_label: cn("font-medium select-none", captionLayout === "label" ? "text-sm" : "flex h-8 items-center gap-1 rounded-(--cell-radius)
|
|
28
|
+
caption_label: cn("font-medium select-none", captionLayout === "label" ? "text-sm" : "flex h-8 items-center gap-1 rounded-(--cell-radius) ps-2 pe-1 text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground", defaultClassNames.caption_label),
|
|
29
29
|
month_grid: cn("w-full border-collapse", defaultClassNames.month_grid),
|
|
30
30
|
weekdays: cn("flex", defaultClassNames.weekdays),
|
|
31
31
|
weekday: cn("flex-1 rounded-(--cell-radius) text-[0.8rem] font-normal text-muted-foreground select-none", defaultClassNames.weekday),
|
|
32
32
|
week: cn("mt-2 flex w-full", defaultClassNames.week),
|
|
33
33
|
week_number_header: cn("w-(--cell-size) select-none", defaultClassNames.week_number_header),
|
|
34
34
|
week_number: cn("text-[0.8rem] text-muted-foreground select-none", defaultClassNames.week_number),
|
|
35
|
-
day: cn("group/day relative aspect-square h-full w-full rounded-(--cell-radius) p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-
|
|
36
|
-
range_start: cn("relative isolate z-0 rounded-
|
|
35
|
+
day: cn("group/day relative aspect-square h-full w-full rounded-(--cell-radius) p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-e-(--cell-radius)", props.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-s-(--cell-radius)" : "[&:first-child[data-selected=true]_button]:rounded-s-(--cell-radius)", defaultClassNames.day),
|
|
36
|
+
range_start: cn("relative isolate z-0 rounded-s-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:end-0 after:w-4 after:bg-muted", defaultClassNames.range_start),
|
|
37
37
|
range_middle: cn("rounded-none", defaultClassNames.range_middle),
|
|
38
|
-
range_end: cn("relative isolate z-0 rounded-
|
|
38
|
+
range_end: cn("relative isolate z-0 rounded-e-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:start-0 after:w-4 after:bg-muted", defaultClassNames.range_end),
|
|
39
39
|
today: cn("rounded-(--cell-radius) bg-muted text-foreground data-[selected=true]:rounded-none", defaultClassNames.today),
|
|
40
40
|
outside: cn("text-muted-foreground aria-selected:text-muted-foreground", defaultClassNames.outside),
|
|
41
41
|
disabled: cn("text-muted-foreground opacity-50", defaultClassNames.disabled),
|
|
@@ -102,7 +102,7 @@ function CalendarDayButton({ className, day, locale, modifiers, ...props }) {
|
|
|
102
102
|
}, [modifiers.focused]);
|
|
103
103
|
return /* @__PURE__ */ jsx(Button, {
|
|
104
104
|
ref,
|
|
105
|
-
className: cn("relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 border-0 leading-none font-normal group-data-focused/day:relative group-data-focused/day:z-10 group-data-focused/day:border-ring group-data-focused/day:ring-3 group-data-focused/day:ring-ring/50 data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-
|
|
105
|
+
className: cn("relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 border-0 leading-none font-normal group-data-focused/day:relative group-data-focused/day:z-10 group-data-focused/day:border-ring group-data-focused/day:ring-3 group-data-focused/day:ring-ring/50 data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-e-(--cell-radius) data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-muted data-[range-middle=true]:text-foreground data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-s-(--cell-radius) data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-foreground [&>span]:text-xs [&>span]:opacity-70", defaultClassNames.day, className),
|
|
106
106
|
"data-day": day.date.toLocaleDateString(locale?.code),
|
|
107
107
|
"data-range-end": modifiers.range_end,
|
|
108
108
|
"data-range-middle": modifiers.range_middle,
|
|
@@ -98,7 +98,7 @@ function CarouselContent({ __scopeCarousel, className, classNames, ...props }) {
|
|
|
98
98
|
className: cn("overflow-hidden", classNames?.wrapper),
|
|
99
99
|
"data-slot": "carousel-content",
|
|
100
100
|
children: /* @__PURE__ */ jsx("div", {
|
|
101
|
-
className: cn("flex", orientation === "horizontal" ? "-
|
|
101
|
+
className: cn("flex", orientation === "horizontal" ? "-ms-4" : "-mt-4 h-full flex-col", classNames?.content, className),
|
|
102
102
|
...props
|
|
103
103
|
})
|
|
104
104
|
});
|
|
@@ -111,7 +111,7 @@ function CarouselItem({ __scopeCarousel, className, ...props }) {
|
|
|
111
111
|
const { orientation } = useCarouselContext(CAROUSEL_ITEM_NAME, __scopeCarousel);
|
|
112
112
|
return /* @__PURE__ */ jsx("div", {
|
|
113
113
|
"aria-roledescription": "slide",
|
|
114
|
-
className: cn("min-w-0 shrink-0 grow-0 basis-full", orientation === "horizontal" ? "
|
|
114
|
+
className: cn("min-w-0 shrink-0 grow-0 basis-full", orientation === "horizontal" ? "ps-4" : "pt-4", className),
|
|
115
115
|
"data-slot": "carousel-item",
|
|
116
116
|
role: "group",
|
|
117
117
|
...props
|
|
@@ -125,7 +125,7 @@ function CarouselPrevious({ __scopeCarousel, className, size = "icon-sm", varian
|
|
|
125
125
|
const { canScrollPrev, orientation, scrollPrev } = useCarouselContext(CAROUSEL_PREVIOUS_NAME, __scopeCarousel);
|
|
126
126
|
return /* @__PURE__ */ jsxs(Button, {
|
|
127
127
|
"aria-label": "Previous slide",
|
|
128
|
-
className: cn("absolute touch-manipulation rounded-full", orientation === "horizontal" ? "top-1/2 -
|
|
128
|
+
className: cn("absolute touch-manipulation rounded-full", orientation === "horizontal" ? "-start-12 top-1/2 -translate-y-1/2 active:not-aria-[haspopup]:translate-y-[calc(-50%+1px)]" : "start-1/2 -top-12 -translate-x-1/2 rotate-90 rtl:translate-x-1/2", className),
|
|
129
129
|
"data-slot": "carousel-previous",
|
|
130
130
|
disabled: !canScrollPrev,
|
|
131
131
|
size,
|
|
@@ -146,7 +146,7 @@ function CarouselNext({ __scopeCarousel, className, size = "icon-sm", variant =
|
|
|
146
146
|
const { canScrollNext, orientation, scrollNext } = useCarouselContext(CAROUSEL_NEXT_NAME, __scopeCarousel);
|
|
147
147
|
return /* @__PURE__ */ jsxs(Button, {
|
|
148
148
|
"aria-label": "Next slide",
|
|
149
|
-
className: cn("absolute touch-manipulation rounded-full", orientation === "horizontal" ? "top-1/2 -
|
|
149
|
+
className: cn("absolute touch-manipulation rounded-full", orientation === "horizontal" ? "-end-12 top-1/2 -translate-y-1/2 active:not-aria-[haspopup]:translate-y-[calc(-50%+1px)]" : "start-1/2 -bottom-12 -translate-x-1/2 rotate-90 rtl:translate-x-1/2", className),
|
|
150
150
|
"data-slot": "carousel-next",
|
|
151
151
|
disabled: !canScrollNext,
|
|
152
152
|
size,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { cn } from "../lib/utils.mjs";
|
|
2
2
|
import { Label } from "./label.mjs";
|
|
3
3
|
import { CheckboxGroup, CheckboxGroupIndicator, CheckboxGroupItem } from "../primitives/checkbox-group.mjs";
|
|
4
|
-
import { CheckIcon } from "lucide-react";
|
|
4
|
+
import { CheckIcon, MinusIcon } from "lucide-react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
//#region src/components/checkbox-cards.tsx
|
|
7
7
|
/**
|
|
@@ -18,16 +18,16 @@ function CheckboxCards(props) {
|
|
|
18
18
|
*/
|
|
19
19
|
function CheckboxCardsItem({ checkboxClassName, children, className, ...props }) {
|
|
20
20
|
return /* @__PURE__ */ jsxs(Label, {
|
|
21
|
-
className: cn("flex items-start gap-3 rounded-md border border-input p-3 transition has-focus-visible:border-ring has-disabled:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5", className),
|
|
21
|
+
className: cn("flex items-start gap-3 rounded-md border border-input p-3 transition has-focus-visible:border-ring has-disabled:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-data-indeterminate:border-primary/30 has-data-indeterminate:bg-primary/5", className),
|
|
22
22
|
"data-slot": "checkbox-card",
|
|
23
23
|
children: [/* @__PURE__ */ jsx(CheckboxGroupItem, {
|
|
24
|
-
className: cn("peer relative flex size-4 shrink-0 items-center justify-center rounded-sm border border-input shadow-xs transition-shadow outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary", checkboxClassName),
|
|
24
|
+
className: cn("peer relative flex size-4 shrink-0 items-center justify-center rounded-sm border border-input shadow-xs transition-shadow duration-control ease-snappy outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary data-indeterminate:border-primary data-indeterminate:bg-primary data-indeterminate:text-primary-foreground dark:data-indeterminate:bg-primary", checkboxClassName),
|
|
25
25
|
"data-slot": "checkbox-card-item",
|
|
26
26
|
...props,
|
|
27
|
-
children: /* @__PURE__ */
|
|
28
|
-
className: "grid place-content-center text-current
|
|
27
|
+
children: /* @__PURE__ */ jsxs(CheckboxGroupIndicator, {
|
|
28
|
+
className: "group/checkbox-card-indicator grid animate-in place-content-center text-current duration-control-indicator ease-spring zoom-in-50 [&>svg]:size-3.5",
|
|
29
29
|
"data-slot": "checkbox-card-indicator",
|
|
30
|
-
children: /* @__PURE__ */ jsx(CheckIcon, {})
|
|
30
|
+
children: [/* @__PURE__ */ jsx(CheckIcon, { className: "group-data-indeterminate/checkbox-card-indicator:hidden" }), /* @__PURE__ */ jsx(MinusIcon, { className: "hidden group-data-indeterminate/checkbox-card-indicator:block" })]
|
|
31
31
|
})
|
|
32
32
|
}), children]
|
|
33
33
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { cn } from "../lib/utils.mjs";
|
|
2
2
|
import { CheckboxGroup as CheckboxGroup$1, CheckboxGroupIndicator, CheckboxGroupItem as CheckboxGroupItem$1 } from "../primitives/checkbox-group.mjs";
|
|
3
|
-
import { CheckIcon } from "lucide-react";
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { CheckIcon, MinusIcon } from "lucide-react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/checkbox-group.tsx
|
|
6
6
|
/**
|
|
7
7
|
* @since 0.3.16-canary.0
|
|
@@ -18,13 +18,13 @@ function CheckboxGroup({ className, ...props }) {
|
|
|
18
18
|
*/
|
|
19
19
|
function CheckboxGroupItem({ className, ...props }) {
|
|
20
20
|
return /* @__PURE__ */ jsx(CheckboxGroupItem$1, {
|
|
21
|
-
className: cn("peer relative flex size-4 shrink-0 items-center justify-center rounded-sm border border-input shadow-xs transition-shadow outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary", className),
|
|
21
|
+
className: cn("peer relative flex size-4 shrink-0 items-center justify-center rounded-sm border border-input shadow-xs transition-shadow duration-control ease-snappy outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary data-indeterminate:border-primary data-indeterminate:bg-primary data-indeterminate:text-primary-foreground dark:data-indeterminate:bg-primary", className),
|
|
22
22
|
"data-slot": "checkbox-group-item",
|
|
23
23
|
...props,
|
|
24
|
-
children: /* @__PURE__ */
|
|
25
|
-
className: "grid place-content-center text-current
|
|
24
|
+
children: /* @__PURE__ */ jsxs(CheckboxGroupIndicator, {
|
|
25
|
+
className: "group/checkbox-group-indicator grid animate-in place-content-center text-current duration-control-indicator ease-spring zoom-in-50 [&>svg]:size-3.5",
|
|
26
26
|
"data-slot": "checkbox-group-indicator",
|
|
27
|
-
children: /* @__PURE__ */ jsx(CheckIcon, {})
|
|
27
|
+
children: [/* @__PURE__ */ jsx(CheckIcon, { className: "group-data-indeterminate/checkbox-group-indicator:hidden" }), /* @__PURE__ */ jsx(MinusIcon, { className: "hidden group-data-indeterminate/checkbox-group-indicator:block" })]
|
|
28
28
|
})
|
|
29
29
|
});
|
|
30
30
|
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { cn } from "../lib/utils.mjs";
|
|
2
|
-
import { CheckIcon } from "lucide-react";
|
|
2
|
+
import { CheckIcon, MinusIcon } from "lucide-react";
|
|
3
3
|
import { Checkbox as Checkbox$1 } from "radix-ui";
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/checkbox.tsx
|
|
6
6
|
/**
|
|
7
7
|
* @since 0.3.16-canary.0
|
|
8
8
|
*/
|
|
9
9
|
function Checkbox({ className, ...props }) {
|
|
10
10
|
return /* @__PURE__ */ jsx(Checkbox$1.Root, {
|
|
11
|
-
className: cn("peer relative flex size-4 shrink-0 items-center justify-center rounded-sm border border-input shadow-xs transition-shadow outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary", className),
|
|
11
|
+
className: cn("peer relative flex size-4 shrink-0 items-center justify-center rounded-sm border border-input shadow-xs transition-shadow duration-control ease-snappy outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary data-indeterminate:border-primary data-indeterminate:bg-primary data-indeterminate:text-primary-foreground dark:data-indeterminate:bg-primary", className),
|
|
12
12
|
"data-slot": "checkbox",
|
|
13
13
|
...props,
|
|
14
|
-
children: /* @__PURE__ */
|
|
15
|
-
className: "grid place-content-center text-current
|
|
14
|
+
children: /* @__PURE__ */ jsxs(Checkbox$1.Indicator, {
|
|
15
|
+
className: "group/checkbox-indicator grid animate-in place-content-center text-current duration-control-indicator ease-spring zoom-in-50 [&>svg]:size-3.5",
|
|
16
16
|
"data-slot": "checkbox-indicator",
|
|
17
|
-
children: /* @__PURE__ */ jsx(CheckIcon, {})
|
|
17
|
+
children: [/* @__PURE__ */ jsx(CheckIcon, { className: "group-data-indeterminate/checkbox-indicator:hidden" }), /* @__PURE__ */ jsx(MinusIcon, { className: "hidden group-data-indeterminate/checkbox-indicator:block" })]
|
|
18
18
|
})
|
|
19
19
|
});
|
|
20
20
|
}
|
|
@@ -41,7 +41,7 @@ function CommandInput({ className, ...props }) {
|
|
|
41
41
|
className: "p-1 pb-0",
|
|
42
42
|
"data-slot": "command-input-wrapper",
|
|
43
43
|
children: /* @__PURE__ */ jsxs(InputGroup, {
|
|
44
|
-
className: "h-8! rounded-lg! border-input/30 bg-input/30 shadow-none! *:data-[slot=input-group-addon]:
|
|
44
|
+
className: "h-8! rounded-lg! border-input/30 bg-input/30 shadow-none! *:data-[slot=input-group-addon]:ps-2!",
|
|
45
45
|
children: [/* @__PURE__ */ jsx(Command$1.Input, {
|
|
46
46
|
className: cn("w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50", className),
|
|
47
47
|
"data-slot": "command-input",
|
|
@@ -98,7 +98,7 @@ function CommandItem({ children, className, ...props }) {
|
|
|
98
98
|
className: cn("group/command-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-selected:bg-muted data-selected:text-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:**:[svg]:text-foreground", className),
|
|
99
99
|
"data-slot": "command-item",
|
|
100
100
|
...props,
|
|
101
|
-
children: [children, /* @__PURE__ */ jsx(CheckIcon, { className: "
|
|
101
|
+
children: [children, /* @__PURE__ */ jsx(CheckIcon, { className: "ms-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-checked/command-item:opacity-100" })]
|
|
102
102
|
});
|
|
103
103
|
}
|
|
104
104
|
/**
|
|
@@ -116,7 +116,7 @@ function CommandLoading({ className, ...props }) {
|
|
|
116
116
|
*/
|
|
117
117
|
function CommandShortcut({ className, ...props }) {
|
|
118
118
|
return /* @__PURE__ */ jsx("span", {
|
|
119
|
-
className: cn("
|
|
119
|
+
className: cn("ms-auto text-xs tracking-widest text-muted-foreground group-data-selected/command-item:text-foreground", className),
|
|
120
120
|
"data-slot": "command-shortcut",
|
|
121
121
|
...props
|
|
122
122
|
});
|
|
@@ -54,11 +54,11 @@ function ContextMenuRadioGroup({ ...props }) {
|
|
|
54
54
|
*/
|
|
55
55
|
function ContextMenuSubTrigger({ children, className, inset, ...props }) {
|
|
56
56
|
return /* @__PURE__ */ jsxs(ContextMenu$1.SubTrigger, {
|
|
57
|
-
className: cn("flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:
|
|
57
|
+
className: cn("flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:ps-8 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
58
58
|
"data-inset": inset,
|
|
59
59
|
"data-slot": "context-menu-sub-trigger",
|
|
60
60
|
...props,
|
|
61
|
-
children: [children, /* @__PURE__ */ jsx(ChevronRightIcon, { className: "
|
|
61
|
+
children: [children, /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ms-auto rtl:rotate-180" })]
|
|
62
62
|
});
|
|
63
63
|
}
|
|
64
64
|
/**
|
|
@@ -89,7 +89,7 @@ function ContextMenuContent({ className, ...props }) {
|
|
|
89
89
|
*/
|
|
90
90
|
function ContextMenuItem({ className, inset, variant = "default", ...props }) {
|
|
91
91
|
return /* @__PURE__ */ jsx(ContextMenu$1.Item, {
|
|
92
|
-
className: cn("group/context-menu-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:
|
|
92
|
+
className: cn("group/context-menu-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:ps-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 focus:*:[svg]:text-accent-foreground data-[variant=destructive]:*:[svg]:text-destructive", className),
|
|
93
93
|
"data-inset": inset,
|
|
94
94
|
"data-slot": "context-menu-item",
|
|
95
95
|
"data-variant": variant,
|
|
@@ -102,12 +102,12 @@ function ContextMenuItem({ className, inset, variant = "default", ...props }) {
|
|
|
102
102
|
function ContextMenuCheckboxItem({ checked, children, className, inset, ...props }) {
|
|
103
103
|
return /* @__PURE__ */ jsxs(ContextMenu$1.CheckboxItem, {
|
|
104
104
|
checked,
|
|
105
|
-
className: cn("relative flex cursor-default items-center gap-2 rounded-sm py-1.5
|
|
105
|
+
className: cn("relative flex cursor-default items-center gap-2 rounded-sm py-1.5 ps-2 pe-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:ps-8 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
106
106
|
"data-inset": inset,
|
|
107
107
|
"data-slot": "context-menu-checkbox-item",
|
|
108
108
|
...props,
|
|
109
109
|
children: [/* @__PURE__ */ jsx("span", {
|
|
110
|
-
className: "pointer-events-none absolute
|
|
110
|
+
className: "pointer-events-none absolute end-2",
|
|
111
111
|
children: /* @__PURE__ */ jsx(ContextMenu$1.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, {}) })
|
|
112
112
|
}), children]
|
|
113
113
|
});
|
|
@@ -117,12 +117,12 @@ function ContextMenuCheckboxItem({ checked, children, className, inset, ...props
|
|
|
117
117
|
*/
|
|
118
118
|
function ContextMenuRadioItem({ children, className, inset, ...props }) {
|
|
119
119
|
return /* @__PURE__ */ jsxs(ContextMenu$1.RadioItem, {
|
|
120
|
-
className: cn("relative flex cursor-default items-center gap-2 rounded-sm py-1.5
|
|
120
|
+
className: cn("relative flex cursor-default items-center gap-2 rounded-sm py-1.5 ps-2 pe-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:ps-8 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
121
121
|
"data-inset": inset,
|
|
122
122
|
"data-slot": "context-menu-radio-item",
|
|
123
123
|
...props,
|
|
124
124
|
children: [/* @__PURE__ */ jsx("span", {
|
|
125
|
-
className: "pointer-events-none absolute
|
|
125
|
+
className: "pointer-events-none absolute end-2",
|
|
126
126
|
children: /* @__PURE__ */ jsx(ContextMenu$1.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, {}) })
|
|
127
127
|
}), children]
|
|
128
128
|
});
|
|
@@ -132,7 +132,7 @@ function ContextMenuRadioItem({ children, className, inset, ...props }) {
|
|
|
132
132
|
*/
|
|
133
133
|
function ContextMenuLabel({ className, inset, ...props }) {
|
|
134
134
|
return /* @__PURE__ */ jsx(ContextMenu$1.Label, {
|
|
135
|
-
className: cn("px-2 py-1.5 text-xs font-medium text-muted-foreground data-inset:
|
|
135
|
+
className: cn("px-2 py-1.5 text-xs font-medium text-muted-foreground data-inset:ps-8", className),
|
|
136
136
|
"data-inset": inset,
|
|
137
137
|
"data-slot": "context-menu-label",
|
|
138
138
|
...props
|
|
@@ -153,7 +153,7 @@ function ContextMenuSeparator({ className, ...props }) {
|
|
|
153
153
|
*/
|
|
154
154
|
function ContextMenuShortcut({ className, ...props }) {
|
|
155
155
|
return /* @__PURE__ */ jsx("span", {
|
|
156
|
-
className: cn("
|
|
156
|
+
className: cn("ms-auto text-xs tracking-widest text-muted-foreground group-focus/context-menu-item:text-accent-foreground", className),
|
|
157
157
|
"data-slot": "context-menu-shortcut",
|
|
158
158
|
...props
|
|
159
159
|
});
|
|
@@ -32,14 +32,14 @@ function DialogContent({ children, className, showCloseButton = true, ...props }
|
|
|
32
32
|
className: "fixed inset-0 isolate z-50 bg-black/10 ease-gentle supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:animation-duration-overlay-in data-open:fade-in-0 data-closed:animate-out data-closed:ease-exit data-closed:animation-duration-overlay-out data-closed:fade-out-0",
|
|
33
33
|
"data-slot": "dialog-overlay"
|
|
34
34
|
}), /* @__PURE__ */ jsxs(Dialog$1.Content, {
|
|
35
|
-
className: cn("fixed
|
|
35
|
+
className: cn("fixed start-1/2 top-1/2 z-50 flex max-h-[calc(100dvh-2rem)] w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 flex-col gap-6 overflow-y-auto rounded-xl bg-popover p-6 text-sm text-popover-foreground ring-1 ring-foreground/10 ease-ui outline-none sm:max-w-md rtl:translate-x-1/2 data-open:animate-in data-open:animation-duration-overlay-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:ease-exit data-closed:animation-duration-overlay-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
|
|
36
36
|
"data-slot": "dialog-content",
|
|
37
37
|
...props,
|
|
38
38
|
children: [children, showCloseButton ? /* @__PURE__ */ jsx(Dialog$1.Close, {
|
|
39
39
|
asChild: true,
|
|
40
40
|
"data-slot": "dialog-close",
|
|
41
41
|
children: /* @__PURE__ */ jsxs(Button, {
|
|
42
|
-
className: "absolute
|
|
42
|
+
className: "absolute end-4 top-4",
|
|
43
43
|
size: "icon-sm",
|
|
44
44
|
variant: "ghost",
|
|
45
45
|
children: [/* @__PURE__ */ jsx(XIcon, {}), /* @__PURE__ */ jsx("span", {
|
|
@@ -32,7 +32,7 @@ function DrawerContent({ children, className, ...props }) {
|
|
|
32
32
|
className: "fixed inset-0 z-50 bg-black/10 ease-gentle supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:animation-duration-panel-in data-open:fade-in-0 data-closed:animate-out data-closed:ease-exit data-closed:animation-duration-panel-out data-closed:fade-out-0",
|
|
33
33
|
"data-slot": "drawer-overlay"
|
|
34
34
|
}), /* @__PURE__ */ jsxs(Drawer$1.Content, {
|
|
35
|
-
className: cn("group/drawer-content fixed z-50 flex h-auto flex-col bg-popover text-sm text-popover-foreground data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-xl data-[vaul-drawer-direction=bottom]:border-t data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:
|
|
35
|
+
className: cn("group/drawer-content fixed z-50 flex h-auto flex-col bg-popover text-sm text-popover-foreground data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-xl data-[vaul-drawer-direction=bottom]:border-t data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:start-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:rounded-e-xl data-[vaul-drawer-direction=left]:border-e data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:end-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:rounded-s-xl data-[vaul-drawer-direction=right]:border-s data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-xl data-[vaul-drawer-direction=top]:border-b data-[vaul-drawer-direction=left]:sm:max-w-sm data-[vaul-drawer-direction=right]:sm:max-w-sm", className),
|
|
36
36
|
"data-slot": "drawer-content",
|
|
37
37
|
...props,
|
|
38
38
|
children: [/* @__PURE__ */ jsx("div", { className: "mx-auto mt-4 hidden h-1.5 w-25 shrink-0 rounded-full bg-muted group-data-[vaul-drawer-direction=bottom]/drawer-content:block" }), children]
|
|
@@ -44,7 +44,7 @@ function DrawerContent({ children, className, ...props }) {
|
|
|
44
44
|
*/
|
|
45
45
|
function DrawerHeader({ className, ...props }) {
|
|
46
46
|
return /* @__PURE__ */ jsx("div", {
|
|
47
|
-
className: cn("flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-1.5 md:text-
|
|
47
|
+
className: cn("flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-1.5 md:text-start", className),
|
|
48
48
|
"data-slot": "drawer-header",
|
|
49
49
|
...props
|
|
50
50
|
});
|
|
@@ -53,11 +53,11 @@ function DropdownMenuRadioGroup({ ...props }) {
|
|
|
53
53
|
*/
|
|
54
54
|
function DropdownMenuSubTrigger({ children, className, inset, ...props }) {
|
|
55
55
|
return /* @__PURE__ */ jsxs(DropdownMenu$1.SubTrigger, {
|
|
56
|
-
className: cn("flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:
|
|
56
|
+
className: cn("flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:ps-8 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
57
57
|
"data-inset": inset,
|
|
58
58
|
"data-slot": "dropdown-menu-sub-trigger",
|
|
59
59
|
...props,
|
|
60
|
-
children: [children, /* @__PURE__ */ jsx(ChevronRightIcon, { className: "
|
|
60
|
+
children: [children, /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ms-auto rtl:rotate-180" })]
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
63
|
/**
|
|
@@ -93,7 +93,7 @@ function DropdownMenuContent({ align = "start", className, sideOffset = 4, ...pr
|
|
|
93
93
|
*/
|
|
94
94
|
function DropdownMenuItem({ className, inset, variant = "default", ...props }) {
|
|
95
95
|
return /* @__PURE__ */ jsx(DropdownMenu$1.Item, {
|
|
96
|
-
className: cn("group/dropdown-menu-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:
|
|
96
|
+
className: cn("group/dropdown-menu-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:ps-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive", className),
|
|
97
97
|
"data-inset": inset,
|
|
98
98
|
"data-slot": "dropdown-menu-item",
|
|
99
99
|
"data-variant": variant,
|
|
@@ -106,12 +106,12 @@ function DropdownMenuItem({ className, inset, variant = "default", ...props }) {
|
|
|
106
106
|
function DropdownMenuCheckboxItem({ checked, children, className, inset, ...props }) {
|
|
107
107
|
return /* @__PURE__ */ jsxs(DropdownMenu$1.CheckboxItem, {
|
|
108
108
|
checked,
|
|
109
|
-
className: cn("relative flex cursor-default items-center gap-2 rounded-sm py-1.5
|
|
109
|
+
className: cn("relative flex cursor-default items-center gap-2 rounded-sm py-1.5 ps-2 pe-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:ps-8 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
110
110
|
"data-inset": inset,
|
|
111
111
|
"data-slot": "dropdown-menu-checkbox-item",
|
|
112
112
|
...props,
|
|
113
113
|
children: [/* @__PURE__ */ jsx("span", {
|
|
114
|
-
className: "pointer-events-none absolute
|
|
114
|
+
className: "pointer-events-none absolute end-2 flex items-center justify-center",
|
|
115
115
|
"data-slot": "dropdown-menu-checkbox-item-indicator",
|
|
116
116
|
children: /* @__PURE__ */ jsx(DropdownMenu$1.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, {}) })
|
|
117
117
|
}), children]
|
|
@@ -122,12 +122,12 @@ function DropdownMenuCheckboxItem({ checked, children, className, inset, ...prop
|
|
|
122
122
|
*/
|
|
123
123
|
function DropdownMenuRadioItem({ children, className, inset, ...props }) {
|
|
124
124
|
return /* @__PURE__ */ jsxs(DropdownMenu$1.RadioItem, {
|
|
125
|
-
className: cn("relative flex cursor-default items-center gap-2 rounded-sm py-1.5
|
|
125
|
+
className: cn("relative flex cursor-default items-center gap-2 rounded-sm py-1.5 ps-2 pe-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:ps-8 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
126
126
|
"data-inset": inset,
|
|
127
127
|
"data-slot": "dropdown-menu-radio-item",
|
|
128
128
|
...props,
|
|
129
129
|
children: [/* @__PURE__ */ jsx("span", {
|
|
130
|
-
className: "pointer-events-none absolute
|
|
130
|
+
className: "pointer-events-none absolute end-2 flex items-center justify-center",
|
|
131
131
|
"data-slot": "dropdown-menu-radio-item-indicator",
|
|
132
132
|
children: /* @__PURE__ */ jsx(DropdownMenu$1.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, {}) })
|
|
133
133
|
}), children]
|
|
@@ -138,7 +138,7 @@ function DropdownMenuRadioItem({ children, className, inset, ...props }) {
|
|
|
138
138
|
*/
|
|
139
139
|
function DropdownMenuLabel({ className, inset, ...props }) {
|
|
140
140
|
return /* @__PURE__ */ jsx(DropdownMenu$1.Label, {
|
|
141
|
-
className: cn("px-2 py-1.5 text-xs font-medium text-muted-foreground data-inset:
|
|
141
|
+
className: cn("px-2 py-1.5 text-xs font-medium text-muted-foreground data-inset:ps-8", className),
|
|
142
142
|
"data-inset": inset,
|
|
143
143
|
"data-slot": "dropdown-menu-label",
|
|
144
144
|
...props
|
|
@@ -159,7 +159,7 @@ function DropdownMenuSeparator({ className, ...props }) {
|
|
|
159
159
|
*/
|
|
160
160
|
function DropdownMenuShortcut({ className, ...props }) {
|
|
161
161
|
return /* @__PURE__ */ jsx("span", {
|
|
162
|
-
className: cn("
|
|
162
|
+
className: cn("ms-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground", className),
|
|
163
163
|
"data-slot": "dropdown-menu-shortcut",
|
|
164
164
|
...props
|
|
165
165
|
});
|
|
@@ -86,7 +86,7 @@ function FieldTitle({ className, ...props }) {
|
|
|
86
86
|
*/
|
|
87
87
|
function FieldDescription({ className, ...props }) {
|
|
88
88
|
return /* @__PURE__ */ jsx("p", {
|
|
89
|
-
className: cn("text-
|
|
89
|
+
className: cn("text-start text-sm leading-normal font-normal text-muted-foreground group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5", "last:mt-0 nth-last-2:-mt-1", "[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className),
|
|
90
90
|
"data-slot": "field-description",
|
|
91
91
|
...props
|
|
92
92
|
});
|
|
@@ -117,7 +117,7 @@ function FieldError({ children, className, errors, ...props }) {
|
|
|
117
117
|
const uniqueErrors = [...new Map(errors.map((error) => [error?.message, error])).values()];
|
|
118
118
|
if (uniqueErrors.length === 1) return uniqueErrors[0]?.message ?? null;
|
|
119
119
|
return /* @__PURE__ */ jsx("ul", {
|
|
120
|
-
className: "
|
|
120
|
+
className: "ms-4 flex list-disc flex-col gap-1",
|
|
121
121
|
children: uniqueErrors.map((error) => error?.message ? /* @__PURE__ */ jsx("li", { children: error.message }, error.message) : null)
|
|
122
122
|
});
|
|
123
123
|
}, [errors]);
|
|
@@ -36,7 +36,7 @@ function InputOTPSlot({ className, index, ...props }) {
|
|
|
36
36
|
if (slot === void 0) throw new Error(`InputOTPSlot: no slot at index ${index}`);
|
|
37
37
|
const { char, hasFakeCaret, isActive } = slot;
|
|
38
38
|
return /* @__PURE__ */ jsxs("div", {
|
|
39
|
-
className: cn("relative flex size-9 items-center justify-center border-y border-
|
|
39
|
+
className: cn("relative flex size-9 items-center justify-center border-y border-e border-input text-sm shadow-xs transition-all outline-none first:rounded-s-md first:border-s last:rounded-e-md aria-invalid:border-destructive data-[active=true]:z-10 data-[active=true]:border-ring data-[active=true]:ring-3 data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:border-destructive data-[active=true]:aria-invalid:ring-destructive/20 dark:bg-input/30 dark:data-[active=true]:aria-invalid:ring-destructive/40", className),
|
|
40
40
|
"data-active": isActive,
|
|
41
41
|
"data-slot": "input-otp-slot",
|
|
42
42
|
...props,
|
package/dist/components/item.mjs
CHANGED
|
@@ -81,7 +81,7 @@ function ItemTitle({ className, ...props }) {
|
|
|
81
81
|
*/
|
|
82
82
|
function ItemDescription({ className, ...props }) {
|
|
83
83
|
return /* @__PURE__ */ jsx("p", {
|
|
84
|
-
className: cn("line-clamp-2 text-
|
|
84
|
+
className: cn("line-clamp-2 text-start text-sm leading-normal font-normal text-muted-foreground group-data-[size=xs]/item:text-xs [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className),
|
|
85
85
|
"data-slot": "item-description",
|
|
86
86
|
...props
|
|
87
87
|
});
|