@ark-ui/react 3.6.1 → 3.6.2

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.
@@ -3,7 +3,7 @@
3
3
 
4
4
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
5
5
 
6
- const string = require('../../node_modules/@internationalized/date/dist/string.cjs');
6
+ const date = require('@internationalized/date');
7
7
  const react$1 = require('@zag-js/react');
8
8
  const timePicker = require('@zag-js/time-picker');
9
9
  const react = require('react');
@@ -40,15 +40,15 @@ const useTimePicker = (props = {}) => {
40
40
  open: props.defaultOpen,
41
41
  "open.controlled": props.open !== void 0,
42
42
  ...props,
43
- min: props.min ? string.parseTime(props.min) : void 0,
44
- max: props.max ? string.parseTime(props.max) : void 0,
45
- value: props.defaultValue ? string.parseTime(props.defaultValue) : void 0
43
+ min: props.min ? date.parseTime(props.min) : void 0,
44
+ max: props.max ? date.parseTime(props.max) : void 0,
45
+ value: props.defaultValue ? date.parseTime(props.defaultValue) : void 0
46
46
  };
47
47
  const context = {
48
48
  ...initialContext,
49
- min: props.min ? string.parseTime(props.min) : void 0,
50
- max: props.max ? string.parseTime(props.max) : void 0,
51
- value: props.value ? string.parseTime(props.value) : void 0,
49
+ min: props.min ? date.parseTime(props.min) : void 0,
50
+ max: props.max ? date.parseTime(props.max) : void 0,
51
+ value: props.value ? date.parseTime(props.value) : void 0,
52
52
  onValueChange: useEvent.useEvent(props.onValueChange),
53
53
  onFocusChange: useEvent.useEvent(props.onFocusChange),
54
54
  onOpenChange: useEvent.useEvent(props.onOpenChange)
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { parseTime as $fae977aafc393c5c$export$c9698ec7f05a07e1 } from '../../node_modules/@internationalized/date/dist/string.js';
2
+ import { parseTime } from '@internationalized/date';
3
3
  import { useMachine, normalizeProps } from '@zag-js/react';
4
4
  import * as timePicker from '@zag-js/time-picker';
5
5
  import { useId } from 'react';
@@ -17,15 +17,15 @@ const useTimePicker = (props = {}) => {
17
17
  open: props.defaultOpen,
18
18
  "open.controlled": props.open !== void 0,
19
19
  ...props,
20
- min: props.min ? $fae977aafc393c5c$export$c9698ec7f05a07e1(props.min) : void 0,
21
- max: props.max ? $fae977aafc393c5c$export$c9698ec7f05a07e1(props.max) : void 0,
22
- value: props.defaultValue ? $fae977aafc393c5c$export$c9698ec7f05a07e1(props.defaultValue) : void 0
20
+ min: props.min ? parseTime(props.min) : void 0,
21
+ max: props.max ? parseTime(props.max) : void 0,
22
+ value: props.defaultValue ? parseTime(props.defaultValue) : void 0
23
23
  };
24
24
  const context = {
25
25
  ...initialContext,
26
- min: props.min ? $fae977aafc393c5c$export$c9698ec7f05a07e1(props.min) : void 0,
27
- max: props.max ? $fae977aafc393c5c$export$c9698ec7f05a07e1(props.max) : void 0,
28
- value: props.value ? $fae977aafc393c5c$export$c9698ec7f05a07e1(props.value) : void 0,
26
+ min: props.min ? parseTime(props.min) : void 0,
27
+ max: props.max ? parseTime(props.max) : void 0,
28
+ value: props.value ? parseTime(props.value) : void 0,
29
29
  onValueChange: useEvent(props.onValueChange),
30
30
  onFocusChange: useEvent(props.onFocusChange),
31
31
  onOpenChange: useEvent(props.onOpenChange)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ark-ui/react",
3
- "version": "3.6.1",
3
+ "version": "3.6.2",
4
4
  "description": "A collection of unstyled, accessible UI components for React, utilizing state machines for seamless interaction.",
5
5
  "keywords": [
6
6
  "accordion",
@@ -569,50 +569,51 @@
569
569
  },
570
570
  "sideEffects": false,
571
571
  "dependencies": {
572
- "@zag-js/accordion": "0.62.1",
573
- "@zag-js/anatomy": "0.62.1",
574
- "@zag-js/avatar": "0.62.1",
575
- "@zag-js/carousel": "0.62.1",
576
- "@zag-js/checkbox": "0.62.1",
577
- "@zag-js/clipboard": "0.62.1",
578
- "@zag-js/collapsible": "0.62.1",
579
- "@zag-js/color-picker": "0.62.1",
580
- "@zag-js/color-utils": "0.62.1",
581
- "@zag-js/combobox": "0.62.1",
582
- "@zag-js/core": "0.62.1",
583
- "@zag-js/date-picker": "0.62.1",
584
- "@zag-js/date-utils": "0.62.1",
585
- "@zag-js/dialog": "0.62.1",
586
- "@zag-js/dom-query": "0.62.1",
587
- "@zag-js/editable": "0.62.1",
588
- "@zag-js/file-upload": "0.62.1",
589
- "@zag-js/file-utils": "0.62.1",
590
- "@zag-js/hover-card": "0.62.1",
591
- "@zag-js/i18n-utils": "0.62.1",
592
- "@zag-js/menu": "0.62.1",
593
- "@zag-js/number-input": "0.62.1",
594
- "@zag-js/pagination": "0.62.1",
595
- "@zag-js/pin-input": "0.62.1",
596
- "@zag-js/popover": "0.62.1",
597
- "@zag-js/presence": "0.62.1",
598
- "@zag-js/progress": "0.62.1",
599
- "@zag-js/qr-code": "0.62.1",
600
- "@zag-js/radio-group": "0.62.1",
601
- "@zag-js/rating-group": "0.62.1",
602
- "@zag-js/react": "0.62.1",
603
- "@zag-js/select": "0.62.1",
604
- "@zag-js/signature-pad": "0.62.1",
605
- "@zag-js/slider": "0.62.1",
606
- "@zag-js/splitter": "0.62.1",
607
- "@zag-js/switch": "0.62.1",
608
- "@zag-js/tabs": "0.62.1",
609
- "@zag-js/tags-input": "0.62.1",
610
- "@zag-js/time-picker": "0.62.1",
611
- "@zag-js/toast": "0.62.1",
612
- "@zag-js/toggle-group": "0.62.1",
613
- "@zag-js/tooltip": "0.62.1",
614
- "@zag-js/tree-view": "0.62.1",
615
- "@zag-js/types": "0.62.1"
572
+ "@internationalized/date": "3.5.5",
573
+ "@zag-js/accordion": "0.63.0",
574
+ "@zag-js/anatomy": "0.63.0",
575
+ "@zag-js/avatar": "0.63.0",
576
+ "@zag-js/carousel": "0.63.0",
577
+ "@zag-js/checkbox": "0.63.0",
578
+ "@zag-js/clipboard": "0.63.0",
579
+ "@zag-js/collapsible": "0.63.0",
580
+ "@zag-js/color-picker": "0.63.0",
581
+ "@zag-js/color-utils": "0.63.0",
582
+ "@zag-js/combobox": "0.63.0",
583
+ "@zag-js/core": "0.63.0",
584
+ "@zag-js/date-picker": "0.63.0",
585
+ "@zag-js/date-utils": "0.63.0",
586
+ "@zag-js/dialog": "0.63.0",
587
+ "@zag-js/dom-query": "0.63.0",
588
+ "@zag-js/editable": "0.63.0",
589
+ "@zag-js/file-upload": "0.63.0",
590
+ "@zag-js/file-utils": "0.63.0",
591
+ "@zag-js/hover-card": "0.63.0",
592
+ "@zag-js/i18n-utils": "0.63.0",
593
+ "@zag-js/menu": "0.63.0",
594
+ "@zag-js/number-input": "0.63.0",
595
+ "@zag-js/pagination": "0.63.0",
596
+ "@zag-js/pin-input": "0.63.0",
597
+ "@zag-js/popover": "0.63.0",
598
+ "@zag-js/presence": "0.63.0",
599
+ "@zag-js/progress": "0.63.0",
600
+ "@zag-js/qr-code": "0.63.0",
601
+ "@zag-js/radio-group": "0.63.0",
602
+ "@zag-js/rating-group": "0.63.0",
603
+ "@zag-js/react": "0.63.0",
604
+ "@zag-js/select": "0.63.0",
605
+ "@zag-js/signature-pad": "0.63.0",
606
+ "@zag-js/slider": "0.63.0",
607
+ "@zag-js/splitter": "0.63.0",
608
+ "@zag-js/switch": "0.63.0",
609
+ "@zag-js/tabs": "0.63.0",
610
+ "@zag-js/tags-input": "0.63.0",
611
+ "@zag-js/time-picker": "0.63.0",
612
+ "@zag-js/toast": "0.63.0",
613
+ "@zag-js/toggle-group": "0.63.0",
614
+ "@zag-js/tooltip": "0.63.0",
615
+ "@zag-js/tree-view": "0.63.0",
616
+ "@zag-js/types": "0.63.0"
616
617
  },
617
618
  "devDependencies": {
618
619
  "@biomejs/biome": "1.8.3",
@@ -631,7 +632,7 @@
631
632
  "@vitejs/plugin-react": "4.3.1",
632
633
  "globby": "14.0.2",
633
634
  "jsdom": "24.1.1",
634
- "lucide-react": "0.414.0",
635
+ "lucide-react": "0.417.0",
635
636
  "react": "18.3.1",
636
637
  "react-dom": "18.3.1",
637
638
  "react-frame-component": "5.2.7",
@@ -640,7 +641,7 @@
640
641
  "resize-observer-polyfill": "1.5.1",
641
642
  "storybook": "8.2.6",
642
643
  "typescript": "5.5.4",
643
- "vite": "5.3.4",
644
+ "vite": "5.3.5",
644
645
  "vite-plugin-dts": "3.9.1",
645
646
  "vitest": "2.0.4",
646
647
  "vitest-axe": "1.0.0-pre.3"
@@ -1,52 +0,0 @@
1
- 'use client';
2
- 'use strict';
3
-
4
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
5
-
6
- const manipulation = require('./manipulation.cjs');
7
- const queries = require('./queries.cjs');
8
- const string = require('./string.cjs');
9
- const _class_private_field_init = require('../../../@swc/helpers/esm/_class_private_field_init.cjs');
10
-
11
- var // This prevents TypeScript from allowing other types with the same fields to match.
12
- // @ts-ignore
13
- $35ea8db9cb2ccb90$var$_type1 = /*#__PURE__*/ new WeakMap();
14
- class $35ea8db9cb2ccb90$export$680ea196effce5f {
15
- /** Returns a copy of this time. */ copy() {
16
- return new $35ea8db9cb2ccb90$export$680ea196effce5f(this.hour, this.minute, this.second, this.millisecond);
17
- }
18
- /** Returns a new `Time` with the given duration added to it. */ add(duration) {
19
- return (manipulation.addTime)(this, duration);
20
- }
21
- /** Returns a new `Time` with the given duration subtracted from it. */ subtract(duration) {
22
- return (manipulation.subtractTime)(this, duration);
23
- }
24
- /** Returns a new `Time` with the given fields set to the provided values. Other fields will be constrained accordingly. */ set(fields) {
25
- return (manipulation.setTime)(this, fields);
26
- }
27
- /**
28
- * Returns a new `Time` with the given field adjusted by a specified amount.
29
- * When the resulting value reaches the limits of the field, it wraps around.
30
- */ cycle(field, amount, options) {
31
- return (manipulation.cycleTime)(this, field, amount, options);
32
- }
33
- /** Converts the time to an ISO 8601 formatted string. */ toString() {
34
- return (string.timeToString)(this);
35
- }
36
- /** Compares this time with another. A negative result indicates that this time is before the given one, and a positive time indicates that it is after. */ compare(b) {
37
- return (queries.compareTime)(this, b);
38
- }
39
- constructor(hour = 0, minute = 0, second = 0, millisecond = 0){
40
- (_class_private_field_init._class_private_field_init)(this, $35ea8db9cb2ccb90$var$_type1, {
41
- writable: true,
42
- value: void 0
43
- });
44
- this.hour = hour;
45
- this.minute = minute;
46
- this.second = second;
47
- this.millisecond = millisecond;
48
- (manipulation.constrainTime)(this);
49
- }
50
- }
51
-
52
- exports.Time = $35ea8db9cb2ccb90$export$680ea196effce5f;
@@ -1,48 +0,0 @@
1
- 'use client';
2
- import { addTime as $735220c2d4774dd3$export$7ed87b6bc2506470, subtractTime as $735220c2d4774dd3$export$fe34d3a381cd7501, setTime as $735220c2d4774dd3$export$e5d5e1c1822b6e56, cycleTime as $735220c2d4774dd3$export$dd02b3e0007dfe28, constrainTime as $735220c2d4774dd3$export$7555de1e070510cb } from './manipulation.js';
3
- import { compareTime as $14e0f24ef4ac5c92$export$c19a80a9721b80f6 } from './queries.js';
4
- import { timeToString as $fae977aafc393c5c$export$f59dee82248f5ad4 } from './string.js';
5
- import { _class_private_field_init } from '../../../@swc/helpers/esm/_class_private_field_init.js';
6
-
7
- var // This prevents TypeScript from allowing other types with the same fields to match.
8
- // @ts-ignore
9
- $35ea8db9cb2ccb90$var$_type1 = /*#__PURE__*/ new WeakMap();
10
- class $35ea8db9cb2ccb90$export$680ea196effce5f {
11
- /** Returns a copy of this time. */ copy() {
12
- return new $35ea8db9cb2ccb90$export$680ea196effce5f(this.hour, this.minute, this.second, this.millisecond);
13
- }
14
- /** Returns a new `Time` with the given duration added to it. */ add(duration) {
15
- return ($735220c2d4774dd3$export$7ed87b6bc2506470)(this, duration);
16
- }
17
- /** Returns a new `Time` with the given duration subtracted from it. */ subtract(duration) {
18
- return ($735220c2d4774dd3$export$fe34d3a381cd7501)(this, duration);
19
- }
20
- /** Returns a new `Time` with the given fields set to the provided values. Other fields will be constrained accordingly. */ set(fields) {
21
- return ($735220c2d4774dd3$export$e5d5e1c1822b6e56)(this, fields);
22
- }
23
- /**
24
- * Returns a new `Time` with the given field adjusted by a specified amount.
25
- * When the resulting value reaches the limits of the field, it wraps around.
26
- */ cycle(field, amount, options) {
27
- return ($735220c2d4774dd3$export$dd02b3e0007dfe28)(this, field, amount, options);
28
- }
29
- /** Converts the time to an ISO 8601 formatted string. */ toString() {
30
- return ($fae977aafc393c5c$export$f59dee82248f5ad4)(this);
31
- }
32
- /** Compares this time with another. A negative result indicates that this time is before the given one, and a positive time indicates that it is after. */ compare(b) {
33
- return ($14e0f24ef4ac5c92$export$c19a80a9721b80f6)(this, b);
34
- }
35
- constructor(hour = 0, minute = 0, second = 0, millisecond = 0){
36
- (_class_private_field_init)(this, $35ea8db9cb2ccb90$var$_type1, {
37
- writable: true,
38
- value: void 0
39
- });
40
- this.hour = hour;
41
- this.minute = minute;
42
- this.second = second;
43
- this.millisecond = millisecond;
44
- ($735220c2d4774dd3$export$7555de1e070510cb)(this);
45
- }
46
- }
47
-
48
- export { $35ea8db9cb2ccb90$export$680ea196effce5f as Time };
@@ -1,108 +0,0 @@
1
- 'use client';
2
- 'use strict';
3
-
4
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
5
-
6
- function $735220c2d4774dd3$export$3e2544e88a25bff8(duration) {
7
- let inverseDuration = {};
8
- for(let key in duration)if (typeof duration[key] === 'number') inverseDuration[key] = -duration[key];
9
- return inverseDuration;
10
- }
11
- function $735220c2d4774dd3$export$e5d5e1c1822b6e56(value, fields) {
12
- let mutableValue = value.copy();
13
- if (fields.hour != null) mutableValue.hour = fields.hour;
14
- if (fields.minute != null) mutableValue.minute = fields.minute;
15
- if (fields.second != null) mutableValue.second = fields.second;
16
- if (fields.millisecond != null) mutableValue.millisecond = fields.millisecond;
17
- $735220c2d4774dd3$export$7555de1e070510cb(mutableValue);
18
- return mutableValue;
19
- }
20
- function $735220c2d4774dd3$var$balanceTime(time) {
21
- time.second += Math.floor(time.millisecond / 1000);
22
- time.millisecond = $735220c2d4774dd3$var$nonNegativeMod(time.millisecond, 1000);
23
- time.minute += Math.floor(time.second / 60);
24
- time.second = $735220c2d4774dd3$var$nonNegativeMod(time.second, 60);
25
- time.hour += Math.floor(time.minute / 60);
26
- time.minute = $735220c2d4774dd3$var$nonNegativeMod(time.minute, 60);
27
- let days = Math.floor(time.hour / 24);
28
- time.hour = $735220c2d4774dd3$var$nonNegativeMod(time.hour, 24);
29
- return days;
30
- }
31
- function $735220c2d4774dd3$export$7555de1e070510cb(time) {
32
- time.millisecond = Math.max(0, Math.min(time.millisecond, 1000));
33
- time.second = Math.max(0, Math.min(time.second, 59));
34
- time.minute = Math.max(0, Math.min(time.minute, 59));
35
- time.hour = Math.max(0, Math.min(time.hour, 23));
36
- }
37
- function $735220c2d4774dd3$var$nonNegativeMod(a, b) {
38
- let result = a % b;
39
- if (result < 0) result += b;
40
- return result;
41
- }
42
- function $735220c2d4774dd3$var$addTimeFields(time, duration) {
43
- time.hour += duration.hours || 0;
44
- time.minute += duration.minutes || 0;
45
- time.second += duration.seconds || 0;
46
- time.millisecond += duration.milliseconds || 0;
47
- return $735220c2d4774dd3$var$balanceTime(time);
48
- }
49
- function $735220c2d4774dd3$export$7ed87b6bc2506470(time, duration) {
50
- let res = time.copy();
51
- $735220c2d4774dd3$var$addTimeFields(res, duration);
52
- return res;
53
- }
54
- function $735220c2d4774dd3$export$fe34d3a381cd7501(time, duration) {
55
- return $735220c2d4774dd3$export$7ed87b6bc2506470(time, $735220c2d4774dd3$export$3e2544e88a25bff8(duration));
56
- }
57
- function $735220c2d4774dd3$export$dd02b3e0007dfe28(value, field, amount, options) {
58
- let mutable = value.copy();
59
- switch(field){
60
- case 'hour':
61
- {
62
- let hours = value.hour;
63
- let min = 0;
64
- let max = 23;
65
- if ((options === null || options === void 0 ? void 0 : options.hourCycle) === 12) {
66
- let isPM = hours >= 12;
67
- min = isPM ? 12 : 0;
68
- max = isPM ? 23 : 11;
69
- }
70
- mutable.hour = $735220c2d4774dd3$var$cycleValue(hours, amount, min, max, options === null || options === void 0 ? void 0 : options.round);
71
- break;
72
- }
73
- case 'minute':
74
- mutable.minute = $735220c2d4774dd3$var$cycleValue(value.minute, amount, 0, 59, options === null || options === void 0 ? void 0 : options.round);
75
- break;
76
- case 'second':
77
- mutable.second = $735220c2d4774dd3$var$cycleValue(value.second, amount, 0, 59, options === null || options === void 0 ? void 0 : options.round);
78
- break;
79
- case 'millisecond':
80
- mutable.millisecond = $735220c2d4774dd3$var$cycleValue(value.millisecond, amount, 0, 999, options === null || options === void 0 ? void 0 : options.round);
81
- break;
82
- default:
83
- throw new Error('Unsupported field ' + field);
84
- }
85
- return mutable;
86
- }
87
- function $735220c2d4774dd3$var$cycleValue(value, amount, min, max, round = false) {
88
- if (round) {
89
- value += Math.sign(amount);
90
- if (value < min) value = max;
91
- let div = Math.abs(amount);
92
- if (amount > 0) value = Math.ceil(value / div) * div;
93
- else value = Math.floor(value / div) * div;
94
- if (value > max) value = min;
95
- } else {
96
- value += amount;
97
- if (value < min) value = max - (min - value - 1);
98
- else if (value > max) value = min + (value - max - 1);
99
- }
100
- return value;
101
- }
102
-
103
- exports.addTime = $735220c2d4774dd3$export$7ed87b6bc2506470;
104
- exports.constrainTime = $735220c2d4774dd3$export$7555de1e070510cb;
105
- exports.cycleTime = $735220c2d4774dd3$export$dd02b3e0007dfe28;
106
- exports.invertDuration = $735220c2d4774dd3$export$3e2544e88a25bff8;
107
- exports.setTime = $735220c2d4774dd3$export$e5d5e1c1822b6e56;
108
- exports.subtractTime = $735220c2d4774dd3$export$fe34d3a381cd7501;
@@ -1,99 +0,0 @@
1
- 'use client';
2
- function $735220c2d4774dd3$export$3e2544e88a25bff8(duration) {
3
- let inverseDuration = {};
4
- for(let key in duration)if (typeof duration[key] === 'number') inverseDuration[key] = -duration[key];
5
- return inverseDuration;
6
- }
7
- function $735220c2d4774dd3$export$e5d5e1c1822b6e56(value, fields) {
8
- let mutableValue = value.copy();
9
- if (fields.hour != null) mutableValue.hour = fields.hour;
10
- if (fields.minute != null) mutableValue.minute = fields.minute;
11
- if (fields.second != null) mutableValue.second = fields.second;
12
- if (fields.millisecond != null) mutableValue.millisecond = fields.millisecond;
13
- $735220c2d4774dd3$export$7555de1e070510cb(mutableValue);
14
- return mutableValue;
15
- }
16
- function $735220c2d4774dd3$var$balanceTime(time) {
17
- time.second += Math.floor(time.millisecond / 1000);
18
- time.millisecond = $735220c2d4774dd3$var$nonNegativeMod(time.millisecond, 1000);
19
- time.minute += Math.floor(time.second / 60);
20
- time.second = $735220c2d4774dd3$var$nonNegativeMod(time.second, 60);
21
- time.hour += Math.floor(time.minute / 60);
22
- time.minute = $735220c2d4774dd3$var$nonNegativeMod(time.minute, 60);
23
- let days = Math.floor(time.hour / 24);
24
- time.hour = $735220c2d4774dd3$var$nonNegativeMod(time.hour, 24);
25
- return days;
26
- }
27
- function $735220c2d4774dd3$export$7555de1e070510cb(time) {
28
- time.millisecond = Math.max(0, Math.min(time.millisecond, 1000));
29
- time.second = Math.max(0, Math.min(time.second, 59));
30
- time.minute = Math.max(0, Math.min(time.minute, 59));
31
- time.hour = Math.max(0, Math.min(time.hour, 23));
32
- }
33
- function $735220c2d4774dd3$var$nonNegativeMod(a, b) {
34
- let result = a % b;
35
- if (result < 0) result += b;
36
- return result;
37
- }
38
- function $735220c2d4774dd3$var$addTimeFields(time, duration) {
39
- time.hour += duration.hours || 0;
40
- time.minute += duration.minutes || 0;
41
- time.second += duration.seconds || 0;
42
- time.millisecond += duration.milliseconds || 0;
43
- return $735220c2d4774dd3$var$balanceTime(time);
44
- }
45
- function $735220c2d4774dd3$export$7ed87b6bc2506470(time, duration) {
46
- let res = time.copy();
47
- $735220c2d4774dd3$var$addTimeFields(res, duration);
48
- return res;
49
- }
50
- function $735220c2d4774dd3$export$fe34d3a381cd7501(time, duration) {
51
- return $735220c2d4774dd3$export$7ed87b6bc2506470(time, $735220c2d4774dd3$export$3e2544e88a25bff8(duration));
52
- }
53
- function $735220c2d4774dd3$export$dd02b3e0007dfe28(value, field, amount, options) {
54
- let mutable = value.copy();
55
- switch(field){
56
- case 'hour':
57
- {
58
- let hours = value.hour;
59
- let min = 0;
60
- let max = 23;
61
- if ((options === null || options === void 0 ? void 0 : options.hourCycle) === 12) {
62
- let isPM = hours >= 12;
63
- min = isPM ? 12 : 0;
64
- max = isPM ? 23 : 11;
65
- }
66
- mutable.hour = $735220c2d4774dd3$var$cycleValue(hours, amount, min, max, options === null || options === void 0 ? void 0 : options.round);
67
- break;
68
- }
69
- case 'minute':
70
- mutable.minute = $735220c2d4774dd3$var$cycleValue(value.minute, amount, 0, 59, options === null || options === void 0 ? void 0 : options.round);
71
- break;
72
- case 'second':
73
- mutable.second = $735220c2d4774dd3$var$cycleValue(value.second, amount, 0, 59, options === null || options === void 0 ? void 0 : options.round);
74
- break;
75
- case 'millisecond':
76
- mutable.millisecond = $735220c2d4774dd3$var$cycleValue(value.millisecond, amount, 0, 999, options === null || options === void 0 ? void 0 : options.round);
77
- break;
78
- default:
79
- throw new Error('Unsupported field ' + field);
80
- }
81
- return mutable;
82
- }
83
- function $735220c2d4774dd3$var$cycleValue(value, amount, min, max, round = false) {
84
- if (round) {
85
- value += Math.sign(amount);
86
- if (value < min) value = max;
87
- let div = Math.abs(amount);
88
- if (amount > 0) value = Math.ceil(value / div) * div;
89
- else value = Math.floor(value / div) * div;
90
- if (value > max) value = min;
91
- } else {
92
- value += amount;
93
- if (value < min) value = max - (min - value - 1);
94
- else if (value > max) value = min + (value - max - 1);
95
- }
96
- return value;
97
- }
98
-
99
- export { $735220c2d4774dd3$export$7ed87b6bc2506470 as addTime, $735220c2d4774dd3$export$7555de1e070510cb as constrainTime, $735220c2d4774dd3$export$dd02b3e0007dfe28 as cycleTime, $735220c2d4774dd3$export$3e2544e88a25bff8 as invertDuration, $735220c2d4774dd3$export$e5d5e1c1822b6e56 as setTime, $735220c2d4774dd3$export$fe34d3a381cd7501 as subtractTime };
@@ -1,13 +0,0 @@
1
- 'use client';
2
- 'use strict';
3
-
4
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
5
-
6
- function $14e0f24ef4ac5c92$export$c19a80a9721b80f6(a, b) {
7
- return $14e0f24ef4ac5c92$var$timeToMs(a) - $14e0f24ef4ac5c92$var$timeToMs(b);
8
- }
9
- function $14e0f24ef4ac5c92$var$timeToMs(a) {
10
- return a.hour * 3600000 + a.minute * 60000 + a.second * 1000 + a.millisecond;
11
- }
12
-
13
- exports.compareTime = $14e0f24ef4ac5c92$export$c19a80a9721b80f6;
@@ -1,9 +0,0 @@
1
- 'use client';
2
- function $14e0f24ef4ac5c92$export$c19a80a9721b80f6(a, b) {
3
- return $14e0f24ef4ac5c92$var$timeToMs(a) - $14e0f24ef4ac5c92$var$timeToMs(b);
4
- }
5
- function $14e0f24ef4ac5c92$var$timeToMs(a) {
6
- return a.hour * 3600000 + a.minute * 60000 + a.second * 1000 + a.millisecond;
7
- }
8
-
9
- export { $14e0f24ef4ac5c92$export$c19a80a9721b80f6 as compareTime };
@@ -1,38 +0,0 @@
1
- 'use client';
2
- 'use strict';
3
-
4
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
5
-
6
- const CalendarDate = require('./CalendarDate.cjs');
7
-
8
- /*
9
- * Copyright 2020 Adobe. All rights reserved.
10
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
11
- * you may not use this file except in compliance with the License. You may obtain a copy
12
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
13
- *
14
- * Unless required by applicable law or agreed to in writing, software distributed under
15
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
16
- * OF ANY KIND, either express or implied. See the License for the specific language
17
- * governing permissions and limitations under the License.
18
- */
19
-
20
-
21
-
22
- const $fae977aafc393c5c$var$TIME_RE = /^(\d{2})(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/;
23
- function $fae977aafc393c5c$export$c9698ec7f05a07e1(value) {
24
- let m = value.match($fae977aafc393c5c$var$TIME_RE);
25
- if (!m) throw new Error('Invalid ISO 8601 time string: ' + value);
26
- return new (CalendarDate.Time)($fae977aafc393c5c$var$parseNumber(m[1], 0, 23), m[2] ? $fae977aafc393c5c$var$parseNumber(m[2], 0, 59) : 0, m[3] ? $fae977aafc393c5c$var$parseNumber(m[3], 0, 59) : 0, m[4] ? $fae977aafc393c5c$var$parseNumber(m[4], 0, Infinity) * 1000 : 0);
27
- }
28
- function $fae977aafc393c5c$var$parseNumber(value, min, max) {
29
- let val = Number(value);
30
- if (val < min || val > max) throw new RangeError(`Value out of range: ${min} <= ${val} <= ${max}`);
31
- return val;
32
- }
33
- function $fae977aafc393c5c$export$f59dee82248f5ad4(time) {
34
- return `${String(time.hour).padStart(2, '0')}:${String(time.minute).padStart(2, '0')}:${String(time.second).padStart(2, '0')}${time.millisecond ? String(time.millisecond / 1000).slice(1) : ''}`;
35
- }
36
-
37
- exports.parseTime = $fae977aafc393c5c$export$c9698ec7f05a07e1;
38
- exports.timeToString = $fae977aafc393c5c$export$f59dee82248f5ad4;
@@ -1,33 +0,0 @@
1
- 'use client';
2
- import { Time as $35ea8db9cb2ccb90$export$680ea196effce5f } from './CalendarDate.js';
3
-
4
- /*
5
- * Copyright 2020 Adobe. All rights reserved.
6
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
7
- * you may not use this file except in compliance with the License. You may obtain a copy
8
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software distributed under
11
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
12
- * OF ANY KIND, either express or implied. See the License for the specific language
13
- * governing permissions and limitations under the License.
14
- */
15
-
16
-
17
-
18
- const $fae977aafc393c5c$var$TIME_RE = /^(\d{2})(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/;
19
- function $fae977aafc393c5c$export$c9698ec7f05a07e1(value) {
20
- let m = value.match($fae977aafc393c5c$var$TIME_RE);
21
- if (!m) throw new Error('Invalid ISO 8601 time string: ' + value);
22
- return new ($35ea8db9cb2ccb90$export$680ea196effce5f)($fae977aafc393c5c$var$parseNumber(m[1], 0, 23), m[2] ? $fae977aafc393c5c$var$parseNumber(m[2], 0, 59) : 0, m[3] ? $fae977aafc393c5c$var$parseNumber(m[3], 0, 59) : 0, m[4] ? $fae977aafc393c5c$var$parseNumber(m[4], 0, Infinity) * 1000 : 0);
23
- }
24
- function $fae977aafc393c5c$var$parseNumber(value, min, max) {
25
- let val = Number(value);
26
- if (val < min || val > max) throw new RangeError(`Value out of range: ${min} <= ${val} <= ${max}`);
27
- return val;
28
- }
29
- function $fae977aafc393c5c$export$f59dee82248f5ad4(time) {
30
- return `${String(time.hour).padStart(2, '0')}:${String(time.minute).padStart(2, '0')}:${String(time.second).padStart(2, '0')}${time.millisecond ? String(time.millisecond / 1000).slice(1) : ''}`;
31
- }
32
-
33
- export { $fae977aafc393c5c$export$c9698ec7f05a07e1 as parseTime, $fae977aafc393c5c$export$f59dee82248f5ad4 as timeToString };
@@ -1,13 +0,0 @@
1
- 'use client';
2
- 'use strict';
3
-
4
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
5
-
6
- function _check_private_redeclaration(obj, privateCollection) {
7
- if (privateCollection.has(obj)) {
8
- throw new TypeError("Cannot initialize the same private elements twice on an object");
9
- }
10
- }
11
-
12
- exports._ = _check_private_redeclaration;
13
- exports._check_private_redeclaration = _check_private_redeclaration;
@@ -1,8 +0,0 @@
1
- 'use client';
2
- function _check_private_redeclaration(obj, privateCollection) {
3
- if (privateCollection.has(obj)) {
4
- throw new TypeError("Cannot initialize the same private elements twice on an object");
5
- }
6
- }
7
-
8
- export { _check_private_redeclaration as _, _check_private_redeclaration };
@@ -1,14 +0,0 @@
1
- 'use client';
2
- 'use strict';
3
-
4
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
5
-
6
- const _check_private_redeclaration = require('./_check_private_redeclaration.cjs');
7
-
8
- function _class_private_field_init(obj, privateMap, value) {
9
- _check_private_redeclaration._check_private_redeclaration(obj, privateMap);
10
- privateMap.set(obj, value);
11
- }
12
-
13
- exports._ = _class_private_field_init;
14
- exports._class_private_field_init = _class_private_field_init;
@@ -1,9 +0,0 @@
1
- 'use client';
2
- import { _check_private_redeclaration } from './_check_private_redeclaration.js';
3
-
4
- function _class_private_field_init(obj, privateMap, value) {
5
- _check_private_redeclaration(obj, privateMap);
6
- privateMap.set(obj, value);
7
- }
8
-
9
- export { _class_private_field_init as _, _class_private_field_init };