@seed-design/lynx-react 0.0.0-alpha-20260622094810

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 (196) hide show
  1. package/lib/_virtual/_rolldown/runtime.js +13 -0
  2. package/lib/components/ActionButton/ActionButton.d.ts +49 -0
  3. package/lib/components/ActionButton/ActionButton.d.ts.map +1 -0
  4. package/lib/components/ActionButton/ActionButton.jsx +158 -0
  5. package/lib/components/ActionButton/index.d.ts +2 -0
  6. package/lib/components/ActionButton/index.d.ts.map +1 -0
  7. package/lib/components/AppBar/AppBar.d.ts +35 -0
  8. package/lib/components/AppBar/AppBar.d.ts.map +1 -0
  9. package/lib/components/AppBar/AppBar.jsx +132 -0
  10. package/lib/components/AppBar/AppBar.namespace.d.ts +2 -0
  11. package/lib/components/AppBar/AppBar.namespace.d.ts.map +1 -0
  12. package/lib/components/AppBar/AppBar.namespace.js +15 -0
  13. package/lib/components/AppBar/context.d.ts +13 -0
  14. package/lib/components/AppBar/context.d.ts.map +1 -0
  15. package/lib/components/AppBar/context.js +12 -0
  16. package/lib/components/AppBar/index.d.ts +3 -0
  17. package/lib/components/AppBar/index.d.ts.map +1 -0
  18. package/lib/components/AppBar/useAppBar.d.ts +15 -0
  19. package/lib/components/AppBar/useAppBar.d.ts.map +1 -0
  20. package/lib/components/AppBar/useAppBar.js +72 -0
  21. package/lib/components/Badge/Badge.d.ts +14 -0
  22. package/lib/components/Badge/Badge.d.ts.map +1 -0
  23. package/lib/components/Badge/Badge.jsx +15 -0
  24. package/lib/components/Badge/index.d.ts +2 -0
  25. package/lib/components/Badge/index.d.ts.map +1 -0
  26. package/lib/components/BottomSheet/BottomSheet.d.ts +87 -0
  27. package/lib/components/BottomSheet/BottomSheet.d.ts.map +1 -0
  28. package/lib/components/BottomSheet/BottomSheet.jsx +163 -0
  29. package/lib/components/BottomSheet/BottomSheet.namespace.d.ts +2 -0
  30. package/lib/components/BottomSheet/BottomSheet.namespace.d.ts.map +1 -0
  31. package/lib/components/BottomSheet/BottomSheet.namespace.js +18 -0
  32. package/lib/components/BottomSheet/index.d.ts +3 -0
  33. package/lib/components/BottomSheet/index.d.ts.map +1 -0
  34. package/lib/components/Box/Box.d.ts +20 -0
  35. package/lib/components/Box/Box.d.ts.map +1 -0
  36. package/lib/components/Box/Box.jsx +14 -0
  37. package/lib/components/Box/index.d.ts +2 -0
  38. package/lib/components/Box/index.d.ts.map +1 -0
  39. package/lib/components/Checkbox/Checkbox.d.ts +35 -0
  40. package/lib/components/Checkbox/Checkbox.d.ts.map +1 -0
  41. package/lib/components/Checkbox/Checkbox.jsx +130 -0
  42. package/lib/components/Checkbox/Checkbox.namespace.d.ts +2 -0
  43. package/lib/components/Checkbox/Checkbox.namespace.d.ts.map +1 -0
  44. package/lib/components/Checkbox/Checkbox.namespace.js +12 -0
  45. package/lib/components/Checkbox/index.d.ts +3 -0
  46. package/lib/components/Checkbox/index.d.ts.map +1 -0
  47. package/lib/components/Icon/Icon.d.ts +37 -0
  48. package/lib/components/Icon/Icon.d.ts.map +1 -0
  49. package/lib/components/Icon/Icon.jsx +143 -0
  50. package/lib/components/Icon/index.d.ts +2 -0
  51. package/lib/components/Icon/index.d.ts.map +1 -0
  52. package/lib/components/ProgressCircle/ProgressCircle.d.ts +25 -0
  53. package/lib/components/ProgressCircle/ProgressCircle.d.ts.map +1 -0
  54. package/lib/components/ProgressCircle/ProgressCircle.jsx +281 -0
  55. package/lib/components/ProgressCircle/ProgressCircle.namespace.d.ts +2 -0
  56. package/lib/components/ProgressCircle/ProgressCircle.namespace.d.ts.map +1 -0
  57. package/lib/components/ProgressCircle/ProgressCircle.namespace.js +9 -0
  58. package/lib/components/ProgressCircle/index.d.ts +3 -0
  59. package/lib/components/ProgressCircle/index.d.ts.map +1 -0
  60. package/lib/components/RadioGroup/RadioGroup.d.ts +34 -0
  61. package/lib/components/RadioGroup/RadioGroup.d.ts.map +1 -0
  62. package/lib/components/RadioGroup/RadioGroup.jsx +160 -0
  63. package/lib/components/RadioGroup/RadioGroup.namespace.d.ts +2 -0
  64. package/lib/components/RadioGroup/RadioGroup.namespace.d.ts.map +1 -0
  65. package/lib/components/RadioGroup/RadioGroup.namespace.js +12 -0
  66. package/lib/components/RadioGroup/index.d.ts +3 -0
  67. package/lib/components/RadioGroup/index.d.ts.map +1 -0
  68. package/lib/components/Stack/Stack.d.ts +33 -0
  69. package/lib/components/Stack/Stack.d.ts.map +1 -0
  70. package/lib/components/Stack/Stack.jsx +39 -0
  71. package/lib/components/Stack/index.d.ts +2 -0
  72. package/lib/components/Stack/index.d.ts.map +1 -0
  73. package/lib/components/Switch/Switch.d.ts +21 -0
  74. package/lib/components/Switch/Switch.d.ts.map +1 -0
  75. package/lib/components/Switch/Switch.jsx +101 -0
  76. package/lib/components/Switch/Switch.namespace.d.ts +2 -0
  77. package/lib/components/Switch/Switch.namespace.d.ts.map +1 -0
  78. package/lib/components/Switch/Switch.namespace.js +11 -0
  79. package/lib/components/Switch/index.d.ts +3 -0
  80. package/lib/components/Switch/index.d.ts.map +1 -0
  81. package/lib/components/TagGroup/TagGroup.d.ts +34 -0
  82. package/lib/components/TagGroup/TagGroup.d.ts.map +1 -0
  83. package/lib/components/TagGroup/TagGroup.jsx +57 -0
  84. package/lib/components/TagGroup/TagGroup.namespace.d.ts +2 -0
  85. package/lib/components/TagGroup/TagGroup.namespace.d.ts.map +1 -0
  86. package/lib/components/TagGroup/TagGroup.namespace.js +10 -0
  87. package/lib/components/TagGroup/index.d.ts +3 -0
  88. package/lib/components/TagGroup/index.d.ts.map +1 -0
  89. package/lib/components/Text/Text.d.ts +7 -0
  90. package/lib/components/Text/Text.d.ts.map +1 -0
  91. package/lib/components/Text/Text.jsx +28 -0
  92. package/lib/components/Text/index.d.ts +2 -0
  93. package/lib/components/Text/index.d.ts.map +1 -0
  94. package/lib/components/index.d.ts +14 -0
  95. package/lib/components/index.d.ts.map +1 -0
  96. package/lib/hooks/index.d.ts +5 -0
  97. package/lib/hooks/index.d.ts.map +1 -0
  98. package/lib/hooks/useControllableState.d.ts +15 -0
  99. package/lib/hooks/useControllableState.d.ts.map +1 -0
  100. package/lib/hooks/useControllableState.js +27 -0
  101. package/lib/hooks/useIconColor.d.ts +19 -0
  102. package/lib/hooks/useIconColor.d.ts.map +1 -0
  103. package/lib/hooks/useIconColor.js +38 -0
  104. package/lib/hooks/usePressTap.d.ts +27 -0
  105. package/lib/hooks/usePressTap.d.ts.map +1 -0
  106. package/lib/hooks/usePressTap.js +35 -0
  107. package/lib/hooks/useSafeArea.d.ts +19 -0
  108. package/lib/hooks/useSafeArea.d.ts.map +1 -0
  109. package/lib/hooks/useSafeArea.js +33 -0
  110. package/lib/index.d.ts +5 -0
  111. package/lib/index.d.ts.map +1 -0
  112. package/lib/index.js +29 -0
  113. package/lib/types.d.ts +51 -0
  114. package/lib/types.d.ts.map +1 -0
  115. package/lib/utils/children.d.ts +3 -0
  116. package/lib/utils/children.d.ts.map +1 -0
  117. package/lib/utils/children.js +8 -0
  118. package/lib/utils/create-slot-recipe-context.d.ts +27 -0
  119. package/lib/utils/create-slot-recipe-context.d.ts.map +1 -0
  120. package/lib/utils/create-slot-recipe-context.jsx +94 -0
  121. package/lib/utils/get-seed-class-name.d.ts +22 -0
  122. package/lib/utils/get-seed-class-name.d.ts.map +1 -0
  123. package/lib/utils/get-seed-class-name.js +28 -0
  124. package/lib/utils/index.d.ts +5 -0
  125. package/lib/utils/index.d.ts.map +1 -0
  126. package/lib/utils/resolve-recipe-token.d.ts +38 -0
  127. package/lib/utils/resolve-recipe-token.d.ts.map +1 -0
  128. package/lib/utils/resolve-recipe-token.js +49 -0
  129. package/lib/utils/split-multiple-variants-props.d.ts +29 -0
  130. package/lib/utils/split-multiple-variants-props.d.ts.map +1 -0
  131. package/lib/utils/split-multiple-variants-props.js +34 -0
  132. package/lib/utils/styled.d.ts +83 -0
  133. package/lib/utils/styled.d.ts.map +1 -0
  134. package/lib/utils/styled.js +144 -0
  135. package/package.json +54 -0
  136. package/src/components/ActionButton/ActionButton.test.tsx +167 -0
  137. package/src/components/ActionButton/ActionButton.tsx +363 -0
  138. package/src/components/ActionButton/index.ts +1 -0
  139. package/src/components/AppBar/AppBar.namespace.ts +18 -0
  140. package/src/components/AppBar/AppBar.test.tsx +270 -0
  141. package/src/components/AppBar/AppBar.tsx +288 -0
  142. package/src/components/AppBar/context.ts +27 -0
  143. package/src/components/AppBar/index.ts +21 -0
  144. package/src/components/AppBar/useAppBar.ts +100 -0
  145. package/src/components/Badge/Badge.test.tsx +54 -0
  146. package/src/components/Badge/Badge.tsx +32 -0
  147. package/src/components/Badge/index.ts +1 -0
  148. package/src/components/BottomSheet/BottomSheet.namespace.ts +24 -0
  149. package/src/components/BottomSheet/BottomSheet.test.tsx +219 -0
  150. package/src/components/BottomSheet/BottomSheet.tsx +423 -0
  151. package/src/components/BottomSheet/index.ts +27 -0
  152. package/src/components/Box/Box.test.tsx +85 -0
  153. package/src/components/Box/Box.tsx +39 -0
  154. package/src/components/Box/index.ts +1 -0
  155. package/src/components/Checkbox/Checkbox.namespace.ts +12 -0
  156. package/src/components/Checkbox/Checkbox.tsx +282 -0
  157. package/src/components/Checkbox/index.ts +14 -0
  158. package/src/components/Icon/Icon.tsx +265 -0
  159. package/src/components/Icon/index.ts +8 -0
  160. package/src/components/ProgressCircle/ProgressCircle.namespace.ts +5 -0
  161. package/src/components/ProgressCircle/ProgressCircle.tsx +424 -0
  162. package/src/components/ProgressCircle/index.ts +9 -0
  163. package/src/components/RadioGroup/RadioGroup.namespace.ts +12 -0
  164. package/src/components/RadioGroup/RadioGroup.tsx +320 -0
  165. package/src/components/RadioGroup/index.ts +14 -0
  166. package/src/components/Stack/Stack.tsx +97 -0
  167. package/src/components/Stack/index.ts +1 -0
  168. package/src/components/Switch/Switch.namespace.ts +10 -0
  169. package/src/components/Switch/Switch.tsx +200 -0
  170. package/src/components/Switch/index.ts +12 -0
  171. package/src/components/TagGroup/TagGroup.namespace.ts +8 -0
  172. package/src/components/TagGroup/TagGroup.tsx +127 -0
  173. package/src/components/TagGroup/index.ts +10 -0
  174. package/src/components/Text/Text.tsx +64 -0
  175. package/src/components/Text/index.ts +1 -0
  176. package/src/components/index.ts +13 -0
  177. package/src/hooks/index.ts +4 -0
  178. package/src/hooks/useControllableState.test.ts +120 -0
  179. package/src/hooks/useControllableState.ts +38 -0
  180. package/src/hooks/useIconColor.test.ts +13 -0
  181. package/src/hooks/useIconColor.ts +67 -0
  182. package/src/hooks/usePressTap.test.ts +129 -0
  183. package/src/hooks/usePressTap.ts +58 -0
  184. package/src/hooks/useSafeArea.test.ts +83 -0
  185. package/src/hooks/useSafeArea.ts +56 -0
  186. package/src/index.ts +4 -0
  187. package/src/types.ts +76 -0
  188. package/src/utils/children.ts +13 -0
  189. package/src/utils/create-slot-recipe-context.test.tsx +96 -0
  190. package/src/utils/create-slot-recipe-context.tsx +187 -0
  191. package/src/utils/get-seed-class-name.ts +47 -0
  192. package/src/utils/index.ts +4 -0
  193. package/src/utils/resolve-recipe-token.ts +47 -0
  194. package/src/utils/split-multiple-variants-props.test.ts +61 -0
  195. package/src/utils/split-multiple-variants-props.ts +59 -0
  196. package/src/utils/styled.ts +442 -0
