@choice-ui/react 1.6.4 → 1.6.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.
@@ -2,7 +2,6 @@ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { OTPInput as Lt } from "../../../node_modules/.pnpm/input-otp@1.4.2_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-otp/dist/index.js";
3
3
  import { useMemo, createContext, useContext } from "react";
4
4
  import { otpInputTv } from "./tv.js";
5
- import css from "./otp-input.module.css.js";
6
5
  import { tcx } from "../../../shared/utils/tcx/tcx.js";
7
6
  const OTPInputCtx = createContext({
8
7
  styles: otpInputTv({}),
@@ -84,7 +83,7 @@ function OTPInputSlot({ className, index, ...props }) {
84
83
  hasFakeCaret && isActive ? /* @__PURE__ */ jsx(
85
84
  "div",
86
85
  {
87
- className: tcx((_d = styles == null ? void 0 : styles.caret) == null ? void 0 : _d.call(styles), css.caret),
86
+ className: tcx((_d = styles == null ? void 0 : styles.caret) == null ? void 0 : _d.call(styles), "otp-input__caret"),
88
87
  "data-slot": "otp-input-caret"
89
88
  }
90
89
  ) : null
@@ -0,0 +1,48 @@
1
+ import { MenuContextContent, MenuDivider, MenuEmpty, MenuContextItem, MenuSearch, MenuTrigger, MenuValue } from '../../menus/src';
2
+ import { FloatingFocusManagerProps } from '@floating-ui/react';
3
+ import { default as React } from 'react';
4
+ interface VirtualSelectOption<T = unknown> {
5
+ value: string;
6
+ label: string;
7
+ disabled?: boolean;
8
+ data?: T;
9
+ }
10
+ interface VirtualSelectProps<T = unknown> {
11
+ className?: string;
12
+ closeOnEscape?: boolean;
13
+ disabled?: boolean;
14
+ emptyText?: string;
15
+ focusManagerProps?: Partial<FloatingFocusManagerProps>;
16
+ matchTriggerWidth?: boolean;
17
+ maxHeight?: number;
18
+ onChange?: (value: string) => void;
19
+ onOpenChange?: (open: boolean) => void;
20
+ open?: boolean;
21
+ options: VirtualSelectOption<T>[];
22
+ overscan?: number;
23
+ placeholder?: string;
24
+ placement?: "bottom-start" | "bottom-end";
25
+ portalId?: string;
26
+ readOnly?: boolean;
27
+ renderOption?: (option: VirtualSelectOption<T>, isSelected: boolean) => React.ReactNode;
28
+ renderValue?: (option: VirtualSelectOption<T> | null) => React.ReactNode;
29
+ root?: HTMLElement | null;
30
+ searchPlaceholder?: string;
31
+ size?: "default" | "large";
32
+ value?: string | null;
33
+ variant?: "default" | "light" | "reset";
34
+ }
35
+ interface VirtualSelectComponentType {
36
+ <T = unknown>(props: VirtualSelectProps<T>): React.ReactElement | null;
37
+ displayName?: string;
38
+ Content: typeof MenuContextContent;
39
+ Divider: typeof MenuDivider;
40
+ Empty: typeof MenuEmpty;
41
+ Item: typeof MenuContextItem;
42
+ Search: typeof MenuSearch;
43
+ Trigger: typeof MenuTrigger;
44
+ Value: typeof MenuValue;
45
+ }
46
+ declare const VirtualSelect: VirtualSelectComponentType;
47
+
48
+ export { VirtualSelect, type VirtualSelectOption, type VirtualSelectProps };
@@ -593,3 +593,22 @@
593
593
  grid-template-columns: auto 1fr 2.5rem;
594
594
  }
595
595
  }
596
+
597
+ /* OTP Input styles */
598
+ @layer components {
599
+ .otp-input__caret {
600
+ animation: otp-caret-blink 1s ease-out infinite;
601
+ }
602
+
603
+ @keyframes otp-caret-blink {
604
+ 0%,
605
+ 70%,
606
+ 100% {
607
+ opacity: 1;
608
+ }
609
+ 20%,
610
+ 50% {
611
+ opacity: 0;
612
+ }
613
+ }
614
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@choice-ui/react",
3
- "version": "1.6.4",
3
+ "version": "1.6.5",
4
4
  "description": "A desktop-first React UI component library built for professional desktop applications with comprehensive documentation",
5
5
  "sideEffects": false,
6
6
  "type": "module",
@@ -1,15 +0,0 @@
1
- ._caret_7qdip_1 {
2
- animation: _caret-blink_7qdip_1 1s ease-out infinite;
3
- }
4
-
5
- @keyframes _caret-blink_7qdip_1 {
6
- 0%,
7
- 70%,
8
- 100% {
9
- opacity: 1;
10
- }
11
- 20%,
12
- 50% {
13
- opacity: 0;
14
- }
15
- }
@@ -1,8 +0,0 @@
1
- import './otp-input.module.css';const caret = "_caret_7qdip_1";
2
- const css = {
3
- caret
4
- };
5
- export {
6
- caret,
7
- css as default
8
- };