@seed-design/lynx-react 0.5.2 → 0.6.0

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 (86) hide show
  1. package/lib/components/Checkbox/Checkbox.d.ts +26 -0
  2. package/lib/components/Checkbox/Checkbox.d.ts.map +1 -1
  3. package/lib/components/Checkbox/Checkbox.jsx +1 -1
  4. package/lib/components/Icon/Icon.d.ts +5 -0
  5. package/lib/components/Icon/Icon.d.ts.map +1 -1
  6. package/lib/components/Icon/Icon.jsx +14 -3
  7. package/lib/components/MannerTemp/MannerTemp.d.ts +19 -0
  8. package/lib/components/MannerTemp/MannerTemp.d.ts.map +1 -0
  9. package/lib/components/MannerTemp/MannerTemp.jsx +47 -0
  10. package/lib/components/MannerTemp/index.d.ts +2 -0
  11. package/lib/components/MannerTemp/index.d.ts.map +1 -0
  12. package/lib/components/MannerTempBadge/MannerTempBadge.d.ts +13 -0
  13. package/lib/components/MannerTempBadge/MannerTempBadge.d.ts.map +1 -0
  14. package/lib/components/MannerTempBadge/MannerTempBadge.jsx +15 -0
  15. package/lib/components/MannerTempBadge/index.d.ts +2 -0
  16. package/lib/components/MannerTempBadge/index.d.ts.map +1 -0
  17. package/lib/components/NotificationBadge/NotificationBadge.d.ts +18 -0
  18. package/lib/components/NotificationBadge/NotificationBadge.d.ts.map +1 -0
  19. package/lib/components/NotificationBadge/NotificationBadge.jsx +34 -0
  20. package/lib/components/NotificationBadge/index.d.ts +2 -0
  21. package/lib/components/NotificationBadge/index.d.ts.map +1 -0
  22. package/lib/components/PageBanner/PageBanner.d.ts +35 -0
  23. package/lib/components/PageBanner/PageBanner.d.ts.map +1 -0
  24. package/lib/components/PageBanner/PageBanner.jsx +150 -0
  25. package/lib/components/PageBanner/PageBanner.namespace.d.ts +2 -0
  26. package/lib/components/PageBanner/PageBanner.namespace.d.ts.map +1 -0
  27. package/lib/components/PageBanner/PageBanner.namespace.js +14 -0
  28. package/lib/components/PageBanner/index.d.ts +3 -0
  29. package/lib/components/PageBanner/index.d.ts.map +1 -0
  30. package/lib/components/RadioGroup/RadioGroup.d.ts +9 -0
  31. package/lib/components/RadioGroup/RadioGroup.d.ts.map +1 -1
  32. package/lib/components/RadioGroup/RadioGroup.jsx +1 -1
  33. package/lib/components/SegmentedControl/SegmentedControl.d.ts +27 -0
  34. package/lib/components/SegmentedControl/SegmentedControl.d.ts.map +1 -0
  35. package/lib/components/SegmentedControl/SegmentedControl.jsx +120 -0
  36. package/lib/components/SegmentedControl/SegmentedControl.namespace.d.ts +2 -0
  37. package/lib/components/SegmentedControl/SegmentedControl.namespace.d.ts.map +1 -0
  38. package/lib/components/SegmentedControl/SegmentedControl.namespace.js +10 -0
  39. package/lib/components/SegmentedControl/index.d.ts +3 -0
  40. package/lib/components/SegmentedControl/index.d.ts.map +1 -0
  41. package/lib/components/SelectBox/CheckSelectBox.namespace.d.ts +2 -0
  42. package/lib/components/SelectBox/CheckSelectBox.namespace.d.ts.map +1 -0
  43. package/lib/components/SelectBox/CheckSelectBox.namespace.js +17 -0
  44. package/lib/components/SelectBox/RadioSelectBox.namespace.d.ts +2 -0
  45. package/lib/components/SelectBox/RadioSelectBox.namespace.d.ts.map +1 -0
  46. package/lib/components/SelectBox/RadioSelectBox.namespace.js +15 -0
  47. package/lib/components/SelectBox/SelectBox.d.ts +85 -0
  48. package/lib/components/SelectBox/SelectBox.d.ts.map +1 -0
  49. package/lib/components/SelectBox/SelectBox.jsx +237 -0
  50. package/lib/components/SelectBox/index.d.ts +4 -0
  51. package/lib/components/SelectBox/index.d.ts.map +1 -0
  52. package/lib/components/index.d.ts +6 -0
  53. package/lib/components/index.d.ts.map +1 -1
  54. package/lib/hooks/useIconColor.d.ts +1 -0
  55. package/lib/hooks/useIconColor.d.ts.map +1 -1
  56. package/lib/hooks/useIconColor.js +4 -1
  57. package/lib/index.js +11 -1
  58. package/package.json +3 -3
  59. package/src/components/Checkbox/Checkbox.tsx +1 -1
  60. package/src/components/Icon/Icon.test.tsx +25 -1
  61. package/src/components/Icon/Icon.tsx +22 -1
  62. package/src/components/MannerTemp/MannerTemp.test.tsx +41 -0
  63. package/src/components/MannerTemp/MannerTemp.tsx +85 -0
  64. package/src/components/MannerTemp/index.ts +1 -0
  65. package/src/components/MannerTempBadge/MannerTempBadge.test.tsx +35 -0
  66. package/src/components/MannerTempBadge/MannerTempBadge.tsx +34 -0
  67. package/src/components/MannerTempBadge/index.ts +1 -0
  68. package/src/components/NotificationBadge/NotificationBadge.test.tsx +28 -0
  69. package/src/components/NotificationBadge/NotificationBadge.tsx +81 -0
  70. package/src/components/NotificationBadge/index.ts +1 -0
  71. package/src/components/PageBanner/PageBanner.namespace.ts +16 -0
  72. package/src/components/PageBanner/PageBanner.test.tsx +124 -0
  73. package/src/components/PageBanner/PageBanner.tsx +340 -0
  74. package/src/components/PageBanner/index.ts +18 -0
  75. package/src/components/RadioGroup/RadioGroup.tsx +1 -1
  76. package/src/components/SegmentedControl/SegmentedControl.namespace.ts +8 -0
  77. package/src/components/SegmentedControl/SegmentedControl.test.tsx +81 -0
  78. package/src/components/SegmentedControl/SegmentedControl.tsx +236 -0
  79. package/src/components/SegmentedControl/index.ts +10 -0
  80. package/src/components/SelectBox/CheckSelectBox.namespace.ts +22 -0
  81. package/src/components/SelectBox/RadioSelectBox.namespace.ts +18 -0
  82. package/src/components/SelectBox/SelectBox.test.tsx +169 -0
  83. package/src/components/SelectBox/SelectBox.tsx +533 -0
  84. package/src/components/SelectBox/index.ts +3 -0
  85. package/src/components/index.ts +6 -0
  86. package/src/hooks/useIconColor.ts +6 -1
