@slexn/codecenter-ui 1.0.0 → 1.0.1
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/dist/codecenter-ui.cjs +1 -1
- package/dist/codecenter-ui.js +205 -181
- package/dist/components/ui/rail/Rail.vue.d.ts +27 -0
- package/dist/components/ui/rail/index.d.ts +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/public/r/rail.json +31 -0
- package/public/r/registry.json +27 -0
- package/registry.json +27 -0
- package/src/components/ui/rail/Rail.vue +34 -0
- package/src/components/ui/rail/index.ts +2 -0
package/package.json
CHANGED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://shadcn-vue.com/schema/registry-item.json",
|
|
3
|
+
"name": "rail",
|
|
4
|
+
"title": "Rail",
|
|
5
|
+
"description": "A fixed-width icon rail for global app navigation that can sit next to Sidebar or page content.",
|
|
6
|
+
"dependencies": [
|
|
7
|
+
"clsx",
|
|
8
|
+
"tailwind-merge"
|
|
9
|
+
],
|
|
10
|
+
"files": [
|
|
11
|
+
{
|
|
12
|
+
"path": "src/components/ui/rail/Rail.vue",
|
|
13
|
+
"content": "<script setup lang=\"ts\">\nimport type { HTMLAttributes } from \"vue\"\nimport { cn } from \"@/lib/utils\"\n\nexport type RailSide = \"left\" | \"right\"\n\nexport interface RailProps {\n as?: string\n class?: HTMLAttributes[\"class\"]\n side?: RailSide\n}\n\nconst props = withDefaults(defineProps<RailProps>(), {\n as: \"aside\",\n side: \"left\",\n})\n</script>\n\n<template>\n <component\n :is=\"props.as\"\n data-slot=\"rail\"\n :data-side=\"props.side\"\n :class=\"\n cn(\n 'flex h-full w-(--rail-width) shrink-0 flex-col items-center bg-background text-foreground [--rail-width:3.5rem]',\n props.side === 'right' ? 'border-l' : 'border-r',\n props.class,\n )\n \"\n >\n <slot />\n </component>\n</template>\n",
|
|
14
|
+
"type": "registry:ui",
|
|
15
|
+
"target": "components/ui/rail/Rail.vue"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"path": "src/components/ui/rail/index.ts",
|
|
19
|
+
"content": "export { default as Rail } from \"./Rail.vue\"\nexport type { RailProps, RailSide } from \"./Rail.vue\"\n",
|
|
20
|
+
"type": "registry:ui",
|
|
21
|
+
"target": "components/ui/rail/index.ts"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"path": "src/lib/utils.ts",
|
|
25
|
+
"content": "import { type ClassValue, clsx } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n",
|
|
26
|
+
"type": "registry:lib",
|
|
27
|
+
"target": "lib/utils.ts"
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"type": "registry:ui"
|
|
31
|
+
}
|
package/public/r/registry.json
CHANGED
|
@@ -1055,6 +1055,33 @@
|
|
|
1055
1055
|
}
|
|
1056
1056
|
]
|
|
1057
1057
|
},
|
|
1058
|
+
{
|
|
1059
|
+
"name": "rail",
|
|
1060
|
+
"type": "registry:ui",
|
|
1061
|
+
"title": "Rail",
|
|
1062
|
+
"description": "A fixed-width icon rail for global app navigation that can sit next to Sidebar or page content.",
|
|
1063
|
+
"dependencies": [
|
|
1064
|
+
"clsx",
|
|
1065
|
+
"tailwind-merge"
|
|
1066
|
+
],
|
|
1067
|
+
"files": [
|
|
1068
|
+
{
|
|
1069
|
+
"path": "src/components/ui/rail/Rail.vue",
|
|
1070
|
+
"type": "registry:ui",
|
|
1071
|
+
"target": "components/ui/rail/Rail.vue"
|
|
1072
|
+
},
|
|
1073
|
+
{
|
|
1074
|
+
"path": "src/components/ui/rail/index.ts",
|
|
1075
|
+
"type": "registry:ui",
|
|
1076
|
+
"target": "components/ui/rail/index.ts"
|
|
1077
|
+
},
|
|
1078
|
+
{
|
|
1079
|
+
"path": "src/lib/utils.ts",
|
|
1080
|
+
"type": "registry:lib",
|
|
1081
|
+
"target": "lib/utils.ts"
|
|
1082
|
+
}
|
|
1083
|
+
]
|
|
1084
|
+
},
|
|
1058
1085
|
{
|
|
1059
1086
|
"name": "sidebar",
|
|
1060
1087
|
"type": "registry:ui",
|
package/registry.json
CHANGED
|
@@ -1055,6 +1055,33 @@
|
|
|
1055
1055
|
}
|
|
1056
1056
|
]
|
|
1057
1057
|
},
|
|
1058
|
+
{
|
|
1059
|
+
"name": "rail",
|
|
1060
|
+
"type": "registry:ui",
|
|
1061
|
+
"title": "Rail",
|
|
1062
|
+
"description": "A fixed-width icon rail for global app navigation that can sit next to Sidebar or page content.",
|
|
1063
|
+
"dependencies": [
|
|
1064
|
+
"clsx",
|
|
1065
|
+
"tailwind-merge"
|
|
1066
|
+
],
|
|
1067
|
+
"files": [
|
|
1068
|
+
{
|
|
1069
|
+
"path": "src/components/ui/rail/Rail.vue",
|
|
1070
|
+
"type": "registry:ui",
|
|
1071
|
+
"target": "components/ui/rail/Rail.vue"
|
|
1072
|
+
},
|
|
1073
|
+
{
|
|
1074
|
+
"path": "src/components/ui/rail/index.ts",
|
|
1075
|
+
"type": "registry:ui",
|
|
1076
|
+
"target": "components/ui/rail/index.ts"
|
|
1077
|
+
},
|
|
1078
|
+
{
|
|
1079
|
+
"path": "src/lib/utils.ts",
|
|
1080
|
+
"type": "registry:lib",
|
|
1081
|
+
"target": "lib/utils.ts"
|
|
1082
|
+
}
|
|
1083
|
+
]
|
|
1084
|
+
},
|
|
1058
1085
|
{
|
|
1059
1086
|
"name": "sidebar",
|
|
1060
1087
|
"type": "registry:ui",
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from "vue"
|
|
3
|
+
import { cn } from "@/lib/utils"
|
|
4
|
+
|
|
5
|
+
export type RailSide = "left" | "right"
|
|
6
|
+
|
|
7
|
+
export interface RailProps {
|
|
8
|
+
as?: string
|
|
9
|
+
class?: HTMLAttributes["class"]
|
|
10
|
+
side?: RailSide
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const props = withDefaults(defineProps<RailProps>(), {
|
|
14
|
+
as: "aside",
|
|
15
|
+
side: "left",
|
|
16
|
+
})
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<template>
|
|
20
|
+
<component
|
|
21
|
+
:is="props.as"
|
|
22
|
+
data-slot="rail"
|
|
23
|
+
:data-side="props.side"
|
|
24
|
+
:class="
|
|
25
|
+
cn(
|
|
26
|
+
'flex h-full w-(--rail-width) shrink-0 flex-col items-center bg-background text-foreground [--rail-width:3.5rem]',
|
|
27
|
+
props.side === 'right' ? 'border-l' : 'border-r',
|
|
28
|
+
props.class,
|
|
29
|
+
)
|
|
30
|
+
"
|
|
31
|
+
>
|
|
32
|
+
<slot />
|
|
33
|
+
</component>
|
|
34
|
+
</template>
|