@aphexcms/ui 0.1.5 → 0.1.7
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/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Benjamin Sinidol
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Checkbox as CheckboxPrimitive } from "bits-ui";
|
|
3
|
+
import CheckIcon from "@lucide/svelte/icons/check";
|
|
4
|
+
import MinusIcon from "@lucide/svelte/icons/minus";
|
|
5
|
+
import { cn, type WithoutChildrenOrChild } from "../../../utils.js";
|
|
6
|
+
|
|
7
|
+
let {
|
|
8
|
+
ref = $bindable(null),
|
|
9
|
+
checked = $bindable(false),
|
|
10
|
+
indeterminate = $bindable(false),
|
|
11
|
+
class: className,
|
|
12
|
+
...restProps
|
|
13
|
+
}: WithoutChildrenOrChild<CheckboxPrimitive.RootProps> = $props();
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<CheckboxPrimitive.Root
|
|
17
|
+
bind:ref
|
|
18
|
+
data-slot="checkbox"
|
|
19
|
+
class={cn(
|
|
20
|
+
"border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive shadow-xs peer flex size-4 shrink-0 items-center justify-center rounded-[4px] border outline-none transition-shadow focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
|
|
21
|
+
className
|
|
22
|
+
)}
|
|
23
|
+
bind:checked
|
|
24
|
+
bind:indeterminate
|
|
25
|
+
{...restProps}
|
|
26
|
+
>
|
|
27
|
+
{#snippet children({ checked, indeterminate })}
|
|
28
|
+
<div data-slot="checkbox-indicator" class="text-current transition-none">
|
|
29
|
+
{#if checked}
|
|
30
|
+
<CheckIcon class="size-3.5" />
|
|
31
|
+
{:else if indeterminate}
|
|
32
|
+
<MinusIcon class="size-3.5" />
|
|
33
|
+
{/if}
|
|
34
|
+
</div>
|
|
35
|
+
{/snippet}
|
|
36
|
+
</CheckboxPrimitive.Root>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Checkbox as CheckboxPrimitive } from "bits-ui";
|
|
2
|
+
declare const Checkbox: import("svelte").Component<Omit<Omit<CheckboxPrimitive.RootProps, "child">, "children">, {}, "ref" | "checked" | "indeterminate">;
|
|
3
|
+
type Checkbox = ReturnType<typeof Checkbox>;
|
|
4
|
+
export default Checkbox;
|
package/package.json
CHANGED
|
@@ -1,135 +1,162 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
2
|
+
"name": "@aphexcms/ui",
|
|
3
|
+
"version": "0.1.7",
|
|
4
|
+
"description": "Shared UI components for Aphex CMS (shadcn-svelte)",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
"./package.json": "./package.json",
|
|
8
|
+
"./shadcn/alert": {
|
|
9
|
+
"types": "./dist/components/ui/alert/index.d.ts",
|
|
10
|
+
"svelte": "./dist/components/ui/alert/index.js",
|
|
11
|
+
"default": "./dist/components/ui/alert/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./shadcn/alert-dialog": {
|
|
14
|
+
"types": "./dist/components/ui/alert-dialog/index.d.ts",
|
|
15
|
+
"svelte": "./dist/components/ui/alert-dialog/index.js",
|
|
16
|
+
"default": "./dist/components/ui/alert-dialog/index.js"
|
|
17
|
+
},
|
|
18
|
+
"./shadcn/avatar": {
|
|
19
|
+
"types": "./dist/components/ui/avatar/index.d.ts",
|
|
20
|
+
"svelte": "./dist/components/ui/avatar/index.js",
|
|
21
|
+
"default": "./dist/components/ui/avatar/index.js"
|
|
22
|
+
},
|
|
23
|
+
"./shadcn/badge": {
|
|
24
|
+
"types": "./dist/components/ui/badge/index.d.ts",
|
|
25
|
+
"svelte": "./dist/components/ui/badge/index.js",
|
|
26
|
+
"default": "./dist/components/ui/badge/index.js"
|
|
27
|
+
},
|
|
28
|
+
"./shadcn/breadcrumb": {
|
|
29
|
+
"types": "./dist/components/ui/breadcrumb/index.d.ts",
|
|
30
|
+
"svelte": "./dist/components/ui/breadcrumb/index.js",
|
|
31
|
+
"default": "./dist/components/ui/breadcrumb/index.js"
|
|
32
|
+
},
|
|
33
|
+
"./shadcn/button": {
|
|
34
|
+
"types": "./dist/components/ui/button/index.d.ts",
|
|
35
|
+
"svelte": "./dist/components/ui/button/index.js",
|
|
36
|
+
"default": "./dist/components/ui/button/index.js"
|
|
37
|
+
},
|
|
38
|
+
"./shadcn/card": {
|
|
39
|
+
"types": "./dist/components/ui/card/index.d.ts",
|
|
40
|
+
"svelte": "./dist/components/ui/card/index.js",
|
|
41
|
+
"default": "./dist/components/ui/card/index.js"
|
|
42
|
+
},
|
|
43
|
+
"./shadcn/checkbox": {
|
|
44
|
+
"types": "./dist/components/ui/checkbox/index.d.ts",
|
|
45
|
+
"svelte": "./dist/components/ui/checkbox/index.js",
|
|
46
|
+
"default": "./dist/components/ui/checkbox/index.js"
|
|
47
|
+
},
|
|
48
|
+
"./shadcn/collapsible": {
|
|
49
|
+
"types": "./dist/components/ui/collapsible/index.d.ts",
|
|
50
|
+
"svelte": "./dist/components/ui/collapsible/index.js",
|
|
51
|
+
"default": "./dist/components/ui/collapsible/index.js"
|
|
52
|
+
},
|
|
53
|
+
"./shadcn/command": {
|
|
54
|
+
"types": "./dist/components/ui/command/index.d.ts",
|
|
55
|
+
"svelte": "./dist/components/ui/command/index.js",
|
|
56
|
+
"default": "./dist/components/ui/command/index.js"
|
|
57
|
+
},
|
|
58
|
+
"./shadcn/dialog": {
|
|
59
|
+
"types": "./dist/components/ui/dialog/index.d.ts",
|
|
60
|
+
"svelte": "./dist/components/ui/dialog/index.js",
|
|
61
|
+
"default": "./dist/components/ui/dialog/index.js"
|
|
62
|
+
},
|
|
63
|
+
"./shadcn/dropdown-menu": {
|
|
64
|
+
"types": "./dist/components/ui/dropdown-menu/index.d.ts",
|
|
65
|
+
"svelte": "./dist/components/ui/dropdown-menu/index.js",
|
|
66
|
+
"default": "./dist/components/ui/dropdown-menu/index.js"
|
|
67
|
+
},
|
|
68
|
+
"./shadcn/input": {
|
|
69
|
+
"types": "./dist/components/ui/input/index.d.ts",
|
|
70
|
+
"svelte": "./dist/components/ui/input/index.js",
|
|
71
|
+
"default": "./dist/components/ui/input/index.js"
|
|
72
|
+
},
|
|
73
|
+
"./shadcn/label": {
|
|
74
|
+
"types": "./dist/components/ui/label/index.d.ts",
|
|
75
|
+
"svelte": "./dist/components/ui/label/index.js",
|
|
76
|
+
"default": "./dist/components/ui/label/index.js"
|
|
77
|
+
},
|
|
78
|
+
"./shadcn/popover": {
|
|
79
|
+
"types": "./dist/components/ui/popover/index.d.ts",
|
|
80
|
+
"svelte": "./dist/components/ui/popover/index.js",
|
|
81
|
+
"default": "./dist/components/ui/popover/index.js"
|
|
82
|
+
},
|
|
83
|
+
"./shadcn/select": {
|
|
84
|
+
"types": "./dist/components/ui/select/index.d.ts",
|
|
85
|
+
"svelte": "./dist/components/ui/select/index.js",
|
|
86
|
+
"default": "./dist/components/ui/select/index.js"
|
|
87
|
+
},
|
|
88
|
+
"./shadcn/separator": {
|
|
89
|
+
"types": "./dist/components/ui/separator/index.d.ts",
|
|
90
|
+
"svelte": "./dist/components/ui/separator/index.js",
|
|
91
|
+
"default": "./dist/components/ui/separator/index.js"
|
|
92
|
+
},
|
|
93
|
+
"./shadcn/sheet": {
|
|
94
|
+
"types": "./dist/components/ui/sheet/index.d.ts",
|
|
95
|
+
"svelte": "./dist/components/ui/sheet/index.js",
|
|
96
|
+
"default": "./dist/components/ui/sheet/index.js"
|
|
97
|
+
},
|
|
98
|
+
"./shadcn/sidebar": {
|
|
99
|
+
"types": "./dist/components/ui/sidebar/index.d.ts",
|
|
100
|
+
"svelte": "./dist/components/ui/sidebar/index.js",
|
|
101
|
+
"default": "./dist/components/ui/sidebar/index.js"
|
|
102
|
+
},
|
|
103
|
+
"./shadcn/skeleton": {
|
|
104
|
+
"types": "./dist/components/ui/skeleton/index.d.ts",
|
|
105
|
+
"svelte": "./dist/components/ui/skeleton/index.js",
|
|
106
|
+
"default": "./dist/components/ui/skeleton/index.js"
|
|
107
|
+
},
|
|
108
|
+
"./shadcn/tabs": {
|
|
109
|
+
"types": "./dist/components/ui/tabs/index.d.ts",
|
|
110
|
+
"svelte": "./dist/components/ui/tabs/index.js",
|
|
111
|
+
"default": "./dist/components/ui/tabs/index.js"
|
|
112
|
+
},
|
|
113
|
+
"./shadcn/textarea": {
|
|
114
|
+
"types": "./dist/components/ui/textarea/index.d.ts",
|
|
115
|
+
"svelte": "./dist/components/ui/textarea/index.js",
|
|
116
|
+
"default": "./dist/components/ui/textarea/index.js"
|
|
117
|
+
},
|
|
118
|
+
"./shadcn/tooltip": {
|
|
119
|
+
"types": "./dist/components/ui/tooltip/index.d.ts",
|
|
120
|
+
"svelte": "./dist/components/ui/tooltip/index.js",
|
|
121
|
+
"default": "./dist/components/ui/tooltip/index.js"
|
|
122
|
+
},
|
|
123
|
+
"./shadcn/css": "./src/app.css",
|
|
124
|
+
"./utils": {
|
|
125
|
+
"types": "./dist/utils.d.ts",
|
|
126
|
+
"default": "./dist/utils.js"
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"files": [
|
|
130
|
+
"dist",
|
|
131
|
+
"src/app.css"
|
|
132
|
+
],
|
|
133
|
+
"peerDependencies": {
|
|
134
|
+
"bits-ui": "^2.11.1",
|
|
135
|
+
"clsx": "^2.1.1",
|
|
136
|
+
"svelte": "^5.0.0",
|
|
137
|
+
"tailwind-merge": "^3.3.1",
|
|
138
|
+
"tailwind-variants": "^3.1.1"
|
|
139
|
+
},
|
|
140
|
+
"devDependencies": {
|
|
141
|
+
"@internationalized/date": "^3.8.1",
|
|
142
|
+
"@lucide/svelte": "^0.544.0",
|
|
143
|
+
"@sveltejs/kit": "^2.22.0",
|
|
144
|
+
"@sveltejs/package": "^2.5.4",
|
|
145
|
+
"@sveltejs/vite-plugin-svelte": "^6.0.0",
|
|
146
|
+
"@tailwindcss/vite": "^4.0.0",
|
|
147
|
+
"bits-ui": "^2.11.0",
|
|
148
|
+
"clsx": "^2.1.1",
|
|
149
|
+
"svelte": "^5.0.0",
|
|
150
|
+
"tailwind-merge": "^3.3.1",
|
|
151
|
+
"tailwind-variants": "^3.1.1",
|
|
152
|
+
"tailwindcss": "^4.0.0",
|
|
153
|
+
"tw-animate-css": "^1.4.0",
|
|
154
|
+
"typescript": "^5.0.0",
|
|
155
|
+
"vite": "^7.0.4"
|
|
156
|
+
},
|
|
157
|
+
"scripts": {
|
|
158
|
+
"build": "node scripts/generate-exports.js && svelte-package",
|
|
159
|
+
"shadcn": "pnpm dlx shadcn-svelte@latest add",
|
|
160
|
+
"dev:local": "node ../../scripts/swap-package-paths.js ./package.json src lib"
|
|
161
|
+
}
|
|
162
|
+
}
|