@rentnerkev/select 2.0.0 → 3.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rentnerkev/select",
3
- "version": "2.0.0",
3
+ "version": "3.1.0",
4
4
  "description": "Accessible, searchable React select with single and multiple selection support.",
5
5
  "author": "RentnerKev",
6
6
  "license": "MIT",
@@ -20,13 +20,15 @@
20
20
  "test": "bun test",
21
21
  "prepare": "bun run build",
22
22
  "pack:check": "bun pm pack --dry-run",
23
+ "playground:install": "bun install --cwd playground --frozen-lockfile",
23
24
  "playground:dev": "bun --cwd playground dev",
24
25
  "playground:build": "bun --cwd playground build",
26
+ "e2e": "playwright test",
25
27
  "lint": "oxlint .",
26
28
  "lint:fix": "oxlint --fix .",
27
29
  "format": "oxfmt .",
28
30
  "format:check": "oxfmt --check .",
29
- "verify": "bun run typecheck && bun run lint && bun run format:check && bun run test && bun run build && bun run pack:check"
31
+ "verify": "bun run playground:install && bun run typecheck && bun run lint && bun run format:check && bun run test && bun run build && bun run pack:check && bun run e2e"
30
32
  },
31
33
  "repository": {
32
34
  "type": "git",
@@ -45,7 +47,9 @@
45
47
  "react-dom": "^19.0.0"
46
48
  },
47
49
  "devDependencies": {
50
+ "@axe-core/playwright": "^4.13.0",
48
51
  "@happy-dom/global-registrator": "^20.14.5",
52
+ "@playwright/test": "^1.63.0",
49
53
  "@testing-library/react": "^16.3.3",
50
54
  "@testing-library/user-event": "^14.6.7",
51
55
  "@types/react": "^19.3.0",
@@ -59,7 +63,7 @@
59
63
  },
60
64
  "dependencies": {
61
65
  "@radix-ui/react-select": "^2.3.7",
62
- "@radix-ui/react-tooltip": "^1.2.16",
66
+ "@rentnerkev/tooltips": "^2.0.0",
63
67
  "lucide-react": "^1.47.0"
64
68
  },
