@uniai-fe/uds-primitives 0.3.18 → 0.3.20
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/styles.css +228 -114
- package/package.json +1 -1
- package/src/components/badge/markup/Badge.tsx +3 -5
- package/src/components/badge/styles/index.scss +2 -1
- package/src/components/button/index.tsx +7 -1
- package/src/components/button/markup/Base.tsx +5 -10
- package/src/components/button/markup/Label.tsx +23 -0
- package/src/components/button/markup/index.ts +1 -0
- package/src/components/button/types/index.ts +1 -0
- package/src/components/button/types/label.ts +9 -0
- package/src/components/checkbox/markup/Checkbox.tsx +9 -4
- package/src/components/checkbox/styles/index.scss +6 -4
- package/src/components/chip/index.tsx +1 -2
- package/src/components/chip/markup/Chip.tsx +36 -24
- package/src/components/chip/markup/DefaultStyle.tsx +34 -19
- package/src/components/chip/markup/InputStyle.tsx +17 -7
- package/src/components/chip/markup/Label.tsx +15 -0
- package/src/components/chip/markup/ListRoot.tsx +88 -0
- package/src/components/chip/markup/RemoveButton.tsx +4 -1
- package/src/components/chip/markup/index.tsx +13 -1
- package/src/components/chip/styles/chip.scss +43 -15
- package/src/components/chip/types/options.ts +22 -14
- package/src/components/chip/types/props-internal.ts +9 -5
- package/src/components/chip/types/props.ts +127 -46
- package/src/components/chip/utils/index.ts +1 -1
- package/src/components/dropdown/styles/dropdown.scss +44 -23
- package/src/components/dropdown/styles/variables.scss +25 -0
- package/src/components/dropdown/types/base.ts +2 -2
- package/src/components/form/markup/form-field/Header.tsx +3 -1
- package/src/components/input/markup/file/UploadedChip.tsx +5 -5
- package/src/components/input/types/file.ts +1 -1
- package/src/components/radio/markup/Radio.tsx +9 -4
- package/src/components/radio/styles/index.scss +6 -4
- package/src/components/segmented-control/markup/Label.tsx +22 -0
- package/src/components/segmented-control/markup/List.tsx +2 -3
- package/src/components/segmented-control/markup/index.ts +1 -0
- package/src/components/segmented-control/styles/index.scss +4 -4
- package/src/components/segmented-control/types/index.ts +9 -0
- package/src/components/select/hooks/interaction.ts +5 -5
- package/src/components/select/img/chevron/primary/xsmall.svg +3 -0
- package/src/components/select/markup/Default.tsx +183 -212
- package/src/components/select/markup/foundation/Base.tsx +19 -12
- package/src/components/select/markup/foundation/Icon.tsx +9 -3
- package/src/components/select/markup/foundation/Selected.tsx +115 -10
- package/src/components/select/markup/multiple/Multiple.tsx +63 -135
- package/src/components/select/styles/select.scss +128 -72
- package/src/components/select/styles/variables.scss +11 -0
- package/src/components/select/types/base.ts +3 -2
- package/src/components/select/types/icon.ts +34 -3
- package/src/components/select/types/interaction.ts +1 -1
- package/src/components/select/types/option.ts +0 -80
- package/src/components/select/types/props.ts +167 -92
- package/src/components/select/types/trigger.ts +52 -1
- package/src/components/slot/index.tsx +2 -6
- package/src/components/slot/markup/Text.tsx +34 -0
- package/src/components/slot/markup/index.tsx +7 -0
- package/src/components/slot/types/index.ts +2 -0
- package/src/components/slot/types/text.ts +24 -0
- package/src/components/table/markup/foundation/Cell.tsx +4 -12
- package/src/components/table/markup/foundation/Td.tsx +4 -7
- package/src/components/table/markup/foundation/Text.tsx +16 -0
- package/src/components/table/markup/foundation/Th.tsx +4 -7
- package/src/components/table/markup/foundation/index.tsx +2 -0
- package/src/components/table/types/foundation.ts +9 -0
- package/src/components/tooltip/markup/Message.tsx +3 -1
- package/src/components/tooltip/markup/Text.tsx +21 -0
- package/src/components/tooltip/markup/index.tsx +3 -0
- package/src/components/tooltip/types/index.ts +1 -0
- package/src/components/tooltip/types/text.ts +9 -0
- package/src/index.scss +0 -1
- package/src/index.tsx +0 -1
- package/src/components/chip/utils/class-name.ts +0 -36
- package/src/components/label/hooks/index.ts +0 -4
- package/src/components/label/img/.gitkeep +0 -0
- package/src/components/label/index.scss +0 -1
- package/src/components/label/index.tsx +0 -4
- package/src/components/label/markup/index.tsx +0 -4
- package/src/components/label/styles/index.scss +0 -0
- package/src/components/label/types/index.ts +0 -4
- package/src/components/label/utils/index.ts +0 -4
- /package/src/components/slot/markup/{Component.tsx → Base.tsx} +0 -0
|
@@ -4,6 +4,7 @@ import clsx from "clsx";
|
|
|
4
4
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
5
5
|
import { forwardRef } from "react";
|
|
6
6
|
import type { TooltipMessageProps } from "../types";
|
|
7
|
+
import TooltipText from "./Text";
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* Tooltip Message.
|
|
@@ -41,7 +42,8 @@ const TooltipMessage = forwardRef<HTMLDivElement, TooltipMessageProps>(
|
|
|
41
42
|
sideOffset={sideOffset}
|
|
42
43
|
{...restProps}
|
|
43
44
|
>
|
|
44
|
-
|
|
45
|
+
{/* 변경: Tooltip 텍스트는 전용 Text 컴포넌트로 className 계약을 고정한다. */}
|
|
46
|
+
<TooltipText>{children}</TooltipText>
|
|
45
47
|
{withArrow ? (
|
|
46
48
|
<TooltipPrimitive.Arrow
|
|
47
49
|
className={clsx("tooltip-message-arrow", arrowClassName)}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import clsx from "clsx";
|
|
2
|
+
import type { TooltipTextProps } from "../types";
|
|
3
|
+
import { Slot } from "../../slot";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Tooltip Text; Tooltip 텍스트 className 계약을 고정하는 전용 마크업.
|
|
7
|
+
* @component
|
|
8
|
+
* @param {TooltipTextProps} props Text props
|
|
9
|
+
*/
|
|
10
|
+
export default function TooltipText({
|
|
11
|
+
className,
|
|
12
|
+
...restProps
|
|
13
|
+
}: TooltipTextProps) {
|
|
14
|
+
// 변경: Tooltip 텍스트 className 누락을 방지하기 위해 전용 Text 컴포넌트로 고정한다.
|
|
15
|
+
return (
|
|
16
|
+
<Slot.Text
|
|
17
|
+
className={clsx("tooltip-message-text", className)}
|
|
18
|
+
{...restProps}
|
|
19
|
+
/>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import TooltipMessage from "./Message";
|
|
2
2
|
import TooltipRoot from "./Root";
|
|
3
3
|
import TooltipTemplate from "./Template";
|
|
4
|
+
import TooltipText from "./Text";
|
|
4
5
|
import TooltipTrigger from "./Trigger";
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* Tooltip namespace.
|
|
8
9
|
* - Message
|
|
10
|
+
* - Text
|
|
9
11
|
* - Trigger
|
|
10
12
|
* - Root
|
|
11
13
|
* - Template
|
|
12
14
|
*/
|
|
13
15
|
export const Tooltip = {
|
|
14
16
|
Message: TooltipMessage,
|
|
17
|
+
Text: TooltipText,
|
|
15
18
|
Trigger: TooltipTrigger,
|
|
16
19
|
Root: TooltipRoot,
|
|
17
20
|
Template: TooltipTemplate,
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { SlotTextProps } from "../../slot";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Tooltip Types; Text 마크업 props
|
|
5
|
+
* @property {React.ElementType} [as] 렌더링할 요소. 기본값은 span.
|
|
6
|
+
* @property {React.ReactNode} [children] 텍스트 콘텐츠
|
|
7
|
+
* @property {string} [className] tooltip-text와 병합할 className
|
|
8
|
+
*/
|
|
9
|
+
export type TooltipTextProps = SlotTextProps;
|
package/src/index.scss
CHANGED
package/src/index.tsx
CHANGED
|
@@ -16,7 +16,6 @@ export * from "./components/dropdown";
|
|
|
16
16
|
export * from "./components/form";
|
|
17
17
|
export * from "./components/info-box";
|
|
18
18
|
export * from "./components/input";
|
|
19
|
-
export * from "./components/label";
|
|
20
19
|
export * from "./components/navigation";
|
|
21
20
|
export * from "./components/pagination";
|
|
22
21
|
export * from "./components/pop-over";
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import clsx from "clsx";
|
|
2
|
-
import type { ChipClassNameOptions } from "../types";
|
|
3
|
-
|
|
4
|
-
const CHIP_CLASSNAME = "chip";
|
|
5
|
-
const CHIP_LEADING_CLASSNAME = "chip-leading";
|
|
6
|
-
const CHIP_LABEL_CLASSNAME = "chip-label";
|
|
7
|
-
const CHIP_REMOVE_BUTTON_CLASSNAME = "chip-remove-button";
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Chip은 kind/selected/slot 여부에 따른 modifier class가 많아 helper로 묶는다.
|
|
11
|
-
*/
|
|
12
|
-
const composeChipClassName = ({
|
|
13
|
-
kind,
|
|
14
|
-
selected,
|
|
15
|
-
hasLeading,
|
|
16
|
-
removable,
|
|
17
|
-
className,
|
|
18
|
-
}: ChipClassNameOptions) =>
|
|
19
|
-
clsx(
|
|
20
|
-
CHIP_CLASSNAME,
|
|
21
|
-
`${CHIP_CLASSNAME}--kind-${kind}`,
|
|
22
|
-
{
|
|
23
|
-
[`${CHIP_CLASSNAME}--selected`]: Boolean(selected),
|
|
24
|
-
[`${CHIP_CLASSNAME}--has-leading`]: Boolean(hasLeading),
|
|
25
|
-
[`${CHIP_CLASSNAME}--removable`]: Boolean(removable),
|
|
26
|
-
},
|
|
27
|
-
className,
|
|
28
|
-
);
|
|
29
|
-
|
|
30
|
-
export {
|
|
31
|
-
CHIP_CLASSNAME,
|
|
32
|
-
CHIP_LABEL_CLASSNAME,
|
|
33
|
-
CHIP_LEADING_CLASSNAME,
|
|
34
|
-
CHIP_REMOVE_BUTTON_CLASSNAME,
|
|
35
|
-
composeChipClassName,
|
|
36
|
-
};
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@use "./styles/index.scss";
|
|
File without changes
|
|
File without changes
|