@apicurio/common-ui-components 2.0.2 → 2.0.3

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.
@@ -4,7 +4,7 @@ import { FunctionComponent } from 'react';
4
4
  * Properties
5
5
  */
6
6
  export type DateTimeProps = {
7
- date: Date | string | undefined;
7
+ date: Date | string | undefined | null;
8
8
  format?: string;
9
9
  locale?: string;
10
10
  };
@@ -1,6 +1,6 @@
1
1
  import { FunctionComponent } from 'react';
2
2
 
3
3
  export type FromNowProps = {
4
- date: Date | string | undefined;
4
+ date: Date | string | undefined | null;
5
5
  };
6
6
  export declare const FromNow: FunctionComponent<FromNowProps>;
package/dist/main.js CHANGED
@@ -2270,45 +2270,45 @@ const Ns = async (e, t) => {
2270
2270
  }
2271
2271
  );
2272
2272
  }, ti = (e) => {
2273
- var o;
2274
- const [t, s] = I(!1), i = (l, d) => {
2275
- s(!1), e.onSelect(e.items[d]);
2273
+ var l;
2274
+ const [t, s] = I(!1), i = (d, h) => {
2275
+ s(!1), e.onSelect(e.items[h]);
2276
2276
  }, r = () => {
2277
2277
  s(!t);
2278
- }, n = (l) => {
2279
- let d;
2280
- return e.itemToTestId !== void 0 && (d = e.itemToTestId(l)), d;
2278
+ }, n = (d) => {
2279
+ let h;
2280
+ return e.itemToTestId !== void 0 && (h = e.itemToTestId(d)), h;
2281
+ }, c = (d) => /* @__PURE__ */ a(
2282
+ ae,
2283
+ {
2284
+ ref: d,
2285
+ className: e.toggleClassname || "menu-toggle",
2286
+ onClick: r,
2287
+ "data-testid": e.testId,
2288
+ isExpanded: t,
2289
+ children: e.value ? e.itemToString(e.value) : e.noSelectionLabel
2290
+ }
2291
+ ), o = {
2292
+ appendTo: e.appendTo === "document" ? () => document.body : "inline"
2281
2293
  };
2282
2294
  return /* @__PURE__ */ a(
2283
2295
  Ie,
2284
2296
  {
2285
- toggle: (l) => /* @__PURE__ */ a(
2286
- ae,
2287
- {
2288
- ref: l,
2289
- className: e.toggleClassname || "menu-toggle",
2290
- onClick: r,
2291
- "data-testid": e.testId,
2292
- isExpanded: t,
2293
- children: e.value ? e.itemToString(e.value) : e.noSelectionLabel
2294
- }
2295
- ),
2297
+ toggle: c,
2296
2298
  id: e.toggleId,
2297
2299
  onSelect: i,
2298
2300
  onOpenChange: s,
2299
2301
  isOpen: t,
2300
- popperProps: {
2301
- appendTo: e.appendTo === "document" ? () => document.body : "inline"
2302
- },
2303
- children: (o = e.items) == null ? void 0 : o.map((l, d) => e.itemIsDivider && e.itemIsDivider(l) ? /* @__PURE__ */ a(ze, {}, d) : /* @__PURE__ */ a(
2302
+ popperProps: o,
2303
+ children: (l = e.items) == null ? void 0 : l.map((d, h) => e.itemIsDivider && e.itemIsDivider(d) ? /* @__PURE__ */ a(ze, {}, h) : /* @__PURE__ */ a(
2304
2304
  Ee,
2305
2305
  {
2306
- isSelected: l === e.value,
2307
- component: (h) => /* @__PURE__ */ a("button", { ...h, "data-testid": n(l) }),
2308
- value: d,
2309
- children: e.itemToString(l)
2306
+ isSelected: d === e.value,
2307
+ component: (g) => /* @__PURE__ */ a("button", { ...g, "data-testid": n(d) }),
2308
+ value: h,
2309
+ children: e.itemToString(d)
2310
2310
  },
2311
- d
2311
+ h
2312
2312
  ))
2313
2313
  }
2314
2314
  );
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@apicurio/common-ui-components",
3
3
  "private": false,
4
- "version": "2.0.2",
4
+ "version": "2.0.3",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",
7
7
  "types": "dist/main.d.ts",