Skip to content

Commit e8d84c3

Browse files
committed
Change uppercase directories to lowercase
1 parent 2ebb148 commit e8d84c3

File tree

6 files changed

+156
-30
lines changed

6 files changed

+156
-30
lines changed

.github/workflows/chromatic.yaml

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,42 @@
1-
name: 'Chromatic'
1+
# name: 'Chromatic'
22

33
# on:
44
# push:
55
# branches:
66
# - main
77
# pull_request:
88

9-
concurrency:
10-
group: ${{ github.workflow }}-${{ github.ref }}
11-
cancel-in-progress: true
9+
# concurrency:
10+
# group: ${{ github.workflow }}-${{ github.ref }}
11+
# cancel-in-progress: true
1212

13-
jobs:
14-
chromatic-deployment:
15-
runs-on: ubuntu-latest
16-
steps:
17-
- name: Checkout
18-
uses: actions/checkout@v4
19-
with:
20-
fetch-depth: 0
13+
# jobs:
14+
# chromatic-deployment:
15+
# runs-on: ubuntu-latest
16+
# steps:
17+
# - name: Checkout
18+
# uses: actions/checkout@v4
19+
# with:
20+
# fetch-depth: 0
2121

22-
- name: Setup pnpm
23-
uses: pnpm/action-setup@v4
24-
with:
25-
run_install: false
22+
# - name: Setup pnpm
23+
# uses: pnpm/action-setup@v4
24+
# with:
25+
# run_install: false
2626

27-
- name: Setup Node
28-
uses: actions/setup-node@v4
29-
with:
30-
node-version-file: '.nvmrc'
31-
cache: 'pnpm'
27+
# - name: Setup Node
28+
# uses: actions/setup-node@v4
29+
# with:
30+
# node-version-file: '.nvmrc'
31+
# cache: 'pnpm'
3232

33-
- name: Install dependencies
34-
run: pnpm install --frozen-lockfile
33+
# - name: Install dependencies
34+
# run: pnpm install --frozen-lockfile
3535

36-
- name: Publish to Chromatic
37-
uses: chromaui/action@v1
38-
with:
39-
token: ${{ secrets.GITHUB_TOKEN }}
40-
projectToken: TODO
41-
exitOnceUploaded: true
42-
exitZeroOnChanges: true
36+
# - name: Publish to Chromatic
37+
# uses: chromaui/action@v1
38+
# with:
39+
# token: ${{ secrets.GITHUB_TOKEN }}
40+
# projectToken: TODO
41+
# exitOnceUploaded: true
42+
# exitZeroOnChanges: true
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { View } from "rune-ts";
2+
import type { As, RuneElement } from "@rune-ui/types";
3+
import { createHtml } from "@rune-ui/jsx";
4+
5+
export type RuneUIBoxProps<T extends As> = RuneElement<T> & {
6+
as?: T;
7+
children?: View[] | string;
8+
};
9+
10+
export class Box<T extends As = "div"> extends View<RuneUIBoxProps<T>> {
11+
override template() {
12+
const { as, children, ...rest } = this.data as RuneUIBoxProps<T> & {
13+
as: keyof HTMLElementTagNameMap;
14+
};
15+
16+
const Tag = (as || "div") as keyof JSX.IntrinsicElements;
17+
return <Tag {...rest}>{children}</Tag>;
18+
}
19+
}

packages/archtype/src/box/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from "./box.view";
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { createAnatomy } from "@rune-ui/anatomy";
2+
3+
export const buttonAnatomy = createAnatomy("button").parts(
4+
"root", // 전체 버튼 컴포넌트
5+
"inner", // 버튼 내부 요소
6+
"label", // 버튼 레이블
7+
"leftIcon", // 왼쪽 아이콘
8+
"rightIcon" // 오른쪽 아이콘
9+
);
10+
11+
export const buttonParts = buttonAnatomy.build();
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
import { RuneChildren, RuneElement, RuneView } from "@rune-ui/types";
2+
import { createHtml } from "@rune-ui/jsx";
3+
import { View } from "rune-ts";
4+
import { buttonParts } from "./button.anatomy";
5+
6+
// Button 컴포넌트의 루트
7+
export interface RuneUIButtonRootProps extends RuneElement<"button"> {
8+
children?: RuneChildren;
9+
}
10+
11+
export class ButtonRoot extends View<RuneUIButtonRootProps> {
12+
override template() {
13+
const { children, ...rest } = this.data;
14+
return (
15+
<button {...rest} {...buttonParts.root.attrs}>
16+
{children}
17+
</button>
18+
);
19+
}
20+
}
21+
22+
// Button 컴포넌트의 내부
23+
export interface RuneUIButtonInnerProps extends RuneElement<"span"> {
24+
children?: RuneChildren;
25+
}
26+
27+
export class ButtonInner extends View<RuneUIButtonInnerProps> {
28+
override template() {
29+
const { children, ...rest } = this.data;
30+
31+
return (
32+
<span {...rest} {...buttonParts.inner.attrs}>
33+
{children}
34+
</span>
35+
);
36+
}
37+
}
38+
39+
// Button 컴포넌트의 왼쪽 아이콘
40+
export interface RuneUIButtonLeftIconProps extends RuneElement<"span"> {
41+
icon: RuneView;
42+
}
43+
44+
export class ButtonLeftIcon extends View<RuneUIButtonLeftIconProps> {
45+
override template() {
46+
const { icon, ...rest } = this.data;
47+
return (
48+
<span {...rest} {...buttonParts.leftIcon.attrs}>
49+
{icon}
50+
</span>
51+
);
52+
}
53+
}
54+
55+
// Button 컴포넌트의 레이블
56+
export interface RuneUIButtonLabelProps extends RuneElement<"span"> {
57+
children?: RuneChildren;
58+
}
59+
60+
export class ButtonLabel extends View<RuneUIButtonLabelProps> {
61+
override template() {
62+
const { children, ...rest } = this.data;
63+
return (
64+
<span {...rest} {...buttonParts.label.attrs}>
65+
{children}
66+
</span>
67+
);
68+
}
69+
}
70+
71+
// Button 컴포넌트의 오른쪽 아이콘
72+
export interface RuneUIButtonRightIconProps extends RuneElement<"span"> {
73+
icon: RuneView;
74+
}
75+
76+
export class ButtonRightIcon extends View<RuneUIButtonRightIconProps> {
77+
override template() {
78+
const { icon, ...rest } = this.data;
79+
return (
80+
<span {...rest} {...buttonParts.rightIcon.attrs}>
81+
{icon}
82+
</span>
83+
);
84+
}
85+
}
86+
87+
export const Button = {
88+
Root: ButtonRoot,
89+
Inner: ButtonInner,
90+
LeftIcon: ButtonLeftIcon,
91+
Label: ButtonLabel,
92+
RightIcon: ButtonRightIcon,
93+
};
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export * from "./button.anatomy";
2+
export * from "./button.view";

0 commit comments

Comments
 (0)