@codefast/ui 0.11.0 → 0.13.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/CHANGELOG.md +36 -0
- package/README.md +2 -2
- package/dist/components/accordion.js +1 -1
- package/dist/components/bubble.js +1 -1
- package/dist/components/calendar.js +2 -2
- package/dist/components/checkbox-cards.js +1 -1
- package/dist/components/checkbox-group.js +1 -1
- package/dist/components/checkbox.js +1 -1
- package/dist/components/input-group.js +2 -2
- package/dist/components/input-number.js +6 -6
- package/dist/components/input-otp.js +1 -1
- package/dist/components/input.js +1 -1
- package/dist/components/message-scroller.d.ts +1 -1
- package/dist/components/native-select.js +1 -1
- package/dist/components/navigation-menu.js +2 -2
- package/dist/components/radio-cards.js +1 -1
- package/dist/components/radio-group.js +1 -1
- package/dist/components/radio.js +1 -1
- package/dist/components/scroll-area.js +1 -1
- package/dist/components/select.js +1 -1
- package/dist/components/slider.js +1 -1
- package/dist/components/switch.js +1 -1
- package/dist/components/tabs.js +2 -2
- package/dist/components/textarea.js +1 -1
- package/dist/hooks/use-message-scroller-controller.d.ts +1 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.js +3 -1
- package/dist/lib/message-scroller/geometry.d.ts +1 -8
- package/dist/lib/message-scroller/geometry.js +1 -1
- package/dist/lib/message-scroller/stores.d.ts +2 -6
- package/dist/lib/message-scroller/stores.js +1 -1
- package/dist/lib/message-scroller/types.d.ts +1 -7
- package/dist/lib/message-scroller/types.js +1 -1
- package/dist/primitives/checkbox-group.js +1 -1
- package/dist/primitives/message-scroller.d.ts +2 -1
- package/dist/variants/attachment.js +1 -1
- package/dist/variants/badge.js +3 -3
- package/dist/variants/bubble.js +1 -1
- package/dist/variants/button.js +3 -3
- package/dist/variants/input-group.js +1 -1
- package/dist/variants/item.js +1 -1
- package/dist/variants/navigation-menu.js +1 -1
- package/dist/variants/toggle.js +1 -1
- package/package.json +4 -28
- package/src/css/foundation/base.css +1 -1
- package/src/css/foundation/tokens.css +2 -0
- package/src/css/themes/amber.css +8 -8
- package/src/css/themes/blue.css +7 -7
- package/src/css/themes/cyan.css +8 -8
- package/src/css/themes/emerald.css +8 -8
- package/src/css/themes/fuchsia.css +10 -10
- package/src/css/themes/gray.css +4 -4
- package/src/css/themes/green.css +8 -8
- package/src/css/themes/indigo.css +8 -8
- package/src/css/themes/lime.css +8 -8
- package/src/css/themes/neutral.css +3 -3
- package/src/css/themes/orange.css +8 -8
- package/src/css/themes/pink.css +10 -10
- package/src/css/themes/purple.css +8 -8
- package/src/css/themes/red.css +10 -10
- package/src/css/themes/rose.css +10 -10
- package/src/css/themes/sky.css +8 -8
- package/src/css/themes/slate.css +4 -4
- package/src/css/themes/stone.css +2 -2
- package/src/css/themes/teal.css +8 -8
- package/src/css/themes/violet.css +8 -8
- package/src/css/themes/yellow.css +8 -8
- package/src/css/themes/zinc.css +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,41 @@
|
|
|
1
1
|
# @codefast/ui
|
|
2
2
|
|
|
3
|
+
## 0.13.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#1054](https://github.com/codefastlabs/codefast/pull/1054) The `@codefast/ui/lib/message-scroller/geometry`, `stores` and `types` subpaths are no longer published: they are the
|
|
8
|
+
message-scroller primitive's internals. Its public types now ship from `@codefast/ui/primitives/message-scroller`, and
|
|
9
|
+
`MessageScrollerButtonRenderState` and `MessageScrollerButtonDirection` — the button's `render` state and `direction` —
|
|
10
|
+
are also exported from `@codefast/ui/message-scroller` and the root entry, so every type in the scroller's public
|
|
11
|
+
signatures stays nameable.
|
|
12
|
+
|
|
13
|
+
- [#1056](https://github.com/codefastlabs/codefast/pull/1056) Every palette now meets WCAG 2.2 AA contrast in both color schemes. `primary` moves to the step whose label and
|
|
14
|
+
`text-primary` links clear 4.5:1; `primary-foreground` turns dark on the bright dark-scheme `primary`; `ring` moves to a
|
|
15
|
+
step that clears 3:1 against every surface, and the sidebar tokens follow. Focus is drawn as a solid 2px `ring` outline
|
|
16
|
+
offset 2px
|
|
17
|
+
(`focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-offset-2 focus-visible:outline-ring`)
|
|
18
|
+
instead of a `ring` border with a 50% halo, so it keeps its contrast and survives forced-colors mode; the destructive
|
|
19
|
+
Button and Badge draw it in `destructive`. The base `outline-color` every element inherits is `ring` at full strength.
|
|
20
|
+
The default Button, Badge link and Bubble hover with the new `bg-primary-hover`, which pulls `primary` toward
|
|
21
|
+
`foreground` instead of fading it, so the label gains contrast on hover.
|
|
22
|
+
|
|
23
|
+
## 0.12.0
|
|
24
|
+
|
|
25
|
+
### Minor Changes
|
|
26
|
+
|
|
27
|
+
- [#1052](https://github.com/codefastlabs/codefast/pull/1052) The root entry, `@codefast/ui`, now re-exports `useHasHydrated` and `useLatest`, so every published hook is reachable
|
|
28
|
+
from it. The `@codefast/ui/hooks/use-message-scroller-commands`, `use-message-scroller-controller` and
|
|
29
|
+
`use-message-scroller-refs` subpaths are no longer published: they pass the message-scroller primitive's private ref
|
|
30
|
+
bags between its own parts and were never usable on their own — compose a scroller from
|
|
31
|
+
`@codefast/ui/primitives/message-scroller` or `@codefast/ui/message-scroller` instead.
|
|
32
|
+
|
|
33
|
+
### Patch Changes
|
|
34
|
+
|
|
35
|
+
- [#1050](https://github.com/codefastlabs/codefast/pull/1050) The root entry, `@codefast/ui`, now re-exports `InputNumberField`, `InputNumberStepper`, `InputNumberIncrement` and
|
|
36
|
+
`InputNumberDecrement` with their prop types, which only `@codefast/ui/input-number` offered before, so an `InputNumber`
|
|
37
|
+
can be composed from the root import alone.
|
|
38
|
+
|
|
3
39
|
## 0.11.0
|
|
4
40
|
|
|
5
41
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -96,7 +96,7 @@ All components, prop types, hooks, and variants are also re-exported from the ro
|
|
|
96
96
|
Beyond the components, the package exposes:
|
|
97
97
|
|
|
98
98
|
- `@codefast/ui/hooks/*` — standalone hooks such as `useMediaQuery` (`@codefast/ui/hooks/use-media-query`),
|
|
99
|
-
`useIsMobile`, `useCopyToClipboard`, `useMutationObserver`, and `
|
|
99
|
+
`useIsMobile`, `useCopyToClipboard`, `useMutationObserver`, `usePagination`, `useHasHydrated`, and `useLatest`.
|
|
100
100
|
- `@codefast/ui/variants/*` — the variant functions behind the styled components, such as `buttonVariants` from
|
|
101
101
|
`@codefast/ui/variants/button`, for styling an element that isn't the component itself.
|
|
102
102
|
- `@codefast/ui/primitives/*` — unstyled building blocks the styled components are composed from.
|
|
@@ -106,8 +106,8 @@ Beyond the components, the package exposes:
|
|
|
106
106
|
For example, to style a link like a button:
|
|
107
107
|
|
|
108
108
|
```tsx
|
|
109
|
-
import { buttonVariants } from "@codefast/ui/variants/button";
|
|
110
109
|
import { cn } from "@codefast/ui/lib/utils";
|
|
110
|
+
import { buttonVariants } from "@codefast/ui/variants/button";
|
|
111
111
|
|
|
112
112
|
export function DocsLink() {
|
|
113
113
|
return (
|
|
@@ -18,7 +18,7 @@ function AccordionItem({ className, ...props }) {
|
|
|
18
18
|
* @since 0.3.16-canary.0
|
|
19
19
|
*/
|
|
20
20
|
function AccordionTrigger({ children, className, ...props }) {
|
|
21
|
-
return (_jsx(AccordionPrimitive.Header, { className: "flex", children: _jsxs(AccordionPrimitive.Trigger, { className: cn("group/accordion-trigger relative flex flex-1 items-start justify-between rounded-lg border border-transparent py-2.5 text-start text-sm font-medium transition-all outline-none hover:underline focus-visible:
|
|
21
|
+
return (_jsx(AccordionPrimitive.Header, { className: "flex", children: _jsxs(AccordionPrimitive.Trigger, { className: cn("group/accordion-trigger relative flex flex-1 items-start justify-between rounded-lg border border-transparent py-2.5 text-start text-sm font-medium transition-all outline-none hover:underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring focus-visible:outline-solid 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), "data-slot": "accordion-trigger", ...props, children: [children, _jsx(ChevronDownIcon, { className: "pointer-events-none shrink-0 group-aria-expanded/accordion-trigger:hidden", "data-slot": "accordion-trigger-icon" }), _jsx(ChevronUpIcon, { className: "pointer-events-none hidden shrink-0 group-aria-expanded/accordion-trigger:inline", "data-slot": "accordion-trigger-icon" })] }) }));
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
24
|
* @since 0.3.16-canary.0
|
|
@@ -19,7 +19,7 @@ function Bubble({ align = "start", className, variant = "default", ...props }) {
|
|
|
19
19
|
*/
|
|
20
20
|
function BubbleContent({ asChild = false, className, ...props }) {
|
|
21
21
|
const Component = asChild ? Slot.Root : "div";
|
|
22
|
-
return (_jsx(Component, { className: cn("w-fit max-w-full min-w-0 overflow-hidden rounded-xl border border-transparent px-3 py-2 text-sm leading-relaxed wrap-break-word group-data-[align=end]/bubble:self-end [button]:text-start [button,a]:transition-colors [button,a]:outline-none [button,a]:focus-visible:
|
|
22
|
+
return (_jsx(Component, { className: cn("w-fit max-w-full min-w-0 overflow-hidden rounded-xl border border-transparent px-3 py-2 text-sm leading-relaxed wrap-break-word group-data-[align=end]/bubble:self-end [button]:text-start [button,a]:transition-colors [button,a]:outline-none [button,a]:focus-visible:outline-2 [button,a]:focus-visible:outline-offset-2 [button,a]:focus-visible:outline-ring [button,a]:focus-visible:outline-solid", className), "data-slot": "bubble-content", ...props }));
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
25
|
* @since 0.5.0-canary.3
|
|
@@ -19,7 +19,7 @@ function Calendar({ buttonVariant = "ghost", captionLayout = "label", className,
|
|
|
19
19
|
button_next: cn(buttonVariants({ variant: buttonVariant }), "size-(--cell-size) p-0 select-none aria-disabled:opacity-50", defaultClassNames.button_next),
|
|
20
20
|
month_caption: cn("flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)", defaultClassNames.month_caption),
|
|
21
21
|
dropdowns: cn("flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium", defaultClassNames.dropdowns),
|
|
22
|
-
dropdown_root: cn("relative rounded-(--cell-radius) border border-transparent has-focus:
|
|
22
|
+
dropdown_root: cn("relative rounded-(--cell-radius) border border-transparent has-focus:outline-2 has-focus:outline-offset-2 has-focus:outline-ring has-focus:outline-solid", defaultClassNames.dropdown_root),
|
|
23
23
|
dropdown: cn("absolute inset-0 bg-popover opacity-0", defaultClassNames.dropdown),
|
|
24
24
|
caption_label: cn("font-medium select-none", captionLayout === "label"
|
|
25
25
|
? "text-sm"
|
|
@@ -81,7 +81,7 @@ function CalendarDayButton({ className, day, locale, modifiers, ...props }) {
|
|
|
81
81
|
ref.current?.focus();
|
|
82
82
|
}
|
|
83
83
|
}, [modifiers.focused]);
|
|
84
|
-
return (_jsx(Button, { ref: ref, 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:
|
|
84
|
+
return (_jsx(Button, { ref: ref, 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:outline-2 group-data-focused/day:outline-offset-2 group-data-focused/day:outline-ring group-data-focused/day:outline-solid 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), "data-day": day.date.toLocaleDateString(locale?.code), "data-range-end": modifiers.range_end, "data-range-middle": modifiers.range_middle, "data-range-start": modifiers.range_start, "data-selected-single": modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle, size: "icon", variant: "ghost", ...props }));
|
|
85
85
|
}
|
|
86
86
|
// ── Exports ──────────────────────────────────────────────────────────────────────────────────────────────────────────
|
|
87
87
|
export { Calendar, CalendarDayButton };
|
|
@@ -13,7 +13,7 @@ function CheckboxCards(props) {
|
|
|
13
13
|
* @since 0.3.16-canary.0
|
|
14
14
|
*/
|
|
15
15
|
function CheckboxCardsItem({ checkboxClassName, children, className, ...props }) {
|
|
16
|
-
return (_jsxs(Label, { className: cn("flex items-start gap-2.5 rounded-lg border border-input p-2.5 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 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10 dark:has-data-indeterminate:border-primary/20 dark:has-data-indeterminate:bg-primary/10", className), "data-slot": "checkbox-card", children: [_jsx(CheckboxGroupPrimitive.Item, { className: cn("peer relative mt-0.5 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:
|
|
16
|
+
return (_jsxs(Label, { className: cn("flex items-start gap-2.5 rounded-lg border border-input p-2.5 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 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10 dark:has-data-indeterminate:border-primary/20 dark:has-data-indeterminate:bg-primary/10", className), "data-slot": "checkbox-card", children: [_jsx(CheckboxGroupPrimitive.Item, { className: cn("peer relative mt-0.5 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:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring focus-visible:outline-solid 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), "data-slot": "checkbox-card-item", ...props, children: _jsxs(CheckboxGroupPrimitive.CheckboxGroupIndicator, { 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", "data-slot": "checkbox-card-indicator", children: [_jsx(CheckIcon, { className: "group-data-indeterminate/checkbox-card-indicator:hidden" }), _jsx(MinusIcon, { className: "hidden group-data-indeterminate/checkbox-card-indicator:block" })] }) }), children] }));
|
|
17
17
|
}
|
|
18
18
|
// ── Exports ──────────────────────────────────────────────────────────────────────────────────────────────────────────
|
|
19
19
|
export { CheckboxCards, CheckboxCardsItem };
|
|
@@ -12,7 +12,7 @@ function CheckboxGroup({ className, ...props }) {
|
|
|
12
12
|
* @since 0.3.16-canary.0
|
|
13
13
|
*/
|
|
14
14
|
function CheckboxGroupItem({ className, ...props }) {
|
|
15
|
-
return (_jsx(CheckboxGroupPrimitive.Item, { 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:
|
|
15
|
+
return (_jsx(CheckboxGroupPrimitive.Item, { 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:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring focus-visible:outline-solid 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), "data-slot": "checkbox-group-item", ...props, children: _jsxs(CheckboxGroupPrimitive.CheckboxGroupIndicator, { 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", "data-slot": "checkbox-group-indicator", children: [_jsx(CheckIcon, { className: "group-data-indeterminate/checkbox-group-indicator:hidden" }), _jsx(MinusIcon, { className: "hidden group-data-indeterminate/checkbox-group-indicator:block" })] }) }));
|
|
16
16
|
}
|
|
17
17
|
// ── Exports ──────────────────────────────────────────────────────────────────────────────────────────────────────────
|
|
18
18
|
export { CheckboxGroup, CheckboxGroupItem };
|
|
@@ -6,7 +6,7 @@ import { cn } from "#lib/utils";
|
|
|
6
6
|
* @since 0.3.16-canary.0
|
|
7
7
|
*/
|
|
8
8
|
function Checkbox({ className, ...props }) {
|
|
9
|
-
return (_jsx(CheckboxPrimitive.Root, { 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:
|
|
9
|
+
return (_jsx(CheckboxPrimitive.Root, { 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:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring focus-visible:outline-solid 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), "data-slot": "checkbox", ...props, children: _jsxs(CheckboxPrimitive.Indicator, { className: "group/checkbox-indicator grid animate-in place-content-center text-current duration-control-indicator ease-spring zoom-in-50 [&>svg]:size-3.5", "data-slot": "checkbox-indicator", children: [_jsx(CheckIcon, { className: "group-data-indeterminate/checkbox-indicator:hidden" }), _jsx(MinusIcon, { className: "hidden group-data-indeterminate/checkbox-indicator:block" })] }) }));
|
|
10
10
|
}
|
|
11
11
|
// ── Exports ──────────────────────────────────────────────────────────────────────────────────────────────────────────
|
|
12
12
|
export { Checkbox };
|
|
@@ -41,13 +41,13 @@ function InputGroupText({ className, ...props }) {
|
|
|
41
41
|
* @since 0.3.16-canary.0
|
|
42
42
|
*/
|
|
43
43
|
function InputGroupInput({ className, ...props }) {
|
|
44
|
-
return (_jsx(Input, { className: cn("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:
|
|
44
|
+
return (_jsx(Input, { className: cn("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:outline-none disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent", className), "data-slot": "input-group-control", ...props }));
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
47
47
|
* @since 0.3.16-canary.0
|
|
48
48
|
*/
|
|
49
49
|
function InputGroupTextarea({ className, ...props }) {
|
|
50
|
-
return (_jsx(Textarea, { className: cn("flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:
|
|
50
|
+
return (_jsx(Textarea, { className: cn("flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:outline-none disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent", className), "data-slot": "input-group-control", ...props }));
|
|
51
51
|
}
|
|
52
52
|
// ── Exports ──────────────────────────────────────────────────────────────────────────────────────────────────────────
|
|
53
53
|
export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea };
|
|
@@ -12,7 +12,7 @@ import { buttonVariants } from "#variants/button";
|
|
|
12
12
|
* @since 0.3.16-canary.0
|
|
13
13
|
*/
|
|
14
14
|
function InputNumber({ className, decrementLabel = "Decrement", incrementLabel = "Increment", spinner, ...props }) {
|
|
15
|
-
return (_jsx(InputNumberPrimitive.Root, { className: cn("group/input-number relative flex h-8 w-full min-w-0 items-center overflow-hidden rounded-lg bg-transparent text-base inset-ring inset-ring-input transition-[color,box-shadow] not-has-[input:disabled]:shadow-xs has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 has-aria-invalid:inset-ring-destructive has-[input:disabled]:bg-input/50 has-[input:disabled]:opacity-50 has-[input:focus-visible]:
|
|
15
|
+
return (_jsx(InputNumberPrimitive.Root, { className: cn("group/input-number relative flex h-8 w-full min-w-0 items-center overflow-hidden rounded-lg bg-transparent text-base inset-ring inset-ring-input transition-[color,box-shadow] not-has-[input:disabled]:shadow-xs has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 has-aria-invalid:inset-ring-destructive has-[input:disabled]:bg-input/50 has-[input:disabled]:opacity-50 has-[input:focus-visible]:outline-2 has-[input:focus-visible]:outline-offset-2 has-[input:focus-visible]:outline-ring has-[input:focus-visible]:outline-solid motion-reduce:transition-none md:text-sm dark:bg-input/30 dark:has-aria-invalid:ring-destructive/40 dark:has-aria-invalid:inset-ring-destructive/50 dark:has-[input:disabled]:bg-input/80 [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), "data-slot": "input-number", decrementLabel: decrementLabel, incrementLabel: incrementLabel, spinner: spinner ?? _jsx(Spinner, {}), ...props }));
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
18
|
* The editable numeric input.
|
|
@@ -29,11 +29,11 @@ function InputNumberField({ className, ...props }) {
|
|
|
29
29
|
* @since 0.5.0-canary.6
|
|
30
30
|
*/
|
|
31
31
|
function InputNumberStepper({ className, ...props }) {
|
|
32
|
-
return (_jsxs("div", { className: cn("grid h-full w-8 shrink-0 grid-rows-2 divide-y divide-input border-s border-s-input transition-colors group-has-aria-invalid/input-number:divide-destructive group-has-aria-invalid/input-number:border-s-destructive motion-reduce:transition-none
|
|
33
|
-
className: "h-full min-w-0 rounded-none px-0 text-muted-foreground",
|
|
32
|
+
return (_jsxs("div", { className: cn("grid h-full w-8 shrink-0 grid-rows-2 divide-y divide-input border-s border-s-input transition-colors group-has-aria-invalid/input-number:divide-destructive group-has-aria-invalid/input-number:border-s-destructive motion-reduce:transition-none group-has-aria-invalid/input-number:*:[button]:focus-visible:bg-destructive/20 dark:group-has-aria-invalid/input-number:*:[button]:focus-visible:bg-destructive/40", className), "data-slot": "input-number-stepper", ...props, children: [_jsx(InputNumberPrimitive.IncrementButton, { className: buttonVariants({
|
|
33
|
+
className: "h-full min-w-0 rounded-none px-0 text-muted-foreground focus-visible:-outline-offset-2",
|
|
34
34
|
variant: "ghost",
|
|
35
35
|
}), "data-slot": "input-number-increment", children: _jsx(ChevronUpIcon, { className: "size-3.5" }) }), _jsx(InputNumberPrimitive.DecrementButton, { className: buttonVariants({
|
|
36
|
-
className: "h-full min-w-0 rounded-none px-0 text-muted-foreground",
|
|
36
|
+
className: "h-full min-w-0 rounded-none px-0 text-muted-foreground focus-visible:-outline-offset-2",
|
|
37
37
|
variant: "ghost",
|
|
38
38
|
}), "data-slot": "input-number-decrement", children: _jsx(ChevronDownIcon, { className: "size-3.5" }) })] }));
|
|
39
39
|
}
|
|
@@ -45,7 +45,7 @@ function InputNumberStepper({ className, ...props }) {
|
|
|
45
45
|
*/
|
|
46
46
|
function InputNumberIncrement({ children, className, ...props }) {
|
|
47
47
|
return (_jsx(InputNumberPrimitive.IncrementButton, { className: buttonVariants({
|
|
48
|
-
className: cn("h-full w-8 shrink-0 rounded-none rounded-e-[calc(var(--radius-lg)-1px)] border-s border-s-input text-muted-foreground group-has-aria-invalid/input-number:border-s-destructive focus-visible
|
|
48
|
+
className: cn("h-full w-8 shrink-0 rounded-none rounded-e-[calc(var(--radius-lg)-1px)] border-s border-s-input text-muted-foreground group-has-aria-invalid/input-number:border-s-destructive focus-visible:-outline-offset-2 group-has-aria-invalid/input-number:focus-visible:bg-destructive/20 dark:group-has-aria-invalid/input-number:focus-visible:bg-destructive/40", className),
|
|
49
49
|
variant: "ghost",
|
|
50
50
|
}), "data-slot": "input-number-increment", ...props, children: children ?? _jsx(PlusIcon, {}) }));
|
|
51
51
|
}
|
|
@@ -57,7 +57,7 @@ function InputNumberIncrement({ children, className, ...props }) {
|
|
|
57
57
|
*/
|
|
58
58
|
function InputNumberDecrement({ children, className, ...props }) {
|
|
59
59
|
return (_jsx(InputNumberPrimitive.DecrementButton, { className: buttonVariants({
|
|
60
|
-
className: cn("h-full w-8 shrink-0 rounded-none rounded-s-[calc(var(--radius-lg)-1px)] border-e border-e-input text-muted-foreground group-has-aria-invalid/input-number:border-e-destructive focus-visible
|
|
60
|
+
className: cn("h-full w-8 shrink-0 rounded-none rounded-s-[calc(var(--radius-lg)-1px)] border-e border-e-input text-muted-foreground group-has-aria-invalid/input-number:border-e-destructive focus-visible:-outline-offset-2 group-has-aria-invalid/input-number:focus-visible:bg-destructive/20 dark:group-has-aria-invalid/input-number:focus-visible:bg-destructive/40", className),
|
|
61
61
|
variant: "ghost",
|
|
62
62
|
}), "data-slot": "input-number-decrement", ...props, children: children ?? _jsx(MinusIcon, {}) }));
|
|
63
63
|
}
|
|
@@ -25,7 +25,7 @@ function InputOTPSlot({ className, index, ...props }) {
|
|
|
25
25
|
throw new Error(`InputOTPSlot: no slot at index ${index}`);
|
|
26
26
|
}
|
|
27
27
|
const { char, hasFakeCaret, isActive } = slot;
|
|
28
|
-
return (_jsxs("div", { className: cn("relative flex size-8 items-center justify-center border-y border-e border-input text-sm shadow-xs transition-all outline-none first:rounded-s-lg first:border-s last:rounded-e-lg aria-invalid:border-destructive data-[active=true]:z-10 data-[active=true]:
|
|
28
|
+
return (_jsxs("div", { className: cn("relative flex size-8 items-center justify-center border-y border-e border-input text-sm shadow-xs transition-all outline-none first:rounded-s-lg first:border-s last:rounded-e-lg aria-invalid:border-destructive data-[active=true]:z-10 data-[active=true]:outline-2 data-[active=true]:outline-offset-2 data-[active=true]:outline-ring data-[active=true]:outline-solid 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), "data-active": isActive, "data-slot": "input-otp-slot", ...props, children: [char, hasFakeCaret ? (_jsx("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: _jsx("div", { className: "h-4 w-px animate-caret-blink bg-foreground animation-duration-1000" }) })) : null] }));
|
|
29
29
|
}
|
|
30
30
|
/**
|
|
31
31
|
* @since 0.3.16-canary.0
|
package/dist/components/input.js
CHANGED
|
@@ -4,7 +4,7 @@ import { cn } from "#lib/utils";
|
|
|
4
4
|
* @since 0.3.16-canary.0
|
|
5
5
|
*/
|
|
6
6
|
function Input({ className, type, ...props }) {
|
|
7
|
-
return (_jsx("input", { className: cn("h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:
|
|
7
|
+
return (_jsx("input", { className: cn("h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring focus-visible:outline-solid disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", className), "data-slot": "input", type: type, ...props }));
|
|
8
8
|
}
|
|
9
9
|
// ── Exports ──────────────────────────────────────────────────────────────────────────────────────────────────────────
|
|
10
10
|
export { Input };
|
|
@@ -63,4 +63,4 @@ type MessageScrollerButtonProps = ComponentProps<typeof MessageScrollerButtonPri
|
|
|
63
63
|
declare function MessageScrollerButton({ children, className, direction, render, size, variant, ...props }: MessageScrollerButtonProps): JSX.Element;
|
|
64
64
|
export { MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility, };
|
|
65
65
|
export type { MessageScrollerButtonProps, MessageScrollerContentProps, MessageScrollerItemProps, MessageScrollerProps, MessageScrollerProviderProps, MessageScrollerViewportProps, };
|
|
66
|
-
export type { MessageScrollerDefaultScrollPosition, MessageScrollerScrollAlign, MessageScrollerScrollable, MessageScrollerScrollOptions, MessageScrollerVisibilityState, } from "#
|
|
66
|
+
export type { MessageScrollerButtonDirection, MessageScrollerButtonRenderState, MessageScrollerDefaultScrollPosition, MessageScrollerScrollAlign, MessageScrollerScrollable, MessageScrollerScrollOptions, MessageScrollerVisibilityState, } from "#primitives/message-scroller";
|
|
@@ -5,7 +5,7 @@ import { cn } from "#lib/utils";
|
|
|
5
5
|
* @since 0.3.16-canary.0
|
|
6
6
|
*/
|
|
7
7
|
function NativeSelect({ className, size = "default", ...props }) {
|
|
8
|
-
return (_jsxs("div", { className: cn("group/native-select relative w-fit has-[select:disabled]:opacity-50", className), "data-size": size, "data-slot": "native-select-wrapper", children: [_jsx("select", { className: "h-8 w-full min-w-0 appearance-none rounded-lg border border-input bg-transparent py-1 ps-2.5 pe-8 text-sm shadow-xs transition-[color,box-shadow] outline-none select-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground focus-visible:
|
|
8
|
+
return (_jsxs("div", { className: cn("group/native-select relative w-fit has-[select:disabled]:opacity-50", className), "data-size": size, "data-slot": "native-select-wrapper", children: [_jsx("select", { className: "h-8 w-full min-w-0 appearance-none rounded-lg border border-input bg-transparent py-1 ps-2.5 pe-8 text-sm shadow-xs transition-[color,box-shadow] outline-none select-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring focus-visible:outline-solid disabled:pointer-events-none disabled:cursor-not-allowed aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-[size=sm]:py-0.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", "data-size": size, "data-slot": "native-select", ...props }), _jsx(ChevronDownIcon, { "aria-hidden": "true", className: "pointer-events-none absolute inset-e-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground select-none", "data-slot": "native-select-icon" })] }));
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
11
|
* @since 0.3.16-canary.0
|
|
@@ -31,13 +31,13 @@ function NavigationMenuTrigger({ children, className, ...props }) {
|
|
|
31
31
|
* @since 0.3.16-canary.0
|
|
32
32
|
*/
|
|
33
33
|
function NavigationMenuContent({ className, ...props }) {
|
|
34
|
-
return (_jsx(NavigationMenuPrimitive.Content, { className: cn("inset-s-0 top-0 w-full p-1 ease-snappy group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-lg group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:ring-1 group-data-[viewport=false]/navigation-menu:ring-foreground/10 group-data-[viewport=false]/navigation-menu:animation-duration-300 data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in data-[motion^=to-]:animate-out data-[motion^=to-]:ease-exit data-[motion^=to-]:fade-out
|
|
34
|
+
return (_jsx(NavigationMenuPrimitive.Content, { className: cn("inset-s-0 top-0 w-full p-1 ease-snappy group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-lg group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:ring-1 group-data-[viewport=false]/navigation-menu:ring-foreground/10 group-data-[viewport=false]/navigation-menu:animation-duration-300 data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in data-[motion^=to-]:animate-out data-[motion^=to-]:ease-exit data-[motion^=to-]:fade-out md:absolute md:w-auto group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 data-closed:ease-exit group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0 group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95", className), "data-slot": "navigation-menu-content", ...props }));
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
37
37
|
* @since 0.3.16-canary.0
|
|
38
38
|
*/
|
|
39
39
|
function NavigationMenuLink({ className, ...props }) {
|
|
40
|
-
return (_jsx(NavigationMenuPrimitive.Link, { className: cn("flex items-center gap-2 rounded-lg p-2 text-sm transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:
|
|
40
|
+
return (_jsx(NavigationMenuPrimitive.Link, { className: cn("flex items-center gap-2 rounded-lg p-2 text-sm transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring focus-visible:outline-solid data-[active=true]:bg-muted/50 data-[active=true]:hover:bg-muted data-[active=true]:focus:bg-muted [&_svg:not([class*='size-'])]:size-4", className), "data-slot": "navigation-menu-link", ...props }));
|
|
41
41
|
}
|
|
42
42
|
/**
|
|
43
43
|
* @since 0.4.0-canary.4
|
|
@@ -13,7 +13,7 @@ function RadioCards(props) {
|
|
|
13
13
|
* @since 0.3.16-canary.0
|
|
14
14
|
*/
|
|
15
15
|
function RadioCardsItem({ children, className, ...props }) {
|
|
16
|
-
return (_jsxs(Label, { className: "flex items-start gap-2.5 rounded-lg border border-input p-2.5 transition has-focus-visible:border-ring has-disabled:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10", "data-slot": "radio-card", children: [_jsx(RadioGroupPrimitive.Item, { className: cn("peer relative mt-0.5 flex aspect-square size-4 shrink-0 rounded-full border border-input outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:
|
|
16
|
+
return (_jsxs(Label, { className: "flex items-start gap-2.5 rounded-lg border border-input p-2.5 transition has-focus-visible:border-ring has-disabled:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10", "data-slot": "radio-card", children: [_jsx(RadioGroupPrimitive.Item, { className: cn("peer relative mt-0.5 flex aspect-square size-4 shrink-0 rounded-full border border-input outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring focus-visible:outline-solid 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), "data-slot": "radio-card-item", ...props, children: _jsx(RadioGroupPrimitive.Indicator, { className: "flex size-4 items-center justify-center", "data-slot": "radio-card-indicator", children: _jsx("span", { className: "absolute inset-s-1/2 top-1/2 size-2 -translate-x-1/2 -translate-y-1/2 animate-in rounded-full bg-primary-foreground duration-control-indicator ease-spring zoom-in-50 rtl:translate-x-1/2" }) }) }), children] }));
|
|
17
17
|
}
|
|
18
18
|
// ── Exports ──────────────────────────────────────────────────────────────────────────────────────────────────────────
|
|
19
19
|
export { RadioCards, RadioCardsItem };
|
|
@@ -11,7 +11,7 @@ function RadioGroup({ className, ...props }) {
|
|
|
11
11
|
* @since 0.3.16-canary.0
|
|
12
12
|
*/
|
|
13
13
|
function RadioGroupItem({ className, ...props }) {
|
|
14
|
-
return (_jsx(RadioGroupPrimitive.Item, { className: cn("group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-input outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:
|
|
14
|
+
return (_jsx(RadioGroupPrimitive.Item, { className: cn("group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-input outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring focus-visible:outline-solid 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), "data-slot": "radio-group-item", ...props, children: _jsx(RadioGroupPrimitive.Indicator, { className: "flex size-4 items-center justify-center", "data-slot": "radio-group-indicator", children: _jsx("span", { className: "absolute inset-s-1/2 top-1/2 size-2 -translate-x-1/2 -translate-y-1/2 animate-in rounded-full bg-primary-foreground duration-control-indicator ease-spring zoom-in-50 rtl:translate-x-1/2" }) }) }));
|
|
15
15
|
}
|
|
16
16
|
// ── Exports ──────────────────────────────────────────────────────────────────────────────────────────────────────────
|
|
17
17
|
export { RadioGroup, RadioGroupItem };
|
package/dist/components/radio.js
CHANGED
|
@@ -5,7 +5,7 @@ import { cn } from "#lib/utils";
|
|
|
5
5
|
* @since 0.3.16-canary.0
|
|
6
6
|
*/
|
|
7
7
|
function Radio({ className, onChange, onValueChange, ...props }) {
|
|
8
|
-
return (_jsx("input", { className: cn("peer relative flex size-4 shrink-0 appearance-none items-center justify-center rounded-full border border-input bg-background shadow-xs outline-none before:size-2 before:scale-0 before:rounded-full before:bg-primary-foreground before:transition-transform before:duration-control-indicator before:ease-spring after:absolute after:-inset-x-3 after:-inset-y-2 checked:border-primary checked:bg-primary checked:before:scale-100 focus-visible:
|
|
8
|
+
return (_jsx("input", { className: cn("peer relative flex size-4 shrink-0 appearance-none items-center justify-center rounded-full border border-input bg-background shadow-xs outline-none before:size-2 before:scale-0 before:rounded-full before:bg-primary-foreground before:transition-transform before:duration-control-indicator before:ease-spring after:absolute after:-inset-x-3 after:-inset-y-2 checked:border-primary checked:bg-primary checked:before:scale-100 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring focus-visible:outline-solid disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 checked:aria-invalid:bg-destructive dark:not-checked:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", className), "data-slot": "radio", type: "radio", onChange: composeEventHandlers(onChange, (event) => onValueChange?.(event.currentTarget.value)), ...props }));
|
|
9
9
|
}
|
|
10
10
|
// ── Exports ──────────────────────────────────────────────────────────────────────────────────────────────────────────
|
|
11
11
|
export { Radio };
|
|
@@ -11,7 +11,7 @@ const [ScrollAreaContextProvider, useScrollAreaContext] = createScrollAreaContex
|
|
|
11
11
|
* @since 0.3.16-canary.0
|
|
12
12
|
*/
|
|
13
13
|
function ScrollArea({ __scopeScrollArea, children, className, size, ...props }) {
|
|
14
|
-
return (_jsx(ScrollAreaContextProvider, { scope: __scopeScrollArea, size: size, children: _jsxs(ScrollAreaPrimitive.Root, { className: cn("relative", className), "data-slot": "scroll-area", ...props, children: [_jsx(ScrollAreaPrimitive.Viewport, { className: "size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:
|
|
14
|
+
return (_jsx(ScrollAreaContextProvider, { scope: __scopeScrollArea, size: size, children: _jsxs(ScrollAreaPrimitive.Root, { className: cn("relative", className), "data-slot": "scroll-area", ...props, children: [_jsx(ScrollAreaPrimitive.Viewport, { className: "size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring focus-visible:outline-solid", "data-slot": "scroll-area-viewport", children: children }), _jsx(ScrollAreaScrollbar, { orientation: "vertical" }), _jsx(ScrollAreaScrollbar, { orientation: "horizontal" }), _jsx(ScrollAreaPrimitive.Corner, {})] }) }));
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
17
|
* @since 0.3.16-canary.0
|
|
@@ -25,7 +25,7 @@ function SelectValue({ ...props }) {
|
|
|
25
25
|
* @since 0.3.16-canary.0
|
|
26
26
|
*/
|
|
27
27
|
function SelectTrigger({ children, className, size = "default", ...props }) {
|
|
28
|
-
return (_jsxs(SelectPrimitive.Trigger, { className: cn("flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 ps-2.5 pe-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:
|
|
28
|
+
return (_jsxs(SelectPrimitive.Trigger, { className: cn("flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 ps-2.5 pe-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring focus-visible:outline-solid disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), "data-size": size, "data-slot": "select-trigger", ...props, children: [children, _jsx(SelectPrimitive.Icon, { asChild: true, children: _jsx(ChevronDownIcon, { className: "pointer-events-none size-4 text-muted-foreground" }) })] }));
|
|
29
29
|
}
|
|
30
30
|
/**
|
|
31
31
|
* @since 0.3.16-canary.0
|
|
@@ -12,7 +12,7 @@ function Slider({ className, defaultValue, max = 100, min = 0, value, ...props }
|
|
|
12
12
|
}
|
|
13
13
|
return Array.isArray(defaultValue) ? defaultValue : [min, max];
|
|
14
14
|
}, [value, defaultValue, min, max]);
|
|
15
|
-
return (_jsxs(SliderPrimitive.Root, { className: cn("relative flex w-full touch-none items-center select-none data-vertical:h-full data-vertical:min-h-40 data-vertical:w-auto data-vertical:flex-col data-disabled:opacity-50", className), "data-slot": "slider", max: max, min: min, ...(defaultValue === undefined ? {} : { defaultValue }), ...(value === undefined ? {} : { value }), ...props, children: [_jsx(SliderPrimitive.Track, { className: "relative grow overflow-hidden rounded-full bg-muted data-horizontal:h-1 data-horizontal:w-full data-vertical:h-full data-vertical:w-1", "data-slot": "slider-track", children: _jsx(SliderPrimitive.Range, { className: "absolute bg-primary select-none data-horizontal:h-full data-vertical:w-full", "data-slot": "slider-range" }) }), Array.from({ length: _values.length }, (_, index) => (_jsx(SliderPrimitive.Thumb, { className: "relative block size-3 shrink-0 rounded-full border border-ring bg-white shadow-sm ring-ring/50 transition-[color,box-shadow] select-none after:absolute after:-inset-2 hover:ring-3 focus-visible:
|
|
15
|
+
return (_jsxs(SliderPrimitive.Root, { className: cn("relative flex w-full touch-none items-center select-none data-vertical:h-full data-vertical:min-h-40 data-vertical:w-auto data-vertical:flex-col data-disabled:opacity-50", className), "data-slot": "slider", max: max, min: min, ...(defaultValue === undefined ? {} : { defaultValue }), ...(value === undefined ? {} : { value }), ...props, children: [_jsx(SliderPrimitive.Track, { className: "relative grow overflow-hidden rounded-full bg-muted data-horizontal:h-1 data-horizontal:w-full data-vertical:h-full data-vertical:w-1", "data-slot": "slider-track", children: _jsx(SliderPrimitive.Range, { className: "absolute bg-primary select-none data-horizontal:h-full data-vertical:w-full", "data-slot": "slider-range" }) }), Array.from({ length: _values.length }, (_, index) => (_jsx(SliderPrimitive.Thumb, { className: "relative block size-3 shrink-0 rounded-full border border-ring bg-white shadow-sm ring-ring/50 transition-[color,box-shadow] select-none after:absolute after:-inset-2 hover:ring-3 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring focus-visible:outline-solid active:ring-3 disabled:pointer-events-none disabled:opacity-50", "data-slot": "slider-thumb" }, index)))] }));
|
|
16
16
|
}
|
|
17
17
|
// ── Exports ──────────────────────────────────────────────────────────────────────────────────────────────────────────
|
|
18
18
|
export { Slider };
|
|
@@ -5,7 +5,7 @@ import { cn } from "#lib/utils";
|
|
|
5
5
|
* @since 0.3.16-canary.0
|
|
6
6
|
*/
|
|
7
7
|
function Switch({ className, size = "default", ...props }) {
|
|
8
|
-
return (_jsx(SwitchPrimitives.Root, { className: cn("peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all duration-control ease-snappy outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:
|
|
8
|
+
return (_jsx(SwitchPrimitives.Root, { className: cn("peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all duration-control ease-snappy outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring focus-visible:outline-solid aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-4.5 data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50", className), "data-size": size, "data-slot": "switch", ...props, children: _jsx(SwitchPrimitives.Thumb, { className: "pointer-events-none block rounded-full bg-background ring-0 transition-transform duration-control-indicator ease-spring group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-3.5 group-data-[size=sm]/switch:data-checked:translate-x-2.5 rtl:group-data-[size=default]/switch:data-checked:-translate-x-3.5 rtl:group-data-[size=sm]/switch:data-checked:-translate-x-2.5 dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 rtl:group-data-[size=default]/switch:data-unchecked:translate-x-0 rtl:group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground", "data-slot": "switch-thumb" }) }));
|
|
9
9
|
}
|
|
10
10
|
// ── Exports ──────────────────────────────────────────────────────────────────────────────────────────────────────────
|
|
11
11
|
export { Switch };
|
package/dist/components/tabs.js
CHANGED
|
@@ -18,13 +18,13 @@ function TabsList({ className, variant = "default", ...props }) {
|
|
|
18
18
|
* @since 0.3.16-canary.0
|
|
19
19
|
*/
|
|
20
20
|
function TabsTrigger({ className, ...props }) {
|
|
21
|
-
return (_jsx(TabsPrimitive.Trigger, { className: cn("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:
|
|
21
|
+
return (_jsx(TabsPrimitive.Trigger, { className: cn("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring focus-visible:outline-solid disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pe-1 has-data-[icon=inline-start]:ps-1 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", "group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent", "data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground", "after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:-bottom-1.25 group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-inset-e-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100", className), "data-slot": "tabs-trigger", ...props }));
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
24
|
* @since 0.3.16-canary.0
|
|
25
25
|
*/
|
|
26
26
|
function TabsContent({ className, ...props }) {
|
|
27
|
-
return (_jsx(TabsPrimitive.Content, { className: cn("flex-1 text-sm outline-none", className), "data-slot": "tabs-content", ...props }));
|
|
27
|
+
return (_jsx(TabsPrimitive.Content, { className: cn("flex-1 text-sm outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring focus-visible:outline-solid", className), "data-slot": "tabs-content", ...props }));
|
|
28
28
|
}
|
|
29
29
|
// ── Exports ──────────────────────────────────────────────────────────────────────────────────────────────────────────
|
|
30
30
|
export { Tabs, TabsContent, TabsList, TabsTrigger };
|
|
@@ -4,7 +4,7 @@ import { cn } from "#lib/utils";
|
|
|
4
4
|
* @since 0.3.16-canary.0
|
|
5
5
|
*/
|
|
6
6
|
function Textarea({ className, ...props }) {
|
|
7
|
-
return (_jsx("textarea", { className: cn("flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:
|
|
7
|
+
return (_jsx("textarea", { className: cn("flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring focus-visible:outline-solid disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", className), "data-slot": "textarea", ...props }));
|
|
8
8
|
}
|
|
9
9
|
// ── Exports ──────────────────────────────────────────────────────────────────────────────────────────────────────────
|
|
10
10
|
export { Textarea };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { MessageScrollerRefs } from "#hooks/use-message-scroller-refs";
|
|
2
1
|
import type { MessageScrollerContextValue, MessageScrollerProviderProps, MessageScrollerRegisterMessage } from "#lib/message-scroller/types";
|
|
3
2
|
/**
|
|
4
3
|
* Orchestrator hook. Decides when to scroll and delegates the moves to
|
|
@@ -11,5 +10,4 @@ declare function useMessageScrollerController({ autoScroll, defaultScrollPositio
|
|
|
11
10
|
context: MessageScrollerContextValue;
|
|
12
11
|
registerMessage: MessageScrollerRegisterMessage;
|
|
13
12
|
};
|
|
14
|
-
export { useMessageScrollerController };
|
|
15
|
-
export type { MessageScrollerRefs };
|
|
13
|
+
export { useMessageScrollerController };
|
package/dist/index.d.ts
CHANGED
|
@@ -59,8 +59,8 @@ export { Input } from "#components/input";
|
|
|
59
59
|
export type { InputProps } from "#components/input";
|
|
60
60
|
export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, } from "#components/input-group";
|
|
61
61
|
export type { InputGroupAddonProps, InputGroupButtonProps, InputGroupInputProps, InputGroupProps, InputGroupTextareaProps, InputGroupTextProps, } from "#components/input-group";
|
|
62
|
-
export { InputNumber } from "#components/input-number";
|
|
63
|
-
export type { InputNumberProps } from "#components/input-number";
|
|
62
|
+
export { InputNumber, InputNumberDecrement, InputNumberField, InputNumberIncrement, InputNumberStepper, } from "#components/input-number";
|
|
63
|
+
export type { InputNumberDecrementProps, InputNumberFieldProps, InputNumberIncrementProps, InputNumberProps, InputNumberStepperProps, } from "#components/input-number";
|
|
64
64
|
export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, REGEXP_ONLY_CHARS, REGEXP_ONLY_DIGITS, REGEXP_ONLY_DIGITS_AND_CHARS, } from "#components/input-otp";
|
|
65
65
|
export type { InputOTPGroupProps, InputOTPProps, InputOTPSeparatorProps, InputOTPSlotProps, } from "#components/input-otp";
|
|
66
66
|
export { InputPassword } from "#components/input-password";
|
|
@@ -80,7 +80,7 @@ export type { MenubarArrowProps, MenubarCheckboxItemProps, MenubarContentProps,
|
|
|
80
80
|
export { Message, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader, } from "#components/message";
|
|
81
81
|
export type { MessageAvatarProps, MessageContentProps, MessageFooterProps, MessageGroupProps, MessageHeaderProps, MessageProps, } from "#components/message";
|
|
82
82
|
export { MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility, } from "#components/message-scroller";
|
|
83
|
-
export type { MessageScrollerButtonProps, MessageScrollerContentProps, MessageScrollerDefaultScrollPosition, MessageScrollerItemProps, MessageScrollerProps, MessageScrollerProviderProps, MessageScrollerScrollable, MessageScrollerScrollAlign, MessageScrollerScrollOptions, MessageScrollerViewportProps, MessageScrollerVisibilityState, } from "#components/message-scroller";
|
|
83
|
+
export type { MessageScrollerButtonDirection, MessageScrollerButtonProps, MessageScrollerButtonRenderState, MessageScrollerContentProps, MessageScrollerDefaultScrollPosition, MessageScrollerItemProps, MessageScrollerProps, MessageScrollerProviderProps, MessageScrollerScrollable, MessageScrollerScrollAlign, MessageScrollerScrollOptions, MessageScrollerViewportProps, MessageScrollerVisibilityState, } from "#components/message-scroller";
|
|
84
84
|
export { NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, } from "#components/navigation-menu";
|
|
85
85
|
export type { NavigationMenuContentProps, NavigationMenuIndicatorProps, NavigationMenuItemProps, NavigationMenuLinkProps, NavigationMenuListProps, NavigationMenuProps, NavigationMenuTriggerProps, NavigationMenuViewportProps, } from "#components/navigation-menu";
|
|
86
86
|
export { NativeSelect, NativeSelectOptGroup, NativeSelectOption } from "#components/native-select";
|
|
@@ -135,7 +135,9 @@ export { Tooltip, TooltipArrow, TooltipContent, TooltipProvider, TooltipTrigger
|
|
|
135
135
|
export type { TooltipArrowProps, TooltipContentProps, TooltipProps, TooltipProviderProps, TooltipTriggerProps, } from "#components/tooltip";
|
|
136
136
|
export { useAnimatedValue } from "#hooks/use-animated-value";
|
|
137
137
|
export { useCopyToClipboard } from "#hooks/use-copy-to-clipboard";
|
|
138
|
+
export { useHasHydrated } from "#hooks/use-has-hydrated";
|
|
138
139
|
export { useIsMobile } from "#hooks/use-is-mobile";
|
|
140
|
+
export { useLatest } from "#hooks/use-latest";
|
|
139
141
|
export { useMediaQuery } from "#hooks/use-media-query";
|
|
140
142
|
export { useMutationObserver } from "#hooks/use-mutation-observer";
|
|
141
143
|
export { ELLIPSIS, usePagination } from "#hooks/use-pagination";
|
package/dist/index.js
CHANGED
|
@@ -29,7 +29,7 @@ export { createFormFieldScope, Form, FormControl, FormDescription, FormField, Fo
|
|
|
29
29
|
export { HoverCard, HoverCardArrow, HoverCardContent, HoverCardTrigger } from "#components/hover-card";
|
|
30
30
|
export { Input } from "#components/input";
|
|
31
31
|
export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, } from "#components/input-group";
|
|
32
|
-
export { InputNumber } from "#components/input-number";
|
|
32
|
+
export { InputNumber, InputNumberDecrement, InputNumberField, InputNumberIncrement, InputNumberStepper, } from "#components/input-number";
|
|
33
33
|
export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, REGEXP_ONLY_CHARS, REGEXP_ONLY_DIGITS, REGEXP_ONLY_DIGITS_AND_CHARS, } from "#components/input-otp";
|
|
34
34
|
export { InputPassword } from "#components/input-password";
|
|
35
35
|
export { InputSearch } from "#components/input-search";
|
|
@@ -68,7 +68,9 @@ export { ToggleGroup, ToggleGroupItem } from "#components/toggle-group";
|
|
|
68
68
|
export { Tooltip, TooltipArrow, TooltipContent, TooltipProvider, TooltipTrigger } from "#components/tooltip";
|
|
69
69
|
export { useAnimatedValue } from "#hooks/use-animated-value";
|
|
70
70
|
export { useCopyToClipboard } from "#hooks/use-copy-to-clipboard";
|
|
71
|
+
export { useHasHydrated } from "#hooks/use-has-hydrated";
|
|
71
72
|
export { useIsMobile } from "#hooks/use-is-mobile";
|
|
73
|
+
export { useLatest } from "#hooks/use-latest";
|
|
72
74
|
export { useMediaQuery } from "#hooks/use-media-query";
|
|
73
75
|
export { useMutationObserver } from "#hooks/use-mutation-observer";
|
|
74
76
|
export { ELLIPSIS, usePagination } from "#hooks/use-pagination";
|
|
@@ -88,15 +88,8 @@ declare function getContentBottom({ content, spacer, viewport, }: {
|
|
|
88
88
|
* @since 0.5.0-canary.3
|
|
89
89
|
*/
|
|
90
90
|
declare function getMaxScrollTop(viewport: HTMLElement): number;
|
|
91
|
-
/**
|
|
92
|
-
* @since 0.5.0-canary.3
|
|
93
|
-
*/
|
|
94
|
-
declare function getContentBlockPadding(spacer: HTMLElement | null): {
|
|
95
|
-
end: number;
|
|
96
|
-
start: number;
|
|
97
|
-
};
|
|
98
91
|
/**
|
|
99
92
|
* @since 0.5.0-canary.3
|
|
100
93
|
*/
|
|
101
94
|
declare function getFlexGap(element: HTMLElement | null): number;
|
|
102
|
-
export {
|
|
95
|
+
export { getContentBottom, getElementScrollTop, getElementTop, getElementViewportTop, getFirstVisibleMessageItem, getFlexGap, getLastScrollAnchor, getMaxScrollTop, getMessageScrollerItems, getMessageScrollerScrollable, getMessageScrollerVisibilityState, getNewScrollAnchor, getTailSpacerHeight, getUnanchoredScrollAnchor, hasMultipleNewScrollAnchors, };
|
|
@@ -242,4 +242,4 @@ function readCssPixel(value) {
|
|
|
242
242
|
const number = Number.parseFloat(value);
|
|
243
243
|
return Number.isFinite(number) ? number : 0;
|
|
244
244
|
}
|
|
245
|
-
export {
|
|
245
|
+
export { getContentBottom, getElementScrollTop, getElementTop, getElementViewportTop, getFirstVisibleMessageItem, getFlexGap, getLastScrollAnchor, getMaxScrollTop, getMessageScrollerItems, getMessageScrollerScrollable, getMessageScrollerVisibilityState, getNewScrollAnchor, getTailSpacerHeight, getUnanchoredScrollAnchor, hasMultipleNewScrollAnchors, };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MessageScrollerScrollable, MessageScrollerStore,
|
|
1
|
+
import type { MessageScrollerScrollable, MessageScrollerStore, MessageScrollerVisibilityStore } from "#lib/message-scroller/types";
|
|
2
2
|
/**
|
|
3
3
|
* @since 0.5.0-canary.3
|
|
4
4
|
*/
|
|
@@ -11,8 +11,4 @@ declare function createMessageScrollerVisibilityStore(): MessageScrollerVisibili
|
|
|
11
11
|
* @since 0.5.0-canary.3
|
|
12
12
|
*/
|
|
13
13
|
declare function areScrollStatesEqual(current: MessageScrollerScrollable, next: MessageScrollerScrollable): boolean;
|
|
14
|
-
|
|
15
|
-
* @since 0.5.0-canary.3
|
|
16
|
-
*/
|
|
17
|
-
declare function areVisibilityStatesEqual(current: MessageScrollerVisibilityState, next: MessageScrollerVisibilityState): boolean;
|
|
18
|
-
export { areScrollStatesEqual, areVisibilityStatesEqual, createMessageScrollerStore, createMessageScrollerVisibilityStore, };
|
|
14
|
+
export { areScrollStatesEqual, createMessageScrollerStore, createMessageScrollerVisibilityStore };
|
|
@@ -60,4 +60,4 @@ function areVisibilityStatesEqual(current, next) {
|
|
|
60
60
|
}
|
|
61
61
|
return current.visibleMessageIds.every((messageId, index) => messageId === next.visibleMessageIds[index]);
|
|
62
62
|
}
|
|
63
|
-
export { areScrollStatesEqual,
|
|
63
|
+
export { areScrollStatesEqual, createMessageScrollerStore, createMessageScrollerVisibilityStore };
|