@kukkim/react-native-ui 0.1.4 → 0.1.5

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 (46) hide show
  1. package/lib/module/components/card/foldableCard.js +9 -18
  2. package/lib/module/components/card/foldableCard.js.map +1 -1
  3. package/lib/module/components/icon/index.js +3 -2
  4. package/lib/module/components/icon/index.js.map +1 -1
  5. package/lib/module/components/index.js +2 -0
  6. package/lib/module/components/index.js.map +1 -1
  7. package/lib/module/components/select/commonSelect.js +135 -0
  8. package/lib/module/components/select/commonSelect.js.map +1 -0
  9. package/lib/module/components/select/index.js +5 -0
  10. package/lib/module/components/select/index.js.map +1 -0
  11. package/lib/module/components/select/types.js +4 -0
  12. package/lib/module/components/select/types.js.map +1 -0
  13. package/lib/module/components/slider/index.js +103 -1
  14. package/lib/module/components/slider/index.js.map +1 -1
  15. package/lib/module/components/slider/types.js +2 -0
  16. package/lib/module/index.js +1 -1
  17. package/lib/module/index.js.map +1 -1
  18. package/lib/typescript/src/components/card/foldableCard.d.ts.map +1 -1
  19. package/lib/typescript/src/components/icon/index.d.ts.map +1 -1
  20. package/lib/typescript/src/components/icon/types.d.ts +1 -1
  21. package/lib/typescript/src/components/icon/types.d.ts.map +1 -1
  22. package/lib/typescript/src/components/index.d.ts +2 -0
  23. package/lib/typescript/src/components/index.d.ts.map +1 -1
  24. package/lib/typescript/src/components/select/commonSelect.d.ts +5 -0
  25. package/lib/typescript/src/components/select/commonSelect.d.ts.map +1 -0
  26. package/lib/typescript/src/components/select/index.d.ts +3 -0
  27. package/lib/typescript/src/components/select/index.d.ts.map +1 -0
  28. package/lib/typescript/src/components/select/types.d.ts +16 -0
  29. package/lib/typescript/src/components/select/types.d.ts.map +1 -0
  30. package/lib/typescript/src/components/slider/index.d.ts +2 -0
  31. package/lib/typescript/src/components/slider/index.d.ts.map +1 -1
  32. package/lib/typescript/src/components/slider/types.d.ts +9 -0
  33. package/lib/typescript/src/components/slider/types.d.ts.map +1 -1
  34. package/lib/typescript/src/index.d.ts +1 -1
  35. package/lib/typescript/src/index.d.ts.map +1 -1
  36. package/package.json +3 -1
  37. package/src/components/card/foldableCard.tsx +14 -18
  38. package/src/components/icon/index.tsx +2 -1
  39. package/src/components/icon/types.ts +1 -0
  40. package/src/components/index.ts +2 -0
  41. package/src/components/select/commonSelect.tsx +170 -0
  42. package/src/components/select/index.ts +3 -0
  43. package/src/components/select/types.ts +18 -0
  44. package/src/components/slider/index.tsx +118 -1
  45. package/src/components/slider/types.ts +10 -0
  46. package/src/index.tsx +3 -0
@@ -3,15 +3,11 @@
3
3
  import { StyleSheet, View, Pressable } from 'react-native';
4
4
  import { CommonText } from "../text/index.js";
5
5
  import { useTheme } from "../../hooks/useTheme.js";
6
- // import Animated, {
7
- // FadeIn,
8
- // FadeOut,
9
- // LinearTransition,
10
- // } from 'react-native-reanimated';
6
+ import Animated, { FadeIn, FadeOut, LinearTransition } from 'react-native-reanimated';
11
7
 
