@kanso-labs/react-native-kanso-ui 0.6.0 → 0.7.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/dist/calendar/index.js +1182 -0
- package/dist/calendar/index.js.map +1 -0
- package/dist/calendar/styles.js +120 -0
- package/dist/calendar/styles.js.map +1 -0
- package/dist/components/calendar/index.d.ts +51 -0
- package/dist/components/calendar/index.js +82 -0
- package/dist/components/calendar/index.js.map +1 -0
- package/dist/components/menu/index.js +1 -1
- package/dist/components/navigation-bar/index.d.ts +3 -9
- package/dist/components/navigation-bar/index.js +10 -34
- package/dist/components/navigation-bar/index.js.map +1 -1
- package/dist/components/navigation-rail/index.d.ts +68 -0
- package/dist/components/navigation-rail/index.js +294 -0
- package/dist/components/navigation-rail/index.js.map +1 -0
- package/dist/components/popover/index.js +1 -1
- package/dist/glyphs/index.js +19 -1
- package/dist/glyphs/index.js.map +1 -1
- package/dist/i18n/messages.js +374 -0
- package/dist/i18n/messages.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +4 -2
- package/dist/navigation/index.d.ts +8 -1
- package/dist/navigation/index.js +113 -64
- package/dist/navigation/index.js.map +1 -1
- package/dist/navigation/styles.js +22 -0
- package/dist/navigation/styles.js.map +1 -1
- package/package.json +3 -2
|
@@ -0,0 +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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AK1R,WAAWwC,MAAMkP,IAAI,GAChDlP,OAAOA,KAAKuO,IAAI,EAAES,OAAO,EAAE,CAAC,GAC5B;EACA,MAAM9J,QAAQlF,KAAKqM,QAAQ6C,IAAI,IAAI,IAAIA,OAAOlP;EAE9C,IAAIxC,WAAW0H,OAAOvC,WAAW,GAC/BsC,QAAQ8E,QAAQhB;EAElBgB,QAAQqF,KAAK;GACXpP,MAAMkF;GACNjF,WAAW0L,UAAUnE,OAAOtC,MAAMuC,OAAO3B,QAAQ,CAAC;GAClD5F,IAAI6J,QAAQhB;EACd,CAAC;CACH;CAEA,OAAO;EAAEgB;EAAS9E;CAAM;AAC1B;AAEA,MAAM6J,uBAA4B,IAAI3C,IAAI"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { themedStyles } from "../theme/styles.js";
|
|
2
|
+
import { withOpacity } from "../theme/color.js";
|
|
3
|
+
import { StyleSheet } from "react-native";
|
|
4
|
+
//#region src/calendar/styles.ts
|
|
5
|
+
const styles = StyleSheet.create({
|
|
6
|
+
column: {
|
|
7
|
+
alignItems: "center",
|
|
8
|
+
flexBasis: 0,
|
|
9
|
+
flexGrow: 1,
|
|
10
|
+
justifyContent: "center"
|
|
11
|
+
},
|
|
12
|
+
previousGlyph: { transform: [{ scaleX: -1 }] },
|
|
13
|
+
previousGlyphRightToLeft: { transform: [{ scaleX: 1 }] },
|
|
14
|
+
row: { flexDirection: "row" }
|
|
15
|
+
});
|
|
16
|
+
const stylesOf = themedStyles(({ colors, radii, sizing, spacing, stateLayerOpacity }) => {
|
|
17
|
+
const row = sizing.controlMd;
|
|
18
|
+
const date = sizing.controlSm;
|
|
19
|
+
const disabled = withOpacity(colors.onSurface, stateLayerOpacity.disabledContent);
|
|
20
|
+
return StyleSheet.create({
|
|
21
|
+
arrowExpanded: { transform: [{ rotate: "180deg" }] },
|
|
22
|
+
chevron: { marginHorizontal: spacing.xs },
|
|
23
|
+
chevronRoom: {
|
|
24
|
+
height: date,
|
|
25
|
+
marginHorizontal: spacing.xs,
|
|
26
|
+
width: date
|
|
27
|
+
},
|
|
28
|
+
date: {
|
|
29
|
+
alignItems: "center",
|
|
30
|
+
borderRadius: radii.circle,
|
|
31
|
+
height: date,
|
|
32
|
+
justifyContent: "center",
|
|
33
|
+
marginVertical: (row - date) / 2,
|
|
34
|
+
width: date
|
|
35
|
+
},
|
|
36
|
+
dateSelected: { backgroundColor: colors.primary },
|
|
37
|
+
dateText: {
|
|
38
|
+
color: colors.onSurface,
|
|
39
|
+
textAlign: "center"
|
|
40
|
+
},
|
|
41
|
+
dateTextDisabled: { color: disabled },
|
|
42
|
+
dateTextSelected: { color: colors.onPrimary },
|
|
43
|
+
dateTextToday: { color: colors.primary },
|
|
44
|
+
dateTextUnavailable: { textDecorationLine: "line-through" },
|
|
45
|
+
dateToday: {
|
|
46
|
+
borderColor: colors.primary,
|
|
47
|
+
borderWidth: 1
|
|
48
|
+
},
|
|
49
|
+
grid: { height: row * 7 },
|
|
50
|
+
header: {
|
|
51
|
+
alignItems: "center",
|
|
52
|
+
flexDirection: "row",
|
|
53
|
+
gap: spacing.sm,
|
|
54
|
+
justifyContent: "space-between",
|
|
55
|
+
minHeight: date
|
|
56
|
+
},
|
|
57
|
+
headerGroup: {
|
|
58
|
+
alignItems: "center",
|
|
59
|
+
flexDirection: "row"
|
|
60
|
+
},
|
|
61
|
+
heading: {
|
|
62
|
+
color: colors.onSurfaceVariant,
|
|
63
|
+
flexShrink: 1,
|
|
64
|
+
textAlign: "center"
|
|
65
|
+
},
|
|
66
|
+
list: {
|
|
67
|
+
borderTopColor: colors.outlineVariant,
|
|
68
|
+
borderTopWidth: 1,
|
|
69
|
+
flexGrow: 0,
|
|
70
|
+
height: row * 7,
|
|
71
|
+
marginHorizontal: -spacing.md
|
|
72
|
+
},
|
|
73
|
+
listCheck: {
|
|
74
|
+
alignItems: "center",
|
|
75
|
+
height: 24,
|
|
76
|
+
justifyContent: "center",
|
|
77
|
+
width: 24
|
|
78
|
+
},
|
|
79
|
+
listRow: {
|
|
80
|
+
alignItems: "center",
|
|
81
|
+
flexDirection: "row",
|
|
82
|
+
gap: spacing.lg,
|
|
83
|
+
height: row,
|
|
84
|
+
paddingHorizontal: spacing.lg
|
|
85
|
+
},
|
|
86
|
+
listRowSelected: { backgroundColor: colors.surfaceVariant },
|
|
87
|
+
listText: {
|
|
88
|
+
color: colors.onSurface,
|
|
89
|
+
flexShrink: 1
|
|
90
|
+
},
|
|
91
|
+
listTextDisabled: { color: disabled },
|
|
92
|
+
menuButton: {
|
|
93
|
+
alignItems: "center",
|
|
94
|
+
borderRadius: radii.pill,
|
|
95
|
+
flexDirection: "row",
|
|
96
|
+
flexShrink: 0,
|
|
97
|
+
gap: spacing.xs,
|
|
98
|
+
height: date,
|
|
99
|
+
paddingHorizontal: spacing.sm
|
|
100
|
+
},
|
|
101
|
+
menuButtonText: { color: colors.onSurfaceVariant },
|
|
102
|
+
root: {
|
|
103
|
+
backgroundColor: colors.surfaceContainerHigh,
|
|
104
|
+
borderRadius: radii.lg,
|
|
105
|
+
gap: spacing.md,
|
|
106
|
+
maxWidth: "100%",
|
|
107
|
+
padding: spacing.md,
|
|
108
|
+
width: row * 7 + spacing.md * 2
|
|
109
|
+
},
|
|
110
|
+
rowHeight: { height: row },
|
|
111
|
+
weekday: {
|
|
112
|
+
color: colors.onSurface,
|
|
113
|
+
textAlign: "center"
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
});
|
|
117
|
+
//#endregion
|
|
118
|
+
export { styles, stylesOf };
|
|
119
|
+
|
|
120
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +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":";;;;AAmBA,MAAMK,SAASL,WAAWM,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,WAAWhB,cACd,EAAEiB,QAAQC,OAAOC,QAAQC,SAASC,wBAAwB;CAEzD,MAAMP,MAAMK,OAAOG;CAGnB,MAAMC,OAAOJ,OAAOK;CACpB,MAAMC,WAAW1B,YACfkB,OAAOS,WACPL,kBAAkBM,eACpB;CAEA,OAAO7B,WAAWM,OAAO;EAGvBwB,eAAe,EACbjB,WAAW,CAAC,EAAEkB,QAAQ,SAAS,CAAC,EAClC;EAGAC,SAAS,EACPC,kBAAkBX,QAAQY,GAC5B;EAIAC,aAAa;GACXC,QAAQX;GACRQ,kBAAkBX,QAAQY;GAC1BG,OAAOZ;EACT;EAIAA,MAAM;GACJjB,YAAY;GACZ8B,cAAclB,MAAMmB;GACpBH,QAAQX;GACRd,gBAAgB;GAChB6B,iBAAiBxB,MAAMS,QAAQ;GAC/BY,OAAOZ;EACT;EAEAgB,cAAc,EACZC,iBAAiBvB,OAAOwB,QAC1B;EAEAC,UAAU;GACRC,OAAO1B,OAAOS;GACdkB,WAAW;EACb;EAIAC,kBAAkB,EAChBF,OAAOlB,SACT;EACAqB,kBAAkB,EAChBH,OAAO1B,OAAO8B,UAChB;EACAC,eAAe,EACbL,OAAO1B,OAAOwB,QAChB;EAIAQ,qBAAqB,EACnBC,oBAAoB,eACtB;EAGAC,WAAW;GACTC,aAAanC,OAAOwB;GACpBY,aAAa;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@
|
|
|
1
|
+
import { StyleProp, View, ViewStyle } from "react-native";
|
|
2
|
+
import { ComponentRef, Ref } from "react";
|
|
3
|
+
import { CalendarProps, DateValue } from "react-stately/useCalendarState";
|
|
4
|
+
//#region src/components/calendar/index.d.ts
|
|
5
|
+
type CalendarProps$1<T extends DateValue = DateValue> = Pick<CalendarProps<T>, 'defaultFocusedValue' | 'defaultValue' | 'firstDayOfWeek' | 'focusedValue' | 'isDateUnavailable' | 'isDisabled' | 'isReadOnly' | 'maxValue' | 'minValue' | 'onChange' | 'onFocusChange' | 'value'> & {
|
|
6
|
+
/**
|
|
7
|
+
* The calendar's name. The month shown is added to it, as React Aria adds
|
|
8
|
+
* it on web.
|
|
9
|
+
*/
|
|
10
|
+
readonly 'aria-label'?: string;
|
|
11
|
+
/**
|
|
12
|
+
* The BCP 47 locale the calendar is written in: its month and weekday
|
|
13
|
+
* names, its digits, its first day of the week and its calendar system.
|
|
14
|
+
* Defaults to the device's.
|
|
15
|
+
*/
|
|
16
|
+
readonly locale?: string;
|
|
17
|
+
readonly ref?: Ref<ComponentRef<typeof View>>;
|
|
18
|
+
/**
|
|
19
|
+
* Whether the header draws the month and the year as menu buttons, each
|
|
20
|
+
* opening a list of them in the grid's place, as the docked date picker's
|
|
21
|
+
* header does, rather than one heading between the chevrons. For a date
|
|
22
|
+
* far from the one shown, such as a date of birth: the year list runs a
|
|
23
|
+
* century either side of the year shown, or to `minValue` and `maxValue`
|
|
24
|
+
* where they are closer.
|
|
25
|
+
* @default false
|
|
26
|
+
*/
|
|
27
|
+
readonly showMonthYearMenus?: boolean;
|
|
28
|
+
readonly style?: StyleProp<ViewStyle>;
|
|
29
|
+
readonly testID?: string;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* A month calendar for picking a date. The value is an
|
|
33
|
+
* `@internationalized/date` value, as on web: pass `value` with `onChange` to
|
|
34
|
+
* control it, or `defaultValue` to let it keep its own.
|
|
35
|
+
*
|
|
36
|
+
* ```tsx
|
|
37
|
+
* import { getLocalTimeZone, today } from '@internationalized/date'
|
|
38
|
+
*
|
|
39
|
+
* <Calendar aria-label="Label" defaultValue={today(getLocalTimeZone())} />
|
|
40
|
+
* ```
|
|
41
|
+
*
|
|
42
|
+
* `minValue` and `maxValue` bound it, and `isDateUnavailable` rules
|
|
43
|
+
* individual dates out. Name it with `aria-label`; the month shown is added
|
|
44
|
+
* to the name.
|
|
45
|
+
*
|
|
46
|
+
* `style`, `ref` and `testID` land on the container.
|
|
47
|
+
*/
|
|
48
|
+
declare function Calendar<T extends DateValue = DateValue>({ 'aria-label': ariaLabel, locale, ref, showMonthYearMenus, style, testID, ...props }: CalendarProps$1<T>): import("react").JSX.Element;
|
|
49
|
+
//#endregion
|
|
50
|
+
export { Calendar, type CalendarProps$1 as CalendarProps };
|
|
51
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { useTheme } from "../../theme/scope.js";
|
|
2
|
+
import { composeStyles } from "../../theme/styles.js";
|
|
3
|
+
import { localeOf } from "../../number/locale.js";
|
|
4
|
+
import { stylesOf } from "../../calendar/styles.js";
|
|
5
|
+
import { CalendarFrame, visibleMonthOf } from "../../calendar/index.js";
|
|
6
|
+
import { c } from "react/compiler-runtime";
|
|
7
|
+
import { View } from "react-native";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
import { createCalendar } from "@internationalized/date";
|
|
10
|
+
import { useCalendarState } from "react-stately/useCalendarState";
|
|
11
|
+
//#region src/components/calendar/index.tsx
|
|
12
|
+
/**
|
|
13
|
+
* A month calendar for picking a date. The value is an
|
|
14
|
+
* `@internationalized/date` value, as on web: pass `value` with `onChange` to
|
|
15
|
+
* control it, or `defaultValue` to let it keep its own.
|
|
16
|
+
*
|
|
17
|
+
* ```tsx
|
|
18
|
+
* import { getLocalTimeZone, today } from '@internationalized/date'
|
|
19
|
+
*
|
|
20
|
+
* <Calendar aria-label="Label" defaultValue={today(getLocalTimeZone())} />
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* `minValue` and `maxValue` bound it, and `isDateUnavailable` rules
|
|
24
|
+
* individual dates out. Name it with `aria-label`; the month shown is added
|
|
25
|
+
* to the name.
|
|
26
|
+
*
|
|
27
|
+
* `style`, `ref` and `testID` land on the container.
|
|
28
|
+
*/
|
|
29
|
+
function Calendar(t0) {
|
|
30
|
+
const $ = c(12);
|
|
31
|
+
const { "aria-label": ariaLabel, locale, ref, showMonthYearMenus: t1, style, testID, ...props } = t0;
|
|
32
|
+
const showMonthYearMenus = t1 === void 0 ? false : t1;
|
|
33
|
+
const writtenIn = localeOf(locale);
|
|
34
|
+
const own = stylesOf(useTheme());
|
|
35
|
+
const state = useCalendarState({
|
|
36
|
+
...props,
|
|
37
|
+
createCalendar,
|
|
38
|
+
locale: writtenIn
|
|
39
|
+
});
|
|
40
|
+
const month = visibleMonthOf(state, writtenIn);
|
|
41
|
+
const T0 = View;
|
|
42
|
+
const t2 = ariaLabel === void 0 ? month : `${ariaLabel}, ${month}`;
|
|
43
|
+
const t3 = "group";
|
|
44
|
+
const t4 = composeStyles(own.root, style);
|
|
45
|
+
let t5;
|
|
46
|
+
if ($[0] !== props.firstDayOfWeek || $[1] !== showMonthYearMenus || $[2] !== state || $[3] !== writtenIn) {
|
|
47
|
+
t5 = /* @__PURE__ */ jsx(CalendarFrame, {
|
|
48
|
+
firstDayOfWeek: props.firstDayOfWeek,
|
|
49
|
+
locale: writtenIn,
|
|
50
|
+
showMonthYearMenus,
|
|
51
|
+
state
|
|
52
|
+
});
|
|
53
|
+
$[0] = props.firstDayOfWeek;
|
|
54
|
+
$[1] = showMonthYearMenus;
|
|
55
|
+
$[2] = state;
|
|
56
|
+
$[3] = writtenIn;
|
|
57
|
+
$[4] = t5;
|
|
58
|
+
} else t5 = $[4];
|
|
59
|
+
let t6;
|
|
60
|
+
if ($[5] !== T0 || $[6] !== ref || $[7] !== t2 || $[8] !== t4 || $[9] !== t5 || $[10] !== testID) {
|
|
61
|
+
t6 = /* @__PURE__ */ jsx(T0, {
|
|
62
|
+
"aria-label": t2,
|
|
63
|
+
ref,
|
|
64
|
+
role: t3,
|
|
65
|
+
style: t4,
|
|
66
|
+
testID,
|
|
67
|
+
children: t5
|
|
68
|
+
});
|
|
69
|
+
$[5] = T0;
|
|
70
|
+
$[6] = ref;
|
|
71
|
+
$[7] = t2;
|
|
72
|
+
$[8] = t4;
|
|
73
|
+
$[9] = t5;
|
|
74
|
+
$[10] = testID;
|
|
75
|
+
$[11] = t6;
|
|
76
|
+
} else t6 = $[11];
|
|
77
|
+
return t6;
|
|
78
|
+
}
|
|
79
|
+
//#endregion
|
|
80
|
+
export { Calendar };
|
|
81
|
+
|
|
82
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["ComponentRef","Ref","StyleProp","ViewStyle","DateValue","CalendarProps","StatelyCalendarProps","createCalendar","View","useCalendarState","CalendarFrame","visibleMonthOf","stylesOf","localeOf","useTheme","composeStyles","Pick","T","locale","ref","showMonthYearMenus","style","testID","Calendar","t0","$","_c","ariaLabel","t1","props","undefined","writtenIn","own","state","month","T0","t2","t3","t4","root","t5","firstDayOfWeek","t6","_c"],"sources":["../../../src/components/calendar/index.tsx"],"sourcesContent":["import type { ComponentRef, Ref } from 'react'\nimport type { StyleProp, ViewStyle } from 'react-native'\nimport type {\n DateValue,\n CalendarProps as StatelyCalendarProps,\n} from 'react-stately/useCalendarState'\n\nimport { createCalendar } from '@internationalized/date'\nimport { View } from 'react-native'\nimport { useCalendarState } from 'react-stately/useCalendarState'\n\nimport { CalendarFrame, visibleMonthOf } from '../../calendar'\nimport { stylesOf } from '../../calendar/styles'\nimport { localeOf } from '../../number/locale'\nimport { useTheme } from '../../theme/scope'\nimport { composeStyles } from '../../theme/styles'\n\n// kanso-ui's Calendar, the date pickers page's docked calendar: a month grid\n// with a circle on the selected date and an outline on today. Its values are\n// that page's: a 360dp container on the high surface container, 48dp date\n// cells with a 40dp state layer inside them, body large for both the weekday\n// row and the dates, and primary for the selected circle and for today's\n// outline. The parts are in src/calendar.\n//\n// The state is React Stately's `useCalendarState`, which web's React Aria\n// calendar is built on, over `@internationalized/date`, so the selection,\n// the bounds and the locale's calendar, first day of the week and digits\n// behave as they do on web.\n//\n// The page's container is 456dp tall, which this does not take: that height\n// is a picker's, counting a headline and an action row the calendar itself\n// does not draw. What is held instead is the grid, at six weeks, the most any\n// month occupies, so the calendar keeps its height as the month moves and a\n// shorter month leaves its last rows empty.\n//\n// `showMonthYearMenus` draws the page's docked header instead of one heading:\n// the month's menu button between the chevrons that step it and the year's\n// after them, each opening its list where the grid was, as web's does. The\n// page draws the lists there, and a calendar inside a picker is already in\n// a panel, so a menu over it would be a panel over a panel.\n//\n// Five things are this component's own, as on web.\n//\n// **The year menu has no chevrons of its own.** The page draws a pair either\n// side of it that step a year; the year list reaches any year within a\n// century of the one shown in one press, or any the bounds allow where they\n// are closer.\n//\n// **The cell is a circle in a square.** The page gives the date a 48dp\n// container and a 40dp state layer, which is a 40dp circle with 4dp of room\n// around it. The circle is the pressable, centred in a 48dp column and a 48dp\n// row, and its `hitSlop` reaches the 4dp past it on every side, so the whole\n// square takes the press. The chevrons and the menu buttons reach a 48dp\n// target the same way.\n//\n// **It narrows to its container.** The page's docked calendar is 360dp, and\n// a compact window leaves 328dp between its margins, so the calendar is 360\n// at most and the columns share whatever is left below that.\n//\n// **A date from the month either side is faded because it is disabled**, as\n// React Aria disables those dates: the page's 38% either way. A date\n// `isDateUnavailable` rules out is struck through at full contrast instead,\n// since a reader can still land on it and has to read it.\n//\n// **Today reads as today whether or not it is selected.** The page gives it\n// an outline and the primary label; selected gives it a filled circle and\n// the on-primary label. A selected today takes the fill.\n//\n// Web's month changes at once. Here **the weeks slide in** from the side the\n// new month comes from, Material Design's shared axis transition, and change\n// at once under reduced motion.\n//\n// **The locale is a prop**, defaulting to the device's, where web reads it\n// from React Aria's `I18nProvider`. The words the calendar writes, its\n// chevrons' names and its dates', are React Aria's in that locale.\n\ntype CalendarProps<T extends DateValue = DateValue> = Pick<\n StatelyCalendarProps<T>,\n | 'defaultFocusedValue'\n | 'defaultValue'\n | 'firstDayOfWeek'\n | 'focusedValue'\n | 'isDateUnavailable'\n | 'isDisabled'\n | 'isReadOnly'\n | 'maxValue'\n | 'minValue'\n | 'onChange'\n | 'onFocusChange'\n | 'value'\n> & {\n /**\n * The calendar's name. The month shown is added to it, as React Aria adds\n * it on web.\n */\n readonly 'aria-label'?: string\n /**\n * The BCP 47 locale the calendar is written in: its month and weekday\n * names, its digits, its first day of the week and its calendar system.\n * Defaults to the device's.\n */\n readonly locale?: string\n readonly ref?: Ref<ComponentRef<typeof View>>\n /**\n * Whether the header draws the month and the year as menu buttons, each\n * opening a list of them in the grid's place, as the docked date picker's\n * header does, rather than one heading between the chevrons. For a date\n * far from the one shown, such as a date of birth: the year list runs a\n * century either side of the year shown, or to `minValue` and `maxValue`\n * where they are closer.\n * @default false\n */\n readonly showMonthYearMenus?: boolean\n readonly style?: StyleProp<ViewStyle>\n readonly testID?: string\n}\n\n/**\n * A month calendar for picking a date. The value is an\n * `@internationalized/date` value, as on web: pass `value` with `onChange` to\n * control it, or `defaultValue` to let it keep its own.\n *\n * ```tsx\n * import { getLocalTimeZone, today } from '@internationalized/date'\n *\n * <Calendar aria-label=\"Label\" defaultValue={today(getLocalTimeZone())} />\n * ```\n *\n * `minValue` and `maxValue` bound it, and `isDateUnavailable` rules\n * individual dates out. Name it with `aria-label`; the month shown is added\n * to the name.\n *\n * `style`, `ref` and `testID` land on the container.\n */\nfunction Calendar<T extends DateValue = DateValue>({\n 'aria-label': ariaLabel,\n locale,\n ref,\n showMonthYearMenus = false,\n style,\n testID,\n ...props\n}: CalendarProps<T>) {\n const writtenIn = localeOf(locale)\n const own = stylesOf(useTheme())\n const state = useCalendarState<T>({\n ...props,\n createCalendar,\n locale: writtenIn,\n })\n const month = visibleMonthOf(state, writtenIn)\n\n return (\n <View\n aria-label={ariaLabel === undefined ? month : `${ariaLabel}, ${month}`}\n ref={ref}\n role=\"group\"\n style={composeStyles<ViewStyle>(own.root, style)}\n testID={testID}\n >\n <CalendarFrame\n firstDayOfWeek={props.firstDayOfWeek}\n locale={writtenIn}\n showMonthYearMenus={showMonthYearMenus}\n state={state}\n />\n </View>\n )\n}\n\nexport type { CalendarProps }\n\nexport { Calendar }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsIA,SAAAuB,SAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAmD,MAAA,EAAA,cAAAC,WAAAT,QAAAC,KAAAC,oBAAAQ,IAAAP,OAAAC,QAAA,GAAAO,UAAAL;CAIjD,MAAAJ,qBAAAQ,OAAAE,KAAAA,IAAA,QAAAF;CAKA,MAAAG,YAAkBlB,SAASK,MAAM;CACjC,MAAAc,MAAYpB,SAASE,SAAS,CAAC;CAC/B,MAAAmB,QAAcxB,iBAAoB;EAAA,GAC7BoB;EAAKtB;EAAAW,QAEAa;CACV,CAAC;CACD,MAAAG,QAAcvB,eAAesB,OAAOF,SAAS;CAG1C,MAAAI,KAAA3B;CACa,MAAA4B,KAAAT,cAAcG,KAAAA,IAAdI,QAAA,GAAqCP,UAAS,IAAKO;CAE1D,MAAAG,KAAA;CACE,MAAAC,KAAAvB,cAAyBiB,IAAGO,MAAOlB,KAAK;CAAC,IAAAmB;CAAA,IAAAf,EAAA,OAAAI,MAAAY,kBAAAhB,EAAA,OAAAL,sBAAAK,EAAA,OAAAQ,SAAAR,EAAA,OAAAM,WAAA;EAGhDS,KAAA,oBAAC,eAAD;GACkB,gBAAAX,MAAKY;GACbV,QAAAA;GACYX;GACba;EAAK,CAAA;EACZR,EAAA,KAAAI,MAAAY;EAAAhB,EAAA,KAAAL;EAAAK,EAAA,KAAAQ;EAAAR,EAAA,KAAAM;EAAAN,EAAA,KAAAe;CAAA,OAAAA,KAAAf,EAAA;CAAA,IAAAiB;CAAA,IAAAjB,EAAA,OAAAU,MAAAV,EAAA,OAAAN,OAAAM,EAAA,OAAAW,MAAAX,EAAA,OAAAa,MAAAb,EAAA,OAAAe,MAAAf,EAAA,QAAAH,QAAA;EAZJoB,KAAA,oBAAC,IAAD;GACc,cAAAN;GACPjB;GACA,MAAAkB;GACE,OAAAC;GACChB;GAERkB,UAAAA;EAPG,CAAA;EAaEf,EAAA,KAAAU;EAAAV,EAAA,KAAAN;EAAAM,EAAA,KAAAW;EAAAX,EAAA,KAAAa;EAAAb,EAAA,KAAAe;EAAAf,EAAA,MAAAH;EAAAG,EAAA,MAAAiB;CAAA,OAAAA,KAAAjB,EAAA;CAAA,OAbPiB;AAaO"}
|
|
@@ -10,9 +10,9 @@ import { useOpenLink } from "../../router/index.js";
|
|
|
10
10
|
import { ButtonSlotContext } from "../../button/slots.js";
|
|
11
11
|
import { ProgressIndicator } from "../progress-indicator/index.js";
|
|
12
12
|
import { messagesFor } from "../../i18n/index.js";
|
|
13
|
+
import { DismissLayer, PANEL_ORIGINS, useBackToClose, useFocusOnPlaced, usePanelMotion, useReturnFocus } from "../../overlay/panel.js";
|
|
13
14
|
import { Overlay } from "../../overlay/host.js";
|
|
14
15
|
import { useAnchoredPlacement } from "../../overlay/anchored.js";
|
|
15
|
-
import { DismissLayer, PANEL_ORIGINS, useBackToClose, useFocusOnPlaced, usePanelMotion, useReturnFocus } from "../../overlay/panel.js";
|
|
16
16
|
import { Separator } from "../separator/index.js";
|
|
17
17
|
import { c } from "react/compiler-runtime";
|
|
18
18
|
import { I18nManager, Platform, Pressable, ScrollView, StyleSheet, Text, View } from "react-native";
|
|
@@ -1,14 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { NavigationItemProps } from "../../navigation/index.js";
|
|
2
2
|
import { StyleProp, View, ViewProps, ViewStyle } from "react-native";
|
|
3
3
|
import { ComponentRef, ReactNode, Ref } from "react";
|
|
4
4
|
//#region src/components/navigation-bar/index.d.ts
|
|
5
|
-
type NavigationBarItemProps =
|
|
6
|
-
/**
|
|
7
|
-
* Where the destination goes, through the app's router, and what the
|
|
8
|
-
* bar's `selectedRoute` is matched against.
|
|
9
|
-
*/
|
|
10
|
-
readonly href: string;
|
|
11
|
-
};
|
|
5
|
+
type NavigationBarItemProps = NavigationItemProps;
|
|
12
6
|
type NavigationBarProps = Omit<ViewProps, 'children' | 'style'> & {
|
|
13
7
|
/** The destinations, each a `NavigationBar.Item`. */
|
|
14
8
|
readonly children?: ReactNode;
|
|
@@ -143,7 +137,7 @@ declare namespace NavigationBar {
|
|
|
143
137
|
*
|
|
144
138
|
* `style`, `ref` and `testID` land on the destination's `Pressable`.
|
|
145
139
|
*/
|
|
146
|
-
declare function NavigationBarItem(
|
|
140
|
+
declare function NavigationBarItem(props: NavigationBarItemProps): import("react").JSX.Element;
|
|
147
141
|
/**
|
|
148
142
|
* A navigation bar drawing a tab navigator's routes, for the `tabBar` prop of
|
|
149
143
|
* React Navigation's bottom tabs and of Expo Router's `Tabs` alike.
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { useTheme } from "../../theme/scope.js";
|
|
2
2
|
import { composeStyles, themedStyles } from "../../theme/styles.js";
|
|
3
|
-
import { useLinkPress } from "../../router/index.js";
|
|
4
3
|
import { useWindowSizeClass } from "../../hooks/useWindowSizeClass.js";
|
|
5
|
-
import { NavigationContext, NavigationDestination, iconColorOf, labelColorOf } from "../../navigation/index.js";
|
|
4
|
+
import { NavigationContext, NavigationDestination, NavigationItem, iconColorOf, labelColorOf } from "../../navigation/index.js";
|
|
6
5
|
import { c } from "react/compiler-runtime";
|
|
7
6
|
import { StyleSheet, View } from "react-native";
|
|
8
7
|
import { SafeAreaView } from "react-native-safe-area-context";
|
|
@@ -261,38 +260,15 @@ function NavigationBar(t0) {
|
|
|
261
260
|
*
|
|
262
261
|
* `style`, `ref` and `testID` land on the destination's `Pressable`.
|
|
263
262
|
*/
|
|
264
|
-
function NavigationBarItem(
|
|
265
|
-
const $ = c(
|
|
266
|
-
let
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
$[2] = onPress;
|
|
274
|
-
$[3] = props;
|
|
275
|
-
} else {
|
|
276
|
-
href = $[1];
|
|
277
|
-
onPress = $[2];
|
|
278
|
-
props = $[3];
|
|
279
|
-
}
|
|
280
|
-
const { selectedRoute } = use(NavigationContext);
|
|
281
|
-
const press = useLinkPress(href, onPress);
|
|
282
|
-
const t1 = selectedRoute !== void 0 && href === selectedRoute;
|
|
283
|
-
let t2;
|
|
284
|
-
if ($[4] !== press || $[5] !== props || $[6] !== t1) {
|
|
285
|
-
t2 = /* @__PURE__ */ jsx(NavigationDestination, {
|
|
286
|
-
...props,
|
|
287
|
-
onPress: press,
|
|
288
|
-
selected: t1
|
|
289
|
-
});
|
|
290
|
-
$[4] = press;
|
|
291
|
-
$[5] = props;
|
|
292
|
-
$[6] = t1;
|
|
293
|
-
$[7] = t2;
|
|
294
|
-
} else t2 = $[7];
|
|
295
|
-
return t2;
|
|
263
|
+
function NavigationBarItem(props) {
|
|
264
|
+
const $ = c(2);
|
|
265
|
+
let t0;
|
|
266
|
+
if ($[0] !== props) {
|
|
267
|
+
t0 = /* @__PURE__ */ jsx(NavigationItem, { ...props });
|
|
268
|
+
$[0] = props;
|
|
269
|
+
$[1] = t0;
|
|
270
|
+
} else t0 = $[1];
|
|
271
|
+
return t0;
|
|
296
272
|
}
|
|
297
273
|
/**
|
|
298
274
|
* A navigation bar drawing a tab navigator's routes, for the `tabBar` prop of
|