@mirai/ui 1.0.26 → 1.0.27

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.
@@ -75,11 +75,11 @@ var Month = function Month(_ref) {
75
75
  }, /*#__PURE__*/_react.default.createElement(_primitives.Icon, {
76
76
  name: "Left"
77
77
  })), /*#__PURE__*/_react.default.createElement(_primitives.Text, {
78
- bold: true,
79
78
  subheadline: true,
80
79
  className: _CalendarModule.default.title
81
80
  }, (0, _helpers2.getHeader)(instance, locale)), onNext && /*#__PURE__*/_react.default.createElement(_primitives.Pressable, {
82
- onPress: onNext
81
+ onPress: onNext,
82
+ className: _CalendarModule.default.pressable
83
83
  }, /*#__PURE__*/_react.default.createElement(_primitives.Icon, {
84
84
  name: "Right"
85
85
  }))), isDesktop && /*#__PURE__*/_react.default.createElement(_Calendar3.Weekdays, {
@@ -1 +1 @@
1
- {"version":3,"file":"Calendar.Month.js","names":["Month","focus","instance","selected","disabledPast","format","from","locale","range","to","onChange","onFocus","onNext","onPrevious","others","isDesktop","weekNumber","style","month","className","header","title","VISIBLE_WEEKS","map","week","getMonth","getFullYear","displayName","propTypes","captions","PropTypes","shape","any","disabledDates","arrayOf","string","bool","disabledWeekends","instanceOf","Date","value","oneOfType","func"],"sources":["../../../src/components/Calendar/Calendar.Month.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { styles } from '../../helpers';\nimport { useDevice } from '../../hooks';\nimport { Icon, Pressable, Text, View } from '../../primitives';\nimport { VISIBLE_WEEKS } from './Calendar.constants';\nimport style from './Calendar.module.css';\nimport { Week } from './Calendar.Week';\nimport { Weekdays } from './Calendar.Weekdays';\nimport { getHeader, getWeekNumber } from './helpers';\n\nexport const Month = ({\n focus,\n instance,\n selected,\n disabledPast = true,\n format,\n from,\n locale,\n range = false,\n to,\n onChange = () => {},\n onFocus = () => {},\n onNext,\n onPrevious,\n ...others\n}) => {\n const { isDesktop } = useDevice();\n const weekNumber = getWeekNumber(instance);\n\n return (\n <View className={styles(style.month, others.className)}>\n <View row className={style.header}>\n {onPrevious && (\n <Pressable onPress={onPrevious}>\n <Icon name=\"Left\" />\n </Pressable>\n )}\n <Text bold subheadline className={style.title}>\n {getHeader(instance, locale)}\n </Text>\n {onNext && (\n <Pressable onPress={onNext}>\n <Icon name=\"Right\" />\n </Pressable>\n )}\n </View>\n\n {isDesktop && <Weekdays locale={locale} />}\n\n {VISIBLE_WEEKS.map((week) => (\n <Week\n {...{\n ...others,\n disabledPast,\n focus,\n format,\n from,\n locale,\n to,\n range,\n selected,\n }}\n key={week}\n month={instance.getMonth()}\n number={weekNumber + week}\n year={instance.getFullYear()}\n onFocus={onFocus}\n onPress={onChange}\n />\n ))}\n </View>\n );\n};\n\nMonth.displayName = 'Component:Calendar:Month';\n\nMonth.propTypes = {\n captions: PropTypes.shape({}),\n focus: PropTypes.any,\n instance: PropTypes.any,\n selected: PropTypes.any,\n disabledDates: PropTypes.arrayOf(PropTypes.string),\n disabledPast: PropTypes.bool,\n disabledWeekends: PropTypes.bool,\n format: PropTypes.string,\n from: PropTypes.instanceOf(Date),\n locale: PropTypes.string,\n range: PropTypes.bool,\n to: PropTypes.instanceOf(Date),\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]),\n onChange: PropTypes.func,\n onFocus: PropTypes.func,\n onNext: PropTypes.func,\n onPrevious: PropTypes.func,\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;;;AAEO,IAAMA,KAAK,GAAG,SAARA,KAAQ,OAef;EAAA,IAdJC,KAcI,QAdJA,KAcI;EAAA,IAbJC,QAaI,QAbJA,QAaI;EAAA,IAZJC,QAYI,QAZJA,QAYI;EAAA,6BAXJC,YAWI;EAAA,IAXJA,YAWI,kCAXW,IAWX;EAAA,IAVJC,MAUI,QAVJA,MAUI;EAAA,IATJC,IASI,QATJ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BAAUY,IAhBF;EAiBhB7B,UAAU,EAAEiB,mBAAUY;AAjBN,CAAlB"}
1
+ {"version":3,"file":"Calendar.Month.js","names":["Month","focus","instance","selected","disabledPast","format","from","locale","range","to","onChange","onFocus","onNext","onPrevious","others","isDesktop","weekNumber","style","month","className","header","title","pressable","VISIBLE_WEEKS","map","week","getMonth","getFullYear","displayName","propTypes","captions","PropTypes","shape","any","disabledDates","arrayOf","string","bool","disabledWeekends","instanceOf","Date","value","oneOfType","func"],"sources":["../../../src/components/Calendar/Calendar.Month.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { styles } from '../../helpers';\nimport { useDevice } from '../../hooks';\nimport { Icon, Pressable, Text, View } from '../../primitives';\nimport { VISIBLE_WEEKS } from './Calendar.constants';\nimport style from './Calendar.module.css';\nimport { Week } from './Calendar.Week';\nimport { Weekdays } from './Calendar.Weekdays';\nimport { getHeader, getWeekNumber } from './helpers';\n\nexport const Month = ({\n focus,\n instance,\n selected,\n disabledPast = true,\n format,\n from,\n locale,\n range = false,\n to,\n onChange = () => {},\n onFocus = () => {},\n onNext,\n onPrevious,\n ...others\n}) => {\n const { isDesktop } = useDevice();\n const weekNumber = getWeekNumber(instance);\n\n return (\n <View className={styles(style.month, others.className)}>\n <View row className={style.header}>\n {onPrevious && (\n <Pressable onPress={onPrevious}>\n <Icon name=\"Left\" />\n </Pressable>\n )}\n <Text subheadline className={style.title}>\n {getHeader(instance, locale)}\n </Text>\n {onNext && (\n <Pressable onPress={onNext} className={style.pressable}>\n <Icon name=\"Right\" />\n </Pressable>\n )}\n </View>\n\n {isDesktop && <Weekdays locale={locale} />}\n\n {VISIBLE_WEEKS.map((week) => (\n <Week\n {...{\n ...others,\n disabledPast,\n focus,\n format,\n from,\n locale,\n to,\n range,\n selected,\n }}\n key={week}\n month={instance.getMonth()}\n number={weekNumber + week}\n year={instance.getFullYear()}\n onFocus={onFocus}\n onPress={onChange}\n />\n ))}\n </View>\n );\n};\n\nMonth.displayName = 'Component:Calendar:Month';\n\nMonth.propTypes = {\n captions: PropTypes.shape({}),\n focus: PropTypes.any,\n instance: PropTypes.any,\n selected: PropTypes.any,\n disabledDates: PropTypes.arrayOf(PropTypes.string),\n disabledPast: PropTypes.bool,\n disabledWeekends: PropTypes.bool,\n format: PropTypes.string,\n from: PropTypes.instanceOf(Date),\n locale: PropTypes.string,\n range: PropTypes.bool,\n to: PropTypes.instanceOf(Date),\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]),\n onChange: PropTypes.func,\n onFocus: PropTypes.func,\n onNext: PropTypes.func,\n onPrevious: PropTypes.func,\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;;;AAEO,IAAMA,KAAK,GAAG,SAARA,KAAQ,OAef;EAAA,IAdJC,KAcI,QAdJA,KAcI;EAAA,IAbJC,QAaI,QAbJA,QAaI;EAAA,IAZJC,QAYI,QAZJA,QAYI;EAAA,6BAXJC,YAWI;EAAA,IAXJA,YAWI,kCAXW,IAWX;EAAA,IAVJC,MAUI,QAVJA,MAUI;EAAA,IATJC,IASI,QATJA,IASI;EAAA,IARJC,MAQI,QARJA,MAQI;EAAA,sBAPJC,KAOI;EAAA,IAPJA,KAOI,2BAPI,KAOJ;EAAA,IANJC,EAMI,QANJA,EAMI;EAAA,yBALJC,QAKI;EAAA,IALJA,QAKI,8BALO,YAAM,CAAE,CAKf;EAAA,wBAJJC,OAII;EAAA,IAJJA,OAII,6BAJM,YAAM,CAAE,CAId;EAAA,IAHJC,MAGI,QAHJA,MAGI;EAAA,IAFJC,UAEI,QAFJA,UAEI;EAAA,IADDC,MACC;;EACJ,iBAAsB,uBAAtB;EAAA,IAAQC,SAAR,cAAQA,SAAR;;EACA,IAAMC,UAAU,GAAG,6BAAcd,QAAd,CAAnB;EAEA,oBACE,6BAAC,gBAAD;IAAM,SAAS,EAAE,qBAAO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,EAAEC,mBAAUC,KAAV,CAAgB,EAAhB,CADM;EAEhB/B,KAAK,EAAE8B,mBAAUE,GAFD;EAGhB/B,QAAQ,EAAE6B,mBAAUE,GAHJ;EAIhB9B,QAAQ,EAAE4B,mBAAUE,GAJJ;EAKhBC,aAAa,EAAEH,mBAAUI,OAAV,CAAkBJ,mBAAUK,MAA5B,CALC;EAMhBhC,YAAY,EAAE2B,mBAAUM,IANR;EAOhBC,gBAAgB,EAAEP,mBAAUM,IAPZ;EAQhBhC,MAAM,EAAE0B,mBAAUK,MARF;EAShB9B,IAAI,EAAEyB,mBAAUQ,UAAV,CAAqBC,IAArB,CATU;EAUhBjC,MAAM,EAAEwB,mBAAUK,MAVF;EAWhB5B,KAAK,EAAEuB,mBAAUM,IAXD;EAYhB5B,EAAE,EAAEsB,mBAAUQ,UAAV,CAAqBC,IAArB,CAZY;EAahBC,KAAK,EAAEV,mBAAUW,SAAV,CAAoB,CAACX,mBAAUK,MAAX,EAAmBL,mBAAUI,OAAV,CAAkBJ,mBAAUK,MAA5B,CAAnB,CAApB,CAbS;EAchB1B,QAAQ,EAAEqB,mBAAUY,IAdJ;EAehBhC,OAAO,EAAEoB,mBAAUY,IAfH;EAgBhB/B,MAAM,EAAEmB,mBAAUY,IAhBF;EAiBhB9B,UAAU,EAAEkB,mBAAUY;AAjBN,CAAlB"}
@@ -27,7 +27,8 @@ var _Calendar2 = require("./Calendar.Weekdays");
27
27
 
28
28
  var _helpers2 = require("./helpers");
29
29
 
30
- var _excluded = ["disabledPast", "format", "from", "months", "locale", "range", "rangeMaxDays", "to", "value", "onChange", "onFocus", "onScroll"];
30
+ var _excluded = ["disabledPast", "format", "from", "months", "locale", "range", "rangeMaxDays", "to", "value", "onChange", "onFocus", "onScroll"],
31
+ _excluded2 = ["className"];
31
32
 
32
33
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
33
34
 
@@ -138,7 +139,10 @@ var Calendar = function Calendar(_ref) {
138
139
  var disabledPrevious = disabledPast && instanceTS <= todayMonthTS || from && instanceTS <= (0, _helpers2.getFirstDateOfMonth)((0, _locale.parseDate)(from, format)).getTime();
139
140
  var disabledNext = to && instanceTS >= (0, _helpers2.getFirstDateOfMonth)((0, _locale.parseDate)(to, format)).getTime();
140
141
 
141
- var props = _objectSpread(_objectSpread({}, others), {}, {
142
+ var className = others.className,
143
+ props = _objectWithoutProperties(others, _excluded2);
144
+
145
+ props = _objectSpread(_objectSpread({}, props), {}, {
142
146
  disabledPast: disabledPast,
143
147
  focus: focus,
144
148
  format: format,
@@ -150,15 +154,15 @@ var Calendar = function Calendar(_ref) {
150
154
  onChange: handleChange,
151
155
  onFocus: isDesktop ? setFocus : undefined
152
156
  });
153
-
154
157
  return /*#__PURE__*/_react.default.createElement(_primitives.View, {
155
- "data-testid": others['data-testid']
158
+ "data-testid": others['data-testid'],
159
+ className: (0, _helpers.styles)(_CalendarModule.default.container, className)
156
160
  }, !isDesktop && /*#__PURE__*/_react.default.createElement(_Calendar2.Weekdays, {
157
161
  locale: locale
158
162
  }), /*#__PURE__*/_react.default.createElement(_primitives.ScrollView, {
159
- onScroll: onScroll,
160
163
  horizontal: isDesktop,
161
- className: (0, _helpers.styles)(_CalendarModule.default.scrollview, others.className)
164
+ className: _CalendarModule.default.scrollview,
165
+ onScroll: onScroll
162
166
  }, Array.from({
163
167
  length: months
164
168
  }, function (empty, index) {
@@ -1 +1 @@
1
- {"version":3,"file":"Calendar.js","names":["Calendar","disabledPast","format","from","months","locale","range","rangeMaxDays","to","value","onChange","onFocus","onScroll","others","isDesktop","focus","setFocus","instance","setInstance","undefined","selected","setSelected","date","length","handleChange","next","getTime","handleMonth","month","Date","getFullYear","getMonth","instanceTS","todayMonthTS","disabledPrevious","disabledNext","props","style","scrollview","className","Array","empty","index","displayName","propTypes","captions","PropTypes","shape","disabledDates","arrayOf","string","bool","disabledWeekends","highlights","number","rangeMinDays","oneOfType","func"],"sources":["../../../src/components/Calendar/Calendar.jsx"],"sourcesContent":["import { dateCalc, parseDate, UTC } from '@mirai/locale';\nimport PropTypes from 'prop-types';\nimport React, { useEffect, useState } from 'react';\n\nimport { styles } from '../../helpers';\nimport { useDevice } from '../../hooks';\nimport { ScrollView, View } from '../../primitives';\nimport style from './Calendar.module.css';\nimport { Month } from './Calendar.Month';\nimport { Weekdays } from './Calendar.Weekdays';\nimport { getFirstDateOfMonth, getToday } from './helpers';\n\nexport const Calendar = ({\n disabledPast = true,\n format = 'YYYY/MM/DD',\n from,\n months = 2,\n locale,\n range = false,\n rangeMaxDays,\n to,\n value,\n onChange = () => {},\n onFocus = () => {},\n onScroll,\n ...others\n}) => {\n const { isDesktop } = useDevice();\n\n const [focus, setFocus] = useState();\n const [instance, setInstance] = useState(getFirstDateOfMonth(getToday()));\n const [selected, setSelected] = useState(range ? [] : undefined);\n\n useEffect(() => {\n let date = range ? (value ? value[0] : undefined) : value;\n if (!date) return setSelected(range ? [] : undefined);\n\n date = parseDate(date, format);\n if ((range && selected.length === 0) || !range) setInstance(getFirstDateOfMonth(date));\n\n setSelected(range ? [UTC(date), value[1] ? UTC(parseDate(value[1], format)) : undefined] : UTC(date));\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [format, range, value]);\n\n useEffect(() => {\n onFocus(focus);\n }, [focus, onFocus]);\n\n const handleChange = (date) => {\n setSelected(() => {\n let next;\n\n if (!range) {\n next = date;\n } else if (selected[1] === undefined && date > selected[0]) {\n next = [selected[0], date];\n } else {\n next = [selected[0]?.getTime() === date.getTime() ? undefined : date];\n setFocus(undefined);\n }\n onChange(next);\n\n return next;\n });\n };\n\n const handleMonth = (month) => {\n setInstance(getFirstDateOfMonth(new Date(instance.getFullYear(), instance.getMonth() + month)));\n };\n\n const instanceTS = instance.getTime();\n const todayMonthTS = getFirstDateOfMonth(getToday()).getTime();\n const disabledPrevious =\n (disabledPast && instanceTS <= todayMonthTS) ||\n (from && instanceTS <= getFirstDateOfMonth(parseDate(from, format)).getTime());\n\n const disabledNext = to && instanceTS >= getFirstDateOfMonth(parseDate(to, format)).getTime();\n\n const props = {\n ...others,\n disabledPast,\n focus,\n format,\n from: from ? parseDate(from, format) : undefined,\n locale,\n range,\n to:\n range && rangeMaxDays && selected[0]\n ? dateCalc(selected[0], rangeMaxDays, 'days')\n : to\n ? parseDate(to, format)\n : undefined,\n selected,\n onChange: handleChange,\n onFocus: isDesktop ? setFocus : undefined,\n };\n\n return (\n <View data-testid={others['data-testid']}>\n {!isDesktop && <Weekdays locale={locale} />}\n <ScrollView onScroll={onScroll} horizontal={isDesktop} className={styles(style.scrollview, others.className)}>\n {Array.from({ length: months }, (empty, index) => (\n <Month\n key={index}\n onNext={isDesktop && index === months - 1 && !disabledNext ? () => handleMonth(months) : undefined}\n onPrevious={isDesktop && index === 0 && !disabledPrevious ? () => handleMonth(-months) : undefined}\n instance={new Date(instance.getFullYear(), instance.getMonth() + index, 1)}\n {...props}\n />\n ))}\n </ScrollView>\n </View>\n );\n};\n\nCalendar.displayName = 'Component:Calendar';\n\nCalendar.propTypes = {\n captions: PropTypes.shape({}),\n disabledDates: PropTypes.arrayOf(PropTypes.string),\n disabledPast: PropTypes.bool,\n disabledWeekends: PropTypes.bool,\n format: PropTypes.string,\n from: PropTypes.string,\n highlights: PropTypes.arrayOf(PropTypes.string),\n locale: PropTypes.string,\n months: PropTypes.number,\n range: PropTypes.bool,\n rangeMaxDays: PropTypes.number,\n rangeMinDays: PropTypes.number,\n to: PropTypes.string,\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]),\n onChange: PropTypes.func,\n onFocus: PropTypes.func,\n onScroll: PropTypes.func,\n};\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;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BH,mBAAUI,MAA5B,CAPO;EAQnB7C,MAAM,EAAEyC,mBAAUI,MARC;EASnB9C,MAAM,EAAE0C,mBAAUQ,MATC;EAUnBhD,KAAK,EAAEwC,mBAAUK,IAVE;EAWnB5C,YAAY,EAAEuC,mBAAUQ,MAXL;EAYnBC,YAAY,EAAET,mBAAUQ,MAZL;EAanB9C,EAAE,EAAEsC,mBAAUI,MAbK;EAcnBzC,KAAK,EAAEqC,mBAAUU,SAAV,CAAoB,CAACV,mBAAUI,MAAX,EAAmBJ,mBAAUG,OAAV,CAAkBH,mBAAUI,MAA5B,CAAnB,CAApB,CAdY;EAenBxC,QAAQ,EAAEoC,mBAAUW,IAfD;EAgBnB9C,OAAO,EAAEmC,mBAAUW,IAhBA;EAiBnB7C,QAAQ,EAAEkC,mBAAUW;AAjBD,CAArB"}
1
+ {"version":3,"file":"Calendar.js","names":["Calendar","disabledPast","format","from","months","locale","range","rangeMaxDays","to","value","onChange","onFocus","onScroll","others","isDesktop","focus","setFocus","instance","setInstance","undefined","selected","setSelected","date","length","handleChange","next","getTime","handleMonth","month","Date","getFullYear","getMonth","instanceTS","todayMonthTS","disabledPrevious","disabledNext","className","props","style","container","scrollview","Array","empty","index","displayName","propTypes","captions","PropTypes","shape","disabledDates","arrayOf","string","bool","disabledWeekends","highlights","number","rangeMinDays","oneOfType","func"],"sources":["../../../src/components/Calendar/Calendar.jsx"],"sourcesContent":["import { dateCalc, parseDate, UTC } from '@mirai/locale';\nimport PropTypes from 'prop-types';\nimport React, { useEffect, useState } from 'react';\n\nimport { styles } from '../../helpers';\nimport { useDevice } from '../../hooks';\nimport { ScrollView, View } from '../../primitives';\nimport style from './Calendar.module.css';\nimport { Month } from './Calendar.Month';\nimport { Weekdays } from './Calendar.Weekdays';\nimport { getFirstDateOfMonth, getToday } from './helpers';\n\nexport const Calendar = ({\n disabledPast = true,\n format = 'YYYY/MM/DD',\n from,\n months = 2,\n locale,\n range = false,\n rangeMaxDays,\n to,\n value,\n onChange = () => {},\n onFocus = () => {},\n onScroll,\n ...others\n}) => {\n const { isDesktop } = useDevice();\n\n const [focus, setFocus] = useState();\n const [instance, setInstance] = useState(getFirstDateOfMonth(getToday()));\n const [selected, setSelected] = useState(range ? [] : undefined);\n\n useEffect(() => {\n let date = range ? (value ? value[0] : undefined) : value;\n if (!date) return setSelected(range ? [] : undefined);\n\n date = parseDate(date, format);\n if ((range && selected.length === 0) || !range) setInstance(getFirstDateOfMonth(date));\n\n setSelected(range ? [UTC(date), value[1] ? UTC(parseDate(value[1], format)) : undefined] : UTC(date));\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [format, range, value]);\n\n useEffect(() => {\n onFocus(focus);\n }, [focus, onFocus]);\n\n const handleChange = (date) => {\n setSelected(() => {\n let next;\n\n if (!range) {\n next = date;\n } else if (selected[1] === undefined && date > selected[0]) {\n next = [selected[0], date];\n } else {\n next = [selected[0]?.getTime() === date.getTime() ? undefined : date];\n setFocus(undefined);\n }\n onChange(next);\n\n return next;\n });\n };\n\n const handleMonth = (month) => {\n setInstance(getFirstDateOfMonth(new Date(instance.getFullYear(), instance.getMonth() + month)));\n };\n\n const instanceTS = instance.getTime();\n const todayMonthTS = getFirstDateOfMonth(getToday()).getTime();\n const disabledPrevious =\n (disabledPast && instanceTS <= todayMonthTS) ||\n (from && instanceTS <= getFirstDateOfMonth(parseDate(from, format)).getTime());\n\n const disabledNext = to && instanceTS >= getFirstDateOfMonth(parseDate(to, format)).getTime();\n\n let { className, ...props } = others;\n\n props = {\n ...props,\n disabledPast,\n focus,\n format,\n from: from ? parseDate(from, format) : undefined,\n locale,\n range,\n to:\n range && rangeMaxDays && selected[0]\n ? dateCalc(selected[0], rangeMaxDays, 'days')\n : to\n ? parseDate(to, format)\n : undefined,\n selected,\n onChange: handleChange,\n onFocus: isDesktop ? setFocus : undefined,\n };\n\n return (\n <View data-testid={others['data-testid']} className={styles(style.container, className)}>\n {!isDesktop && <Weekdays locale={locale} />}\n <ScrollView horizontal={isDesktop} className={style.scrollview} onScroll={onScroll}>\n {Array.from({ length: months }, (empty, index) => (\n <Month\n key={index}\n onNext={isDesktop && index === months - 1 && !disabledNext ? () => handleMonth(months) : undefined}\n onPrevious={isDesktop && index === 0 && !disabledPrevious ? () => handleMonth(-months) : undefined}\n instance={new Date(instance.getFullYear(), instance.getMonth() + index, 1)}\n {...props}\n />\n ))}\n </ScrollView>\n </View>\n );\n};\n\nCalendar.displayName = 'Component:Calendar';\n\nCalendar.propTypes = {\n captions: PropTypes.shape({}),\n disabledDates: PropTypes.arrayOf(PropTypes.string),\n disabledPast: PropTypes.bool,\n disabledWeekends: PropTypes.bool,\n format: PropTypes.string,\n from: PropTypes.string,\n highlights: PropTypes.arrayOf(PropTypes.string),\n locale: PropTypes.string,\n months: PropTypes.number,\n range: PropTypes.bool,\n rangeMaxDays: PropTypes.number,\n rangeMinDays: PropTypes.number,\n to: PropTypes.string,\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]),\n onChange: PropTypes.func,\n onFocus: PropTypes.func,\n onScroll: PropTypes.func,\n};\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEO,IAAMA,QAAQ,GAAG,SAAXA,QAAW,OAclB;EAAA,6BAbJC,YAaI;EAAA,IAbJA,YAaI,kCAbW,IAaX;EAAA,uBAZJC,MAYI;EAAA,IAZJA,MAYI,4BAZK,YAYL;EAAA,IAXJC,IAWI,QAXJA,IAWI;EAAA,uBAVJC,MAUI;EAAA,IAVJA,MAUI,4BAVK,CAUL;EAAA,IATJC,MASI,QATJA,MASI;EAAA,sBARJC,KAQI;EAAA,IARJA,KAQI,2BARI,KAQJ;EAAA,IAPJC,YAOI,QAPJA,YAOI;EAAA,IANJC,EAMI,QANJA,EAMI;EAAA,IALJC,KAKI,QALJA,KAKI;EAAA,yBAJJC,QAII;EAAA,IAJJ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CAAnB,CAApB,CAdY;EAenBzC,QAAQ,EAAEqC,mBAAUW,IAfD;EAgBnB/C,OAAO,EAAEoC,mBAAUW,IAhBA;EAiBnB9C,QAAQ,EAAEmC,mBAAUW;AAjBD,CAArB"}
@@ -9,10 +9,6 @@
9
9
  --mirai-ui-calendar-week-margin: 2px;
10
10
  }
11
11
 
12
- .scrollview {
13
- max-height: calc(var(--mirai-ui-calendar-cell) * 13.2);
14
- }
15
-
16
12
  .month {
17
13
  justify-content: flex-start;
18
14
  padding: var(--mirai-ui-calendar-padding);
@@ -23,6 +19,11 @@
23
19
  padding: var(--mirai-ui-calendar-padding);
24
20
  }
25
21
 
22
+ .scrollview {
23
+ height: 100%;
24
+ width: 100%;
25
+ }
26
+
26
27
  .title {
27
28
  flex: 1;
28
29
  text-align: center;
@@ -94,8 +95,8 @@
94
95
  }
95
96
 
96
97
  @media only screen and (max-width: 600px) {
97
- .scrollview {
98
- width: 100vw;
98
+ .container {
99
+ max-height: calc(var(--mirai-ui-calendar-cell) * 15);
99
100
  }
100
101
 
101
102
  .month {
@@ -3,19 +3,19 @@
3
3
  exports[`component:<Calendar> inherit:className 1`] = `
4
4
  <DocumentFragment>
5
5
  <div
6
- class="view"
6
+ class="view container mirai"
7
7
  >
8
8
  <div
9
- class="scrollview snap horizontal scrollview mirai"
9
+ class="scrollview snap horizontal scrollview"
10
10
  >
11
11
  <div
12
- class="view month mirai"
12
+ class="view month"
13
13
  >
14
14
  <div
15
15
  class="view row header"
16
16
  >
17
17
  <span
18
- class="text bold subheadline title"
18
+ class="text subheadline title"
19
19
  >
20
20
  abril 1980
21
21
  </span>
@@ -595,18 +595,18 @@ exports[`component:<Calendar> inherit:className 1`] = `
595
595
  </div>
596
596
  </div>
597
597
  <div
598
- class="view month mirai"
598
+ class="view month"
599
599
  >
600
600
  <div
601
601
  class="view row header"
602
602
  >
603
603
  <span
604
- class="text bold subheadline title"
604
+ class="text subheadline title"
605
605
  >
606
606
  mayo 1980
607
607
  </span>
608
608
  <button
609
- class="pressable"
609
+ class="pressable pressable"
610
610
  >
611
611
  <span
612
612
  class="icon"
@@ -1227,7 +1227,7 @@ exports[`component:<Calendar> inherit:className 1`] = `
1227
1227
  exports[`component:<Calendar> prop:captions 1`] = `
1228
1228
  <DocumentFragment>
1229
1229
  <div
1230
- class="view"
1230
+ class="view container"
1231
1231
  >
1232
1232
  <div
1233
1233
  class="scrollview snap horizontal scrollview"
@@ -1239,7 +1239,7 @@ exports[`component:<Calendar> prop:captions 1`] = `
1239
1239
  class="view row header"
1240
1240
  >
1241
1241
  <span
1242
- class="text bold subheadline title"
1242
+ class="text subheadline title"
1243
1243
  >
1244
1244
  abril 1980
1245
1245
  </span>
@@ -1915,12 +1915,12 @@ exports[`component:<Calendar> prop:captions 1`] = `
1915
1915
  class="view row header"
1916
1916
  >
1917
1917
  <span
1918
- class="text bold subheadline title"
1918
+ class="text subheadline title"
1919
1919
  >
1920
1920
  mayo 1980
1921
1921
  </span>
1922
1922
  <button
1923
- class="pressable"
1923
+ class="pressable pressable"
1924
1924
  >
1925
1925
  <span
1926
1926
  class="icon"
@@ -2634,7 +2634,7 @@ exports[`component:<Calendar> prop:captions 1`] = `
2634
2634
  exports[`component:<Calendar> prop:disabledDates 1`] = `
2635
2635
  <DocumentFragment>
2636
2636
  <div
2637
- class="view"
2637
+ class="view container"
2638
2638
  >
2639
2639
  <div
2640
2640
  class="scrollview snap horizontal scrollview"
@@ -2646,7 +2646,7 @@ exports[`component:<Calendar> prop:disabledDates 1`] = `
2646
2646
  class="view row header"
2647
2647
  >
2648
2648
  <span
2649
- class="text bold subheadline title"
2649
+ class="text subheadline title"
2650
2650
  >
2651
2651
  abril 1980
2652
2652
  </span>
@@ -3232,12 +3232,12 @@ exports[`component:<Calendar> prop:disabledDates 1`] = `
3232
3232
  class="view row header"
3233
3233
  >
3234
3234
  <span
3235
- class="text bold subheadline title"
3235
+ class="text subheadline title"
3236
3236
  >
3237
3237
  mayo 1980
3238
3238
  </span>
3239
3239
  <button
3240
- class="pressable"
3240
+ class="pressable pressable"
3241
3241
  >
3242
3242
  <span
3243
3243
  class="icon"
@@ -3858,7 +3858,7 @@ exports[`component:<Calendar> prop:disabledDates 1`] = `
3858
3858
  exports[`component:<Calendar> prop:disabledPast 1`] = `
3859
3859
  <DocumentFragment>
3860
3860
  <div
3861
- class="view"
3861
+ class="view container"
3862
3862
  >
3863
3863
  <div
3864
3864
  class="scrollview snap horizontal scrollview"
@@ -3870,7 +3870,7 @@ exports[`component:<Calendar> prop:disabledPast 1`] = `
3870
3870
  class="view row header"
3871
3871
  >
3872
3872
  <span
3873
- class="text bold subheadline title"
3873
+ class="text subheadline title"
3874
3874
  >
3875
3875
  abril 1980
3876
3876
  </span>
@@ -4456,12 +4456,12 @@ exports[`component:<Calendar> prop:disabledPast 1`] = `
4456
4456
  class="view row header"
4457
4457
  >
4458
4458
  <span
4459
- class="text bold subheadline title"
4459
+ class="text subheadline title"
4460
4460
  >
4461
4461
  mayo 1980
4462
4462
  </span>
4463
4463
  <button
4464
- class="pressable"
4464
+ class="pressable pressable"
4465
4465
  >
4466
4466
  <span
4467
4467
  class="icon"
@@ -5082,7 +5082,7 @@ exports[`component:<Calendar> prop:disabledPast 1`] = `
5082
5082
  exports[`component:<Calendar> prop:disabledWeekends 1`] = `
5083
5083
  <DocumentFragment>
5084
5084
  <div
5085
- class="view"
5085
+ class="view container"
5086
5086
  >
5087
5087
  <div
5088
5088
  class="scrollview snap horizontal scrollview"
@@ -5094,7 +5094,7 @@ exports[`component:<Calendar> prop:disabledWeekends 1`] = `
5094
5094
  class="view row header"
5095
5095
  >
5096
5096
  <span
5097
- class="text bold subheadline title"
5097
+ class="text subheadline title"
5098
5098
  >
5099
5099
  abril 1980
5100
5100
  </span>
@@ -5680,12 +5680,12 @@ exports[`component:<Calendar> prop:disabledWeekends 1`] = `
5680
5680
  class="view row header"
5681
5681
  >
5682
5682
  <span
5683
- class="text bold subheadline title"
5683
+ class="text subheadline title"
5684
5684
  >
5685
5685
  mayo 1980
5686
5686
  </span>
5687
5687
  <button
5688
- class="pressable"
5688
+ class="pressable pressable"
5689
5689
  >
5690
5690
  <span
5691
5691
  class="icon"
@@ -6306,7 +6306,7 @@ exports[`component:<Calendar> prop:disabledWeekends 1`] = `
6306
6306
  exports[`component:<Calendar> prop:format 1`] = `
6307
6307
  <DocumentFragment>
6308
6308
  <div
6309
- class="view"
6309
+ class="view container"
6310
6310
  >
6311
6311
  <div
6312
6312
  class="scrollview snap horizontal scrollview"
@@ -6318,7 +6318,7 @@ exports[`component:<Calendar> prop:format 1`] = `
6318
6318
  class="view row header"
6319
6319
  >
6320
6320
  <span
6321
- class="text bold subheadline title"
6321
+ class="text subheadline title"
6322
6322
  >
6323
6323
  abril 1980
6324
6324
  </span>
@@ -6904,12 +6904,12 @@ exports[`component:<Calendar> prop:format 1`] = `
6904
6904
  class="view row header"
6905
6905
  >
6906
6906
  <span
6907
- class="text bold subheadline title"
6907
+ class="text subheadline title"
6908
6908
  >
6909
6909
  mayo 1980
6910
6910
  </span>
6911
6911
  <button
6912
- class="pressable"
6912
+ class="pressable pressable"
6913
6913
  >
6914
6914
  <span
6915
6915
  class="icon"
@@ -7530,7 +7530,7 @@ exports[`component:<Calendar> prop:format 1`] = `
7530
7530
  exports[`component:<Calendar> prop:from 1`] = `
7531
7531
  <DocumentFragment>
7532
7532
  <div
7533
- class="view"
7533
+ class="view container"
7534
7534
  >
7535
7535
  <div
7536
7536
  class="scrollview snap horizontal scrollview"
@@ -7542,7 +7542,7 @@ exports[`component:<Calendar> prop:from 1`] = `
7542
7542
  class="view row header"
7543
7543
  >
7544
7544
  <span
7545
- class="text bold subheadline title"
7545
+ class="text subheadline title"
7546
7546
  >
7547
7547
  abril 1980
7548
7548
  </span>
@@ -8128,12 +8128,12 @@ exports[`component:<Calendar> prop:from 1`] = `
8128
8128
  class="view row header"
8129
8129
  >
8130
8130
  <span
8131
- class="text bold subheadline title"
8131
+ class="text subheadline title"
8132
8132
  >
8133
8133
  mayo 1980
8134
8134
  </span>
8135
8135
  <button
8136
- class="pressable"
8136
+ class="pressable pressable"
8137
8137
  >
8138
8138
  <span
8139
8139
  class="icon"
@@ -8754,7 +8754,7 @@ exports[`component:<Calendar> prop:from 1`] = `
8754
8754
  exports[`component:<Calendar> prop:highlights 1`] = `
8755
8755
  <DocumentFragment>
8756
8756
  <div
8757
- class="view"
8757
+ class="view container"
8758
8758
  >
8759
8759
  <div
8760
8760
  class="scrollview snap horizontal scrollview"
@@ -8766,7 +8766,7 @@ exports[`component:<Calendar> prop:highlights 1`] = `
8766
8766
  class="view row header"
8767
8767
  >
8768
8768
  <span
8769
- class="text bold subheadline title"
8769
+ class="text subheadline title"
8770
8770
  >
8771
8771
  abril 1980
8772
8772
  </span>
@@ -9352,12 +9352,12 @@ exports[`component:<Calendar> prop:highlights 1`] = `
9352
9352
  class="view row header"
9353
9353
  >
9354
9354
  <span
9355
- class="text bold subheadline title"
9355
+ class="text subheadline title"
9356
9356
  >
9357
9357
  mayo 1980
9358
9358
  </span>
9359
9359
  <button
9360
- class="pressable"
9360
+ class="pressable pressable"
9361
9361
  >
9362
9362
  <span
9363
9363
  class="icon"
@@ -9978,7 +9978,7 @@ exports[`component:<Calendar> prop:highlights 1`] = `
9978
9978
  exports[`component:<Calendar> prop:locale 1`] = `
9979
9979
  <DocumentFragment>
9980
9980
  <div
9981
- class="view"
9981
+ class="view container"
9982
9982
  >
9983
9983
  <div
9984
9984
  class="scrollview snap horizontal scrollview"
@@ -9990,7 +9990,7 @@ exports[`component:<Calendar> prop:locale 1`] = `
9990
9990
  class="view row header"
9991
9991
  >
9992
9992
  <span
9993
- class="text bold subheadline title"
9993
+ class="text subheadline title"
9994
9994
  >
9995
9995
  abril 1980
9996
9996
  </span>
@@ -10576,12 +10576,12 @@ exports[`component:<Calendar> prop:locale 1`] = `
10576
10576
  class="view row header"
10577
10577
  >
10578
10578
  <span
10579
- class="text bold subheadline title"
10579
+ class="text subheadline title"
10580
10580
  >
10581
10581
  mayo 1980
10582
10582
  </span>
10583
10583
  <button
10584
- class="pressable"
10584
+ class="pressable pressable"
10585
10585
  >
10586
10586
  <span
10587
10587
  class="icon"
@@ -11202,7 +11202,7 @@ exports[`component:<Calendar> prop:locale 1`] = `
11202
11202
  exports[`component:<Calendar> prop:locale en-US 1`] = `
11203
11203
  <DocumentFragment>
11204
11204
  <div
11205
- class="view"
11205
+ class="view container"
11206
11206
  >
11207
11207
  <div
11208
11208
  class="scrollview snap horizontal scrollview"
@@ -11214,7 +11214,7 @@ exports[`component:<Calendar> prop:locale en-US 1`] = `
11214
11214
  class="view row header"
11215
11215
  >
11216
11216
  <span
11217
- class="text bold subheadline title"
11217
+ class="text subheadline title"
11218
11218
  >
11219
11219
  April 1980
11220
11220
  </span>
@@ -11800,12 +11800,12 @@ exports[`component:<Calendar> prop:locale en-US 1`] = `
11800
11800
  class="view row header"
11801
11801
  >
11802
11802
  <span
11803
- class="text bold subheadline title"
11803
+ class="text subheadline title"
11804
11804
  >
11805
11805
  May 1980
11806
11806
  </span>
11807
11807
  <button
11808
- class="pressable"
11808
+ class="pressable pressable"
11809
11809
  >
11810
11810
  <span
11811
11811
  class="icon"
@@ -12426,7 +12426,7 @@ exports[`component:<Calendar> prop:locale en-US 1`] = `
12426
12426
  exports[`component:<Calendar> prop:months 1`] = `
12427
12427
  <DocumentFragment>
12428
12428
  <div
12429
- class="view"
12429
+ class="view container"
12430
12430
  >
12431
12431
  <div
12432
12432
  class="scrollview snap horizontal scrollview"
@@ -12438,7 +12438,7 @@ exports[`component:<Calendar> prop:months 1`] = `
12438
12438
  class="view row header"
12439
12439
  >
12440
12440
  <span
12441
- class="text bold subheadline title"
12441
+ class="text subheadline title"
12442
12442
  >
12443
12443
  abril 1980
12444
12444
  </span>
@@ -13024,7 +13024,7 @@ exports[`component:<Calendar> prop:months 1`] = `
13024
13024
  class="view row header"
13025
13025
  >
13026
13026
  <span
13027
- class="text bold subheadline title"
13027
+ class="text subheadline title"
13028
13028
  >
13029
13029
  mayo 1980
13030
13030
  </span>
@@ -13620,12 +13620,12 @@ exports[`component:<Calendar> prop:months 1`] = `
13620
13620
  class="view row header"
13621
13621
  >
13622
13622
  <span
13623
- class="text bold subheadline title"
13623
+ class="text subheadline title"
13624
13624
  >
13625
13625
  junio 1980
13626
13626
  </span>
13627
13627
  <button
13628
- class="pressable"
13628
+ class="pressable pressable"
13629
13629
  >
13630
13630
  <span
13631
13631
  class="icon"
@@ -14236,7 +14236,7 @@ exports[`component:<Calendar> prop:months 1`] = `
14236
14236
  exports[`component:<Calendar> prop:range 1`] = `
14237
14237
  <DocumentFragment>
14238
14238
  <div
14239
- class="view"
14239
+ class="view container"
14240
14240
  >
14241
14241
  <div
14242
14242
  class="scrollview snap horizontal scrollview"
@@ -14248,7 +14248,7 @@ exports[`component:<Calendar> prop:range 1`] = `
14248
14248
  class="view row header"
14249
14249
  >
14250
14250
  <span
14251
- class="text bold subheadline title"
14251
+ class="text subheadline title"
14252
14252
  >
14253
14253
  abril 1980
14254
14254
  </span>
@@ -14834,12 +14834,12 @@ exports[`component:<Calendar> prop:range 1`] = `
14834
14834
  class="view row header"
14835
14835
  >
14836
14836
  <span
14837
- class="text bold subheadline title"
14837
+ class="text subheadline title"
14838
14838
  >
14839
14839
  mayo 1980
14840
14840
  </span>
14841
14841
  <button
14842
- class="pressable"
14842
+ class="pressable pressable"
14843
14843
  >
14844
14844
  <span
14845
14845
  class="icon"
@@ -15460,7 +15460,7 @@ exports[`component:<Calendar> prop:range 1`] = `
15460
15460
  exports[`component:<Calendar> prop:rangeMaxDays 1`] = `
15461
15461
  <DocumentFragment>
15462
15462
  <div
15463
- class="view"
15463
+ class="view container"
15464
15464
  >
15465
15465
  <div
15466
15466
  class="scrollview snap horizontal scrollview"
@@ -15472,7 +15472,7 @@ exports[`component:<Calendar> prop:rangeMaxDays 1`] = `
15472
15472
  class="view row header"
15473
15473
  >
15474
15474
  <span
15475
- class="text bold subheadline title"
15475
+ class="text subheadline title"
15476
15476
  >
15477
15477
  abril 1980
15478
15478
  </span>
@@ -16058,12 +16058,12 @@ exports[`component:<Calendar> prop:rangeMaxDays 1`] = `
16058
16058
  class="view row header"
16059
16059
  >
16060
16060
  <span
16061
- class="text bold subheadline title"
16061
+ class="text subheadline title"
16062
16062
  >
16063
16063
  mayo 1980
16064
16064
  </span>
16065
16065
  <button
16066
- class="pressable"
16066
+ class="pressable pressable"
16067
16067
  >
16068
16068
  <span
16069
16069
  class="icon"
@@ -16684,7 +16684,7 @@ exports[`component:<Calendar> prop:rangeMaxDays 1`] = `
16684
16684
  exports[`component:<Calendar> prop:rangeMinDays 1`] = `
16685
16685
  <DocumentFragment>
16686
16686
  <div
16687
- class="view"
16687
+ class="view container"
16688
16688
  >
16689
16689
  <div
16690
16690
  class="scrollview snap horizontal scrollview"
@@ -16696,7 +16696,7 @@ exports[`component:<Calendar> prop:rangeMinDays 1`] = `
16696
16696
  class="view row header"
16697
16697
  >
16698
16698
  <span
16699
- class="text bold subheadline title"
16699
+ class="text subheadline title"
16700
16700
  >
16701
16701
  abril 1980
16702
16702
  </span>
@@ -17282,12 +17282,12 @@ exports[`component:<Calendar> prop:rangeMinDays 1`] = `
17282
17282
  class="view row header"
17283
17283
  >
17284
17284
  <span
17285
- class="text bold subheadline title"
17285
+ class="text subheadline title"
17286
17286
  >
17287
17287
  mayo 1980
17288
17288
  </span>
17289
17289
  <button
17290
- class="pressable"
17290
+ class="pressable pressable"
17291
17291
  >
17292
17292
  <span
17293
17293
  class="icon"
@@ -17908,7 +17908,7 @@ exports[`component:<Calendar> prop:rangeMinDays 1`] = `
17908
17908
  exports[`component:<Calendar> prop:to 1`] = `
17909
17909
  <DocumentFragment>
17910
17910
  <div
17911
- class="view"
17911
+ class="view container"
17912
17912
  >
17913
17913
  <div
17914
17914
  class="scrollview snap horizontal scrollview"
@@ -17920,7 +17920,7 @@ exports[`component:<Calendar> prop:to 1`] = `
17920
17920
  class="view row header"
17921
17921
  >
17922
17922
  <span
17923
- class="text bold subheadline title"
17923
+ class="text subheadline title"
17924
17924
  >
17925
17925
  abril 1980
17926
17926
  </span>
@@ -18506,12 +18506,12 @@ exports[`component:<Calendar> prop:to 1`] = `
18506
18506
  class="view row header"
18507
18507
  >
18508
18508
  <span
18509
- class="text bold subheadline title"
18509
+ class="text subheadline title"
18510
18510
  >
18511
18511
  mayo 1980
18512
18512
  </span>
18513
18513
  <button
18514
- class="pressable"
18514
+ class="pressable pressable"
18515
18515
  >
18516
18516
  <span
18517
18517
  class="icon"
@@ -19132,7 +19132,7 @@ exports[`component:<Calendar> prop:to 1`] = `
19132
19132
  exports[`component:<Calendar> renders 1`] = `
19133
19133
  <DocumentFragment>
19134
19134
  <div
19135
- class="view"
19135
+ class="view container"
19136
19136
  >
19137
19137
  <div
19138
19138
  class="scrollview snap horizontal scrollview"
@@ -19144,7 +19144,7 @@ exports[`component:<Calendar> renders 1`] = `
19144
19144
  class="view row header"
19145
19145
  >
19146
19146
  <span
19147
- class="text bold subheadline title"
19147
+ class="text subheadline title"
19148
19148
  >
19149
19149
  abril 1980
19150
19150
  </span>
@@ -19730,12 +19730,12 @@ exports[`component:<Calendar> renders 1`] = `
19730
19730
  class="view row header"
19731
19731
  >
19732
19732
  <span
19733
- class="text bold subheadline title"
19733
+ class="text subheadline title"
19734
19734
  >
19735
19735
  mayo 1980
19736
19736
  </span>
19737
19737
  <button
19738
- class="pressable"
19738
+ class="pressable pressable"
19739
19739
  >
19740
19740
  <span
19741
19741
  class="icon"
@@ -20356,7 +20356,7 @@ exports[`component:<Calendar> renders 1`] = `
20356
20356
  exports[`component:<Calendar> testID 1`] = `
20357
20357
  <DocumentFragment>
20358
20358
  <div
20359
- class="view"
20359
+ class="view container"
20360
20360
  data-testid="mirai"
20361
20361
  >
20362
20362
  <div
@@ -20369,7 +20369,7 @@ exports[`component:<Calendar> testID 1`] = `
20369
20369
  class="view row header"
20370
20370
  >
20371
20371
  <span
20372
- class="text bold subheadline title"
20372
+ class="text subheadline title"
20373
20373
  >
20374
20374
  abril 1980
20375
20375
  </span>
@@ -20955,12 +20955,12 @@ exports[`component:<Calendar> testID 1`] = `
20955
20955
  class="view row header"
20956
20956
  >
20957
20957
  <span
20958
- class="text bold subheadline title"
20958
+ class="text subheadline title"
20959
20959
  >
20960
20960
  mayo 1980
20961
20961
  </span>
20962
20962
  <button
20963
- class="pressable"
20963
+ class="pressable pressable"
20964
20964
  >
20965
20965
  <span
20966
20966
  class="icon"
@@ -17,7 +17,7 @@ var _primitives = require("../../primitives");
17
17
 
18
18
  var _ModalModule = _interopRequireDefault(require("./Modal.module.css"));
19
19
 
20
- var _excluded = ["children", "visible", "onClose"];
20
+ var _excluded = ["children", "overflow", "title", "visible", "onBack", "onClose"];
21
21
 
22
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23
23
 
@@ -29,7 +29,11 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
29
29
 
30
30
  var Modal = function Modal(_ref) {
31
31
  var children = _ref.children,
32
+ _ref$overflow = _ref.overflow,
33
+ overflow = _ref$overflow === void 0 ? true : _ref$overflow,
34
+ title = _ref.title,
32
35
  visible = _ref.visible,
36
+ onBack = _ref.onBack,
33
37
  onClose = _ref.onClose,
34
38
  others = _objectWithoutProperties(_ref, _excluded);
35
39
 
@@ -38,24 +42,36 @@ var Modal = function Modal(_ref) {
38
42
 
39
43
  return /*#__PURE__*/_react.default.createElement(_primitives.View, {
40
44
  row: true,
41
- className: (0, _helpers.styles)(_ModalModule.default.overflow, visible && _ModalModule.default.visible)
45
+ className: (0, _helpers.styles)(_ModalModule.default.container, overflow && _ModalModule.default.overflow, visible && _ModalModule.default.visible)
42
46
  }, /*#__PURE__*/_react.default.createElement(_primitives.View, _extends({}, others, {
43
47
  fit: true,
44
48
  className: (0, _helpers.styles)(_ModalModule.default.modal, visible && _ModalModule.default.visible, others.className)
45
- }), /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, onClose && /*#__PURE__*/_react.default.createElement(_primitives.Pressable, {
46
- className: _ModalModule.default.pressable,
49
+ }), (title || onBack || onClose) && /*#__PURE__*/_react.default.createElement(_primitives.View, {
50
+ row: true,
51
+ className: _ModalModule.default.header
52
+ }, onBack && /*#__PURE__*/_react.default.createElement(_primitives.Pressable, {
53
+ onPress: onBack
54
+ }, /*#__PURE__*/_react.default.createElement(_primitives.Icon, {
55
+ name: "Left",
56
+ className: _ModalModule.default.icon
57
+ })), title && /*#__PURE__*/_react.default.createElement(_primitives.Text, {
58
+ headline: true,
59
+ className: (0, _helpers.styles)(_ModalModule.default.title, !onBack && _ModalModule.default.left, !onClose && _ModalModule.default.right)
60
+ }, title), onClose && /*#__PURE__*/_react.default.createElement(_primitives.Pressable, {
47
61
  onPress: onClose
48
62
  }, /*#__PURE__*/_react.default.createElement(_primitives.Icon, {
49
- name: isDesktop ? 'Close' : 'CloseArrow',
63
+ name: isDesktop || title !== undefined ? 'Close' : 'CloseArrow',
50
64
  className: _ModalModule.default.icon
51
- })), children)));
65
+ }))), children));
52
66
  };
53
67
 
54
68
  exports.Modal = Modal;
55
- Modal.displayName = 'Component:Modal';
56
69
  Modal.propTypes = {
57
70
  children: _propTypes.default.node,
71
+ overflow: _propTypes.default.bool,
72
+ title: _propTypes.default.string,
58
73
  visible: _propTypes.default.bool,
74
+ onBack: _propTypes.default.func,
59
75
  onClose: _propTypes.default.func
60
76
  };
61
77
  //# sourceMappingURL=Modal.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.js","names":["Modal","children","visible","onClose","others","isDesktop","style","overflow","modal","className","pressable","icon","displayName","propTypes","PropTypes","node","bool","func"],"sources":["../../../src/components/Modal/Modal.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { styles } from '../../helpers';\nimport { useDevice } from '../../hooks';\nimport { Icon, Pressable, View } from '../../primitives';\nimport style from './Modal.module.css';\n\nconst Modal = ({ children, visible, onClose, ...others }) => {\n const { isDesktop } = useDevice();\n\n return (\n <View row className={styles(style.overflow, visible && style.visible)}>\n <View {...others} fit className={styles(style.modal, visible && style.visible, others.className)}>\n <>\n {onClose && (\n <Pressable className={style.pressable} onPress={onClose}>\n <Icon name={isDesktop ? 'Close' : 'CloseArrow'} className={style.icon} />\n </Pressable>\n )}\n {children}\n </>\n </View>\n </View>\n );\n};\n\nModal.displayName = 'Component:Modal';\n\nModal.propTypes = {\n children: PropTypes.node,\n visible: PropTypes.bool,\n onClose: PropTypes.func,\n};\n\nexport { Modal };\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;;;;;;;;;AAEA,IAAMA,KAAK,GAAG,SAARA,KAAQ,OAA+C;EAAA,IAA5CC,QAA4C,QAA5CA,QAA4C;EAAA,IAAlCC,OAAkC,QAAlCA,OAAkC;EAAA,IAAzBC,OAAyB,QAAzBA,OAAyB;EAAA,IAAbC,MAAa;;EAC3D,iBAAsB,uBAAtB;EAAA,IAAQC,SAAR,cAAQA,SAAR;;EAEA,oBACE,6BAAC,gBAAD;IAAM,GAAG,MAAT;IAAU,SAAS,EAAE,qBAAOC,qBAAMC,QAAb,EAAuBL,OAAO,IAAII,qBAAMJ,OAAxC;EAArB,gBACE,6BAAC,gBAAD,eAAUE,MAAV;IAAkB,GAAG,MAArB;IAAsB,SAAS,EAAE,qBAAOE,qBAAME,KAAb,EAAoBN,OAAO,IAAII,qBAAMJ,OAArC,EAA8CE,MAAM,CAACK,SAArD;EAAjC,iBACE,4DACGN,OAAO,iBACN,6BAAC,qBAAD;IAAW,SAAS,EAAEG,qBAAMI,SAA5B;IAAuC,OAAO,EAAEP;EAAhD,gBACE,6BAAC,gBAAD;IAAM,IAAI,EAAEE,SAAS,GAAG,OAAH,GAAa,YAAlC;IAAgD,SAAS,EAAEC,qBAAMK;EAAjE,EADF,CAFJ,EAMGV,QANH,CADF,CADF,CADF;AAcD,CAjBD;;;AAmBAD,KAAK,CAACY,WAAN,GAAoB,iBAApB;AAEAZ,KAAK,CAACa,SAAN,GAAkB;EAChBZ,QAAQ,EAAEa,mBAAUC,IADJ;EAEhBb,OAAO,EAAEY,mBAAUE,IAFH;EAGhBb,OAAO,EAAEW,mBAAUG;AAHH,CAAlB"}
1
+ {"version":3,"file":"Modal.js","names":["Modal","children","overflow","title","visible","onBack","onClose","others","isDesktop","style","container","modal","className","header","icon","left","right","undefined","propTypes","PropTypes","node","bool","string","func"],"sources":["../../../src/components/Modal/Modal.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { styles } from '../../helpers';\nimport { useDevice } from '../../hooks';\nimport { Icon, Pressable, Text, View } from '../../primitives';\nimport style from './Modal.module.css';\n\nconst Modal = ({ children, overflow = true, title, visible, onBack, onClose, ...others }) => {\n const { isDesktop } = useDevice();\n\n return (\n <View row className={styles(style.container, overflow && style.overflow, visible && style.visible)}>\n <View {...others} fit className={styles(style.modal, visible && style.visible, others.className)}>\n {(title || onBack || onClose) && (\n <View row className={style.header}>\n {onBack && (\n <Pressable onPress={onBack}>\n <Icon name=\"Left\" className={style.icon} />\n </Pressable>\n )}\n {title && (\n <Text headline className={styles(style.title, !onBack && style.left, !onClose && style.right)}>\n {title}\n </Text>\n )}\n {onClose && (\n <Pressable onPress={onClose}>\n <Icon name={isDesktop || title !== undefined ? 'Close' : 'CloseArrow'} className={style.icon} />\n </Pressable>\n )}\n </View>\n )}\n {children}\n </View>\n </View>\n );\n};\n\nModal.propTypes = {\n children: PropTypes.node,\n overflow: PropTypes.bool,\n title: PropTypes.string,\n visible: PropTypes.bool,\n onBack: PropTypes.func,\n onClose: PropTypes.func,\n};\n\nexport { Modal };\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;;;;;;;;;AAEA,IAAMA,KAAK,GAAG,SAARA,KAAQ,OAA+E;EAAA,IAA5EC,QAA4E,QAA5EA,QAA4E;EAAA,yBAAlEC,QAAkE;EAAA,IAAlEA,QAAkE,8BAAvD,IAAuD;EAAA,IAAjDC,KAAi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ApBH,CADF,CADF;AA0BD,CA7BD;;;AA+BAD,KAAK,CAACkB,SAAN,GAAkB;EAChBjB,QAAQ,EAAEkB,mBAAUC,IADJ;EAEhBlB,QAAQ,EAAEiB,mBAAUE,IAFJ;EAGhBlB,KAAK,EAAEgB,mBAAUG,MAHD;EAIhBlB,OAAO,EAAEe,mBAAUE,IAJH;EAKhBhB,MAAM,EAAEc,mBAAUI,IALF;EAMhBjB,OAAO,EAAEa,mBAAUI;AANH,CAAlB"}
@@ -1,11 +1,44 @@
1
1
  :root {
2
2
  --mirai-ui-modal-background: var(--mirai-ui-base);
3
- --mirai-ui-modal-overflow: rgba(0, 0, 0, 0.2);
3
+ --mirai-ui-modal-overflow: rgba(0, 0, 0, 0.1);
4
+ --mirai-ui-modal-header-padding: var(--mirai-ui-space-M);
4
5
  --mirai-ui-modal-icon: var(--mirai-ui-space-L);
5
6
  --mirai-ui-modal-layer: var(--mirai-ui-layer-L);
6
7
  }
7
8
 
8
- .icon {
9
+ .container {
10
+ height: 100vh;
11
+ justify-content: center;
12
+ left: 0;
13
+ pointer-events: none;
14
+ position: fixed;
15
+ top: 0;
16
+ width: 100vw;
17
+ z-index: var(--mirai-ui-modal-layer);
18
+ }
19
+
20
+ .header {
21
+ align-items: center;
22
+ border-bottom: solid 1px var(--mirai-ui-content-border);
23
+ padding: var(--mirai-ui-modal-header-padding);
24
+ width: 100%;
25
+ }
26
+
27
+ .header .title {
28
+ flex: 1;
29
+ padding: 0 var(--mirai-ui-modal-header-padding);
30
+ text-align: center;
31
+ }
32
+
33
+ .header .title.left {
34
+ margin-left: var(--mirai-ui-modal-icon);
35
+ }
36
+
37
+ .header .title.right {
38
+ margin-right: var(--mirai-ui-modal-icon);
39
+ }
40
+
41
+ .header .icon {
9
42
  font-size: var(--mirai-ui-modal-icon);
10
43
  line-height: var(--mirai-ui-modal-icon);
11
44
  height: var(--mirai-ui-modal-icon);
@@ -16,38 +49,39 @@
16
49
  background-color: var(--mirai-ui-modal-background);
17
50
  pointer-events: none;
18
51
  transition: opacity var(--mirai-ui-motion-expand) var(--mirai-ui-motion-easing),
19
- transform var(--mirai-ui-motion-expand) var(--mirai-ui-motion-easing);
52
+ transform var(--mirai-ui-motion-expand) var(--mirai-ui-motion-easing),
53
+ box-shadow var(--mirai-ui-motion-expand) var(--mirai-ui-motion-easing);
20
54
  }
21
55
 
22
56
  .modal.visible {
57
+ box-shadow: var(--mirai-ui-shadow);
23
58
  pointer-events: all;
24
59
  }
25
60
 
26
61
  .overflow {
27
62
  background-color: var(--mirai-ui-modal-overflow);
28
- height: 100vh;
29
- justify-content: center;
30
- left: 0;
31
63
  opacity: 0;
32
64
  pointer-events: none;
33
- position: fixed;
34
65
  transition: opacity var(--mirai-ui-motion-expand) var(--mirai-ui-motion-easing);
35
- top: 0;
36
- width: 100vw;
37
- z-index: var(--mirai-ui-modal-layer);
38
66
  }
39
67
 
40
- .overflow.visible {
68
+ .container.visible {
41
69
  opacity: 1;
42
70
  }
43
71
 
44
- .pressable {
45
- padding: var(--mirai-ui-space-XS);
46
- }
47
-
48
72
  @media only screen and (max-width: 600px) {
73
+ .container {
74
+ align-items: flex-end;
75
+ align-content: flex-end;
76
+ }
77
+
78
+ .header {
79
+ justify-content: center;
80
+ }
81
+
49
82
  .modal {
50
- transform: translateY(110%);
83
+ transform: translateY(100%);
84
+ width: 100%;
51
85
  }
52
86
 
53
87
  .modal.visible {
@@ -55,21 +89,23 @@
55
89
  }
56
90
 
57
91
  .overflow {
58
- align-items: flex-end;
59
- align-content: flex-end;
60
92
  transition-delay: calc(var(--mirai-ui-motion-expand) / 2);
61
93
  }
62
94
 
63
95
  .overflow.visible {
64
96
  transition-delay: 0s;
65
97
  }
66
-
67
- .pressable {
68
- align-self: center;
69
- }
70
98
  }
71
99
 
72
100
  @media only screen and (min-width: 600px) {
101
+ .container {
102
+ align-items: center;
103
+ }
104
+
105
+ .header {
106
+ justify-content: flex-end;
107
+ }
108
+
73
109
  .modal {
74
110
  opacity: 0;
75
111
  transform: scale(1.1);
@@ -80,10 +116,6 @@
80
116
  transform: scale(1);
81
117
  }
82
118
 
83
- .overflow {
84
- align-items: center;
85
- }
86
-
87
119
  .pressable {
88
120
  align-self: flex-end;
89
121
  }
@@ -3,34 +3,38 @@
3
3
  exports[`component:<Modal> Mobile environment prop:onClose 1`] = `
4
4
  <DocumentFragment>
5
5
  <div
6
- class="view row overflow visible"
6
+ class="view row container overflow visible"
7
7
  >
8
8
  <div
9
9
  class="view fit modal visible"
10
10
  >
11
- <button
12
- class="pressable pressable"
11
+ <div
12
+ class="view row header"
13
13
  >
14
- <span
15
- class="icon icon"
14
+ <button
15
+ class="pressable"
16
16
  >
17
- <svg
18
- fill="none"
19
- height="1em"
20
- stroke="currentColor"
21
- stroke-linecap="round"
22
- stroke-linejoin="round"
23
- stroke-width="2"
24
- viewBox="0 0 24 24"
25
- width="1em"
26
- xmlns="http://www.w3.org/2000/svg"
17
+ <span
18
+ class="icon icon"
27
19
  >
28
- <polyline
29
- points="6 9 12 15 18 9"
30
- />
31
- </svg>
32
- </span>
33
- </button>
20
+ <svg
21
+ fill="none"
22
+ height="1em"
23
+ stroke="currentColor"
24
+ stroke-linecap="round"
25
+ stroke-linejoin="round"
26
+ stroke-width="2"
27
+ viewBox="0 0 24 24"
28
+ width="1em"
29
+ xmlns="http://www.w3.org/2000/svg"
30
+ >
31
+ <polyline
32
+ points="6 9 12 15 18 9"
33
+ />
34
+ </svg>
35
+ </span>
36
+ </button>
37
+ </div>
34
38
  </div>
35
39
  </div>
36
40
  </DocumentFragment>
@@ -39,7 +43,7 @@ exports[`component:<Modal> Mobile environment prop:onClose 1`] = `
39
43
  exports[`component:<Modal> Mobile environment prop:visible 1`] = `
40
44
  <DocumentFragment>
41
45
  <div
42
- class="view row overflow visible"
46
+ class="view row container overflow visible"
43
47
  >
44
48
  <div
45
49
  class="view fit modal visible"
@@ -51,7 +55,7 @@ exports[`component:<Modal> Mobile environment prop:visible 1`] = `
51
55
  exports[`component:<Modal> inherit:className 1`] = `
52
56
  <DocumentFragment>
53
57
  <div
54
- class="view row overflow"
58
+ class="view row container overflow"
55
59
  >
56
60
  <div
57
61
  class="view fit modal mirai"
@@ -63,7 +67,7 @@ exports[`component:<Modal> inherit:className 1`] = `
63
67
  exports[`component:<Modal> prop:children 1`] = `
64
68
  <DocumentFragment>
65
69
  <div
66
- class="view row overflow"
70
+ class="view row container overflow"
67
71
  >
68
72
  <div
69
73
  class="view fit modal"
@@ -76,46 +80,130 @@ exports[`component:<Modal> prop:children 1`] = `
76
80
  </DocumentFragment>
77
81
  `;
78
82
 
83
+ exports[`component:<Modal> prop:onBack 1`] = `
84
+ <DocumentFragment>
85
+ <div
86
+ class="view row container overflow visible"
87
+ >
88
+ <div
89
+ class="view fit modal visible"
90
+ >
91
+ <div
92
+ class="view row header"
93
+ >
94
+ <button
95
+ class="pressable"
96
+ >
97
+ <span
98
+ class="icon icon"
99
+ >
100
+ <svg
101
+ fill="none"
102
+ height="1em"
103
+ stroke="currentColor"
104
+ stroke-linecap="round"
105
+ stroke-linejoin="round"
106
+ stroke-width="2"
107
+ viewBox="0 0 24 24"
108
+ width="1em"
109
+ xmlns="http://www.w3.org/2000/svg"
110
+ >
111
+ <line
112
+ x1="19"
113
+ x2="5"
114
+ y1="12"
115
+ y2="12"
116
+ />
117
+ <polyline
118
+ points="12 19 5 12 12 5"
119
+ />
120
+ </svg>
121
+ </span>
122
+ </button>
123
+ </div>
124
+ </div>
125
+ </div>
126
+ </DocumentFragment>
127
+ `;
128
+
79
129
  exports[`component:<Modal> prop:onClose 1`] = `
80
130
  <DocumentFragment>
81
131
  <div
82
- class="view row overflow visible"
132
+ class="view row container overflow visible"
83
133
  >
84
134
  <div
85
135
  class="view fit modal visible"
86
136
  >
87
- <button
88
- class="pressable pressable"
137
+ <div
138
+ class="view row header"
89
139
  >
90
- <span
91
- class="icon icon"
140
+ <button
141
+ class="pressable"
92
142
  >
93
- <svg
94
- fill="none"
95
- height="1em"
96
- stroke="currentColor"
97
- stroke-linecap="round"
98
- stroke-linejoin="round"
99
- stroke-width="2"
100
- viewBox="0 0 24 24"
101
- width="1em"
102
- xmlns="http://www.w3.org/2000/svg"
143
+ <span
144
+ class="icon icon"
103
145
  >
104
- <polyline
105
- points="6 9 12 15 18 9"
106
- />
107
- </svg>
146
+ <svg
147
+ fill="none"
148
+ height="1em"
149
+ stroke="currentColor"
150
+ stroke-linecap="round"
151
+ stroke-linejoin="round"
152
+ stroke-width="2"
153
+ viewBox="0 0 24 24"
154
+ width="1em"
155
+ xmlns="http://www.w3.org/2000/svg"
156
+ >
157
+ <polyline
158
+ points="6 9 12 15 18 9"
159
+ />
160
+ </svg>
161
+ </span>
162
+ </button>
163
+ </div>
164
+ </div>
165
+ </div>
166
+ </DocumentFragment>
167
+ `;
168
+
169
+ exports[`component:<Modal> prop:title 1`] = `
170
+ <DocumentFragment>
171
+ <div
172
+ class="view row container overflow"
173
+ >
174
+ <div
175
+ class="view fit modal"
176
+ >
177
+ <div
178
+ class="view row header"
179
+ >
180
+ <span
181
+ class="text headline title left right"
182
+ >
183
+ Modal
108
184
  </span>
109
- </button>
185
+ </div>
110
186
  </div>
111
187
  </div>
112
188
  </DocumentFragment>
113
189
  `;
114
190
 
191
+ exports[`component:<Modal> prop:visible & prop:overflow (false) 1`] = `
192
+ <DocumentFragment>
193
+ <div
194
+ class="view row container visible"
195
+ >
196
+ <div
197
+ class="view fit modal visible"
198
+ />
199
+ </div>
200
+ </DocumentFragment>
201
+ `;
202
+
115
203
  exports[`component:<Modal> prop:visible 1`] = `
116
204
  <DocumentFragment>
117
205
  <div
118
- class="view row overflow visible"
206
+ class="view row container overflow visible"
119
207
  >
120
208
  <div
121
209
  class="view fit modal visible"
@@ -127,7 +215,7 @@ exports[`component:<Modal> prop:visible 1`] = `
127
215
  exports[`component:<Modal> renders 1`] = `
128
216
  <DocumentFragment>
129
217
  <div
130
- class="view row overflow"
218
+ class="view row container overflow"
131
219
  >
132
220
  <div
133
221
  class="view fit modal"
@@ -139,7 +227,7 @@ exports[`component:<Modal> renders 1`] = `
139
227
  exports[`component:<Modal> testID 1`] = `
140
228
  <DocumentFragment>
141
229
  <div
142
- class="view row overflow"
230
+ class="view row container overflow"
143
231
  >
144
232
  <div
145
233
  class="view fit modal"
@@ -70,5 +70,5 @@
70
70
 
71
71
  /* defaults */
72
72
  --mirai-ui-border-radius: 4px;
73
- --mirai-ui-shadow: 0 1px var(--mirai-ui-space-XS) var(--mirai-ui-content-light);
73
+ --mirai-ui-shadow: 0 0 var(--mirai-ui-space-XS) var(--mirai-ui-content-border);
74
74
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mirai/ui",
3
- "version": "1.0.26",
3
+ "version": "1.0.27",
4
4
  "repository": "git@gitlab.com:miraicorp/dev/frontend/ui.git",
5
5
  "author": "JΛVI <hello@soyjavi.com>",
6
6
  "license": "MIT",