@lumx/core 4.24.0-next.0 → 4.24.0-next.1
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.
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import type { TimeOfDay } from './buildTimeList';
|
|
2
2
|
/**
|
|
3
|
-
* Clamp `time` to `[minTime, maxTime]
|
|
4
|
-
*
|
|
5
|
-
*
|
|
3
|
+
* Clamp `time` to `[minTime, maxTime]`, snapping to the nearest `step`-aligned
|
|
4
|
+
* option (as generated by `buildTimeList`) rather than to the raw bound.
|
|
5
|
+
* Inputs below the effective `minTime` snap up to it. Inputs above the
|
|
6
|
+
* effective `maxTime` snap down to it. Others are returned unchanged. When no
|
|
7
|
+
* `step`-aligned option exists inside `[minTime, maxTime]`, `time` is returned
|
|
8
|
+
* unchanged since there is nothing to snap to. Only the time-of-day of
|
|
9
|
+
* `minTime`/`maxTime` is used.
|
|
6
10
|
*/
|
|
7
|
-
export declare function snapTimeToBounds(time: TimeOfDay, minTime?: Date, maxTime?: Date): TimeOfDay;
|
|
11
|
+
export declare function snapTimeToBounds(time: TimeOfDay, minTime?: Date, maxTime?: Date, step?: number): TimeOfDay;
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"@floating-ui/dom": "^1.7.5",
|
|
10
|
-
"@lumx/icons": "^4.24.0-next.
|
|
10
|
+
"@lumx/icons": "^4.24.0-next.1",
|
|
11
11
|
"classnames": "^2.3.2",
|
|
12
12
|
"focus-visible": "^5.0.2",
|
|
13
13
|
"lodash": "4.18.1",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"update-version-changelog": "yarn version-changelog ../../CHANGELOG.md"
|
|
67
67
|
},
|
|
68
68
|
"sideEffects": false,
|
|
69
|
-
"version": "4.24.0-next.
|
|
69
|
+
"version": "4.24.0-next.1",
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@rollup/plugin-typescript": "^12.3.0",
|
|
72
72
|
"@testing-library/dom": "^10.4.1",
|