-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5911685
commit ff57950
Showing
18 changed files
with
434 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,4 +15,3 @@ component-docs | |
┣ 📂seed-design # snippet은 진실의 원천으로 사용하고, Docs에서 사용하는 코드는 생성해서 사용 | ||
┗ 📂snippets # registry에 담김 | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
!lib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
interface AvatarVariant { | ||
size: "20" | "24" | "36" | "48" | "64" | "80" | "96" | ||
} | ||
|
||
type AvatarVariantMap = { | ||
[key in keyof AvatarVariant]: Array<AvatarVariant[key]>; | ||
}; | ||
|
||
export type AvatarVariantProps = Partial<AvatarVariant>; | ||
|
||
export type AvatarSlotName = "root" | "image" | "fallback" | "badge"; | ||
|
||
export const avatarVariantMap: AvatarVariantMap; | ||
|
||
export function avatar( | ||
props?: AvatarVariantProps, | ||
): Record<AvatarSlotName, string>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import { createClassName } from "./className.mjs"; | ||
|
||
const avatarSlotNames = [ | ||
[ | ||
"root", | ||
"avatar__root" | ||
], | ||
[ | ||
"image", | ||
"avatar__image" | ||
], | ||
[ | ||
"fallback", | ||
"avatar__fallback" | ||
], | ||
[ | ||
"badge", | ||
"avatar__badge" | ||
] | ||
]; | ||
|
||
const defaultVariant = {}; | ||
|
||
const compoundVariants = []; | ||
|
||
export const avatarVariantMap = { | ||
"size": [ | ||
"20", | ||
"24", | ||
"36", | ||
"48", | ||
"64", | ||
"80", | ||
"96" | ||
] | ||
}; | ||
|
||
export const avatarVariantKeys = Object.keys(avatarVariantMap); | ||
|
||
export function avatar(props) { | ||
return Object.fromEntries( | ||
avatarSlotNames.map(([slot, className]) => { | ||
return [ | ||
slot, | ||
createClassName(className, { ...defaultVariant, ...props }, compoundVariants), | ||
]; | ||
}), | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
interface ChipTabVariant { | ||
|
||
} | ||
|
||
type ChipTabVariantMap = { | ||
[key in keyof ChipTabVariant]: Array<ChipTabVariant[key]>; | ||
}; | ||
|
||
export type ChipTabVariantProps = Partial<ChipTabVariant>; | ||
|
||
export type ChipTabSlotName = "root" | "label"; | ||
|
||
export const chipTabVariantMap: ChipTabVariantMap; | ||
|
||
export function chipTab( | ||
props?: ChipTabVariantProps, | ||
): Record<ChipTabSlotName, string>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { createClassName } from "./className.mjs"; | ||
|
||
const chipTabSlotNames = [ | ||
[ | ||
"root", | ||
"chipTab__root" | ||
], | ||
[ | ||
"label", | ||
"chipTab__label" | ||
] | ||
]; | ||
|
||
const defaultVariant = {}; | ||
|
||
const compoundVariants = []; | ||
|
||
export const chipTabVariantMap = {}; | ||
|
||
export const chipTabVariantKeys = Object.keys(chipTabVariantMap); | ||
|
||
export function chipTab(props) { | ||
return Object.fromEntries( | ||
chipTabSlotNames.map(([slot, className]) => { | ||
return [ | ||
slot, | ||
createClassName(className, { ...defaultVariant, ...props }, compoundVariants), | ||
]; | ||
}), | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
interface ChipTabsVariant { | ||
|
||
} | ||
|
||
type ChipTabsVariantMap = { | ||
[key in keyof ChipTabsVariant]: Array<ChipTabsVariant[key]>; | ||
}; | ||
|
||
export type ChipTabsVariantProps = Partial<ChipTabsVariant>; | ||
|
||
export type ChipTabsSlotName = "root" | "triggerList" | "contentList" | "contentCamera" | "content"; | ||
|
||
export const chipTabsVariantMap: ChipTabsVariantMap; | ||
|
||
export function chipTabs( | ||
props?: ChipTabsVariantProps, | ||
): Record<ChipTabsSlotName, string>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import { createClassName } from "./className.mjs"; | ||
|
||
const chipTabsSlotNames = [ | ||
[ | ||
"root", | ||
"chipTabs__root" | ||
], | ||
[ | ||
"triggerList", | ||
"chipTabs__triggerList" | ||
], | ||
[ | ||
"contentList", | ||
"chipTabs__contentList" | ||
], | ||
[ | ||
"contentCamera", | ||
"chipTabs__contentCamera" | ||
], | ||
[ | ||
"content", | ||
"chipTabs__content" | ||
] | ||
]; | ||
|
||
const defaultVariant = {}; | ||
|
||
const compoundVariants = []; | ||
|
||
export const chipTabsVariantMap = {}; | ||
|
||
export const chipTabsVariantKeys = Object.keys(chipTabsVariantMap); | ||
|
||
export function chipTabs(props) { | ||
return Object.fromEntries( | ||
chipTabsSlotNames.map(([slot, className]) => { | ||
return [ | ||
slot, | ||
createClassName(className, { ...defaultVariant, ...props }, compoundVariants), | ||
]; | ||
}), | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
interface HelpBubbleVariant { | ||
variant: "nonModal" | "modal" | ||
} | ||
|
||
type HelpBubbleVariantMap = { | ||
[key in keyof HelpBubbleVariant]: Array<HelpBubbleVariant[key]>; | ||
}; | ||
|
||
export type HelpBubbleVariantProps = Partial<HelpBubbleVariant>; | ||
|
||
export type HelpBubbleSlotName = "positioner" | "backdrop" | "content" | "arrow" | "title" | "description"; | ||
|
||
export const helpBubbleVariantMap: HelpBubbleVariantMap; | ||
|
||
export function helpBubble( | ||
props?: HelpBubbleVariantProps, | ||
): Record<HelpBubbleSlotName, string>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import { createClassName } from "./className.mjs"; | ||
|
||
const helpBubbleSlotNames = [ | ||
[ | ||
"positioner", | ||
"helpBubble__positioner" | ||
], | ||
[ | ||
"backdrop", | ||
"helpBubble__backdrop" | ||
], | ||
[ | ||
"content", | ||
"helpBubble__content" | ||
], | ||
[ | ||
"arrow", | ||
"helpBubble__arrow" | ||
], | ||
[ | ||
"title", | ||
"helpBubble__title" | ||
], | ||
[ | ||
"description", | ||
"helpBubble__description" | ||
] | ||
]; | ||
|
||
const defaultVariant = { | ||
"variant": "nonModal" | ||
}; | ||
|
||
const compoundVariants = []; | ||
|
||
export const helpBubbleVariantMap = { | ||
"variant": [ | ||
"nonModal", | ||
"modal" | ||
] | ||
}; | ||
|
||
export const helpBubbleVariantKeys = Object.keys(helpBubbleVariantMap); | ||
|
||
export function helpBubble(props) { | ||
return Object.fromEntries( | ||
helpBubbleSlotNames.map(([slot, className]) => { | ||
return [ | ||
slot, | ||
createClassName(className, { ...defaultVariant, ...props }, compoundVariants), | ||
]; | ||
}), | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
interface SwitchVariant { | ||
|
||
} | ||
|
||
type SwitchVariantMap = { | ||
[key in keyof SwitchVariant]: Array<SwitchVariant[key]>; | ||
}; | ||
|
||
export type SwitchVariantProps = Partial<SwitchVariant>; | ||
|
||
export type SwitchSlotName = "root" | "control" | "thumb"; | ||
|
||
export const switchVariantMap: SwitchVariantMap; | ||
|
||
export function switchStyle( | ||
props?: SwitchVariantProps, | ||
): Record<SwitchSlotName, string>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { createClassName } from "./className.mjs"; | ||
|
||
const switchSlotNames = [ | ||
[ | ||
"root", | ||
"switch__root" | ||
], | ||
[ | ||
"control", | ||
"switch__control" | ||
], | ||
[ | ||
"thumb", | ||
"switch__thumb" | ||
] | ||
]; | ||
|
||
const defaultVariant = {}; | ||
|
||
const compoundVariants = []; | ||
|
||
export const switchVariantMap = {}; | ||
|
||
export const switchVariantKeys = Object.keys(switchVariantMap); | ||
|
||
export function switchStyle(props) { | ||
return Object.fromEntries( | ||
switchSlotNames.map(([slot, className]) => { | ||
return [ | ||
slot, | ||
createClassName(className, { ...defaultVariant, ...props }, compoundVariants), | ||
]; | ||
}), | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
interface TabVariant { | ||
layout: "fill" | "hug"; | ||
size: "medium" | "small" | ||
} | ||
|
||
type TabVariantMap = { | ||
[key in keyof TabVariant]: Array<TabVariant[key]>; | ||
}; | ||
|
||
export type TabVariantProps = Partial<TabVariant>; | ||
|
||
export type TabSlotName = "root" | "label" | "notification"; | ||
|
||
export const tabVariantMap: TabVariantMap; | ||
|
||
export function tab( | ||
props?: TabVariantProps, | ||
): Record<TabSlotName, string>; |
Oops, something went wrong.