@jk-core/components 1.1.16 → 1.1.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 (83) hide show
  1. package/README.md +73 -73
  2. package/dist/index.js +2 -2
  3. package/dist/index.js.map +1 -1
  4. package/dist/index.umd.cjs +1 -1
  5. package/dist/index.umd.cjs.map +1 -1
  6. package/package.json +99 -99
  7. package/src/Calendar/Calendar.module.scss +213 -213
  8. package/src/Calendar/RangeCalendar.tsx +125 -125
  9. package/src/Calendar/ScrollCalendar.module.scss +214 -214
  10. package/src/Calendar/ScrollCalendar.tsx +124 -124
  11. package/src/Calendar/SingleCalendar.tsx +121 -121
  12. package/src/Calendar/components/DateLabel/DateLabel.module.scss +89 -89
  13. package/src/Calendar/components/DateLabel/index.tsx +91 -91
  14. package/src/Calendar/components/DayTile/DayTile.module.scss +117 -117
  15. package/src/Calendar/components/DayTile/index.tsx +108 -108
  16. package/src/Calendar/components/MonthTile/MonthTile.module.scss +59 -59
  17. package/src/Calendar/components/MonthTile/index.tsx +50 -50
  18. package/src/Calendar/components/ViewSelector/ViewSelector.module.scss +48 -48
  19. package/src/Calendar/components/ViewSelector/index.tsx +49 -49
  20. package/src/Calendar/components/YearTile/YearTile.module.scss +85 -85
  21. package/src/Calendar/components/YearTile/index.tsx +65 -65
  22. package/src/Calendar/hooks/useCalendarNav.ts +83 -83
  23. package/src/Calendar/hooks/useDateSelect.ts +54 -54
  24. package/src/Calendar/index.scss +189 -189
  25. package/src/Calendar/index.tsx +66 -66
  26. package/src/Calendar/type.ts +3 -3
  27. package/src/Calendar/utils/getWeeksInMonth.ts +45 -45
  28. package/src/Calendar/utils/isInRange.ts +8 -8
  29. package/src/Calendar/utils/isSameDay.ts +21 -21
  30. package/src/assets/arrow.svg +11 -11
  31. package/src/assets/close.svg +15 -15
  32. package/src/assets/drop-arrow.svg +3 -3
  33. package/src/common/Accordion/Accordion.module.scss +53 -53
  34. package/src/common/Accordion/arrow-down.svg +3 -3
  35. package/src/common/Accordion/arrow-up.svg +3 -3
  36. package/src/common/Accordion/index.tsx +54 -54
  37. package/src/common/Breadcrumbs/Breadcrumbs.module.scss +46 -46
  38. package/src/common/Breadcrumbs/home.svg +5 -5
  39. package/src/common/Breadcrumbs/index.tsx +82 -82
  40. package/src/common/Button/Button.module.scss +127 -127
  41. package/src/common/Button/index.tsx +60 -60
  42. package/src/common/Card/Card.module.scss +28 -28
  43. package/src/common/Card/index.tsx +19 -19
  44. package/src/common/Divider/Divider.module.scss +101 -101
  45. package/src/common/Divider/index.tsx +24 -24
  46. package/src/common/DropDown/DropDown.module.scss +135 -135
  47. package/src/common/DropDown/List.tsx +156 -156
  48. package/src/common/DropDown/arrow-down.svg +3 -3
  49. package/src/common/DropDown/index.tsx +108 -108
  50. package/src/common/DropDown/search.svg +4 -4
  51. package/src/common/Pagination/Pagination.module.scss +210 -210
  52. package/src/common/Pagination/arrow-left.svg +11 -11
  53. package/src/common/Pagination/arrow-right.svg +11 -11
  54. package/src/common/Pagination/index.tsx +156 -156
  55. package/src/common/SegmentButton/SegmentButton.module.scss +45 -45
  56. package/src/common/SegmentButton/index.tsx +79 -79
  57. package/src/common/Skeleton/Skeleton.module.scss +80 -80
  58. package/src/common/Skeleton/index.tsx +47 -47
  59. package/src/common/SwitchButton/SwitchButton.module.scss +65 -65
  60. package/src/common/SwitchButton/index.tsx +57 -56
  61. package/src/common/Table/Table.module.scss +70 -70
  62. package/src/common/Table/index.tsx +128 -128
  63. package/src/index.scss +1 -1
  64. package/src/index.tsx +21 -21
  65. package/src/styles/color.scss +346 -346
  66. package/src/styles/font-face.scss +18 -18
  67. package/src/styles/font.scss +49 -49
  68. package/src/styles/mediaQuery.scss +22 -22
  69. package/src/styles/scrollbar.scss +71 -71
  70. package/src/svg.d.ts +6 -6
  71. package/src/utils/styles/mediaQuery.scss +22 -22
  72. package/src/utils/ts/allowDecimal.ts +4 -4
  73. package/src/utils/ts/autoHypen.ts +33 -33
  74. package/src/utils/ts/calculateMax.ts +24 -24
  75. package/src/utils/ts/checkIsMobilePlatform.ts +15 -15
  76. package/src/utils/ts/formatFileSize.ts +16 -16
  77. package/src/utils/ts/formatMoney.ts +16 -16
  78. package/src/utils/ts/gradientRatio.ts +61 -61
  79. package/src/utils/ts/kiloToMega.ts +30 -30
  80. package/src/utils/ts/maskingPhone.ts +8 -8
  81. package/src/utils/ts/toQueryString.ts +7 -7
  82. package/src/utils/ts/valueAsNumber.ts +15 -15
  83. package/src/vite-env.d.ts +2 -2
