@impulse-ui-native/datetime 2.0.0 → 2.0.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.
- package/README.md +37 -0
- package/package.json +9 -9
package/README.md
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# @impulse-ui-native/datetime
|
|
2
|
+
|
|
3
|
+
Token-driven date, time, date-time, and range controls backed by the Impulse UI Native flyout layer system.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
pnpm add @impulse-ui-native/datetime
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Render the controls inside `ThemeProvider` and mount one `LayerCenter` in the application. The native prerequisites are the same as the flyout package.
|
|
12
|
+
|
|
13
|
+
## Main exports
|
|
14
|
+
|
|
15
|
+
- `DatePicker` selects a calendar date.
|
|
16
|
+
- `DateRangePicker` selects a start and end date.
|
|
17
|
+
- `DatetimePicker` selects a date with time.
|
|
18
|
+
- `DatetimeRangePicker` selects a date-time range.
|
|
19
|
+
- `TimePicker` selects hours, minutes, and seconds.
|
|
20
|
+
- Types include `TimePickerValue`, `TimeRange`, `TimeFormat`, `QuickDateOption`, and the date-time picker prop contracts.
|
|
21
|
+
- Calendar and date utilities cover comparisons, selection state, range construction, calendar matrices, formatting, and date arithmetic.
|
|
22
|
+
|
|
23
|
+
## Usage
|
|
24
|
+
|
|
25
|
+
```tsx
|
|
26
|
+
import { DatePicker } from "@impulse-ui-native/datetime";
|
|
27
|
+
|
|
28
|
+
<DatePicker
|
|
29
|
+
label="Start date"
|
|
30
|
+
value={date}
|
|
31
|
+
onChange={setDate}
|
|
32
|
+
clearable
|
|
33
|
+
quickDateOptions={[{ label: "Today", value: new Date() }]}
|
|
34
|
+
/>;
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
All picker controls support the shared control props for labels, errors, sizes, variants, placeholders, and addons. Date and range controls support controlled `value` and uncontrolled `defaultValue` modes.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@impulse-ui-native/datetime",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.mts",
|
|
@@ -18,13 +18,13 @@
|
|
|
18
18
|
"LICENSE"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@impulse-ui-native/
|
|
22
|
-
"@impulse-ui-native/
|
|
23
|
-
"@impulse-ui-native/
|
|
24
|
-
"@impulse-ui-native/icon": "2.0.
|
|
25
|
-
"@impulse-ui-native/core": "2.0.
|
|
26
|
-
"@impulse-ui-native/select": "2.0.
|
|
27
|
-
"@impulse-ui-native/portal": "2.0.
|
|
21
|
+
"@impulse-ui-native/primitives": "2.0.1",
|
|
22
|
+
"@impulse-ui-native/theme": "2.0.1",
|
|
23
|
+
"@impulse-ui-native/flyout": "2.0.1",
|
|
24
|
+
"@impulse-ui-native/icon": "2.0.1",
|
|
25
|
+
"@impulse-ui-native/core": "2.0.1",
|
|
26
|
+
"@impulse-ui-native/select": "2.0.1",
|
|
27
|
+
"@impulse-ui-native/portal": "2.0.1"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@types/react": "~19.2.14",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"react": "19.2.0",
|
|
35
35
|
"react-native": "0.83.6",
|
|
36
36
|
"typescript": "~5.9.2",
|
|
37
|
-
"@impulse-ui-native/eslint-config": "1.0.0",
|
|
38
37
|
"@impulse-ui-native/prettier-config": "1.0.0",
|
|
38
|
+
"@impulse-ui-native/eslint-config": "1.0.0",
|
|
39
39
|
"@impulse-ui-native/tsconfig": "1.0.0"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|