@tipp/ui 1.0.15 → 1.0.17

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 (45) hide show
  1. package/dist/atoms/date-picker/index.cjs +17 -21
  2. package/dist/atoms/date-picker/index.cjs.map +1 -1
  3. package/dist/atoms/date-picker/index.js +1 -1
  4. package/dist/atoms/index.cjs +40 -44
  5. package/dist/atoms/index.cjs.map +1 -1
  6. package/dist/atoms/index.js +1 -1
  7. package/dist/chunk-32OZT4OK.js +90 -0
  8. package/dist/chunk-32OZT4OK.js.map +1 -0
  9. package/dist/chunk-5IZLQXL4.js +90 -0
  10. package/dist/chunk-5IZLQXL4.js.map +1 -0
  11. package/dist/chunk-7D36NQEO.js +90 -0
  12. package/dist/chunk-7D36NQEO.js.map +1 -0
  13. package/dist/chunk-C22CECJM.js +104 -0
  14. package/dist/chunk-C22CECJM.js.map +1 -0
  15. package/dist/chunk-CAJUJW32.js +104 -0
  16. package/dist/chunk-CAJUJW32.js.map +1 -0
  17. package/dist/chunk-FNESQT4Z.js +119 -0
  18. package/dist/chunk-FNESQT4Z.js.map +1 -0
  19. package/dist/chunk-L4L52UN2.js +90 -0
  20. package/dist/chunk-L4L52UN2.js.map +1 -0
  21. package/dist/chunk-NHDSSLCS.js +119 -0
  22. package/dist/chunk-NHDSSLCS.js.map +1 -0
  23. package/dist/chunk-QGJ4SOE6.js +86 -0
  24. package/dist/chunk-QGJ4SOE6.js.map +1 -0
  25. package/dist/chunk-RN7U56ND.js +90 -0
  26. package/dist/chunk-RN7U56ND.js.map +1 -0
  27. package/dist/chunk-UCNZ7CO7.js +90 -0
  28. package/dist/chunk-UCNZ7CO7.js.map +1 -0
  29. package/dist/index.cjs +50 -54
  30. package/dist/index.cjs.map +1 -1
  31. package/dist/index.js +1 -1
  32. package/dist/molecules/expand-table/index.cjs +38 -42
  33. package/dist/molecules/expand-table/index.cjs.map +1 -1
  34. package/dist/molecules/expand-table/index.js +1 -1
  35. package/dist/molecules/expand-table/row.cjs +31 -35
  36. package/dist/molecules/expand-table/row.cjs.map +1 -1
  37. package/dist/molecules/expand-table/row.js +1 -1
  38. package/dist/molecules/index.cjs +38 -42
  39. package/dist/molecules/index.cjs.map +1 -1
  40. package/dist/molecules/index.js +1 -1
  41. package/dist/molecules/navigation.cjs +24 -28
  42. package/dist/molecules/navigation.cjs.map +1 -1
  43. package/dist/molecules/navigation.js +1 -1
  44. package/package.json +3 -3
  45. package/src/atoms/date-picker/index.tsx +41 -122
@@ -1,5 +1,5 @@
1
- import type { ElementRef } from 'react';
2
- import React, { forwardRef } from 'react';
1
+ // import type { ElementRef } from 'react';
2
+ import React from 'react';
3
3
  import type { DatePickerProps as ReactDatePickerProps } from 'react-datepicker';
4
4
  import ReactDatePicker from 'react-datepicker';
5
5
  import { IconButton } from '../icon-button';
@@ -7,31 +7,49 @@ import { Flex } from '../flex';
7
7
  import { ChevronLeftIcon, ChevronRightIcon } from '../../icon';
8
8
  import { Heading } from '../heading';
9
9
 
