@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.
Files changed (81) hide show
  1. package/dist/styles.css +228 -114
  2. package/package.json +1 -1
  3. package/src/components/badge/markup/Badge.tsx +3 -5
  4. package/src/components/badge/styles/index.scss +2 -1
  5. package/src/components/button/index.tsx +7 -1
  6. package/src/components/button/markup/Base.tsx +5 -10
  7. package/src/components/button/markup/Label.tsx +23 -0
  8. package/src/components/button/markup/index.ts +1 -0
  9. package/src/components/button/types/index.ts +1 -0
  10. package/src/components/button/types/label.ts +9 -0
  11. package/src/components/checkbox/markup/Checkbox.tsx +9 -4
  12. package/src/components/checkbox/styles/index.scss +6 -4
  13. package/src/components/chip/index.tsx +1 -2
  14. package/src/components/chip/markup/Chip.tsx +36 -24
  15. package/src/components/chip/markup/DefaultStyle.tsx +34 -19
  16. package/src/components/chip/markup/InputStyle.tsx +17 -7
  17. package/src/components/chip/markup/Label.tsx +15 -0
  18. package/src/components/chip/markup/ListRoot.tsx +88 -0
  19. package/src/components/chip/markup/RemoveButton.tsx +4 -1
  20. package/src/components/chip/markup/index.tsx +13 -1
  21. package/src/components/chip/styles/chip.scss +43 -15
  22. package/src/components/chip/types/options.ts +22 -14
  23. package/src/components/chip/types/props-internal.ts +9 -5
  24. package/src/components/chip/types/props.ts +127 -46
  25. package/src/components/chip/utils/index.ts +1 -1
  26. package/src/components/dropdown/styles/dropdown.scss +44 -23
  27. package/src/components/dropdown/styles/variables.scss +25 -0
  28. package/src/components/dropdown/types/base.ts +2 -2
  29. package/src/components/form/markup/form-field/Header.tsx +3 -1
  30. package/src/components/input/markup/file/UploadedChip.tsx +5 -5
  31. package/src/components/input/types/file.ts +1 -1
  32. package/src/components/radio/markup/Radio.tsx +9 -4
  33. package/src/components/radio/styles/index.scss +6 -4
  34. package/src/components/segmented-control/markup/Label.tsx +22 -0
  35. package/src/components/segmented-control/markup/List.tsx +2 -3
  36. package/src/components/segmented-control/markup/index.ts +1 -0
  37. package/src/components/segmented-control/styles/index.scss +4 -4
  38. package/src/components/segmented-control/types/index.ts +9 -0
  39. package/src/components/select/hooks/interaction.ts +5 -5
  40. package/src/components/select/img/chevron/primary/xsmall.svg +3 -0
  41. package/src/components/select/markup/Default.tsx +183 -212
  42. package/src/components/select/markup/foundation/Base.tsx +19 -12
  43. package/src/components/select/markup/foundation/Icon.tsx +9 -3
  44. package/src/components/select/markup/foundation/Selected.tsx +115 -10
  45. package/src/components/select/markup/multiple/Multiple.tsx +63 -135
  46. package/src/components/select/styles/select.scss +128 -72
  47. package/src/components/select/styles/variables.scss +11 -0
  48. package/src/components/select/types/base.ts +3 -2
  49. package/src/components/select/types/icon.ts +34 -3
  50. package/src/components/select/types/interaction.ts +1 -1
  51. package/src/components/select/types/option.ts +0 -80
  52. package/src/components/select/types/props.ts +167 -92
  53. package/src/components/select/types/trigger.ts +52 -1
  54. package/src/components/slot/index.tsx +2 -6
  55. package/src/components/slot/markup/Text.tsx +34 -0
  56. package/src/components/slot/markup/index.tsx +7 -0
  57. package/src/components/slot/types/index.ts +2 -0
  58. package/src/components/slot/types/text.ts +24 -0
  59. package/src/components/table/markup/foundation/Cell.tsx +4 -12
  60. package/src/components/table/markup/foundation/Td.tsx +4 -7
  61. package/src/components/table/markup/foundation/Text.tsx +16 -0
  62. package/src/components/table/markup/foundation/Th.tsx +4 -7
  63. package/src/components/table/markup/foundation/index.tsx +2 -0
  64. package/src/components/table/types/foundation.ts +9 -0
  65. package/src/components/tooltip/markup/Message.tsx +3 -1
  66. package/src/components/tooltip/markup/Text.tsx +21 -0
  67. package/src/components/tooltip/markup/index.tsx +3 -0
  68. package/src/components/tooltip/types/index.ts +1 -0
  69. package/src/components/tooltip/types/text.ts +9 -0
  70. package/src/index.scss +0 -1
  71. package/src/index.tsx +0 -1
  72. package/src/components/chip/utils/class-name.ts +0 -36
  73. package/src/components/label/hooks/index.ts +0 -4
  74. package/src/components/label/img/.gitkeep +0 -0
  75. package/src/components/label/index.scss +0 -1
  76. package/src/components/label/index.tsx +0 -4
  77. package/src/components/label/markup/index.tsx +0 -4
  78. package/src/components/label/styles/index.scss +0 -0
  79. package/src/components/label/types/index.ts +0 -4
  80. package/src/components/label/utils/index.ts +0 -4
  81. /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
- <span className="tooltip-message-text">{children}</span>
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,
@@ -1 +1,2 @@
1
1
  export type * from "./props";
2
+ export type * from "./text";
@@ -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
@@ -11,7 +11,6 @@
11
11
  @use "./components/form";
12
12
  @use "./components/info-box";
13
13
  @use "./components/input";
14
- @use "./components/label";
15
14
  @use "./components/navigation";
16
15
  @use "./components/pagination";
17
16
  @use "./components/pop-over";
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
- };
@@ -1,4 +0,0 @@
1
- /**
2
- * TODO(label): 접근성/상태 계산 hook을 정의한다.
3
- */
4
- export {};
File without changes
@@ -1 +0,0 @@
1
- @use "./styles/index.scss";
@@ -1,4 +0,0 @@
1
- /**
2
- * label 카테고리 배럴 placeholder: 실제 구현은 markup/ 하위에 추가한다.
3
- */
4
- export * from "./markup";
@@ -1,4 +0,0 @@
1
- /**
2
- * TODO(label): SOT 및 사용자 제약에 따라 컴포넌트를 구현한다.
3
- */
4
- export {};
File without changes
@@ -1,4 +0,0 @@
1
- /**
2
- * TODO(label): variant/slot 타입 정의를 작성한다.
3
- */
4
- export {};
@@ -1,4 +0,0 @@
1
- /**
2
- * TODO(label): 토큰 매핑과 클래스명 유틸을 구현한다.
3
- */
4
- export {};