react-native-ruler-date-picker 0.1.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/LICENSE +21 -0
- package/README.md +124 -0
- package/lib/commonjs/RulerDatePicker.js +376 -0
- package/lib/commonjs/RulerDatePicker.js.map +1 -0
- package/lib/commonjs/Tick.js +79 -0
- package/lib/commonjs/Tick.js.map +1 -0
- package/lib/commonjs/defaults.js +48 -0
- package/lib/commonjs/defaults.js.map +1 -0
- package/lib/commonjs/index.js +13 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/types.js +6 -0
- package/lib/commonjs/types.js.map +1 -0
- package/lib/commonjs/useHaptics.js +83 -0
- package/lib/commonjs/useHaptics.js.map +1 -0
- package/lib/commonjs/utils.js +99 -0
- package/lib/commonjs/utils.js.map +1 -0
- package/lib/module/RulerDatePicker.js +371 -0
- package/lib/module/RulerDatePicker.js.map +1 -0
- package/lib/module/Tick.js +74 -0
- package/lib/module/Tick.js.map +1 -0
- package/lib/module/defaults.js +44 -0
- package/lib/module/defaults.js.map +1 -0
- package/lib/module/index.js +4 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/types.js +4 -0
- package/lib/module/types.js.map +1 -0
- package/lib/module/useHaptics.js +80 -0
- package/lib/module/useHaptics.js.map +1 -0
- package/lib/module/utils.js +90 -0
- package/lib/module/utils.js.map +1 -0
- package/lib/typescript/RulerDatePicker.d.ts +21 -0
- package/lib/typescript/RulerDatePicker.d.ts.map +1 -0
- package/lib/typescript/Tick.d.ts +26 -0
- package/lib/typescript/Tick.d.ts.map +1 -0
- package/lib/typescript/defaults.d.ts +24 -0
- package/lib/typescript/defaults.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +3 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/types.d.ts +104 -0
- package/lib/typescript/types.d.ts.map +1 -0
- package/lib/typescript/useHaptics.d.ts +20 -0
- package/lib/typescript/useHaptics.d.ts.map +1 -0
- package/lib/typescript/utils.d.ts +31 -0
- package/lib/typescript/utils.d.ts.map +1 -0
- package/package.json +106 -0
- package/src/RulerDatePicker.tsx +462 -0
- package/src/Tick.tsx +104 -0
- package/src/defaults.ts +44 -0
- package/src/index.ts +2 -0
- package/src/types.ts +129 -0
- package/src/useHaptics.ts +107 -0
- package/src/utils.ts +115 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Rehman
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# react-native-ruler-date-picker
|
|
2
|
+
|
|
3
|
+
A performant, customizable ruler-style date picker for React Native.
|
|
4
|
+
|
|
5
|
+
<!-- TODO: Add hero GIF/video here -->
|
|
6
|
+
|
|
7
|
+
## ✨ Features
|
|
8
|
+
|
|
9
|
+
- **60 FPS Physics** — Reanimated 3 decay animations with snap-to-tick alignment
|
|
10
|
+
- **Dual-Speed Haptics** — Discrete ticks at slow scroll, continuous buzz at fast swipe
|
|
11
|
+
- **Windowed Rendering** — Only renders visible ticks + buffer for memory efficiency
|
|
12
|
+
- **Fully Customizable** — Every dimension, color, and behavior is configurable via props
|
|
13
|
+
- **Graceful Haptics** — Works with `expo-haptics`, custom handlers, or silently without either
|
|
14
|
+
- **Dark Mode Support** — Auto-detects system color scheme with manual override
|
|
15
|
+
|
|
16
|
+
## 📦 Installation
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npm install react-native-ruler-date-picker
|
|
20
|
+
# or
|
|
21
|
+
yarn add react-native-ruler-date-picker
|
|
22
|
+
# or
|
|
23
|
+
pnpm add react-native-ruler-date-picker
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### Peer Dependencies
|
|
27
|
+
|
|
28
|
+
Make sure you have these installed in your project:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npm install react-native-reanimated react-native-gesture-handler
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Optional (for haptic feedback):
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
npx expo install expo-haptics
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## 🚀 Quick Start
|
|
41
|
+
|
|
42
|
+
```tsx
|
|
43
|
+
import { RulerDatePicker } from 'react-native-ruler-date-picker';
|
|
44
|
+
|
|
45
|
+
export default function App() {
|
|
46
|
+
const [date, setDate] = useState(new Date());
|
|
47
|
+
|
|
48
|
+
return (
|
|
49
|
+
<RulerDatePicker
|
|
50
|
+
selectedDate={date}
|
|
51
|
+
onSelectDate={(newDate, dateString) => {
|
|
52
|
+
setDate(newDate);
|
|
53
|
+
console.log('Selected:', dateString); // "2026-08-07"
|
|
54
|
+
}}
|
|
55
|
+
/>
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## 📐 API Reference
|
|
61
|
+
|
|
62
|
+
### Props
|
|
63
|
+
|
|
64
|
+
| Prop | Type | Default | Description |
|
|
65
|
+
|---|---|---|---|
|
|
66
|
+
| `selectedDate` | `Date \| string` | **required** | Currently selected date |
|
|
67
|
+
| `onSelectDate` | `(date: Date, dateString: string) => void` | **required** | Called when date changes |
|
|
68
|
+
| `minDate` | `Date` | -365 days | Minimum scrollable date |
|
|
69
|
+
| `maxDate` | `Date` | +365 days | Maximum scrollable date |
|
|
70
|
+
| `labelInterval` | `'daily' \| 'weekly' \| 'monthly' \| (date: Date) => boolean` | `'weekly'` | Which ticks show labels |
|
|
71
|
+
| `highlightDays` | `number[]` | — | Days of week to highlight (0=Sun, 6=Sat) |
|
|
72
|
+
| `tickSpacing` | `number` | `24` | Gap between ticks (px) |
|
|
73
|
+
| `tickHeight` | `number` | `12` | Small tick height (px) |
|
|
74
|
+
| `tickTallHeight` | `number` | `24` | Large/labeled tick height (px) |
|
|
75
|
+
| `tickThickness` | `number` | `4` | Tick bar width (px) |
|
|
76
|
+
| `tickColor` | `string` | auto | Small tick color |
|
|
77
|
+
| `tickTallColor` | `string` | auto | Large tick color (falls back to `tickColor`) |
|
|
78
|
+
| `labelColor` | `string` | auto | Label text color |
|
|
79
|
+
| `accentColor` | `string` | auto | Today dot & reset button color |
|
|
80
|
+
| `indicatorColor` | `string` | auto | Center indicator line color |
|
|
81
|
+
| `backgroundColor` | `string` | `transparent` | Component background |
|
|
82
|
+
| `height` | `number` | `120` | Total component height (px) |
|
|
83
|
+
| `rulerHeight` | `number` | `60` | Ruler track height (px) |
|
|
84
|
+
| `indicatorWidth` | `number` | `2` | Center indicator width (px) |
|
|
85
|
+
| `indicatorHeight` | `number` | `40` | Center indicator height (px) |
|
|
86
|
+
| `todayDotSize` | `number` | `6` | Today dot diameter (px) |
|
|
87
|
+
| `labelFontSize` | `number` | `10` | Tick label font size (px) |
|
|
88
|
+
| `bufferTicks` | `number` | `10` | Off-screen render buffer |
|
|
89
|
+
| `updateDebounceMs` | `number` | `100` | Debounce for `onSelectDate` (ms) |
|
|
90
|
+
| `enableHaptics` | `boolean` | `true` | Enable/disable haptic feedback |
|
|
91
|
+
| `onHapticTrigger` | `(mode: 'tick' \| 'continuous') => void` | — | Custom haptic handler |
|
|
92
|
+
| `fastSwipeTickThreshold` | `number` | `1` | Ticks/frame to trigger fast mode |
|
|
93
|
+
| `continuousHapticIntervalMs` | `number` | `20` | Continuous haptic pulse interval (ms) |
|
|
94
|
+
| `showResetToToday` | `boolean` | `false` | Show "Today" reset button |
|
|
95
|
+
| `renderHeader` | `(date, isToday, resetFn) => ReactNode` | — | Custom header renderer |
|
|
96
|
+
|
|
97
|
+
## 🎨 Theming
|
|
98
|
+
|
|
99
|
+
Colors auto-detect the system color scheme. Override any color individually:
|
|
100
|
+
|
|
101
|
+
```tsx
|
|
102
|
+
<RulerDatePicker
|
|
103
|
+
selectedDate={new Date()}
|
|
104
|
+
onSelectDate={handleSelect}
|
|
105
|
+
tickColor="#E5E7EB"
|
|
106
|
+
tickTallColor="#6366F1"
|
|
107
|
+
accentColor="#8B5CF6"
|
|
108
|
+
indicatorColor="#8B5CF6"
|
|
109
|
+
labelColor="#A1A1AA"
|
|
110
|
+
backgroundColor="#18181B"
|
|
111
|
+
/>
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## 🤝 Contributing
|
|
115
|
+
|
|
116
|
+
See the [ROADMAP](./ROADMAP.md) for planned features and development phases.
|
|
117
|
+
|
|
118
|
+
1. Clone the repo
|
|
119
|
+
2. Install dependencies: `pnpm install`
|
|
120
|
+
3. Start the example app: `pnpm dev`
|
|
121
|
+
|
|
122
|
+
## 📄 License
|
|
123
|
+
|
|
124
|
+
MIT © [Rehman](https://md-rehman.dev)
|
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.RulerDatePicker = RulerDatePicker;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
|
|
10
|
+
var _reactNativeGestureHandler = require("react-native-gesture-handler");
|
|
11
|
+
var _defaults = require("./defaults");
|
|
12
|
+
var _utils = require("./utils");
|
|
13
|
+
var _useHaptics = require("./useHaptics");
|
|
14
|
+
var _Tick = require("./Tick");
|
|
15
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
17
|
+
const SCREEN_WIDTH = _reactNative.Dimensions.get('window').width;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* A performant, customizable ruler-style date picker for React Native.
|
|
21
|
+
*
|
|
22
|
+
* Features:
|
|
23
|
+
* - 60 FPS scrolling via Reanimated 3 decay physics + snap alignment
|
|
24
|
+
* - Dual-speed haptic feedback engine (discrete ticks vs continuous buzz)
|
|
25
|
+
* - Windowed tick rendering for memory efficiency
|
|
26
|
+
* - Fully configurable dimensions, colors, and behaviors
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```tsx
|
|
30
|
+
* <RulerDatePicker
|
|
31
|
+
* selectedDate={new Date()}
|
|
32
|
+
* onSelectDate={(date, dateString) => console.log(dateString)}
|
|
33
|
+
* />
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
function RulerDatePicker(props) {
|
|
37
|
+
const {
|
|
38
|
+
selectedDate,
|
|
39
|
+
onSelectDate,
|
|
40
|
+
minDate,
|
|
41
|
+
maxDate,
|
|
42
|
+
labelInterval,
|
|
43
|
+
highlightDays,
|
|
44
|
+
tickSpacing = _defaults.DEFAULTS.tickSpacing,
|
|
45
|
+
tickHeight = _defaults.DEFAULTS.tickHeight,
|
|
46
|
+
tickTallHeight = _defaults.DEFAULTS.tickTallHeight,
|
|
47
|
+
tickThickness = _defaults.DEFAULTS.tickThickness,
|
|
48
|
+
height = _defaults.DEFAULTS.height,
|
|
49
|
+
rulerHeight = _defaults.DEFAULTS.rulerHeight,
|
|
50
|
+
indicatorWidth = _defaults.DEFAULTS.indicatorWidth,
|
|
51
|
+
indicatorHeight = _defaults.DEFAULTS.indicatorHeight,
|
|
52
|
+
todayDotSize = _defaults.DEFAULTS.todayDotSize,
|
|
53
|
+
labelFontSize = _defaults.DEFAULTS.labelFontSize,
|
|
54
|
+
bufferTicks = _defaults.DEFAULTS.bufferTicks,
|
|
55
|
+
updateDebounceMs = _defaults.DEFAULTS.updateDebounceMs,
|
|
56
|
+
enableHaptics = _defaults.DEFAULTS.enableHaptics,
|
|
57
|
+
onHapticTrigger,
|
|
58
|
+
fastSwipeTickThreshold = _defaults.DEFAULTS.fastSwipeTickThreshold,
|
|
59
|
+
continuousHapticIntervalMs = _defaults.DEFAULTS.continuousHapticIntervalMs,
|
|
60
|
+
showResetToToday = _defaults.DEFAULTS.showResetToToday,
|
|
61
|
+
renderHeader
|
|
62
|
+
} = props;
|
|
63
|
+
|
|
64
|
+
// ── Resolve colors ──────────────────────────────────────────────────────
|
|
65
|
+
const colors = (0, _utils.useResolvedColors)(props);
|
|
66
|
+
|
|
67
|
+
// ── Haptics ─────────────────────────────────────────────────────────────
|
|
68
|
+
const {
|
|
69
|
+
fireDiscreteHaptic,
|
|
70
|
+
startContinuousHaptic,
|
|
71
|
+
stopContinuousHaptic
|
|
72
|
+
} = (0, _useHaptics.useHaptics)({
|
|
73
|
+
enableHaptics,
|
|
74
|
+
onHapticTrigger,
|
|
75
|
+
continuousHapticIntervalMs
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
// ── Reference time (midnight today) ─────────────────────────────────────
|
|
79
|
+
const todayTime = (0, _react.useMemo)(() => {
|
|
80
|
+
const d = new Date();
|
|
81
|
+
d.setHours(0, 0, 0, 0);
|
|
82
|
+
return d.getTime();
|
|
83
|
+
}, []);
|
|
84
|
+
|
|
85
|
+
// ── Date boundaries ─────────────────────────────────────────────────────
|
|
86
|
+
const {
|
|
87
|
+
minOffset,
|
|
88
|
+
maxOffset
|
|
89
|
+
} = (0, _react.useMemo)(() => (0, _utils.computeDayRange)(todayTime, minDate, maxDate), [todayTime, minDate, maxDate]);
|
|
90
|
+
|
|
91
|
+
// ── Initial offset from today ───────────────────────────────────────────
|
|
92
|
+
const initialOffsetDays = (0, _react.useMemo)(() => {
|
|
93
|
+
return (0, _utils.dateToDayOffset)(selectedDate, todayTime);
|
|
94
|
+
// Intentionally only computed once on mount
|
|
95
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
96
|
+
}, []);
|
|
97
|
+
const halfVisible = Math.ceil(SCREEN_WIDTH / 2 / tickSpacing);
|
|
98
|
+
const windowSize = halfVisible + bufferTicks;
|
|
99
|
+
|
|
100
|
+
// ── Animated values ─────────────────────────────────────────────────────
|
|
101
|
+
const translateX = (0, _reactNativeReanimated.useSharedValue)(-initialOffsetDays * tickSpacing);
|
|
102
|
+
const contextX = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
103
|
+
const previousIndex = (0, _reactNativeReanimated.useSharedValue)(-initialOffsetDays);
|
|
104
|
+
const isFastMode = (0, _reactNativeReanimated.useSharedValue)(false);
|
|
105
|
+
|
|
106
|
+
// ── State ───────────────────────────────────────────────────────────────
|
|
107
|
+
const initialDateStr = (0, _react.useMemo)(() => {
|
|
108
|
+
const d = typeof selectedDate === 'string' ? new Date(selectedDate) : new Date(selectedDate);
|
|
109
|
+
d.setHours(0, 0, 0, 0);
|
|
110
|
+
return (0, _utils.formatDateString)(d);
|
|
111
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
112
|
+
}, []);
|
|
113
|
+
const [displayDateStr, setDisplayDateStr] = (0, _react.useState)(initialDateStr);
|
|
114
|
+
const debounceTimerRef = (0, _react.useRef)(null);
|
|
115
|
+
const [windowCenter, setWindowCenter] = (0, _react.useState)(-initialOffsetDays);
|
|
116
|
+
|
|
117
|
+
// ── Visible ticks (windowed rendering) ──────────────────────────────────
|
|
118
|
+
const visibleTicks = (0, _react.useMemo)(() => {
|
|
119
|
+
const ticks = [];
|
|
120
|
+
const start = Math.max(windowCenter - windowSize, minOffset);
|
|
121
|
+
const end = Math.min(windowCenter + windowSize, maxOffset);
|
|
122
|
+
for (let i = start; i <= end; i++) {
|
|
123
|
+
const d = new Date(todayTime + i * _defaults.MS_PER_DAY);
|
|
124
|
+
ticks.push({
|
|
125
|
+
offset: i,
|
|
126
|
+
isLabeled: (0, _utils.shouldShowLabel)(d, labelInterval, todayTime),
|
|
127
|
+
isToday: i === 0,
|
|
128
|
+
isHighlighted: highlightDays ? highlightDays.includes(d.getDay()) : false,
|
|
129
|
+
dateStr: d.getDate().toString()
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
return ticks;
|
|
133
|
+
}, [windowCenter, windowSize, todayTime, minOffset, maxOffset, labelInterval, highlightDays]);
|
|
134
|
+
|
|
135
|
+
// ── Tick change callbacks ───────────────────────────────────────────────
|
|
136
|
+
|
|
137
|
+
const onTickChanged = (0, _react.useCallback)((index, enteringFastMode) => {
|
|
138
|
+
if (enteringFastMode) {
|
|
139
|
+
startContinuousHaptic();
|
|
140
|
+
} else {
|
|
141
|
+
stopContinuousHaptic();
|
|
142
|
+
fireDiscreteHaptic();
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// Update display date
|
|
146
|
+
const d = (0, _utils.dayOffsetToDate)(index, todayTime);
|
|
147
|
+
const dateStr = (0, _utils.formatDateString)(d);
|
|
148
|
+
setWindowCenter(prevCenter => {
|
|
149
|
+
if (Math.abs(index - prevCenter) >= 5) {
|
|
150
|
+
return index;
|
|
151
|
+
}
|
|
152
|
+
return prevCenter;
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
// Debounce the heavy onSelectDate callback
|
|
156
|
+
if (debounceTimerRef.current) {
|
|
157
|
+
clearTimeout(debounceTimerRef.current);
|
|
158
|
+
}
|
|
159
|
+
debounceTimerRef.current = setTimeout(() => {
|
|
160
|
+
onSelectDate(d, dateStr);
|
|
161
|
+
}, updateDebounceMs);
|
|
162
|
+
}, [todayTime, onSelectDate, updateDebounceMs, startContinuousHaptic, stopContinuousHaptic, fireDiscreteHaptic]);
|
|
163
|
+
const onAnimationSettled = (0, _react.useCallback)(index => {
|
|
164
|
+
stopContinuousHaptic();
|
|
165
|
+
fireDiscreteHaptic();
|
|
166
|
+
const d = (0, _utils.dayOffsetToDate)(index, todayTime);
|
|
167
|
+
const dateStr = (0, _utils.formatDateString)(d);
|
|
168
|
+
setDisplayDateStr(dateStr);
|
|
169
|
+
setWindowCenter(index);
|
|
170
|
+
onSelectDate(d, dateStr);
|
|
171
|
+
}, [todayTime, onSelectDate, stopContinuousHaptic, fireDiscreteHaptic]);
|
|
172
|
+
|
|
173
|
+
// ── Animated reaction ───────────────────────────────────────────────────
|
|
174
|
+
(0, _reactNativeReanimated.useAnimatedReaction)(() => Math.round(-translateX.value / tickSpacing), (index, prev) => {
|
|
175
|
+
if (index !== prev && index >= minOffset && index <= maxOffset) {
|
|
176
|
+
previousIndex.value = index;
|
|
177
|
+
const ticksSkipped = prev !== null ? Math.abs(index - prev) : 1;
|
|
178
|
+
const shouldBeFast = ticksSkipped > fastSwipeTickThreshold;
|
|
179
|
+
if (shouldBeFast && !isFastMode.value) {
|
|
180
|
+
isFastMode.value = true;
|
|
181
|
+
(0, _reactNativeReanimated.runOnJS)(onTickChanged)(index, true);
|
|
182
|
+
} else if (!shouldBeFast && isFastMode.value) {
|
|
183
|
+
isFastMode.value = false;
|
|
184
|
+
(0, _reactNativeReanimated.runOnJS)(onTickChanged)(index, false);
|
|
185
|
+
} else if (!shouldBeFast) {
|
|
186
|
+
(0, _reactNativeReanimated.runOnJS)(onTickChanged)(index, false);
|
|
187
|
+
}
|
|
188
|
+
if (shouldBeFast && isFastMode.value) {
|
|
189
|
+
(0, _reactNativeReanimated.runOnJS)(onTickChanged)(index, true);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}, [tickSpacing, minOffset, maxOffset, fastSwipeTickThreshold]);
|
|
193
|
+
|
|
194
|
+
// ── Pan gesture ─────────────────────────────────────────────────────────
|
|
195
|
+
const pan = _reactNativeGestureHandler.Gesture.Pan().onStart(() => {
|
|
196
|
+
contextX.value = translateX.value;
|
|
197
|
+
}).onUpdate(event => {
|
|
198
|
+
translateX.value = contextX.value + event.translationX;
|
|
199
|
+
}).onEnd(event => {
|
|
200
|
+
translateX.value = (0, _reactNativeReanimated.withDecay)({
|
|
201
|
+
velocity: event.velocityX,
|
|
202
|
+
deceleration: 0.99
|
|
203
|
+
}, finished => {
|
|
204
|
+
if (finished) {
|
|
205
|
+
const maxTranslateX = -minOffset * tickSpacing;
|
|
206
|
+
const minTranslateX = -maxOffset * tickSpacing;
|
|
207
|
+
const clampedX = Math.min(Math.max(translateX.value, minTranslateX), maxTranslateX);
|
|
208
|
+
const snappedIndex = Math.round(clampedX / tickSpacing);
|
|
209
|
+
const snappedX = snappedIndex * tickSpacing;
|
|
210
|
+
translateX.value = (0, _reactNativeReanimated.withTiming)(snappedX, {
|
|
211
|
+
duration: 150
|
|
212
|
+
}, done => {
|
|
213
|
+
if (done) {
|
|
214
|
+
isFastMode.value = false;
|
|
215
|
+
const index = Math.round(-snappedX / tickSpacing);
|
|
216
|
+
(0, _reactNativeReanimated.runOnJS)(onAnimationSettled)(index);
|
|
217
|
+
}
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
});
|
|
222
|
+
const animatedStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => ({
|
|
223
|
+
transform: [{
|
|
224
|
+
translateX: translateX.value
|
|
225
|
+
}]
|
|
226
|
+
}), [translateX]);
|
|
227
|
+
|
|
228
|
+
// ── Header ──────────────────────────────────────────────────────────────
|
|
229
|
+
const displayDate = new Date(displayDateStr);
|
|
230
|
+
const displayFormat = displayDate.toLocaleDateString('en-US', {
|
|
231
|
+
weekday: 'long',
|
|
232
|
+
month: 'long',
|
|
233
|
+
day: 'numeric'
|
|
234
|
+
});
|
|
235
|
+
const displayYear = displayDate.getFullYear();
|
|
236
|
+
const currentYear = new Date().getFullYear();
|
|
237
|
+
const showYear = displayYear !== currentYear;
|
|
238
|
+
const isTodaySelected = displayDateStr === (0, _utils.formatDateString)(new Date(todayTime));
|
|
239
|
+
const handleResetToToday = (0, _react.useCallback)(() => {
|
|
240
|
+
stopContinuousHaptic();
|
|
241
|
+
translateX.value = (0, _reactNativeReanimated.withTiming)(0, {
|
|
242
|
+
duration: 300
|
|
243
|
+
});
|
|
244
|
+
const todayStr = (0, _utils.formatDateString)(new Date(todayTime));
|
|
245
|
+
setDisplayDateStr(todayStr);
|
|
246
|
+
setWindowCenter(0);
|
|
247
|
+
onSelectDate(new Date(todayTime), todayStr);
|
|
248
|
+
}, [todayTime, onSelectDate, stopContinuousHaptic, translateX]);
|
|
249
|
+
|
|
250
|
+
// ── Render ──────────────────────────────────────────────────────────────
|
|
251
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
252
|
+
style: [styles.container, {
|
|
253
|
+
height,
|
|
254
|
+
backgroundColor: colors.backgroundColor
|
|
255
|
+
}],
|
|
256
|
+
children: [renderHeader ? renderHeader(displayDate, isTodaySelected, handleResetToToday) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
257
|
+
style: styles.headerContainer,
|
|
258
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
259
|
+
style: styles.dateHeader,
|
|
260
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
261
|
+
style: [styles.yearText, {
|
|
262
|
+
color: colors.labelColor
|
|
263
|
+
}],
|
|
264
|
+
children: showYear ? displayYear : ''
|
|
265
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
266
|
+
style: [styles.dateText, {
|
|
267
|
+
color: colors.accentColor
|
|
268
|
+
}],
|
|
269
|
+
children: displayFormat
|
|
270
|
+
})]
|
|
271
|
+
}), showResetToToday && !isTodaySelected && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
272
|
+
onPress: handleResetToToday,
|
|
273
|
+
style: styles.resetBtn,
|
|
274
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
275
|
+
style: [styles.resetText, {
|
|
276
|
+
color: colors.accentColor
|
|
277
|
+
}],
|
|
278
|
+
children: "Today"
|
|
279
|
+
})
|
|
280
|
+
})]
|
|
281
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeGestureHandler.GestureDetector, {
|
|
282
|
+
gesture: pan,
|
|
283
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
284
|
+
style: [styles.rulerContainer, {
|
|
285
|
+
height: rulerHeight
|
|
286
|
+
}],
|
|
287
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
288
|
+
style: [styles.centerIndicator, {
|
|
289
|
+
backgroundColor: colors.indicatorColor,
|
|
290
|
+
width: indicatorWidth,
|
|
291
|
+
height: indicatorHeight
|
|
292
|
+
}]
|
|
293
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
294
|
+
style: [styles.ticksWrapper, animatedStyle],
|
|
295
|
+
children: visibleTicks.map(tick => /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tick.Tick, {
|
|
296
|
+
offset: tick.offset,
|
|
297
|
+
isLabeled: tick.isLabeled,
|
|
298
|
+
isToday: tick.isToday,
|
|
299
|
+
isHighlighted: tick.isHighlighted,
|
|
300
|
+
dateStr: tick.dateStr,
|
|
301
|
+
tickSpacing: tickSpacing,
|
|
302
|
+
tickHeight: tickHeight,
|
|
303
|
+
tickTallHeight: tickTallHeight,
|
|
304
|
+
tickThickness: tickThickness,
|
|
305
|
+
tickColor: colors.tickColor,
|
|
306
|
+
tickTallColor: colors.tickTallColor,
|
|
307
|
+
labelColor: colors.labelColor,
|
|
308
|
+
accentColor: colors.accentColor,
|
|
309
|
+
todayDotSize: todayDotSize,
|
|
310
|
+
labelFontSize: labelFontSize,
|
|
311
|
+
rulerHeight: rulerHeight
|
|
312
|
+
}, tick.offset))
|
|
313
|
+
})]
|
|
314
|
+
})
|
|
315
|
+
})]
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
const styles = _reactNative.StyleSheet.create({
|
|
319
|
+
container: {
|
|
320
|
+
justifyContent: 'center',
|
|
321
|
+
alignItems: 'center',
|
|
322
|
+
overflow: 'hidden'
|
|
323
|
+
},
|
|
324
|
+
headerContainer: {
|
|
325
|
+
flexDirection: 'row',
|
|
326
|
+
alignItems: 'center',
|
|
327
|
+
justifyContent: 'center',
|
|
328
|
+
width: '100%',
|
|
329
|
+
paddingHorizontal: 20,
|
|
330
|
+
marginBottom: 20,
|
|
331
|
+
height: 40
|
|
332
|
+
},
|
|
333
|
+
dateHeader: {
|
|
334
|
+
alignItems: 'center'
|
|
335
|
+
},
|
|
336
|
+
yearText: {
|
|
337
|
+
fontSize: 12,
|
|
338
|
+
fontWeight: '500',
|
|
339
|
+
marginBottom: 2
|
|
340
|
+
},
|
|
341
|
+
dateText: {
|
|
342
|
+
fontSize: 18,
|
|
343
|
+
fontWeight: '600'
|
|
344
|
+
},
|
|
345
|
+
resetBtn: {
|
|
346
|
+
position: 'absolute',
|
|
347
|
+
right: 20,
|
|
348
|
+
paddingVertical: 6,
|
|
349
|
+
paddingHorizontal: 12,
|
|
350
|
+
borderRadius: 16,
|
|
351
|
+
backgroundColor: 'rgba(0,0,0,0.05)'
|
|
352
|
+
},
|
|
353
|
+
resetText: {
|
|
354
|
+
fontSize: 14,
|
|
355
|
+
fontWeight: '600'
|
|
356
|
+
},
|
|
357
|
+
rulerContainer: {
|
|
358
|
+
width: SCREEN_WIDTH,
|
|
359
|
+
position: 'relative',
|
|
360
|
+
flexDirection: 'row',
|
|
361
|
+
alignItems: 'flex-end',
|
|
362
|
+
justifyContent: 'center'
|
|
363
|
+
},
|
|
364
|
+
centerIndicator: {
|
|
365
|
+
position: 'absolute',
|
|
366
|
+
zIndex: 10,
|
|
367
|
+
bottom: 0
|
|
368
|
+
},
|
|
369
|
+
ticksWrapper: {
|
|
370
|
+
position: 'absolute',
|
|
371
|
+
height: '100%',
|
|
372
|
+
width: 0,
|
|
373
|
+
left: SCREEN_WIDTH / 2
|
|
374
|
+
}
|
|
375
|
+
});
|
|
376
|
+
//# sourceMappingURL=RulerDatePicker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeReanimated","_reactNativeGestureHandler","_defaults","_utils","_useHaptics","_Tick","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","SCREEN_WIDTH","Dimensions","width","RulerDatePicker","props","selectedDate","onSelectDate","minDate","maxDate","labelInterval","highlightDays","tickSpacing","DEFAULTS","tickHeight","tickTallHeight","tickThickness","height","rulerHeight","indicatorWidth","indicatorHeight","todayDotSize","labelFontSize","bufferTicks","updateDebounceMs","enableHaptics","onHapticTrigger","fastSwipeTickThreshold","continuousHapticIntervalMs","showResetToToday","renderHeader","colors","useResolvedColors","fireDiscreteHaptic","startContinuousHaptic","stopContinuousHaptic","useHaptics","todayTime","useMemo","d","Date","setHours","getTime","minOffset","maxOffset","computeDayRange","initialOffsetDays","dateToDayOffset","halfVisible","Math","ceil","windowSize","translateX","useSharedValue","contextX","previousIndex","isFastMode","initialDateStr","formatDateString","displayDateStr","setDisplayDateStr","useState","debounceTimerRef","useRef","windowCenter","setWindowCenter","visibleTicks","ticks","start","max","end","min","MS_PER_DAY","push","offset","isLabeled","shouldShowLabel","isToday","isHighlighted","includes","getDay","dateStr","getDate","toString","onTickChanged","useCallback","index","enteringFastMode","dayOffsetToDate","prevCenter","abs","current","clearTimeout","setTimeout","onAnimationSettled","useAnimatedReaction","round","value","prev","ticksSkipped","shouldBeFast","runOnJS","pan","Gesture","Pan","onStart","onUpdate","event","translationX","onEnd","withDecay","velocity","velocityX","deceleration","finished","maxTranslateX","minTranslateX","clampedX","snappedIndex","snappedX","withTiming","duration","done","animatedStyle","useAnimatedStyle","transform","displayDate","displayFormat","toLocaleDateString","weekday","month","day","displayYear","getFullYear","currentYear","showYear","isTodaySelected","handleResetToToday","todayStr","jsxs","View","style","styles","container","backgroundColor","children","headerContainer","dateHeader","jsx","Text","yearText","color","labelColor","dateText","accentColor","TouchableOpacity","onPress","resetBtn","resetText","GestureDetector","gesture","rulerContainer","centerIndicator","indicatorColor","ticksWrapper","map","tick","Tick","tickColor","tickTallColor","StyleSheet","create","justifyContent","alignItems","overflow","flexDirection","paddingHorizontal","marginBottom","fontSize","fontWeight","position","right","paddingVertical","borderRadius","zIndex","bottom","left"],"sourceRoot":"../../src","sources":["RulerDatePicker.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,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AK,EAAE,EAAE;IACTC,eAAe,EAAE,CAAC;IAClBN,iBAAiB,EAAE,EAAE;IACrBO,YAAY,EAAE,EAAE;IAChBvC,eAAe,EAAE;EACnB,CAAC;EACDc,SAAS,EAAE;IACToB,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE;EACd,CAAC;EACDlB,cAAc,EAAE;IACd9J,KAAK,EAAEF,YAAY;IACnBmL,QAAQ,EAAE,UAAU;IACpBL,aAAa,EAAE,KAAK;IACpBF,UAAU,EAAE,UAAU;IACtBD,cAAc,EAAE;EAClB,CAAC;EACDV,eAAe,EAAE;IACfkB,QAAQ,EAAE,UAAU;IACpBI,MAAM,EAAE,EAAE;IACVC,MAAM,EAAE;EACV,CAAC;EACDrB,YAAY,EAAE;IACZgB,QAAQ,EAAE,UAAU;IACpBnK,MAAM,EAAE,MAAM;IACdd,KAAK,EAAE,CAAC;IACRuL,IAAI,EAAEzL,YAAY,GAAG;EACvB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Tick = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
/**
|
|
12
|
+
* Memoized single tick component.
|
|
13
|
+
* Renders a vertical bar with optional label and today dot indicator.
|
|
14
|
+
* Small and large ticks can be independently colored.
|
|
15
|
+
*/
|
|
16
|
+
const Tick = exports.Tick = /*#__PURE__*/_react.default.memo(function Tick({
|
|
17
|
+
offset,
|
|
18
|
+
isLabeled,
|
|
19
|
+
isToday,
|
|
20
|
+
dateStr,
|
|
21
|
+
tickSpacing,
|
|
22
|
+
tickHeight,
|
|
23
|
+
tickTallHeight,
|
|
24
|
+
tickThickness,
|
|
25
|
+
tickColor,
|
|
26
|
+
tickTallColor,
|
|
27
|
+
labelColor,
|
|
28
|
+
accentColor,
|
|
29
|
+
todayDotSize,
|
|
30
|
+
labelFontSize,
|
|
31
|
+
rulerHeight
|
|
32
|
+
}) {
|
|
33
|
+
const resolvedTickColor = isLabeled ? tickTallColor : tickColor;
|
|
34
|
+
const resolvedTickHeight = isLabeled ? tickTallHeight : tickHeight;
|
|
35
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
36
|
+
style: [styles.tickContainer, {
|
|
37
|
+
width: tickSpacing,
|
|
38
|
+
height: rulerHeight,
|
|
39
|
+
position: 'absolute',
|
|
40
|
+
left: offset * tickSpacing - tickSpacing / 2
|
|
41
|
+
}],
|
|
42
|
+
children: [isLabeled && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
43
|
+
style: [styles.tickLabel, {
|
|
44
|
+
color: labelColor,
|
|
45
|
+
fontSize: labelFontSize
|
|
46
|
+
}],
|
|
47
|
+
children: dateStr
|
|
48
|
+
}), isToday && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
49
|
+
style: [styles.todayDot, {
|
|
50
|
+
backgroundColor: accentColor,
|
|
51
|
+
width: todayDotSize,
|
|
52
|
+
height: todayDotSize,
|
|
53
|
+
borderRadius: todayDotSize / 2
|
|
54
|
+
}]
|
|
55
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
56
|
+
style: {
|
|
57
|
+
backgroundColor: resolvedTickColor,
|
|
58
|
+
width: tickThickness,
|
|
59
|
+
height: resolvedTickHeight,
|
|
60
|
+
borderRadius: tickThickness / 2
|
|
61
|
+
}
|
|
62
|
+
})]
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
const styles = _reactNative.StyleSheet.create({
|
|
66
|
+
tickContainer: {
|
|
67
|
+
justifyContent: 'flex-end',
|
|
68
|
+
alignItems: 'center'
|
|
69
|
+
},
|
|
70
|
+
tickLabel: {
|
|
71
|
+
position: 'absolute',
|
|
72
|
+
top: 10
|
|
73
|
+
},
|
|
74
|
+
todayDot: {
|
|
75
|
+
position: 'absolute',
|
|
76
|
+
top: 25
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
//# sourceMappingURL=Tick.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_jsxRuntime","e","__esModule","default","Tick","exports","React","memo","offset","isLabeled","isToday","dateStr","tickSpacing","tickHeight","tickTallHeight","tickThickness","tickColor","tickTallColor","labelColor","accentColor","todayDotSize","labelFontSize","rulerHeight","resolvedTickColor","resolvedTickHeight","jsxs","View","style","styles","tickContainer","width","height","position","left","children","jsx","Text","tickLabel","color","fontSize","todayDot","backgroundColor","borderRadius","StyleSheet","create","justifyContent","alignItems","top"],"sourceRoot":"../../src","sources":["Tick.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAAsD,IAAAE,WAAA,GAAAF,OAAA;AAAA,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAsBtD;AACA;AACA;AACA;AACA;AACO,MAAMG,IAAI,GAAAC,OAAA,CAAAD,IAAA,gBAAGE,cAAK,CAACC,IAAI,CAAC,SAASH,IAAIA,CAAC;EAC3CI,MAAM;EACNC,SAAS;EACTC,OAAO;EACPC,OAAO;EACPC,WAAW;EACXC,UAAU;EACVC,cAAc;EACdC,aAAa;EACbC,SAAS;EACTC,aAAa;EACbC,UAAU;EACVC,WAAW;EACXC,YAAY;EACZC,aAAa;EACbC;AACS,CAAC,EAAE;EACZ,MAAMC,iBAAiB,GAAGd,SAAS,GAAGQ,aAAa,GAAGD,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