@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slexn/codecenter-ui",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "A Vue component library with source-owned components and registry output.",
5
5
  "author": "Minjun LEE",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -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
+ }
@@ -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>
@@ -0,0 +1,2 @@
1
+ export { default as Rail } from "./Rail.vue"
2
+ export type { RailProps, RailSide } from "./Rail.vue"