12
- //TODO: React-native-reanimated 적용시키기
13
- // const AnimatedPressable = Animated.createAnimatedComponent(Pressable);
8
+ //TODO: Animation이 여전히 부자연스러우니 수정필요.
14
9
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
10
+ const AnimatedPressable = Animated.createAnimatedComponent(Pressable);
15
11
  const FoldableCard = ({
16
12
  children,
17
13
  type = 'primary',
@@ -24,26 +20,21 @@ const FoldableCard = ({
24
20
  } = useTheme();
25
21
  return /*#__PURE__*/_jsxs(View, {
26
22
  style: styles.container,
27
- children: [/*#__PURE__*/_jsx(Pressable
28
- // <AnimatedPressable
29
- , {
23
+ children: [/*#__PURE__*/_jsx(AnimatedPressable, {
30
24
  style: [styles.titleContainer, {
31
25
  backgroundColor: theme.colors[type]
32
26
  }],
33
- onPress: onPress
34
- // layout={LinearTransition.duration(200)}
35
- ,
27
+ onPress: onPress,
28
+ layout: LinearTransition.duration(200),
36
29
  children: /*#__PURE__*/_jsx(CommonText, {
37
30
  style: [styles.titleText, {
38
31
  color: theme.colors.white
39
32
  }],
40
33
  children: title
41
34
  })
42
- }), value && /*#__PURE__*/_jsx(View
43
- // <Animated.View
44
- // entering={FadeIn}
45
- // exiting={FadeOut}
46
- , {
35
+ }), value && /*#__PURE__*/_jsx(Animated.View, {
36
+ entering: FadeIn,
37
+ exiting: FadeOut,
47
38
  style: [styles.contentContainer, {
48
39
  borderColor: theme.colors[type]
49
40
  }],
@@ -1 +1 @@
1
- {"version":3,"names":["StyleSheet","View","Pressable","CommonText","useTheme","jsx","_jsx","jsxs","_jsxs","FoldableCard","children","type","title","value","onPress","theme","style","styles","container","titleContainer","backgroundColor","colors","titleText","color","white","contentContainer","borderColor","create","width","padding","alignSelf","borderRadius","marginLeft","zIndex","fontSize","borderWidth"],"sourceRoot":"../../../../src","sources":["components/card/foldableCard.tsx"],"mappings":";;AAAA,SAASA,UAAU,EAAEC,IAAI,EAAEC,SAAS,QAAQ,cAAc;AAC1D,SAASC,UAAU,QAAQ,kBAAS;AAEpC,SAASC,QAAQ,QAAQ,yBAAsB;AAC/C;AACA;AACA;AACA;AACA;;AAEA;AACA;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AACA,MAAMC,YAAY,GAAGA,CAAC;EACpBC,QAAQ;EACRC,IAAI,GAAG,SAAS;EAChBC,KAAK;EACLC,KAAK;EACLC;AACiB,CAAC,KAAK;EACvB,MAAM;IAAEC;EAAM,CAAC,GAAGX,QAAQ,CAAC,CAAC;EAC5B,oBACEI,KAAA,CAACP,IAAI;IAACe,KAAK,EAAEC,MAAM,CAACC,SAAU;IAAAR,QAAA,gBAC5BJ,IAAA,CAACJ;IACC;IAAA;MACAc,KAAK,EAAE,CACLC,MAAM,CAACE,cAAc,EACrB;QACEC,eAAe,EAAEL,KAAK,CAACM,MAAM,CAACV,IAAI;MACpC,CAAC,CACD;MACFG,OAAO,EAAEA;MACT;MAAA;MAAAJ,QAAA,eAEAJ,IAAA,CAACH,UAAU;QACTa,KAAK,EAAE,CACLC,MAAM,CAACK,SAAS,EAChB;UACEC,KAAK,EAAER,KAAK,CAACM,MAAM,CAACG;QACtB,CAAC,CACD;QAAAd,QAAA,EAEDE;MAAK,CACI;IAAC,CAEJ,CAAC,EACXC,KAAK,iBACJP,IAAA,CAACL;IACC;IACA;IACA;IAAA;MACAe,KAAK,EAAE,CACLC,MAAM,CAACQ,gBAAgB,EACvB;QACEC,WAAW,EAAEX,KAAK,CAACM,MAAM,CAACV,IAAI;MAChC,CAAC,CACD;MAAAD,QAAA,EAEDA;IAAQ,CAEL,CACP;EAAA,CACG,CAAC;AAEX,CAAC;AAED,MAAMO,MAAM,GAAGjB,UAAU,CAAC2B,MAAM,CAAC;EAC/BT,SAAS,EAAE;IACTU,KAAK,EAAE,MAAM;IACbC,OAAO,EAAE;EACX,CAAC;EACDV,cAAc,EAAE;IACdW,SAAS,EAAE,YAAY;IACvBC,YAAY,EAAE,CAAC;IACfC,UAAU,EAAE,CAAC;IACbH,OAAO,EAAE,CAAC;IACVI,MAAM,EAAE;EACV,CAAC;EACDX,SAAS,EAAE;IACTY,QAAQ,EAAE;EACZ,CAAC;EACDT,gBAAgB,EAAE;IAChBU,WAAW,EAAE,CAAC;IACdJ,YAAY,EAAE,CAAC;IACfF,OAAO,EAAE;EACX;AACF,CAAC,CAAC;AAEF,eAAepB,YAAY","ignoreList":[]}
1
+ {"version":3,"names":["StyleSheet","View","Pressable","CommonText","useTheme","Animated","FadeIn","FadeOut","LinearTransition","jsx","_jsx","jsxs","_jsxs","AnimatedPressable","createAnimatedComponent","FoldableCard","children","type","title","value","onPress","theme","style","styles","container","titleContainer","backgroundColor","colors","layout","duration","titleText","color","white","entering","exiting","contentContainer","borderColor","create","width","padding","alignSelf","borderRadius","marginLeft","zIndex","fontSize","borderWidth"],"sourceRoot":"../../../../src","sources":["components/card/foldableCard.tsx"],"mappings":";;AAAA,SAASA,UAAU,EAAEC,IAAI,EAAEC,SAAS,QAAQ,cAAc;AAC1D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I,CAChB;EAAA,CACG,CAAC;AAEX,CAAC;AAED,MAAMO,MAAM,GAAGvB,UAAU,CAACqC,MAAM,CAAC;EAC/Bb,SAAS,EAAE;IACTc,KAAK,EAAE,MAAM;IACbC,OAAO,EAAE;EACX,CAAC;EACDd,cAAc,EAAE;IACde,SAAS,EAAE,YAAY;IACvBC,YAAY,EAAE,CAAC;IACfC,UAAU,EAAE,CAAC;IACbH,OAAO,EAAE,CAAC;IACVI,MAAM,EAAE;EACV,CAAC;EACDb,SAAS,EAAE;IACTc,QAAQ,EAAE;EACZ,CAAC;EACDT,gBAAgB,EAAE;IAChBU,WAAW,EAAE,CAAC;IACdJ,YAAY,EAAE,CAAC;IACfF,OAAO,EAAE;EACX;AACF,CAAC,CAAC;AAEF,eAAexB,YAAY","ignoreList":[]}
@@ -17,7 +17,7 @@ import Kakaotalk from "./Kakaotalk.js";
17
17
  import Naver from "./Naver.js";
18
18
  // import { ArrowDownToLine } from './ArrowDownToLine';
19
19
  // import { ArrowDownWideNarrow } from './ArrowDownWideNarrow';
20
- // import { ChevronDown } from './ChevronDown';
20
+ import ChevronDown from "./ChevronDown.js";
21
21
  // import { RotateCw } from './RotateCw';
22
22
  // export { SquareArrowOutUpRight } from './SquareArrowOutUpRight';
23
23
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -33,7 +33,8 @@ const iconMap = {
33
33
  facebook: Facebook,
34
34
  google: Google,
35
35
  kakaotalk: Kakaotalk,
36
- naver: Naver
36
+ naver: Naver,
37
+ down: ChevronDown
37
38
  };
38
39
  export const CommonIcon = ({
39
40
  iconType,
@@ -1 +1 @@
1
- {"version":3,"names":["StyleSheet","View","sizeType","ArrowLeft","StarEmpty","StarHalf","StarFull","Check","X","LoaderCircle","Apple","Facebook","Google","Kakaotalk","Naver","jsx","_jsx","iconMap","back","star_empty","star_half","star_full","check","close","loaderCircle","apple","facebook","google","kakaotalk","naver","CommonIcon","iconType","size","color","props","IconComponent","style","styles","container","children","width","height","create"],"sourceRoot":"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ACC,SAAU;IAAA,GAAKJ,KAAK;IAAAK,QAAA,eACtCvB,IAAA,CAACmB,aAAa;MACZK,KAAK,EAAEtC,QAAQ,CAAC8B,IAAI,CAAE;MACtBS,MAAM,EAAEvC,QAAQ,CAAC8B,IAAI,CAAE;MACvBC,KAAK,EAAEA;IAAM,CACd;EAAC,CACE,CAAC;AAEX,CAAC;AAED,MAAMI,MAAM,GAAGrC,UAAU,CAAC0C,MAAM,CAAC;EAC/BJ,SAAS,EAAE;IACT;IACA;EAAA;AAEJ,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["StyleSheet","View","sizeType","ArrowLeft","StarEmpty","StarHalf","StarFull","Check","X","LoaderCircle","Apple","Facebook","Google","Kakaotalk","Naver","ChevronDown","jsx","_jsx","iconMap","back","star_empty","star_half","star_full","check","close","loaderCircle","apple","facebook","google","kakaotalk","naver","down","CommonIcon","iconType","size","color","props","IconComponent","style","styles","container","children","width","height","create"],"sourceRoot":"../../../../src","sources":["components/icon/index.tsx"],"mappings":";;AAAA,SAASA,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,SAAyBC,QAAQ,QAAQ,YAAS;AAClD;AACA,OAAOC,SAAS,MAAM,gBAAa;AACnC,OAAOC,SAAS,MAAM,gBAAa;AACnC,OAAOC,QAAQ,MAAM,eAAY;AACjC,OAAOC,QAAQ,MAAM,eAAY;AACjC,OAAOC,KAAK,MAAM,YAAS;AAC3B,OAAOC,CAAC,MAAM,QAAK;AACnB,OAAOC,YAAY,MAAM,mBAAgB;AACzC,OAAOC,KAAK,MAAM,YAAS;AAC3B,OAAOC,QAAQ,MAAM,eAAY;AACjC,OAAOC,MAAM,MAAM,aAAU;AAC7B,OAAOC,SAAS,MAAM,gBAAa;AACnC,OAAOC,KAAK,MAAM,YAAS;AAC3B;AACA;AACA,OAAOC,WAAW,MAAM,kBAAe;AACvC;AACA;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAEA,MAAMC,OAAO,GAAG;EACdC,IAAI,EAAEhB,SAAS;EACfiB,UAAU,EAAEhB,SAAS;EACrBiB,SAAS,EAAEhB,QAAQ;EACnBiB,SAAS,EAAEhB,QAAQ;EACnBiB,KAAK,EAAEhB,KAAK;EACZiB,KAAK,EAAEhB,CAAC;EACRiB,YAAY,EAAEhB,YAAY;EAC1BiB,KAAK,EAAEhB,KAAK;EACZiB,QAAQ,EAAEhB,QAAQ;EAClBiB,MAAM,EAAEhB,MAAM;EACdiB,SAAS,EAAEhB,SAAS;EACpBiB,KAAK,EAAEhB,KAAK;EACZiB,IAAI,EAAEhB;AACR,CAAU;AAEV,OAAO,MAAMiB,UAAU,GAAGA,CAAC;EACzBC,QAAQ;EACRC,IAAI,GAAG,GAAG;EACVC,KAAK,GAAG,OAAO;EACf,GAAGC;AACM,CAAC,KAAK;EACf;;EAEA,MAAMC,aAAa,GAAGnB,OAAO,CAACe,QAAQ,CAAC;EACvC,IAAI,CAACI,aAAa,EAAE;IAClB,OAAO,IAAI;EACb;EAEA,oBACEpB,IAAA,CAAChB,IAAI;IAACqC,KAAK,EAAEC,MAAM,CAACC,SAAU;IAAA,GAAKJ,KAAK;IAAAK,QAAA,eACtCxB,IAAA,CAACoB,aAAa;MACZK,KAAK,EAAExC,QAAQ,CAACgC,IAAI,CAAE;MACtBS,MAAM,EAAEzC,QAAQ,CAACgC,IAAI,CAAE;MACvBC,KAAK,EAAEA;IAAM,CACd;EAAC,CACE,CAAC;AAEX,CAAC;AAED,MAAMI,MAAM,GAAGvC,UAAU,CAAC4C,MAAM,CAAC;EAC/BJ,SAAS,EAAE;IACT;IACA;EAAA;AAEJ,CAAC,CAAC","ignoreList":[]}
@@ -16,4 +16,6 @@ export { CommonInput } from "./input/index.js";
16
16
  export { CommonPopOver } from "./popOver/index.js";
17
17
  export { CommonSwitch } from "./switch/index.js";
18
18
  export { CommonSpinner } from "./spinner/index.js";
19
+ export { CommonSlider } from "./slider/index.js";
20
+ export { CommonSelect, SelectItem } from "./select/index.js";
19
21
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["CommonText","CommonButton","SocialLoginButton","CommonBadge","SafeAreaContainer","ScrollViewContainer","CommonIcon","CommonRating","CommonAvatar","CommonImage","CheckBox","CommonHeader","CommonCard","FoldableCard","LinearProgressBar","CircularProgressBar","CommonInput","CommonPopOver","CommonSwitch","CommonSpinner"],"sourceRoot":"../../../src","sources":["components/index.ts"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,iBAAQ;AACnC,SAASC,YAAY,EAAEC,iBAAiB,QAAQ,mBAAU;AAC1D,SAASC,WAAW,QAAQ,kBAAS;AACrC,SAASC,iBAAiB,EAAEC,mBAAmB,QAAQ,4BAAmB;AAC1E,SAASC,UAAU,QAAQ,iBAAQ;AACnC,SAASC,YAAY,QAAQ,mBAAU;AACvC,SAASC,YAAY,QAAQ,mBAAU;AACvC,SAASC,WAAW,QAAQ,kBAAS;AACrC,SAASC,QAAQ,QAAQ,qBAAY;AACrC,SAASC,YAAY,QAAQ,mBAAU;AACvC,SAASC,UAAU,EAAEC,YAAY,QAAQ,iBAAQ;AACjD,SAASC,iBAAiB,EAAEC,mBAAmB,QAAQ,wBAAe;AACtE,SAASC,WAAW,QAAQ,kBAAS;AACrC,SAASC,aAAa,QAAQ,oBAAW;AACzC,SAASC,YAAY,QAAQ,mBAAU;AACvC,SAASC,aAAa,QAAQ,oBAAW","ignoreList":[]}
1
+ {"version":3,"names":["CommonText","CommonButton","SocialLoginButton","CommonBadge","SafeAreaContainer","ScrollViewContainer","CommonIcon","CommonRating","CommonAvatar","CommonImage","CheckBox","CommonHeader","CommonCard","FoldableCard","LinearProgressBar","CircularProgressBar","CommonInput","CommonPopOver","CommonSwitch","CommonSpinner","CommonSlider","CommonSelect","SelectItem"],"sourceRoot":"../../../src","sources":["components/index.ts"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,iBAAQ;AACnC,SAASC,YAAY,EAAEC,iBAAiB,QAAQ,mBAAU;AAC1D,SAASC,WAAW,QAAQ,kBAAS;AACrC,SAASC,iBAAiB,EAAEC,mBAAmB,QAAQ,4BAAmB;AAC1E,SAASC,UAAU,QAAQ,iBAAQ;AACnC,SAASC,YAAY,QAAQ,mBAAU;AACvC,SAASC,YAAY,QAAQ,mBAAU;AACvC,SAASC,WAAW,QAAQ,kBAAS;AACrC,SAASC,QAAQ,QAAQ,qBAAY;AACrC,SAASC,YAAY,QAAQ,mBAAU;AACvC,SAASC,UAAU,EAAEC,YAAY,QAAQ,iBAAQ;AACjD,SAASC,iBAAiB,EAAEC,mBAAmB,QAAQ,wBAAe;AACtE,SAASC,WAAW,QAAQ,kBAAS;AACrC,SAASC,aAAa,QAAQ,oBAAW;AACzC,SAASC,YAAY,QAAQ,mBAAU;AACvC,SAASC,aAAa,QAAQ,oBAAW;AACzC,SAASC,YAAY,QAAQ,mBAAU;AACvC,SAASC,YAAY,EAAEC,UAAU,QAAQ,mBAAU","ignoreList":[]}
@@ -0,0 +1,135 @@
1
+ "use strict";
2
+
3
+ import React, { useState } from 'react';
4
+ import { Pressable, StyleSheet, View } from 'react-native';
5
+ import { useTheme } from "../../hooks/useTheme.js";
6
+ import { CommonIcon } from "../icon/index.js";
7
+ import { CommonText } from "../text/index.js";
8
+ import Animated, { useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated';
9
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
10
+ export const SelectItem = _props => {
11
+ return null;
12
+ };
13
+ export const CommonSelect = ({
14
+ children,
15
+ placeholder = 'Select',
16
+ value,
17
+ // defaultValue,
18
+ onChange,
19
+ style
20
+ }) => {
21
+ const {
22
+ theme
23
+ } = useTheme();
24
+ const [open, setOpen] = useState(false);
25
+ const [internalValue, setInternalValue] = useState(
26
+ // defaultValue
27
+ '');
28
+ const selectedValue = value ?? internalValue;
29
+ const items = React.Children.toArray(children).filter(React.isValidElement);
30
+ const selectedItem = items.find(item => item.props.value === selectedValue);
31
+ const handleSelect = nextValue => {
32
+ if (value === undefined) {
33
+ setInternalValue(nextValue);
34
+ }
35
+ onChange?.(nextValue);
36
+ setOpen(false);
37
+ };
38
+ const rotate = useSharedValue(0);
39
+ const arrowAnimatedStyle = useAnimatedStyle(() => {
40
+ return {
41
+ transform: [{
42
+ rotate: `${rotate.value}deg`
43
+ }]
44
+ };
45
+ });
46
+ return /*#__PURE__*/_jsxs(View, {
47
+ style: [styles.container, style],
48
+ children: [/*#__PURE__*/_jsxs(Pressable, {
49
+ style: [styles.trigger, {
50
+ borderColor: theme.colors.border,
51
+ backgroundColor: theme.colors.background
52
+ }],
53
+ onPress: () => {
54
+ const nextOpen = !open;
55
+ rotate.value = withTiming(nextOpen ? 180 : 0, {
56
+ duration: 200
57
+ });
58
+ setOpen(nextOpen);
59
+ },
60
+ children: [/*#__PURE__*/_jsx(CommonText, {
61
+ size: "m",
62
+ style: [!selectedItem && {
63
+ color: theme.colors.disabled
64
+ }],
65
+ children: selectedItem?.props.label ?? placeholder
66
+ }), /*#__PURE__*/_jsx(Animated.View, {
67
+ style: arrowAnimatedStyle,
68
+ children: /*#__PURE__*/_jsx(CommonIcon, {
69
+ iconType: "down"
70
+ })
71
+ })]
72
+ }), open && /*#__PURE__*/_jsx(View, {
73
+ style: [{
74
+ borderColor: theme.colors.border,
75
+ backgroundColor: theme.colors.background
76
+ }, styles.dropdown],
77
+ children: items.map(item => {
78
+ const isSelected = item.props.value === selectedValue;
79
+ return /*#__PURE__*/_jsx(Pressable, {
80
+ style: [styles.option, isSelected && styles.selectedOption],
81
+ onPress: () => handleSelect(item.props.value),
82
+ children: /*#__PURE__*/_jsx(CommonText, {
83
+ style: [styles.optionText, isSelected && styles.selectedOptionText],
84
+ children: item.props.label
85
+ })
86
+ }, String(item.props.value));
87
+ })
88
+ })]
89
+ });
90
+ };
91
+ const styles = StyleSheet.create({
92
+ container: {
93
+ position: 'relative',
94
+ width: '100%',
95
+ zIndex: 999
96
+ },
97
+ trigger: {
98
+ minHeight: 44,
99
+ borderWidth: 1,
100
+ borderRadius: 8,
101
+ paddingHorizontal: 10,
102
+ flexDirection: 'row',
103
+ alignItems: 'center',
104
+ justifyContent: 'space-between'
105
+ },
106
+ arrow: {
107
+ fontSize: 12,
108
+ color: '#667085'
109
+ },
110
+ dropdown: {
111
+ position: 'absolute',
112
+ top: 46,
113
+ left: 0,
114
+ right: 0,
115
+ borderWidth: 1,
116
+ borderRadius: 8,
117
+ zIndex: 999,
118
+ elevation: 10
119
+ },
120
+ option: {
121
+ paddingVertical: 12,
122
+ paddingHorizontal: 12
123
+ },
124
+ selectedOption: {
125
+ backgroundColor: '#F2F4F7'
126
+ },
127
+ optionText: {
128
+ fontSize: 14,
129
+ color: '#101828'
130
+ },
131
+ selectedOptionText: {
132
+ fontWeight: '600'
133
+ }
134
+ });
135
+ //# sourceMappingURL=commonSelect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useState","Pressable","StyleSheet","View","useTheme","CommonIcon","CommonText","Animated","useAnimatedStyle","useSharedValue","withTiming","jsx","_jsx","jsxs","_jsxs","SelectItem","_props","CommonSelect","children","placeholder","value","onChange","style","theme","open","setOpen","internalValue","setInternalValue","selectedValue","items","Children","toArray","filter","isValidElement","selectedItem","find","item","props","handleSelect","nextValue","undefined","rotate","arrowAnimatedStyle","transform","styles","container","trigger","borderColor","colors","border","backgroundColor","background","onPress","nextOpen","duration","size","color","disabled","label","iconType","dropdown","map","isSelected","option","selectedOption","optionText","selectedOptionText","String","create","position","width","zIndex","minHeight","borderWidth","borderRadius","paddingHorizontal","flexDirection","alignItems","justifyContent","arrow","fontSize","top","left","right","elevation","paddingVertical","fontWeight"],"sourceRoot":"../../../../src","sources":["components/select/commonSelect.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAuBC,QAAQ,QAAQ,OAAO;AAC1D,SAASC,SAAS,EAAEC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC1D,SAASC,QAAQ,QAAQ,yBAAsB;AAC/C,SAASC,UAAU,QAAQ,kBAAS;AACpC,SAASC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C,KAAK,EAAE,CAAC;IAERV,WAAW,EAAE,CAAC;IACdC,YAAY,EAAE,CAAC;IACfH,MAAM,EAAE,GAAG;IACXa,SAAS,EAAE;EACb,CAAC;EACDrB,MAAM,EAAE;IACNsB,eAAe,EAAE,EAAE;IACnBV,iBAAiB,EAAE;EACrB,CAAC;EACDX,cAAc,EAAE;IACdd,eAAe,EAAE;EACnB,CAAC;EACDe,UAAU,EAAE;IACVe,QAAQ,EAAE,EAAE;IACZxB,KAAK,EAAE;EACT,CAAC;EACDU,kBAAkB,EAAE;IAClBoB,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ import { CommonSelect, SelectItem } from "./commonSelect.js";
4
+ export { CommonSelect, SelectItem };
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["CommonSelect","SelectItem"],"sourceRoot":"../../../../src","sources":["components/select/index.ts"],"mappings":";;AAAA,SAASA,YAAY,EAAEC,UAAU,QAAQ,mBAAgB;AAEzD,SAASD,YAAY,EAAEC,UAAU","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ export {};
4
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["components/select/types.ts"],"mappings":"","ignoreList":[]}
@@ -1,3 +1,105 @@
1
- // TODO: slider 구현 필요
2
1
  "use strict";
2
+
3
+ import { View, StyleSheet } from 'react-native';
4
+ import { Gesture, GestureDetector } from 'react-native-gesture-handler';
5
+ import Animated, { useAnimatedStyle, useSharedValue } from 'react-native-reanimated';
6
+ import { CommonText } from "../text/index.js";
7
+ import { useTheme } from "../../hooks/useTheme.js";
8
+
9
+ // TODO: Thumb가 범위 바깥으로 넘어가는 것 수정 필요.
10
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
+ export const CommonSlider = ({
12
+ labels = []
13
+ }) => {
14
+ const {
15
+ theme
16
+ } = useTheme();
17
+ const position = useSharedValue(0);
18
+ const startPosition = useSharedValue(0);
19
+ const panGesture = Gesture.Pan().onBegin(() => {
20
+ startPosition.value = position.value;
21
+ }).onUpdate(event => {
22
+ const nextValue = startPosition.value + event.translationX;
23
+ if (nextValue < 0) {
24
+ position.value = 0;
25
+ } else {
26
+ position.value = nextValue;
27
+ }
28
+ });
29
+ const animatedStyle = useAnimatedStyle(() => ({
30
+ transform: [{
31
+ translateX: position.value
32
+ }]
33
+ }));
34
+ const activeTrackStyle = useAnimatedStyle(() => ({
35
+ width: position.value + 15
36
+ }));
37
+ return /*#__PURE__*/_jsxs(View, {
38
+ style: styles.container,
39
+ children: [/*#__PURE__*/_jsxs(View, {
40
+ style: [styles.sliderBar, {
41
+ backgroundColor: theme.colors.secondary
42
+ }],
43
+ children: [/*#__PURE__*/_jsx(Animated.View, {
44
+ style: [{
45
+ backgroundColor: theme.colors.primary
46
+ }, styles.filledSliderBar, activeTrackStyle]
47
+ }), /*#__PURE__*/_jsx(GestureDetector, {
48
+ gesture: panGesture,
49
+ children: /*#__PURE__*/_jsx(Animated.View, {
50
+ style: [animatedStyle, {
51
+ backgroundColor: theme.colors.text
52
+ }, styles.thumb]
53
+ })
54
+ })]
55
+ }), /*#__PURE__*/_jsx(View, {
56
+ style: styles.labelBar,
57
+ children: labels.map((label, index) => {
58
+ const percent = labels.length === 1 ? 0 : index / (labels.length - 1);
59
+ return /*#__PURE__*/_jsx(CommonText, {
60
+ size: "s",
61
+ style: [styles.labelText, {
62
+ color: theme.colors.text,
63
+ left: `${percent * 100}%`
64
+ }],
65
+ children: label
66
+ }, `${label}-${index}`);
67
+ })
68
+ })]
69
+ });
70
+ };
71
+ const styles = StyleSheet.create({
72
+ container: {
73
+ padding: 20,
74
+ width: '100%'
75
+ },
76
+ sliderBar: {
77
+ width: '100%',
78
+ height: 10
79
+ },
80
+ filledSliderBar: {
81
+ position: 'absolute',
82
+ left: 0,
83
+ top: 0,
84
+ height: 10,
85
+ borderRadius: 5
86
+ },
87
+ labelBar: {
88
+ position: 'relative',
89
+ height: 24,
90
+ marginTop: 12
91
+ },
92
+ labelText: {
93
+ position: 'absolute',
94
+ transform: [{
95
+ translateX: -8
96
+ }]
97
+ },
98
+ thumb: {
99
+ bottom: 10,
100
+ width: 30,
101
+ height: 30,
102
+ borderRadius: 15
103
+ }
104
+ });
3
105
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["components/slider/index.tsx"],"mappings":"AAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"names":["View","StyleSheet","Gesture","GestureDetector","Animated","useAnimatedStyle","useSharedValue","CommonText","useTheme","jsx","_jsx","jsxs","_jsxs","CommonSlider","labels","theme","position","startPosition","panGesture","Pan","onBegin","value","onUpdate","event","nextValue","translationX","animatedStyle","transform","translateX","activeTrackStyle","width","style","styles","container","children","sliderBar","backgroundColor","colors","secondary","primary","filledSliderBar","gesture","text","thumb","labelBar","map","label","index","percent","length","size","labelText","color","left","create","padding","height","top","borderRadius","marginTop","bottom"],"sourceRoot":"../../../../src","sources":["components/slider/index.tsx"],"mappings":";;AAAA,SAASA,IAAI,EAAEC,UAAU,QAAQ,cAAc;AAC/C,SAASC,OAAO,EAAEC,eAAe,QAAQ,8BAA8B;AACvE,OAAOC,QAAQ,IACbC,gBAAgB,EAChBC,cAAc,QACT,yBAAyB;AAChC,SAASC,UAAU,QAAQ,kBAAS;AAEpC,SAASC,QAAQ,QAAQ,yBAAsB;;AAE/C;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AACA,OAAO,MAAMC,YAAY,GAAGA,CAAC;EAAEC,MAAM,GAAG;AAAgB,CAAC,KAAK;EAC5D,MAAM;IAAEC;EAAM,CAAC,GAAGP,QAAQ,CAAC,CAAC;EAC5B,MAAMQ,QAAQ,GAAGV,cAAc,CAAC,CAAC,CAAC;EAClC,MAAMW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AE;IACVG,SAAS,EAAE;EACb,CAAC;EACDR,SAAS,EAAE;IACTnC,QAAQ,EAAE,UAAU;IACpBW,SAAS,EAAE,CAAC;MAAEC,UAAU,EAAE,CAAC;IAAE,CAAC;EAChC,CAAC;EACDe,KAAK,EAAE;IACLiB,MAAM,EAAE,EAAE;IACV9B,KAAK,EAAE,EAAE;IACT0B,MAAM,EAAE,EAAE;IACVE,YAAY,EAAE;EAChB;AACF,CAAC,CAAC","ignoreList":[]}
@@ -1,2 +1,4 @@
1
1
  "use strict";
2
+
3
+ export {};
2
4
  //# sourceMappingURL=types.js.map
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
 
3
- export { CommonText, CommonButton, CommonBadge, SafeAreaContainer, ScrollViewContainer, CommonIcon, CommonRating, CommonAvatar, CommonImage, CheckBox, CommonHeader, CommonCard, FoldableCard, LinearProgressBar, CircularProgressBar, CommonInput, CommonPopOver, CommonSwitch, SocialLoginButton, CommonSpinner } from "./components/index.js";
3
+ export { CommonText, CommonButton, CommonBadge, SafeAreaContainer, ScrollViewContainer, CommonIcon, CommonRating, CommonAvatar, CommonImage, CheckBox, CommonHeader, CommonCard, FoldableCard, LinearProgressBar, CircularProgressBar, CommonInput, CommonPopOver, CommonSwitch, SocialLoginButton, CommonSpinner, CommonSlider, CommonSelect, SelectItem } from "./components/index.js";
4
4
  export { ThemeProvider } from "./theme/themeProvider.js";
5
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["CommonText","CommonButton","CommonBadge","SafeAreaContainer","ScrollViewContainer","CommonIcon","CommonRating","CommonAvatar","CommonImage","CheckBox","CommonHeader","CommonCard","FoldableCard","LinearProgressBar","CircularProgressBar","CommonInput","CommonPopOver","CommonSwitch","SocialLoginButton","CommonSpinner","ThemeProvider"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,SACEA,UAAU,EACVC,YAAY,EACZC,WAAW,EACXC,iBAAiB,EACjBC,mBAAmB,EACnBC,UAAU,EACVC,YAAY,EACZC,YAAY,EACZC,WAAW,EACXC,QAAQ,EACRC,YAAY,EACZC,UAAU,EACVC,YAAY,EACZC,iBAAiB,EACjBC,mBAAmB,EACnBC,WAAW,EACXC,aAAa,EACbC,YAAY,EACZC,iBAAiB,EACjBC,aAAa,QACR,uBAAc;AACrB,SAASC,aAAa,QAAQ,0BAAuB","ignoreList":[]}
1
+ {"version":3,"names":["CommonText","CommonButton","CommonBadge","SafeAreaContainer","ScrollViewContainer","CommonIcon","CommonRating","CommonAvatar","CommonImage","CheckBox","CommonHeader","CommonCard","FoldableCard","LinearProgressBar","CircularProgressBar","CommonInput","CommonPopOver","CommonSwitch","SocialLoginButton","CommonSpinner","CommonSlider","CommonSelect","SelectItem","ThemeProvider"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,SACEA,UAAU,EACVC,YAAY,EACZC,WAAW,EACXC,iBAAiB,EACjBC,mBAAmB,EACnBC,UAAU,EACVC,YAAY,EACZC,YAAY,EACZC,WAAW,EACXC,QAAQ,EACRC,YAAY,EACZC,UAAU,EACVC,YAAY,EACZC,iBAAiB,EACjBC,mBAAmB,EACnBC,WAAW,EACXC,aAAa,EACbC,YAAY,EACZC,iBAAiB,EACjBC,aAAa,EACbC,YAAY,EACZC,YAAY,EACZC,UAAU,QACL,uBAAc;AACrB,SAASC,aAAa,QAAQ,0BAAuB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"foldableCard.d.ts","sourceRoot":"","sources":["../../../../../src/components/card/foldableCard.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,YAAS,CAAC;AAUjD,QAAA,MAAM,YAAY,GAAI,4CAMnB,iBAAiB,gCA6CnB,CAAC;AAwBF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"foldableCard.d.ts","sourceRoot":"","sources":["../../../../../src/components/card/foldableCard.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,YAAS,CAAC;AAUjD,QAAA,MAAM,YAAY,GAAI,4CAMnB,iBAAiB,gCAyCnB,CAAC;AAwBF,eAAe,YAAY,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/icon/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAY,MAAM,YAAS,CAAC;AAmCnD,eAAO,MAAM,UAAU,GAAI,qCAKxB,SAAS,uCAiBX,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/icon/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAY,MAAM,YAAS,CAAC;AAoCnD,eAAO,MAAM,UAAU,GAAI,qCAKxB,SAAS,uCAiBX,CAAC"}
@@ -3,7 +3,7 @@ type Variant = 'primary' | 'secondary';
3
3
  type SizeVariant = 's' | 'm' | 'l';
4
4
  export declare const sizeType: Record<SizeVariant, number>;
5
5
  export interface IconProps extends ViewProps {
6
- iconType: 'check' | 'back' | 'close' | 'apple' | 'facebook' | 'google' | 'kakaotalk' | 'naver' | 'loaderCircle' | 'star_empty' | 'star_half' | 'star_full';
6
+ iconType: 'check' | 'back' | 'down' | 'close' | 'apple' | 'facebook' | 'google' | 'kakaotalk' | 'naver' | 'loaderCircle' | 'star_empty' | 'star_half' | 'star_full';
7
7
  type?: Variant;
8
8
  size?: SizeVariant;
9
9
  color?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/icon/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,KAAK,OAAO,GAAG,SAAS,GAAG,WAAW,CAAC;AACvC,KAAK,WAAW,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AAEnC,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAIhD,CAAC;AAEF,MAAM,WAAW,SAAU,SAAQ,SAAS;IAC1C,QAAQ,EAGJ,OAAO,GACP,MAAM,GACN,OAAO,GACP,OAAO,GACP,UAAU,GACV,QAAQ,GACR,WAAW,GACX,OAAO,GACP,cAAc,GAGd,YAAY,GACZ,WAAW,GACX,WAAW,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/icon/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,KAAK,OAAO,GAAG,SAAS,GAAG,WAAW,CAAC;AACvC,KAAK,WAAW,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AAEnC,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAIhD,CAAC;AAEF,MAAM,WAAW,SAAU,SAAQ,SAAS;IAC1C,QAAQ,EAGJ,OAAO,GACP,MAAM,GACN,MAAM,GACN,OAAO,GACP,OAAO,GACP,UAAU,GACV,QAAQ,GACR,WAAW,GACX,OAAO,GACP,cAAc,GAGd,YAAY,GACZ,WAAW,GACX,WAAW,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
@@ -14,4 +14,6 @@ export { CommonInput } from './input/index.js';
14
14
  export { CommonPopOver } from './popOver/index.js';
15
15
  export { CommonSwitch } from './switch/index.js';
16
16
  export { CommonSpinner } from './spinner/index.js';
17
+ export { CommonSlider } from './slider/index.js';
18
+ export { CommonSelect, SelectItem } from './select/index.js';
17
19
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAQ,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,mBAAU,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAS,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,4BAAmB,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAQ,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAU,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAU,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAS,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAY,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAU,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,iBAAQ,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,wBAAe,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAS,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAW,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAU,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAQ,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,mBAAU,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAS,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,4BAAmB,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAQ,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAU,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAU,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAS,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAY,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAU,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,iBAAQ,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,wBAAe,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAS,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAW,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAU,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAW,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAU,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,mBAAU,CAAC"}
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { type CommonSelectItemProps, type CommonSelectProps } from './types.js';
3
+ export declare const SelectItem: (_props: CommonSelectItemProps) => null;
4
+ export declare const CommonSelect: ({ children, placeholder, value, onChange, style, }: CommonSelectProps) => React.JSX.Element;
5
+ //# sourceMappingURL=commonSelect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commonSelect.d.ts","sourceRoot":"","sources":["../../../../../src/components/select/commonSelect.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAK3D,OAAO,EAAE,KAAK,qBAAqB,EAAE,KAAK,iBAAiB,EAAE,MAAM,YAAS,CAAC;AAO7E,eAAO,MAAM,UAAU,GAAI,QAAQ,qBAAqB,SAEvD,CAAC;AACF,eAAO,MAAM,YAAY,GAAI,oDAO1B,iBAAiB,sBAqGnB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { CommonSelect, SelectItem } from './commonSelect.js';
2
+ export { CommonSelect, SelectItem };
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/select/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,mBAAgB,CAAC;AAE1D,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { type ReactNode } from 'react';
2
+ import { type ViewProps } from 'react-native';
3
+ type SizeVariant = 's' | 'm' | 'l';
4
+ export interface CommonSelectProps extends ViewProps {
5
+ size?: SizeVariant;
6
+ value?: string;
7
+ placeholder?: string;
8
+ onChange?: (value: string) => void;
9
+ children: ReactNode;
10
+ }
11
+ export interface CommonSelectItemProps extends ViewProps {
12
+ label: string;
13
+ value: string;
14
+ }
15
+ export {};
16
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/select/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9C,KAAK,WAAW,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AAEnC,MAAM,WAAW,iBAAkB,SAAQ,SAAS;IAClD,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,MAAM,WAAW,qBAAsB,SAAQ,SAAS;IACtD,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf"}
@@ -1 +1,3 @@
1
+ import { type SliderProps } from './types.js';
2
+ export declare const CommonSlider: ({ labels }: SliderProps) => import("react").JSX.Element;
1
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/slider/index.tsx"],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/slider/index.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,YAAS,CAAC;AAI3C,eAAO,MAAM,YAAY,GAAI,YAAiB,WAAW,gCAyExD,CAAC"}
@@ -1 +1,10 @@
1
+ import { type ViewProps } from 'react-native';
2
+ type Variant = 'primary' | 'secondary';
3
+ type SizeVariant = 's' | 'm' | 'l';
4
+ export interface SliderProps extends ViewProps {
5
+ type?: Variant;
6
+ size?: SizeVariant;
7
+ labels?: (string | number)[];
8
+ }
9
+ export {};
1
10
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/slider/types.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/slider/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,KAAK,OAAO,GAAG,SAAS,GAAG,WAAW,CAAC;AACvC,KAAK,WAAW,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AAEnC,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC5C,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,MAAM,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;CAC9B"}
@@ -1,3 +1,3 @@
1
- export { CommonText, CommonButton, CommonBadge, SafeAreaContainer, ScrollViewContainer, CommonIcon, CommonRating, CommonAvatar, CommonImage, CheckBox, CommonHeader, CommonCard, FoldableCard, LinearProgressBar, CircularProgressBar, CommonInput, CommonPopOver, CommonSwitch, SocialLoginButton, CommonSpinner, } from './components/index.js';
1
+ export { CommonText, CommonButton, CommonBadge, SafeAreaContainer, ScrollViewContainer, CommonIcon, CommonRating, CommonAvatar, CommonImage, CheckBox, CommonHeader, CommonCard, FoldableCard, LinearProgressBar, CircularProgressBar, CommonInput, CommonPopOver, CommonSwitch, SocialLoginButton, CommonSpinner, CommonSlider, CommonSelect, SelectItem, } from './components/index.js';
2
2
  export { ThemeProvider } from './theme/themeProvider.js';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,mBAAmB,EACnB,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,iBAAiB,EACjB,mBAAmB,EACnB,WAAW,EACX,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,aAAa,GACd,MAAM,uBAAc,CAAC;AACtB,OAAO,EAAE,aAAa,EAAE,MAAM,0BAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,mBAAmB,EACnB,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,iBAAiB,EACjB,mBAAmB,EACnB,WAAW,EACX,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,UAAU,GACX,MAAM,uBAAc,CAAC;AACtB,OAAO,EAAE,aAAa,EAAE,MAAM,0BAAuB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kukkim/react-native-ui",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "ui library for react native",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",
@@ -83,6 +83,7 @@
83
83
  "react": "19.2.0",
84
84
  "react-native": "0.83.6",
85
85
  "react-native-builder-bob": "^0.42.1",
86
+ "react-native-gesture-handler": "^3.0.0",
86
87
  "react-native-reanimated": "^4.0.0",
87
88
  "react-native-safe-area-context": "^5.8.0",
88
89
  "react-native-svg": "^15.15.5",
@@ -94,6 +95,7 @@
94
95
  "peerDependencies": {
95
96
  "react": "*",
96
97
  "react-native": "*",
98
+ "react-native-gesture-handler": ">=3.0.0",
97
99
  "react-native-reanimated": ">=4.0.0",
98
100
  "react-native-safe-area-context": ">=5.0.0",
99
101
  "react-native-svg": "*",
@@ -2,14 +2,14 @@ import { StyleSheet, View, Pressable } from 'react-native';
2
2
  import { CommonText } from '../text';
3
3
  import { type FoldableCardProps } from './types';
4
4
  import { useTheme } from '../../hooks/useTheme';
5
- // import Animated, {
6
- // FadeIn,
7
- // FadeOut,
8
- // LinearTransition,
9
- // } from 'react-native-reanimated';
5
+ import Animated, {
6
+ FadeIn,
7
+ FadeOut,
8
+ LinearTransition,
9
+ } from 'react-native-reanimated';
10
10
 
11
- //TODO: React-native-reanimated 적용시키기
12
- // const AnimatedPressable = Animated.createAnimatedComponent(Pressable);
11
+ //TODO: Animation이 여전히 부자연스러우니 수정필요.
12
+ const AnimatedPressable = Animated.createAnimatedComponent(Pressable);
13
13
  const FoldableCard = ({
14
14
  children,
15
15
  type = 'primary',
@@ -20,8 +20,7 @@ const FoldableCard = ({
20
20
  const { theme } = useTheme();
21
21
  return (
22
22
  <View style={styles.container}>
23
- <Pressable
24
- // <AnimatedPressable
23
+ <AnimatedPressable
25
24
  style={[
26
25
  styles.titleContainer,
27
26
  {
@@ -29,7 +28,7 @@ const FoldableCard = ({
29
28
  },
30
29
  ]}
31
30
  onPress={onPress}
32
- // layout={LinearTransition.duration(200)}
31
+ layout={LinearTransition.duration(200)}
33
32
  >
34
33
  <CommonText
35
34
  style={[
@@ -41,13 +40,11 @@ const FoldableCard = ({
41
40
  >
42
41
  {title}
43
42
  </CommonText>
44
- {/* </AnimatedPressable> */}
45
- </Pressable>
43
+ </AnimatedPressable>
46
44
  {value && (
47
- <View
48
- // <Animated.View
49
- // entering={FadeIn}
50
- // exiting={FadeOut}
45
+ <Animated.View
46
+ entering={FadeIn}
47
+ exiting={FadeOut}
51
48
  style={[
52
49
  styles.contentContainer,
53
50
  {
@@ -56,8 +53,7 @@ const FoldableCard = ({
56
53
  ]}
57
54
  >
58
55
  {children}
59
- {/* </Animated.View> */}
60
- </View>
56
+ </Animated.View>
61
57
  )}
62
58
  </View>
63
59
  );
@@ -15,7 +15,7 @@ import Kakaotalk from './Kakaotalk';
15
15
  import Naver from './Naver';
16
16
  // import { ArrowDownToLine } from './ArrowDownToLine';
17
17
  // import { ArrowDownWideNarrow } from './ArrowDownWideNarrow';
18
- // import { ChevronDown } from './ChevronDown';
18
+ import ChevronDown from './ChevronDown';
19
19
  // import { RotateCw } from './RotateCw';
20
20
  // export { SquareArrowOutUpRight } from './SquareArrowOutUpRight';
21
21
 
@@ -32,6 +32,7 @@ const iconMap = {
32
32
  google: Google,
33
33
  kakaotalk: Kakaotalk,
34
34
  naver: Naver,
35
+ down: ChevronDown,
35
36
  } as const;
36
37
 
37
38
  export const CommonIcon = ({
@@ -15,6 +15,7 @@ export interface IconProps extends ViewProps {
15
15
  // | 'spinner'
16
16
  | 'check'
17
17
  | 'back'
18
+ | 'down'
18
19
  | 'close'
19
20
  | 'apple'
20
21
  | 'facebook'
@@ -14,3 +14,5 @@ export { CommonInput } from './input';
14
14
  export { CommonPopOver } from './popOver';
15
15
  export { CommonSwitch } from './switch';
16
16
  export { CommonSpinner } from './spinner';
17
+ export { CommonSlider } from './slider';
18
+ export { CommonSelect, SelectItem } from './select';
@@ -0,0 +1,170 @@
1
+ import React, { type ReactElement, useState } from 'react';
2
+ import { Pressable, StyleSheet, View } from 'react-native';
3
+ import { useTheme } from '../../hooks/useTheme';
4
+ import { CommonIcon } from '../icon';
5
+ import { CommonText } from '../text';
6
+ import { type CommonSelectItemProps, type CommonSelectProps } from './types';
7
+ import Animated, {
8
+ useAnimatedStyle,
9
+ useSharedValue,
10
+ withTiming,
11
+ } from 'react-native-reanimated';
12
+
13
+ export const SelectItem = (_props: CommonSelectItemProps) => {
14
+ return null;
15
+ };
16
+ export const CommonSelect = ({
17
+ children,
18
+ placeholder = 'Select',
19
+ value,
20
+ // defaultValue,
21
+ onChange,
22
+ style,
23
+ }: CommonSelectProps) => {
24
+ const { theme } = useTheme();
25
+ const [open, setOpen] = useState(false);
26
+ const [internalValue, setInternalValue] = useState<string | undefined>(
27
+ // defaultValue
28
+ ''
29
+ );
30
+
31
+ const selectedValue = value ?? internalValue;
32
+
33
+ const items = React.Children.toArray(children).filter(
34
+ React.isValidElement
35
+ ) as ReactElement<CommonSelectItemProps>[];
36
+
37
+ const selectedItem = items.find((item) => item.props.value === selectedValue);
38
+
39
+ const handleSelect = (nextValue: string) => {
40
+ if (value === undefined) {
41
+ setInternalValue(nextValue);
42
+ }
43
+
44
+ onChange?.(nextValue);
45
+ setOpen(false);
46
+ };
47
+
48
+ const rotate = useSharedValue(0);
49
+ const arrowAnimatedStyle = useAnimatedStyle(() => {
50
+ return {
51
+ transform: [
52
+ {
53
+ rotate: `${rotate.value}deg`,
54
+ },
55
+ ],
56
+ };
57
+ });
58
+
59
+ return (
60
+ <View style={[styles.container, style]}>
61
+ <Pressable
62
+ style={[
63
+ styles.trigger,
64
+ {
65
+ borderColor: theme.colors.border,
66
+ backgroundColor: theme.colors.background,
67
+ },
68
+ ]}
69
+ onPress={() => {
70
+ const nextOpen = !open;
71
+
72
+ rotate.value = withTiming(nextOpen ? 180 : 0, {
73
+ duration: 200,
74
+ });
75
+
76
+ setOpen(nextOpen);
77
+ }}
78
+ >
79
+ <CommonText
80
+ size="m"
81
+ style={[!selectedItem && { color: theme.colors.disabled }]}
82
+ >
83
+ {selectedItem?.props.label ?? placeholder}
84
+ </CommonText>
85
+ <Animated.View style={arrowAnimatedStyle}>
86
+ <CommonIcon iconType="down" />
87
+ </Animated.View>
88
+ </Pressable>
89
+
90
+ {open && (
91
+ <View
92
+ style={[
93
+ {
94
+ borderColor: theme.colors.border,
95
+ backgroundColor: theme.colors.background,
96
+ },
97
+ styles.dropdown,
98
+ ]}
99
+ >
100
+ {items.map((item) => {
101
+ const isSelected = item.props.value === selectedValue;
102
+
103
+ return (
104
+ <Pressable
105
+ key={String(item.props.value)}
106
+ style={[styles.option, isSelected && styles.selectedOption]}
107
+ onPress={() => handleSelect(item.props.value)}
108
+ >
109
+ <CommonText
110
+ style={[
111
+ styles.optionText,
112
+ isSelected && styles.selectedOptionText,
113
+ ]}
114
+ >
115
+ {item.props.label}
116
+ </CommonText>
117
+ </Pressable>
118
+ );
119
+ })}
120
+ </View>
121
+ )}
122
+ </View>
123
+ );
124
+ };
125
+
126
+ const styles = StyleSheet.create({
127
+ container: {
128
+ position: 'relative',
129
+ width: '100%',
130
+ zIndex: 999,
131
+ },
132
+ trigger: {
133
+ minHeight: 44,
134
+ borderWidth: 1,
135
+ borderRadius: 8,
136
+ paddingHorizontal: 10,
137
+ flexDirection: 'row',
138
+ alignItems: 'center',
139
+ justifyContent: 'space-between',
140
+ },
141
+ arrow: {
142
+ fontSize: 12,
143
+ color: '#667085',
144
+ },
145
+ dropdown: {
146
+ position: 'absolute',
147
+ top: 46,
148
+ left: 0,
149
+ right: 0,
150
+
151
+ borderWidth: 1,
152
+ borderRadius: 8,
153
+ zIndex: 999,
154
+ elevation: 10,
155
+ },
156
+ option: {
157
+ paddingVertical: 12,
158
+ paddingHorizontal: 12,
159
+ },
160
+ selectedOption: {
161
+ backgroundColor: '#F2F4F7',
162
+ },
163
+ optionText: {
164
+ fontSize: 14,
165
+ color: '#101828',
166
+ },
167
+ selectedOptionText: {
168
+ fontWeight: '600',
169
+ },
170
+ });
@@ -0,0 +1,3 @@
1
+ import { CommonSelect, SelectItem } from './commonSelect';
2
+
3
+ export { CommonSelect, SelectItem };
@@ -0,0 +1,18 @@
1
+ import { type ReactNode } from 'react';
2
+ import { type ViewProps } from 'react-native';
3
+
4
+ // type Variant = 'primary' | 'secondary';
5
+ type SizeVariant = 's' | 'm' | 'l';
6
+
7
+ export interface CommonSelectProps extends ViewProps {
8
+ size?: SizeVariant;
9
+ value?: string;
10
+ placeholder?: string;
11
+ onChange?: (value: string) => void;
12
+ children: ReactNode;
13
+ }
14
+
15
+ export interface CommonSelectItemProps extends ViewProps {
16
+ label: string;
17
+ value: string;
18
+ }
@@ -1 +1,118 @@
1
- // TODO: slider 구현 필요
1
+ import { View, StyleSheet } from 'react-native';
2
+ import { Gesture, GestureDetector } from 'react-native-gesture-handler';
3
+ import Animated, {
4
+ useAnimatedStyle,
5
+ useSharedValue,
6
+ } from 'react-native-reanimated';
7
+ import { CommonText } from '../text';
8
+ import { type SliderProps } from './types';
9
+ import { useTheme } from '../../hooks/useTheme';
10
+
11
+ // TODO: Thumb가 범위 바깥으로 넘어가는 것 수정 필요.
12
+ export const CommonSlider = ({ labels = [] }: SliderProps) => {
13
+ const { theme } = useTheme();
14
+ const position = useSharedValue(0);
15
+ const startPosition = useSharedValue(0);
16
+
17
+ const panGesture = Gesture.Pan()
18
+ .onBegin(() => {
19
+ startPosition.value = position.value;
20
+ })
21
+ .onUpdate((event) => {
22
+ const nextValue = startPosition.value + event.translationX;
23
+ if (nextValue < 0) {
24
+ position.value = 0;
25
+ } else {
26
+ position.value = nextValue;
27
+ }
28
+ });
29
+ const animatedStyle = useAnimatedStyle(() => ({
30
+ transform: [{ translateX: position.value }],
31
+ }));
32
+ const activeTrackStyle = useAnimatedStyle(() => ({
33
+ width: position.value + 15,
34
+ }));
35
+
36
+ return (
37
+ <View style={styles.container}>
38
+ <View
39
+ style={[styles.sliderBar, { backgroundColor: theme.colors.secondary }]}
40
+ >
41
+ <Animated.View
42
+ style={[
43
+ {
44
+ backgroundColor: theme.colors.primary,
45
+ },
46
+ styles.filledSliderBar,
47
+ activeTrackStyle,
48
+ ]}
49
+ />
50
+ <GestureDetector gesture={panGesture}>
51
+ <Animated.View
52
+ style={[
53
+ animatedStyle,
54
+ {
55
+ backgroundColor: theme.colors.text,
56
+ },
57
+ styles.thumb,
58
+ ]}
59
+ />
60
+ </GestureDetector>
61
+ </View>
62
+
63
+ <View style={styles.labelBar}>
64
+ {labels.map((label, index) => {
65
+ const percent = labels.length === 1 ? 0 : index / (labels.length - 1);
66
+ return (
67
+ <CommonText
68
+ size="s"
69
+ key={`${label}-${index}`}
70
+ style={[
71
+ styles.labelText,
72
+ {
73
+ color: theme.colors.text,
74
+ left: `${percent * 100}%`,
75
+ },
76
+ ]}
77
+ >
78
+ {label}
79
+ </CommonText>
80
+ );
81
+ })}
82
+ </View>
83
+ </View>
84
+ );
85
+ };
86
+
87
+ const styles = StyleSheet.create({
88
+ container: {
89
+ padding: 20,
90
+ width: '100%',
91
+ },
92
+ sliderBar: {
93
+ width: '100%',
94
+ height: 10,
95
+ },
96
+ filledSliderBar: {
97
+ position: 'absolute',
98
+ left: 0,
99
+ top: 0,
100
+ height: 10,
101
+ borderRadius: 5,
102
+ },
103
+ labelBar: {
104
+ position: 'relative',
105
+ height: 24,
106
+ marginTop: 12,
107
+ },
108
+ labelText: {
109
+ position: 'absolute',
110
+ transform: [{ translateX: -8 }],
111
+ },
112
+ thumb: {
113
+ bottom: 10,
114
+ width: 30,
115
+ height: 30,
116
+ borderRadius: 15,
117
+ },
118
+ });
@@ -0,0 +1,10 @@
1
+ import { type ViewProps } from 'react-native';
2
+
3
+ type Variant = 'primary' | 'secondary';
4
+ type SizeVariant = 's' | 'm' | 'l';
5
+
6
+ export interface SliderProps extends ViewProps {
7
+ type?: Variant;
8
+ size?: SizeVariant;
9
+ labels?: (string | number)[];
10
+ }
package/src/index.tsx CHANGED
@@ -19,5 +19,8 @@ export {
19
19
  CommonSwitch,
20
20
  SocialLoginButton,
21
21
  CommonSpinner,
22
+ CommonSlider,
23
+ CommonSelect,
24
+ SelectItem,
22
25
  } from './components';
23
26
  export { ThemeProvider } from './theme/themeProvider';