10
- type DatePickerProps = ReactDatePickerProps & {
10
+ export type DatePickerProps = ReactDatePickerProps & {
11
11
  size?: 'small' | 'medium' | 'large';
12
12
  };
13
- type DatePickerRef = ElementRef<typeof ReactDatePicker>;
13
+ // type DatePickerRef = ElementRef<typeof ReactDatePicker>;
14
14
 
15
- const DatePicker = forwardRef<DatePickerRef, DatePickerProps>(
16
- (props: DatePickerProps, ref): React.ReactNode => {
17
- const { size = 'medium', ...rest } = props;
15
+ export function DatePicker(props: DatePickerProps): React.ReactNode {
16
+ const { size = 'medium', ...rest } = props;
18
17
 
19
- return (
20
- <ReactDatePicker
21
- placeholderText="yyyy/mm/dd"
22
- ref={ref}
23
- showPopperArrow={false}
24
- {...rest}
25
- calendarClassName={`tipp_datePicker_calendar ${rest.calendarClassName || ''}`}
26
- dateFormat="yyyy/MM/dd"
27
- nextMonthButtonLabel="다음 달"
28
- previousMonthButtonLabel="이전 달"
29
- renderCustomHeader={renderCustomHeader}
30
- wrapperClassName={`tipp_datePicker ${size} ${rest.wrapperClassName || ''}`}
31
- />
32
- );
33
- }
34
- );
18
+ return (
19
+ <ReactDatePicker
20
+ placeholderText="yyyy/mm/dd"
21
+ showPopperArrow={false}
22
+ {...rest}
23
+ calendarClassName={`tipp_datePicker_calendar ${rest.calendarClassName || ''}`}
24
+ dateFormat="yyyy/MM/dd"
25
+ nextMonthButtonLabel="다음 달"
26
+ previousMonthButtonLabel="이전 달"
27
+ renderCustomHeader={renderCustomHeader}
28
+ wrapperClassName={`tipp_datePicker ${size} ${rest.wrapperClassName || ''}`}
29
+ />
30
+ );
31
+ }
32
+
33
+ // export const DatePicker = forwardRef<DatePickerRef, DatePickerProps>(
34
+ // (props, ref): React.ReactNode => {
35
+ // const { size = 'medium', ...rest } = props;
36
+
37
+ // return (
38
+ // <ReactDatePicker
39
+ // placeholderText="yyyy/mm/dd"
40
+ // ref={ref}
41
+ // showPopperArrow={false}
42
+ // {...rest}
43
+ // calendarClassName={`tipp_datePicker_calendar ${rest.calendarClassName || ''}`}
44
+ // dateFormat="yyyy/MM/dd"
45
+ // nextMonthButtonLabel="다음 달"
46
+ // previousMonthButtonLabel="이전 달"
47
+ // renderCustomHeader={renderCustomHeader}
48
+ // wrapperClassName={`tipp_datePicker ${size} ${rest.wrapperClassName || ''}`}
49
+ // />
50
+ // );
51
+ // }
52
+ // );
35
53
  const renderCustomHeader: ReactDatePickerProps['renderCustomHeader'] = (
36
54
  props
37
55
  ) => {
@@ -75,103 +93,4 @@ const renderCustomHeader: ReactDatePickerProps['renderCustomHeader'] = (
75
93
  );
76
94
  };
77
95
 
78
- // const renderCustomHeader: ReactDatePickerProps['renderCustomHeader'] = (
79
- // props
80
- // ) => {
81
- // const {
82
- // date,
83
- // decreaseMonth,
84
- // increaseMonth,
85
- // changeMonth,
86
- // changeYear,
87
- // prevMonthButtonDisabled,
88
- // nextMonthButtonDisabled,
89
- // } = props;
90
-
91
- // const SelectTriggerProps: Select.TriggerProps = {
92
- // variant: 'ghost',
93
- // };
94
- // const year = date.getFullYear();
95
- // const month = date.getMonth();
96
-
97
- // return (
98
- // <Flex align="center" justify="between" pb="2" pl="2" pr="2">
99
- // <IconButton
100
- // disabled={prevMonthButtonDisabled}
101
- // onClick={decreaseMonth}
102
- // variant="ghost"
103
- // >
104
- // <ChevronLeftIcon />
105
- // </IconButton>
106
- // <Flex gap="3">
107
- // <Select.Root
108
- // onValueChange={(value) => {
109
- // console.log({ value });
110
- // changeYear(Number(value));
111
- // }}
112
- // value={year.toString()}
113
- // >
114
- // <Select.Trigger {...SelectTriggerProps}>
115
- // <Heading variant="subtitle1" weight="regular">
116
- // {year}년
117
- // </Heading>
118
- // </Select.Trigger>
119
- // <Select.Content>
120
- // {Array.from({ length: 5 })
121
- // .map((_, i) => {
122
- // const toYear = new Date().getFullYear();
123
- // const v = toYear + i + 1;
124
- // return (
125
- // <Select.Item key={v} value={v.toString()}>
126
- // {v}년
127
- // </Select.Item>
128
- // );
129
- // })
130
- // .reverse()}
131
-
132
- // {Array.from({ length: 60 }).map((_, i) => {
133
- // const toYear = new Date().getFullYear();
134
- // const v = toYear - i;
135
- // return (
136
- // <Select.Item key={v} value={v.toString()}>
137
- // {v}년
138
- // </Select.Item>
139
- // );
140
- // })}
141
- // </Select.Content>
142
- // </Select.Root>
143
- // <Select.Root
144
- // onValueChange={(value) => {
145
- // changeMonth(Number(value));
146
- // }}
147
- // value={month.toString()}
148
- // >
149
- // <Select.Trigger {...SelectTriggerProps}>
150
- // <Heading variant="subtitle1" weight="regular">
151
- // {month + 1}월
152
- // </Heading>
153
- // </Select.Trigger>
154
- // <Select.Content>
155
- // {[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].map((m) => (
156
- // <Select.Item key={m} value={m.toString()}>
157
- // {m + 1}월
158
- // </Select.Item>
159
- // ))}
160
- // </Select.Content>
161
- // </Select.Root>
162
- // </Flex>
163
-
164
- // <IconButton
165
- // disabled={nextMonthButtonDisabled}
166
- // onClick={increaseMonth}
167
- // variant="ghost"
168
- // >
169
- // <ChevronRightIcon />
170
- // </IconButton>
171
- // </Flex>
172
- // );
173
- // };
174
-
175
96
  DatePicker.displayName = 'DatePicker';
176
-
177
- export { DatePicker, type DatePickerProps };