@react-spectrum/labeledvalue 3.1.14-nightly.4623 → 3.1.14

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.
@@ -42,29 +42,29 @@ function $2a7417c2df2197f7$var$LabeledValue(props, ref) {
42
42
  value: value,
43
43
  formatOptions: formatOptions
44
44
  });
45
- if (typeof value === "object" && "start" in value && typeof value.start === "number" && typeof value.end === "number") children = /*#__PURE__*/ (0, ($parcel$interopDefault($lcZyr$react))).createElement($2a7417c2df2197f7$var$FormattedNumber, {
45
+ if (typeof value === 'object' && 'start' in value && typeof value.start === 'number' && typeof value.end === 'number') children = /*#__PURE__*/ (0, ($parcel$interopDefault($lcZyr$react))).createElement($2a7417c2df2197f7$var$FormattedNumber, {
46
46
  value: value,
47
47
  formatOptions: formatOptions
48
48
  });
49
- if (typeof value === "object" && "start" in value && typeof value.start !== "number" && typeof value.end !== "number") children = /*#__PURE__*/ (0, ($parcel$interopDefault($lcZyr$react))).createElement($2a7417c2df2197f7$var$FormattedDate, {
49
+ if (typeof value === 'object' && 'start' in value && typeof value.start !== 'number' && typeof value.end !== 'number') children = /*#__PURE__*/ (0, ($parcel$interopDefault($lcZyr$react))).createElement($2a7417c2df2197f7$var$FormattedDate, {
50
50
  value: value,
51
51
  formatOptions: formatOptions
52
52
  });
53
- if (typeof value === "number") children = /*#__PURE__*/ (0, ($parcel$interopDefault($lcZyr$react))).createElement($2a7417c2df2197f7$var$FormattedNumber, {
53
+ if (typeof value === 'number') children = /*#__PURE__*/ (0, ($parcel$interopDefault($lcZyr$react))).createElement($2a7417c2df2197f7$var$FormattedNumber, {
54
54
  value: value,
55
55
  formatOptions: formatOptions
56
56
  });
57
- if (typeof value === "object" && ("calendar" in value || "hour" in value) || value instanceof Date) children = /*#__PURE__*/ (0, ($parcel$interopDefault($lcZyr$react))).createElement($2a7417c2df2197f7$var$FormattedDate, {
57
+ if (typeof value === 'object' && ('calendar' in value || 'hour' in value) || value instanceof Date) children = /*#__PURE__*/ (0, ($parcel$interopDefault($lcZyr$react))).createElement($2a7417c2df2197f7$var$FormattedDate, {
58
58
  value: value,
59
59
  formatOptions: formatOptions
60
60
  });
61
- if (typeof value === "string") children = value;
61
+ if (typeof value === 'string') children = value;
62
62
  return /*#__PURE__*/ (0, ($parcel$interopDefault($lcZyr$react))).createElement((0, $lcZyr$reactspectrumlabel.Field), {
63
63
  ...props,
64
64
  wrapperProps: (0, $lcZyr$reactariautils.filterDOMProps)(props),
65
65
  ref: domRef,
66
66
  elementType: "span",
67
- wrapperClassName: (0, $lcZyr$reactspectrumutils.classNames)((0, ($parcel$interopDefault($eb2fc0ee655eff6b$exports))), "spectrum-LabeledValue")
67
+ wrapperClassName: (0, $lcZyr$reactspectrumutils.classNames)((0, ($parcel$interopDefault($eb2fc0ee655eff6b$exports))), 'spectrum-LabeledValue')
68
68
  }, /*#__PURE__*/ (0, ($parcel$interopDefault($lcZyr$react))).createElement("span", null, children));
69
69
  }
70
70
  function $2a7417c2df2197f7$var$FormattedStringList(props) {
@@ -74,16 +74,16 @@ function $2a7417c2df2197f7$var$FormattedStringList(props) {
74
74
  function $2a7417c2df2197f7$var$FormattedNumber(props) {
75
75
  let numberFormatter = (0, $lcZyr$reactariai18n.useNumberFormatter)(props.formatOptions);
76
76
  let value = props.value;
77
- if (typeof value === "object") return /*#__PURE__*/ (0, ($parcel$interopDefault($lcZyr$react))).createElement((0, ($parcel$interopDefault($lcZyr$react))).Fragment, null, numberFormatter.formatRange(value.start, value.end));
77
+ if (typeof value === 'object') return /*#__PURE__*/ (0, ($parcel$interopDefault($lcZyr$react))).createElement((0, ($parcel$interopDefault($lcZyr$react))).Fragment, null, numberFormatter.formatRange(value.start, value.end));
78
78
  return /*#__PURE__*/ (0, ($parcel$interopDefault($lcZyr$react))).createElement((0, ($parcel$interopDefault($lcZyr$react))).Fragment, null, numberFormatter.format(value));
79
79
  }
80
80
  function $2a7417c2df2197f7$var$FormattedDate(props) {
81
81
  let { value: value, formatOptions: formatOptions } = props;
82
- if (!formatOptions) formatOptions = $2a7417c2df2197f7$var$getDefaultFormatOptions("start" in value ? value.start : value);
82
+ if (!formatOptions) formatOptions = $2a7417c2df2197f7$var$getDefaultFormatOptions('start' in value ? value.start : value);
83
83
  let dateFormatter = (0, $lcZyr$reactariai18n.useDateFormatter)(formatOptions);
84
84
  let timeZone = dateFormatter.resolvedOptions().timeZone || (0, $lcZyr$internationalizeddate.getLocalTimeZone)();
85
85
  let final;
86
- if ("start" in value && "end" in value) {
86
+ if ('start' in value && 'end' in value) {
87
87
  let start = value.start;
88
88
  let end = value.end;
89
89
  start = $2a7417c2df2197f7$var$convertDateTime(start, timeZone);
@@ -94,34 +94,34 @@ function $2a7417c2df2197f7$var$FormattedDate(props) {
94
94
  return /*#__PURE__*/ (0, ($parcel$interopDefault($lcZyr$react))).createElement((0, ($parcel$interopDefault($lcZyr$react))).Fragment, null, dateFormatter.format(final));
95
95
  }
96
96
  function $2a7417c2df2197f7$var$convertDateTime(value, timeZone) {
97
- if ("timeZone" in value) return value.toDate();
98
- else if ("calendar" in value) return value.toDate(timeZone);
97
+ if ('timeZone' in value) return value.toDate();
98
+ else if ('calendar' in value) return value.toDate(timeZone);
99
99
  else if (!(value instanceof Date)) return $2a7417c2df2197f7$var$convertValue(value).toDate(timeZone);
100
100
  return value;
101
101
  }
102
102
  function $2a7417c2df2197f7$var$getDefaultFormatOptions(value) {
103
103
  if (value instanceof Date) return {
104
- dateStyle: "long",
105
- timeStyle: "short"
104
+ dateStyle: 'long',
105
+ timeStyle: 'short'
106
106
  };
107
- else if ("timeZone" in value) return {
108
- year: "numeric",
109
- month: "long",
110
- day: "numeric",
111
- hour: "numeric",
112
- minute: "numeric",
107
+ else if ('timeZone' in value) return {
108
+ year: 'numeric',
109
+ month: 'long',
110
+ day: 'numeric',
111
+ hour: 'numeric',
112
+ minute: 'numeric',
113
113
  timeZone: value.timeZone,
114
- timeZoneName: "short"
114
+ timeZoneName: 'short'
115
115
  };
116
- else if ("hour" in value && "year" in value) return {
117
- dateStyle: "long",
118
- timeStyle: "short"
116
+ else if ('hour' in value && 'year' in value) return {
117
+ dateStyle: 'long',
118
+ timeStyle: 'short'
119
119
  };
120
- else if ("hour" in value) return {
121
- timeStyle: "short"
120
+ else if ('hour' in value) return {
121
+ timeStyle: 'short'
122
122
  };
123
123
  else return {
124
- dateStyle: "long"
124
+ dateStyle: 'long'
125
125
  };
126
126
  }
127
127
  function $2a7417c2df2197f7$var$convertValue(value) {
@@ -36,29 +36,29 @@ function $3e9971be431adb24$var$LabeledValue(props, ref) {
36
36
  value: value,
37
37
  formatOptions: formatOptions
38
38
  });
39
- if (typeof value === "object" && "start" in value && typeof value.start === "number" && typeof value.end === "number") children = /*#__PURE__*/ (0, $fhlTD$react).createElement($3e9971be431adb24$var$FormattedNumber, {
39
+ if (typeof value === 'object' && 'start' in value && typeof value.start === 'number' && typeof value.end === 'number') children = /*#__PURE__*/ (0, $fhlTD$react).createElement($3e9971be431adb24$var$FormattedNumber, {
40
40
  value: value,
41
41
  formatOptions: formatOptions
42
42
  });
43
- if (typeof value === "object" && "start" in value && typeof value.start !== "number" && typeof value.end !== "number") children = /*#__PURE__*/ (0, $fhlTD$react).createElement($3e9971be431adb24$var$FormattedDate, {
43
+ if (typeof value === 'object' && 'start' in value && typeof value.start !== 'number' && typeof value.end !== 'number') children = /*#__PURE__*/ (0, $fhlTD$react).createElement($3e9971be431adb24$var$FormattedDate, {
44
44
  value: value,
45
45
  formatOptions: formatOptions
46
46
  });
47
- if (typeof value === "number") children = /*#__PURE__*/ (0, $fhlTD$react).createElement($3e9971be431adb24$var$FormattedNumber, {
47
+ if (typeof value === 'number') children = /*#__PURE__*/ (0, $fhlTD$react).createElement($3e9971be431adb24$var$FormattedNumber, {
48
48
  value: value,
49
49
  formatOptions: formatOptions
50
50
  });
51
- if (typeof value === "object" && ("calendar" in value || "hour" in value) || value instanceof Date) children = /*#__PURE__*/ (0, $fhlTD$react).createElement($3e9971be431adb24$var$FormattedDate, {
51
+ if (typeof value === 'object' && ('calendar' in value || 'hour' in value) || value instanceof Date) children = /*#__PURE__*/ (0, $fhlTD$react).createElement($3e9971be431adb24$var$FormattedDate, {
52
52
  value: value,
53
53
  formatOptions: formatOptions
54
54
  });
55
- if (typeof value === "string") children = value;
55
+ if (typeof value === 'string') children = value;
56
56
  return /*#__PURE__*/ (0, $fhlTD$react).createElement((0, $fhlTD$Field), {
57
57
  ...props,
58
58
  wrapperProps: (0, $fhlTD$filterDOMProps)(props),
59
59
  ref: domRef,
60
60
  elementType: "span",
61
- wrapperClassName: (0, $fhlTD$classNames)((0, ($parcel$interopDefault($fhlTD$fieldlabel_vars_cssmodulejs))), "spectrum-LabeledValue")
61
+ wrapperClassName: (0, $fhlTD$classNames)((0, ($parcel$interopDefault($fhlTD$fieldlabel_vars_cssmodulejs))), 'spectrum-LabeledValue')
62
62
  }, /*#__PURE__*/ (0, $fhlTD$react).createElement("span", null, children));
63
63
  }
64
64
  function $3e9971be431adb24$var$FormattedStringList(props) {
@@ -68,16 +68,16 @@ function $3e9971be431adb24$var$FormattedStringList(props) {
68
68
  function $3e9971be431adb24$var$FormattedNumber(props) {
69
69
  let numberFormatter = (0, $fhlTD$useNumberFormatter)(props.formatOptions);
70
70
  let value = props.value;
71
- if (typeof value === "object") return /*#__PURE__*/ (0, $fhlTD$react).createElement((0, $fhlTD$react).Fragment, null, numberFormatter.formatRange(value.start, value.end));
71
+ if (typeof value === 'object') return /*#__PURE__*/ (0, $fhlTD$react).createElement((0, $fhlTD$react).Fragment, null, numberFormatter.formatRange(value.start, value.end));
72
72
  return /*#__PURE__*/ (0, $fhlTD$react).createElement((0, $fhlTD$react).Fragment, null, numberFormatter.format(value));
73
73
  }
74
74
  function $3e9971be431adb24$var$FormattedDate(props) {
75
75
  let { value: value, formatOptions: formatOptions } = props;
76
- if (!formatOptions) formatOptions = $3e9971be431adb24$var$getDefaultFormatOptions("start" in value ? value.start : value);
76
+ if (!formatOptions) formatOptions = $3e9971be431adb24$var$getDefaultFormatOptions('start' in value ? value.start : value);
77
77
  let dateFormatter = (0, $fhlTD$useDateFormatter)(formatOptions);
78
78
  let timeZone = dateFormatter.resolvedOptions().timeZone || (0, $fhlTD$getLocalTimeZone)();
79
79
  let final;
80
- if ("start" in value && "end" in value) {
80
+ if ('start' in value && 'end' in value) {
81
81
  let start = value.start;
82
82
  let end = value.end;
83
83
  start = $3e9971be431adb24$var$convertDateTime(start, timeZone);
@@ -88,34 +88,34 @@ function $3e9971be431adb24$var$FormattedDate(props) {
88
88
  return /*#__PURE__*/ (0, $fhlTD$react).createElement((0, $fhlTD$react).Fragment, null, dateFormatter.format(final));
89
89
  }
90
90
  function $3e9971be431adb24$var$convertDateTime(value, timeZone) {
91
- if ("timeZone" in value) return value.toDate();
92
- else if ("calendar" in value) return value.toDate(timeZone);
91
+ if ('timeZone' in value) return value.toDate();
92
+ else if ('calendar' in value) return value.toDate(timeZone);
93
93
  else if (!(value instanceof Date)) return $3e9971be431adb24$var$convertValue(value).toDate(timeZone);
94
94
  return value;
95
95
  }
96
96
  function $3e9971be431adb24$var$getDefaultFormatOptions(value) {
97
97
  if (value instanceof Date) return {
98
- dateStyle: "long",
99
- timeStyle: "short"
98
+ dateStyle: 'long',
99
+ timeStyle: 'short'
100
100
  };
101
- else if ("timeZone" in value) return {
102
- year: "numeric",
103
- month: "long",
104
- day: "numeric",
105
- hour: "numeric",
106
- minute: "numeric",
101
+ else if ('timeZone' in value) return {
102
+ year: 'numeric',
103
+ month: 'long',
104
+ day: 'numeric',
105
+ hour: 'numeric',
106
+ minute: 'numeric',
107
107
  timeZone: value.timeZone,
108
- timeZoneName: "short"
108
+ timeZoneName: 'short'
109
109
  };
110
- else if ("hour" in value && "year" in value) return {
111
- dateStyle: "long",
112
- timeStyle: "short"
110
+ else if ('hour' in value && 'year' in value) return {
111
+ dateStyle: 'long',
112
+ timeStyle: 'short'
113
113
  };
114
- else if ("hour" in value) return {
115
- timeStyle: "short"
114
+ else if ('hour' in value) return {
115
+ timeStyle: 'short'
116
116
  };
117
117
  else return {
118
- dateStyle: "long"
118
+ dateStyle: 'long'
119
119
  };
120
120
  }
121
121
  function $3e9971be431adb24$var$convertValue(value) {
@@ -36,29 +36,29 @@ function $3e9971be431adb24$var$LabeledValue(props, ref) {
36
36
  value: value,
37
37
  formatOptions: formatOptions
38
38
  });
39
- if (typeof value === "object" && "start" in value && typeof value.start === "number" && typeof value.end === "number") children = /*#__PURE__*/ (0, $fhlTD$react).createElement($3e9971be431adb24$var$FormattedNumber, {
39
+ if (typeof value === 'object' && 'start' in value && typeof value.start === 'number' && typeof value.end === 'number') children = /*#__PURE__*/ (0, $fhlTD$react).createElement($3e9971be431adb24$var$FormattedNumber, {
40
40
  value: value,
41
41
  formatOptions: formatOptions
42
42
  });
43
- if (typeof value === "object" && "start" in value && typeof value.start !== "number" && typeof value.end !== "number") children = /*#__PURE__*/ (0, $fhlTD$react).createElement($3e9971be431adb24$var$FormattedDate, {
43
+ if (typeof value === 'object' && 'start' in value && typeof value.start !== 'number' && typeof value.end !== 'number') children = /*#__PURE__*/ (0, $fhlTD$react).createElement($3e9971be431adb24$var$FormattedDate, {
44
44
  value: value,
45
45
  formatOptions: formatOptions
46
46
  });
47
- if (typeof value === "number") children = /*#__PURE__*/ (0, $fhlTD$react).createElement($3e9971be431adb24$var$FormattedNumber, {
47
+ if (typeof value === 'number') children = /*#__PURE__*/ (0, $fhlTD$react).createElement($3e9971be431adb24$var$FormattedNumber, {
48
48
  value: value,
49
49
  formatOptions: formatOptions
50
50
  });
51
- if (typeof value === "object" && ("calendar" in value || "hour" in value) || value instanceof Date) children = /*#__PURE__*/ (0, $fhlTD$react).createElement($3e9971be431adb24$var$FormattedDate, {
51
+ if (typeof value === 'object' && ('calendar' in value || 'hour' in value) || value instanceof Date) children = /*#__PURE__*/ (0, $fhlTD$react).createElement($3e9971be431adb24$var$FormattedDate, {
52
52
  value: value,
53
53
  formatOptions: formatOptions
54
54
  });
55
- if (typeof value === "string") children = value;
55
+ if (typeof value === 'string') children = value;
56
56
  return /*#__PURE__*/ (0, $fhlTD$react).createElement((0, $fhlTD$Field), {
57
57
  ...props,
58
58
  wrapperProps: (0, $fhlTD$filterDOMProps)(props),
59
59
  ref: domRef,
60
60
  elementType: "span",
61
- wrapperClassName: (0, $fhlTD$classNames)((0, ($parcel$interopDefault($fhlTD$fieldlabel_vars_cssmodulejs))), "spectrum-LabeledValue")
61
+ wrapperClassName: (0, $fhlTD$classNames)((0, ($parcel$interopDefault($fhlTD$fieldlabel_vars_cssmodulejs))), 'spectrum-LabeledValue')
62
62
  }, /*#__PURE__*/ (0, $fhlTD$react).createElement("span", null, children));
63
63
  }
64
64
  function $3e9971be431adb24$var$FormattedStringList(props) {
@@ -68,16 +68,16 @@ function $3e9971be431adb24$var$FormattedStringList(props) {
68
68
  function $3e9971be431adb24$var$FormattedNumber(props) {
69
69
  let numberFormatter = (0, $fhlTD$useNumberFormatter)(props.formatOptions);
70
70
  let value = props.value;
71
- if (typeof value === "object") return /*#__PURE__*/ (0, $fhlTD$react).createElement((0, $fhlTD$react).Fragment, null, numberFormatter.formatRange(value.start, value.end));
71
+ if (typeof value === 'object') return /*#__PURE__*/ (0, $fhlTD$react).createElement((0, $fhlTD$react).Fragment, null, numberFormatter.formatRange(value.start, value.end));
72
72
  return /*#__PURE__*/ (0, $fhlTD$react).createElement((0, $fhlTD$react).Fragment, null, numberFormatter.format(value));
73
73
  }
74
74
  function $3e9971be431adb24$var$FormattedDate(props) {
75
75
  let { value: value, formatOptions: formatOptions } = props;
76
- if (!formatOptions) formatOptions = $3e9971be431adb24$var$getDefaultFormatOptions("start" in value ? value.start : value);
76
+ if (!formatOptions) formatOptions = $3e9971be431adb24$var$getDefaultFormatOptions('start' in value ? value.start : value);
77
77
  let dateFormatter = (0, $fhlTD$useDateFormatter)(formatOptions);
78
78
  let timeZone = dateFormatter.resolvedOptions().timeZone || (0, $fhlTD$getLocalTimeZone)();
79
79
  let final;
80
- if ("start" in value && "end" in value) {
80
+ if ('start' in value && 'end' in value) {
81
81
  let start = value.start;
82
82
  let end = value.end;
83
83
  start = $3e9971be431adb24$var$convertDateTime(start, timeZone);
@@ -88,34 +88,34 @@ function $3e9971be431adb24$var$FormattedDate(props) {
88
88
  return /*#__PURE__*/ (0, $fhlTD$react).createElement((0, $fhlTD$react).Fragment, null, dateFormatter.format(final));
89
89
  }
90
90
  function $3e9971be431adb24$var$convertDateTime(value, timeZone) {
91
- if ("timeZone" in value) return value.toDate();
92
- else if ("calendar" in value) return value.toDate(timeZone);
91
+ if ('timeZone' in value) return value.toDate();
92
+ else if ('calendar' in value) return value.toDate(timeZone);
93
93
  else if (!(value instanceof Date)) return $3e9971be431adb24$var$convertValue(value).toDate(timeZone);
94
94
  return value;
95
95
  }
96
96
  function $3e9971be431adb24$var$getDefaultFormatOptions(value) {
97
97
  if (value instanceof Date) return {
98
- dateStyle: "long",
99
- timeStyle: "short"
98
+ dateStyle: 'long',
99
+ timeStyle: 'short'
100
100
  };
101
- else if ("timeZone" in value) return {
102
- year: "numeric",
103
- month: "long",
104
- day: "numeric",
105
- hour: "numeric",
106
- minute: "numeric",
101
+ else if ('timeZone' in value) return {
102
+ year: 'numeric',
103
+ month: 'long',
104
+ day: 'numeric',
105
+ hour: 'numeric',
106
+ minute: 'numeric',
107
107
  timeZone: value.timeZone,
108
- timeZoneName: "short"
108
+ timeZoneName: 'short'
109
109
  };
110
- else if ("hour" in value && "year" in value) return {
111
- dateStyle: "long",
112
- timeStyle: "short"
110
+ else if ('hour' in value && 'year' in value) return {
111
+ dateStyle: 'long',
112
+ timeStyle: 'short'
113
113
  };
114
- else if ("hour" in value) return {
115
- timeStyle: "short"
114
+ else if ('hour' in value) return {
115
+ timeStyle: 'short'
116
116
  };
117
117
  else return {
118
- dateStyle: "long"
118
+ dateStyle: 'long'
119
119
  };
120
120
  }
121
121
  function $3e9971be431adb24$var$convertValue(value) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-spectrum/labeledvalue",
3
- "version": "3.1.14-nightly.4623+b294de874",
3
+ "version": "3.1.14",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -36,16 +36,16 @@
36
36
  "url": "https://github.com/adobe/react-spectrum"
37
37
  },
38
38
  "dependencies": {
39
- "@internationalized/date": "3.5.4-nightly.4623+b294de874",
40
- "@react-aria/i18n": "3.0.0-nightly.2911+b294de874",
41
- "@react-aria/utils": "3.0.0-nightly.2911+b294de874",
42
- "@react-spectrum/label": "3.16.6-nightly.4623+b294de874",
43
- "@react-spectrum/utils": "3.0.0-nightly.2911+b294de874",
44
- "@react-types/shared": "3.0.0-nightly.2911+b294de874",
39
+ "@internationalized/date": "^3.5.4",
40
+ "@react-aria/i18n": "^3.11.1",
41
+ "@react-aria/utils": "^3.24.1",
42
+ "@react-spectrum/label": "^3.16.6",
43
+ "@react-spectrum/utils": "^3.11.7",
44
+ "@react-types/shared": "^3.23.1",
45
45
  "@swc/helpers": "^0.5.0"
46
46
  },
47
47
  "devDependencies": {
48
- "@adobe/spectrum-css-temp": "3.0.0-nightly.2911+b294de874"
48
+ "@adobe/spectrum-css-temp": "3.0.0-alpha.1"
49
49
  },
50
50
  "peerDependencies": {
51
51
  "@react-spectrum/provider": "^3.0.0",
@@ -54,5 +54,5 @@
54
54
  "publishConfig": {
55
55
  "access": "public"
56
56
  },
57
- "gitHead": "b294de874c16fad64bc4b930ccee1c9ffeb1c20f"
57
+ "gitHead": "b77d7d594dff4dcfb5359bffbcfd18142b146433"
58
58
  }