@vuer-ai/vuer-uikit 0.0.2 → 0.0.4
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/README.md +80 -0
- package/dist/chunk-25GQKTNF.mjs +105 -0
- package/dist/chunk-277NQUJD.js +99 -0
- package/dist/chunk-3FR3WKI4.mjs +24 -0
- package/dist/chunk-3Q75Z2CT.mjs +76 -0
- package/dist/chunk-5BIQ3IN7.js +93 -0
- package/dist/chunk-5GPQ7U5B.mjs +50 -0
- package/dist/chunk-66JQXJEV.mjs +272 -0
- package/dist/chunk-6ILSFDR5.mjs +161 -0
- package/dist/chunk-6L4KPPOD.mjs +90 -0
- package/dist/chunk-75QDQ67T.js +56 -0
- package/dist/chunk-7A7VNE3J.mjs +31 -0
- package/dist/chunk-7SXCVFSA.mjs +200 -0
- package/dist/chunk-7V4ELMOH.js +52 -0
- package/dist/chunk-7WUQTWQX.js +303 -0
- package/dist/chunk-A2Z57NAA.js +202 -0
- package/dist/chunk-ATDHGFVI.mjs +82 -0
- package/dist/chunk-ATEHWT2R.mjs +78 -0
- package/dist/chunk-B5EMQBVL.js +93 -0
- package/dist/chunk-CLTLT5XW.js +27 -0
- package/dist/chunk-COFRS37Z.mjs +337 -0
- package/dist/chunk-CP7QYV4N.mjs +110 -0
- package/dist/chunk-CZSRIDXN.mjs +165 -0
- package/dist/chunk-D4C5V4EN.mjs +53 -0
- package/dist/chunk-DWIK2CUV.mjs +45 -0
- package/dist/chunk-ECWCQWV5.js +148 -0
- package/dist/chunk-ENZI5WM7.js +108 -0
- package/dist/chunk-FVT46HEE.js +21 -0
- package/dist/chunk-FXIL4NQZ.js +58 -0
- package/dist/chunk-FYS6YECN.js +33 -0
- package/dist/chunk-G7XNQVPB.js +187 -0
- package/dist/chunk-GSXXTAQ3.js +373 -0
- package/dist/chunk-HUQZOPYD.js +2 -0
- package/dist/chunk-HW6SLBO3.mjs +9 -0
- package/dist/chunk-IPKCIMU4.mjs +156 -0
- package/dist/chunk-J7PTSP4Q.mjs +19 -0
- package/dist/chunk-KJ42IGH6.js +2 -0
- package/dist/chunk-KO7BQ6RR.js +83 -0
- package/dist/chunk-KQHNQQUZ.js +103 -0
- package/dist/chunk-KVFK3YC7.js +187 -0
- package/dist/chunk-KYKEJFJT.js +110 -0
- package/dist/chunk-LD7Y34QT.js +79 -0
- package/dist/chunk-LVSI4HYF.mjs +409 -0
- package/dist/chunk-M3KBBKQR.mjs +15 -0
- package/dist/chunk-MASRZTZC.mjs +34 -0
- package/dist/chunk-NN7R5DNL.mjs +119 -0
- package/dist/chunk-OE56M4MX.js +93 -0
- package/dist/chunk-OTDY2E2A.js +163 -0
- package/dist/chunk-PKGNHHWG.mjs +60 -0
- package/dist/chunk-Q3APPCB2.mjs +91 -0
- package/dist/chunk-QOUX33X5.mjs +111 -0
- package/dist/chunk-QS7WS6DD.mjs +1 -0
- package/dist/chunk-QZASHJNJ.js +24 -0
- package/dist/chunk-R6XNT4PN.js +431 -0
- package/dist/chunk-RACVRWME.js +136 -0
- package/dist/chunk-S2F2GRDB.mjs +1 -0
- package/dist/chunk-SI56IQWH.js +102 -0
- package/dist/chunk-ST4P6AN6.js +2 -0
- package/dist/chunk-TOZYLDAL.mjs +72 -0
- package/dist/chunk-UFR656UY.mjs +87 -0
- package/dist/chunk-UWO6RBCE.js +11 -0
- package/dist/chunk-VGCVIHBR.mjs +1 -0
- package/dist/chunk-WOG6UIG5.mjs +71 -0
- package/dist/chunk-X2QENXCS.mjs +54 -0
- package/dist/chunk-XACRGXGF.js +75 -0
- package/dist/chunk-XPNUQSKQ.mjs +94 -0
- package/dist/chunk-YQORMF34.js +110 -0
- package/dist/chunk-Z37VNICQ.js +67 -0
- package/dist/chunk-ZJXBC33M.js +112 -0
- package/dist/highlight-cursor/cursor-context.d.mts +7 -0
- package/dist/highlight-cursor/cursor-context.d.ts +7 -0
- package/dist/highlight-cursor/cursor-context.js +14 -0
- package/dist/highlight-cursor/cursor-context.mjs +1 -0
- package/dist/highlight-cursor/cursor-provider.d.mts +7 -0
- package/dist/highlight-cursor/cursor-provider.d.ts +7 -0
- package/dist/highlight-cursor/cursor-provider.js +12 -0
- package/dist/highlight-cursor/cursor-provider.mjs +3 -0
- package/dist/highlight-cursor/enhanced-components.d.mts +20 -0
- package/dist/highlight-cursor/enhanced-components.d.ts +20 -0
- package/dist/highlight-cursor/enhanced-components.js +36 -0
- package/dist/highlight-cursor/enhanced-components.mjs +11 -0
- package/dist/highlight-cursor/index.d.mts +16 -0
- package/dist/highlight-cursor/index.d.ts +16 -0
- package/dist/highlight-cursor/index.js +50 -0
- package/dist/highlight-cursor/index.mjs +13 -0
- package/dist/highlight-cursor/tabs-cursor-context.d.mts +14 -0
- package/dist/highlight-cursor/tabs-cursor-context.d.ts +14 -0
- package/dist/highlight-cursor/tabs-cursor-context.js +14 -0
- package/dist/highlight-cursor/tabs-cursor-context.mjs +1 -0
- package/dist/highlight-cursor/types.d.mts +39 -0
- package/dist/highlight-cursor/types.d.ts +39 -0
- package/dist/highlight-cursor/types.js +2 -0
- package/dist/highlight-cursor/types.mjs +1 -0
- package/dist/highlight-cursor/with-cursor.d.mts +7 -0
- package/dist/highlight-cursor/with-cursor.d.ts +7 -0
- package/dist/highlight-cursor/with-cursor.js +11 -0
- package/dist/highlight-cursor/with-cursor.mjs +2 -0
- package/dist/index.css +314 -0
- package/dist/index.d.mts +51 -0
- package/dist/index.d.ts +51 -0
- package/dist/index.js +425 -6744
- package/dist/index.mjs +34 -0
- package/dist/styles/theme.css +191 -0
- package/dist/styles/theme.d.mts +2 -0
- package/dist/styles/theme.d.ts +2 -0
- package/dist/styles/toast.css +58 -0
- package/dist/styles/toast.d.mts +2 -0
- package/dist/styles/toast.d.ts +2 -0
- package/dist/styles/variables.css +188 -0
- package/dist/styles/variables.d.mts +2 -0
- package/dist/styles/variables.d.ts +2 -0
- package/dist/ui/avatar.d.mts +16 -0
- package/dist/ui/avatar.d.ts +16 -0
- package/dist/ui/avatar.js +23 -0
- package/dist/ui/avatar.mjs +2 -0
- package/dist/ui/badge.d.mts +14 -0
- package/dist/ui/badge.d.ts +14 -0
- package/dist/ui/badge.js +16 -0
- package/dist/ui/badge.mjs +3 -0
- package/dist/ui/button.d.mts +16 -0
- package/dist/ui/button.d.ts +16 -0
- package/dist/ui/button.js +12 -0
- package/dist/ui/button.mjs +3 -0
- package/dist/ui/card.d.mts +12 -0
- package/dist/ui/card.d.ts +12 -0
- package/dist/ui/card.js +36 -0
- package/dist/ui/card.mjs +3 -0
- package/dist/ui/checkbox.d.mts +11 -0
- package/dist/ui/checkbox.d.ts +11 -0
- package/dist/ui/checkbox.js +12 -0
- package/dist/ui/checkbox.mjs +3 -0
- package/dist/ui/collapsible.d.mts +9 -0
- package/dist/ui/collapsible.d.ts +9 -0
- package/dist/ui/collapsible.js +20 -0
- package/dist/ui/collapsible.mjs +3 -0
- package/dist/ui/dropdown.d.mts +28 -0
- package/dist/ui/dropdown.d.ts +28 -0
- package/dist/ui/dropdown.js +68 -0
- package/dist/ui/dropdown.mjs +3 -0
- package/dist/ui/index.d.mts +44 -0
- package/dist/ui/index.d.ts +44 -0
- package/dist/ui/index.js +398 -0
- package/dist/ui/index.mjs +29 -0
- package/dist/ui/input-numbers.d.mts +15 -0
- package/dist/ui/input-numbers.d.ts +15 -0
- package/dist/ui/input-numbers.js +13 -0
- package/dist/ui/input-numbers.mjs +4 -0
- package/dist/ui/input.d.mts +22 -0
- package/dist/ui/input.d.ts +22 -0
- package/dist/ui/input.js +16 -0
- package/dist/ui/input.mjs +3 -0
- package/dist/ui/layout.d.mts +12 -0
- package/dist/ui/layout.d.ts +12 -0
- package/dist/ui/layout.js +12 -0
- package/dist/ui/layout.mjs +3 -0
- package/dist/ui/modal.d.mts +28 -0
- package/dist/ui/modal.d.ts +28 -0
- package/dist/ui/modal.js +48 -0
- package/dist/ui/modal.mjs +3 -0
- package/dist/ui/popover.d.mts +10 -0
- package/dist/ui/popover.d.ts +10 -0
- package/dist/ui/popover.js +23 -0
- package/dist/ui/popover.mjs +2 -0
- package/dist/ui/radio-group.d.mts +8 -0
- package/dist/ui/radio-group.d.ts +8 -0
- package/dist/ui/radio-group.js +16 -0
- package/dist/ui/radio-group.mjs +3 -0
- package/dist/ui/select.d.mts +28 -0
- package/dist/{types/ui → ui}/select.d.ts +18 -14
- package/dist/ui/select.js +48 -0
- package/dist/ui/select.mjs +3 -0
- package/dist/ui/sheet.d.mts +16 -0
- package/dist/ui/sheet.d.ts +16 -0
- package/dist/ui/sheet.js +39 -0
- package/dist/ui/sheet.mjs +2 -0
- package/dist/ui/slider.d.mts +10 -0
- package/dist/ui/slider.d.ts +10 -0
- package/dist/ui/slider.js +12 -0
- package/dist/ui/slider.mjs +3 -0
- package/dist/ui/switch.d.mts +7 -0
- package/dist/ui/switch.d.ts +7 -0
- package/dist/ui/switch.js +12 -0
- package/dist/ui/switch.mjs +3 -0
- package/dist/ui/tabs.d.mts +16 -0
- package/dist/ui/tabs.d.ts +16 -0
- package/dist/ui/tabs.js +25 -0
- package/dist/ui/tabs.mjs +4 -0
- package/dist/ui/textarea.d.mts +16 -0
- package/dist/ui/textarea.d.ts +16 -0
- package/dist/ui/textarea.js +12 -0
- package/dist/ui/textarea.mjs +3 -0
- package/dist/ui/theme-context.d.mts +17 -0
- package/dist/{types/ui → ui}/theme-context.d.ts +5 -3
- package/dist/ui/theme-context.js +14 -0
- package/dist/ui/theme-context.mjs +1 -0
- package/dist/ui/toast.d.mts +7 -0
- package/dist/ui/toast.d.ts +7 -0
- package/dist/ui/toast.js +14 -0
- package/dist/ui/toast.mjs +1 -0
- package/dist/ui/toggle-group.d.mts +12 -0
- package/dist/ui/toggle-group.d.ts +12 -0
- package/dist/ui/toggle-group.js +17 -0
- package/dist/ui/toggle-group.mjs +4 -0
- package/dist/ui/toggle.d.mts +13 -0
- package/dist/ui/toggle.d.ts +13 -0
- package/dist/ui/toggle.js +16 -0
- package/dist/ui/toggle.mjs +3 -0
- package/dist/ui/tooltip.d.mts +10 -0
- package/dist/ui/tooltip.d.ts +10 -0
- package/dist/ui/tooltip.js +23 -0
- package/dist/ui/tooltip.mjs +2 -0
- package/dist/ui/tree-view.d.mts +27 -0
- package/dist/ui/tree-view.d.ts +27 -0
- package/dist/ui/tree-view.js +11 -0
- package/dist/ui/tree-view.mjs +2 -0
- package/dist/utils/cn.d.mts +5 -0
- package/dist/utils/cn.d.ts +5 -0
- package/dist/utils/cn.js +10 -0
- package/dist/utils/cn.mjs +1 -0
- package/dist/utils/index.d.mts +2 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +11 -0
- package/dist/utils/index.mjs +2 -0
- package/package.json +49 -27
- package/dist/index.umd.js +0 -74
- package/dist/types/index.d.ts +0 -4
- package/dist/types/lib/utils.d.ts +0 -2
- package/dist/types/ui/button.d.ts +0 -13
- package/dist/types/ui/input.d.ts +0 -19
- package/dist/vuer-uikit.css +0 -1
package/README.md
CHANGED
|
@@ -1 +1,81 @@
|
|
|
1
1
|
# vuer-uikit
|
|
2
|
+
|
|
3
|
+
## Installation
|
|
4
|
+
|
|
5
|
+
Getting up and running is quick and easy.
|
|
6
|
+
|
|
7
|
+
### 1. Install Vuer Uikit
|
|
8
|
+
|
|
9
|
+
Install the package from your command line.
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install @vuer-ai/vuer-uikit
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### 2. Import the CSS file
|
|
16
|
+
|
|
17
|
+
Import the global CSS file at the root of your application.
|
|
18
|
+
|
|
19
|
+
```css
|
|
20
|
+
@import "tailwindcss";
|
|
21
|
+
|
|
22
|
+
@import "@vuer-ai/vuer-uikit/index.css";
|
|
23
|
+
|
|
24
|
+
@source "../../packages/vuer-uikit/src/ui/**/*.{ts,tsx}";
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### 3. Add the Theme component
|
|
28
|
+
|
|
29
|
+
Add `ThemeProvider` to your application, wrapping the root component inside of `body`.
|
|
30
|
+
|
|
31
|
+
```jsx line=7,9
|
|
32
|
+
import { ThemeProvider } from "@vuer-ai/vuer-uikit";
|
|
33
|
+
|
|
34
|
+
export default function () {
|
|
35
|
+
return (
|
|
36
|
+
<html>
|
|
37
|
+
<body>
|
|
38
|
+
<ThemeProvider>
|
|
39
|
+
<App />
|
|
40
|
+
</ThemeProvider>
|
|
41
|
+
</body>
|
|
42
|
+
</html>
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### 4. Start building
|
|
48
|
+
|
|
49
|
+
You are now ready to use Vuer Uikit components.
|
|
50
|
+
|
|
51
|
+
```jsx
|
|
52
|
+
import { Button } from "@vuer-ai/vuer-uikit";
|
|
53
|
+
|
|
54
|
+
export default function MyApp() {
|
|
55
|
+
return (
|
|
56
|
+
<div>
|
|
57
|
+
<Button>Let's go</Button>
|
|
58
|
+
</div>
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Customizing your theme
|
|
64
|
+
|
|
65
|
+
Configuration is managed and applied via the [Theme](/themes/docs/components/theme) component.
|
|
66
|
+
|
|
67
|
+
### Basic configuration
|
|
68
|
+
|
|
69
|
+
Using CSS Variables and color utilities for theming.
|
|
70
|
+
|
|
71
|
+
```css
|
|
72
|
+
@theme inline {
|
|
73
|
+
--brand-primary: var(--bg-custom-primary);
|
|
74
|
+
--brand-secondary: var(--bg-custom-secondary);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
:root {
|
|
78
|
+
--bg-custom-primary: rgba(0, 123, 255, 1);
|
|
79
|
+
--bg-custom-secondary: rgba(82, 177, 255, 1);
|
|
80
|
+
}
|
|
81
|
+
```
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { cn } from './chunk-HW6SLBO3.mjs';
|
|
2
|
+
import { composeRefs } from '@radix-ui/react-compose-refs';
|
|
3
|
+
import { cva } from 'class-variance-authority';
|
|
4
|
+
import { forwardRef, useRef } from 'react';
|
|
5
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
var inputRootVariants = cva(
|
|
8
|
+
[
|
|
9
|
+
"px-1.5",
|
|
10
|
+
"flex",
|
|
11
|
+
"gap-md",
|
|
12
|
+
"items-center",
|
|
13
|
+
"rounded-uk-sm",
|
|
14
|
+
"overflow-hidden",
|
|
15
|
+
"bg-bg-secondary"
|
|
16
|
+
],
|
|
17
|
+
{
|
|
18
|
+
variants: {
|
|
19
|
+
state: {
|
|
20
|
+
default: ["hover:bg-bg-tertiary", "has-[input:focus]:bg-bg-quaternary"],
|
|
21
|
+
disabled: ["disabled:cursor-not-allowed", "bg-bg-tertiary", "text-text-tertiary"],
|
|
22
|
+
error: ["hover:bg-danger-primary/10", "bg-danger-primary/20"]
|
|
23
|
+
},
|
|
24
|
+
size: {
|
|
25
|
+
default: ["h-9 ", "text-xs"],
|
|
26
|
+
sm: ["h-6 ", "text-sm ", "[&_.input-slot>svg:not([class*='size-'])]:size-xl"]
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
defaultVariants: {
|
|
30
|
+
state: "default",
|
|
31
|
+
size: "default"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
var InputRoot = forwardRef(function InputRoot2({ style, className, side, children, disabled, state, size, name, inputClassName, ...props }, ref) {
|
|
36
|
+
const inputRef = useRef(null);
|
|
37
|
+
return /* @__PURE__ */ jsxs(
|
|
38
|
+
"div",
|
|
39
|
+
{
|
|
40
|
+
style,
|
|
41
|
+
"data-input": true,
|
|
42
|
+
className: cn(inputRootVariants({ size, state: disabled ? "disabled" : state }), className),
|
|
43
|
+
onClick: (event) => {
|
|
44
|
+
const target = event.target;
|
|
45
|
+
if (target.closest("input, button, a")) return;
|
|
46
|
+
const input = inputRef.current;
|
|
47
|
+
if (!input) return;
|
|
48
|
+
const isRightSlot = target.closest(`
|
|
49
|
+
.input-slot[data-side='right'],
|
|
50
|
+
.input-slot:not([data-side='right']) ~ .input-slot:not([data-side='left'])
|
|
51
|
+
`);
|
|
52
|
+
const cursorPosition = isRightSlot ? input.value.length : 0;
|
|
53
|
+
requestAnimationFrame(() => {
|
|
54
|
+
try {
|
|
55
|
+
input.setSelectionRange(cursorPosition, cursorPosition);
|
|
56
|
+
} catch {
|
|
57
|
+
}
|
|
58
|
+
input.focus();
|
|
59
|
+
});
|
|
60
|
+
},
|
|
61
|
+
children: [
|
|
62
|
+
/* @__PURE__ */ jsx(
|
|
63
|
+
"input",
|
|
64
|
+
{
|
|
65
|
+
spellCheck: "false",
|
|
66
|
+
...props,
|
|
67
|
+
"data-side": side,
|
|
68
|
+
disabled,
|
|
69
|
+
name: name ?? "text",
|
|
70
|
+
ref: composeRefs(inputRef, ref),
|
|
71
|
+
className: cn(
|
|
72
|
+
["data-[side=right]:text-right", "outline-none", "w-full", "h-full"],
|
|
73
|
+
inputClassName
|
|
74
|
+
)
|
|
75
|
+
}
|
|
76
|
+
),
|
|
77
|
+
children
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
});
|
|
82
|
+
var InputSlot = forwardRef(function({ className, children, side = "left", ...props }, ref) {
|
|
83
|
+
return /* @__PURE__ */ jsx(
|
|
84
|
+
"div",
|
|
85
|
+
{
|
|
86
|
+
"data-side": side,
|
|
87
|
+
...props,
|
|
88
|
+
ref,
|
|
89
|
+
className: cn(
|
|
90
|
+
[
|
|
91
|
+
"input-slot",
|
|
92
|
+
"cursor-text",
|
|
93
|
+
"shrink-0",
|
|
94
|
+
"order-[0]",
|
|
95
|
+
"data-[side=left]:-order-1",
|
|
96
|
+
"text-text-tertiary"
|
|
97
|
+
],
|
|
98
|
+
className
|
|
99
|
+
),
|
|
100
|
+
children
|
|
101
|
+
}
|
|
102
|
+
);
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
export { InputRoot, InputSlot };
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkYQORMF34_js = require('./chunk-YQORMF34.js');
|
|
4
|
+
var chunkUWO6RBCE_js = require('./chunk-UWO6RBCE.js');
|
|
5
|
+
var ToggleGroupPrimitive = require('@radix-ui/react-toggle-group');
|
|
6
|
+
var react = require('react');
|
|
7
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
8
|
+
|
|
9
|
+
function _interopNamespace(e) {
|
|
10
|
+
if (e && e.__esModule) return e;
|
|
11
|
+
var n = Object.create(null);
|
|
12
|
+
if (e) {
|
|
13
|
+
Object.keys(e).forEach(function (k) {
|
|
14
|
+
if (k !== 'default') {
|
|
15
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
16
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () { return e[k]; }
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
n.default = e;
|
|
24
|
+
return Object.freeze(n);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
var ToggleGroupPrimitive__namespace = /*#__PURE__*/_interopNamespace(ToggleGroupPrimitive);
|
|
28
|
+
|
|
29
|
+
var ToggleGroupContext = react.createContext({
|
|
30
|
+
size: "base",
|
|
31
|
+
variant: "primary"
|
|
32
|
+
});
|
|
33
|
+
function ToggleGroup({
|
|
34
|
+
className,
|
|
35
|
+
variant,
|
|
36
|
+
size,
|
|
37
|
+
children,
|
|
38
|
+
...props
|
|
39
|
+
}) {
|
|
40
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
41
|
+
ToggleGroupPrimitive__namespace.Root,
|
|
42
|
+
{
|
|
43
|
+
"data-slot": "toggle-group",
|
|
44
|
+
"data-variant": variant,
|
|
45
|
+
"data-size": size,
|
|
46
|
+
className: chunkUWO6RBCE_js.cn(
|
|
47
|
+
"group/toggle-group",
|
|
48
|
+
"flex",
|
|
49
|
+
"w-fit",
|
|
50
|
+
"items-center",
|
|
51
|
+
"rounded-uk-md",
|
|
52
|
+
"data-[variant=outline]:shadow-xs",
|
|
53
|
+
className
|
|
54
|
+
),
|
|
55
|
+
...props,
|
|
56
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(ToggleGroupContext.Provider, { value: { variant, size }, children })
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
function ToggleGroupItem({
|
|
61
|
+
className,
|
|
62
|
+
children,
|
|
63
|
+
variant,
|
|
64
|
+
size,
|
|
65
|
+
...props
|
|
66
|
+
}) {
|
|
67
|
+
const context = react.useContext(ToggleGroupContext);
|
|
68
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
69
|
+
ToggleGroupPrimitive__namespace.Item,
|
|
70
|
+
{
|
|
71
|
+
"data-slot": "toggle-group-item",
|
|
72
|
+
"data-variant": context.variant || variant,
|
|
73
|
+
"data-size": context.size || size,
|
|
74
|
+
className: chunkUWO6RBCE_js.cn(
|
|
75
|
+
chunkYQORMF34_js.toggleVariants({
|
|
76
|
+
variant: context.variant || variant,
|
|
77
|
+
size: context.size || size
|
|
78
|
+
}),
|
|
79
|
+
"min-w-0",
|
|
80
|
+
"flex-1",
|
|
81
|
+
"shrink-0",
|
|
82
|
+
"rounded-none",
|
|
83
|
+
"shadow-none",
|
|
84
|
+
"first:rounded-l-md",
|
|
85
|
+
"last:rounded-r-md",
|
|
86
|
+
"focus:z-10",
|
|
87
|
+
"focus-visible:z-10",
|
|
88
|
+
"data-[variant=outline]:border-l-0",
|
|
89
|
+
"data-[variant=outline]:first:border-l",
|
|
90
|
+
className
|
|
91
|
+
),
|
|
92
|
+
...props,
|
|
93
|
+
children
|
|
94
|
+
}
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
exports.ToggleGroup = ToggleGroup;
|
|
99
|
+
exports.ToggleGroupItem = ToggleGroupItem;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { createContext, useContext } from 'react';
|
|
2
|
+
|
|
3
|
+
// src/highlight-cursor/cursor-context.tsx
|
|
4
|
+
var defaultDimensions = {
|
|
5
|
+
width: 0,
|
|
6
|
+
height: 0,
|
|
7
|
+
x: 0,
|
|
8
|
+
y: 0
|
|
9
|
+
};
|
|
10
|
+
var defaultContext = {
|
|
11
|
+
mousePosition: { x: 0, y: 0 },
|
|
12
|
+
hoveredElementId: null,
|
|
13
|
+
elementDimensions: defaultDimensions,
|
|
14
|
+
registerHoveredElement: () => {
|
|
15
|
+
},
|
|
16
|
+
unregisterHoveredElement: () => {
|
|
17
|
+
},
|
|
18
|
+
updateElementDimensions: () => {
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
var CursorContext = createContext(defaultContext);
|
|
22
|
+
var useCursor = () => useContext(CursorContext);
|
|
23
|
+
|
|
24
|
+
export { CursorContext, useCursor };
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { toggleVariants } from './chunk-UFR656UY.mjs';
|
|
2
|
+
import { cn } from './chunk-HW6SLBO3.mjs';
|
|
3
|
+
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
|
4
|
+
import { createContext, useContext } from 'react';
|
|
5
|
+
import { jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
var ToggleGroupContext = createContext({
|
|
8
|
+
size: "base",
|
|
9
|
+
variant: "primary"
|
|
10
|
+
});
|
|
11
|
+
function ToggleGroup({
|
|
12
|
+
className,
|
|
13
|
+
variant,
|
|
14
|
+
size,
|
|
15
|
+
children,
|
|
16
|
+
...props
|
|
17
|
+
}) {
|
|
18
|
+
return /* @__PURE__ */ jsx(
|
|
19
|
+
ToggleGroupPrimitive.Root,
|
|
20
|
+
{
|
|
21
|
+
"data-slot": "toggle-group",
|
|
22
|
+
"data-variant": variant,
|
|
23
|
+
"data-size": size,
|
|
24
|
+
className: cn(
|
|
25
|
+
"group/toggle-group",
|
|
26
|
+
"flex",
|
|
27
|
+
"w-fit",
|
|
28
|
+
"items-center",
|
|
29
|
+
"rounded-uk-md",
|
|
30
|
+
"data-[variant=outline]:shadow-xs",
|
|
31
|
+
className
|
|
32
|
+
),
|
|
33
|
+
...props,
|
|
34
|
+
children: /* @__PURE__ */ jsx(ToggleGroupContext.Provider, { value: { variant, size }, children })
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
function ToggleGroupItem({
|
|
39
|
+
className,
|
|
40
|
+
children,
|
|
41
|
+
variant,
|
|
42
|
+
size,
|
|
43
|
+
...props
|
|
44
|
+
}) {
|
|
45
|
+
const context = useContext(ToggleGroupContext);
|
|
46
|
+
return /* @__PURE__ */ jsx(
|
|
47
|
+
ToggleGroupPrimitive.Item,
|
|
48
|
+
{
|
|
49
|
+
"data-slot": "toggle-group-item",
|
|
50
|
+
"data-variant": context.variant || variant,
|
|
51
|
+
"data-size": context.size || size,
|
|
52
|
+
className: cn(
|
|
53
|
+
toggleVariants({
|
|
54
|
+
variant: context.variant || variant,
|
|
55
|
+
size: context.size || size
|
|
56
|
+
}),
|
|
57
|
+
"min-w-0",
|
|
58
|
+
"flex-1",
|
|
59
|
+
"shrink-0",
|
|
60
|
+
"rounded-none",
|
|
61
|
+
"shadow-none",
|
|
62
|
+
"first:rounded-l-md",
|
|
63
|
+
"last:rounded-r-md",
|
|
64
|
+
"focus:z-10",
|
|
65
|
+
"focus-visible:z-10",
|
|
66
|
+
"data-[variant=outline]:border-l-0",
|
|
67
|
+
"data-[variant=outline]:first:border-l",
|
|
68
|
+
className
|
|
69
|
+
),
|
|
70
|
+
...props,
|
|
71
|
+
children
|
|
72
|
+
}
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export { ToggleGroup, ToggleGroupItem };
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkUWO6RBCE_js = require('./chunk-UWO6RBCE.js');
|
|
4
|
+
var reactSlot = require('@radix-ui/react-slot');
|
|
5
|
+
var classVarianceAuthority = require('class-variance-authority');
|
|
6
|
+
var react = require('react');
|
|
7
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
8
|
+
|
|
9
|
+
var buttonVariants = classVarianceAuthority.cva(
|
|
10
|
+
[
|
|
11
|
+
"inline-flex",
|
|
12
|
+
"items-center",
|
|
13
|
+
"justify-center",
|
|
14
|
+
"shrink-0",
|
|
15
|
+
"whitespace-nowrap",
|
|
16
|
+
"rounded-uk-sm",
|
|
17
|
+
"font-medium",
|
|
18
|
+
"transition-all",
|
|
19
|
+
"[&_svg]:shrink-0 ",
|
|
20
|
+
"[&_svg]:pointer-events-none",
|
|
21
|
+
"outline-none",
|
|
22
|
+
"disabled:pointer-events-none",
|
|
23
|
+
"disabled:bg-bg-tertiary",
|
|
24
|
+
"disabled:text-text-tertiary",
|
|
25
|
+
"focus-visible:border-ring",
|
|
26
|
+
"focus-visible:ring-ring/50",
|
|
27
|
+
"focus-visible:ring-[3px]",
|
|
28
|
+
"focus-visible:bg-brand-tertiary",
|
|
29
|
+
"aria-invalid:ring-destructive/20",
|
|
30
|
+
"aria-invalid:border-destructive"
|
|
31
|
+
],
|
|
32
|
+
{
|
|
33
|
+
variants: {
|
|
34
|
+
variant: {
|
|
35
|
+
primary: [
|
|
36
|
+
"bg-brand-primary",
|
|
37
|
+
"text-text-withbg",
|
|
38
|
+
"hover:bg-brand-secondary",
|
|
39
|
+
"active:bg-brand-tertiary"
|
|
40
|
+
],
|
|
41
|
+
secondary: [
|
|
42
|
+
"bg-bg-secondary",
|
|
43
|
+
"text-text-highlight",
|
|
44
|
+
"hover:bg-bg-quaternary",
|
|
45
|
+
"active:bg-bg-tertiary"
|
|
46
|
+
],
|
|
47
|
+
destructive: [
|
|
48
|
+
"bg-danger-primary",
|
|
49
|
+
"text-text-withbg",
|
|
50
|
+
"hover:bg-danger-secondary",
|
|
51
|
+
"active:bg-danger-tertiary"
|
|
52
|
+
],
|
|
53
|
+
ghost: [
|
|
54
|
+
"text-text-primary",
|
|
55
|
+
"hover:bg-bg-tertiary",
|
|
56
|
+
"hover:text-text-secondary",
|
|
57
|
+
"active:bg-bg-secondary"
|
|
58
|
+
],
|
|
59
|
+
link: ["text-text-primary", "underline-offset-4", "hover:underline"]
|
|
60
|
+
},
|
|
61
|
+
size: {
|
|
62
|
+
sm: ["text-xs", "h-5.5", "gap-xxs", "px-md", "[&_svg:not([class*='size-'])]:size-3"],
|
|
63
|
+
base: ["text-xs", "h-7 ", "gap-xs", " px-lg", "[&_svg:not([class*='size-'])]:size-3.5"],
|
|
64
|
+
lg: ["text-sm", "h-8", " gap-xs", "px-xl", "[&_svg:not([class*='size-'])]:size-4"]
|
|
65
|
+
},
|
|
66
|
+
icon: { false: null, true: null }
|
|
67
|
+
},
|
|
68
|
+
compoundVariants: [
|
|
69
|
+
{ size: "sm", icon: true, class: ["px-xs", "py-xs", " size-5.5"] },
|
|
70
|
+
{ size: "base", icon: true, class: ["px-sm", "py-sm", "size-7"] },
|
|
71
|
+
{ size: "lg", icon: true, class: ["px-md", "py-md", " size-8"] }
|
|
72
|
+
],
|
|
73
|
+
defaultVariants: {
|
|
74
|
+
variant: "primary",
|
|
75
|
+
size: "base",
|
|
76
|
+
icon: false
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
);
|
|
80
|
+
var Button = react.forwardRef(function Button2({ className, variant, size, icon, asChild = false, ...props }, ref) {
|
|
81
|
+
const Comp = asChild ? reactSlot.Slot : "button";
|
|
82
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
83
|
+
Comp,
|
|
84
|
+
{
|
|
85
|
+
ref,
|
|
86
|
+
"data-slot": "button",
|
|
87
|
+
className: chunkUWO6RBCE_js.cn(buttonVariants({ variant, size, icon, className })),
|
|
88
|
+
...props
|
|
89
|
+
}
|
|
90
|
+
);
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
exports.Button = Button;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { cn } from './chunk-HW6SLBO3.mjs';
|
|
2
|
+
import { cva } from 'class-variance-authority';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
var textareaVariants = cva(
|
|
6
|
+
[
|
|
7
|
+
"bg-bg-secondary",
|
|
8
|
+
"disabled:bg-bg-tertiary",
|
|
9
|
+
"disabled:text-text-tertiary",
|
|
10
|
+
"disabled:cursor-not-allowed",
|
|
11
|
+
"outline",
|
|
12
|
+
"outline-transparent",
|
|
13
|
+
"-outline-offset-1",
|
|
14
|
+
"placehoder:text-muted-foreground",
|
|
15
|
+
"flex",
|
|
16
|
+
"min-h-16",
|
|
17
|
+
"w-full",
|
|
18
|
+
"px-3",
|
|
19
|
+
"py-2"
|
|
20
|
+
],
|
|
21
|
+
{
|
|
22
|
+
variants: {
|
|
23
|
+
state: {
|
|
24
|
+
default: ["hover:bg-bg-tertiary", "focus:bg-bg-quaternary"],
|
|
25
|
+
error: ["hover:bg-danger-primary/10", "bg-danger-primary/20"]
|
|
26
|
+
},
|
|
27
|
+
size: {
|
|
28
|
+
sm: ["text-sm", "rounded-uk-sm"],
|
|
29
|
+
base: ["text-md", "rounded-uk-md"],
|
|
30
|
+
lg: ["text-xl", "rounded-uk-md"]
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
defaultVariants: {
|
|
34
|
+
state: "default",
|
|
35
|
+
size: "base"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
function Textarea({ className, state, size, ...props }) {
|
|
40
|
+
return /* @__PURE__ */ jsx(
|
|
41
|
+
"textarea",
|
|
42
|
+
{
|
|
43
|
+
className: cn(textareaVariants({ className, state, size })),
|
|
44
|
+
"data-slot": "textarea",
|
|
45
|
+
...props
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export { Textarea };
|