@chayns-components/date 5.0.0-beta.457 → 5.0.0-beta.458
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.
- package/lib/components/calendar/month-wrapper/MonthWrapper.d.ts +1 -1
- package/lib/components/calendar/month-wrapper/MonthWrapper.js +3 -3
- package/lib/components/calendar/month-wrapper/MonthWrapper.js.map +1 -1
- package/lib/components/calendar/month-wrapper/MonthWrapper.styles.d.ts +21 -21
- package/lib/components/calendar/month-wrapper/MonthWrapper.styles.js +3 -3
- package/lib/components/calendar/month-wrapper/MonthWrapper.styles.js.map +1 -1
- package/lib/components/calendar/month-wrapper/month/day-wrapper/day/Day.js +7 -7
- package/lib/components/calendar/month-wrapper/month/day-wrapper/day/Day.js.map +1 -1
- package/lib/components/calendar/month-wrapper/month/day-wrapper/day/Day.styles.d.ts +5 -5
- package/lib/components/calendar/month-wrapper/month/day-wrapper/day/Day.styles.js +13 -13
- package/lib/components/calendar/month-wrapper/month/day-wrapper/day/Day.styles.js.map +1 -1
- package/lib/components/calendar/month-wrapper/month/day-wrapper/day/category/Category.d.ts +1 -1
- package/lib/components/calendar/month-wrapper/month/day-wrapper/day/category/Category.js +1 -1
- package/lib/components/calendar/month-wrapper/month/day-wrapper/day/category/Category.js.map +1 -1
- package/lib/components/calendar/month-wrapper/month/day-wrapper/day/category/Category.styles.d.ts +1 -1
- package/lib/components/calendar/month-wrapper/month/day-wrapper/day/category/Category.styles.js +2 -2
- package/lib/components/calendar/month-wrapper/month/day-wrapper/day/category/Category.styles.js.map +1 -1
- package/lib/components/opening-times/OpeningTimes.styles.d.ts +1 -1
- package/lib/components/opening-times/OpeningTimes.styles.js.map +1 -1
- package/lib/components/opening-times/opening-inputs/opening-input/OpeningInput.js +2 -2
- package/lib/components/opening-times/opening-inputs/opening-input/OpeningInput.js.map +1 -1
- package/lib/components/opening-times/opening-inputs/opening-input/OpeningInput.styles.d.ts +21 -21
- package/lib/components/opening-times/opening-inputs/opening-input/OpeningInput.styles.js +3 -3
- package/lib/components/opening-times/opening-inputs/opening-input/OpeningInput.styles.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useEffect, useMemo, useState } from 'react';
|
|
2
|
-
import { StyledMonthWrapper, StyledMotionWrapper } from './MonthWrapper.styles';
|
|
3
|
-
import Month from './month/Month';
|
|
4
2
|
import { getMonthAndYear, getNewDate } from '../../../utils/calendar';
|
|
3
|
+
import Month from './month/Month';
|
|
4
|
+
import { StyledMonthWrapper, StyledMotionWrapper } from './MonthWrapper.styles';
|
|
5
5
|
const MonthWrapper = _ref => {
|
|
6
6
|
let {
|
|
7
7
|
locale,
|
|
@@ -113,7 +113,7 @@ const MonthWrapper = _ref => {
|
|
|
113
113
|
}
|
|
114
114
|
}, [direction, shouldRenderTwo]);
|
|
115
115
|
return /*#__PURE__*/React.createElement(StyledMonthWrapper, {
|
|
116
|
-
height: shouldRenderTwo ? width / 2 : width
|
|
116
|
+
$height: shouldRenderTwo ? width / 2 : width
|
|
117
117
|
}, /*#__PURE__*/React.createElement(StyledMotionWrapper, {
|
|
118
118
|
animate: animate,
|
|
119
119
|
transition: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MonthWrapper.js","names":["React","useEffect","useMemo","useState","
|
|
1
|
+
{"version":3,"file":"MonthWrapper.js","names":["React","useEffect","useMemo","useState","getMonthAndYear","getNewDate","Month","StyledMonthWrapper","StyledMotionWrapper","MonthWrapper","_ref","locale","currentDate","highlightedDates","selectedDate","onSelect","categories","direction","onAnimationFinished","shouldRenderTwo","width","content","setContent","prevState","items","i","date","month","year","push","createElement","key","unshift","pop","shift","animate","x","$height","transition","type","duration","onAnimationComplete","displayName"],"sources":["../../../../src/components/calendar/month-wrapper/MonthWrapper.tsx"],"sourcesContent":["import type { Locale } from 'date-fns';\nimport type { MotionProps } from 'framer-motion';\nimport React, { FC, useEffect, useMemo, useState, type ReactElement } from 'react';\nimport type { Categories, HighlightedDates } from '../../../types/calendar';\nimport { getMonthAndYear, getNewDate } from '../../../utils/calendar';\nimport Month from './month/Month';\nimport { StyledMonthWrapper, StyledMotionWrapper } from './MonthWrapper.styles';\n\nexport type MonthWrapperProps = {\n locale: Locale;\n highlightedDates?: HighlightedDates[];\n onSelect: (date: Date) => void;\n selectedDate?: Date;\n categories?: Categories[];\n currentDate: Date;\n direction?: 'left' | 'right';\n onAnimationFinished: () => void;\n shouldRenderTwo: boolean;\n width: number;\n};\n\nconst MonthWrapper: FC<MonthWrapperProps> = ({\n locale,\n currentDate,\n highlightedDates,\n selectedDate,\n onSelect,\n categories,\n direction,\n onAnimationFinished,\n shouldRenderTwo,\n width,\n}) => {\n const [content, setContent] = useState<ReactElement[]>();\n\n useEffect(() => {\n setContent((prevState) => {\n // Initial render of months\n if (!prevState) {\n const items: ReactElement[] = [];\n\n for (let i = -1; i < 3; i++) {\n const date = getNewDate(i, currentDate);\n\n const { month, year } = getMonthAndYear(date);\n\n items.push(\n <Month\n key={`${month}-${year}`}\n month={month}\n year={year}\n locale={locale}\n onSelect={onSelect}\n highlightedDates={highlightedDates}\n categories={categories}\n selectedDate={selectedDate}\n />,\n );\n }\n\n return items;\n }\n\n if (direction === 'left') {\n const date = getNewDate(-1, currentDate);\n\n const { month, year } = getMonthAndYear(date);\n\n prevState.unshift(\n <Month\n key={`${month}-${year}`}\n month={month}\n year={year}\n locale={locale}\n onSelect={onSelect}\n highlightedDates={highlightedDates}\n categories={categories}\n selectedDate={selectedDate}\n />,\n );\n prevState.pop();\n }\n\n if (direction === 'right') {\n const date = getNewDate(2, currentDate);\n\n const { month, year } = getMonthAndYear(date);\n\n prevState.push(\n <Month\n key={`${month}-${year}`}\n month={month}\n year={year}\n locale={locale}\n onSelect={onSelect}\n highlightedDates={highlightedDates}\n categories={categories}\n selectedDate={selectedDate}\n />,\n );\n prevState.shift();\n }\n\n return prevState;\n });\n }, [categories, currentDate, direction, highlightedDates, locale, onSelect, selectedDate]);\n\n const animate: MotionProps['animate'] = useMemo(() => {\n if (shouldRenderTwo) {\n switch (true) {\n case direction === 'left':\n return { x: '0%' };\n case direction === 'right':\n return { x: '-100%' };\n default:\n return { x: '-50%' };\n }\n } else {\n switch (true) {\n case direction === 'left':\n return { x: '0%' };\n case direction === 'right':\n return { x: '-200%' };\n default:\n return { x: '-100%' };\n }\n }\n }, [direction, shouldRenderTwo]);\n\n return (\n <StyledMonthWrapper $height={shouldRenderTwo ? width / 2 : width}>\n <StyledMotionWrapper\n animate={animate}\n transition={{\n type: 'tween',\n duration: !direction ? 0 : 0.2,\n }}\n onAnimationComplete={onAnimationFinished}\n >\n {content}\n </StyledMotionWrapper>\n </StyledMonthWrapper>\n );\n};\n\nMonthWrapper.displayName = 'MonthWrapper';\n\nexport default MonthWrapper;\n"],"mappings":"AAEA,OAAOA,KAAK,IAAQC,SAAS,EAAEC,OAAO,EAAEC,QAAQ,QAA2B,OAAO;AAElF,SAASC,eAAe,EAAEC,UAAU,QAAQ,yBAAyB;AACrE,OAAOC,KAAK,MAAM,eAAe;AACjC,SAASC,kBAAkB,EAAEC,mBAAmB,QAAQ,uBAAuB;AAe/E,MAAMC,YAAmC,GAAGC,IAAA,IAWtC;EAAA,IAXuC;IACzCC,MAAM;IACNC,WAAW;IACXC,gBAAgB;IAChBC,YAAY;IACZC,QAAQ;IACRC,UAAU;IACVC,SAAS;IACTC,mBAAmB;IACnBC,eAAe;IACfC;EACJ,CAAC,GAAAV,IAAA;EACG,MAAM,CAACW,OAAO,EAAEC,UAAU,CAAC,GAAGnB,QAAQ,CAAiB,CAAC;EAExDF,SAAS,CAAC,MAAM;IACZqB,UAAU,CAAEC,SAAS,IAAK;MACtB;MACA,IAAI,CAACA,SAAS,EAAE;QACZ,MAAMC,KAAqB,GAAG,EAAE;QAEhC,KAAK,IAAIC,CAAC,GAAG,CAAC,CAAC,EAAEA,CAAC,GAAG,CAAC,EAAEA,CAAC,EAAE,EAAE;UACzB,MAAMC,IAAI,GAAG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,GAAGA;EAAM,gBAC7DpB,KAAA,CAAA8B,aAAA,CAACtB,mBAAmB;IAChB2B,OAAO,EAAEA,OAAQ;IACjBG,UAAU,EAAE;MACRC,IAAI,EAAE,OAAO;MACbC,QAAQ,EAAE,CAACvB,SAAS,GAAG,CAAC,GAAG;IAC/B,CAAE;IACFwB,mBAAmB,EAAEvB;EAAoB,GAExCG,OACgB,CACL,CAAC;AAE7B,CAAC;AAEDZ,YAAY,CAACiC,WAAW,GAAG,cAAc;AAEzC,eAAejC,YAAY"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// <reference types="react" />
|
|
3
3
|
import type { WithTheme } from '@chayns-components/core';
|
|
4
4
|
type StyledMonthWrapperProps = WithTheme<{
|
|
5
|
-
height: number;
|
|
5
|
+
$height: number;
|
|
6
6
|
}>;
|
|
7
7
|
export declare const StyledMonthWrapper: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledMonthWrapperProps>>;
|
|
8
8
|
export declare const StyledMotionWrapper: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<{
|
|
@@ -14,16 +14,16 @@ export declare const StyledMotionWrapper: import("styled-components").IStyledCom
|
|
|
14
14
|
accessKey?: string | undefined;
|
|
15
15
|
autoFocus?: boolean | undefined;
|
|
16
16
|
className?: string | undefined;
|
|
17
|
-
contentEditable?: "inherit" | (boolean | "
|
|
17
|
+
contentEditable?: "inherit" | (boolean | "false" | "true") | "plaintext-only" | undefined;
|
|
18
18
|
contextMenu?: string | undefined;
|
|
19
19
|
dir?: string | undefined;
|
|
20
|
-
draggable?: (boolean | "
|
|
20
|
+
draggable?: (boolean | "false" | "true") | undefined;
|
|
21
21
|
hidden?: boolean | undefined;
|
|
22
22
|
id?: string | undefined;
|
|
23
23
|
lang?: string | undefined;
|
|
24
24
|
nonce?: string | undefined;
|
|
25
25
|
slot?: string | undefined;
|
|
26
|
-
spellCheck?: (boolean | "
|
|
26
|
+
spellCheck?: (boolean | "false" | "true") | undefined;
|
|
27
27
|
tabIndex?: number | undefined;
|
|
28
28
|
title?: string | undefined;
|
|
29
29
|
translate?: "yes" | "no" | undefined;
|
|
@@ -54,52 +54,52 @@ export declare const StyledMotionWrapper: import("styled-components").IStyledCom
|
|
|
54
54
|
inputMode?: "none" | "text" | "search" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
55
55
|
is?: string | undefined;
|
|
56
56
|
"aria-activedescendant"?: string | undefined;
|
|
57
|
-
"aria-atomic"?: (boolean | "
|
|
57
|
+
"aria-atomic"?: (boolean | "false" | "true") | undefined;
|
|
58
58
|
"aria-autocomplete"?: "none" | "list" | "both" | "inline" | undefined;
|
|
59
59
|
"aria-braillelabel"?: string | undefined;
|
|
60
60
|
"aria-brailleroledescription"?: string | undefined;
|
|
61
|
-
"aria-busy"?: (boolean | "
|
|
62
|
-
"aria-checked"?: boolean | "
|
|
61
|
+
"aria-busy"?: (boolean | "false" | "true") | undefined;
|
|
62
|
+
"aria-checked"?: boolean | "mixed" | "false" | "true" | undefined;
|
|
63
63
|
"aria-colcount"?: number | undefined;
|
|
64
64
|
"aria-colindex"?: number | undefined;
|
|
65
65
|
"aria-colindextext"?: string | undefined;
|
|
66
66
|
"aria-colspan"?: number | undefined;
|
|
67
67
|
"aria-controls"?: string | undefined;
|
|
68
|
-
"aria-current"?: boolean | "time" | "
|
|
68
|
+
"aria-current"?: boolean | "time" | "step" | "page" | "false" | "true" | "date" | "location" | undefined;
|
|
69
69
|
"aria-describedby"?: string | undefined;
|
|
70
70
|
"aria-description"?: string | undefined;
|
|
71
71
|
"aria-details"?: string | undefined;
|
|
72
|
-
"aria-disabled"?: (boolean | "
|
|
72
|
+
"aria-disabled"?: (boolean | "false" | "true") | undefined;
|
|
73
73
|
"aria-dropeffect"?: "none" | "link" | "copy" | "move" | "execute" | "popup" | undefined;
|
|
74
74
|
"aria-errormessage"?: string | undefined;
|
|
75
|
-
"aria-expanded"?: (boolean | "
|
|
75
|
+
"aria-expanded"?: (boolean | "false" | "true") | undefined;
|
|
76
76
|
"aria-flowto"?: string | undefined;
|
|
77
|
-
"aria-grabbed"?: (boolean | "
|
|
78
|
-
"aria-haspopup"?: boolean | "dialog" | "menu" | "
|
|
79
|
-
"aria-hidden"?: (boolean | "
|
|
80
|
-
"aria-invalid"?: boolean | "
|
|
77
|
+
"aria-grabbed"?: (boolean | "false" | "true") | undefined;
|
|
78
|
+
"aria-haspopup"?: boolean | "dialog" | "menu" | "listbox" | "grid" | "false" | "true" | "tree" | undefined;
|
|
79
|
+
"aria-hidden"?: (boolean | "false" | "true") | undefined;
|
|
80
|
+
"aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
|
|
81
81
|
"aria-keyshortcuts"?: string | undefined;
|
|
82
82
|
"aria-label"?: string | undefined;
|
|
83
83
|
"aria-labelledby"?: string | undefined;
|
|
84
84
|
"aria-level"?: number | undefined;
|
|
85
85
|
"aria-live"?: "off" | "assertive" | "polite" | undefined;
|
|
86
|
-
"aria-modal"?: (boolean | "
|
|
87
|
-
"aria-multiline"?: (boolean | "
|
|
88
|
-
"aria-multiselectable"?: (boolean | "
|
|
86
|
+
"aria-modal"?: (boolean | "false" | "true") | undefined;
|
|
87
|
+
"aria-multiline"?: (boolean | "false" | "true") | undefined;
|
|
88
|
+
"aria-multiselectable"?: (boolean | "false" | "true") | undefined;
|
|
89
89
|
"aria-orientation"?: "horizontal" | "vertical" | undefined;
|
|
90
90
|
"aria-owns"?: string | undefined;
|
|
91
91
|
"aria-placeholder"?: string | undefined;
|
|
92
92
|
"aria-posinset"?: number | undefined;
|
|
93
|
-
"aria-pressed"?: boolean | "
|
|
94
|
-
"aria-readonly"?: (boolean | "
|
|
93
|
+
"aria-pressed"?: boolean | "mixed" | "false" | "true" | undefined;
|
|
94
|
+
"aria-readonly"?: (boolean | "false" | "true") | undefined;
|
|
95
95
|
"aria-relevant"?: "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
|
|
96
|
-
"aria-required"?: (boolean | "
|
|
96
|
+
"aria-required"?: (boolean | "false" | "true") | undefined;
|
|
97
97
|
"aria-roledescription"?: string | undefined;
|
|
98
98
|
"aria-rowcount"?: number | undefined;
|
|
99
99
|
"aria-rowindex"?: number | undefined;
|
|
100
100
|
"aria-rowindextext"?: string | undefined;
|
|
101
101
|
"aria-rowspan"?: number | undefined;
|
|
102
|
-
"aria-selected"?: (boolean | "
|
|
102
|
+
"aria-selected"?: (boolean | "false" | "true") | undefined;
|
|
103
103
|
"aria-setsize"?: number | undefined;
|
|
104
104
|
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
|
|
105
105
|
"aria-valuemax"?: number | undefined;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import styled from 'styled-components';
|
|
2
1
|
import { motion } from 'framer-motion';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
3
|
export const StyledMonthWrapper = styled.div`
|
|
4
4
|
width: 100%;
|
|
5
5
|
overflow-x: clip;
|
|
6
6
|
height: ${_ref => {
|
|
7
7
|
let {
|
|
8
|
-
height
|
|
8
|
+
$height
|
|
9
9
|
} = _ref;
|
|
10
|
-
return height;
|
|
10
|
+
return $height;
|
|
11
11
|
}}px;
|
|
12
12
|
`;
|
|
13
13
|
export const StyledMotionWrapper = styled(motion.div)`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MonthWrapper.styles.js","names":["
|
|
1
|
+
{"version":3,"file":"MonthWrapper.styles.js","names":["motion","styled","StyledMonthWrapper","div","_ref","$height","StyledMotionWrapper"],"sources":["../../../../src/components/calendar/month-wrapper/MonthWrapper.styles.ts"],"sourcesContent":["import type { WithTheme } from '@chayns-components/core';\nimport { motion } from 'framer-motion';\nimport styled from 'styled-components';\n\ntype StyledMonthWrapperProps = WithTheme<{ $height: number }>;\n\nexport const StyledMonthWrapper = styled.div<StyledMonthWrapperProps>`\n width: 100%;\n overflow-x: clip;\n height: ${({ $height }) => $height}px;\n`;\n\nexport const StyledMotionWrapper = styled(motion.div)`\n display: flex;\n height: 100%;\n`;\n"],"mappings":"AACA,SAASA,MAAM,QAAQ,eAAe;AACtC,OAAOC,MAAM,MAAM,mBAAmB;AAItC,OAAO,MAAMC,kBAAkB,GAAGD,MAAM,CAACE,GAA6B;AACtE;AACA;AACA,cAAcC,IAAA;EAAA,IAAC;IAAEC;EAAQ,CAAC,GAAAD,IAAA;EAAA,OAAKC,OAAO;AAAA,CAAC;AACvC,CAAC;AAED,OAAO,MAAMC,mBAAmB,GAAGL,MAAM,CAACD,MAAM,CAACG,GAAG,CAAE;AACtD;AACA;AACA,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
2
1
|
import { isSameDay } from 'date-fns';
|
|
3
|
-
import {
|
|
2
|
+
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
4
3
|
import Category from './category/Category';
|
|
4
|
+
import { StyledDay, StyledDayCategoryWrapper, StyledDayNumber } from './Day.styles';
|
|
5
5
|
const Day = _ref => {
|
|
6
6
|
let {
|
|
7
7
|
date,
|
|
@@ -44,12 +44,12 @@ const Day = _ref => {
|
|
|
44
44
|
return /*#__PURE__*/React.createElement(StyledDay, {
|
|
45
45
|
ref: dayRef,
|
|
46
46
|
onClick: () => onClick(date, isSameMonth),
|
|
47
|
-
isSameMonth: isSameMonth,
|
|
48
|
-
backgroundColor: styles?.backgroundColor,
|
|
49
|
-
textColor: styles?.textColor
|
|
47
|
+
$isSameMonth: isSameMonth,
|
|
48
|
+
$backgroundColor: styles?.backgroundColor,
|
|
49
|
+
$textColor: styles?.textColor
|
|
50
50
|
}, /*#__PURE__*/React.createElement(StyledDayNumber, {
|
|
51
|
-
isSelected: isSelected,
|
|
52
|
-
fontSize: fontSize
|
|
51
|
+
$isSelected: isSelected,
|
|
52
|
+
$fontSize: fontSize
|
|
53
53
|
}, date.getDate()), categoryElements && /*#__PURE__*/React.createElement(StyledDayCategoryWrapper, null, categoryElements));
|
|
54
54
|
};
|
|
55
55
|
Day.displayName = 'Day';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Day.js","names":["React","useEffect","useMemo","useRef","useState","
|
|
1
|
+
{"version":3,"file":"Day.js","names":["isSameDay","React","useEffect","useMemo","useRef","useState","Category","StyledDay","StyledDayCategoryWrapper","StyledDayNumber","Day","_ref","date","highlightedDates","categories","isSameMonth","isSelected","onClick","fontSize","setFontSize","dayRef","styles","undefined","find","highlightedDate","dates","some","highlighted","style","categoryElements","flatMap","category","filter","day","map","createElement","key","getTime","Math","random","color","current","resizeObserver","ResizeObserver","entries","observedWidth","contentRect","width","observe","disconnect","ref","$isSameMonth","$backgroundColor","backgroundColor","$textColor","textColor","$isSelected","$fontSize","getDate","displayName"],"sources":["../../../../../../../src/components/calendar/month-wrapper/month/day-wrapper/day/Day.tsx"],"sourcesContent":["import { isSameDay } from 'date-fns';\nimport React, { FC, useEffect, useMemo, useRef, useState, type CSSProperties } from 'react';\nimport type {\n Categories,\n HighlightedDates,\n HighlightedDateStyles,\n} from '../../../../../../types/calendar';\nimport Category from './category/Category';\nimport { StyledDay, StyledDayCategoryWrapper, StyledDayNumber } from './Day.styles';\n\nexport type DayProps = {\n date: Date;\n isSameMonth: boolean;\n isSelected: boolean;\n onClick: (date: Date, isSameMonth: boolean) => void;\n highlightedDates?: HighlightedDates[];\n categories?: Categories[];\n};\n\nconst Day: FC<DayProps> = ({\n date,\n highlightedDates,\n categories,\n isSameMonth,\n isSelected,\n onClick,\n}) => {\n const [fontSize, setFontSize] = useState<CSSProperties['fontSize']>();\n\n const dayRef = useRef<HTMLDivElement>(null);\n\n const styles: HighlightedDateStyles | undefined = useMemo(() => {\n if (!highlightedDates || !isSameMonth) {\n return undefined;\n }\n\n return highlightedDates.find((highlightedDate) =>\n highlightedDate.dates.some((highlighted) => isSameDay(highlighted, date)),\n )?.style;\n }, [date, highlightedDates, isSameMonth]);\n\n const categoryElements = useMemo(() => {\n if (!categories) return [];\n\n return categories.flatMap((category) =>\n category.dates\n .filter((day) => isSameDay(day, date))\n .map((day) => (\n <Category key={day.getTime() * Math.random()} color={category.color} />\n )),\n );\n }, [categories, date]);\n\n useEffect(() => {\n if (dayRef.current) {\n const resizeObserver = new ResizeObserver((entries) => {\n if (entries && entries[0]) {\n const observedWidth = entries[0].contentRect.width;\n\n setFontSize(`${observedWidth / 2}px`);\n }\n });\n\n resizeObserver.observe(dayRef.current);\n\n return () => {\n resizeObserver.disconnect();\n };\n }\n\n return () => {};\n }, []);\n\n return (\n <StyledDay\n ref={dayRef}\n onClick={() => onClick(date, isSameMonth)}\n $isSameMonth={isSameMonth}\n $backgroundColor={styles?.backgroundColor}\n $textColor={styles?.textColor}\n >\n <StyledDayNumber $isSelected={isSelected} $fontSize={fontSize}>\n {date.getDate()}\n </StyledDayNumber>\n {categoryElements && (\n <StyledDayCategoryWrapper>{categoryElements}</StyledDayCategoryWrapper>\n )}\n </StyledDay>\n );\n};\n\nDay.displayName = 'Day';\n\nexport default Day;\n"],"mappings":"AAAA,SAASA,SAAS,QAAQ,UAAU;AACpC,OAAOC,KAAK,IAAQC,SAAS,EAAEC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAA4B,OAAO;AAM3F,OAAOC,QAAQ,MAAM,qBAAqB;AAC1C,SAASC,SAAS,EAAEC,wBAAwB,EAAEC,eAAe,QAAQ,cAAc;AAWnF,MAAMC,GAAiB,GAAGC,IAAA,IAOpB;EAAA,IAPqB;IACvBC,IAAI;IACJC,gBAAgB;IAChBC,UAAU;IACVC,WAAW;IACXC,UAAU;IACVC;EACJ,CAAC,GAAAN,IAAA;EACG,MAAM,CAACO,QAAQ,EAAEC,WAAW,CAAC,GAAGd,QAAQ,CAA4B,CAAC;EAErE,MAAMe,MAAM,GAAGhB,MAAM,CAAiB,IAAI,CAAC;EAE3C,M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AAc,CAACM,OAAO,CAAC5B,MAAM,CAACqB,OAAO,CAAC;MAEtC,OAAO,MAAM;QACTC,cAAc,CAACO,UAAU,CAAC,CAAC;MAC/B,CAAC;IACL;IAEA,OAAO,MAAM,CAAC,CAAC;EACnB,CAAC,EAAE,EAAE,CAAC;EAEN,oBACIhD,KAAA,CAAAkC,aAAA,CAAC5B,SAAS;IACN2C,GAAG,EAAE9B,MAAO;IACZH,OAAO,EAAEA,CAAA,KAAMA,OAAO,CAACL,IAAI,EAAEG,WAAW,CAAE;IAC1CoC,YAAY,EAAEpC,WAAY;IAC1BqC,gBAAgB,EAAE/B,MAAM,EAAEgC,eAAgB;IAC1CC,UAAU,EAAEjC,MAAM,EAAEkC;EAAU,gBAE9BtD,KAAA,CAAAkC,aAAA,CAAC1B,eAAe;IAAC+C,WAAW,EAAExC,UAAW;IAACyC,SAAS,EAAEvC;EAAS,GACzDN,IAAI,CAAC8C,OAAO,CAAC,CACD,CAAC,EACjB7B,gBAAgB,iBACb5B,KAAA,CAAAkC,aAAA,CAAC3B,wBAAwB,QAAEqB,gBAA2C,CAEnE,CAAC;AAEpB,CAAC;AAEDnB,GAAG,CAACiD,WAAW,GAAG,KAAK;AAEvB,eAAejD,GAAG"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { WithTheme } from '@chayns-components/core';
|
|
2
2
|
import type { CSSProperties } from 'react';
|
|
3
3
|
type StyledDayProps = WithTheme<{
|
|
4
|
-
isSameMonth: boolean;
|
|
5
|
-
backgroundColor?: CSSProperties['backgroundColor'];
|
|
6
|
-
textColor?: CSSProperties['color'];
|
|
4
|
+
$isSameMonth: boolean;
|
|
5
|
+
$backgroundColor?: CSSProperties['backgroundColor'];
|
|
6
|
+
$textColor?: CSSProperties['color'];
|
|
7
7
|
}>;
|
|
8
8
|
export declare const StyledDay: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledDayProps>>;
|
|
9
9
|
type StyledDayNumberProps = WithTheme<{
|
|
10
|
-
isSelected: boolean;
|
|
11
|
-
fontSize: CSSProperties['fontSize'];
|
|
10
|
+
$isSelected: boolean;
|
|
11
|
+
$fontSize: CSSProperties['fontSize'];
|
|
12
12
|
}>;
|
|
13
13
|
export declare const StyledDayNumber: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledDayNumberProps>>;
|
|
14
14
|
export declare const StyledDayCategoryWrapper: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
|
|
@@ -3,16 +3,16 @@ export const StyledDay = styled.div`
|
|
|
3
3
|
position: relative;
|
|
4
4
|
cursor: ${_ref => {
|
|
5
5
|
let {
|
|
6
|
-
isSameMonth
|
|
6
|
+
$isSameMonth
|
|
7
7
|
} = _ref;
|
|
8
|
-
return isSameMonth ? 'pointer' : 'default';
|
|
8
|
+
return $isSameMonth ? 'pointer' : 'default';
|
|
9
9
|
}};
|
|
10
10
|
color: ${_ref2 => {
|
|
11
11
|
let {
|
|
12
|
-
isSameMonth,
|
|
12
|
+
$isSameMonth,
|
|
13
13
|
theme
|
|
14
14
|
} = _ref2;
|
|
15
|
-
return isSameMonth ? theme.text : `rgba(${theme['text-rgb'] ?? ''}, 0.5)`;
|
|
15
|
+
return $isSameMonth ? theme.text : `rgba(${theme['text-rgb'] ?? ''}, 0.5)`;
|
|
16
16
|
}};
|
|
17
17
|
display: flex;
|
|
18
18
|
align-items: center;
|
|
@@ -21,12 +21,12 @@ export const StyledDay = styled.div`
|
|
|
21
21
|
|
|
22
22
|
${_ref3 => {
|
|
23
23
|
let {
|
|
24
|
-
backgroundColor,
|
|
25
|
-
textColor
|
|
24
|
+
$backgroundColor,
|
|
25
|
+
$textColor
|
|
26
26
|
} = _ref3;
|
|
27
|
-
return backgroundColor && textColor && css`
|
|
28
|
-
color: ${textColor};
|
|
29
|
-
background-color: ${backgroundColor};
|
|
27
|
+
return $backgroundColor && $textColor && css`
|
|
28
|
+
color: ${$textColor};
|
|
29
|
+
background-color: ${$backgroundColor};
|
|
30
30
|
`;
|
|
31
31
|
}}
|
|
32
32
|
`;
|
|
@@ -39,17 +39,17 @@ export const StyledDayNumber = styled.div`
|
|
|
39
39
|
height: 80%;
|
|
40
40
|
font-size: ${_ref4 => {
|
|
41
41
|
let {
|
|
42
|
-
fontSize
|
|
42
|
+
$fontSize
|
|
43
43
|
} = _ref4;
|
|
44
|
-
return fontSize;
|
|
44
|
+
return $fontSize;
|
|
45
45
|
}};
|
|
46
46
|
|
|
47
47
|
${_ref5 => {
|
|
48
48
|
let {
|
|
49
|
-
isSelected,
|
|
49
|
+
$isSelected,
|
|
50
50
|
theme
|
|
51
51
|
} = _ref5;
|
|
52
|
-
return isSelected && css`
|
|
52
|
+
return $isSelected && css`
|
|
53
53
|
background-color: ${theme['404']};
|
|
54
54
|
color: ${theme['409']};
|
|
55
55
|
`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Day.styles.js","names":["styled","css","StyledDay","div","_ref","isSameMonth","_ref2","theme","text","_ref3","backgroundColor","textColor","StyledDayNumber","_ref4","fontSize","_ref5","isSelected","StyledDayCategoryWrapper"],"sources":["../../../../../../../src/components/calendar/month-wrapper/month/day-wrapper/day/Day.styles.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"Day.styles.js","names":["styled","css","StyledDay","div","_ref","$isSameMonth","_ref2","theme","text","_ref3","$backgroundColor","$textColor","StyledDayNumber","_ref4","$fontSize","_ref5","$isSelected","StyledDayCategoryWrapper"],"sources":["../../../../../../../src/components/calendar/month-wrapper/month/day-wrapper/day/Day.styles.ts"],"sourcesContent":["import type { WithTheme } from '@chayns-components/core';\nimport type { CSSProperties } from 'react';\nimport styled, { css } from 'styled-components';\n\ntype StyledDayProps = WithTheme<{\n $isSameMonth: boolean;\n $backgroundColor?: CSSProperties['backgroundColor'];\n $textColor?: CSSProperties['color'];\n}>;\n\nexport const StyledDay = styled.div<StyledDayProps>`\n position: relative;\n cursor: ${({ $isSameMonth }) => ($isSameMonth ? 'pointer' : 'default')};\n color: ${({ $isSameMonth, theme }: StyledDayProps) =>\n $isSameMonth ? theme.text : `rgba(${theme['text-rgb'] ?? ''}, 0.5)`};\n display: flex;\n align-items: center;\n justify-content: center;\n aspect-ratio: 1;\n\n ${({ $backgroundColor, $textColor }) =>\n $backgroundColor &&\n $textColor &&\n css`\n color: ${$textColor};\n background-color: ${$backgroundColor};\n `}\n`;\n\ntype StyledDayNumberProps = WithTheme<{\n $isSelected: boolean;\n $fontSize: CSSProperties['fontSize'];\n}>;\n\nexport const StyledDayNumber = styled.div<StyledDayNumberProps>`\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 80%;\n height: 80%;\n font-size: ${({ $fontSize }) => $fontSize};\n\n ${({ $isSelected, theme }) =>\n $isSelected &&\n css`\n background-color: ${theme['404']};\n color: ${theme['409']};\n `}\n`;\n\nexport const StyledDayCategoryWrapper = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 6%;\n width: 100%;\n position: absolute;\n bottom: 2px;\n`;\n"],"mappings":"AAEA,OAAOA,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAQ/C,OAAO,MAAMC,SAAS,GAAGF,MAAM,CAACG,GAAoB;AACpD;AACA,cAAcC,IAAA;EAAA,IAAC;IAAEC;EAAa,CAAC,GAAAD,IAAA;EAAA,OAAMC,YAAY,GAAG,SAAS,GAAG,SAAS;AAAA,CAAE;AAC3E,aAAaC,KAAA;EAAA,IAAC;IAAED,YAAY;IAAEE;EAAsB,CAAC,GAAAD,KAAA;EAAA,OAC7CD,YAAY,GAAGE,KAAK,CAACC,IAAI,GAAI,QAAOD,KAAK,CAAC,UAAU,CAAC,IAAI,EAAG,QAAO;AAAA,CAAC;AAC5E;AACA;AACA;AACA;AACA;AACA,MAAME,KAAA;EAAA,IAAC;IAAEC,gBAAgB;IAAEC;EAAW,CAAC,GAAAF,KAAA;EAAA,OAC/BC,gBAAgB,IAChBC,UAAU,IACVV,GAAI;AACZ,qBAAqBU,UAAW;AAChC,gCAAgCD,gBAAiB;AACjD,SAAS;AAAA,CAAC;AACV,CAAC;AAOD,OAAO,MAAME,eAAe,GAAGZ,MAAM,CAACG,GAA0B;AAChE;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiBU,KAAA;EAAA,IAAC;IAAEC;EAAU,CAAC,GAAAD,KAAA;EAAA,OAAKC,SAAS;AAAA,CAAC;AAC9C;AACA,MAAMC,KAAA;EAAA,IAAC;IAAEC,WAAW;IAAET;EAAM,CAAC,GAAAQ,KAAA;EAAA,OACrBC,WAAW,IACXf,GAAI;AACZ,gCAAgCM,KAAK,CAAC,KAAK,CAAE;AAC7C,qBAAqBA,KAAK,CAAC,KAAK,CAAE;AAClC,SAAS;AAAA,CAAC;AACV,CAAC;AAED,OAAO,MAAMU,wBAAwB,GAAGjB,MAAM,CAACG,GAAI;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC"}
|
package/lib/components/calendar/month-wrapper/month/day-wrapper/day/category/Category.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Category.js","names":["React","StyledCategory","Category","_ref","color","createElement","displayName"],"sources":["../../../../../../../../src/components/calendar/month-wrapper/month/day-wrapper/day/category/Category.tsx"],"sourcesContent":["import React, { type CSSProperties
|
|
1
|
+
{"version":3,"file":"Category.js","names":["React","StyledCategory","Category","_ref","color","createElement","$color","displayName"],"sources":["../../../../../../../../src/components/calendar/month-wrapper/month/day-wrapper/day/category/Category.tsx"],"sourcesContent":["import React, { FC, type CSSProperties } from 'react';\nimport { StyledCategory } from './Category.styles';\n\nexport type CategoryProps = {\n color: CSSProperties['color'];\n};\n\nconst Category: FC<CategoryProps> = ({ color }) => <StyledCategory $color={color} />;\n\nCategory.displayName = 'Category';\n\nexport default Category;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAkC,OAAO;AACrD,SAASC,cAAc,QAAQ,mBAAmB;AAMlD,MAAMC,QAA2B,GAAGC,IAAA;EAAA,IAAC;IAAEC;EAAM,CAAC,GAAAD,IAAA;EAAA,oBAAKH,KAAA,CAAAK,aAAA,CAACJ,cAAc;IAACK,MAAM,EAAEF;EAAM,CAAE,CAAC;AAAA;AAEpFF,QAAQ,CAACK,WAAW,GAAG,UAAU;AAEjC,eAAeL,QAAQ"}
|
package/lib/components/calendar/month-wrapper/month/day-wrapper/day/category/Category.styles.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { WithTheme } from '@chayns-components/core';
|
|
2
2
|
import type { CSSProperties } from 'react';
|
|
3
3
|
type StyledCategoryProps = WithTheme<{
|
|
4
|
-
color: CSSProperties['color'];
|
|
4
|
+
$color: CSSProperties['color'];
|
|
5
5
|
}>;
|
|
6
6
|
export declare const StyledCategory: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledCategoryProps>>;
|
|
7
7
|
export {};
|
package/lib/components/calendar/month-wrapper/month/day-wrapper/day/category/Category.styles.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Category.styles.js","names":["styled","StyledCategory","div","_ref","color"],"sources":["../../../../../../../../src/components/calendar/month-wrapper/month/day-wrapper/day/category/Category.styles.ts"],"sourcesContent":["import type { WithTheme } from '@chayns-components/core';\nimport type { CSSProperties } from 'react';\nimport styled from 'styled-components';\n\ntype StyledCategoryProps = WithTheme<{ color: CSSProperties['color'] }>;\n\nexport const StyledCategory = styled.div<StyledCategoryProps>`\n border-radius: 50%;\n width: 24%;\n aspect-ratio: 1;\n background-color: ${({ color }) => color};\n border: 1px solid white;\n`;\n"],"mappings":"AAEA,OAAOA,MAAM,MAAM,mBAAmB;AAItC,OAAO,MAAMC,cAAc,GAAGD,MAAM,CAACE,GAAyB;AAC9D;AACA;AACA;AACA,wBAAwBC,IAAA;EAAA,IAAC;IAAEC;
|
|
1
|
+
{"version":3,"file":"Category.styles.js","names":["styled","StyledCategory","div","_ref","$color"],"sources":["../../../../../../../../src/components/calendar/month-wrapper/month/day-wrapper/day/category/Category.styles.ts"],"sourcesContent":["import type { WithTheme } from '@chayns-components/core';\nimport type { CSSProperties } from 'react';\nimport styled from 'styled-components';\n\ntype StyledCategoryProps = WithTheme<{ $color: CSSProperties['color'] }>;\n\nexport const StyledCategory = styled.div<StyledCategoryProps>`\n border-radius: 50%;\n width: 24%;\n aspect-ratio: 1;\n background-color: ${({ $color }) => $color};\n border: 1px solid white;\n`;\n"],"mappings":"AAEA,OAAOA,MAAM,MAAM,mBAAmB;AAItC,OAAO,MAAMC,cAAc,GAAGD,MAAM,CAACE,GAAyB;AAC9D;AACA;AACA;AACA,wBAAwBC,IAAA;EAAA,IAAC;IAAEC;EAAO,CAAC,GAAAD,IAAA;EAAA,OAAKC,MAAM;AAAA,CAAC;AAC/C;AACA,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { WithTheme } from '@chayns-components/core';
|
|
3
3
|
type StyledSliderButtonProps = WithTheme<{
|
|
4
|
-
isDisabled?: boolean;
|
|
4
|
+
$isDisabled?: boolean;
|
|
5
5
|
}>;
|
|
6
6
|
export declare const StyledOpeningTimes: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledSliderButtonProps>>;
|
|
7
7
|
export declare const StyledOpeningTimesWrapper: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpeningTimes.styles.js","names":["styled","StyledOpeningTimes","div","StyledOpeningTimesWrapper"],"sources":["../../../src/components/opening-times/OpeningTimes.styles.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"OpeningTimes.styles.js","names":["styled","StyledOpeningTimes","div","StyledOpeningTimesWrapper"],"sources":["../../../src/components/opening-times/OpeningTimes.styles.ts"],"sourcesContent":["import type { WithTheme } from '@chayns-components/core';\nimport styled from 'styled-components';\n\ntype StyledSliderButtonProps = WithTheme<{ $isDisabled?: boolean }>;\n\nexport const StyledOpeningTimes = styled.div<StyledSliderButtonProps>`\n display: flex;\n flex-direction: column;\n gap: 8px;\n`;\n\nexport const StyledOpeningTimesWrapper = styled.div`\n display: flex;\n align-items: baseline;\n justify-content: space-between;\n`;\n"],"mappings":"AACA,OAAOA,MAAM,MAAM,mBAAmB;AAItC,OAAO,MAAMC,kBAAkB,GAAGD,MAAM,CAACE,GAA6B;AACtE;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMC,yBAAyB,GAAGH,MAAM,CAACE,GAAI;AACpD;AACA;AACA;AACA,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { Icon, NumberInput } from '@chayns-components/core';
|
|
1
2
|
import React, { useCallback, useMemo, useState } from 'react';
|
|
2
3
|
import { OpeningTimesButtonType } from '../../../../types/openingTimes';
|
|
3
|
-
import { Icon, NumberInput } from '@chayns-components/core';
|
|
4
4
|
import { StyledOpeningInput, StyledOpeningInputButtonWrapper, StyledOpeningInputPseudoButton, StyledOpeningInputText, StyledOpeningInputWrapper } from './OpeningInput.styles';
|
|
5
5
|
const OpeningInput = _ref => {
|
|
6
6
|
let {
|
|
@@ -78,7 +78,7 @@ const OpeningInput = _ref => {
|
|
|
78
78
|
onBlur: handleStartTimeBlur,
|
|
79
79
|
isDisabled: isDisabled
|
|
80
80
|
})), /*#__PURE__*/React.createElement(StyledOpeningInputText, {
|
|
81
|
-
isDisabled: isDisabled
|
|
81
|
+
$isDisabled: isDisabled
|
|
82
82
|
}, "-"), /*#__PURE__*/React.createElement(StyledOpeningInputWrapper, null, /*#__PURE__*/React.createElement(NumberInput, {
|
|
83
83
|
shouldShowOnlyBottomBorder: true,
|
|
84
84
|
isTimeInput: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpeningInput.js","names":["
|
|
1
|
+
{"version":3,"file":"OpeningInput.js","names":["Icon","NumberInput","React","useCallback","useMemo","useState","OpeningTimesButtonType","StyledOpeningInput","StyledOpeningInputButtonWrapper","StyledOpeningInputPseudoButton","StyledOpeningInputText","StyledOpeningInputWrapper","OpeningInput","_ref","end","start","isDisabled","buttonType","onRemove","onAdd","onChange","id","startTime","setStartTime","endTime","setEndTime","button","ADD","createElement","onClick","icons","size","REMOVE","handleStartTimeBlur","value","isInvalid","handleEndTimeBlur","key","animate","opacity","height","initial","exit","shouldShowOnlyBottomBorder","isTimeInput","onBlur","$isDisabled","displayName"],"sources":["../../../../../src/components/opening-times/opening-inputs/opening-input/OpeningInput.tsx"],"sourcesContent":["import { Icon, NumberInput } from '@chayns-components/core';\nimport React, { FC, useCallback, useMemo, useState } from 'react';\nimport { OpeningTimesButtonType, type Time } from '../../../../types/openingTimes';\nimport {\n StyledOpeningInput,\n StyledOpeningInputButtonWrapper,\n StyledOpeningInputPseudoButton,\n StyledOpeningInputText,\n StyledOpeningInputWrapper,\n} from './OpeningInput.styles';\n\nexport type OpeningInputProps = {\n start: Time['start'];\n end: Time['end'];\n isDisabled?: boolean;\n id: string;\n buttonType: OpeningTimesButtonType;\n onAdd: () => void;\n onRemove: () => void;\n onChange: (time: Time) => void;\n};\n\nconst OpeningInput: FC<OpeningInputProps> = ({\n end,\n start,\n isDisabled,\n buttonType,\n onRemove,\n onAdd,\n onChange,\n id,\n}) => {\n const [startTime, setStartTime] = useState(start);\n const [endTime, setEndTime] = useState(end);\n\n const button = useMemo(() => {\n switch (buttonType) {\n case OpeningTimesButtonType.ADD:\n return (\n <StyledOpeningInputButtonWrapper onClick={onAdd}>\n <Icon icons={['ts-plus']} size={15} />\n </StyledOpeningInputButtonWrapper>\n );\n case OpeningTimesButtonType.REMOVE:\n return (\n <StyledOpeningInputButtonWrapper onClick={onRemove}>\n <Icon icons={['ts-wrong']} size={15} />\n </StyledOpeningInputButtonWrapper>\n );\n default:\n return <StyledOpeningInputPseudoButton />;\n }\n }, [buttonType, onAdd, onRemove]);\n\n const handleStartTimeBlur = useCallback(\n (value: string | number | null, isInvalid: boolean) => {\n if (isInvalid || typeof value === 'number' || !value) {\n return;\n }\n\n setStartTime(value);\n\n onChange({ end: endTime, start: value, id });\n },\n [endTime, id, onChange],\n );\n\n const handleEndTimeBlur = useCallback(\n (value: string | number | null, isInvalid: boolean) => {\n if (isInvalid || typeof value === 'number' || !value) {\n return;\n }\n\n setEndTime(value);\n\n onChange({ end: value, start: startTime, id });\n },\n [id, onChange, startTime],\n );\n\n return useMemo(\n () => (\n <StyledOpeningInput\n key={id}\n animate={{ opacity: 1, height: 'auto' }}\n initial={{ opacity: 0, height: 0 }}\n exit={{ opacity: 0, height: 0 }}\n >\n <StyledOpeningInputWrapper>\n <NumberInput\n shouldShowOnlyBottomBorder\n isTimeInput\n value={startTime}\n onBlur={handleStartTimeBlur}\n isDisabled={isDisabled}\n />\n </StyledOpeningInputWrapper>\n <StyledOpeningInputText $isDisabled={isDisabled}>-</StyledOpeningInputText>\n <StyledOpeningInputWrapper>\n <NumberInput\n shouldShowOnlyBottomBorder\n isTimeInput\n value={endTime}\n onBlur={handleEndTimeBlur}\n isDisabled={isDisabled}\n />\n </StyledOpeningInputWrapper>\n {button}\n </StyledOpeningInput>\n ),\n [button, endTime, handleEndTimeBlur, handleStartTimeBlur, id, isDisabled, startTime],\n );\n};\n\nOpeningInput.displayName = 'OpeningInput';\n\nexport default OpeningInput;\n"],"mappings":"AAAA,SAASA,IAAI,EAAEC,WAAW,QAAQ,yBAAyB;AAC3D,OAAO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EAAEA;EAAW,CAC1B,CACsB,CAAC,eAC5Bd,KAAA,CAAA0B,aAAA,CAAClB,sBAAsB;IAACoC,WAAW,EAAE9B;EAAW,GAAC,GAAyB,CAAC,eAC3Ed,KAAA,CAAA0B,aAAA,CAACjB,yBAAyB,qBACtBT,KAAA,CAAA0B,aAAA,CAAC3B,WAAW;IACR0C,0BAA0B;IAC1BC,WAAW;IACXV,KAAK,EAAEV,OAAQ;IACfqB,MAAM,EAAET,iBAAkB;IAC1BpB,UAAU,EAAEA;EAAW,CAC1B,CACsB,CAAC,EAC3BU,MACe,CACvB,EACD,CAACA,MAAM,EAAEF,OAAO,EAAEY,iBAAiB,EAAEH,mBAAmB,EAAEZ,EAAE,EAAEL,UAAU,EAAEM,SAAS,CACvF,CAAC;AACL,CAAC;AAEDV,YAAY,CAACmC,WAAW,GAAG,cAAc;AAEzC,eAAenC,YAAY"}
|
|
@@ -10,16 +10,16 @@ export declare const StyledOpeningInput: import("styled-components").IStyledComp
|
|
|
10
10
|
accessKey?: string | undefined;
|
|
11
11
|
autoFocus?: boolean | undefined;
|
|
12
12
|
className?: string | undefined;
|
|
13
|
-
contentEditable?: "inherit" | (boolean | "
|
|
13
|
+
contentEditable?: "inherit" | (boolean | "false" | "true") | "plaintext-only" | undefined;
|
|
14
14
|
contextMenu?: string | undefined;
|
|
15
15
|
dir?: string | undefined;
|
|
16
|
-
draggable?: (boolean | "
|
|
16
|
+
draggable?: (boolean | "false" | "true") | undefined;
|
|
17
17
|
hidden?: boolean | undefined;
|
|
18
18
|
id?: string | undefined;
|
|
19
19
|
lang?: string | undefined;
|
|
20
20
|
nonce?: string | undefined;
|
|
21
21
|
slot?: string | undefined;
|
|
22
|
-
spellCheck?: (boolean | "
|
|
22
|
+
spellCheck?: (boolean | "false" | "true") | undefined;
|
|
23
23
|
tabIndex?: number | undefined;
|
|
24
24
|
title?: string | undefined;
|
|
25
25
|
translate?: "yes" | "no" | undefined;
|
|
@@ -50,52 +50,52 @@ export declare const StyledOpeningInput: import("styled-components").IStyledComp
|
|
|
50
50
|
inputMode?: "none" | "text" | "search" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
51
51
|
is?: string | undefined;
|
|
52
52
|
"aria-activedescendant"?: string | undefined;
|
|
53
|
-
"aria-atomic"?: (boolean | "
|
|
53
|
+
"aria-atomic"?: (boolean | "false" | "true") | undefined;
|
|
54
54
|
"aria-autocomplete"?: "none" | "list" | "both" | "inline" | undefined;
|
|
55
55
|
"aria-braillelabel"?: string | undefined;
|
|
56
56
|
"aria-brailleroledescription"?: string | undefined;
|
|
57
|
-
"aria-busy"?: (boolean | "
|
|
58
|
-
"aria-checked"?: boolean | "
|
|
57
|
+
"aria-busy"?: (boolean | "false" | "true") | undefined;
|
|
58
|
+
"aria-checked"?: boolean | "mixed" | "false" | "true" | undefined;
|
|
59
59
|
"aria-colcount"?: number | undefined;
|
|
60
60
|
"aria-colindex"?: number | undefined;
|
|
61
61
|
"aria-colindextext"?: string | undefined;
|
|
62
62
|
"aria-colspan"?: number | undefined;
|
|
63
63
|
"aria-controls"?: string | undefined;
|
|
64
|
-
"aria-current"?: boolean | "time" | "
|
|
64
|
+
"aria-current"?: boolean | "time" | "step" | "page" | "false" | "true" | "date" | "location" | undefined;
|
|
65
65
|
"aria-describedby"?: string | undefined;
|
|
66
66
|
"aria-description"?: string | undefined;
|
|
67
67
|
"aria-details"?: string | undefined;
|
|
68
|
-
"aria-disabled"?: (boolean | "
|
|
68
|
+
"aria-disabled"?: (boolean | "false" | "true") | undefined;
|
|
69
69
|
"aria-dropeffect"?: "none" | "link" | "copy" | "move" | "execute" | "popup" | undefined;
|
|
70
70
|
"aria-errormessage"?: string | undefined;
|
|
71
|
-
"aria-expanded"?: (boolean | "
|
|
71
|
+
"aria-expanded"?: (boolean | "false" | "true") | undefined;
|
|
72
72
|
"aria-flowto"?: string | undefined;
|
|
73
|
-
"aria-grabbed"?: (boolean | "
|
|
74
|
-
"aria-haspopup"?: boolean | "dialog" | "menu" | "
|
|
75
|
-
"aria-hidden"?: (boolean | "
|
|
76
|
-
"aria-invalid"?: boolean | "
|
|
73
|
+
"aria-grabbed"?: (boolean | "false" | "true") | undefined;
|
|
74
|
+
"aria-haspopup"?: boolean | "dialog" | "menu" | "listbox" | "grid" | "false" | "true" | "tree" | undefined;
|
|
75
|
+
"aria-hidden"?: (boolean | "false" | "true") | undefined;
|
|
76
|
+
"aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
|
|
77
77
|
"aria-keyshortcuts"?: string | undefined;
|
|
78
78
|
"aria-label"?: string | undefined;
|
|
79
79
|
"aria-labelledby"?: string | undefined;
|
|
80
80
|
"aria-level"?: number | undefined;
|
|
81
81
|
"aria-live"?: "off" | "assertive" | "polite" | undefined;
|
|
82
|
-
"aria-modal"?: (boolean | "
|
|
83
|
-
"aria-multiline"?: (boolean | "
|
|
84
|
-
"aria-multiselectable"?: (boolean | "
|
|
82
|
+
"aria-modal"?: (boolean | "false" | "true") | undefined;
|
|
83
|
+
"aria-multiline"?: (boolean | "false" | "true") | undefined;
|
|
84
|
+
"aria-multiselectable"?: (boolean | "false" | "true") | undefined;
|
|
85
85
|
"aria-orientation"?: "horizontal" | "vertical" | undefined;
|
|
86
86
|
"aria-owns"?: string | undefined;
|
|
87
87
|
"aria-placeholder"?: string | undefined;
|
|
88
88
|
"aria-posinset"?: number | undefined;
|
|
89
|
-
"aria-pressed"?: boolean | "
|
|
90
|
-
"aria-readonly"?: (boolean | "
|
|
89
|
+
"aria-pressed"?: boolean | "mixed" | "false" | "true" | undefined;
|
|
90
|
+
"aria-readonly"?: (boolean | "false" | "true") | undefined;
|
|
91
91
|
"aria-relevant"?: "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
|
|
92
|
-
"aria-required"?: (boolean | "
|
|
92
|
+
"aria-required"?: (boolean | "false" | "true") | undefined;
|
|
93
93
|
"aria-roledescription"?: string | undefined;
|
|
94
94
|
"aria-rowcount"?: number | undefined;
|
|
95
95
|
"aria-rowindex"?: number | undefined;
|
|
96
96
|
"aria-rowindextext"?: string | undefined;
|
|
97
97
|
"aria-rowspan"?: number | undefined;
|
|
98
|
-
"aria-selected"?: (boolean | "
|
|
98
|
+
"aria-selected"?: (boolean | "false" | "true") | undefined;
|
|
99
99
|
"aria-setsize"?: number | undefined;
|
|
100
100
|
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
|
|
101
101
|
"aria-valuemax"?: number | undefined;
|
|
@@ -266,7 +266,7 @@ export declare const StyledOpeningInput: import("styled-components").IStyledComp
|
|
|
266
266
|
} & import("framer-motion").MotionProps & import("react").RefAttributes<HTMLDivElement>, never>> & Omit<import("framer-motion").ForwardRefComponent<HTMLDivElement, import("framer-motion").HTMLMotionProps<"div">>, keyof import("react").Component<any, {}, any>>;
|
|
267
267
|
export declare const StyledOpeningInputWrapper: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
|
|
268
268
|
type StyledOpeningInputTextProps = WithTheme<{
|
|
269
|
-
isDisabled?: boolean;
|
|
269
|
+
$isDisabled?: boolean;
|
|
270
270
|
}>;
|
|
271
271
|
export declare const StyledOpeningInputText: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledOpeningInputTextProps>>;
|
|
272
272
|
export declare const StyledOpeningInputButtonWrapper: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import styled from 'styled-components';
|
|
2
1
|
import { motion } from 'framer-motion';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
3
|
export const StyledOpeningInput = styled(motion.div)`
|
|
4
4
|
display: flex;
|
|
5
5
|
align-items: center;
|
|
@@ -11,9 +11,9 @@ export const StyledOpeningInputWrapper = styled.div`
|
|
|
11
11
|
export const StyledOpeningInputText = styled.div`
|
|
12
12
|
opacity: ${_ref => {
|
|
13
13
|
let {
|
|
14
|
-
isDisabled
|
|
14
|
+
$isDisabled
|
|
15
15
|
} = _ref;
|
|
16
|
-
return isDisabled ? 0.5 : 1;
|
|
16
|
+
return $isDisabled ? 0.5 : 1;
|
|
17
17
|
}};
|
|
18
18
|
`;
|
|
19
19
|
export const StyledOpeningInputButtonWrapper = styled.div`
|
package/lib/components/opening-times/opening-inputs/opening-input/OpeningInput.styles.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpeningInput.styles.js","names":["
|
|
1
|
+
{"version":3,"file":"OpeningInput.styles.js","names":["motion","styled","StyledOpeningInput","div","StyledOpeningInputWrapper","StyledOpeningInputText","_ref","$isDisabled","StyledOpeningInputButtonWrapper","_ref2","theme","StyledOpeningInputPseudoButton"],"sources":["../../../../../src/components/opening-times/opening-inputs/opening-input/OpeningInput.styles.ts"],"sourcesContent":["import type { WithTheme } from '@chayns-components/core';\nimport { motion } from 'framer-motion';\nimport styled from 'styled-components';\n\nexport const StyledOpeningInput = styled(motion.div)`\n display: flex;\n align-items: center;\n gap: 6px;\n`;\n\nexport const StyledOpeningInputWrapper = styled.div`\n width: 60px;\n`;\n\ntype StyledOpeningInputTextProps = WithTheme<{ $isDisabled?: boolean }>;\n\nexport const StyledOpeningInputText = styled.div<StyledOpeningInputTextProps>`\n opacity: ${({ $isDisabled }) => ($isDisabled ? 0.5 : 1)};\n`;\n\ntype StyledOpeningInputButtonWrapperProps = WithTheme<unknown>;\n\nexport const StyledOpeningInputButtonWrapper = styled.div`\n width: 20px;\n height: 20px;\n background-color: ${({ theme }: StyledOpeningInputButtonWrapperProps) => theme['202']};\n border-radius: 3px;\n box-shadow: 1px 2px 3px rgba(0, 0, 0, 0.2);\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n`;\n\nexport const StyledOpeningInputPseudoButton = styled.div`\n width: 20px;\n`;\n"],"mappings":"AACA,SAASA,MAAM,QAAQ,eAAe;AACtC,OAAOC,MAAM,MAAM,mBAAmB;AAEtC,OAAO,MAAMC,kBAAkB,GAAGD,MAAM,CAACD,MAAM,CAACG,GAAG,CAAE;AACrD;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMC,yBAAyB,GAAGH,MAAM,CAACE,GAAI;AACpD;AACA,CAAC;AAID,OAAO,MAAME,sBAAsB,GAAGJ,MAAM,CAACE,GAAiC;AAC9E,eAAeG,IAAA;EAAA,IAAC;IAAEC;EAAY,CAAC,GAAAD,IAAA;EAAA,OAAMC,WAAW,GAAG,GAAG,GAAG,CAAC;AAAA,CAAE;AAC5D,CAAC;AAID,OAAO,MAAMC,+BAA+B,GAAGP,MAAM,CAACE,GAAI;AAC1D;AACA;AACA,wBAAwBM,KAAA;EAAA,IAAC;IAAEC;EAA4C,CAAC,GAAAD,KAAA;EAAA,OAAKC,KAAK,CAAC,KAAK,CAAC;AAAA,CAAC;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMC,8BAA8B,GAAGV,MAAM,CAACE,GAAI;AACzD;AACA,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chayns-components/date",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.458",
|
|
4
4
|
"description": "A set of beautiful React components for developing your own applications with chayns.",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"browserslist": [
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"typescript": "^5.3.3"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@chayns-components/core": "^5.0.0-beta.
|
|
60
|
+
"@chayns-components/core": "^5.0.0-beta.458",
|
|
61
61
|
"date-fns": "^2.30.0"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"publishConfig": {
|
|
71
71
|
"access": "public"
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "1d73583ba75b4129c0b79b08a51c5c07d1d74a6c"
|
|
74
74
|
}
|