@@ -0,0 +1,160 @@
1
+ import { usePressTap } from "../../hooks/usePressTap.js";
2
+ import { InternalIcon } from "../Icon/Icon.jsx";
3
+ import { useControllableState } from "../../hooks/useControllableState.js";
4
+ import { splitMultipleVariantsProps } from "../../utils/split-multiple-variants-props.js";
5
+ import clsx from "clsx";
6
+ import * as React from "@lynx-js/react";
7
+ import { isValidElement } from "@lynx-js/react";
8
+ import { radio } from "@seed-design/lynx-css/recipes/radio";
9
+ import { radiomark } from "@seed-design/lynx-css/recipes/radiomark";
10
+ import { radioGroup } from "@seed-design/lynx-css/recipes/radio-group";
11
+ //#region src/components/RadioGroup/RadioGroup.tsx
12
+ var RadioGroupContext = React.createContext(null);
13
+ function useRadioGroupContext(consumer) {
14
+ const ctx = React.useContext(RadioGroupContext);
15
+ if (!ctx) throw new Error(`<${consumer}/> must be rendered inside <RadioGroupRoot/>.`);
16
+ return ctx;
17
+ }
18
+ var RadioGroupItemContext = React.createContext(null);
19
+ function useRadioGroupItemContext(consumer) {
20
+ const ctx = React.useContext(RadioGroupItemContext);
21
+ if (!ctx) throw new Error(`<${consumer}/> must be rendered inside <RadioGroupItem/>.`);
22
+ return ctx;
23
+ }
24
+ var RadiomarkControlContext = React.createContext(null);
25
+ function useRadiomarkControlContext(consumer) {
26
+ const ctx = React.useContext(RadiomarkControlContext);
27
+ if (!ctx) throw new Error(`<${consumer}/> must be rendered inside <RadioGroupItemControl/>.`);
28
+ return ctx;
29
+ }
30
+ var RadioGroupRoot = React.forwardRef((props, ref) => {
31
+ const { children, className, value: valueProp, defaultValue, disabled = false, onValueChange, ...restProps } = props;
32
+ const [{ radio: radioVariantProps, radiomark: radiomarkVariantProps }, nativeProps] = splitMultipleVariantsProps(restProps, {
33
+ radio,
34
+ radiomark
35
+ });
36
+ const handleChange = React.useCallback((next) => {
37
+ if (next !== null) onValueChange?.(next);
38
+ }, [onValueChange]);
39
+ const [value, setValueInternal] = useControllableState({
40
+ value: valueProp !== void 0 ? valueProp : void 0,
41
+ defaultValue: defaultValue ?? null,
42
+ onChange: handleChange
43
+ });
44
+ const setValue = React.useCallback((next) => {
45
+ setValueInternal(next);
46
+ }, [setValueInternal]);
47
+ const rootClassName = radioGroup().root;
48
+ const contextValue = React.useMemo(() => ({
49
+ value,
50
+ setValue,
51
+ disabled,
52
+ radioVariantProps,
53
+ radiomarkVariantProps
54
+ }), [
55
+ value,
56
+ setValue,
57
+ disabled,
58
+ radioVariantProps,
59
+ radiomarkVariantProps
60
+ ]);
61
+ return <RadioGroupContext.Provider value={contextValue}>
62
+ <view {...ref ? { ref } : {}} className={clsx(rootClassName, className)} {...nativeProps}>
63
+ {children}
64
+ </view>
65
+ </RadioGroupContext.Provider>;
66
+ });
67
+ RadioGroupRoot.displayName = "RadioGroupRoot";
68
+ var RadioGroupItem = React.forwardRef((props, ref) => {
69
+ const { value: itemValue, disabled: itemDisabled = false, children, className, ...nativeProps } = props;
70
+ const groupContext = useRadioGroupContext("RadioGroupItem");
71
+ const disabled = groupContext.disabled || itemDisabled;
72
+ const checked = groupContext.value === itemValue;
73
+ const select = React.useCallback(() => {
74
+ if (checked) return;
75
+ groupContext.setValue(itemValue);
76
+ }, [
77
+ checked,
78
+ groupContext,
79
+ itemValue
80
+ ]);
81
+ const { pressed, ...pressHandlers } = usePressTap({
82
+ disabled,
83
+ onTap: select
84
+ });
85
+ const rootClassName = radio({
86
+ ...groupContext.radioVariantProps,
87
+ disabled
88
+ }).root;
89
+ const itemContextValue = React.useMemo(() => ({
90
+ value: itemValue,
91
+ checked,
92
+ disabled,
93
+ pressed,
94
+ select
95
+ }), [
96
+ itemValue,
97
+ checked,
98
+ disabled,
99
+ pressed,
100
+ select
101
+ ]);
102
+ return <RadioGroupItemContext.Provider value={itemContextValue}>
103
+ <view {...ref ? { ref } : {}} className={clsx(rootClassName, className)} {...pressHandlers} {...nativeProps}>
104
+ {children}
105
+ </view>
106
+ </RadioGroupItemContext.Provider>;
107
+ });
108
+ RadioGroupItem.displayName = "RadioGroupItem";
109
+ var RadioGroupItemControl = React.forwardRef((props, ref) => {
110
+ const [variantProps, restProps] = radiomark.splitVariantProps(props);
111
+ const { children, className, ...nativeProps } = restProps;
112
+ const groupContext = useRadioGroupContext("RadioGroupItemControl");
113
+ const itemContext = useRadioGroupItemContext("RadioGroupItemControl");
114
+ const radiomarkVariantProps = {
115
+ ...groupContext.radiomarkVariantProps,
116
+ ...variantProps,
117
+ checked: itemContext.checked,
118
+ disabled: itemContext.disabled,
119
+ pressed: itemContext.pressed
120
+ };
121
+ const classes = radiomark(radiomarkVariantProps);
122
+ return <RadiomarkControlContext.Provider value={{
123
+ iconClassName: classes.icon,
124
+ radiomarkVariantProps
125
+ }}>
126
+ <view {...ref ? { ref } : {}} className={clsx(classes.root, className)} {...nativeProps}>
127
+ {children}
128
+ </view>
129
+ </RadiomarkControlContext.Provider>;
130
+ });
131
+ RadioGroupItemControl.displayName = "RadioGroupItemControl";
132
+ function RadioGroupItemIndicator(props) {
133
+ const { unchecked, checked: checkedIcon, className, style } = props;
134
+ const itemContext = useRadioGroupItemContext("RadioGroupItemIndicator");
135
+ const { iconClassName, radiomarkVariantProps } = useRadiomarkControlContext("RadioGroupItemIndicator");
136
+ const icon = itemContext.checked ? checkedIcon : unchecked;
137
+ if (!icon || !isValidElement(icon)) return <view className={clsx(iconClassName, className)} style={style} />;
138
+ return <InternalIcon icon={icon} className={clsx(iconClassName, className)} style={style} deps={[
139
+ itemContext.checked,
140
+ itemContext.disabled,
141
+ itemContext.pressed,
142
+ radiomarkVariantProps.tone,
143
+ radiomarkVariantProps.size
144
+ ]} />;
145
+ }
146
+ RadioGroupItemIndicator.displayName = "RadioGroupItemIndicator";
147
+ var RadioGroupItemLabel = React.forwardRef((props, ref) => {
148
+ const { children, className, ...nativeProps } = props;
149
+ const itemContext = useRadioGroupItemContext("RadioGroupItemLabel");
150
+ const labelClassName = radio({
151
+ ...useRadioGroupContext("RadioGroupItemLabel").radioVariantProps,
152
+ disabled: itemContext.disabled
153
+ }).label;
154
+ return <text {...ref ? { ref } : {}} className={clsx(labelClassName, className)} {...nativeProps}>
155
+ {children}
156
+ </text>;
157
+ });
158
+ RadioGroupItemLabel.displayName = "RadioGroupItemLabel";
159
+ //#endregion
160
+ export { RadioGroupItem, RadioGroupItemControl, RadioGroupItemIndicator, RadioGroupItemLabel, RadioGroupRoot };
@@ -0,0 +1,2 @@
1
+ export { RadioGroupItem as Item, RadioGroupItemControl as ItemControl, RadioGroupItemIndicator as ItemIndicator, RadioGroupItemLabel as ItemLabel, RadioGroupRoot as Root, type RadioGroupItemControlProps as ItemControlProps, type RadioGroupItemIndicatorProps as ItemIndicatorProps, type RadioGroupItemLabelProps as ItemLabelProps, type RadioGroupItemProps as ItemProps, type RadioGroupRootProps as RootProps, } from './RadioGroup';
2
+ //# sourceMappingURL=RadioGroup.namespace.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RadioGroup.namespace.d.ts","sourceRoot":"","sources":["../../../src/components/RadioGroup/RadioGroup.namespace.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,IAAI,IAAI,EACtB,qBAAqB,IAAI,WAAW,EACpC,uBAAuB,IAAI,aAAa,EACxC,mBAAmB,IAAI,SAAS,EAChC,cAAc,IAAI,IAAI,EACtB,KAAK,0BAA0B,IAAI,gBAAgB,EACnD,KAAK,4BAA4B,IAAI,kBAAkB,EACvD,KAAK,wBAAwB,IAAI,cAAc,EAC/C,KAAK,mBAAmB,IAAI,SAAS,EACrC,KAAK,mBAAmB,IAAI,SAAS,GACtC,MAAM,cAAc,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { __exportAll } from "../../_virtual/_rolldown/runtime.js";
2
+ import { RadioGroupItem, RadioGroupItemControl, RadioGroupItemIndicator, RadioGroupItemLabel, RadioGroupRoot } from "./RadioGroup.jsx";
3
+ //#region src/components/RadioGroup/RadioGroup.namespace.ts
4
+ var RadioGroup_namespace_exports = /* @__PURE__ */ __exportAll({
5
+ Item: () => RadioGroupItem,
6
+ ItemControl: () => RadioGroupItemControl,
7
+ ItemIndicator: () => RadioGroupItemIndicator,
8
+ ItemLabel: () => RadioGroupItemLabel,
9
+ Root: () => RadioGroupRoot
10
+ });
11
+ //#endregion
12
+ export { RadioGroup_namespace_exports };
@@ -0,0 +1,3 @@
1
+ export { RadioGroupRoot, RadioGroupItem, RadioGroupItemControl, RadioGroupItemIndicator, RadioGroupItemLabel, type RadioGroupRootProps, type RadioGroupItemProps, type RadioGroupItemControlProps, type RadioGroupItemIndicatorProps, type RadioGroupItemLabelProps, } from './RadioGroup';
2
+ export * as RadioGroup from './RadioGroup.namespace';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/RadioGroup/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,cAAc,EACd,qBAAqB,EACrB,uBAAuB,EACvB,mBAAmB,EACnB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,EAC/B,KAAK,4BAA4B,EACjC,KAAK,wBAAwB,GAC9B,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1,33 @@
1
+ import { LynxPressableProps, LynxStyledElementProps } from '../../types';
2
+ import { StyleProps } from '../../utils/styled';
3
+ import * as React from "@lynx-js/react";
4
+ type StackStyleProps = "display" | "flexDirection" | "alignItems" | "justifyContent" | "flexWrap" | "flexGrow" | "flexShrink";
5
+ interface StackBaseProps extends StyleProps, LynxStyledElementProps, LynxPressableProps {
6
+ bindtouchstart?: () => void;
7
+ bindtouchend?: () => void;
8
+ bindtouchcancel?: () => void;
9
+ }
10
+ /**
11
+ * @platform Lynx
12
+ *
13
+ * `VStack`과 `HStack`은 native `<view>`를 직접 렌더링하고 stack 방향에 필요한
14
+ * 최소 flex style만 적용합니다. 앱 코드에서 성능에 민감한 반복 레이아웃을 만들
15
+ * 때는 native `<view>`/`<text>`와 Tailwind utility className을 우선 고려하세요.
16
+ * 패키지 컴포넌트 내부에서는 `Box`를 합성하지 않고 native tag와 recipe className을
17
+ * 사용해 primitive 컴포넌트 비용이 누적되지 않도록 합니다.
18
+ */
19
+ export interface StackProps extends Omit<StackBaseProps, StackStyleProps> {
20
+ align?: StackBaseProps["alignItems"];
21
+ justify?: StackBaseProps["justifyContent"];
22
+ wrap?: StackBaseProps["flexWrap"];
23
+ grow?: StackBaseProps["flexGrow"];
24
+ shrink?: StackBaseProps["flexShrink"];
25
+ }
26
+ export interface VStackProps extends StackProps {
27
+ }
28
+ export interface HStackProps extends StackProps {
29
+ }
30
+ export declare const VStack: React.ForwardRefExoticComponent<VStackProps & React.RefAttributes<unknown>>;
31
+ export declare const HStack: React.ForwardRefExoticComponent<HStackProps & React.RefAttributes<unknown>>;
32
+ export {};
33
+ //# sourceMappingURL=Stack.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Stack.d.ts","sourceRoot":"","sources":["../../../src/components/Stack/Stack.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC;AAExC,OAAO,KAAK,EAAE,kBAAkB,EAAE,sBAAsB,EAAe,MAAM,aAAa,CAAC;AAC3F,OAAO,EAAiB,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEpE,KAAK,eAAe,GAChB,SAAS,GACT,eAAe,GACf,YAAY,GACZ,gBAAgB,GAChB,UAAU,GACV,UAAU,GACV,YAAY,CAAC;AAEjB,UAAU,cAAe,SAAQ,UAAU,EAAE,sBAAsB,EAAE,kBAAkB;IACrF,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;CAC9B;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,cAAc,EAAE,eAAe,CAAC;IACvE,KAAK,CAAC,EAAE,cAAc,CAAC,YAAY,CAAC,CAAC;IACrC,OAAO,CAAC,EAAE,cAAc,CAAC,gBAAgB,CAAC,CAAC;IAC3C,IAAI,CAAC,EAAE,cAAc,CAAC,UAAU,CAAC,CAAC;IAClC,IAAI,CAAC,EAAE,cAAc,CAAC,UAAU,CAAC,CAAC;IAClC,MAAM,CAAC,EAAE,cAAc,CAAC,YAAY,CAAC,CAAC;CACvC;AAED,MAAM,WAAW,WAAY,SAAQ,UAAU;CAAG;AAElD,MAAM,WAAW,WAAY,SAAQ,UAAU;CAAG;AA0ClD,eAAO,MAAM,MAAM,6EAIjB,CAAC;AAIH,eAAO,MAAM,MAAM,6EAIjB,CAAC"}
@@ -0,0 +1,39 @@
1
+ import { useStyleProps } from "../../utils/styled.js";
2
+ import clsx from "clsx";
3
+ import * as React from "@lynx-js/react";
4
+ //#region src/components/Stack/Stack.tsx
5
+ function getStackProps(props) {
6
+ const { align, justify, wrap, grow, shrink, ...restProps } = props;
7
+ return {
8
+ alignItems: align,
9
+ justifyContent: justify,
10
+ flexWrap: wrap,
11
+ flexGrow: grow,
12
+ flexShrink: shrink,
13
+ ...restProps
14
+ };
15
+ }
16
+ function useStackStyleProps(props, flexDirection) {
17
+ return useStyleProps({
18
+ display: "flex",
19
+ flexDirection,
20
+ ...getStackProps(props)
21
+ });
22
+ }
23
+ function renderStackView(stackStyleProps, ref) {
24
+ const { style, restProps } = stackStyleProps;
25
+ const { children, className, ...nativeProps } = restProps;
26
+ return <view {...ref ? { ref } : {}} {...nativeProps} className={clsx(className)} style={style}>
27
+ {children}
28
+ </view>;
29
+ }
30
+ var VStack = React.forwardRef((props, ref) => {
31
+ return renderStackView(useStackStyleProps(props, "column"), ref);
32
+ });
33
+ VStack.displayName = "VStack";
34
+ var HStack = React.forwardRef((props, ref) => {
35
+ return renderStackView(useStackStyleProps(props, "row"), ref);
36
+ });
37
+ HStack.displayName = "HStack";
38
+ //#endregion
39
+ export { HStack, VStack };
@@ -0,0 +1,2 @@
1
+ export { HStack, type HStackProps, type StackProps, VStack, type VStackProps } from './Stack';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Stack/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { SwitchVariantProps } from '@seed-design/lynx-css/recipes/switch';
2
+ import { SwitchmarkVariantProps } from '@seed-design/lynx-css/recipes/switchmark';
3
+ import { LynxStyledElementProps } from '../../types';
4
+ import * as React from "@lynx-js/react";
5
+ export interface SwitchRootProps extends SwitchVariantProps, Omit<SwitchmarkVariantProps, "size">, LynxStyledElementProps {
6
+ checked?: boolean;
7
+ defaultChecked?: boolean;
8
+ disabled?: boolean;
9
+ onCheckedChange?: (checked: boolean) => void;
10
+ }
11
+ export declare const SwitchRoot: React.ForwardRefExoticComponent<SwitchRootProps & React.RefAttributes<unknown>>;
12
+ export interface SwitchControlProps extends Pick<SwitchmarkVariantProps, "tone" | "size">, LynxStyledElementProps {
13
+ }
14
+ export declare const SwitchControl: React.ForwardRefExoticComponent<SwitchControlProps & React.RefAttributes<unknown>>;
15
+ export interface SwitchThumbProps extends Pick<LynxStyledElementProps, "className" | "style"> {
16
+ }
17
+ export declare const SwitchThumb: React.ForwardRefExoticComponent<SwitchThumbProps & React.RefAttributes<unknown>>;
18
+ export interface SwitchLabelProps extends LynxStyledElementProps {
19
+ }
20
+ export declare const SwitchLabel: React.ForwardRefExoticComponent<SwitchLabelProps & React.RefAttributes<unknown>>;
21
+ //# sourceMappingURL=Switch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../../src/components/Switch/Switch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC;AAIxC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAE/E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0CAA0C,CAAC;AAKvF,OAAO,KAAK,EAAE,sBAAsB,EAA4B,MAAM,aAAa,CAAC;AAkDpF,MAAM,WAAW,eACf,SAAQ,kBAAkB,EACxB,IAAI,CAAC,sBAAsB,EAAE,MAAM,CAAC,EACpC,sBAAsB;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CAC9C;AAED,eAAO,MAAM,UAAU,iFAmDrB,CAAC;AAKH,MAAM,WAAW,kBACf,SAAQ,IAAI,CAAC,sBAAsB,EAAE,MAAM,GAAG,MAAM,CAAC,EACnD,sBAAsB;CAAG;AAE7B,eAAO,MAAM,aAAa,oFAyBxB,CAAC;AAKH,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,sBAAsB,EAAE,WAAW,GAAG,OAAO,CAAC;CAAG;AAEhG,eAAO,MAAM,WAAW,kFAWtB,CAAC;AAKH,MAAM,WAAW,gBAAiB,SAAQ,sBAAsB;CAAG;AAEnE,eAAO,MAAM,WAAW,kFAiBtB,CAAC"}
@@ -0,0 +1,101 @@
1
+ import { usePressTap } from "../../hooks/usePressTap.js";
2
+ import { useControllableState } from "../../hooks/useControllableState.js";
3
+ import { splitMultipleVariantsProps } from "../../utils/split-multiple-variants-props.js";
4
+ import clsx from "clsx";
5
+ import * as React from "@lynx-js/react";
6
+ import { switchStyle } from "@seed-design/lynx-css/recipes/switch";
7
+ import { switchmark } from "@seed-design/lynx-css/recipes/switchmark";
8
+ //#region src/components/Switch/Switch.tsx
9
+ var SwitchContext = React.createContext(null);
10
+ function useSwitchContext(consumer) {
11
+ const ctx = React.useContext(SwitchContext);
12
+ if (!ctx) throw new Error(`<${consumer}/> must be rendered inside <SwitchRoot/>.`);
13
+ return ctx;
14
+ }
15
+ var SwitchmarkControlContext = React.createContext(null);
16
+ function useSwitchmarkControlContext(consumer) {
17
+ const ctx = React.useContext(SwitchmarkControlContext);
18
+ if (!ctx) throw new Error(`<${consumer}/> must be rendered inside <SwitchControl/>.`);
19
+ return ctx;
20
+ }
21
+ var SwitchRoot = React.forwardRef((props, ref) => {
22
+ const { children, className, checked: checkedProp, defaultChecked = false, disabled = false, onCheckedChange, ...restProps } = props;
23
+ const [{ switch: switchVariantProps, switchmark: switchmarkVariantProps }, nativeProps] = splitMultipleVariantsProps(restProps, {
24
+ switch: switchStyle,
25
+ switchmark
26
+ });
27
+ const [checked, setChecked] = useControllableState({
28
+ value: checkedProp,
29
+ defaultValue: defaultChecked,
30
+ onChange: onCheckedChange
31
+ });
32
+ const toggle = React.useCallback(() => setChecked(!checked), [checked, setChecked]);
33
+ const { pressed: _pressed, ...pressHandlers } = usePressTap({
34
+ disabled,
35
+ onTap: toggle
36
+ });
37
+ const rootClassName = switchStyle({
38
+ ...switchVariantProps,
39
+ disabled
40
+ }).root;
41
+ const contextValue = React.useMemo(() => ({
42
+ checked,
43
+ disabled,
44
+ switchVariantProps,
45
+ switchmarkVariantProps,
46
+ toggle
47
+ }), [
48
+ checked,
49
+ disabled,
50
+ switchVariantProps,
51
+ switchmarkVariantProps,
52
+ toggle
53
+ ]);
54
+ return <SwitchContext.Provider value={contextValue}>
55
+ <view {...ref ? { ref } : {}} className={clsx(rootClassName, className)} {...pressHandlers} {...nativeProps}>
56
+ {children}
57
+ </view>
58
+ </SwitchContext.Provider>;
59
+ });
60
+ SwitchRoot.displayName = "SwitchRoot";
61
+ var SwitchControl = React.forwardRef((props, ref) => {
62
+ const [variantProps, restProps] = switchmark.splitVariantProps(props);
63
+ const { children, className, ...nativeProps } = restProps;
64
+ const context = useSwitchContext("SwitchControl");
65
+ const switchmarkVariantProps = {
66
+ ...context.switchmarkVariantProps,
67
+ ...variantProps,
68
+ checked: context.checked,
69
+ disabled: context.disabled
70
+ };
71
+ const classes = switchmark(switchmarkVariantProps);
72
+ return <SwitchmarkControlContext.Provider value={{
73
+ thumbClassName: classes.thumb,
74
+ switchmarkVariantProps
75
+ }}>
76
+ <view {...ref ? { ref } : {}} className={clsx(classes.root, className)} {...nativeProps}>
77
+ {children}
78
+ </view>
79
+ </SwitchmarkControlContext.Provider>;
80
+ });
81
+ SwitchControl.displayName = "SwitchControl";
82
+ var SwitchThumb = React.forwardRef((props, ref) => {
83
+ const { className, ...nativeProps } = props;
84
+ const { thumbClassName } = useSwitchmarkControlContext("SwitchThumb");
85
+ return <view {...ref ? { ref } : {}} className={clsx(thumbClassName, className)} {...nativeProps} />;
86
+ });
87
+ SwitchThumb.displayName = "SwitchThumb";
88
+ var SwitchLabel = React.forwardRef((props, ref) => {
89
+ const { children, className, ...nativeProps } = props;
90
+ const context = useSwitchContext("SwitchLabel");
91
+ const labelClassName = switchStyle({
92
+ ...context.switchVariantProps,
93
+ disabled: context.disabled
94
+ }).label;
95
+ return <text {...ref ? { ref } : {}} className={clsx(labelClassName, className)} {...nativeProps}>
96
+ {children}
97
+ </text>;
98
+ });
99
+ SwitchLabel.displayName = "SwitchLabel";
100
+ //#endregion
101
+ export { SwitchControl, SwitchLabel, SwitchRoot, SwitchThumb };
@@ -0,0 +1,2 @@
1
+ export { SwitchControl as Control, SwitchLabel as Label, SwitchRoot as Root, SwitchThumb as Thumb, type SwitchControlProps as ControlProps, type SwitchLabelProps as LabelProps, type SwitchRootProps as RootProps, type SwitchThumbProps as ThumbProps, } from './Switch';
2
+ //# sourceMappingURL=Switch.namespace.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Switch.namespace.d.ts","sourceRoot":"","sources":["../../../src/components/Switch/Switch.namespace.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,IAAI,OAAO,EACxB,WAAW,IAAI,KAAK,EACpB,UAAU,IAAI,IAAI,EAClB,WAAW,IAAI,KAAK,EACpB,KAAK,kBAAkB,IAAI,YAAY,EACvC,KAAK,gBAAgB,IAAI,UAAU,EACnC,KAAK,eAAe,IAAI,SAAS,EACjC,KAAK,gBAAgB,IAAI,UAAU,GACpC,MAAM,UAAU,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { __exportAll } from "../../_virtual/_rolldown/runtime.js";
2
+ import { SwitchControl, SwitchLabel, SwitchRoot, SwitchThumb } from "./Switch.jsx";
3
+ //#region src/components/Switch/Switch.namespace.ts
4
+ var Switch_namespace_exports = /* @__PURE__ */ __exportAll({
5
+ Control: () => SwitchControl,
6
+ Label: () => SwitchLabel,
7
+ Root: () => SwitchRoot,
8
+ Thumb: () => SwitchThumb
9
+ });
10
+ //#endregion
11
+ export { Switch_namespace_exports };
@@ -0,0 +1,3 @@
1
+ export { SwitchRoot, SwitchControl, SwitchThumb, SwitchLabel, type SwitchRootProps, type SwitchControlProps, type SwitchThumbProps, type SwitchLabelProps, } from './Switch';
2
+ export * as Switch from './Switch.namespace';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Switch/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,aAAa,EACb,WAAW,EACX,WAAW,EACX,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,GACtB,MAAM,UAAU,CAAC;AAElB,OAAO,KAAK,MAAM,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,34 @@
1
+ import { TagGroupVariantProps } from '@seed-design/lynx-css/recipes/tag-group';
2
+ import { TagGroupItemVariantProps } from '@seed-design/lynx-css/recipes/tag-group-item';
3
+ import { LynxStyledElementProps } from '../../types';
4
+ import { StyleProps } from '../../utils/styled';
5
+ import * as React from "@lynx-js/react";
6
+ /**
7
+ * @platform Lynx
8
+ *
9
+ * 웹 대비 미지원 기능:
10
+ * - `truncate` prop: Lynx flex 모델에서는 item 단위 wrap만 가능해 웹 수준의
11
+ * "한 줄 유지 + label ellipsis" 조합을 재현할 수 없음
12
+ * - `asChild` prop: Lynx Slot 미지원
13
+ * - 아이콘 slot: Lynx 3.7 SVG 지원 후 검토 (Tier B)
14
+ */
15
+ export interface TagGroupRootProps extends TagGroupVariantProps, TagGroupItemVariantProps, LynxStyledElementProps {
16
+ /**
17
+ * children 사이에 삽입되는 구분자. 기본값 `" · "`.
18
+ */
19
+ separator?: React.ReactNode;
20
+ }
21
+ export declare const TagGroupRoot: React.ForwardRefExoticComponent<TagGroupRootProps & React.RefAttributes<unknown>>;
22
+ /**
23
+ * @platform Lynx
24
+ *
25
+ * 웹 대비 미지원 기능:
26
+ * - `asChild` prop: Lynx Slot 미지원
27
+ */
28
+ export interface TagGroupItemProps extends TagGroupItemVariantProps, Pick<StyleProps, "flexShrink">, LynxStyledElementProps {
29
+ }
30
+ export declare const TagGroupItem: React.ForwardRefExoticComponent<TagGroupItemProps & React.RefAttributes<unknown>>;
31
+ export interface TagGroupItemLabelProps extends LynxStyledElementProps {
32
+ }
33
+ export declare const TagGroupItemLabel: React.ForwardRefExoticComponent<TagGroupItemLabelProps & React.RefAttributes<unknown>>;
34
+ //# sourceMappingURL=TagGroup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TagGroup.d.ts","sourceRoot":"","sources":["../../../src/components/TagGroup/TagGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC;AAExC,OAAO,EAAY,KAAK,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AAC9F,OAAO,EAEL,KAAK,wBAAwB,EAC9B,MAAM,8CAA8C,CAAC;AAEtD,OAAO,KAAK,EAAE,sBAAsB,EAA4B,MAAM,aAAa,CAAC;AAIpF,OAAO,EAAiB,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAOpE;;;;;;;;GAQG;AACH,MAAM,WAAW,iBACf,SAAQ,oBAAoB,EAC1B,wBAAwB,EACxB,sBAAsB;IACxB;;OAEG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC7B;AAED,eAAO,MAAM,YAAY,mFAiCvB,CAAC;AAKH;;;;;GAKG;AACH,MAAM,WAAW,iBACf,SAAQ,wBAAwB,EAC9B,IAAI,CAAC,UAAU,EAAE,YAAY,CAAC,EAC9B,sBAAsB;CAAG;AAE7B,eAAO,MAAM,YAAY,mFAmBvB,CAAC;AAKH,MAAM,WAAW,sBAAuB,SAAQ,sBAAsB;CAAG;AAEzE,eAAO,MAAM,iBAAiB,wFAY5B,CAAC"}
@@ -0,0 +1,57 @@
1
+ import { createSlotRecipeContext } from "../../utils/create-slot-recipe-context.jsx";
2
+ import { toArray } from "../../utils/children.js";
3
+ import { useStyleProps } from "../../utils/styled.js";
4
+ import { splitMultipleVariantsProps } from "../../utils/split-multiple-variants-props.js";
5
+ import clsx from "clsx";
6
+ import * as React from "@lynx-js/react";
7
+ import { tagGroup } from "@seed-design/lynx-css/recipes/tag-group";
8
+ import { tagGroupItem } from "@seed-design/lynx-css/recipes/tag-group-item";
9
+ //#region src/components/TagGroup/TagGroup.tsx
10
+ var { PropsProvider, useProps, ClassNamesProvider, useClassNames } = createSlotRecipeContext(tagGroupItem);
11
+ var TagGroupRoot = React.forwardRef((props, ref) => {
12
+ const [{ tagGroup: tagGroupVariantProps, tagGroupItem: tagGroupItemVariantProps }, otherProps] = splitMultipleVariantsProps(props, {
13
+ tagGroup,
14
+ tagGroupItem
15
+ });
16
+ const { children, className, separator = " · ", ...nativeProps } = otherProps;
17
+ const classes = tagGroup(tagGroupVariantProps);
18
+ const visibleChildren = toArray(children);
19
+ return <PropsProvider value={tagGroupItemVariantProps}>
20
+ <view {...ref ? { ref } : {}} className={clsx(classes.root, className)} {...nativeProps}>
21
+ {visibleChildren.map((child, index) => {
22
+ if (index === 0) return child;
23
+ return <view key={child.key ?? index} className={classes.separatorWrapper}>
24
+ <text className={classes.separator}>{separator}</text>
25
+ {child}
26
+ </view>;
27
+ })}
28
+ </view>
29
+ </PropsProvider>;
30
+ });
31
+ TagGroupRoot.displayName = "TagGroupRoot";
32
+ var TagGroupItem = React.forwardRef((props, ref) => {
33
+ const parentVariantProps = useProps();
34
+ const [localVariantProps, otherProps] = tagGroupItem.splitVariantProps(props);
35
+ const classes = tagGroupItem({
36
+ ...parentVariantProps,
37
+ ...localVariantProps
38
+ });
39
+ const { style, restProps } = useStyleProps(otherProps);
40
+ const { children, className, ...nativeProps } = restProps;
41
+ return <ClassNamesProvider value={classes}>
42
+ <view {...ref ? { ref } : {}} className={clsx(classes.root, className)} style={style} {...nativeProps}>
43
+ {children}
44
+ </view>
45
+ </ClassNamesProvider>;
46
+ });
47
+ TagGroupItem.displayName = "TagGroupItem";
48
+ var TagGroupItemLabel = React.forwardRef((props, ref) => {
49
+ const classes = useClassNames();
50
+ const { children, className, ...nativeProps } = props;
51
+ return <text {...ref ? { ref } : {}} className={clsx(classes.label, className)} {...nativeProps}>
52
+ {children}
53
+ </text>;
54
+ });
55
+ TagGroupItemLabel.displayName = "TagGroupItemLabel";
56
+ //#endregion
57
+ export { TagGroupItem, TagGroupItemLabel, TagGroupRoot };
@@ -0,0 +1,2 @@
1
+ export { TagGroupItem as Item, TagGroupItemLabel as ItemLabel, TagGroupRoot as Root, type TagGroupItemLabelProps as ItemLabelProps, type TagGroupItemProps as ItemProps, type TagGroupRootProps as RootProps, } from './TagGroup';
2
+ //# sourceMappingURL=TagGroup.namespace.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TagGroup.namespace.d.ts","sourceRoot":"","sources":["../../../src/components/TagGroup/TagGroup.namespace.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,IAAI,IAAI,EACpB,iBAAiB,IAAI,SAAS,EAC9B,YAAY,IAAI,IAAI,EACpB,KAAK,sBAAsB,IAAI,cAAc,EAC7C,KAAK,iBAAiB,IAAI,SAAS,EACnC,KAAK,iBAAiB,IAAI,SAAS,GACpC,MAAM,YAAY,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { __exportAll } from "../../_virtual/_rolldown/runtime.js";
2
+ import { TagGroupItem, TagGroupItemLabel, TagGroupRoot } from "./TagGroup.jsx";
3
+ //#region src/components/TagGroup/TagGroup.namespace.ts
4
+ var TagGroup_namespace_exports = /* @__PURE__ */ __exportAll({
5
+ Item: () => TagGroupItem,
6
+ ItemLabel: () => TagGroupItemLabel,
7
+ Root: () => TagGroupRoot
8
+ });
9
+ //#endregion
10
+ export { TagGroup_namespace_exports };
@@ -0,0 +1,3 @@
1
+ export { TagGroupRoot, TagGroupItem, TagGroupItemLabel, type TagGroupRootProps, type TagGroupItemProps, type TagGroupItemLabelProps, } from './TagGroup';
2
+ export * as TagGroup from './TagGroup.namespace';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/TagGroup/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,iBAAiB,EACjB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,GAC5B,MAAM,YAAY,CAAC;AAEpB,OAAO,KAAK,QAAQ,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { TextStyleProps } from '../../utils/styled';
2
+ import { LynxStyledElementProps } from '../../types';
3
+ import * as React from "@lynx-js/react";
4
+ export interface TextProps extends TextStyleProps, LynxStyledElementProps {
5
+ }
6
+ export declare const Text: React.ForwardRefExoticComponent<TextProps & React.RefAttributes<unknown>>;
7
+ //# sourceMappingURL=Text.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../src/components/Text/Text.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC;AAExC,OAAO,EAML,KAAK,cAAc,EACpB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,sBAAsB,EAAe,MAAM,aAAa,CAAC;AAYvE,MAAM,WAAW,SAAU,SAAQ,cAAc,EAAE,sBAAsB;CAAG;AAE5E,eAAO,MAAM,IAAI,2EAkCf,CAAC"}
@@ -0,0 +1,28 @@
1
+ import { handleColor, handleFontSize, handleFontWeight, handleLineHeight } from "../../utils/styled.js";
2
+ import { typography } from "@seed-design/lynx-css/vars/component";
3
+ import clsx from "clsx";
4
+ import * as React from "@lynx-js/react";
5
+ //#region src/components/Text/Text.tsx
6
+ function capitalize(value) {
7
+ return value.charAt(0).toUpperCase() + value.slice(1);
8
+ }
9
+ function getTypographyStyle(textStyle) {
10
+ return typography[`textStyle${capitalize(textStyle ?? "t5Regular")}`].enabled.root;
11
+ }
12
+ var Text = React.forwardRef((props, ref) => {
13
+ const { color, textStyle, fontSize, lineHeight, fontWeight, align, children, className, style, ...nativeProps } = props;
14
+ const typographyStyle = getTypographyStyle(textStyle);
15
+ return <text {...ref ? { ref } : {}} {...nativeProps} className={clsx(className)} style={{
16
+ color: handleColor(color),
17
+ fontSize: handleFontSize(fontSize) ?? typographyStyle.fontSize,
18
+ lineHeight: handleLineHeight(lineHeight ?? fontSize) ?? typographyStyle.lineHeight,
19
+ fontWeight: handleFontWeight(fontWeight) ?? typographyStyle.fontWeight,
20
+ textAlign: align,
21
+ ...style
22
+ }}>
23
+ {children}
24
+ </text>;
25
+ });
26
+ Text.displayName = "Text";
27
+ //#endregion
28
+ export { Text };
@@ -0,0 +1,2 @@
1
+ export { Text, type TextProps } from './Text';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Text/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,QAAQ,CAAC"}
@@ -0,0 +1,14 @@
1
+ export * from './ActionButton';
2
+ export * from './AppBar';
3
+ export * from './Badge';
4
+ export * from './Box';
5
+ export * from './BottomSheet';
6
+ export * from './Checkbox';
7
+ export * from './Icon';
8
+ export * from './ProgressCircle';
9
+ export * from './RadioGroup';
10
+ export * from './Stack';
11
+ export * from './Switch';
12
+ export * from './TagGroup';
13
+ export * from './Text';
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from './useControllableState';
2
+ export * from './useIconColor';
3
+ export * from './usePressTap';
4
+ export * from './useSafeArea';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC"}