@@ -1,124 +1,124 @@
1
- import { useEffect, useRef, useState } from 'react';
2
- import { useIntersectionObserver } from '@jk-core/hooks';
3
- import { cn } from '@jk-core/utils';
4
- import styles from './Calendar.module.scss';
5
- import DateLabel from './components/DateLabel';
6
- import DayTile from './components/DayTile';
7
- import { CalendarRange } from './type';
8
- import getWeeksInMonth from './utils/getWeeksInMonth';
9
-
10
- interface CalendarProps {
11
- className?: string;
12
- date: CalendarRange;
13
- onChange:(date:CalendarRange)=>void;
14
- min: Date;
15
- max: Date;
16
- }
17
-
18
- export default function ScrollCalendar({
19
- className = '', date: selectedDate = [null, null], onChange,
20
- min, max,
21
- }: CalendarProps) {
22
- const maxCount = new Date().getMonth() - min.getMonth()
23
- + 12 * (new Date().getFullYear() - min.getFullYear());
24
- const scrollRef = useRef<HTMLDivElement>(null);
25
- const targetRef = useRef<HTMLDivElement>(null);
26
- const [viewDate, setViewDate] = useState<Date>(selectedDate?.[0] || new Date());
27
- const [hoverDate, setHoverDate] = useState<Date | null>(null);
28
- const [calendarCount, setCalendarCount] = useState(Array.from({
29
- length: Math.abs(viewDate.getMonth() - new Date().getMonth()
30
- + (12 * (viewDate.getFullYear() - new Date().getFullYear() - 1))),
31
- }).map((_, idx) => idx));
32
-
33
- const onDayClick = (day: Date, maintenance = false) => {
34
- if (!maintenance) setViewDate(day);
35
- if (!selectedDate[0] || (!!selectedDate[0] && !!selectedDate[1])) {
36
- onChange([day, null]);
37
- }
38
- if (!!selectedDate[0] && !selectedDate[1]) {
39
- if (day < selectedDate[0]) {
40
- onChange([day, null]);
41
- } else {
42
- onChange([selectedDate[0], day]);
43
- }
44
- }
45
- };
46
-
47
- const handleDateChange = (count: number) => {
48
- const newDate = new Date();
49
- newDate.setMonth(newDate.getMonth() - count);
50
- return newDate;
51
- };
52
-
53
- useEffect(() => {
54
- if (viewDate > max) {
55
- setViewDate(max);
56
- }
57
- if (viewDate < min) {
58
- setViewDate(min);
59
- }
60
- }, [viewDate, max, min]);
61
-
62
- useEffect(() => {
63
- scrollRef.current?.scrollTo({ top: scrollRef.current.scrollHeight });
64
- }, []);
65
-
66
- useIntersectionObserver({
67
- target: targetRef as React.RefObject<HTMLDivElement>,
68
- parent: scrollRef as React.RefObject<HTMLDivElement>,
69
- callback: () => {
70
- if (maxCount < calendarCount.length) return;
71
- const length = maxCount - (calendarCount.length - 1) > 12
72
- ? 12 : maxCount - (calendarCount.length - 1);
73
- setCalendarCount((prev) => [...prev,
74
- ...Array.from({ length }).map((_, i) => prev.length + i)]);
75
- },
76
- options: { threshold: 0.1 },
77
- });
78
-
79
- return (
80
- <div className={cn({
81
- [styles.calendar]: true,
82
- [styles['calendar--range']]: true,
83
- [styles['calendar--scroll']]: true,
84
- [className]: !!className,
85
- })}
86
- >
87
- {/* 일/월/년 선택 버튼 */}
88
- <div className={styles.calendar__scroll} ref={scrollRef}>
89
- {calendarCount.map((count) => (
90
- <div
91
- className={styles['calendar__scroll--wrapper']}
92
- key={count}
93
- ref={(maxCount > (calendarCount.length - 1)
94
- && count === calendarCount.length - 2) ? targetRef : null}
95
- >
96
- <DateLabel
97
- viewDate={handleDateChange(count)}
98
- method="day"
99
- onArrowClick={() => { }}
100
- disabled={() => false}
101
- hideArrow="all"
102
- range
103
- />
104
- <DayTile
105
- style={{ height: 'auto', minHeight: 'auto' }}
106
- hoverDate={hoverDate}
107
- setHoverDate={(day) => setHoverDate(day)}
108
- selectedDate={selectedDate}
109
- weeksInMonth={getWeeksInMonth(handleDateChange(count))}
110
- handleDayClick={onDayClick}
111
- hideAfter
112
- hideBefore
113
- max={max}
114
- min={min}
115
- range
116
- scroll
117
- />
118
- </div>
119
- ))}
120
-
121
- </div>
122
- </div>
123
- );
124
- }
1
+ import { useEffect, useRef, useState } from 'react';
2
+ import { useIntersectionObserver } from '@jk-core/hooks';
3
+ import { cn } from '@jk-core/utils';
4
+ import styles from './Calendar.module.scss';
5
+ import DateLabel from './components/DateLabel';
6
+ import DayTile from './components/DayTile';
7
+ import { CalendarRange } from './type';
8
+ import getWeeksInMonth from './utils/getWeeksInMonth';
9
+
10
+ interface CalendarProps {
11
+ className?: string;
12
+ date: CalendarRange;
13
+ onChange:(date:CalendarRange)=>void;
14
+ min: Date;
15
+ max: Date;
16
+ }
17
+
18
+ export default function ScrollCalendar({
19
+ className = '', date: selectedDate = [null, null], onChange,
20
+ min, max,
21
+ }: CalendarProps) {
22
+ const maxCount = new Date().getMonth() - min.getMonth()
23
+ + 12 * (new Date().getFullYear() - min.getFullYear());
24
+ const scrollRef = useRef<HTMLDivElement>(null);
25
+ const targetRef = useRef<HTMLDivElement>(null);
26
+ const [viewDate, setViewDate] = useState<Date>(selectedDate?.[0] || new Date());
27
+ const [hoverDate, setHoverDate] = useState<Date | null>(null);
28
+ const [calendarCount, setCalendarCount] = useState(Array.from({
29
+ length: Math.abs(viewDate.getMonth() - new Date().getMonth()
30
+ + (12 * (viewDate.getFullYear() - new Date().getFullYear() - 1))),
31
+ }).map((_, idx) => idx));
32
+
33
+ const onDayClick = (day: Date, maintenance = false) => {
34
+ if (!maintenance) setViewDate(day);
35
+ if (!selectedDate[0] || (!!selectedDate[0] && !!selectedDate[1])) {
36
+ onChange([day, null]);
37
+ }
38
+ if (!!selectedDate[0] && !selectedDate[1]) {
39
+ if (day < selectedDate[0]) {
40
+ onChange([day, null]);
41
+ } else {
42
+ onChange([selectedDate[0], day]);
43
+ }
44
+ }
45
+ };
46
+
47
+ const handleDateChange = (count: number) => {
48
+ const newDate = new Date();
49
+ newDate.setMonth(newDate.getMonth() - count);
50
+ return newDate;
51
+ };
52
+
53
+ useEffect(() => {
54
+ if (viewDate > max) {
55
+ setViewDate(max);
56
+ }
57
+ if (viewDate < min) {
58
+ setViewDate(min);
59
+ }
60
+ }, [viewDate, max, min]);
61
+
62
+ useEffect(() => {
63
+ scrollRef.current?.scrollTo({ top: scrollRef.current.scrollHeight });
64
+ }, []);
65
+
66
+ useIntersectionObserver({
67
+ target: targetRef as React.RefObject<HTMLDivElement>,
68
+ parent: scrollRef as React.RefObject<HTMLDivElement>,
69
+ callback: () => {
70
+ if (maxCount < calendarCount.length) return;
71
+ const length = maxCount - (calendarCount.length - 1) > 12
72
+ ? 12 : maxCount - (calendarCount.length - 1);
73
+ setCalendarCount((prev) => [...prev,
74
+ ...Array.from({ length }).map((_, i) => prev.length + i)]);
75
+ },
76
+ options: { threshold: 0.1 },
77
+ });
78
+
79
+ return (
80
+ <div className={cn({
81
+ [styles.calendar]: true,
82
+ [styles['calendar--range']]: true,
83
+ [styles['calendar--scroll']]: true,
84
+ [className]: !!className,
85
+ })}
86
+ >
87
+ {/* 일/월/년 선택 버튼 */}
88
+ <div className={styles.calendar__scroll} ref={scrollRef}>
89
+ {calendarCount.map((count) => (
90
+ <div
91
+ className={styles['calendar__scroll--wrapper']}
92
+ key={count}
93
+ ref={(maxCount > (calendarCount.length - 1)
94
+ && count === calendarCount.length - 2) ? targetRef : null}
95
+ >
96
+ <DateLabel
97
+ viewDate={handleDateChange(count)}
98
+ method="day"
99
+ onArrowClick={() => { }}
100
+ disabled={() => false}
101
+ hideArrow="all"
102
+ range
103
+ />
104
+ <DayTile
105
+ style={{ height: 'auto', minHeight: 'auto' }}
106
+ hoverDate={hoverDate}
107
+ setHoverDate={(day) => setHoverDate(day)}
108
+ selectedDate={selectedDate}
109
+ weeksInMonth={getWeeksInMonth(handleDateChange(count))}
110
+ handleDayClick={onDayClick}
111
+ hideAfter
112
+ hideBefore
113
+ max={max}
114
+ min={min}
115
+ range
116
+ scroll
117
+ />
118
+ </div>
119
+ ))}
120
+
121
+ </div>
122
+ </div>
123
+ );
124
+ }
@@ -1,121 +1,121 @@
1
-
2
- import { useEffect, useState } from 'react';
3
- import { cn } from '@jk-core/utils';
4
- import CloseIcon from '@/assets/close.svg';
5
- import styles from './Calendar.module.scss';
6
- import DateLabel from './components/DateLabel';
7
- import DayTile from './components/DayTile';
8
- import MonthTile from './components/MonthTile';
9
- import ViewSelector from './components/ViewSelector';
10
- import YearTile from './components/YearTile';
11
- import useCalendarNav from './hooks/useCalendarNav';
12
- import useDateSelect from './hooks/useDateSelect';
13
- import { CalendarView } from './type';
14
- import getWeeksInMonth from './utils/getWeeksInMonth';
15
- import './index.scss';
16
-
17
- interface CalendarProps {
18
- className?: string;
19
- date?: Date;
20
- view?: CalendarView;
21
- setView?: (view:CalendarView)=>void;
22
- tileContent?: (date: Date | undefined, view: CalendarView) => React.ReactNode;
23
- onChange?:(date:Date, method?:CalendarView)=>void;
24
- min?: Date;
25
- max?: Date;
26
- onClose?: () => void;
27
- viewSelector?: boolean;
28
- }
29
-
30
- export default function SingleCalendar({
31
- className = '', date: selectedDate, view, setView = () => { }, tileContent, onChange = () => { }, onClose, viewSelector = true,
32
- min = new Date(2000, 0, 1), max = new Date(2099, 11, 31),
33
- }: CalendarProps) {
34
- const [viewDate, setViewDate] = useState<Date>(selectedDate || new Date());
35
- const [method, setMethod] = useState<CalendarView>(view || 'day');
36
- const [selectMode, setSelectMode] = useState<CalendarView>(view || 'day');
37
- const weeksInMonth = getWeeksInMonth(viewDate);
38
- const { onDayClick, onMonthClick, onYearClick } = useDateSelect({
39
- viewDate,
40
- setViewDate: (data) => setViewDate(data),
41
- onChange,
42
- setSelectMode,
43
- method,
44
- setView,
45
- });
46
- const { disabled, onArrowClick } = useCalendarNav({
47
- method, selectMode, viewDate, setDate: setViewDate, min, max,
48
- });
49
-
50
- const selectView = (value: CalendarView) => {
51
- setMethod(value);
52
- setSelectMode(value);
53
- };
54
-
55
- useEffect(() => {
56
- if (viewDate > max) {
57
- setViewDate(max);
58
- }
59
- if (viewDate < min) {
60
- setViewDate(min);
61
- }
62
- }, [viewDate, max, min]);
63
-
64
- return (
65
- <div className={cn({
66
- [styles.calendar]: true,
67
- [className]: !!className,
68
- })}
69
- >
70
- <div className={styles.calendar__close}>
71
- {onClose && (
72
- <CloseIcon onClick={onClose} />
73
- )}
74
- </div>
75
- {/* 일/월/년 선택 버튼 */}
76
- {viewSelector && (
77
- <ViewSelector method={method} selectView={selectView} />
78
- )}
79
- <DateLabel
80
- viewDate={viewDate}
81
- method={method}
82
- onArrowClick={onArrowClick}
83
- disabled={disabled}
84
- selectMode={selectMode}
85
- setSelectMode={setSelectMode}
86
- />
87
-
88
- {(method === 'day' && selectMode === 'day') && (
89
- <DayTile
90
- selectedDate={[selectedDate, null]}
91
- weeksInMonth={weeksInMonth}
92
- handleDayClick={onDayClick}
93
- tileContent={() => (tileContent ? tileContent(selectedDate, method) : null)}
94
- max={max}
95
- min={min}
96
- />
97
- )}
98
-
99
- {((method === 'month' || selectMode === 'month') && selectMode !== 'year') && (
100
- <MonthTile
101
- selectedDate={selectedDate}
102
- viewDate={viewDate}
103
- handleMonthClick={onMonthClick}
104
- tileContent={tileContent}
105
- max={max}
106
- min={min}
107
- />
108
- )}
109
-
110
- {(method === 'year' || selectMode === 'year') && (
111
- <YearTile
112
- selectedDate={selectedDate}
113
- onClick={onYearClick}
114
- tileContent={tileContent}
115
- max={max}
116
- min={min}
117
- />
118
- )}
119
- </div>
120
- );
121
- }
1
+
2
+ import { useEffect, useState } from 'react';
3
+ import { cn } from '@jk-core/utils';
4
+ import CloseIcon from '@/assets/close.svg';
5
+ import styles from './Calendar.module.scss';
6
+ import DateLabel from './components/DateLabel';
7
+ import DayTile from './components/DayTile';
8
+ import MonthTile from './components/MonthTile';
9
+ import ViewSelector from './components/ViewSelector';
10
+ import YearTile from './components/YearTile';
11
+ import useCalendarNav from './hooks/useCalendarNav';
12
+ import useDateSelect from './hooks/useDateSelect';
13
+ import { CalendarView } from './type';
14
+ import getWeeksInMonth from './utils/getWeeksInMonth';
15
+ import './index.scss';
16
+
17
+ interface CalendarProps {
18
+ className?: string;
19
+ date?: Date;
20
+ view?: CalendarView;
21
+ setView?: (view:CalendarView)=>void;
22
+ tileContent?: (date: Date | undefined, view: CalendarView) => React.ReactNode;
23
+ onChange?:(date:Date, method?:CalendarView)=>void;
24
+ min?: Date;
25
+ max?: Date;
26
+ onClose?: () => void;
27
+ viewSelector?: boolean;
28
+ }
29
+
30
+ export default function SingleCalendar({
31
+ className = '', date: selectedDate, view, setView = () => { }, tileContent, onChange = () => { }, onClose, viewSelector = true,
32
+ min = new Date(2000, 0, 1), max = new Date(2099, 11, 31),
33
+ }: CalendarProps) {
34
+ const [viewDate, setViewDate] = useState<Date>(selectedDate || new Date());
35
+ const [method, setMethod] = useState<CalendarView>(view || 'day');
36
+ const [selectMode, setSelectMode] = useState<CalendarView>(view || 'day');
37
+ const weeksInMonth = getWeeksInMonth(viewDate);
38
+ const { onDayClick, onMonthClick, onYearClick } = useDateSelect({
39
+ viewDate,
40
+ setViewDate: (data) => setViewDate(data),
41
+ onChange,
42
+ setSelectMode,
43
+ method,
44
+ setView,
45
+ });
46
+ const { disabled, onArrowClick } = useCalendarNav({
47
+ method, selectMode, viewDate, setDate: setViewDate, min, max,
48
+ });
49
+
50
+ const selectView = (value: CalendarView) => {
51
+ setMethod(value);
52
+ setSelectMode(value);
53
+ };
54
+
55
+ useEffect(() => {
56
+ if (viewDate > max) {
57
+ setViewDate(max);
58
+ }
59
+ if (viewDate < min) {
60
+ setViewDate(min);
61
+ }
62
+ }, [viewDate, max, min]);
63
+
64
+ return (
65
+ <div className={cn({
66
+ [styles.calendar]: true,
67
+ [className]: !!className,
68
+ })}
69
+ >
70
+ <div className={styles.calendar__close}>
71
+ {onClose && (
72
+ <CloseIcon onClick={onClose} />
73
+ )}
74
+ </div>
75
+ {/* 일/월/년 선택 버튼 */}
76
+ {viewSelector && (
77
+ <ViewSelector method={method} selectView={selectView} />
78
+ )}
79
+ <DateLabel
80
+ viewDate={viewDate}
81
+ method={method}
82
+ onArrowClick={onArrowClick}
83
+ disabled={disabled}
84
+ selectMode={selectMode}
85
+ setSelectMode={setSelectMode}
86
+ />
87
+
88
+ {(method === 'day' && selectMode === 'day') && (
89
+ <DayTile
90
+ selectedDate={[selectedDate, null]}
91
+ weeksInMonth={weeksInMonth}
92
+ handleDayClick={onDayClick}
93
+ tileContent={() => (tileContent ? tileContent(selectedDate, method) : null)}
94
+ max={max}
95
+ min={min}
96
+ />
97
+ )}
98
+
99
+ {((method === 'month' || selectMode === 'month') && selectMode !== 'year') && (
100
+ <MonthTile
101
+ selectedDate={selectedDate}
102
+ viewDate={viewDate}
103
+ handleMonthClick={onMonthClick}
104
+ tileContent={tileContent}
105
+ max={max}
106
+ min={min}
107
+ />
108
+ )}
109
+
110
+ {(method === 'year' || selectMode === 'year') && (
111
+ <YearTile
112
+ selectedDate={selectedDate}
113
+ onClick={onYearClick}
114
+ tileContent={tileContent}
115
+ max={max}
116
+ min={min}
117
+ />
118
+ )}
119
+ </div>
120
+ );
121
+ }
@@ -1,89 +1,89 @@
1
- @use "../../../styles/mediaQuery.scss" as media;
2
-
3
- .nav {
4
- height: 60px;
5
- display: flex;
6
- justify-content: space-between;
7
- align-items: center;
8
- padding: 0 5px;
9
- border-bottom: 1px solid var(--calendar-G-30);
10
- font-size: 1.3em;
11
- font-weight: 400;
12
-
13
- &--range {
14
- border-bottom: none;
15
- }
16
-
17
- &--left {
18
- padding-left: 40px;
19
- justify-content: flex-start;
20
- }
21
-
22
- &__button {
23
- display: flex;
24
- align-items: center;
25
- justify-content: center;
26
- width: 40px;
27
- height: 40px;
28
- padding: 10px;
29
- border-radius: 100%;
30
-
31
- svg {
32
- width: 100%;
33
- height: 100%;
34
- fill: var(--calendar-G-60);
35
- }
36
-
37
- &:hover {
38
- @include media.pc {
39
- background-color: var(--calendar-G-10);
40
- }
41
- }
42
-
43
- &:active {
44
- background-color: var(--calendar-G-30);
45
- }
46
-
47
- &:disabled {
48
- cursor: not-allowed;
49
- background-color: transparent;
50
-
51
- svg {
52
- fill: var(--calendar-G-40);
53
- }
54
- }
55
- }
56
-
57
- &__label {
58
- flex: 1 0;
59
- display: flex;
60
- align-items: center;
61
- justify-content: space-around;
62
- font-size: 1.1em;
63
- font-weight: 400;
64
-
65
- &--left {
66
- text-align: left;
67
- justify-content: flex-start;
68
- }
69
-
70
- &--date {
71
- display: flex;
72
- align-items: center;
73
- justify-content: center;
74
- border-radius: 5px;
75
- padding: 5px 10px;
76
- font-weight: 400;
77
- font-size: 1em;
78
-
79
- svg {
80
- width: 15px;
81
- height: 15px;
82
- }
83
- }
84
-
85
- &--date-selected {
86
- background-color: var(--calendar-S-10);
87
- }
88
- }
89
- }
1
+ @use "../../../styles/mediaQuery.scss" as media;
2
+
3
+ .nav {
4
+ height: 60px;
5
+ display: flex;
6
+ justify-content: space-between;
7
+ align-items: center;
8
+ padding: 0 5px;
9
+ border-bottom: 1px solid var(--calendar-G-30);
10
+ font-size: 1.3em;
11
+ font-weight: 400;
12
+
13
+ &--range {
14
+ border-bottom: none;
15
+ }
16
+
17
+ &--left {
18
+ padding-left: 40px;
19
+ justify-content: flex-start;
20
+ }
21
+
22
+ &__button {
23
+ display: flex;
24
+ align-items: center;
25
+ justify-content: center;
26
+ width: 40px;
27
+ height: 40px;
28
+ padding: 10px;
29
+ border-radius: 100%;
30
+
31
+ svg {
32
+ width: 100%;
33
+ height: 100%;
34
+ fill: var(--calendar-G-60);
35
+ }
36
+
37
+ &:hover {
38
+ @include media.pc {
39
+ background-color: var(--calendar-G-10);
40
+ }
41
+ }
42
+
43
+ &:active {
44
+ background-color: var(--calendar-G-30);
45
+ }
46
+
47
+ &:disabled {
48
+ cursor: not-allowed;
49
+ background-color: transparent;
50
+
51
+ svg {
52
+ fill: var(--calendar-G-40);
53
+ }
54
+ }
55
+ }
56
+
57
+ &__label {
58
+ flex: 1 0;
59
+ display: flex;
60
+ align-items: center;
61
+ justify-content: space-around;
62
+ font-size: 1.1em;
63
+ font-weight: 400;
64
+
65
+ &--left {
66
+ text-align: left;
67
+ justify-content: flex-start;
68
+ }
69
+
70
+ &--date {
71
+ display: flex;
72
+ align-items: center;
73
+ justify-content: center;
74
+ border-radius: 5px;
75
+ padding: 5px 10px;
76
+ font-weight: 400;
77
+ font-size: 1em;
78
+
79
+ svg {
80
+ width: 15px;
81
+ height: 15px;
82
+ }
83
+ }
84
+
85
+ &--date-selected {
86
+ background-color: var(--calendar-S-10);
87
+ }
88
+ }
89
+ }