@@ -3,6 +3,31 @@ import { CheckboxVariantProps } from '@seed-design/lynx-css/recipes/checkbox';
3
3
  import { CheckmarkVariantProps } from '@seed-design/lynx-css/recipes/checkmark';
4
4
  import { LynxIconElementProps, LynxStyledElementProps } from '../../types';
5
5
  import * as React from "@lynx-js/react";
6
+ /**
7
+ * @platform Lynx
8
+ *
9
+ * 웹 대비 미지원 기능:
10
+ * - HiddenInput / name / value / required / invalid: Lynx에 native form 제출 모델이 없음
11
+ * - focus / focusVisible: Lynx에 키보드 포커스 개념이 없음
12
+ * - onChange (raw DOM event): 의미 없음. 토글 이벤트는 onCheckedChange로만 노출
13
+ * - weight="default" | "stronger" 호환 매핑: Lynx 신규 컴포넌트이므로 처음부터 "regular" | "bold" 만 노출
14
+ *
15
+ * Indicator 는 `@karrotmarket/lynx-monochrome-icon` 의 monochrome icon 컴포넌트를
16
+ * 받는다. 내부에서 `<image tint-color=...>` 로 렌더되므로 `useIconColor` 훅이
17
+ * recipe 의 `color` 토큰을 `tint-color` 로 동기화한다. raw SVG 주입은 Lynx 범위 밖.
18
+ */
19
+ interface CheckboxContextValue {
20
+ checked: boolean;
21
+ indeterminate: boolean;
22
+ disabled: boolean;
23
+ pressed: boolean;
24
+ pressStartChecked: boolean;
25
+ pressStartIndeterminate: boolean;
26
+ checkboxVariantProps: CheckboxVariantProps;
27
+ checkmarkVariantProps: CheckmarkVariantProps;
28
+ toggle: () => void;
29
+ }
30
+ export declare function useCheckboxContext(consumer: string): CheckboxContextValue;
6
31
  export interface CheckboxRootProps extends CheckboxVariantProps, Omit<CheckmarkVariantProps, "size" | "checked" | "disabled" | "indeterminate">, LynxStyledElementProps {
7
32
  checked?: boolean;
8
33
  defaultChecked?: boolean;
@@ -32,4 +57,5 @@ export declare const CheckboxLabel: React.ForwardRefExoticComponent<CheckboxLabe
32
57
  export interface CheckboxGroupProps extends LynxStyledElementProps {
33
58
  }
34
59
  export declare const CheckboxGroup: React.ForwardRefExoticComponent<CheckboxGroupProps & React.RefAttributes<unknown>>;
60
+ export {};
35
61
  //# sourceMappingURL=Checkbox.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../src/components/Checkbox/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAkB,KAAK,YAAY,EAAE,MAAM,g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CAC9C;AAED,eAAO,MAAM,YAAY,mFAyEvB,CAAC;AAKH,MAAM,WAAW,oBACf,SAAQ,IAAI,CAAC,qBAAqB,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC,EAC9D,sBAAsB;CAAG;AAE7B,eAAO,MAAM,eAAe,sFAgD1B,CAAC;AAKH,MAAM,WAAW,sBACf,SAAQ,IAAI,CAAC,sBAAsB,EAAE,WAAW,GAAG,OAAO,CAAC;IAC3D,sEAAsE;IACtE,SAAS,CAAC,EAAE,YAAY,CAAC,oBAAoB,CAAC,CAAC;IAC/C,mEAAmE;IACnE,OAAO,EAAE,YAAY,CAAC,oBAAoB,CAAC,CAAC;IAC5C,+CAA+C;IAC/C,aAAa,CAAC,EAAE,YAAY,CAAC,oBAAoB,CAAC,CAAC;CACpD;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,4BAwC9D;yBAxCe,iBAAiB;;;AA6CjC,MAAM,WAAW,kBAAmB,SAAQ,sBAAsB;CAAG;AAErE,eAAO,MAAM,aAAa,oFAiBxB,CAAC;AAKH,MAAM,WAAW,kBAAmB,SAAQ,sBAAsB;CAAG;AAErE,eAAO,MAAM,aAAa,oFAaxB,CAAC"}
@@ -158,4 +158,4 @@ var CheckboxGroup = React.forwardRef((props, ref) => {
158
158
  });
159
159
  CheckboxGroup.displayName = "CheckboxGroup";
160
160
  //#endregion
161
- export { CheckboxControl, CheckboxGroup, CheckboxIndicator, CheckboxLabel, CheckboxRoot };
161
+ export { CheckboxControl, CheckboxGroup, CheckboxIndicator, CheckboxLabel, CheckboxRoot, useCheckboxContext };
@@ -20,6 +20,11 @@ export interface IconProps extends LynxStyledElementProps {
20
20
  icon: ReactElement<LynxIconElementProps>;
21
21
  size?: StyleProps["height"] | number;
22
22
  color?: StyleProps["color"];
23
+ /**
24
+ * 자동 감지되지 않는 멀티컬러 아이콘의 원본 색상을 유지합니다.
25
+ * @default false
26
+ */
27
+ multicolor?: boolean;
23
28
  }
24
29
  export interface PrefixIconProps extends IconProps {
25
30
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../src/components/Icon/Icon.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,YAAY,EAClB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,KAAK,EAAE,oBAAoB,EAAE,sBAAsB,EAAe,MAAM,aAAa,CAAC;AAC7F,OAAO,EAAgC,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEnF,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,YAAY,GAAG,YAAY,CAAC;AAIhE,UAAU,oBAAoB;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,CAAC;IACnD,IAAI,CAAC,EAAE,cAAc,CAAC;CACvB;AAWD,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,OAAO,GACR,EAAE;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,EAAE,OAAO,CAAC;CAClB,qBAyCA;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,KAAK,EACL,QAAQ,GACT,EAAE;IACD,KAAK,EAAE,oBAAoB,CAAC;IAC5B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,qBAEA;AAUD,wBAAgB,eAAe,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,GAAG,YAAY,GAAG,IAAI,CAI1E;AAID,MAAM,WAAW,SAAU,SAAQ,sBAAsB;IACvD,IAAI,EAAE,YAAY,CAAC,oBAAoB,CAAC,CAAC;IACzC,IAAI,CAAC,EAAE,UAAU,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC;IACrC,KAAK,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;CAC7B;AAED,MAAM,WAAW,eAAgB,SAA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AI,EAAE,KAAK,CAAC,SAAS,GAAG,YAAY,GAAG,IAAI,CAI1E;AAaD,MAAM,WAAW,SAAU,SAAQ,sBAAsB;IACvD,IAAI,EAAE,YAAY,CAAC,oBAAoB,CAAC,CAAC;IACzC,IAAI,CAAC,EAAE,UAAU,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC;IACrC,KAAK,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IAC5B;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,eAAgB,SAAQ,SAAS;CAAG;AAErD,MAAM,WAAW,eAAgB,SAAQ,SAAS;CAAG;AAuGrD,eAAO,MAAM,IAAI,2EAA8D,CAAC;AAChF,eAAO,MAAM,UAAU,iFAItB,CAAC;AACF,eAAO,MAAM,UAAU,iFAItB,CAAC;AAIF,MAAM,WAAW,iBAAkB,SAAQ,sBAAsB;IAC/D,IAAI,EAAE,YAAY,CAAC,oBAAoB,CAAC,CAAC;IACzC,IAAI,CAAC,EAAE,cAAc,CAAC;CACvB;AAED,eAAO,MAAM,YAAY,mFA2BvB,CAAC"}
@@ -41,10 +41,16 @@ function IconSlotProvider({ value, children }) {
41
41
  return <IconSlotContext.Provider value={value}>{children}</IconSlotContext.Provider>;
42
42
  }
43
43
  var iconSlotMarker = Symbol.for("@seed-design/lynx-react/icon-slot");
44
+ var seedMulticolorIconMarker = Symbol.for("@seed-design/multicolor-icon");
44
45
  function getIconSlotName(node) {
45
46
  if (!isValidElement(node)) return null;
46
47
  return node.type[iconSlotMarker] ?? null;
47
48
  }
49
+ function isMulticolorIcon(node) {
50
+ if (!isValidElement(node)) return false;
51
+ if (node.type == null || typeof node.type !== "function" && typeof node.type !== "object") return false;
52
+ return node.type[seedMulticolorIconMarker] === true;
53
+ }
48
54
  function mergeWrapperStyle({ size, color, style }) {
49
55
  const dimension = handleDimension(size);
50
56
  const resolvedColor = handleColor(color);
@@ -62,20 +68,25 @@ function getStyleColor(style) {
62
68
  return style?.color;
63
69
  }
64
70
  var IconSlotBase = React.forwardRef((props, ref) => {
65
- const { icon, slot, baseClassName, className, style, size, color, children: _children, ...nativeProps } = props;
71
+ const { icon, slot, baseClassName, className, style, size, color, multicolor = false, children: _children, ...nativeProps } = props;
66
72
  const context = React.useContext(IconSlotContext);
67
73
  const iconRequiredContext = React.useContext(IconRequiredContext);
68
74
  const sourceRef = useMainThreadRef(null);
69
75
  const slotClassName = slot != null ? context?.classNames?.[slot] : void 0;
76
+ const styleColor = getStyleColor(style);
77
+ const shouldPreserveOriginalColor = multicolor || isMulticolorIcon(icon);
70
78
  const iconColor = useIconColor([
71
79
  baseClassName,
72
80
  slotClassName,
73
81
  className,
74
82
  size,
75
83
  color,
76
- getStyleColor(style),
84
+ styleColor,
77
85
  ...context?.deps ?? []
78
- ], { sourceRef });
86
+ ], {
87
+ sourceRef,
88
+ enabled: !shouldPreserveOriginalColor
89
+ });
79
90
  const hasValidIcon = isValidElement(icon);
80
91
  React.useLayoutEffect(() => {
81
92
  if (slot !== "icon" || !hasValidIcon) return;
@@ -0,0 +1,19 @@
1
+ import { MannerTempVariantProps } from '@seed-design/lynx-css/recipes/manner-temp';
2
+ import { LynxStyledElementProps } from '../../types';
3
+ import * as React from "@lynx-js/react";
4
+ type MannerTempLevel = NonNullable<MannerTempVariantProps["level"]>;
5
+ export interface MannerTempEmoteProps extends LynxStyledElementProps {
6
+ level?: MannerTempLevel;
7
+ }
8
+ export declare const MannerTempEmote: React.ForwardRefExoticComponent<MannerTempEmoteProps & React.RefAttributes<unknown>>;
9
+ /**
10
+ * @platform Lynx
11
+ *
12
+ * React와 같은 `level` variant와 `MannerTempEmote` 조합을 제공합니다.
13
+ * HTML `<span>` 대신 native `<view>` / `<text>` / `<image>`를 렌더링합니다.
14
+ */
15
+ export interface MannerTempProps extends MannerTempVariantProps, LynxStyledElementProps {
16
+ }
17
+ export declare const MannerTemp: React.ForwardRefExoticComponent<MannerTempProps & React.RefAttributes<unknown>>;
18
+ export {};
19
+ //# sourceMappingURL=MannerTemp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MannerTemp.d.ts","sourceRoot":"","sources":["../../../src/components/MannerTemp/MannerTemp.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;AAGpG,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC;AAGxC,OAAO,KAAK,EAAE,sBAAsB,EAAe,MAAM,aAAa,CAAC;AAGvE,KAAK,eAAe,GAAG,WAAW,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC,CAAC;AAiBpE,MAAM,WAAW,oBAAqB,SAAQ,sBAAsB;IAClE,KAAK,CAAC,EAAE,eAAe,CAAC;CACzB;AAED,eAAO,MAAM,eAAe,sFAe1B,CAAC;AAQH;;;;;GAKG;AACH,MAAM,WAAW,eAAgB,SAAQ,sBAAsB,EAAE,sBAAsB;CAAG;AAE1F,eAAO,MAAM,UAAU,iFAqBrB,CAAC"}
@@ -0,0 +1,47 @@
1
+ import { toArray } from "../../utils/children.js";
2
+ import * as React from "@lynx-js/react";
3
+ import { isValidElement } from "@lynx-js/react";
4
+ import clsx from "clsx";
5
+ import { mannerTemp } from "@seed-design/lynx-css/recipes/manner-temp";
6
+ //#region src/components/MannerTemp/MannerTemp.tsx
7
+ var emoteSources = {
8
+ l1: "https://assetstorage.krrt.io/1123529253537884138/b63c9b3c-410c-4cf5-ba83-d787a03c3c57/width_96_height_96.webp",
9
+ l2: "https://assetstorage.krrt.io/1123529253537884138/8e4bc458-f6d4-41ce-bfa2-17ea34022f5b/width_96_height_96.webp",
10
+ l3: "https://assetstorage.krrt.io/1123529253537884138/906ff501-edf6-402d-a3a4-a93ce9e04d30/width_96_height_96.webp",
11
+ l4: "https://assetstorage.krrt.io/1123529253537884138/10753976-b25d-4e4c-84b2-dbbe196dd0d9/width_96_height_96.webp",
12
+ l5: "https://assetstorage.krrt.io/1123529253537884138/ddfbd296-5089-408c-aa37-919f45074e5e/width_96_height_96.webp",
13
+ l6: "https://assetstorage.krrt.io/1123529253537884138/bf8f9b4d-c72e-4bf2-a094-460d3ad1b11f/width_96_height_96.webp",
14
+ l7: "https://assetstorage.krrt.io/1123529253537884138/9906a459-a4e3-4521-a6e5-0cc24c0aa763/width_96_height_96.webp",
15
+ l8: "https://assetstorage.krrt.io/1123529253537884138/438edadb-d31d-4711-aebd-a72f303fdf49/width_96_height_96.webp",
16
+ l9: "https://assetstorage.krrt.io/1123529253537884138/61f6c297-11da-4d72-ba90-20cd69c09c22/width_96_height_96.webp",
17
+ l10: "https://assetstorage.krrt.io/1123529253537884138/6cc410ac-3a55-4542-b49f-53551db74c4d/width_96_height_96.webp"
18
+ };
19
+ var MannerTempLevelContext = React.createContext(null);
20
+ var MannerTempEmote = React.forwardRef((props, ref) => {
21
+ const contextLevel = React.useContext(MannerTempLevelContext);
22
+ const { level = contextLevel ?? "l1", children: _children, className, ...nativeProps } = props;
23
+ const classes = mannerTemp({ level });
24
+ return <image {...ref ? { ref } : {}} {...nativeProps} src={emoteSources[level]} mode="aspectFit" accessibility-elements-hidden={true} className={clsx(classes.emote, className)} />;
25
+ });
26
+ MannerTempEmote.displayName = "MannerTempEmote";
27
+ function isMannerTempEmote(node) {
28
+ return isValidElement(node) && node.type === MannerTempEmote;
29
+ }
30
+ var MannerTemp = React.forwardRef((props, ref) => {
31
+ const [variantProps, otherProps] = mannerTemp.splitVariantProps(props);
32
+ const classes = mannerTemp(variantProps);
33
+ const { children, className, ...nativeProps } = otherProps;
34
+ const childArray = toArray(children);
35
+ const emoteChildren = childArray.filter(isMannerTempEmote);
36
+ const labelChildren = childArray.filter((child) => !isMannerTempEmote(child));
37
+ const level = variantProps.level ?? "l1";
38
+ return <MannerTempLevelContext.Provider value={level}>
39
+ <view {...ref ? { ref } : {}} {...nativeProps} className={clsx(classes.root, className)}>
40
+ <text className={classes.label}>{labelChildren}</text>
41
+ {emoteChildren}
42
+ </view>
43
+ </MannerTempLevelContext.Provider>;
44
+ });
45
+ MannerTemp.displayName = "MannerTemp";
46
+ //#endregion
47
+ export { MannerTemp, MannerTempEmote };
@@ -0,0 +1,2 @@
1
+ export * from './MannerTemp';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/MannerTemp/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { MannerTempBadgeVariantProps } from '@seed-design/lynx-css/recipes/manner-temp-badge';
2
+ import { LynxStyledElementProps } from '../../types';
3
+ import * as React from "@lynx-js/react";
4
+ /**
5
+ * @platform Lynx
6
+ *
7
+ * React와 같은 `level` variant를 제공하지만, HTML `<span>` 대신 native
8
+ * `<view>` / `<text>`를 렌더링합니다.
9
+ */
10
+ export interface MannerTempBadgeProps extends MannerTempBadgeVariantProps, LynxStyledElementProps {
11
+ }
12
+ export declare const MannerTempBadge: React.ForwardRefExoticComponent<MannerTempBadgeProps & React.RefAttributes<unknown>>;
13
+ //# sourceMappingURL=MannerTempBadge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MannerTempBadge.d.ts","sourceRoot":"","sources":["../../../src/components/MannerTempBadge/MannerTempBadge.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,2BAA2B,EACjC,MAAM,iDAAiD,CAAC;AAEzD,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC;AAExC,OAAO,KAAK,EAAE,sBAAsB,EAAe,MAAM,aAAa,CAAC;AAEvE;;;;;GAKG;AACH,MAAM,WAAW,oBAAqB,SAAQ,2BAA2B,EAAE,sBAAsB;CAAG;AAEpG,eAAO,MAAM,eAAe,sFAc1B,CAAC"}
@@ -0,0 +1,15 @@
1
+ import * as React from "@lynx-js/react";
2
+ import clsx from "clsx";
3
+ import { mannerTempBadge } from "@seed-design/lynx-css/recipes/manner-temp-badge";
4
+ //#region src/components/MannerTempBadge/MannerTempBadge.tsx
5
+ var MannerTempBadge = React.forwardRef((props, ref) => {
6
+ const [variantProps, otherProps] = mannerTempBadge.splitVariantProps(props);
7
+ const classes = mannerTempBadge(variantProps);
8
+ const { children, className, ...nativeProps } = otherProps;
9
+ return <view {...ref ? { ref } : {}} {...nativeProps} className={clsx(classes.root, className)}>
10
+ <text className={classes.label}>{children}</text>
11
+ </view>;
12
+ });
13
+ MannerTempBadge.displayName = "MannerTempBadge";
14
+ //#endregion
15
+ export { MannerTempBadge };
@@ -0,0 +1,2 @@
1
+ export * from './MannerTempBadge';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/MannerTempBadge/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { NotificationBadgeVariantProps } from '@seed-design/lynx-css/recipes/notification-badge';
2
+ import { NotificationBadgePositionerVariantProps } from '@seed-design/lynx-css/recipes/notification-badge-positioner';
3
+ import { LynxAccessibilityProps, LynxStyledElementProps } from '../../types';
4
+ import * as React from "@lynx-js/react";
5
+ /**
6
+ * @platform Lynx
7
+ *
8
+ * 웹 Notification Badge와 동일한 `size` variant를 제공하며, Lynx native `<view>`와
9
+ * `<text>`를 직접 렌더링합니다. `NotificationBadgePositioner` 안에서는 Positioner의 `size`를
10
+ * 기본값으로 사용하고, Badge에 직접 전달한 `size`가 이를 덮어씁니다.
11
+ */
12
+ export interface NotificationBadgeProps extends NotificationBadgeVariantProps, LynxStyledElementProps, LynxAccessibilityProps {
13
+ }
14
+ export declare const NotificationBadge: React.ForwardRefExoticComponent<NotificationBadgeProps & React.RefAttributes<unknown>>;
15
+ export interface NotificationBadgePositionerProps extends NotificationBadgePositionerVariantProps, LynxStyledElementProps {
16
+ }
17
+ export declare const NotificationBadgePositioner: React.ForwardRefExoticComponent<NotificationBadgePositionerProps & React.RefAttributes<unknown>>;
18
+ //# sourceMappingURL=NotificationBadge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NotificationBadge.d.ts","sourceRoot":"","sources":["../../../src/components/NotificationBadge/NotificationBadge.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,6BAA6B,EACnC,MAAM,kDAAkD,CAAC;AAC1D,OAAO,EAEL,KAAK,uCAAuC,EAC7C,MAAM,6DAA6D,CAAC;AAErE,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC;AAExC,OAAO,KAAK,EACV,sBAAsB,EACtB,sBAAsB,EAEvB,MAAM,aAAa,CAAC;AAIrB;;;;;;GAMG;AACH,MAAM,WAAW,sBACf,SAAQ,6BAA6B,EACnC,sBAAsB,EACtB,sBAAsB;CAAG;AAE7B,eAAO,MAAM,iBAAiB,wFAoB7B,CAAC;AAIF,MAAM,WAAW,gCACf,SAAQ,uCAAuC,EAC7C,sBAAsB;CAAG;AAE7B,eAAO,MAAM,2BAA2B,kGAmBtC,CAAC"}
@@ -0,0 +1,34 @@
1
+ import * as React from "@lynx-js/react";
2
+ import clsx from "clsx";
3
+ import { notificationBadge } from "@seed-design/lynx-css/recipes/notification-badge";
4
+ import { notificationBadgePositioner } from "@seed-design/lynx-css/recipes/notification-badge-positioner";
5
+ //#region src/components/NotificationBadge/NotificationBadge.tsx
6
+ var NotificationBadgeContext = React.createContext(null);
7
+ var NotificationBadge = React.forwardRef((innerProps, ref) => {
8
+ const props = {
9
+ ...React.useContext(NotificationBadgeContext),
10
+ ...innerProps
11
+ };
12
+ const [variantProps, otherProps] = notificationBadge.splitVariantProps(props);
13
+ const classes = notificationBadge(variantProps);
14
+ const { children, className, ...nativeProps } = otherProps;
15
+ return <view {...ref ? { ref } : {}} {...nativeProps} className={clsx(classes.root, className)}>
16
+ <text className={classes.label} text-single-line-vertical-align="center">
17
+ {children}
18
+ </text>
19
+ </view>;
20
+ });
21
+ NotificationBadge.displayName = "NotificationBadge";
22
+ var NotificationBadgePositioner = React.forwardRef((props, ref) => {
23
+ const [variantProps, otherProps] = notificationBadgePositioner.splitVariantProps(props);
24
+ const { children, className, ...nativeProps } = otherProps;
25
+ const contextValue = React.useMemo(() => ({ size: variantProps.size }), [variantProps.size]);
26
+ return <NotificationBadgeContext.Provider value={contextValue}>
27
+ <view {...ref ? { ref } : {}} {...nativeProps} className={clsx(notificationBadgePositioner(variantProps), className)}>
28
+ {children}
29
+ </view>
30
+ </NotificationBadgeContext.Provider>;
31
+ });
32
+ NotificationBadgePositioner.displayName = "NotificationBadgePositioner";
33
+ //#endregion
34
+ export { NotificationBadge, NotificationBadgePositioner };
@@ -0,0 +1,2 @@
1
+ export * from './NotificationBadge';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/NotificationBadge/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC"}
@@ -0,0 +1,35 @@
1
+ import { PageBannerVariantProps } from '@seed-design/lynx-css/recipes/page-banner';
2
+ import { LynxAccessibilityProps, LynxPressableProps, LynxStyledElementProps } from '../../types';
3
+ import * as React from "@lynx-js/react";
4
+ /**
5
+ * @platform Lynx
6
+ *
7
+ * 웹 대비 차이:
8
+ * - `asChild`와 DOM 이벤트 대신 Lynx native `<view>`와 `bindtap`을 사용합니다.
9
+ * - 웹 focus ring과 동적 scale feedback은 지원하지 않습니다.
10
+ */
11
+ export interface PageBannerRootProps extends Omit<PageBannerVariantProps, "pressed" | "closeButtonPressed">, LynxStyledElementProps, LynxPressableProps, LynxAccessibilityProps {
12
+ defaultOpen?: boolean;
13
+ open?: boolean;
14
+ onDismiss?: () => void;
15
+ }
16
+ export declare const PageBannerRoot: React.ForwardRefExoticComponent<PageBannerRootProps & React.RefAttributes<unknown>>;
17
+ export interface PageBannerContentProps extends LynxStyledElementProps, LynxAccessibilityProps {
18
+ }
19
+ export declare const PageBannerContent: React.ForwardRefExoticComponent<PageBannerContentProps & React.RefAttributes<unknown>>;
20
+ export interface PageBannerBodyProps extends LynxStyledElementProps, LynxAccessibilityProps {
21
+ }
22
+ export declare const PageBannerBody: React.ForwardRefExoticComponent<PageBannerBodyProps & React.RefAttributes<unknown>>;
23
+ export interface PageBannerTitleProps extends LynxStyledElementProps, LynxAccessibilityProps {
24
+ }
25
+ export declare const PageBannerTitle: React.ForwardRefExoticComponent<PageBannerTitleProps & React.RefAttributes<unknown>>;
26
+ export interface PageBannerDescriptionProps extends LynxStyledElementProps, LynxAccessibilityProps {
27
+ }
28
+ export declare const PageBannerDescription: React.ForwardRefExoticComponent<PageBannerDescriptionProps & React.RefAttributes<unknown>>;
29
+ export interface PageBannerButtonProps extends LynxStyledElementProps, LynxPressableProps, LynxAccessibilityProps {
30
+ }
31
+ export declare const PageBannerButton: React.ForwardRefExoticComponent<PageBannerButtonProps & React.RefAttributes<unknown>>;
32
+ export interface PageBannerCloseButtonProps extends LynxStyledElementProps, LynxPressableProps, LynxAccessibilityProps {
33
+ }
34
+ export declare const PageBannerCloseButton: React.ForwardRefExoticComponent<PageBannerCloseButtonProps & React.RefAttributes<unknown>>;
35
+ //# sourceMappingURL=PageBanner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PageBanner.d.ts","sourceRoot":"","sources":["../../../src/components/PageBanner/PageBanner.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;AACpG,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC;AAMxC,OAAO,KAAK,EACV,sBAAsB,EACtB,kBAAkB,EAClB,sBAAsB,EAIvB,MAAM,aAAa,CAAC;AA2BrB;;;;;;GAMG;AACH,MAAM,WAAW,mBACf,SAAQ,IAAI,CAAC,sBAAsB,EAAE,SAAS,GAAG,oBAAoB,CAAC,EACpE,sBAAsB,EACtB,kBAAkB,EAClB,sBAAsB;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AAED,eAAO,MAAM,cAAc,qFAmFzB,CAAC;AAKH,MAAM,WAAW,sBAAuB,SAAQ,sBAAsB,EAAE,sBAAsB;CAAG;AAEjG,eAAO,MAAM,iBAAiB,wFAc5B,CAAC;AAKH,MAAM,WAAW,mBAAoB,SAAQ,sBAAsB,EAAE,sBAAsB;CAAG;AAE9F,eAAO,MAAM,cAAc,qFAczB,CAAC;AAKH,MAAM,WAAW,oBAAqB,SAAQ,sBAAsB,EAAE,sBAAsB;CAAG;AAE/F,eAAO,MAAM,eAAe,sFAe1B,CAAC;AAKH,MAAM,WAAW,0BACf,SAAQ,sBAAsB,EAC5B,sBAAsB;CAAG;AAE7B,eAAO,MAAM,qBAAqB,4FAgBjC,CAAC;AAKF,MAAM,WAAW,qBACf,SAAQ,sBAAsB,EAC5B,kBAAkB,EAClB,sBAAsB;CAAG;AAE7B,eAAO,MAAM,gBAAgB,uFAuB3B,CAAC;AAKH,MAAM,WAAW,0BACf,SAAQ,sBAAsB,EAC5B,kBAAkB,EAClB,sBAAsB;CAAG;AAE7B,eAAO,MAAM,qBAAqB,4FAiEjC,CAAC"}
@@ -0,0 +1,150 @@
1
+ import { useControllableState } from "../../hooks/useControllableState.js";
2
+ import { usePressTap } from "../../hooks/usePressTap.js";
3
+ import { createSlotRecipeContext } from "../../utils/create-slot-recipe-context.jsx";
4
+ import { IconSlotProvider } from "../Icon/Icon.jsx";
5
+ import * as React from "@lynx-js/react";
6
+ import clsx from "clsx";
7
+ import { useMemoizedFn } from "@lynx-js/lynx-ui-common";
8
+ import { pageBanner } from "@seed-design/lynx-css/recipes/page-banner";
9
+ //#region src/components/PageBanner/PageBanner.tsx
10
+ var { ClassNamesProvider, PropsProvider, useClassNames, useProps } = createSlotRecipeContext(pageBanner);
11
+ var PageBannerContext = React.createContext(null);
12
+ function usePageBannerContext(consumer) {
13
+ const context = React.useContext(PageBannerContext);
14
+ if (!context) throw new Error(`<${consumer}/> must be rendered inside <PageBannerRoot/>.`);
15
+ return context;
16
+ }
17
+ var PageBannerRoot = React.forwardRef((props, ref) => {
18
+ if (process.env.NODE_ENV !== "production" && props.variant === "solid" && props.tone === "magic") console.error("`magic` tone is not available for `solid` variant in PageBanner components. Please use variant=\"weak\" or a different tone instead.");
19
+ const [variantProps, otherProps] = pageBanner.splitVariantProps(props);
20
+ const { children, className, style, defaultOpen = true, open: openProp, onDismiss, bindtap, "main-thread:bindtap": mainThreadBindtap, "accessibility-element": accessibilityElement, "accessibility-traits": accessibilityTraits, ...nativeProps } = otherProps;
21
+ const [open, setOpen] = useControllableState({
22
+ value: openProp,
23
+ defaultValue: defaultOpen
24
+ });
25
+ const isInteractive = bindtap != null || mainThreadBindtap != null;
26
+ const pressTap = usePressTap({
27
+ disabled: !isInteractive,
28
+ onTap: bindtap,
29
+ mainThreadOnTap: mainThreadBindtap
30
+ });
31
+ const classNames = pageBanner({
32
+ ...variantProps,
33
+ pressed: pressTap.pressed
34
+ });
35
+ const dismiss = useMemoizedFn(() => {
36
+ if (!open) return;
37
+ setOpen(false);
38
+ onDismiss?.();
39
+ });
40
+ const contextValue = React.useMemo(() => ({ dismiss }), [dismiss]);
41
+ const iconSlotContextValue = React.useMemo(() => ({
42
+ classNames: {
43
+ prefixIcon: classNames.prefixIcon,
44
+ suffixIcon: classNames.suffixIcon
45
+ },
46
+ deps: [
47
+ variantProps.tone ?? "neutral",
48
+ variantProps.variant ?? "weak",
49
+ pressTap.pressed
50
+ ]
51
+ }), [
52
+ classNames.prefixIcon,
53
+ classNames.suffixIcon,
54
+ pressTap.pressed,
55
+ variantProps.tone,
56
+ variantProps.variant
57
+ ]);
58
+ if (!open) return null;
59
+ return <PageBannerContext.Provider value={contextValue}>
60
+ <ClassNamesProvider value={classNames}>
61
+ <PropsProvider value={variantProps}>
62
+ <IconSlotProvider value={iconSlotContextValue}>
63
+ <view {...ref ? { ref } : {}} {...nativeProps} {...isInteractive ? pressTap : {}} accessibility-element={accessibilityElement ?? (isInteractive ? true : void 0)} accessibility-traits={accessibilityTraits ?? (isInteractive ? "button" : void 0)} className={clsx(classNames.root, className)} style={style}>
64
+ {children}
65
+ </view>
66
+ </IconSlotProvider>
67
+ </PropsProvider>
68
+ </ClassNamesProvider>
69
+ </PageBannerContext.Provider>;
70
+ });
71
+ PageBannerRoot.displayName = "PageBannerRoot";
72
+ var PageBannerContent = React.forwardRef((props, ref) => {
73
+ const { children, className, style, ...nativeProps } = props;
74
+ const classNames = useClassNames();
75
+ return <view {...ref ? { ref } : {}} {...nativeProps} className={clsx(classNames.content, className)} style={style}>
76
+ {children}
77
+ </view>;
78
+ });
79
+ PageBannerContent.displayName = "PageBannerContent";
80
+ var PageBannerBody = React.forwardRef((props, ref) => {
81
+ const { children, className, style, ...nativeProps } = props;
82
+ const classNames = useClassNames();
83
+ return <text {...ref ? { ref } : {}} {...nativeProps} className={clsx(classNames.body, className)} style={style}>
84
+ {children}
85
+ </text>;
86
+ });
87
+ PageBannerBody.displayName = "PageBannerBody";
88
+ var PageBannerTitle = React.forwardRef((props, ref) => {
89
+ const { children, className, style, ...nativeProps } = props;
90
+ const classNames = useClassNames();
91
+ return <text {...ref ? { ref } : {}} {...nativeProps} className={clsx(classNames.title, className)} style={style}>
92
+ {children}
93
+ {" "}
94
+ </text>;
95
+ });
96
+ PageBannerTitle.displayName = "PageBannerTitle";
97
+ var PageBannerDescription = React.forwardRef((props, ref) => {
98
+ const { children, className, style, ...nativeProps } = props;
99
+ const classNames = useClassNames();
100
+ return <text {...ref ? { ref } : {}} {...nativeProps} className={clsx(classNames.description, className)} style={style}>
101
+ {children}
102
+ </text>;
103
+ });
104
+ PageBannerDescription.displayName = "PageBannerDescription";
105
+ var PageBannerButton = React.forwardRef((props, ref) => {
106
+ const { children, className, style, "accessibility-element": accessibilityElement = true, "accessibility-traits": accessibilityTraits = "button", ...nativeProps } = props;
107
+ const classNames = useClassNames();
108
+ return <text {...ref ? { ref } : {}} {...nativeProps} accessibility-element={accessibilityElement} accessibility-traits={accessibilityTraits} className={clsx(classNames.button, className)} style={style}>
109
+ {children}
110
+ </text>;
111
+ });
112
+ PageBannerButton.displayName = "PageBannerButton";
113
+ var PageBannerCloseButton = React.forwardRef((props, ref) => {
114
+ const { children, className, style, bindtap, "main-thread:bindtap": mainThreadBindtap, "accessibility-element": accessibilityElement = true, "accessibility-label": accessibilityLabel, "accessibility-traits": accessibilityTraits = "button", ...nativeProps } = props;
115
+ const parentVariantProps = useProps() ?? {};
116
+ const { dismiss } = usePageBannerContext("PageBannerCloseButton");
117
+ const pressTap = usePressTap({
118
+ onTap: useMemoizedFn((event) => {
119
+ bindtap?.(event);
120
+ dismiss();
121
+ }),
122
+ mainThreadOnTap: mainThreadBindtap
123
+ });
124
+ const classNames = pageBanner({
125
+ ...parentVariantProps,
126
+ closeButtonPressed: pressTap.pressed
127
+ });
128
+ const iconSlotContextValue = React.useMemo(() => ({
129
+ classNames: { suffixIcon: classNames.closeButtonIcon },
130
+ deps: [
131
+ parentVariantProps.tone ?? "neutral",
132
+ parentVariantProps.variant ?? "weak",
133
+ pressTap.pressed
134
+ ]
135
+ }), [
136
+ classNames.closeButtonIcon,
137
+ parentVariantProps.tone,
138
+ parentVariantProps.variant,
139
+ pressTap.pressed
140
+ ]);
141
+ if (process.env.NODE_ENV !== "production" && accessibilityElement && !accessibilityLabel) console.warn("PageBannerCloseButton requires `accessibility-label` for accessibility.");
142
+ return <IconSlotProvider value={iconSlotContextValue}>
143
+ <view {...ref ? { ref } : {}} {...nativeProps} {...pressTap} accessibility-element={accessibilityElement} accessibility-label={accessibilityLabel} accessibility-traits={accessibilityTraits} className={clsx(classNames.closeButton, className)} style={style}>
144
+ {children}
145
+ </view>
146
+ </IconSlotProvider>;
147
+ });
148
+ PageBannerCloseButton.displayName = "PageBannerCloseButton";
149
+ //#endregion
150
+ export { PageBannerBody, PageBannerButton, PageBannerCloseButton, PageBannerContent, PageBannerDescription, PageBannerRoot, PageBannerTitle };
@@ -0,0 +1,2 @@
1
+ export { PageBannerBody as Body, PageBannerButton as Button, PageBannerCloseButton as CloseButton, PageBannerContent as Content, PageBannerDescription as Description, PageBannerRoot as Root, PageBannerTitle as Title, type PageBannerBodyProps as BodyProps, type PageBannerButtonProps as ButtonProps, type PageBannerCloseButtonProps as CloseButtonProps, type PageBannerContentProps as ContentProps, type PageBannerDescriptionProps as DescriptionProps, type PageBannerRootProps as RootProps, type PageBannerTitleProps as TitleProps, } from './PageBanner';
2
+ //# sourceMappingURL=PageBanner.namespace.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PageBanner.namespace.d.ts","sourceRoot":"","sources":["../../../src/components/PageBanner/PageBanner.namespace.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,IAAI,IAAI,EACtB,gBAAgB,IAAI,MAAM,EAC1B,qBAAqB,IAAI,WAAW,EACpC,iBAAiB,IAAI,OAAO,EAC5B,qBAAqB,IAAI,WAAW,EACpC,cAAc,IAAI,IAAI,EACtB,eAAe,IAAI,KAAK,EACxB,KAAK,mBAAmB,IAAI,SAAS,EACrC,KAAK,qBAAqB,IAAI,WAAW,EACzC,KAAK,0BAA0B,IAAI,gBAAgB,EACnD,KAAK,sBAAsB,IAAI,YAAY,EAC3C,KAAK,0BAA0B,IAAI,gBAAgB,EACnD,KAAK,mBAAmB,IAAI,SAAS,EACrC,KAAK,oBAAoB,IAAI,UAAU,GACxC,MAAM,cAAc,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { __exportAll } from "../../_virtual/_rolldown/runtime.js";
2
+ import { PageBannerBody, PageBannerButton, PageBannerCloseButton, PageBannerContent, PageBannerDescription, PageBannerRoot, PageBannerTitle } from "./PageBanner.jsx";
3
+ //#region src/components/PageBanner/PageBanner.namespace.ts
4
+ var PageBanner_namespace_exports = /* @__PURE__ */ __exportAll({
5
+ Body: () => PageBannerBody,
6
+ Button: () => PageBannerButton,
7
+ CloseButton: () => PageBannerCloseButton,
8
+ Content: () => PageBannerContent,
9
+ Description: () => PageBannerDescription,
10
+ Root: () => PageBannerRoot,
11
+ Title: () => PageBannerTitle
12
+ });
13
+ //#endregion
14
+ export { PageBanner_namespace_exports };
@@ -0,0 +1,3 @@
1
+ export { PageBannerBody, PageBannerButton, PageBannerCloseButton, PageBannerContent, PageBannerDescription, PageBannerRoot, PageBannerTitle, type PageBannerBodyProps, type PageBannerButtonProps, type PageBannerCloseButtonProps, type PageBannerContentProps, type PageBannerDescriptionProps, type PageBannerRootProps, type PageBannerTitleProps, } from './PageBanner';
2
+ export * as PageBanner from './PageBanner.namespace';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/PageBanner/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,qBAAqB,EACrB,iBAAiB,EACjB,qBAAqB,EACrB,cAAc,EACd,eAAe,EACf,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,0BAA0B,EAC/B,KAAK,sBAAsB,EAC3B,KAAK,0BAA0B,EAC/B,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,GAC1B,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC"}
@@ -3,6 +3,14 @@ import { RadioVariantProps } from '@seed-design/lynx-css/recipes/radio';
3
3
  import { RadiomarkVariantProps } from '@seed-design/lynx-css/recipes/radiomark';
4
4
  import { LynxIconElementProps, LynxStyledElementProps } from '../../types';
5
5
  import * as React from "@lynx-js/react";
6
+ interface RadioGroupItemContextValue {
7
+ value: string;
8
+ checked: boolean;
9
+ disabled: boolean;
10
+ pressed: boolean;
11
+ select: () => void;
12
+ }
13
+ export declare function useRadioGroupItemContext(consumer: string): RadioGroupItemContextValue;
6
14
  export interface RadioGroupRootProps extends RadioVariantProps, Omit<RadiomarkVariantProps, "size" | "checked" | "disabled">, LynxStyledElementProps {
7
15
  value?: string;
8
16
  defaultValue?: string;
@@ -31,4 +39,5 @@ export declare namespace RadioGroupItemIndicator {
31
39
  export interface RadioGroupItemLabelProps extends LynxStyledElementProps {
32
40
  }
33
41
  export declare const RadioGroupItemLabel: React.ForwardRefExoticComponent<RadioGroupItemLabelProps & React.RefAttributes<unknown>>;
42
+ export {};
34
43
  //# sourceMappingURL=RadioGroup.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RadioGroup.d.ts","sourceRoot":"","sources":["../../../src/components/RadioGroup/RadioGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAkB,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAInE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAE7E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAKrF,OAAO,KAAK,EACV,oBAAoB,EACpB,sBAAsB,EAGvB,MAAM,aAAa,CAAC;AAsErB,MAAM,WAAW,mBACf,SAAQ,iBAAiB,EACvB,IAAI,CAAC,qBAAqB,EAAE,MAAM,GAAG,SAAS,GAAG,UAAU,CAAC,EAC5D,sBAAsB;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC;AAED,eAAO,MAAM,cAAc,qFAyDzB,CAAC;AAKH,MAAM,WAAW,mBAAoB,SAAQ,sBAAsB;IACjE,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,cAAc,qFA+CzB,CAAC;AAKH,MAAM,WAAW,0BACf,SAAQ,IAAI,CAAC,qBAAqB,EAAE,MAAM,CAAC,EACzC,sBAAsB;CAA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AC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC;AAED,eAAO,MAAM,cAAc,qFAyDzB,CAAC;AAKH,MAAM,WAAW,mBAAoB,SAAQ,sBAAsB;IACjE,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,cAAc,qFA+CzB,CAAC;AAKH,MAAM,WAAW,0BACf,SAAQ,IAAI,CAAC,qBAAqB,EAAE,MAAM,CAAC,EACzC,sBAAsB;CAAG;AAE7B,eAAO,MAAM,qBAAqB,4FA8BjC,CAAC;AAKF,MAAM,WAAW,4BACf,SAAQ,IAAI,CAAC,sBAAsB,EAAE,WAAW,GAAG,OAAO,CAAC;IAC3D,kGAAkG;IAClG,SAAS,CAAC,EAAE,YAAY,CAAC,oBAAoB,CAAC,CAAC;IAC/C,0GAA0G;IAC1G,OAAO,CAAC,EAAE,YAAY,CAAC,oBAAoB,CAAC,CAAC;CAC9C;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,4BAA4B,qBA6B1E;yBA7Be,uBAAuB;;;AAkCvC,MAAM,WAAW,wBAAyB,SAAQ,sBAAsB;CAAG;AAE3E,eAAO,MAAM,mBAAmB,0FAoB/B,CAAC"}
@@ -158,4 +158,4 @@ var RadioGroupItemLabel = React.forwardRef((props, ref) => {
158
158
  });
159
159
  RadioGroupItemLabel.displayName = "RadioGroupItemLabel";
160
160
  //#endregion
161
- export { RadioGroupItem, RadioGroupItemControl, RadioGroupItemIndicator, RadioGroupItemLabel, RadioGroupRoot };
161
+ export { RadioGroupItem, RadioGroupItemControl, RadioGroupItemIndicator, RadioGroupItemLabel, RadioGroupRoot, useRadioGroupItemContext };
@@ -0,0 +1,27 @@
1
+ import { LynxAccessibilityProps, LynxPressableProps, LynxStyledElementProps } from '../../types';
2
+ import * as React from "@lynx-js/react";
3
+ /**
4
+ * @platform Lynx
5
+ *
6
+ * 웹 대비 미지원 기능:
7
+ * - HiddenInput, name, form: Lynx에 HTML form 제출 모델이 없음
8
+ * - focus, focusVisible: Lynx에 키보드 포커스 모델이 없음
9
+ * - raw DOM change event: 선택 변경은 onValueChange로 노출
10
+ */
11
+ export interface SegmentedControlRootProps extends LynxStyledElementProps, LynxAccessibilityProps {
12
+ value?: string;
13
+ defaultValue?: string;
14
+ disabled?: boolean;
15
+ onValueChange?: (value: string) => void;
16
+ }
17
+ export declare const SegmentedControlRoot: React.ForwardRefExoticComponent<SegmentedControlRootProps & React.RefAttributes<unknown>>;
18
+ export interface SegmentedControlItemProps extends Omit<LynxStyledElementProps, "children">, LynxAccessibilityProps, LynxPressableProps {
19
+ children: string | number;
20
+ value: string;
21
+ disabled?: boolean;
22
+ }
23
+ export declare const SegmentedControlItem: React.ForwardRefExoticComponent<SegmentedControlItemProps & React.RefAttributes<unknown>>;
24
+ export interface SegmentedControlIndicatorProps extends LynxStyledElementProps {
25
+ }
26
+ export declare const SegmentedControlIndicator: React.ForwardRefExoticComponent<SegmentedControlIndicatorProps & React.RefAttributes<unknown>>;
27
+ //# sourceMappingURL=SegmentedControl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SegmentedControl.d.ts","sourceRoot":"","sources":["../../../src/components/SegmentedControl/SegmentedControl.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC;AAKxC,OAAO,KAAK,EACV,sBAAsB,EACtB,kBAAkB,EAClB,sBAAsB,EAGvB,MAAM,aAAa,CAAC;AAsBrB;;;;;;;GAOG;AACH,MAAM,WAAW,yBAA0B,SAAQ,sBAAsB,EAAE,sBAAsB;IAC/F,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC;AAED,eAAO,MAAM,oBAAoB,2FA6EhC,CAAC;AAGF,MAAM,WAAW,yBACf,SAAQ,IAAI,CAAC,sBAAsB,EAAE,UAAU,CAAC,EAC9C,sBAAsB,EACtB,kBAAkB;IACpB,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,oBAAoB,2FA4EhC,CAAC;AAGF,MAAM,WAAW,8BAA+B,SAAQ,sBAAsB;CAAG;AAEjF,eAAO,MAAM,yBAAyB,gGAerC,CAAC"}