@ark-ui/react 5.33.0 → 5.34.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/dist/components/format/format-time.cjs +21 -0
- package/dist/components/format/format-time.d.cts +11 -0
- package/dist/components/format/format-time.d.ts +11 -0
- package/dist/components/format/format-time.js +17 -0
- package/dist/components/format/format.cjs +2 -0
- package/dist/components/format/format.d.cts +1 -0
- package/dist/components/format/format.d.ts +1 -0
- package/dist/components/format/format.js +1 -0
- package/dist/components/format/index.cjs +2 -0
- package/dist/components/format/index.d.cts +1 -0
- package/dist/components/format/index.d.ts +1 -0
- package/dist/components/format/index.js +1 -0
- package/dist/components/index.cjs +2 -0
- package/dist/components/index.js +1 -0
- package/dist/index.cjs +2 -0
- package/dist/index.js +1 -0
- package/package.json +65 -65
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
|
+
|
|
6
|
+
const jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
const i18nUtils = require('@zag-js/i18n-utils');
|
|
8
|
+
const react = require('react');
|
|
9
|
+
const useLocaleContext = require('../../providers/locale/use-locale-context.cjs');
|
|
10
|
+
|
|
11
|
+
const FormatTime = (props) => {
|
|
12
|
+
const { locale } = useLocaleContext.useLocaleContext();
|
|
13
|
+
const text = react.useMemo(() => {
|
|
14
|
+
const { value, ...intlOptions } = props;
|
|
15
|
+
return i18nUtils.formatTime(value, locale, intlOptions);
|
|
16
|
+
}, [props, locale]);
|
|
17
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: text });
|
|
18
|
+
};
|
|
19
|
+
FormatTime.displayName = "FormatTime";
|
|
20
|
+
|
|
21
|
+
exports.FormatTime = FormatTime;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FormatTimeOptions } from '@zag-js/i18n-utils';
|
|
2
|
+
export interface FormatTimeProps extends FormatTimeOptions {
|
|
3
|
+
/**
|
|
4
|
+
* The time to format
|
|
5
|
+
*/
|
|
6
|
+
value: string | Date;
|
|
7
|
+
}
|
|
8
|
+
export declare const FormatTime: {
|
|
9
|
+
(props: FormatTimeProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FormatTimeOptions } from '@zag-js/i18n-utils';
|
|
2
|
+
export interface FormatTimeProps extends FormatTimeOptions {
|
|
3
|
+
/**
|
|
4
|
+
* The time to format
|
|
5
|
+
*/
|
|
6
|
+
value: string | Date;
|
|
7
|
+
}
|
|
8
|
+
export declare const FormatTime: {
|
|
9
|
+
(props: FormatTimeProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
3
|
+
import { formatTime } from '@zag-js/i18n-utils';
|
|
4
|
+
import { useMemo } from 'react';
|
|
5
|
+
import { useLocaleContext } from '../../providers/locale/use-locale-context.js';
|
|
6
|
+
|
|
7
|
+
const FormatTime = (props) => {
|
|
8
|
+
const { locale } = useLocaleContext();
|
|
9
|
+
const text = useMemo(() => {
|
|
10
|
+
const { value, ...intlOptions } = props;
|
|
11
|
+
return formatTime(value, locale, intlOptions);
|
|
12
|
+
}, [props, locale]);
|
|
13
|
+
return /* @__PURE__ */ jsx(Fragment, { children: text });
|
|
14
|
+
};
|
|
15
|
+
FormatTime.displayName = "FormatTime";
|
|
16
|
+
|
|
17
|
+
export { FormatTime };
|
|
@@ -5,9 +5,11 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
5
5
|
const formatByte = require('./format-byte.cjs');
|
|
6
6
|
const formatNumber = require('./format-number.cjs');
|
|
7
7
|
const formatRelativeTime = require('./format-relative-time.cjs');
|
|
8
|
+
const formatTime = require('./format-time.cjs');
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
exports.Byte = formatByte.FormatByte;
|
|
12
13
|
exports.Number = formatNumber.FormatNumber;
|
|
13
14
|
exports.RelativeTime = formatRelativeTime.FormatRelativeTime;
|
|
15
|
+
exports.Time = formatTime.FormatTime;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { FormatByte as Byte, type FormatByteProps as ByteProps } from './format-byte';
|
|
2
2
|
export { FormatNumber as Number, type FormatNumberProps as NumberProps } from './format-number';
|
|
3
3
|
export { FormatRelativeTime as RelativeTime, type FormatRelativeTimeProps as RelativeTimeProps, } from './format-relative-time';
|
|
4
|
+
export { FormatTime as Time, type FormatTimeProps as TimeProps } from './format-time';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { FormatByte as Byte, type FormatByteProps as ByteProps } from './format-byte';
|
|
2
2
|
export { FormatNumber as Number, type FormatNumberProps as NumberProps } from './format-number';
|
|
3
3
|
export { FormatRelativeTime as RelativeTime, type FormatRelativeTimeProps as RelativeTimeProps, } from './format-relative-time';
|
|
4
|
+
export { FormatTime as Time, type FormatTimeProps as TimeProps } from './format-time';
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
5
5
|
const formatByte = require('./format-byte.cjs');
|
|
6
6
|
const formatNumber = require('./format-number.cjs');
|
|
7
7
|
const formatRelativeTime = require('./format-relative-time.cjs');
|
|
8
|
+
const formatTime = require('./format-time.cjs');
|
|
8
9
|
const format = require('./format.cjs');
|
|
9
10
|
|
|
10
11
|
|
|
@@ -12,4 +13,5 @@ const format = require('./format.cjs');
|
|
|
12
13
|
exports.FormatByte = formatByte.FormatByte;
|
|
13
14
|
exports.FormatNumber = formatNumber.FormatNumber;
|
|
14
15
|
exports.FormatRelativeTime = formatRelativeTime.FormatRelativeTime;
|
|
16
|
+
exports.FormatTime = formatTime.FormatTime;
|
|
15
17
|
exports.Format = format;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { FormatByte, type FormatByteProps } from './format-byte';
|
|
2
2
|
export { FormatNumber, type FormatNumberProps } from './format-number';
|
|
3
3
|
export { FormatRelativeTime, type FormatRelativeTimeProps } from './format-relative-time';
|
|
4
|
+
export { FormatTime, type FormatTimeProps } from './format-time';
|
|
4
5
|
export * as Format from './format';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { FormatByte, type FormatByteProps } from './format-byte';
|
|
2
2
|
export { FormatNumber, type FormatNumberProps } from './format-number';
|
|
3
3
|
export { FormatRelativeTime, type FormatRelativeTimeProps } from './format-relative-time';
|
|
4
|
+
export { FormatTime, type FormatTimeProps } from './format-time';
|
|
4
5
|
export * as Format from './format';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { FormatByte } from './format-byte.js';
|
|
2
2
|
export { FormatNumber } from './format-number.js';
|
|
3
3
|
export { FormatRelativeTime } from './format-relative-time.js';
|
|
4
|
+
export { FormatTime } from './format-time.js';
|
|
4
5
|
import * as format from './format.js';
|
|
5
6
|
export { format as Format };
|
|
@@ -293,6 +293,7 @@ const focusTrap = require('./focus-trap/focus-trap.cjs');
|
|
|
293
293
|
const formatByte = require('./format/format-byte.cjs');
|
|
294
294
|
const formatNumber = require('./format/format-number.cjs');
|
|
295
295
|
const formatRelativeTime = require('./format/format-relative-time.cjs');
|
|
296
|
+
const formatTime = require('./format/format-time.cjs');
|
|
296
297
|
const format = require('./format/format.cjs');
|
|
297
298
|
const frame = require('./frame/frame.cjs');
|
|
298
299
|
const highlight = require('./highlight/highlight.cjs');
|
|
@@ -1091,6 +1092,7 @@ exports.FocusTrap = focusTrap.FocusTrap;
|
|
|
1091
1092
|
exports.FormatByte = formatByte.FormatByte;
|
|
1092
1093
|
exports.FormatNumber = formatNumber.FormatNumber;
|
|
1093
1094
|
exports.FormatRelativeTime = formatRelativeTime.FormatRelativeTime;
|
|
1095
|
+
exports.FormatTime = formatTime.FormatTime;
|
|
1094
1096
|
exports.Format = format;
|
|
1095
1097
|
exports.Frame = frame.Frame;
|
|
1096
1098
|
exports.Highlight = highlight.Highlight;
|
package/dist/components/index.js
CHANGED
|
@@ -306,6 +306,7 @@ export { FocusTrap } from './focus-trap/focus-trap.js';
|
|
|
306
306
|
export { FormatByte } from './format/format-byte.js';
|
|
307
307
|
export { FormatNumber } from './format/format-number.js';
|
|
308
308
|
export { FormatRelativeTime } from './format/format-relative-time.js';
|
|
309
|
+
export { FormatTime } from './format/format-time.js';
|
|
309
310
|
import * as format from './format/format.js';
|
|
310
311
|
export { format as Format };
|
|
311
312
|
export { Frame } from './frame/frame.js';
|
package/dist/index.cjs
CHANGED
|
@@ -293,6 +293,7 @@ const focusTrap = require('./components/focus-trap/focus-trap.cjs');
|
|
|
293
293
|
const formatByte = require('./components/format/format-byte.cjs');
|
|
294
294
|
const formatNumber = require('./components/format/format-number.cjs');
|
|
295
295
|
const formatRelativeTime = require('./components/format/format-relative-time.cjs');
|
|
296
|
+
const formatTime = require('./components/format/format-time.cjs');
|
|
296
297
|
const format = require('./components/format/format.cjs');
|
|
297
298
|
const frame = require('./components/frame/frame.cjs');
|
|
298
299
|
const highlight = require('./components/highlight/highlight.cjs');
|
|
@@ -1100,6 +1101,7 @@ exports.FocusTrap = focusTrap.FocusTrap;
|
|
|
1100
1101
|
exports.FormatByte = formatByte.FormatByte;
|
|
1101
1102
|
exports.FormatNumber = formatNumber.FormatNumber;
|
|
1102
1103
|
exports.FormatRelativeTime = formatRelativeTime.FormatRelativeTime;
|
|
1104
|
+
exports.FormatTime = formatTime.FormatTime;
|
|
1103
1105
|
exports.Format = format;
|
|
1104
1106
|
exports.Frame = frame.Frame;
|
|
1105
1107
|
exports.Highlight = highlight.Highlight;
|
package/dist/index.js
CHANGED
|
@@ -306,6 +306,7 @@ export { FocusTrap } from './components/focus-trap/focus-trap.js';
|
|
|
306
306
|
export { FormatByte } from './components/format/format-byte.js';
|
|
307
307
|
export { FormatNumber } from './components/format/format-number.js';
|
|
308
308
|
export { FormatRelativeTime } from './components/format/format-relative-time.js';
|
|
309
|
+
export { FormatTime } from './components/format/format-time.js';
|
|
309
310
|
import * as format from './components/format/format.js';
|
|
310
311
|
export { format as Format };
|
|
311
312
|
export { Frame } from './components/frame/frame.js';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ark-ui/react",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.34.1",
|
|
5
5
|
"description": "A collection of unstyled, accessible UI components for React, utilizing state machines for seamless interaction.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"accordion",
|
|
@@ -150,70 +150,70 @@
|
|
|
150
150
|
"sideEffects": false,
|
|
151
151
|
"dependencies": {
|
|
152
152
|
"@internationalized/date": "3.11.0",
|
|
153
|
-
"@zag-js/accordion": "1.35.
|
|
154
|
-
"@zag-js/anatomy": "1.35.
|
|
155
|
-
"@zag-js/angle-slider": "1.35.
|
|
156
|
-
"@zag-js/async-list": "1.35.
|
|
157
|
-
"@zag-js/auto-resize": "1.35.
|
|
158
|
-
"@zag-js/avatar": "1.35.
|
|
159
|
-
"@zag-js/carousel": "1.35.
|
|
160
|
-
"@zag-js/cascade-select": "1.35.
|
|
161
|
-
"@zag-js/checkbox": "1.35.
|
|
162
|
-
"@zag-js/clipboard": "1.35.
|
|
163
|
-
"@zag-js/collapsible": "1.35.
|
|
164
|
-
"@zag-js/collection": "1.35.
|
|
165
|
-
"@zag-js/color-picker": "1.35.
|
|
166
|
-
"@zag-js/color-utils": "1.35.
|
|
167
|
-
"@zag-js/combobox": "1.35.
|
|
168
|
-
"@zag-js/core": "1.35.
|
|
169
|
-
"@zag-js/date-picker": "1.35.
|
|
170
|
-
"@zag-js/date-utils": "1.35.
|
|
171
|
-
"@zag-js/dialog": "1.35.
|
|
172
|
-
"@zag-js/dom-query": "1.35.
|
|
173
|
-
"@zag-js/drawer": "1.35.
|
|
174
|
-
"@zag-js/editable": "1.35.
|
|
175
|
-
"@zag-js/file-upload": "1.35.
|
|
176
|
-
"@zag-js/file-utils": "1.35.
|
|
177
|
-
"@zag-js/floating-panel": "1.35.
|
|
178
|
-
"@zag-js/focus-trap": "1.35.
|
|
179
|
-
"@zag-js/highlight-word": "1.35.
|
|
180
|
-
"@zag-js/hover-card": "1.35.
|
|
181
|
-
"@zag-js/i18n-utils": "1.35.
|
|
182
|
-
"@zag-js/image-cropper": "1.35.
|
|
183
|
-
"@zag-js/json-tree-utils": "1.35.
|
|
184
|
-
"@zag-js/listbox": "1.35.
|
|
185
|
-
"@zag-js/marquee": "1.35.
|
|
186
|
-
"@zag-js/menu": "1.35.
|
|
187
|
-
"@zag-js/navigation-menu": "1.35.
|
|
188
|
-
"@zag-js/number-input": "1.35.
|
|
189
|
-
"@zag-js/pagination": "1.35.
|
|
190
|
-
"@zag-js/password-input": "1.35.
|
|
191
|
-
"@zag-js/pin-input": "1.35.
|
|
192
|
-
"@zag-js/popover": "1.35.
|
|
193
|
-
"@zag-js/presence": "1.35.
|
|
194
|
-
"@zag-js/progress": "1.35.
|
|
195
|
-
"@zag-js/qr-code": "1.35.
|
|
196
|
-
"@zag-js/radio-group": "1.35.
|
|
197
|
-
"@zag-js/rating-group": "1.35.
|
|
198
|
-
"@zag-js/react": "1.35.
|
|
199
|
-
"@zag-js/scroll-area": "1.35.
|
|
200
|
-
"@zag-js/select": "1.35.
|
|
201
|
-
"@zag-js/signature-pad": "1.35.
|
|
202
|
-
"@zag-js/slider": "1.35.
|
|
203
|
-
"@zag-js/splitter": "1.35.
|
|
204
|
-
"@zag-js/steps": "1.35.
|
|
205
|
-
"@zag-js/switch": "1.35.
|
|
206
|
-
"@zag-js/tabs": "1.35.
|
|
207
|
-
"@zag-js/tags-input": "1.35.
|
|
208
|
-
"@zag-js/timer": "1.35.
|
|
209
|
-
"@zag-js/toast": "1.35.
|
|
210
|
-
"@zag-js/toggle": "1.35.
|
|
211
|
-
"@zag-js/toggle-group": "1.35.
|
|
212
|
-
"@zag-js/tooltip": "1.35.
|
|
213
|
-
"@zag-js/tour": "1.35.
|
|
214
|
-
"@zag-js/tree-view": "1.35.
|
|
215
|
-
"@zag-js/types": "1.35.
|
|
216
|
-
"@zag-js/utils": "1.35.
|
|
153
|
+
"@zag-js/accordion": "1.35.3",
|
|
154
|
+
"@zag-js/anatomy": "1.35.3",
|
|
155
|
+
"@zag-js/angle-slider": "1.35.3",
|
|
156
|
+
"@zag-js/async-list": "1.35.3",
|
|
157
|
+
"@zag-js/auto-resize": "1.35.3",
|
|
158
|
+
"@zag-js/avatar": "1.35.3",
|
|
159
|
+
"@zag-js/carousel": "1.35.3",
|
|
160
|
+
"@zag-js/cascade-select": "1.35.3",
|
|
161
|
+
"@zag-js/checkbox": "1.35.3",
|
|
162
|
+
"@zag-js/clipboard": "1.35.3",
|
|
163
|
+
"@zag-js/collapsible": "1.35.3",
|
|
164
|
+
"@zag-js/collection": "1.35.3",
|
|
165
|
+
"@zag-js/color-picker": "1.35.3",
|
|
166
|
+
"@zag-js/color-utils": "1.35.3",
|
|
167
|
+
"@zag-js/combobox": "1.35.3",
|
|
168
|
+
"@zag-js/core": "1.35.3",
|
|
169
|
+
"@zag-js/date-picker": "1.35.3",
|
|
170
|
+
"@zag-js/date-utils": "1.35.3",
|
|
171
|
+
"@zag-js/dialog": "1.35.3",
|
|
172
|
+
"@zag-js/dom-query": "1.35.3",
|
|
173
|
+
"@zag-js/drawer": "1.35.3",
|
|
174
|
+
"@zag-js/editable": "1.35.3",
|
|
175
|
+
"@zag-js/file-upload": "1.35.3",
|
|
176
|
+
"@zag-js/file-utils": "1.35.3",
|
|
177
|
+
"@zag-js/floating-panel": "1.35.3",
|
|
178
|
+
"@zag-js/focus-trap": "1.35.3",
|
|
179
|
+
"@zag-js/highlight-word": "1.35.3",
|
|
180
|
+
"@zag-js/hover-card": "1.35.3",
|
|
181
|
+
"@zag-js/i18n-utils": "1.35.3",
|
|
182
|
+
"@zag-js/image-cropper": "1.35.3",
|
|
183
|
+
"@zag-js/json-tree-utils": "1.35.3",
|
|
184
|
+
"@zag-js/listbox": "1.35.3",
|
|
185
|
+
"@zag-js/marquee": "1.35.3",
|
|
186
|
+
"@zag-js/menu": "1.35.3",
|
|
187
|
+
"@zag-js/navigation-menu": "1.35.3",
|
|
188
|
+
"@zag-js/number-input": "1.35.3",
|
|
189
|
+
"@zag-js/pagination": "1.35.3",
|
|
190
|
+
"@zag-js/password-input": "1.35.3",
|
|
191
|
+
"@zag-js/pin-input": "1.35.3",
|
|
192
|
+
"@zag-js/popover": "1.35.3",
|
|
193
|
+
"@zag-js/presence": "1.35.3",
|
|
194
|
+
"@zag-js/progress": "1.35.3",
|
|
195
|
+
"@zag-js/qr-code": "1.35.3",
|
|
196
|
+
"@zag-js/radio-group": "1.35.3",
|
|
197
|
+
"@zag-js/rating-group": "1.35.3",
|
|
198
|
+
"@zag-js/react": "1.35.3",
|
|
199
|
+
"@zag-js/scroll-area": "1.35.3",
|
|
200
|
+
"@zag-js/select": "1.35.3",
|
|
201
|
+
"@zag-js/signature-pad": "1.35.3",
|
|
202
|
+
"@zag-js/slider": "1.35.3",
|
|
203
|
+
"@zag-js/splitter": "1.35.3",
|
|
204
|
+
"@zag-js/steps": "1.35.3",
|
|
205
|
+
"@zag-js/switch": "1.35.3",
|
|
206
|
+
"@zag-js/tabs": "1.35.3",
|
|
207
|
+
"@zag-js/tags-input": "1.35.3",
|
|
208
|
+
"@zag-js/timer": "1.35.3",
|
|
209
|
+
"@zag-js/toast": "1.35.3",
|
|
210
|
+
"@zag-js/toggle": "1.35.3",
|
|
211
|
+
"@zag-js/toggle-group": "1.35.3",
|
|
212
|
+
"@zag-js/tooltip": "1.35.3",
|
|
213
|
+
"@zag-js/tour": "1.35.3",
|
|
214
|
+
"@zag-js/tree-view": "1.35.3",
|
|
215
|
+
"@zag-js/types": "1.35.3",
|
|
216
|
+
"@zag-js/utils": "1.35.3"
|
|
217
217
|
},
|
|
218
218
|
"devDependencies": {
|
|
219
219
|
"@biomejs/biome": "2.4.4",
|