@kanso-labs/react-native-kanso-ui 0.9.0 → 0.10.0
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/README.md +4 -3
- package/dist/autocomplete/index.js +15 -1
- package/dist/autocomplete/index.js.map +1 -1
- package/dist/button/group.d.ts +5 -0
- package/dist/button/group.js +115 -0
- package/dist/button/group.js.map +1 -0
- package/dist/button/index.d.ts +4 -1
- package/dist/button/index.js +44 -22
- package/dist/button/index.js.map +1 -1
- package/dist/button/slots.js +2 -1
- package/dist/button/slots.js.map +1 -1
- package/dist/calendar/index.js +351 -182
- package/dist/calendar/index.js.map +1 -1
- package/dist/calendar/styles.js +33 -2
- package/dist/calendar/styles.js.map +1 -1
- package/dist/carousel/arrangement.d.ts +5 -0
- package/dist/carousel/arrangement.js +123 -0
- package/dist/carousel/arrangement.js.map +1 -0
- package/dist/chequer/index.js +95 -0
- package/dist/chequer/index.js.map +1 -0
- package/dist/collection/index.d.ts +157 -0
- package/dist/collection/index.js +1331 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/color-thumb/index.js +56 -0
- package/dist/color-thumb/index.js.map +1 -0
- package/dist/components/button/index.d.ts +4 -2
- package/dist/components/button/index.js +227 -188
- package/dist/components/button/index.js.map +1 -1
- package/dist/components/button-group/index.d.ts +87 -0
- package/dist/components/button-group/index.js +275 -0
- package/dist/components/button-group/index.js.map +1 -0
- package/dist/components/calendar/index.d.ts +11 -3
- package/dist/components/calendar/index.js +60 -45
- package/dist/components/calendar/index.js.map +1 -1
- package/dist/components/carousel/index.d.ts +72 -0
- package/dist/components/carousel/index.js +496 -0
- package/dist/components/carousel/index.js.map +1 -0
- package/dist/components/checkbox-group/index.d.ts +3 -4
- package/dist/components/checkbox-group/index.js +1 -1
- package/dist/components/checkbox-group/index.js.map +1 -1
- package/dist/components/color-area/index.d.ts +85 -0
- package/dist/components/color-area/index.js +630 -0
- package/dist/components/color-area/index.js.map +1 -0
- package/dist/components/color-field/index.d.ts +144 -0
- package/dist/components/color-field/index.js +516 -0
- package/dist/components/color-field/index.js.map +1 -0
- package/dist/components/color-picker/index.d.ts +74 -0
- package/dist/components/color-picker/index.js +317 -0
- package/dist/components/color-picker/index.js.map +1 -0
- package/dist/components/color-slider/index.d.ts +82 -0
- package/dist/components/color-slider/index.js +456 -0
- package/dist/components/color-slider/index.js.map +1 -0
- package/dist/components/color-swatch/index.d.ts +46 -0
- package/dist/components/color-swatch/index.js +127 -0
- package/dist/components/color-swatch/index.js.map +1 -0
- package/dist/components/color-swatch-picker/index.d.ts +81 -0
- package/dist/components/color-swatch-picker/index.js +287 -0
- package/dist/components/color-swatch-picker/index.js.map +1 -0
- package/dist/components/color-wheel/index.d.ts +71 -0
- package/dist/components/color-wheel/index.js +407 -0
- package/dist/components/color-wheel/index.js.map +1 -0
- package/dist/components/combo-box/index.d.ts +193 -0
- package/dist/components/combo-box/index.js +616 -0
- package/dist/components/combo-box/index.js.map +1 -0
- package/dist/components/date-field/index.d.ts +120 -0
- package/dist/components/date-field/index.js +111 -0
- package/dist/components/date-field/index.js.map +1 -0
- package/dist/components/date-picker/index.d.ts +130 -0
- package/dist/components/date-picker/index.js +310 -0
- package/dist/components/date-picker/index.js.map +1 -0
- package/dist/components/date-range-picker/index.d.ts +139 -0
- package/dist/components/date-range-picker/index.js +421 -0
- package/dist/components/date-range-picker/index.js.map +1 -0
- package/dist/components/disclosure/index.d.ts +94 -0
- package/dist/components/disclosure/index.js +365 -0
- package/dist/components/disclosure/index.js.map +1 -0
- package/dist/components/disclosure-group/index.d.ts +61 -0
- package/dist/components/disclosure-group/index.js +100 -0
- package/dist/components/disclosure-group/index.js.map +1 -0
- package/dist/components/drop-zone/index.d.ts +113 -0
- package/dist/components/drop-zone/index.js +304 -0
- package/dist/components/drop-zone/index.js.map +1 -0
- package/dist/components/fab/index.d.ts +1 -1
- package/dist/components/fab/index.js +91 -76
- package/dist/components/fab/index.js.map +1 -1
- package/dist/components/form/index.d.ts +3 -2
- package/dist/components/form/index.js.map +1 -1
- package/dist/components/icon-button/index.d.ts +4 -2
- package/dist/components/icon-button/index.js +204 -171
- package/dist/components/icon-button/index.js.map +1 -1
- package/dist/components/list/index.d.ts +15 -158
- package/dist/components/list/index.js +21 -1047
- package/dist/components/list/index.js.map +1 -1
- package/dist/components/list-box/index.d.ts +73 -0
- package/dist/components/list-box/index.js +82 -0
- package/dist/components/list-box/index.js.map +1 -0
- package/dist/components/loading-indicator/index.d.ts +32 -0
- package/dist/components/loading-indicator/index.js +174 -0
- package/dist/components/loading-indicator/index.js.map +1 -0
- package/dist/components/navigation-tree/index.d.ts +117 -0
- package/dist/components/navigation-tree/index.js +135 -0
- package/dist/components/navigation-tree/index.js.map +1 -0
- package/dist/components/number-field/index.js +132 -143
- package/dist/components/number-field/index.js.map +1 -1
- package/dist/components/range-calendar/index.d.ts +69 -0
- package/dist/components/range-calendar/index.js +144 -0
- package/dist/components/range-calendar/index.js.map +1 -0
- package/dist/components/search-view/index.d.ts +78 -0
- package/dist/components/search-view/index.js +570 -0
- package/dist/components/search-view/index.js.map +1 -0
- package/dist/components/select/index.d.ts +152 -0
- package/dist/components/select/index.js +419 -0
- package/dist/components/select/index.js.map +1 -0
- package/dist/components/slider/index.d.ts +111 -0
- package/dist/components/slider/index.js +673 -0
- package/dist/components/slider/index.js.map +1 -0
- package/dist/components/split-button/index.d.ts +77 -0
- package/dist/components/split-button/index.js +354 -0
- package/dist/components/split-button/index.js.map +1 -0
- package/dist/components/tabs/index.d.ts +196 -0
- package/dist/components/tabs/index.js +1137 -0
- package/dist/components/tabs/index.js.map +1 -0
- package/dist/components/time-field/index.d.ts +43 -0
- package/dist/components/time-field/index.js +107 -0
- package/dist/components/time-field/index.js.map +1 -0
- package/dist/components/time-picker/index.d.ts +65 -0
- package/dist/components/time-picker/index.js +1168 -0
- package/dist/components/time-picker/index.js.map +1 -0
- package/dist/components/tooltip/index.d.ts +101 -0
- package/dist/components/tooltip/index.js +223 -0
- package/dist/components/tooltip/index.js.map +1 -0
- package/dist/components/tree/index.d.ts +112 -0
- package/dist/components/tree/index.js +157 -0
- package/dist/components/tree/index.js.map +1 -0
- package/dist/disclosure/chevron.js +75 -0
- package/dist/disclosure/chevron.js.map +1 -0
- package/dist/disclosure/index.js +7 -0
- package/dist/disclosure/index.js.map +1 -0
- package/dist/drop/index.d.ts +54 -0
- package/dist/drop/index.js +161 -0
- package/dist/drop/index.js.map +1 -0
- package/dist/field/chevron.js +74 -0
- package/dist/field/chevron.js.map +1 -0
- package/dist/field/index.d.ts +2 -1
- package/dist/field/index.js +310 -154
- package/dist/field/index.js.map +1 -1
- package/dist/field/styles.js +9 -0
- package/dist/field/styles.js.map +1 -1
- package/dist/files/index.d.ts +18 -0
- package/dist/files/index.js +107 -0
- package/dist/files/index.js.map +1 -0
- package/dist/form/index.d.ts +5 -2
- package/dist/form/index.js +64 -85
- package/dist/form/index.js.map +1 -1
- package/dist/glyphs/index.js +92 -1
- package/dist/glyphs/index.js.map +1 -1
- package/dist/i18n/index.js +20 -1
- package/dist/i18n/index.js.map +1 -1
- package/dist/i18n/messages.js +1394 -34
- package/dist/i18n/messages.js.map +1 -1
- package/dist/index.d.ts +35 -3
- package/dist/index.js +34 -3
- package/dist/indicator/paths.js +23 -1
- package/dist/indicator/paths.js.map +1 -1
- package/dist/modal/index.js +92 -77
- package/dist/modal/index.js.map +1 -1
- package/dist/number/keyboard.js +16 -0
- package/dist/number/keyboard.js.map +1 -0
- package/dist/overlay/anchored.js +68 -38
- package/dist/overlay/anchored.js.map +1 -1
- package/dist/overlay/keyboard.js +57 -0
- package/dist/overlay/keyboard.js.map +1 -0
- package/dist/overlay/panel.js +173 -19
- package/dist/overlay/panel.js.map +1 -1
- package/dist/overlay/placement.js +13 -1
- package/dist/overlay/placement.js.map +1 -1
- package/dist/picker/index.js +322 -0
- package/dist/picker/index.js.map +1 -0
- package/dist/press/index.d.ts +2 -0
- package/dist/press/index.js +102 -100
- package/dist/press/index.js.map +1 -1
- package/dist/row/index.js +77 -69
- package/dist/row/index.js.map +1 -1
- package/dist/row/styles.js +13 -2
- package/dist/row/styles.js.map +1 -1
- package/dist/segments/field.js +277 -0
- package/dist/segments/field.js.map +1 -0
- package/dist/segments/index.js +574 -0
- package/dist/segments/index.js.map +1 -0
- package/dist/segments/styles.js +24 -0
- package/dist/segments/styles.js.map +1 -0
- package/dist/slider/index.js +145 -0
- package/dist/slider/index.js.map +1 -0
- package/dist/swatch/index.js +56 -0
- package/dist/swatch/index.js.map +1 -0
- package/package.json +11 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["CalendarDate","ComponentRef","ReactNode","RefObject","HostInstance","ListRenderItemInfo","TextStyle","ViewStyle","CalendarState","DateFormatter","endOfMonth","isSameDay","isSameYear","isToday","startOfMonth","startOfWeek","toCalendarDate","today","useLayoutEffect","useRef","useState","FlatList","I18nManager","Text","NativeText","Pressable","View","Animated","Easing","useAnimatedStyle","useReducedMotion","useSharedValue","withTiming","ResolvedTheme","IconButton","ArrowDropDownGlyph","CheckGlyph","ChevronEndGlyph","messagesFor","useFocusOnPlaced","useReturnFocus","hitSlop","usePressFeedback","withOpacity","useTheme","composeStyles","useTypeRole","SLIDE_DISTANCE","styles","stylesOf","WEEKS_HELD","ListEntry","date","formatted","id","OpenList","PartProps","locale","state","Weekday","LISTED_YEARS","ROWS_ABOVE_SHOWN","CalendarFrame","t0","$","_c","firstDayOfWeek","showMonthYearMenus","t1","grid","t2","t3","CalendarHeader","own","role","T0","header","T1","t4","t5","heading","t6","visibleMonthOf","t7","t8","t9","CalendarMenus","children","words","calendar","open","setOpen","monthButton","yearButton","shownMonth","focusedDate","month","headerGroup","chevronRoom","isDisabled","monthsOf","t10","t11","Symbol","for","toggleThen","t12","t13","t14","t15","t16","t17","yearOf","t18","year","t19","t20","t21","t22","t23","t24","t25","Chevron","direction","previous","isPreviousVisibleRangeInvalid","isNextVisibleRangeInvalid","outside","pageThen","previousGlyphStyle","undefined","chevron","chooseThen","shown","entry","setFocusedDate","DateCell","theme","colors","sizing","isCellDisabled","isCellUnavailable","isUnavailable","selectable","isSelected","isCurrent","timeZone","feedback","color","onPrimary","onSurface","corners","disabled","dateLabelOf","controlSm","selectThen","handlers","dateToday","dateSelected","ring","layer","dateText","dateTextToday","dateTextSelected","dateTextUnavailable","dateTextDisabled","dayOf","full","day","era","eraOf","weekday","format","toDate","said","todayDateSelected","todayDate","replace","minValue","minimumDate","maxValue","maximumDate","identifier","formatToParts","find","part","type","value","String","const","layoutOf","height","_data","ArrayLike","index","length","offset","listKeyOf","MenuButton","buttonRef","expanded","label","name","onPress","stateLayerOpacity","onSurfaceVariant","menuButton","menuButtonText","disabledContent","arrowExpanded","MenuList","entries","onChoose","checked","setChecked","controlMd","Math","max","min","rowOf","list","MonthGrid","start","visibleRange","slide","useMonthSlide","rowStyle","row","rowHeight","weekdaysOf","map","key","column","weeksOf","week","days","MonthList","months","outsideBounds","formatter","Array","from","getMonthsInYear","_unused","set","getFormattableMonth","ReadonlySet","Set","filter","compare","focusNextPage","focusPreviousPage","isRTL","previousGlyphRightToLeft","previousGlyph","Row","isChecked","rowPressThen","listRow","listRowSelected","listText","listTextDisabled","listCheck","item","has","selectDate","update","motion","reduceMotion","opacity","travel","current","timing","duration","durationMedium2","easing","bezier","easingEmphasizedDecelerate","side","get","transform","translateX","first","add","toString","getWeeksInMonth","weeks","getDatesInWeek","YearList","yearsOf","NONE","subtract","years","floor","last","ceil","push","_c","NativeText"],"sources":["../../src/calendar/index.tsx"],"sourcesContent":["import type { CalendarDate } from '@internationalized/date'\nimport type { ComponentRef, ReactNode, RefObject } from 'react'\nimport type {\n HostInstance,\n ListRenderItemInfo,\n TextStyle,\n ViewStyle,\n} from 'react-native'\nimport type { CalendarState } from 'react-stately/useCalendarState'\n\nimport {\n DateFormatter,\n endOfMonth,\n isSameDay,\n isSameYear,\n isToday,\n startOfMonth,\n startOfWeek,\n toCalendarDate,\n today,\n} from '@internationalized/date'\nimport { useLayoutEffect, useRef, useState } from 'react'\nimport {\n FlatList,\n I18nManager,\n Text as NativeText,\n Pressable,\n View,\n} from 'react-native'\nimport Animated, {\n Easing,\n useAnimatedStyle,\n useReducedMotion,\n useSharedValue,\n withTiming,\n} from 'react-native-reanimated'\n\nimport type { ResolvedTheme } from '../theme/scope'\n\nimport { IconButton } from '../components/icon-button'\nimport { ArrowDropDownGlyph, CheckGlyph, ChevronEndGlyph } from '../glyphs'\nimport { messagesFor } from '../i18n'\nimport { useFocusOnPlaced, useReturnFocus } from '../overlay/panel'\nimport { hitSlop, usePressFeedback } from '../press'\nimport { withOpacity } from '../theme/color'\nimport { useTheme } from '../theme/scope'\nimport { composeStyles } from '../theme/styles'\nimport { useTypeRole } from '../typography/roles'\nimport { SLIDE_DISTANCE, styles, stylesOf, WEEKS_HELD } from './styles'\n\n// The parts a calendar draws inside its container: the row that moves the\n// month, the weekday row, the weeks, and the month and year lists that take\n// the grid's place. Apart from src/components/calendar so a calendar is the\n// one thing that directory holds, as kanso-ui keeps its own in src/calendar.\n\n/** One entry of a month or year list. */\ntype ListEntry = {\n readonly date: CalendarDate\n readonly formatted: string\n readonly id: number\n}\n\ntype OpenList = 'month' | 'year'\n\ntype PartProps = {\n readonly locale: string\n readonly state: CalendarState\n}\n\n/** The day a locale's week starts on, where the call site names one. */\ntype Weekday = 'fri' | 'mon' | 'sat' | 'sun' | 'thu' | 'tue' | 'wed'\n\n// How many years the open year list holds: a century either side of the year\n// shown, and that year, as kanso-ui's does. The bounds cut it short where they\n// fall inside.\nconst LISTED_YEARS = 201\n\n// An open list holds the weekday row and six weeks of room, seven rows, and\n// opens with the entry shown in the middle one, three rows from the top.\nconst ROWS_ABOVE_SHOWN = WEEKS_HELD / 2\n\n/**\n * What a calendar draws inside its container. With `showMonthYearMenus` the\n * header is the date pickers page's docked one, the month and the year as\n * menu buttons, and while either is open its list takes the grid's place.\n */\nfunction CalendarFrame({\n firstDayOfWeek,\n locale,\n showMonthYearMenus,\n state,\n}: PartProps & {\n readonly firstDayOfWeek: undefined | Weekday\n readonly showMonthYearMenus: boolean\n}) {\n const grid = (\n <MonthGrid firstDayOfWeek={firstDayOfWeek} locale={locale} state={state} />\n )\n\n if (showMonthYearMenus) {\n return (\n <CalendarMenus locale={locale} state={state}>\n {grid}\n </CalendarMenus>\n )\n }\n\n return (\n <>\n <CalendarHeader locale={locale} state={state} />\n {grid}\n </>\n )\n}\n\n/** The two chevrons with the month and year between them. */\nfunction CalendarHeader({ locale, state }: PartProps) {\n const own = stylesOf(useTheme())\n const role = useTypeRole('labelLarge')\n\n return (\n <View style={own.header}>\n <Chevron direction=\"previous\" locale={locale} state={state} />\n <NativeText\n aria-live=\"polite\"\n role=\"heading\"\n style={composeStyles<TextStyle>(role, own.heading)}\n >\n {visibleMonthOf(state, locale)}\n </NativeText>\n <Chevron direction=\"next\" locale={locale} state={state} />\n </View>\n )\n}\n\n/**\n * The docked header: the month's menu button between the chevrons that step\n * it, and the year's after them. A press opens the button's list in the\n * grid's place, where the page draws it, rather than in a menu over it; a\n * calendar inside a picker is already in one. While a list is open the\n * chevrons give way to the room they took and the other button is disabled,\n * and choosing an entry, or pressing the one already checked, closes the\n * list and sends the screen reader back to its button.\n *\n * The month list names the months in full where the button names the month\n * short, as the page does. The year list runs a century either side of the\n * year shown, and `minValue` and `maxValue` cut it short; a month with no day\n * inside them is disabled.\n */\nfunction CalendarMenus({\n children,\n locale,\n state,\n}: PartProps & { readonly children: ReactNode }) {\n const own = stylesOf(useTheme())\n const words = messagesFor(locale).calendar\n const [open, setOpen] = useState<null | OpenList>(null)\n const monthButton = useRef<ComponentRef<typeof View>>(null)\n const yearButton = useRef<ComponentRef<typeof View>>(null)\n const shownMonth = state.focusedDate.month - 1\n\n useReturnFocus(open === 'month', false, monthButton)\n useReturnFocus(open === 'year', false, yearButton)\n\n return (\n <>\n <View style={own.header}>\n <View style={own.headerGroup}>\n {open === null ? (\n <Chevron direction=\"previous\" locale={locale} state={state} />\n ) : (\n <View style={own.chevronRoom} />\n )}\n <MenuButton\n buttonRef={monthButton}\n expanded={open === 'month'}\n isDisabled={state.isDisabled || open === 'year'}\n label={monthsOf(state, locale, 'short')[shownMonth]?.formatted}\n name={words.month}\n onPress={toggleThen(setOpen, 'month')}\n />\n {open === null ? (\n <Chevron direction=\"next\" locale={locale} state={state} />\n ) : (\n <View style={own.chevronRoom} />\n )}\n </View>\n <MenuButton\n buttonRef={yearButton}\n expanded={open === 'year'}\n isDisabled={state.isDisabled || open === 'month'}\n label={yearOf(state, locale)}\n name={words.year}\n onPress={toggleThen(setOpen, 'year')}\n />\n </View>\n {open === null ? children : null}\n {open === 'month' ? (\n <MonthList locale={locale} setOpen={setOpen} state={state} />\n ) : null}\n {open === 'year' ? (\n <YearList locale={locale} setOpen={setOpen} state={state} />\n ) : null}\n </>\n )\n}\n\n/**\n * A chevron that moves the month, the icon buttons page's standard 40dp\n * button. Disabled where the month it would move to is outside `minValue`\n * and `maxValue`, or the whole calendar is disabled.\n */\nfunction Chevron({\n direction,\n locale,\n state,\n}: PartProps & { readonly direction: 'next' | 'previous' }) {\n const own = stylesOf(useTheme())\n const previous = direction === 'previous'\n const outside = previous\n ? state.isPreviousVisibleRangeInvalid()\n : state.isNextVisibleRangeInvalid()\n\n return (\n <IconButton\n aria-label={messagesFor(locale).calendar[direction]}\n isDisabled={state.isDisabled || outside}\n onPress={pageThen(state, direction)}\n style={own.chevron}\n >\n <ChevronEndGlyph style={previous ? previousGlyphStyle() : undefined} />\n </IconButton>\n )\n}\n\n// Chooses an entry of the open list and closes it. The entry already shown\n// closes it without moving anything.\nfunction chooseThen(\n state: CalendarState,\n setOpen: (open: null | OpenList) => void,\n shown: number,\n) {\n return (entry: ListEntry) => {\n if (entry.id !== shown) {\n state.setFocusedDate(entry.date)\n }\n setOpen(null)\n }\n}\n\n/**\n * One date: the page's 40dp circle in its 48dp square, which `hitSlop` makes\n * the press target. Its name is the date in full, with today, the selection\n * and the first or last date the bounds allow said as web says them, and it\n * reports itself disabled where it cannot be picked.\n */\nfunction DateCell({ date, locale, state }: PartProps & { date: CalendarDate }) {\n const theme = useTheme()\n const { colors, sizing } = theme\n const own = stylesOf(theme)\n const role = useTypeRole('bodyLarge')\n const isDisabled = state.isCellDisabled(date)\n const isUnavailable = state.isCellUnavailable(date)\n const selectable = !isDisabled && !isUnavailable\n const isSelected = selectable && state.isSelected(date)\n const isCurrent = isToday(date, state.timeZone)\n const feedback = usePressFeedback({\n color: isSelected ? colors.onPrimary : colors.onSurface,\n corners: own.date,\n disabled: !selectable,\n })\n\n return (\n <Pressable\n aria-label={dateLabelOf(date, state, locale, isCurrent, isSelected)}\n hitSlop={hitSlop(sizing.controlSm, sizing.controlSm)}\n onPress={selectThen(state, date)}\n role=\"button\"\n {...feedback.handlers}\n disabled={!selectable}\n style={composeStyles<ViewStyle>(\n own.date,\n isCurrent ? own.dateToday : undefined,\n isSelected ? own.dateSelected : undefined,\n feedback.ring,\n )}\n >\n {feedback.layer}\n <NativeText\n style={composeStyles<TextStyle>(\n role,\n own.dateText,\n isCurrent ? own.dateTextToday : undefined,\n isSelected ? own.dateTextSelected : undefined,\n isUnavailable ? own.dateTextUnavailable : undefined,\n isDisabled ? own.dateTextDisabled : undefined,\n )}\n >\n {dayOf(date, state, locale)}\n </NativeText>\n </Pressable>\n )\n}\n\n// A date's name: the date in full, as today or as the one held where it is\n// either, then as the first or last date the bounds allow where it is that.\n// React Aria's own wording, from its calendar dictionary.\nfunction dateLabelOf(\n date: CalendarDate,\n state: CalendarState,\n locale: string,\n isCurrent: boolean,\n isSelected: boolean,\n) {\n const words = messagesFor(locale).calendar\n const full = new DateFormatter(locale, {\n day: 'numeric',\n era: eraOf(date),\n month: 'long',\n timeZone: state.timeZone,\n weekday: 'long',\n year: 'numeric',\n }).format(date.toDate(state.timeZone))\n const said = isCurrent\n ? (isSelected ? words.todayDateSelected : words.todayDate).replace(\n '{date}',\n full,\n )\n : isSelected\n ? words.dateSelected.replace('{date}', full)\n : full\n\n if (state.minValue != null && isSameDay(date, state.minValue)) {\n return `${said}, ${words.minimumDate}`\n }\n\n if (state.maxValue != null && isSameDay(date, state.maxValue)) {\n return `${said}, ${words.maximumDate}`\n }\n\n return said\n}\n\n// The date's number in the grid, in the locale's digits: the day alone out of\n// a formatted date, as React Aria takes it, so a locale that writes a unit\n// after the day, as Japanese does, draws the number alone.\nfunction dayOf(date: CalendarDate, state: CalendarState, locale: string) {\n return (\n new DateFormatter(locale, {\n calendar: date.calendar.identifier,\n day: 'numeric',\n timeZone: state.timeZone,\n })\n .formatToParts(date.toDate(state.timeZone))\n .find((part) => part.type === 'day')?.value ?? String(date.day)\n )\n}\n\n// The era is written only where a Gregorian date falls before the common era,\n// as React Aria writes it.\nfunction eraOf(date: CalendarDate) {\n return date.calendar.identifier === 'gregory' && date.era === 'BC'\n ? ('short' as const)\n : undefined\n}\n\n// The row a list's row occupies, which is every row's 48dp, so the list can\n// open scrolled to the entry shown without laying out the rows before it.\nfunction layoutOf(height: number) {\n return (_data: ArrayLike<ListEntry> | null | undefined, index: number) => ({\n index,\n length: height,\n offset: height * index,\n })\n}\n\nfunction listKeyOf(entry: ListEntry) {\n return String(entry.id)\n}\n\n/**\n * The month or the year as the page's menu button, opening its list. Named\n * by what it shows and then by what it is, \"Sep month\", which keeps the\n * visible text the start of the name.\n */\nfunction MenuButton({\n buttonRef,\n expanded,\n isDisabled,\n label,\n name,\n onPress,\n}: {\n readonly buttonRef: RefObject<ComponentRef<typeof View> | null>\n readonly expanded: boolean\n readonly isDisabled: boolean\n readonly label: string | undefined\n readonly name: string\n readonly onPress: () => void\n}) {\n const theme = useTheme()\n const { colors, sizing, stateLayerOpacity } = theme\n const own = stylesOf(theme)\n const role = useTypeRole('labelLarge')\n const feedback = usePressFeedback({\n color: colors.onSurfaceVariant,\n corners: own.menuButton,\n disabled: isDisabled,\n })\n\n return (\n <Pressable\n aria-expanded={expanded}\n aria-label={`${label ?? ''} ${name}`}\n hitSlop={hitSlop(sizing.controlSm)}\n onPress={onPress}\n ref={buttonRef}\n role=\"button\"\n {...feedback.handlers}\n disabled={isDisabled}\n style={composeStyles<ViewStyle>(own.menuButton, feedback.ring)}\n >\n {feedback.layer}\n <NativeText\n style={composeStyles<TextStyle>(\n role,\n own.menuButtonText,\n isDisabled ? own.dateTextDisabled : undefined,\n )}\n >\n {label}\n </NativeText>\n <ArrowDropDownGlyph\n color={\n isDisabled\n ? withOpacity(colors.onSurface, stateLayerOpacity.disabledContent)\n : colors.onSurfaceVariant\n }\n size={18}\n style={expanded ? own.arrowExpanded : undefined}\n />\n </Pressable>\n )\n}\n\n/**\n * An open month or year list, in the grid's place: a list of radio rows, the\n * entry shown checked, opening scrolled so that entry sits in the middle with\n * the entries either side of it in view. The screen reader is sent to it as\n * it opens.\n */\nfunction MenuList({\n disabled,\n entries,\n name,\n onChoose,\n shown,\n}: {\n readonly disabled: ReadonlySet<number>\n readonly entries: readonly ListEntry[]\n readonly name: string\n readonly onChoose: (entry: ListEntry) => void\n readonly shown: number\n}) {\n const theme = useTheme()\n const own = stylesOf(theme)\n const [checked, setChecked] = useState<HostInstance | null>(null)\n\n useFocusOnPlaced(true, checked)\n\n return (\n <FlatList\n aria-label={name}\n data={entries}\n getItemLayout={layoutOf(theme.sizing.controlMd)}\n initialScrollIndex={Math.max(\n 0,\n Math.min(shown - ROWS_ABOVE_SHOWN, entries.length - (WEEKS_HELD + 1)),\n )}\n keyExtractor={listKeyOf}\n renderItem={rowOf({ disabled, onChoose, setChecked, shown })}\n role=\"radiogroup\"\n style={own.list}\n />\n )\n}\n\n/**\n * The weekday row and the month's weeks, held at six weeks of room so the\n * calendar keeps its height from month to month. The weeks slide in from the\n * side the new month comes from.\n */\nfunction MonthGrid({\n firstDayOfWeek,\n locale,\n state,\n}: PartProps & { readonly firstDayOfWeek: undefined | Weekday }) {\n const theme = useTheme()\n const own = stylesOf(theme)\n const role = useTypeRole('bodyLarge')\n const start = state.visibleRange.start\n const slide = useMonthSlide(start, theme)\n const rowStyle = composeStyles<ViewStyle>(styles.row, own.rowHeight)\n\n return (\n <View style={own.grid}>\n <View aria-hidden style={rowStyle}>\n {weekdaysOf(state, locale, firstDayOfWeek).map((weekday) => (\n <View key={weekday.key} style={styles.column}>\n <NativeText style={composeStyles<TextStyle>(role, own.weekday)}>\n {weekday.label}\n </NativeText>\n </View>\n ))}\n </View>\n <Animated.View style={slide}>\n {weeksOf(state).map((week) => (\n <View key={week.key} style={rowStyle}>\n {week.days.map((day) => (\n <View key={day.key} style={styles.column}>\n {day.date === null ? null : (\n <DateCell date={day.date} locale={locale} state={state} />\n )}\n </View>\n ))}\n </View>\n ))}\n </Animated.View>\n </View>\n )\n}\n\n/** The open month list: the months of the year shown, named in full. */\nfunction MonthList({\n locale,\n setOpen,\n state,\n}: PartProps & { readonly setOpen: (open: null | OpenList) => void }) {\n const months = monthsOf(state, locale, 'long')\n const shown = state.focusedDate.month - 1\n\n return (\n <MenuList\n disabled={outsideBounds(state, months)}\n entries={months}\n name={messagesFor(locale).calendar.month}\n onChoose={chooseThen(state, setOpen, shown)}\n shown={shown}\n />\n )\n}\n\n// The months of the year shown, named short for the header's button or in\n// full for the open list. Some calendar systems, such as the Hebrew, have\n// more months in some years than in others.\nfunction monthsOf(\n state: CalendarState,\n locale: string,\n format: 'long' | 'short',\n): readonly ListEntry[] {\n const { focusedDate, timeZone } = state\n const formatter = new DateFormatter(locale, {\n calendar: focusedDate.calendar.identifier,\n month: format,\n timeZone,\n })\n\n return Array.from(\n { length: focusedDate.calendar.getMonthsInYear(focusedDate) },\n (_unused, index) => {\n const date = focusedDate.set({ month: index + 1 })\n const shown = date.calendar.getFormattableMonth?.(date) ?? date\n\n return {\n date,\n formatted: formatter.format(shown.toDate(timeZone)),\n id: index,\n }\n },\n )\n}\n\n// The months the bounds leave no day of.\nfunction outsideBounds(\n state: CalendarState,\n months: readonly ListEntry[],\n): ReadonlySet<number> {\n const { maxValue, minValue } = state\n\n return new Set(\n months\n .filter(\n ({ date }) =>\n (maxValue != null && startOfMonth(date).compare(maxValue) > 0) ||\n (minValue != null && endOfMonth(date).compare(minValue) < 0),\n )\n .map(({ id }) => id),\n )\n}\n\nfunction pageThen(state: CalendarState, direction: 'next' | 'previous') {\n return () => {\n if (direction === 'next') {\n state.focusNextPage()\n } else {\n state.focusPreviousPage()\n }\n }\n}\n\nfunction previousGlyphStyle() {\n return I18nManager.isRTL\n ? styles.previousGlyphRightToLeft\n : styles.previousGlyph\n}\n\n/**\n * One row of an open list: the check where the row is the entry shown, the\n * room it takes where it is not, then the month or the year, in body large.\n */\nfunction Row({\n entry,\n isChecked,\n isDisabled,\n onChoose,\n setChecked,\n}: {\n readonly entry: ListEntry\n readonly isChecked: boolean\n readonly isDisabled: boolean\n readonly onChoose: (entry: ListEntry) => void\n readonly setChecked: (row: HostInstance | null) => void\n}) {\n const theme = useTheme()\n const own = stylesOf(theme)\n const role = useTypeRole('bodyLarge')\n const feedback = usePressFeedback({\n color: theme.colors.onSurface,\n disabled: isDisabled,\n })\n\n return (\n <Pressable\n aria-checked={isChecked}\n onPress={rowPressThen(onChoose, entry)}\n ref={isChecked ? setChecked : undefined}\n role=\"radio\"\n {...feedback.handlers}\n disabled={isDisabled}\n style={composeStyles<ViewStyle>(\n own.listRow,\n isChecked ? own.listRowSelected : undefined,\n feedback.ring,\n )}\n >\n {feedback.layer}\n <View style={own.listCheck}>\n {isChecked ? <CheckGlyph color={theme.colors.onSurface} /> : null}\n </View>\n <NativeText\n style={composeStyles<TextStyle>(\n role,\n own.listText,\n isDisabled ? own.listTextDisabled : undefined,\n )}\n >\n {entry.formatted}\n </NativeText>\n </Pressable>\n )\n}\n\nfunction rowOf({\n disabled,\n onChoose,\n setChecked,\n shown,\n}: {\n readonly disabled: ReadonlySet<number>\n readonly onChoose: (entry: ListEntry) => void\n readonly setChecked: (row: HostInstance | null) => void\n readonly shown: number\n}) {\n return ({ item }: ListRenderItemInfo<ListEntry>) => (\n <Row\n entry={item}\n isChecked={item.id === shown}\n isDisabled={disabled.has(item.id)}\n onChoose={onChoose}\n setChecked={setChecked}\n />\n )\n}\n\nfunction rowPressThen(onChoose: (entry: ListEntry) => void, entry: ListEntry) {\n return () => {\n onChoose(entry)\n }\n}\n\n// Picks a date and moves the calendar's focus to it, as a press on one does\n// on web. A read-only or disabled calendar's state ignores the pick.\nfunction selectThen(state: CalendarState, date: CalendarDate) {\n return () => {\n state.selectDate(date)\n state.setFocusedDate(date)\n }\n}\n\nfunction toggleThen(\n setOpen: (update: (open: null | OpenList) => null | OpenList) => void,\n list: OpenList,\n) {\n return () => {\n setOpen((open) => (open === list ? null : list))\n }\n}\n\n/**\n * Slides the weeks in from the side the new month comes from as the month\n * moves, 30dp over the medium duration on the emphasised decelerating curve,\n * fading in as they come: Material Design's shared axis transition for an\n * incoming page. The side follows the writing direction, so a later month\n * arrives from the end. Under reduced motion the month changes at once.\n */\nfunction useMonthSlide(start: CalendarDate, { motion }: ResolvedTheme) {\n const reduceMotion = useReducedMotion()\n const offset = useSharedValue(0)\n const opacity = useSharedValue(1)\n const shown = useRef(start)\n\n useLayoutEffect(() => {\n const travel = start.compare(shown.current)\n\n shown.current = start\n if (travel === 0 || reduceMotion) {\n return\n }\n\n const timing = {\n duration: motion.durationMedium2,\n easing: Easing.bezier(...motion.easingEmphasizedDecelerate),\n }\n const side = (travel > 0 ? 1 : -1) * (I18nManager.isRTL ? -1 : 1)\n\n offset.set(side * SLIDE_DISTANCE)\n offset.set(withTiming(0, timing))\n opacity.set(0)\n opacity.set(withTiming(1, timing))\n }, [motion, offset, opacity, reduceMotion, start])\n\n return useAnimatedStyle(() => {\n 'worklet'\n return {\n opacity: opacity.get(),\n transform: [{ translateX: offset.get() }],\n }\n })\n}\n\n// The month and year the grid shows, which the plain header draws between\n// its chevrons.\nfunction visibleMonthOf(state: CalendarState, locale: string) {\n const { start } = state.visibleRange\n\n return new DateFormatter(locale, {\n calendar: start.calendar.identifier,\n era: eraOf(start),\n month: 'long',\n timeZone: state.timeZone,\n year: 'numeric',\n }).format(start.toDate(state.timeZone))\n}\n\n// The weekday row, in the locale's narrow names from the day its week starts\n// on, or the day `firstDayOfWeek` names.\nfunction weekdaysOf(\n state: CalendarState,\n locale: string,\n firstDayOfWeek: undefined | Weekday,\n) {\n const first = startOfWeek(today(state.timeZone), locale, firstDayOfWeek)\n const formatter = new DateFormatter(locale, {\n timeZone: state.timeZone,\n weekday: 'narrow',\n })\n\n return Array.from({ length: 7 }, (_unused, index) => {\n const date = first.add({ days: index })\n\n return {\n key: date.toString(),\n label: formatter.format(date.toDate(state.timeZone)),\n }\n })\n}\n\n// The weeks of the month shown, each seven days from the locale's first day\n// of the week. A day a calendar system lacks is a gap.\nfunction weeksOf(state: CalendarState) {\n const { start } = state.visibleRange\n\n return Array.from({ length: state.getWeeksInMonth() }, (_unused, week) => {\n const key = start.add({ weeks: week }).toString()\n\n return {\n days: state.getDatesInWeek(week).map((date, day) => ({\n date,\n key: date?.toString() ?? `${key}+${String(day)}`,\n })),\n key,\n }\n })\n}\n\n/** The open year list: the years either side of the one shown. */\nfunction YearList({\n locale,\n setOpen,\n state,\n}: PartProps & { readonly setOpen: (open: null | OpenList) => void }) {\n const { entries, shown } = yearsOf(state, locale)\n\n return (\n <MenuList\n disabled={NONE}\n entries={entries}\n name={messagesFor(locale).calendar.year}\n onChoose={chooseThen(state, setOpen, shown)}\n shown={shown}\n />\n )\n}\n\n// The year shown, which the header's year button names.\nfunction yearOf(state: CalendarState, locale: string) {\n const { focusedDate, timeZone } = state\n\n return new DateFormatter(locale, {\n calendar: focusedDate.calendar.identifier,\n era: eraOf(focusedDate),\n timeZone,\n year: 'numeric',\n }).format(focusedDate.toDate(timeZone))\n}\n\n// The years the open list holds, as React Aria's year picker lists them: as\n// many either side of the year shown as `LISTED_YEARS` allows, shifted to\n// stay inside `minValue` and `maxValue` and cut short where those are nearer.\n// An entry's id is its place in the list, since in some calendars, such as\n// the Japanese, the era changes as well as the year.\nfunction yearsOf(state: CalendarState, locale: string) {\n const { focusedDate, maxValue, minValue, timeZone } = state\n const formatter = new DateFormatter(locale, {\n calendar: focusedDate.calendar.identifier,\n era: eraOf(focusedDate),\n timeZone,\n year: 'numeric',\n })\n let first = focusedDate.subtract({ years: Math.floor(LISTED_YEARS / 2) })\n let last = focusedDate.add({ years: Math.ceil(LISTED_YEARS / 2) - 1 })\n\n if (maxValue != null && last.compare(maxValue) > 0) {\n last = toCalendarDate(maxValue)\n first = last.subtract({ years: LISTED_YEARS - 1 })\n }\n\n if (minValue != null && first.compare(minValue) < 0) {\n first = toCalendarDate(minValue)\n last = first.add({ years: LISTED_YEARS - 1 })\n if (maxValue != null && last.compare(maxValue) > 0) {\n last = toCalendarDate(maxValue)\n }\n }\n\n const entries: ListEntry[] = []\n let shown = 0\n\n for (\n let date = first;\n date.compare(last) <= 0 || isSameYear(date, last);\n date = date.add({ years: 1 })\n ) {\n const entry = date.compare(last) > 0 ? last : date\n\n if (isSameYear(entry, focusedDate)) {\n shown = entries.length\n }\n entries.push({\n date: entry,\n formatted: formatter.format(entry.toDate(timeZone)),\n id: entries.length,\n })\n }\n\n return { entries, shown }\n}\n\nconst NONE: ReadonlySet<number> = new Set()\n\nexport { CalendarFrame, visibleMonthOf }\nexport type { Weekday }\n"],"mappings":";;;;;;;;;;;;;;;;;AA2EA,MAAM4D,eAAe;AAIrB,MAAMC,mBAAAA;;;;;;AAON,SAAAC,cAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAuB,MAAA,EAAAC,gBAAAT,QAAAU,oBAAAT,UAAAK;CAQtB,IAAAK;CAAA,IAAAJ,EAAA,OAAAE,kBAAAF,EAAA,OAAAP,UAAAO,EAAA,OAAAN,OAAA;EAEGU,KAAA,oBAAC,WAAD;GAA2BF;GAAwBT;GAAeC;EAAK,CAAA;EAAIM,EAAA,KAAAE;EAAAF,EAAA,KAAAP;EAAAO,EAAA,KAAAN;EAAAM,EAAA,KAAAI;CAAA,OAAAA,KAAAJ,EAAA;CAD7E,MAAAK,OACED;C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endarDate","ComponentRef","ReactNode","RefObject","HostInstance","ListRenderItemInfo","StyleProp","TextStyle","ViewStyle","CalendarState","RangeCalendarState","DateFormatter","endOfMonth","isSameDay","isSameMonth","isSameYear","isToday","startOfMonth","startOfWeek","toCalendarDate","today","createContext","use","useLayoutEffect","useRef","useState","FlatList","I18nManager","Text","NativeText","Pressable","StyleSheet","View","Animated","Easing","useAnimatedStyle","useReducedMotion","useSharedValue","withTiming","ResolvedTheme","IconButton","ArrowDropDownGlyph","CheckGlyph","ChevronEndGlyph","useWindowSizeClass","messagesFor","useFocusOnPlaced","useReturnFocus","hitSlop","usePressFeedback","withOpacity","useTheme","composeStyles","useTypeRole","rootWidthOf","SLIDE_DISTANCE","styles","stylesOf","WEEKS_HELD","ListEntry","date","formatted","id","MonthOffset","months","OpenList","CalendarFocusContext","cell","PartProps","locale","state","SomeCalendarState","Weekday","LISTED_YEARS","ROWS_ABOVE_SHOWN","CalendarFrame","t0","$","_c","firstDayOfWeek","showMonthYearMenus","t1","t2","own","sideBySide","useSideBySide","t3","monthsSideBySide","t4","monthSideBySide","t5","offset","undefined","offsetsOf","map","grids","t6","t7","CalendarHeader","role","T0","header","T1","heading","visibleRangeOf","t8","t9","CalendarMenus","children","words","calendar","open","setOpen","monthButton","yearButton","shownMonth","focusedDate","month","headerGroup","chevronRoom","isDisabled","monthsOf","t10","t11","Symbol","for","toggleThen","t12","t13","t14","t15","t16","t17","yearOf","t18","year","t19","t20","t21","t22","t23","t24","t25","Chevron","direction","previous","isPreviousVisibleRangeInvalid","isNextVisibleRangeInvalid","outside","pageThen","previousGlyphStyle","chevron","chooseThen","shown","entry","setFocusedDate","cornersOf","shape","borderBottomEndRadius","borderBottomStartRadius","borderRadius","borderTopEndRadius","borderTopStartRadius","flatten","DateCell","theme","colors","sizing","isCellDisabled","isCellUnavailable","isUnavailable","selectable","isSelected","isCurrent","timeZone","range","rangeOf","isFilled","isEnd","report","isFocused","dateInRange","isFirst","dateRangeStart","isLast","dateRangeEnd","feedback","color","onPrimary","onSurface","onPrimaryContainer","corners","disabled","onHoverIn","highlightThen","promptOf","dateLabelOf","controlSm","selectThen","handlers","dateToday","dateSelected","ring","layer","dateText","dateTextToday","dateTextInRange","dateTextSelected","dateTextUnavailable","dateTextDisabled","dayOf","full","rangeNameOf","day","era","eraOf","weekday","format","toDate","said","todayDateSelected","todayDate","replace","minValue","minimumDate","maxValue","maximumDate","identifier","formatToParts","find","part","type","value","String","const","highlightDate","layoutOf","height","_data","ArrayLike","index","length","listKeyOf","MenuButton","buttonRef","expanded","label","name","onPress","stateLayerOpacity","onSurfaceVariant","menuButton","menuButtonText","disabledContent","arrowExpanded","MenuList","entries","onChoose","checked","setChecked","controlMd","Math","max","min","rowOf","list","MonthGrid","visibleRange","start","add","slide","useMonthSlide","rowStyle","row","rowHeight","grid","weekdaysOf","key","column","weeksOf","week","days","MonthList","outsideBounds","formatter","Array","from","getMonthsInYear","_unused","set","getFormattableMonth","ReadonlySet","Set","filter","compare","focusNextPage","focusPreviousPage","isRTL","previousGlyphRightToLeft","previousGlyph","isReadOnly","anchorDate","startRangeSelectionPrompt","finishRangeSelectionPrompt","highlightedRange","end","selectedDateDescription","selectedRangeDescription","spokenRangeOf","Row","isChecked","rowPressThen","listRow","listRowSelected","listText","listTextDisabled","listCheck","item","has","selectDate","parts","formatRangeToParts","separator","source","dateRange","textOf","slice","Intl","DateTimeFormatPart","join","update","motion","reduceMotion","opacity","travel","current","timing","duration","durationMedium2","easing","bezier","easingEmphasizedDecelerate","side","get","transform","translateX","useRootStyle","root","width","sizeClass","spoken","first","last","formatRange","toString","getWeeksInMonth","weeks","getDatesInWeek","YearList","yearsOf","NONE","subtract","years","floor","ceil","push","_c","NativeText"],"sources":["../../src/calendar/index.tsx"],"sourcesContent":["import type { CalendarDate } from '@internationalized/date'\nimport type { ComponentRef, ReactNode, RefObject } from 'react'\nimport type {\n HostInstance,\n ListRenderItemInfo,\n StyleProp,\n TextStyle,\n ViewStyle,\n} from 'react-native'\nimport type { CalendarState } from 'react-stately/useCalendarState'\nimport type { RangeCalendarState } from 'react-stately/useRangeCalendarState'\n\nimport {\n DateFormatter,\n endOfMonth,\n isSameDay,\n isSameMonth,\n isSameYear,\n isToday,\n startOfMonth,\n startOfWeek,\n toCalendarDate,\n today,\n} from '@internationalized/date'\nimport { createContext, use, useLayoutEffect, useRef, useState } from 'react'\nimport {\n FlatList,\n I18nManager,\n Text as NativeText,\n Pressable,\n StyleSheet,\n View,\n} from 'react-native'\nimport Animated, {\n Easing,\n useAnimatedStyle,\n useReducedMotion,\n useSharedValue,\n withTiming,\n} from 'react-native-reanimated'\n\nimport type { ResolvedTheme } from '../theme/scope'\n\nimport { IconButton } from '../components/icon-button'\nimport { ArrowDropDownGlyph, CheckGlyph, ChevronEndGlyph } from '../glyphs'\nimport { useWindowSizeClass } from '../hooks/useWindowSizeClass'\nimport { messagesFor } from '../i18n'\nimport { useFocusOnPlaced, useReturnFocus } from '../overlay/panel'\nimport { hitSlop, usePressFeedback } from '../press'\nimport { withOpacity } from '../theme/color'\nimport { useTheme } from '../theme/scope'\nimport { composeStyles } from '../theme/styles'\nimport { useTypeRole } from '../typography/roles'\nimport {\n rootWidthOf,\n SLIDE_DISTANCE,\n styles,\n stylesOf,\n WEEKS_HELD,\n} from './styles'\n\n// The parts Calendar and RangeCalendar both draw inside their container: the\n// row that moves the month, the weekday row, the weeks and the date cell, and\n// the month and year lists that take the grid's place. Apart from either\n// component so the two cannot drift, and so each directory under\n// src/components holds one component, as kanso-ui keeps its own in\n// src/calendar.\n\n/** One entry of a month or year list. */\ntype ListEntry = {\n readonly date: CalendarDate\n readonly formatted: string\n readonly id: number\n}\n\n/** A month's distance from the first one a calendar shows. */\ntype MonthOffset = { readonly months: number }\n\ntype OpenList = 'month' | 'year'\n\n/**\n * Where a calendar hands over the cell of the date it is on, the one held or\n * else the one it opened on, for a surface that sends a screen reader to that\n * date as it opens, as a date picker's does. The cell hands itself over as it\n * becomes that date and `null` as it stops being it. Outside such a surface\n * it is `null`, and no cell hands anything over.\n */\nconst CalendarFocusContext = createContext<\n ((cell: HostInstance | null) => void) | null\n>(null)\n\ntype PartProps = {\n readonly locale: string\n readonly state: SomeCalendarState\n}\n\n/** The state of either calendar, one date's or a range's. */\ntype SomeCalendarState = CalendarState | RangeCalendarState\n\n/** The day a locale's week starts on, where the call site names one. */\ntype Weekday = 'fri' | 'mon' | 'sat' | 'sun' | 'thu' | 'tue' | 'wed'\n\n// How many years the open year list holds: a century either side of the year\n// shown, and that year, as kanso-ui's does. The bounds cut it short where they\n// fall inside.\nconst LISTED_YEARS = 201\n\n// An open list holds the weekday row and six weeks of room, seven rows, and\n// opens with the entry shown in the middle one, three rows from the top.\nconst ROWS_ABOVE_SHOWN = WEEKS_HELD / 2\n\n/**\n * What a calendar draws inside its container: the header, and a grid for each\n * month it shows. With `showMonthYearMenus` the header is the date pickers\n * page's docked one, the month and the year as menu buttons, and while either\n * is open its list takes the grid's place.\n *\n * The menus are for one month. They name and pick the first month alone, so\n * a second grid beside it would have no month or year of its own; with more\n * than one the header is the plain one, whose heading names every month\n * shown, both years where they are two, as web's does.\n */\nfunction CalendarFrame({\n firstDayOfWeek,\n locale,\n months,\n showMonthYearMenus,\n state,\n}: PartProps & {\n readonly firstDayOfWeek: undefined | Weekday\n /** How many months the calendar shows. */\n readonly months: number\n readonly showMonthYearMenus: boolean\n}) {\n const own = stylesOf(useTheme())\n const sideBySide = useSideBySide(months)\n const grids = (\n <View style={sideBySide ? own.monthsSideBySide : own.months}>\n {offsetsOf(months).map((offset) => (\n <View\n key={offset.months}\n style={sideBySide ? own.monthSideBySide : undefined}\n >\n <MonthGrid\n firstDayOfWeek={firstDayOfWeek}\n locale={locale}\n offset={offset}\n state={state}\n />\n </View>\n ))}\n </View>\n )\n\n if (showMonthYearMenus && months <= 1) {\n return (\n <CalendarMenus locale={locale} state={state}>\n {grids}\n </CalendarMenus>\n )\n }\n\n return (\n <>\n <CalendarHeader locale={locale} state={state} />\n {grids}\n </>\n )\n}\n\n/** The two chevrons with the month and year between them. */\nfunction CalendarHeader({ locale, state }: PartProps) {\n const own = stylesOf(useTheme())\n const role = useTypeRole('labelLarge')\n\n return (\n <View style={own.header}>\n <Chevron direction=\"previous\" locale={locale} state={state} />\n <NativeText\n aria-live=\"polite\"\n role=\"heading\"\n style={composeStyles<TextStyle>(role, own.heading)}\n >\n {visibleRangeOf(state, locale)}\n </NativeText>\n <Chevron direction=\"next\" locale={locale} state={state} />\n </View>\n )\n}\n\n/**\n * The docked header: the month's menu button between the chevrons that step\n * it, and the year's after them. A press opens the button's list in the\n * grid's place, where the page draws it, rather than in a menu over it; a\n * calendar inside a picker is already in one. While a list is open the\n * chevrons give way to the room they took and the other button is disabled,\n * and choosing an entry, or pressing the one already checked, closes the\n * list and sends the screen reader back to its button.\n *\n * The month list names the months in full where the button names the month\n * short, as the page does. The year list runs a century either side of the\n * year shown, and `minValue` and `maxValue` cut it short; a month with no day\n * inside them is disabled.\n */\nfunction CalendarMenus({\n children,\n locale,\n state,\n}: PartProps & { readonly children: ReactNode }) {\n const own = stylesOf(useTheme())\n const words = messagesFor(locale).calendar\n const [open, setOpen] = useState<null | OpenList>(null)\n const monthButton = useRef<ComponentRef<typeof View>>(null)\n const yearButton = useRef<ComponentRef<typeof View>>(null)\n const shownMonth = state.focusedDate.month - 1\n\n useReturnFocus(open === 'month', false, monthButton)\n useReturnFocus(open === 'year', false, yearButton)\n\n return (\n <>\n <View style={own.header}>\n <View style={own.headerGroup}>\n {open === null ? (\n <Chevron direction=\"previous\" locale={locale} state={state} />\n ) : (\n <View style={own.chevronRoom} />\n )}\n <MenuButton\n buttonRef={monthButton}\n expanded={open === 'month'}\n isDisabled={state.isDisabled || open === 'year'}\n label={monthsOf(state, locale, 'short')[shownMonth]?.formatted}\n name={words.month}\n onPress={toggleThen(setOpen, 'month')}\n />\n {open === null ? (\n <Chevron direction=\"next\" locale={locale} state={state} />\n ) : (\n <View style={own.chevronRoom} />\n )}\n </View>\n <MenuButton\n buttonRef={yearButton}\n expanded={open === 'year'}\n isDisabled={state.isDisabled || open === 'month'}\n label={yearOf(state, locale)}\n name={words.year}\n onPress={toggleThen(setOpen, 'year')}\n />\n </View>\n {open === null ? children : null}\n {open === 'month' ? (\n <MonthList locale={locale} setOpen={setOpen} state={state} />\n ) : null}\n {open === 'year' ? (\n <YearList locale={locale} setOpen={setOpen} state={state} />\n ) : null}\n </>\n )\n}\n\n/**\n * A chevron that moves the month, the icon buttons page's standard 40dp\n * button. Disabled where the month it would move to is outside `minValue`\n * and `maxValue`, or the whole calendar is disabled.\n */\nfunction Chevron({\n direction,\n locale,\n state,\n}: PartProps & { readonly direction: 'next' | 'previous' }) {\n const own = stylesOf(useTheme())\n const previous = direction === 'previous'\n const outside = previous\n ? state.isPreviousVisibleRangeInvalid()\n : state.isNextVisibleRangeInvalid()\n\n return (\n <IconButton\n aria-label={messagesFor(locale).calendar[direction]}\n isDisabled={state.isDisabled || outside}\n onPress={pageThen(state, direction)}\n style={own.chevron}\n >\n <ChevronEndGlyph style={previous ? previousGlyphStyle() : undefined} />\n </IconButton>\n )\n}\n\n// Chooses an entry of the open list and closes it. The entry already shown\n// closes it without moving anything.\nfunction chooseThen(\n state: SomeCalendarState,\n setOpen: (open: null | OpenList) => void,\n shown: number,\n) {\n return (entry: ListEntry) => {\n if (entry.id !== shown) {\n state.setFocusedDate(entry.date)\n }\n setOpen(null)\n }\n}\n\n// The corners of a date's shape, which its state layer and ripple clip to.\n// The corners alone: the shape's size and margins are the date's, and on the\n// layer, which fills the date, the margins would move it off the circle.\nfunction cornersOf(shape: StyleProp<ViewStyle>) {\n const {\n borderBottomEndRadius,\n borderBottomStartRadius,\n borderRadius,\n borderTopEndRadius,\n borderTopStartRadius,\n }: ViewStyle = StyleSheet.flatten(shape) ?? {}\n\n return {\n borderBottomEndRadius,\n borderBottomStartRadius,\n borderRadius,\n borderTopEndRadius,\n borderTopStartRadius,\n }\n}\n\n/**\n * One date: the page's 40dp circle in its 48dp square, which `hitSlop` makes\n * the press target. Its name is the date in full, with today, the selection\n * and the first or last date the bounds allow said as web says them, and it\n * reports itself disabled where it cannot be picked, as a date of the months\n * either side of its grid's is.\n *\n * In a range calendar a selected day is the band instead, as wide as its\n * column, with the two ends filled and round on their outer side, and the\n * state layers follow the ground under them: on primary over an end, on\n * primary container over the band, on surface elsewhere. While a range is\n * started, a pointer over a date draws the range as far as it, as web's\n * does; a touch has no such preview, and the second press ends the range.\n */\nfunction DateCell({\n date,\n locale,\n month,\n state,\n}: PartProps & {\n readonly date: CalendarDate\n /** The first day of the month the date's grid shows. */\n readonly month: CalendarDate\n}) {\n const theme = useTheme()\n const { colors, sizing } = theme\n const own = stylesOf(theme)\n const role = useTypeRole('bodyLarge')\n const isDisabled = state.isCellDisabled(date) || !isSameMonth(date, month)\n const isUnavailable = state.isCellUnavailable(date)\n const selectable = !isDisabled && !isUnavailable\n const isSelected = selectable && state.isSelected(date)\n const isCurrent = isToday(date, state.timeZone)\n const range = rangeOf(state, date, isSelected)\n const isFilled = range === null ? isSelected : range.isEnd\n // The date the calendar is on, in its own month's grid rather than as the\n // spill of the month beside it, is the cell a picker sends a reader to.\n const report = use(CalendarFocusContext)\n const isFocused =\n isSameMonth(date, month) && isSameDay(date, state.focusedDate)\n const shape = composeStyles<ViewStyle>(\n own.date,\n range === null ? undefined : own.dateInRange,\n range?.isFirst === true ? own.dateRangeStart : undefined,\n range?.isLast === true ? own.dateRangeEnd : undefined,\n )\n const feedback = usePressFeedback({\n color: isFilled\n ? colors.onPrimary\n : range === null\n ? colors.onSurface\n : colors.onPrimaryContainer,\n corners: cornersOf(shape),\n disabled: !selectable,\n onHoverIn: highlightThen(state, date),\n })\n\n return (\n <Pressable\n accessibilityHint={promptOf(state, locale, selectable)}\n aria-label={dateLabelOf(date, state, locale, isCurrent, isSelected)}\n hitSlop={hitSlop(\n sizing.controlSm,\n range === null ? sizing.controlSm : undefined,\n )}\n onPress={selectThen(state, date)}\n ref={isFocused && report !== null ? report : undefined}\n role=\"button\"\n {...feedback.handlers}\n disabled={!selectable}\n style={composeStyles<ViewStyle>(\n shape,\n isCurrent ? own.dateToday : undefined,\n isFilled ? own.dateSelected : undefined,\n feedback.ring,\n )}\n >\n {feedback.layer}\n <NativeText\n style={composeStyles<TextStyle>(\n role,\n own.dateText,\n isCurrent ? own.dateTextToday : undefined,\n range === null ? undefined : own.dateTextInRange,\n isFilled ? own.dateTextSelected : undefined,\n isUnavailable ? own.dateTextUnavailable : undefined,\n isDisabled ? own.dateTextDisabled : undefined,\n )}\n >\n {dayOf(date, state, locale)}\n </NativeText>\n </Pressable>\n )\n}\n\n// A date's name: the date in full, as today or as the one held where it is\n// either, then as the first or last date the bounds allow where it is that.\n// A range's two ends open with the whole range, once one is chosen. React\n// Aria's own wording, from its calendar dictionary.\nfunction dateLabelOf(\n date: CalendarDate,\n state: SomeCalendarState,\n locale: string,\n isCurrent: boolean,\n isSelected: boolean,\n) {\n const words = messagesFor(locale).calendar\n const full = `${rangeNameOf(state, date, locale)}${new DateFormatter(locale, {\n day: 'numeric',\n era: eraOf(date),\n month: 'long',\n timeZone: state.timeZone,\n weekday: 'long',\n year: 'numeric',\n }).format(date.toDate(state.timeZone))}`\n const said = isCurrent\n ? (isSelected ? words.todayDateSelected : words.todayDate).replace(\n '{date}',\n full,\n )\n : isSelected\n ? words.dateSelected.replace('{date}', full)\n : full\n\n if (state.minValue != null && isSameDay(date, state.minValue)) {\n return `${said}, ${words.minimumDate}`\n }\n\n if (state.maxValue != null && isSameDay(date, state.maxValue)) {\n return `${said}, ${words.maximumDate}`\n }\n\n return said\n}\n\n// The date's number in the grid, in the locale's digits: the day alone out of\n// a formatted date, as React Aria takes it, so a locale that writes a unit\n// after the day, as Japanese does, draws the number alone.\nfunction dayOf(date: CalendarDate, state: SomeCalendarState, locale: string) {\n return (\n new DateFormatter(locale, {\n calendar: date.calendar.identifier,\n day: 'numeric',\n timeZone: state.timeZone,\n })\n .formatToParts(date.toDate(state.timeZone))\n .find((part) => part.type === 'day')?.value ?? String(date.day)\n )\n}\n\n// The era is written only where a Gregorian date falls before the common era,\n// as React Aria writes it.\nfunction eraOf(date: CalendarDate) {\n return date.calendar.identifier === 'gregory' && date.era === 'BC'\n ? ('short' as const)\n : undefined\n}\n\n// Draws a started range as far as the date a pointer is over, as web's does.\n// Nothing in a calendar of one date; before a range is started, React\n// Stately's own `highlightDate` does nothing.\nfunction highlightThen(state: SomeCalendarState, date: CalendarDate) {\n if (!('highlightDate' in state)) {\n return undefined\n }\n\n return () => {\n state.highlightDate(date)\n }\n}\n\n// The row a list's row occupies, which is every row's 48dp, so the list can\n// open scrolled to the entry shown without laying out the rows before it.\nfunction layoutOf(height: number) {\n return (_data: ArrayLike<ListEntry> | null | undefined, index: number) => ({\n index,\n length: height,\n offset: height * index,\n })\n}\n\nfunction listKeyOf(entry: ListEntry) {\n return String(entry.id)\n}\n\n/**\n * The month or the year as the page's menu button, opening its list. Named\n * by what it shows and then by what it is, \"Sep month\", which keeps the\n * visible text the start of the name.\n */\nfunction MenuButton({\n buttonRef,\n expanded,\n isDisabled,\n label,\n name,\n onPress,\n}: {\n readonly buttonRef: RefObject<ComponentRef<typeof View> | null>\n readonly expanded: boolean\n readonly isDisabled: boolean\n readonly label: string | undefined\n readonly name: string\n readonly onPress: () => void\n}) {\n const theme = useTheme()\n const { colors, sizing, stateLayerOpacity } = theme\n const own = stylesOf(theme)\n const role = useTypeRole('labelLarge')\n const feedback = usePressFeedback({\n color: colors.onSurfaceVariant,\n corners: own.menuButton,\n disabled: isDisabled,\n })\n\n return (\n <Pressable\n aria-expanded={expanded}\n aria-label={`${label ?? ''} ${name}`}\n hitSlop={hitSlop(sizing.controlSm)}\n onPress={onPress}\n ref={buttonRef}\n role=\"button\"\n {...feedback.handlers}\n disabled={isDisabled}\n style={composeStyles<ViewStyle>(own.menuButton, feedback.ring)}\n >\n {feedback.layer}\n <NativeText\n style={composeStyles<TextStyle>(\n role,\n own.menuButtonText,\n isDisabled ? own.dateTextDisabled : undefined,\n )}\n >\n {label}\n </NativeText>\n <ArrowDropDownGlyph\n color={\n isDisabled\n ? withOpacity(colors.onSurface, stateLayerOpacity.disabledContent)\n : colors.onSurfaceVariant\n }\n size={18}\n style={expanded ? own.arrowExpanded : undefined}\n />\n </Pressable>\n )\n}\n\n/**\n * An open month or year list, in the grid's place: a list of radio rows, the\n * entry shown checked, opening scrolled so that entry sits in the middle with\n * the entries either side of it in view. The screen reader is sent to it as\n * it opens.\n */\nfunction MenuList({\n disabled,\n entries,\n name,\n onChoose,\n shown,\n}: {\n readonly disabled: ReadonlySet<number>\n readonly entries: readonly ListEntry[]\n readonly name: string\n readonly onChoose: (entry: ListEntry) => void\n readonly shown: number\n}) {\n const theme = useTheme()\n const own = stylesOf(theme)\n const [checked, setChecked] = useState<HostInstance | null>(null)\n\n useFocusOnPlaced(true, checked)\n\n return (\n <FlatList\n aria-label={name}\n data={entries}\n getItemLayout={layoutOf(theme.sizing.controlMd)}\n initialScrollIndex={Math.max(\n 0,\n Math.min(shown - ROWS_ABOVE_SHOWN, entries.length - (WEEKS_HELD + 1)),\n )}\n keyExtractor={listKeyOf}\n renderItem={rowOf({ disabled, onChoose, setChecked, shown })}\n role=\"radiogroup\"\n style={own.list}\n />\n )\n}\n\n/**\n * The weekday row and one month's weeks, held at six weeks of room so the\n * calendar keeps its height from month to month. The weeks slide in from the\n * side the new month comes from.\n */\nfunction MonthGrid({\n firstDayOfWeek,\n locale,\n offset,\n state,\n}: PartProps & {\n readonly firstDayOfWeek: undefined | Weekday\n /** How far the month is from the first one the calendar shows. */\n readonly offset: MonthOffset\n}) {\n const theme = useTheme()\n const own = stylesOf(theme)\n const role = useTypeRole('bodyLarge')\n const start = state.visibleRange.start.add(offset)\n const slide = useMonthSlide(start, theme)\n const rowStyle = composeStyles<ViewStyle>(styles.row, own.rowHeight)\n\n return (\n <View style={own.grid}>\n <View aria-hidden style={rowStyle}>\n {weekdaysOf(state, locale, firstDayOfWeek).map((weekday) => (\n <View key={weekday.key} style={styles.column}>\n <NativeText style={composeStyles<TextStyle>(role, own.weekday)}>\n {weekday.label}\n </NativeText>\n </View>\n ))}\n </View>\n <Animated.View style={slide}>\n {weeksOf(state, start).map((week) => (\n <View key={week.key} style={rowStyle}>\n {week.days.map((day) => (\n <View key={day.key} style={styles.column}>\n {day.date === null ? null : (\n <DateCell\n date={day.date}\n locale={locale}\n month={start}\n state={state}\n />\n )}\n </View>\n ))}\n </View>\n ))}\n </Animated.View>\n </View>\n )\n}\n\n/** The open month list: the months of the year shown, named in full. */\nfunction MonthList({\n locale,\n setOpen,\n state,\n}: PartProps & { readonly setOpen: (open: null | OpenList) => void }) {\n const months = monthsOf(state, locale, 'long')\n const shown = state.focusedDate.month - 1\n\n return (\n <MenuList\n disabled={outsideBounds(state, months)}\n entries={months}\n name={messagesFor(locale).calendar.month}\n onChoose={chooseThen(state, setOpen, shown)}\n shown={shown}\n />\n )\n}\n\n// The months of the year shown, named short for the header's button or in\n// full for the open list. Some calendar systems, such as the Hebrew, have\n// more months in some years than in others.\nfunction monthsOf(\n state: SomeCalendarState,\n locale: string,\n format: 'long' | 'short',\n): readonly ListEntry[] {\n const { focusedDate, timeZone } = state\n const formatter = new DateFormatter(locale, {\n calendar: focusedDate.calendar.identifier,\n month: format,\n timeZone,\n })\n\n return Array.from(\n { length: focusedDate.calendar.getMonthsInYear(focusedDate) },\n (_unused, index) => {\n const date = focusedDate.set({ month: index + 1 })\n const shown = date.calendar.getFormattableMonth?.(date) ?? date\n\n return {\n date,\n formatted: formatter.format(shown.toDate(timeZone)),\n id: index,\n }\n },\n )\n}\n\n// One offset per month a calendar shows, the first month's none.\nfunction offsetsOf(months: number): readonly MonthOffset[] {\n return Array.from({ length: Math.max(1, months) }, (_unused, index) => ({\n months: index,\n }))\n}\n\n// The months the bounds leave no day of.\nfunction outsideBounds(\n state: SomeCalendarState,\n months: readonly ListEntry[],\n): ReadonlySet<number> {\n const { maxValue, minValue } = state\n\n return new Set(\n months\n .filter(\n ({ date }) =>\n (maxValue != null && startOfMonth(date).compare(maxValue) > 0) ||\n (minValue != null && endOfMonth(date).compare(minValue) < 0),\n )\n .map(({ id }) => id),\n )\n}\n\nfunction pageThen(state: SomeCalendarState, direction: 'next' | 'previous') {\n return () => {\n if (direction === 'next') {\n state.focusNextPage()\n } else {\n state.focusPreviousPage()\n }\n }\n}\n\nfunction previousGlyphStyle() {\n return I18nManager.isRTL\n ? styles.previousGlyphRightToLeft\n : styles.previousGlyph\n}\n\n// What pressing a date in a range calendar does, as the screen reader's hint\n// on it: start a range, or end the one started. React Aria says it at the date\n// focused, which on a device is the one the screen reader is on. Nothing in a\n// calendar of one date, or where the press would do nothing.\nfunction promptOf(\n state: SomeCalendarState,\n locale: string,\n selectable: boolean,\n) {\n if (!('anchorDate' in state) || state.isReadOnly || !selectable) {\n return undefined\n }\n\n const words = messagesFor(locale).calendar\n\n return state.anchorDate === null\n ? words.startRangeSelectionPrompt\n : words.finishRangeSelectionPrompt\n}\n\n// What the two ends of the range a range calendar holds say before the date:\n// the range, or the day where it is one, as React Aria opens their names with\n// it. Nothing while a range is started, which holds nothing yet, or for any\n// other date.\nfunction rangeNameOf(\n state: SomeCalendarState,\n date: CalendarDate,\n locale: string,\n) {\n if (\n !('highlightedRange' in state) ||\n state.value === null ||\n state.anchorDate !== null ||\n state.highlightedRange === null ||\n (!isSameDay(date, state.value.start) && !isSameDay(date, state.value.end))\n ) {\n return ''\n }\n\n const { end, start } = state.highlightedRange\n const { timeZone } = state\n const words = messagesFor(locale).calendar\n const formatter = new DateFormatter(locale, {\n day: 'numeric',\n era: eraOf(start) ?? eraOf(end),\n month: 'long',\n timeZone,\n weekday: 'long',\n year: 'numeric',\n })\n const said = isSameDay(start, end)\n ? words.selectedDateDescription.replace(\n '{date}',\n formatter.format(start.toDate(timeZone)),\n )\n : words.selectedRangeDescription.replace(\n '{dateRange}',\n spokenRangeOf(formatter, locale, start, end, timeZone),\n )\n\n return `${said}, `\n}\n\n// Where a selected date sits in a range calendar's range: its first or last\n// day, either of which is an end, or between them. Null in a calendar of one\n// date, and for a date outside the range.\nfunction rangeOf(\n state: SomeCalendarState,\n date: CalendarDate,\n isSelected: boolean,\n) {\n if (\n !isSelected ||\n !('highlightedRange' in state) ||\n state.highlightedRange === null\n ) {\n return null\n }\n\n const isFirst = isSameDay(date, state.highlightedRange.start)\n const isLast = isSameDay(date, state.highlightedRange.end)\n\n return { isEnd: isFirst || isLast, isFirst, isLast }\n}\n\n/**\n * One row of an open list: the check where the row is the entry shown, the\n * room it takes where it is not, then the month or the year, in body large.\n */\nfunction Row({\n entry,\n isChecked,\n isDisabled,\n onChoose,\n setChecked,\n}: {\n readonly entry: ListEntry\n readonly isChecked: boolean\n readonly isDisabled: boolean\n readonly onChoose: (entry: ListEntry) => void\n readonly setChecked: (row: HostInstance | null) => void\n}) {\n const theme = useTheme()\n const own = stylesOf(theme)\n const role = useTypeRole('bodyLarge')\n const feedback = usePressFeedback({\n color: theme.colors.onSurface,\n disabled: isDisabled,\n })\n\n return (\n <Pressable\n aria-checked={isChecked}\n onPress={rowPressThen(onChoose, entry)}\n ref={isChecked ? setChecked : undefined}\n role=\"radio\"\n {...feedback.handlers}\n disabled={isDisabled}\n style={composeStyles<ViewStyle>(\n own.listRow,\n isChecked ? own.listRowSelected : undefined,\n feedback.ring,\n )}\n >\n {feedback.layer}\n <View style={own.listCheck}>\n {isChecked ? <CheckGlyph color={theme.colors.onSurface} /> : null}\n </View>\n <NativeText\n style={composeStyles<TextStyle>(\n role,\n own.listText,\n isDisabled ? own.listTextDisabled : undefined,\n )}\n >\n {entry.formatted}\n </NativeText>\n </Pressable>\n )\n}\n\nfunction rowOf({\n disabled,\n onChoose,\n setChecked,\n shown,\n}: {\n readonly disabled: ReadonlySet<number>\n readonly onChoose: (entry: ListEntry) => void\n readonly setChecked: (row: HostInstance | null) => void\n readonly shown: number\n}) {\n return ({ item }: ListRenderItemInfo<ListEntry>) => (\n <Row\n entry={item}\n isChecked={item.id === shown}\n isDisabled={disabled.has(item.id)}\n onChoose={onChoose}\n setChecked={setChecked}\n />\n )\n}\n\nfunction rowPressThen(onChoose: (entry: ListEntry) => void, entry: ListEntry) {\n return () => {\n onChoose(entry)\n }\n}\n\n// Picks a date and moves the calendar's focus to it, as a press on one does\n// on web. A read-only or disabled calendar's state ignores the pick.\nfunction selectThen(state: SomeCalendarState, date: CalendarDate) {\n return () => {\n state.selectDate(date)\n state.setFocusedDate(date)\n }\n}\n\n// Two dates as a range in the calendar's `dateRange` words, each written as\n// much as the other leaves out, \"September 8 to 15, 2026\". React Aria splits\n// the formatted range at the last literal its two halves share before the\n// end begins, and so does this.\nfunction spokenRangeOf(\n formatter: DateFormatter,\n locale: string,\n start: CalendarDate,\n end: CalendarDate,\n timeZone: string,\n) {\n const parts = formatter.formatRangeToParts(\n start.toDate(timeZone),\n end.toDate(timeZone),\n )\n let separator = -1\n\n for (const [index, part] of parts.entries()) {\n if (part.source === 'endRange') {\n break\n }\n if (part.source === 'shared' && part.type === 'literal') {\n separator = index\n }\n }\n\n return messagesFor(locale)\n .calendar.dateRange.replace(\n '{startDate}',\n textOf(parts.slice(0, Math.max(0, separator))),\n )\n .replace('{endDate}', textOf(parts.slice(separator + 1)))\n}\n\nfunction textOf(parts: readonly Intl.DateTimeFormatPart[]) {\n return parts.map((part) => part.value).join('')\n}\n\nfunction toggleThen(\n setOpen: (update: (open: null | OpenList) => null | OpenList) => void,\n list: OpenList,\n) {\n return () => {\n setOpen((open) => (open === list ? null : list))\n }\n}\n\n/**\n * Slides the weeks in from the side the new month comes from as the month\n * moves, 30dp over the medium duration on the emphasised decelerating curve,\n * fading in as they come: Material Design's shared axis transition for an\n * incoming page. The side follows the writing direction, so a later month\n * arrives from the end. Under reduced motion the month changes at once.\n */\nfunction useMonthSlide(start: CalendarDate, { motion }: ResolvedTheme) {\n const reduceMotion = useReducedMotion()\n const offset = useSharedValue(0)\n const opacity = useSharedValue(1)\n const shown = useRef(start)\n\n useLayoutEffect(() => {\n const travel = start.compare(shown.current)\n\n shown.current = start\n if (travel === 0 || reduceMotion) {\n return\n }\n\n const timing = {\n duration: motion.durationMedium2,\n easing: Easing.bezier(...motion.easingEmphasizedDecelerate),\n }\n const side = (travel > 0 ? 1 : -1) * (I18nManager.isRTL ? -1 : 1)\n\n offset.set(side * SLIDE_DISTANCE)\n offset.set(withTiming(0, timing))\n opacity.set(0)\n opacity.set(withTiming(1, timing))\n }, [motion, offset, opacity, reduceMotion, start])\n\n return useAnimatedStyle(() => {\n 'worklet'\n return {\n opacity: opacity.get(),\n transform: [{ translateX: offset.get() }],\n }\n })\n}\n\n/**\n * The container's style for the months a calendar shows: the page's 360dp,\n * or as wide as its months side by side with the room between them.\n */\nfunction useRootStyle(months: number) {\n const theme = useTheme()\n const own = stylesOf(theme)\n\n return useSideBySide(months)\n ? composeStyles<ViewStyle>(own.root, {\n width: rootWidthOf(theme, months),\n })\n : own.root\n}\n\n// Whether a calendar's months sit side by side, which they do from the\n// expanded window size up, as web's do; below it they stack.\nfunction useSideBySide(months: number) {\n const sizeClass = useWindowSizeClass()\n\n return months > 1 && sizeClass !== 'compact' && sizeClass !== 'medium'\n}\n\n// The months the calendar shows, which the plain header draws between its\n// chevrons and the calendar's name ends with: one month and its year, or the\n// first and last of several as a range, which `spoken` writes in React Aria's\n// words for a screen reader, as React Aria writes the two.\nfunction visibleRangeOf(\n state: SomeCalendarState,\n locale: string,\n spoken = false,\n) {\n const { end, start } = state.visibleRange\n const { timeZone } = state\n const formatter = new DateFormatter(locale, {\n calendar: start.calendar.identifier,\n era: eraOf(start) ?? eraOf(end),\n month: 'long',\n timeZone,\n year: 'numeric',\n })\n const first = start.calendar.getFormattableMonth?.(start) ?? start\n\n if (isSameMonth(start, end)) {\n return formatter.format(first.toDate(timeZone))\n }\n\n const last = end.calendar.getFormattableMonth?.(end) ?? end\n\n return spoken\n ? spokenRangeOf(formatter, locale, first, last, timeZone)\n : formatter.formatRange(first.toDate(timeZone), last.toDate(timeZone))\n}\n\n// The weekday row, in the locale's narrow names from the day its week starts\n// on, or the day `firstDayOfWeek` names.\nfunction weekdaysOf(\n state: SomeCalendarState,\n locale: string,\n firstDayOfWeek: undefined | Weekday,\n) {\n const first = startOfWeek(today(state.timeZone), locale, firstDayOfWeek)\n const formatter = new DateFormatter(locale, {\n timeZone: state.timeZone,\n weekday: 'narrow',\n })\n\n return Array.from({ length: 7 }, (_unused, index) => {\n const date = first.add({ days: index })\n\n return {\n key: date.toString(),\n label: formatter.format(date.toDate(state.timeZone)),\n }\n })\n}\n\n// The weeks of the month a grid shows, from the first day of that month, each\n// seven days from the locale's first day of the week. A day a calendar system\n// lacks is a gap.\nfunction weeksOf(state: SomeCalendarState, start: CalendarDate) {\n return Array.from(\n { length: state.getWeeksInMonth(start) },\n (_unused, week) => {\n const key = start.add({ weeks: week }).toString()\n\n return {\n days: state.getDatesInWeek(week, start).map((date, day) => ({\n date,\n key: date?.toString() ?? `${key}+${String(day)}`,\n })),\n key,\n }\n },\n )\n}\n\n/** The open year list: the years either side of the one shown. */\nfunction YearList({\n locale,\n setOpen,\n state,\n}: PartProps & { readonly setOpen: (open: null | OpenList) => void }) {\n const { entries, shown } = yearsOf(state, locale)\n\n return (\n <MenuList\n disabled={NONE}\n entries={entries}\n name={messagesFor(locale).calendar.year}\n onChoose={chooseThen(state, setOpen, shown)}\n shown={shown}\n />\n )\n}\n\n// The year shown, which the header's year button names.\nfunction yearOf(state: SomeCalendarState, locale: string) {\n const { focusedDate, timeZone } = state\n\n return new DateFormatter(locale, {\n calendar: focusedDate.calendar.identifier,\n era: eraOf(focusedDate),\n timeZone,\n year: 'numeric',\n }).format(focusedDate.toDate(timeZone))\n}\n\n// The years the open list holds, as React Aria's year picker lists them: as\n// many either side of the year shown as `LISTED_YEARS` allows, shifted to\n// stay inside `minValue` and `maxValue` and cut short where those are nearer.\n// An entry's id is its place in the list, since in some calendars, such as\n// the Japanese, the era changes as well as the year.\nfunction yearsOf(state: SomeCalendarState, locale: string) {\n const { focusedDate, maxValue, minValue, timeZone } = state\n const formatter = new DateFormatter(locale, {\n calendar: focusedDate.calendar.identifier,\n era: eraOf(focusedDate),\n timeZone,\n year: 'numeric',\n })\n let first = focusedDate.subtract({ years: Math.floor(LISTED_YEARS / 2) })\n let last = focusedDate.add({ years: Math.ceil(LISTED_YEARS / 2) - 1 })\n\n if (maxValue != null && last.compare(maxValue) > 0) {\n last = toCalendarDate(maxValue)\n first = last.subtract({ years: LISTED_YEARS - 1 })\n }\n\n if (minValue != null && first.compare(minValue) < 0) {\n first = toCalendarDate(minValue)\n last = first.add({ years: LISTED_YEARS - 1 })\n if (maxValue != null && last.compare(maxValue) > 0) {\n last = toCalendarDate(maxValue)\n }\n }\n\n const entries: ListEntry[] = []\n let shown = 0\n\n for (\n let date = first;\n date.compare(last) <= 0 || isSameYear(date, last);\n date = date.add({ years: 1 })\n ) {\n const entry = date.compare(last) > 0 ? last : date\n\n if (isSameYear(entry, focusedDate)) {\n shown = entries.length\n }\n entries.push({\n date: entry,\n formatted: formatter.format(entry.toDate(timeZone)),\n id: entries.length,\n })\n }\n\n return { entries, shown }\n}\n\nconst NONE: ReadonlySet<number> = new Set()\n\nexport { CalendarFocusContext, CalendarFrame, useRootStyle, visibleRangeOf }\nexport type { Weekday }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAuFA,MAAMkE,uBAAuB7C,cAE3B,IAAI;AAgBN,MAAMoD,eAAe;AAIrB,MAAMC,mBAAAA;;;;;;;;;;;;AAaN,SAAAC,cAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAuB,MAAA,EAAAC,gBAAAV,QAAAL,QAAAgB,oBAAAV,UAAAM;CAYA,MAAAK,KAAA9B,SAAS;CAAC,IAAA+B;CAAA,IAAAL,EAAA,OAAAI,IAAA;EAAnBC,KAAAzB,SAASwB,EAAU;EAACJ,EAAA,KAAAI;EAAAJ,EAAA,KAAAK;CAAA,OAAAA,KAAAL,EAAA;CAAhC,MAAAM,M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AAI"}
|
package/dist/calendar/styles.js
CHANGED
|
@@ -2,6 +2,14 @@ import { themedStyles } from "../theme/styles.js";
|
|
|
2
2
|
import { withOpacity } from "../theme/color.js";
|
|
3
3
|
import { StyleSheet } from "react-native";
|
|
4
4
|
//#region src/calendar/styles.ts
|
|
5
|
+
/**
|
|
6
|
+
* The container's width for the months it holds side by side: the page's
|
|
7
|
+
* 360dp for one, which is seven 48dp columns inside its padding, and for more
|
|
8
|
+
* each month's seven columns with the room between them.
|
|
9
|
+
*/
|
|
10
|
+
function rootWidthOf({ sizing, spacing }, across) {
|
|
11
|
+
return sizing.controlMd * 7 * across + spacing.xl * (across - 1) + spacing.md * 2;
|
|
12
|
+
}
|
|
5
13
|
const styles = StyleSheet.create({
|
|
6
14
|
column: {
|
|
7
15
|
alignItems: "center",
|
|
@@ -33,12 +41,26 @@ const stylesOf = themedStyles(({ colors, radii, sizing, spacing, stateLayerOpaci
|
|
|
33
41
|
marginVertical: (row - date) / 2,
|
|
34
42
|
width: date
|
|
35
43
|
},
|
|
44
|
+
dateInRange: {
|
|
45
|
+
backgroundColor: colors.secondaryContainer,
|
|
46
|
+
borderRadius: 0,
|
|
47
|
+
width: "100%"
|
|
48
|
+
},
|
|
49
|
+
dateRangeEnd: {
|
|
50
|
+
borderBottomEndRadius: radii.circle,
|
|
51
|
+
borderTopEndRadius: radii.circle
|
|
52
|
+
},
|
|
53
|
+
dateRangeStart: {
|
|
54
|
+
borderBottomStartRadius: radii.circle,
|
|
55
|
+
borderTopStartRadius: radii.circle
|
|
56
|
+
},
|
|
36
57
|
dateSelected: { backgroundColor: colors.primary },
|
|
37
58
|
dateText: {
|
|
38
59
|
color: colors.onSurface,
|
|
39
60
|
textAlign: "center"
|
|
40
61
|
},
|
|
41
62
|
dateTextDisabled: { color: disabled },
|
|
63
|
+
dateTextInRange: { color: colors.onSecondaryContainer },
|
|
42
64
|
dateTextSelected: { color: colors.onPrimary },
|
|
43
65
|
dateTextToday: { color: colors.primary },
|
|
44
66
|
dateTextUnavailable: { textDecorationLine: "line-through" },
|
|
@@ -99,13 +121,22 @@ const stylesOf = themedStyles(({ colors, radii, sizing, spacing, stateLayerOpaci
|
|
|
99
121
|
paddingHorizontal: spacing.sm
|
|
100
122
|
},
|
|
101
123
|
menuButtonText: { color: colors.onSurfaceVariant },
|
|
124
|
+
months: { gap: spacing.xl },
|
|
125
|
+
monthSideBySide: { width: row * 7 },
|
|
126
|
+
monthsSideBySide: {
|
|
127
|
+
flexDirection: "row",
|
|
128
|
+
gap: spacing.xl
|
|
129
|
+
},
|
|
102
130
|
root: {
|
|
103
131
|
backgroundColor: colors.surfaceContainerHigh,
|
|
104
132
|
borderRadius: radii.lg,
|
|
105
133
|
gap: spacing.md,
|
|
106
134
|
maxWidth: "100%",
|
|
107
135
|
padding: spacing.md,
|
|
108
|
-
width:
|
|
136
|
+
width: rootWidthOf({
|
|
137
|
+
sizing,
|
|
138
|
+
spacing
|
|
139
|
+
}, 1)
|
|
109
140
|
},
|
|
110
141
|
rowHeight: { height: row },
|
|
111
142
|
weekday: {
|
|
@@ -115,6 +146,6 @@ const stylesOf = themedStyles(({ colors, radii, sizing, spacing, stateLayerOpaci
|
|
|
115
146
|
});
|
|
116
147
|
});
|
|
117
148
|
//#endregion
|
|
118
|
-
export { styles, stylesOf };
|
|
149
|
+
export { rootWidthOf, styles, stylesOf };
|
|
119
150
|
|
|
120
151
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","names":["StyleSheet","withOpacity","themedStyles","WEEKS_HELD","SLIDE_DISTANCE","styles","create","column","alignItems","flexBasis","flexGrow","justifyContent","previousGlyph","transform","scaleX","previousGlyphRightToLeft","row","flexDirection","stylesOf","colors","radii","sizing","spacing","stateLayerOpacity","controlMd","date","controlSm","disabled","onSurface","disabledContent","arrowExpanded","rotate","chevron","marginHorizontal","xs","chevronRoom","height","width","borderRadius","circle","marginVertical","dateSelected","backgroundColor","primary","dateText","color","textAlign","dateTextDisabled","dateTextSelected","onPrimary","dateTextToday","dateTextUnavailable","textDecorationLine","dateToday","borderColor","borderWidth","grid","header","gap","sm","minHeight","headerGroup","heading","onSurfaceVariant","flexShrink","list","borderTopColor","outlineVariant","borderTopWidth","md","listCheck","listRow","lg","paddingHorizontal","listRowSelected","surfaceVariant","listText","listTextDisabled","menuButton","pill","menuButtonText","root","surfaceContainerHigh","maxWidth","padding","rowHeight","weekday"],"sources":["../../src/calendar/styles.ts"],"sourcesContent":["import { StyleSheet } from 'react-native'\n\nimport { withOpacity } from '../theme/color'\nimport { themedStyles } from '../theme/styles'\n\n// The values are the date pickers page's docked calendar, as kanso-ui's\n// src/calendar/styles.ts draws it, and named in\n// src/components/calendar/index.tsx along with the departures from it.\n\n// The weeks the grid holds room for, which is the most any month occupies: a\n// 31-day month beginning on the last day of a week runs one day, then four\n// whole weeks, then two days. Holding six draws every month in the box the\n// longest one fills, so the calendar keeps its height as the month moves.\nconst WEEKS_HELD = 6\n\n// How far a month slides in from the side it comes from as it arrives,\n// Material Design's shared axis distance.\nconst SLIDE_DISTANCE = 30\n\nconst styles = StyleSheet.create({\n // A column of the grid: a seventh of its width, the date's circle centred\n // in it.\n column: {\n alignItems: 'center',\n flexBasis: 0,\n flexGrow: 1,\n justifyContent: 'center',\n },\n // The chevron that goes back is the forward chevron turned around. It says\n // \"back\" rather than \"to the left\", so it turns with the writing direction\n // as the forward one does, which the glyph's own mirroring and this\n // together give.\n previousGlyph: {\n transform: [{ scaleX: -1 }],\n },\n previousGlyphRightToLeft: {\n transform: [{ scaleX: 1 }],\n },\n // A row of the grid: the weekday row, or a week.\n row: {\n flexDirection: 'row',\n },\n})\n\nconst stylesOf = themedStyles(\n ({ colors, radii, sizing, spacing, stateLayerOpacity }) => {\n // One row of the grid, and the page's 48dp column, seven to a week.\n const row = sizing.controlMd\n // The date's state layer: the 40dp circle a selected date fills, inside\n // the 48dp row and column it sits in.\n const date = sizing.controlSm\n const disabled = withOpacity(\n colors.onSurface,\n stateLayerOpacity.disabledContent,\n )\n\n return StyleSheet.create({\n // The open month or year list's arrow, turned over while its list is\n // open, which says the next press closes it.\n arrowExpanded: {\n transform: [{ rotate: '180deg' }],\n },\n // The chevrons' 48dp column: the icon button's 40dp square with 4dp\n // either side.\n chevron: {\n marginHorizontal: spacing.xs,\n },\n // A chevron's room while a list is open, which the page draws without\n // them: as wide as the chevron, so the month's menu button stays where\n // it was.\n chevronRoom: {\n height: date,\n marginHorizontal: spacing.xs,\n width: date,\n },\n // The date itself: the page's 40dp state layer, which is the circle a\n // selected date fills and the shape a press tints, 4dp clear of the\n // row above and below. Across, the column centres it.\n date: {\n alignItems: 'center',\n borderRadius: radii.circle,\n height: date,\n justifyContent: 'center',\n marginVertical: (row - date) / 2,\n width: date,\n },\n // The date the calendar holds: a filled circle in the primary role.\n dateSelected: {\n backgroundColor: colors.primary,\n },\n // A date's number, in the type the page gives the dates.\n dateText: {\n color: colors.onSurface,\n textAlign: 'center',\n },\n // A date outside `minValue` and `maxValue`, in a month either side of\n // the one shown, or in a disabled calendar: the page's 38% on the\n // content role.\n dateTextDisabled: {\n color: disabled,\n },\n dateTextSelected: {\n color: colors.onPrimary,\n },\n dateTextToday: {\n color: colors.primary,\n },\n // A date ruled out one at a time by `isDateUnavailable`, struck\n // through at full contrast, since a reader can still land on it and\n // has to read it.\n dateTextUnavailable: {\n textDecorationLine: 'line-through',\n },\n // Today, when it is not the date held: the page's 1dp outline in the\n // primary role.\n dateToday: {\n borderColor: colors.primary,\n borderWidth: 1,\n },\n // The room the grid is held at: the weekday row and six weeks.\n grid: {\n height: row * (WEEKS_HELD + 1),\n },\n // The row the chevrons and the month sit in, at the page's 40dp\n // button height.\n header: {\n alignItems: 'center',\n flexDirection: 'row',\n gap: spacing.sm,\n justifyContent: 'space-between',\n minHeight: date,\n },\n // The month's menu button between the chevrons that step it.\n headerGroup: {\n alignItems: 'center',\n flexDirection: 'row',\n },\n // The month and year, between the two chevrons.\n heading: {\n color: colors.onSurfaceVariant,\n flexShrink: 1,\n textAlign: 'center',\n },\n // The open list, in the place the grid was. It takes the grid's\n // height, so opening it moves nothing under the calendar, and scrolls\n // inside it. The negative margin runs its rows to the container's\n // edges, as the page draws them, under the page's outline variant\n // divider.\n list: {\n borderTopColor: colors.outlineVariant,\n borderTopWidth: 1,\n flexGrow: 0,\n height: row * (WEEKS_HELD + 1),\n marginHorizontal: -spacing.md,\n },\n // The check before the entry the calendar shows, at the page's 24dp,\n // and the room it takes on every other row, so every label starts at\n // the same place.\n listCheck: {\n alignItems: 'center',\n height: 24,\n justifyContent: 'center',\n width: 24,\n },\n // An open list's row: the page's 48dp, its label 16dp in from the\n // container's edge with the check's column first.\n listRow: {\n alignItems: 'center',\n flexDirection: 'row',\n gap: spacing.lg,\n height: row,\n paddingHorizontal: spacing.lg,\n },\n // The month or year the calendar shows, on the page's surface variant.\n listRowSelected: {\n backgroundColor: colors.surfaceVariant,\n },\n listText: {\n color: colors.onSurface,\n flexShrink: 1,\n },\n // A month the calendar's bounds leave no day of.\n listTextDisabled: {\n color: disabled,\n },\n // The page's menu button: a 40dp pill holding the month or the year in\n // label large, in on surface variant, with the arrow after it.\n menuButton: {\n alignItems: 'center',\n borderRadius: radii.pill,\n flexDirection: 'row',\n flexShrink: 0,\n gap: spacing.xs,\n height: date,\n paddingHorizontal: spacing.sm,\n },\n menuButtonText: {\n color: colors.onSurfaceVariant,\n },\n // The page's docked container: 360dp on the high surface container, or\n // the width of its container where that is narrower, the columns\n // sharing what is left.\n root: {\n backgroundColor: colors.surfaceContainerHigh,\n borderRadius: radii.lg,\n gap: spacing.md,\n maxWidth: '100%',\n padding: spacing.md,\n width: row * 7 + spacing.md * 2,\n },\n // A row of the grid, the page's 48dp.\n rowHeight: {\n height: row,\n },\n // The weekday row, in the full content role the page gives it.\n weekday: {\n color: colors.onSurface,\n textAlign: 'center',\n },\n })\n },\n)\n\nexport { SLIDE_DISTANCE, styles, stylesOf, WEEKS_HELD }\n"],"mappings":";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AQqC;GACbhD,gBAAgB;GAChBiD,WAAWnC;EACb;EAEAoC,aAAa;GACXrD,YAAY;GACZS,eAAe;EACjB;EAEA6C,SAAS;GACPjB,OAAO1B,OAAO4C;GACdC,YAAY;GACZlB,WAAW;EACb;EAMAmB,MAAM;GACJC,gBAAgB/C,OAAOgD;GACvBC,gBAAgB;GAChB1D,UAAU;GACV0B,QAAQpB,MAAOb;GACf8B,kBAAkB,CAACX,QAAQ+C;EAC7B;EAIAC,WAAW;GACT9D,YAAY;GACZ4B,QAAQ;GACRzB,gBAAgB;GAChB0B,OAAO;EACT;EAGAkC,SAAS;GACP/D,YAAY;GACZS,eAAe;GACfyC,KAAKpC,QAAQkD;GACbpC,QAAQpB;GACRyD,mBAAmBnD,QAAQkD;EAC7B;EAEAE,iBAAiB,EACfhC,iBAAiBvB,OAAOwD,eAC1B;EACAC,UAAU;GACR/B,OAAO1B,OAAOS;GACdoC,YAAY;EACd;EAEAa,kBAAkB,EAChBhC,OAAOlB,SACT;EAGAmD,YAAY;GACVtE,YAAY;GACZ8B,cAAclB,MAAM2D;GACpB9D,eAAe;GACf+C,YAAY;GACZN,KAAKpC,QAAQY;GACbE,QAAQX;GACRgD,mBAAmBnD,QAAQqC;EAC7B;EACAqB,gBAAgB,EACdnC,OAAO1B,OAAO4C,iBAChB;EAIAkB,MAAM;GACJvC,iBAAiBvB,OAAO+D;GACxB5C,cAAclB,MAAMoD;GACpBd,KAAKpC,QAAQ+C;GACbc,UAAU;GACVC,SAAS9D,QAAQ+C;GACjBhC,OAAOrB,MAAM,IAAIM,QAAQ+C,KAAK;EAChC;EAEAgB,WAAW,EACTjD,QAAQpB,IACV;EAEAsE,SAAS;GACPzC,OAAO1B,OAAOS;GACdkB,WAAW;EACb;CACF,CAAC;AACH,CACF"}
|
|
1
|
+
{"version":3,"file":"styles.js","names":["StyleSheet","ResolvedTheme","withOpacity","themedStyles","WEEKS_HELD","SLIDE_DISTANCE","rootWidthOf","sizing","spacing","Pick","across","controlMd","xl","md","styles","create","column","alignItems","flexBasis","flexGrow","justifyContent","previousGlyph","transform","scaleX","previousGlyphRightToLeft","row","flexDirection","stylesOf","colors","radii","stateLayerOpacity","date","controlSm","disabled","onSurface","disabledContent","arrowExpanded","rotate","chevron","marginHorizontal","xs","chevronRoom","height","width","borderRadius","circle","marginVertical","dateInRange","backgroundColor","secondaryContainer","dateRangeEnd","borderBottomEndRadius","borderTopEndRadius","dateRangeStart","borderBottomStartRadius","borderTopStartRadius","dateSelected","primary","dateText","color","textAlign","dateTextDisabled","dateTextInRange","onSecondaryContainer","dateTextSelected","onPrimary","dateTextToday","dateTextUnavailable","textDecorationLine","dateToday","borderColor","borderWidth","grid","header","gap","sm","minHeight","headerGroup","heading","onSurfaceVariant","flexShrink","list","borderTopColor","outlineVariant","borderTopWidth","listCheck","listRow","lg","paddingHorizontal","listRowSelected","surfaceVariant","listText","listTextDisabled","menuButton","pill","menuButtonText","months","monthSideBySide","monthsSideBySide","root","surfaceContainerHigh","maxWidth","padding","rowHeight","weekday"],"sources":["../../src/calendar/styles.ts"],"sourcesContent":["import { StyleSheet } from 'react-native'\n\nimport type { ResolvedTheme } from '../theme/scope'\n\nimport { withOpacity } from '../theme/color'\nimport { themedStyles } from '../theme/styles'\n\n// The values are the date pickers page's docked calendar, as kanso-ui's\n// src/calendar/styles.ts draws it, and named in\n// src/components/calendar/index.tsx along with the departures from it.\n\n// The weeks the grid holds room for, which is the most any month occupies: a\n// 31-day month beginning on the last day of a week runs one day, then four\n// whole weeks, then two days. Holding six draws every month in the box the\n// longest one fills, so the calendar keeps its height as the month moves.\nconst WEEKS_HELD = 6\n\n// How far a month slides in from the side it comes from as it arrives,\n// Material Design's shared axis distance.\nconst SLIDE_DISTANCE = 30\n\n/**\n * The container's width for the months it holds side by side: the page's\n * 360dp for one, which is seven 48dp columns inside its padding, and for more\n * each month's seven columns with the room between them.\n */\nfunction rootWidthOf(\n { sizing, spacing }: Pick<ResolvedTheme, 'sizing' | 'spacing'>,\n across: number,\n) {\n return (\n sizing.controlMd * 7 * across + spacing.xl * (across - 1) + spacing.md * 2\n )\n}\n\nconst styles = StyleSheet.create({\n // A column of the grid: a seventh of its width, the date's circle centred\n // in it.\n column: {\n alignItems: 'center',\n flexBasis: 0,\n flexGrow: 1,\n justifyContent: 'center',\n },\n // The chevron that goes back is the forward chevron turned around. It says\n // \"back\" rather than \"to the left\", so it turns with the writing direction\n // as the forward one does, which the glyph's own mirroring and this\n // together give.\n previousGlyph: {\n transform: [{ scaleX: -1 }],\n },\n previousGlyphRightToLeft: {\n transform: [{ scaleX: 1 }],\n },\n // A row of the grid: the weekday row, or a week.\n row: {\n flexDirection: 'row',\n },\n})\n\nconst stylesOf = themedStyles(\n ({ colors, radii, sizing, spacing, stateLayerOpacity }) => {\n // One row of the grid, and the page's 48dp column, seven to a week.\n const row = sizing.controlMd\n // The date's state layer: the 40dp circle a selected date fills, inside\n // the 48dp row and column it sits in.\n const date = sizing.controlSm\n const disabled = withOpacity(\n colors.onSurface,\n stateLayerOpacity.disabledContent,\n )\n\n return StyleSheet.create({\n // The open month or year list's arrow, turned over while its list is\n // open, which says the next press closes it.\n arrowExpanded: {\n transform: [{ rotate: '180deg' }],\n },\n // The chevrons' 48dp column: the icon button's 40dp square with 4dp\n // either side.\n chevron: {\n marginHorizontal: spacing.xs,\n },\n // A chevron's room while a list is open, which the page draws without\n // them: as wide as the chevron, so the month's menu button stays where\n // it was.\n chevronRoom: {\n height: date,\n marginHorizontal: spacing.xs,\n width: date,\n },\n // The date itself: the page's 40dp state layer, which is the circle a\n // selected date fills and the shape a press tints, 4dp clear of the\n // row above and below. Across, the column centres it.\n date: {\n alignItems: 'center',\n borderRadius: radii.circle,\n height: date,\n justifyContent: 'center',\n marginVertical: (row - date) / 2,\n width: date,\n },\n // The days of a range, in the modal date picker's range-selection\n // tokens, since the docked token set this calendar otherwise follows\n // stops at the selected date: the secondary container, one step down\n // from the primary its two ends take. Square rather than round, and as\n // wide as its column rather than the 40dp circle, so one day's band\n // meets the next one's and a run of days reads as one shape. The two\n // ends round their outer side back, which is what makes the band start\n // and stop at a circle.\n dateInRange: {\n backgroundColor: colors.secondaryContainer,\n borderRadius: 0,\n width: '100%',\n },\n // A range's last day, round on the side the band stops at. Logical\n // corners, so a right-to-left layout turns them to the left.\n dateRangeEnd: {\n borderBottomEndRadius: radii.circle,\n borderTopEndRadius: radii.circle,\n },\n // A range's first day, round on the side the band starts from.\n dateRangeStart: {\n borderBottomStartRadius: radii.circle,\n borderTopStartRadius: radii.circle,\n },\n // The date the calendar holds, or either end of a range: filled in the\n // primary role.\n dateSelected: {\n backgroundColor: colors.primary,\n },\n // A date's number, in the type the page gives the dates.\n dateText: {\n color: colors.onSurface,\n textAlign: 'center',\n },\n // A date outside `minValue` and `maxValue`, in a month either side of\n // the one shown, or in a disabled calendar: the page's 38% on the\n // content role.\n dateTextDisabled: {\n color: disabled,\n },\n // A day between a range's two ends, in the label role the band's\n // container pairs with.\n dateTextInRange: {\n color: colors.onSecondaryContainer,\n },\n dateTextSelected: {\n color: colors.onPrimary,\n },\n dateTextToday: {\n color: colors.primary,\n },\n // A date ruled out one at a time by `isDateUnavailable`, struck\n // through at full contrast, since a reader can still land on it and\n // has to read it.\n dateTextUnavailable: {\n textDecorationLine: 'line-through',\n },\n // Today, when it is not the date held: the page's 1dp outline in the\n // primary role.\n dateToday: {\n borderColor: colors.primary,\n borderWidth: 1,\n },\n // The room a month's grid is held at: the weekday row and six weeks.\n grid: {\n height: row * (WEEKS_HELD + 1),\n },\n // The row the chevrons and the month sit in, at the page's 40dp\n // button height.\n header: {\n alignItems: 'center',\n flexDirection: 'row',\n gap: spacing.sm,\n justifyContent: 'space-between',\n minHeight: date,\n },\n // The month's menu button between the chevrons that step it.\n headerGroup: {\n alignItems: 'center',\n flexDirection: 'row',\n },\n // The month and year, between the two chevrons.\n heading: {\n color: colors.onSurfaceVariant,\n flexShrink: 1,\n textAlign: 'center',\n },\n // The open list, in the place the grid was. It takes the grid's\n // height, so opening it moves nothing under the calendar, and scrolls\n // inside it. The negative margin runs its rows to the container's\n // edges, as the page draws them, under the page's outline variant\n // divider.\n list: {\n borderTopColor: colors.outlineVariant,\n borderTopWidth: 1,\n flexGrow: 0,\n height: row * (WEEKS_HELD + 1),\n marginHorizontal: -spacing.md,\n },\n // The check before the entry the calendar shows, at the page's 24dp,\n // and the room it takes on every other row, so every label starts at\n // the same place.\n listCheck: {\n alignItems: 'center',\n height: 24,\n justifyContent: 'center',\n width: 24,\n },\n // An open list's row: the page's 48dp, its label 16dp in from the\n // container's edge with the check's column first.\n listRow: {\n alignItems: 'center',\n flexDirection: 'row',\n gap: spacing.lg,\n height: row,\n paddingHorizontal: spacing.lg,\n },\n // The month or year the calendar shows, on the page's surface variant.\n listRowSelected: {\n backgroundColor: colors.surfaceVariant,\n },\n listText: {\n color: colors.onSurface,\n flexShrink: 1,\n },\n // A month the calendar's bounds leave no day of.\n listTextDisabled: {\n color: disabled,\n },\n // The page's menu button: a 40dp pill holding the month or the year in\n // label large, in on surface variant, with the arrow after it.\n menuButton: {\n alignItems: 'center',\n borderRadius: radii.pill,\n flexDirection: 'row',\n flexShrink: 0,\n gap: spacing.xs,\n height: date,\n paddingHorizontal: spacing.sm,\n },\n menuButtonText: {\n color: colors.onSurfaceVariant,\n },\n // The months of a calendar showing more than one, one under another,\n // as they sit below the expanded window size: two side by side come to\n // 720dp with the container's padding, wider than a compact window and\n // most of a medium one.\n months: {\n gap: spacing.xl,\n },\n // A month's grid among several, seven 48dp columns wide.\n monthSideBySide: {\n width: row * 7,\n },\n // The same months side by side, from the expanded window size up, as\n // web's sit.\n monthsSideBySide: {\n flexDirection: 'row',\n gap: spacing.xl,\n },\n // The page's docked container: 360dp on the high surface container, or\n // the width of its container where that is narrower, the columns\n // sharing what is left.\n root: {\n backgroundColor: colors.surfaceContainerHigh,\n borderRadius: radii.lg,\n gap: spacing.md,\n maxWidth: '100%',\n padding: spacing.md,\n width: rootWidthOf({ sizing, spacing }, 1),\n },\n // A row of the grid, the page's 48dp.\n rowHeight: {\n height: row,\n },\n // The weekday row, in the full content role the page gives it.\n weekday: {\n color: colors.onSurface,\n textAlign: 'center',\n },\n })\n },\n)\n\nexport { rootWidthOf, SLIDE_DISTANCE, styles, stylesOf, WEEKS_HELD }\n"],"mappings":";;;;;;;;;AA0BA,SAASM,YACP,EAAEC,QAAQC,WACVE,QACA;CACA,OACEH,OAAOI,YAAY,IAAID,SAASF,QAAQI,MAAMF,SAAS,KAAKF,QAAQK,KAAK;AAE7E;AAEA,MAAMC,SAASd,WAAWe,OAAO;CAG/BC,QAAQ;EACNC,YAAY;EACZC,WAAW;EACXC,UAAU;EACVC,gBAAgB;CAClB;CAKAC,eAAe,EACbC,WAAW,CAAC,EAAEC,QAAQ,GAAG,CAAC,EAC5B;CACAC,0BAA0B,EACxBF,WAAW,CAAC,EAAEC,QAAQ,EAAE,CAAC,EAC3B;CAEAE,KAAK,EACHC,eAAe,MACjB;AACF,CAAC;AAED,MAAMC,WAAWxB,cACd,EAAEyB,QAAQC,OAAOtB,QAAQC,SAASsB,wBAAwB;CAEzD,MAAML,MAAMlB,OAAOI;CAGnB,MAAMoB,OAAOxB,OAAOyB;CACpB,MAAMC,WAAW/B,YACf0B,OAAOM,WACPJ,kBAAkBK,eACpB;CAEA,OAAOnC,WAAWe,OAAO;EAGvBqB,eAAe,EACbd,WAAW,CAAC,EAAEe,QAAQ,SAAS,CAAC,EAClC;EAGAC,SAAS,EACPC,kBAAkB/B,QAAQgC,GAC5B;EAIAC,aAAa;GACXC,QAAQX;GACRQ,kBAAkB/B,QAAQgC;GAC1BG,OAAOZ;EACT;EAIAA,MAAM;GACJd,YAAY;GACZ2B,cAAcf,MAAMgB;GACpBH,QAAQX;GACRX,gBAAgB;GAChB0B,iBAAiBrB,MAAMM,QAAQ;GAC/BY,OAAOZ;EACT;EASAgB,aAAa;GACXC,iBAAiBpB,OAAOqB;GACxBL,cAAc;GACdD,OAAO;EACT;EAGAO,cAAc;GACZC,uB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E,YAAY;GACZ2B,cAAcf,MAAMiE;GACpBpE,eAAe;GACfsD,YAAY;GACZN,KAAKlE,QAAQgC;GACbE,QAAQX;GACRyD,mBAAmBhF,QAAQmE;EAC7B;EACAoB,gBAAgB,EACdpC,OAAO/B,OAAOmD,iBAChB;EAKAiB,QAAQ,EACNtB,KAAKlE,QAAQI,GACf;EAEAqF,iBAAiB,EACftD,OAAOlB,MAAM,EACf;EAGAyE,kBAAkB;GAChBxE,eAAe;GACfgD,KAAKlE,QAAQI;EACf;EAIAuF,MAAM;GACJnD,iBAAiBpB,OAAOwE;GACxBxD,cAAcf,MAAM0D;GACpBb,KAAKlE,QAAQK;GACbwF,UAAU;GACVC,SAAS9F,QAAQK;GACjB8B,OAAOrC,YAAY;IAAEC;IAAQC;GAAQ,GAAG,CAAC;EAC3C;EAEA+F,WAAW,EACT7D,QAAQjB,IACV;EAEA+E,SAAS;GACP7C,OAAO/B,OAAOM;GACd0B,WAAW;EACb;CACF,CAAC;AACH,CACF"}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/** The page's small item: 40dp at the least and 56dp at the most. */
|
|
2
|
+
const SMALL_MAX = 56;
|
|
3
|
+
const SMALL_MIN = 40;
|
|
4
|
+
/**
|
|
5
|
+
* The sizes a layout draws its items at in a content box `room` wide, for
|
|
6
|
+
* `count` items and a preferred large width of `itemSize`.
|
|
7
|
+
*/
|
|
8
|
+
function arrange(layout, room, itemSize, count) {
|
|
9
|
+
if (layout === "uncontained") return {
|
|
10
|
+
large: Math.min(itemSize, room),
|
|
11
|
+
largeCount: 0,
|
|
12
|
+
medium: 0,
|
|
13
|
+
small: 0,
|
|
14
|
+
steps: 0
|
|
15
|
+
};
|
|
16
|
+
const small = room >= 184 ? SMALL_MAX : SMALL_MIN;
|
|
17
|
+
if (layout === "hero") return withSteps({
|
|
18
|
+
large: Math.max(room - 8 - small, small),
|
|
19
|
+
largeCount: 1,
|
|
20
|
+
medium: 0,
|
|
21
|
+
small
|
|
22
|
+
}, count);
|
|
23
|
+
const fit = Math.floor((room - small - 8) / (itemSize + 8));
|
|
24
|
+
const most = Math.max(1, Math.min(fit, count - 2));
|
|
25
|
+
for (let largeCount = most; largeCount >= 1; largeCount--) {
|
|
26
|
+
const gaps = (largeCount + 1) * 8;
|
|
27
|
+
const medium = room - largeCount * itemSize - gaps - small;
|
|
28
|
+
if (medium >= small && medium <= itemSize) return withSteps({
|
|
29
|
+
large: itemSize,
|
|
30
|
+
largeCount,
|
|
31
|
+
medium,
|
|
32
|
+
small
|
|
33
|
+
}, count);
|
|
34
|
+
const large = (room - gaps - 1.5 * small) / (largeCount + .5);
|
|
35
|
+
if (large >= small) return withSteps({
|
|
36
|
+
large,
|
|
37
|
+
largeCount,
|
|
38
|
+
medium: (large + small) / 2,
|
|
39
|
+
small
|
|
40
|
+
}, count);
|
|
41
|
+
}
|
|
42
|
+
return arrange("hero", room, itemSize, count);
|
|
43
|
+
}
|
|
44
|
+
function filledOf(sizes, count) {
|
|
45
|
+
return Math.min(count, sizes.largeCount + trailingOf(sizes).length);
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Where every item is drawn with the carousel `position` rests along: a
|
|
49
|
+
* whole number at a rest, and the fraction between two while it moves.
|
|
50
|
+
* `room` is the content box's width and `padding` the space on each side of
|
|
51
|
+
* it, which an item past the edge is drawn beyond.
|
|
52
|
+
*/
|
|
53
|
+
function placements(layout, arrangement, room, padding, count, position) {
|
|
54
|
+
if (layout === "uncontained") return Array.from({ length: count }, (_, index) => ({
|
|
55
|
+
left: index * (arrangement.large + 8),
|
|
56
|
+
width: arrangement.large
|
|
57
|
+
}));
|
|
58
|
+
const clamped = Math.min(Math.max(position, 0), arrangement.steps);
|
|
59
|
+
const from = Math.floor(clamped);
|
|
60
|
+
const to = Math.min(from + 1, arrangement.steps);
|
|
61
|
+
const fraction = clamped - from;
|
|
62
|
+
const start = rest(arrangement, room, padding, count, from);
|
|
63
|
+
const end = rest(arrangement, room, padding, count, to);
|
|
64
|
+
return start.map((placement, index) => {
|
|
65
|
+
const next = end[index] ?? placement;
|
|
66
|
+
return {
|
|
67
|
+
left: placement.left + (next.left - placement.left) * fraction,
|
|
68
|
+
width: placement.width + (next.width - placement.width) * fraction
|
|
69
|
+
};
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
function rest(arrangement, room, padding, count, step) {
|
|
73
|
+
const { large, largeCount, small } = arrangement;
|
|
74
|
+
const filled = filledOf(arrangement, count);
|
|
75
|
+
const trailing = trailingOf(arrangement).slice(0, filled - largeCount);
|
|
76
|
+
const last = count - filled;
|
|
77
|
+
const turned = Math.max(0, step - last);
|
|
78
|
+
const kept = trailing.length - turned;
|
|
79
|
+
const sizes = [
|
|
80
|
+
...Array.from({ length: turned }, (_, slot) => trailing[trailing.length - 1 - slot] ?? small),
|
|
81
|
+
...Array.from({ length: Math.min(largeCount, filled) }, () => large),
|
|
82
|
+
...trailing.slice(0, kept)
|
|
83
|
+
];
|
|
84
|
+
const first = Math.min(step, last);
|
|
85
|
+
const lefts = [];
|
|
86
|
+
let cursor = 0;
|
|
87
|
+
for (const size of sizes) {
|
|
88
|
+
lefts.push(cursor);
|
|
89
|
+
cursor += size + 8;
|
|
90
|
+
}
|
|
91
|
+
const shift = turned > 0 ? room - (cursor - 8) : 0;
|
|
92
|
+
const away = small > 0 ? small : large;
|
|
93
|
+
return Array.from({ length: count }, (_, index) => {
|
|
94
|
+
const slot = index - first;
|
|
95
|
+
if (slot < 0) return {
|
|
96
|
+
left: -padding + slot * (away + 8),
|
|
97
|
+
width: away
|
|
98
|
+
};
|
|
99
|
+
if (slot >= sizes.length) return {
|
|
100
|
+
left: room + padding + 8 + (slot - sizes.length) * (away + 8),
|
|
101
|
+
width: away
|
|
102
|
+
};
|
|
103
|
+
return {
|
|
104
|
+
left: (lefts[slot] ?? 0) + shift,
|
|
105
|
+
width: sizes[slot] ?? away
|
|
106
|
+
};
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
function trailingOf({ medium, small }) {
|
|
110
|
+
return [medium, small].filter((size) => size > 0);
|
|
111
|
+
}
|
|
112
|
+
function withSteps(sizes, count) {
|
|
113
|
+
const filled = filledOf(sizes, count);
|
|
114
|
+
const turning = Math.max(0, filled - sizes.largeCount);
|
|
115
|
+
return {
|
|
116
|
+
...sizes,
|
|
117
|
+
steps: count - filled + turning
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
//#endregion
|
|
121
|
+
export { arrange, placements };
|
|
122
|
+
|
|
123
|
+
//# sourceMappingURL=arrangement.js.map
|