65
69
  "exports": {
package/tailwind.css CHANGED
@@ -1,3 +1,5 @@
1
+ @import '@rentnerkev/tooltips/tailwind.css';
2
+
1
3
  @source "./dist/**/*.js";
2
4
 
3
5
  @theme {
@@ -9,4 +11,23 @@
9
11
  --color-border-dark: #2e323b;
10
12
  --color-secondary-text: #9ca3af;
11
13
  --color-muted-foreground: #9ca3af;
14
+ --color-select-control: #22252b;
15
+ --color-select-surface: #181a1f;
16
+ --color-select-hover: #2b3038;
17
+ --color-select-border: #2e323b;
18
+ --color-select-border-strong: #515965;
19
+ --color-select-foreground: #e5e7eb;
20
+ --color-select-muted: #9ca3af;
21
+ --color-select-accent: #8586f4;
22
+ }
23
+
24
+ /* Radix normally injects these rules. Shipping them here also works with strict CSP. */
25
+ [data-radix-select-viewport] {
26
+ scrollbar-width: none;
27
+ -ms-overflow-style: none;
28
+ -webkit-overflow-scrolling: touch;
29
+ }
30
+
31
+ [data-radix-select-viewport]::-webkit-scrollbar {
32
+ display: none;
12
33
  }
@@ -1,16 +0,0 @@
1
- import type { ReactElement, ReactNode } from 'react';
2
- interface TooltipCustomDesign {
3
- baseClasses?: string;
4
- animationClasses?: string;
5
- contentClasses?: string;
6
- arrowClasses?: string;
7
- }
8
- interface TooltipProps {
9
- children: ReactElement;
10
- content: ReactNode;
11
- side?: 'top' | 'right' | 'bottom' | 'left';
12
- customDesign?: TooltipCustomDesign;
13
- }
14
- export declare function CustomTooltip({ children, content, side, customDesign, }: TooltipProps): import("react").JSX.Element;
15
- export {};
16
- //# sourceMappingURL=Tooltip.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../src/Internal/Tooltip.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEpD,UAAU,mBAAmB;IACzB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,YAAY,CAAC,EAAE,MAAM,CAAA;CACxB;AAUD,UAAU,YAAY;IAClB,QAAQ,EAAE,YAAY,CAAA;IACtB,OAAO,EAAE,SAAS,CAAA;IAClB,IAAI,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAA;IAC1C,YAAY,CAAC,EAAE,mBAAmB,CAAA;CACrC;AAED,wBAAgB,aAAa,CAAC,EAC1B,QAAQ,EACR,OAAO,EACP,IAAY,EACZ,YAAY,GACf,EAAE,YAAY,+BA0Bd"}
@@ -1,13 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import * as TooltipPrimitive from '@radix-ui/react-tooltip';
3
- const defaultTooltipDesign = {
4
- baseClasses: 'data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 rounded-lg border border-border-dark bg-surface-dark px-3 py-1.5 text-xs font-medium text-gray-200 shadow-xl data-[side=bottom]:slide-in-from-top-2',
5
- animationClasses: 'animate-in fade-in zoom-in-95',
6
- contentClasses: '',
7
- arrowClasses: 'fill-surface-dark stroke-border-dark',
8
- };
9
- export function CustomTooltip({ children, content, side = 'top', customDesign, }) {
10
- const design = { ...defaultTooltipDesign, ...customDesign };
11
- return (_jsx(TooltipPrimitive.Provider, { children: _jsxs(TooltipPrimitive.Root, { delayDuration: 200, children: [_jsx(TooltipPrimitive.Trigger, { asChild: true, children: children }), _jsx(TooltipPrimitive.Portal, { children: _jsxs(TooltipPrimitive.Content, { sideOffset: 8, side: side, className: `z-[9999] ${design.baseClasses} ${design.animationClasses} ${design.contentClasses}`, children: [content, _jsx(TooltipPrimitive.Arrow, { width: 12, height: 6, className: design.arrowClasses })] }) })] }) }));
12
- }
13
- //# sourceMappingURL=Tooltip.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Tooltip.js","sourceRoot":"","sources":["../../src/Internal/Tooltip.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAA;AAU3D,MAAM,oBAAoB,GAAkC;IACxD,WAAW,EACP,0QAA0Q;IAC9Q,gBAAgB,EAAE,+BAA+B;IACjD,cAAc,EAAE,EAAE;IAClB,YAAY,EAAE,sCAAsC;CACvD,CAAA;AASD,MAAM,UAAU,aAAa,CAAC,EAC1B,QAAQ,EACR,OAAO,EACP,IAAI,GAAG,KAAK,EACZ,YAAY,GACD;IACX,MAAM,MAAM,GAAG,EAAE,GAAG,oBAAoB,EAAE,GAAG,YAAY,EAAE,CAAA;IAE3D,OAAO,CACH,KAAC,gBAAgB,CAAC,QAAQ,cACtB,MAAC,gBAAgB,CAAC,IAAI,IAAC,aAAa,EAAE,GAAG,aACrC,KAAC,gBAAgB,CAAC,OAAO,IAAC,OAAO,kBAC5B,QAAQ,GACc,EAC3B,KAAC,gBAAgB,CAAC,MAAM,cACpB,MAAC,gBAAgB,CAAC,OAAO,IACrB,UAAU,EAAE,CAAC,EACb,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,YAAY,MAAM,CAAC,WAAW,IAAI,MAAM,CAAC,gBAAgB,IAAI,MAAM,CAAC,cAAc,EAAE,aAE9F,OAAO,EACR,KAAC,gBAAgB,CAAC,KAAK,IACnB,KAAK,EAAE,EAAE,EACT,MAAM,EAAE,CAAC,EACT,SAAS,EAAE,MAAM,CAAC,YAAY,GAChC,IACqB,GACL,IACN,GACA,CAC/B,CAAA;AACL,CAAC"}