@refraction-ui/react 0.19.0 → 0.19.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/index.js CHANGED
@@ -11918,7 +11918,7 @@ function createLocationSelector(options = {}) {
11918
11918
  onCountryChange,
11919
11919
  onLanguageChange
11920
11920
  } = options;
11921
- let state = {
11921
+ const state = {
11922
11922
  country: defaultCountry,
11923
11923
  language: defaultLanguage
11924
11924
  };
@@ -17472,11 +17472,7 @@ var DiffViewer = React51.forwardRef(
17472
17472
  children: [
17473
17473
  /* @__PURE__ */ jsxs("div", { style: { flex: 1, display: "flex", overflow: "hidden" }, children: [
17474
17474
  sidebarOpen && /* @__PURE__ */ jsxs("div", { className: sidebarVariants2({ theme }), style: { width: sidebarWidth }, children: [
17475
- /* @__PURE__ */ jsxs("div", { className: "px-2.5 py-2 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground", children: [
17476
- "Files (",
17477
- files.length,
17478
- ")"
17479
- ] }),
17475
+ /* @__PURE__ */ jsx("div", { className: "px-2.5 py-2 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground", children: `Files (${files.length})` }),
17480
17476
  files.map((f, i) => {
17481
17477
  const active = i === activeIdx;
17482
17478
  const fname = f.path.split("/").pop() || f.path;
@@ -17494,14 +17490,8 @@ var DiffViewer = React51.forwardRef(
17494
17490
  /* @__PURE__ */ jsx("span", { className: "text-[10px]", children: api.getFileStatusIcon(f.status) }),
17495
17491
  /* @__PURE__ */ jsx("span", { className: active ? "" : "opacity-70", children: fname }),
17496
17492
  /* @__PURE__ */ jsxs("span", { className: "ml-auto text-[10px]", children: [
17497
- /* @__PURE__ */ jsxs("span", { className: "text-green-500", children: [
17498
- "+",
17499
- f.additions
17500
- ] }),
17501
- f.deletions > 0 && /* @__PURE__ */ jsxs("span", { className: "text-red-500", children: [
17502
- "-",
17503
- f.deletions
17504
- ] })
17493
+ /* @__PURE__ */ jsx("span", { className: "text-green-500", children: `+${f.additions}` }),
17494
+ f.deletions > 0 && /* @__PURE__ */ jsx("span", { className: "text-red-500", children: `-${f.deletions}` })
17505
17495
  ] })
17506
17496
  ] }),
17507
17497
  dir && /* @__PURE__ */ jsx("div", { className: "text-[10px] opacity-50 mt-0.5 pl-4", children: dir })
@@ -18172,6 +18162,22 @@ var Checkbox = React51.forwardRef(
18172
18162
  Checkbox.displayName = "Checkbox";
18173
18163
 
18174
18164
  // ../date-picker/dist/index.js
18165
+ function padZero(n) {
18166
+ return n < 10 ? `0${n}` : `${n}`;
18167
+ }
18168
+ function formatDate(date, format, showTime) {
18169
+ if (!date) return "";
18170
+ const year = date.getFullYear();
18171
+ const month = padZero(date.getMonth() + 1);
18172
+ const day = padZero(date.getDate());
18173
+ const hours = padZero(date.getHours());
18174
+ const minutes = padZero(date.getMinutes());
18175
+ let result = format.replace("YYYY", String(year)).replace("MM", month).replace("DD", day);
18176
+ if (showTime) {
18177
+ result = result.replace("HH", hours).replace("mm", minutes);
18178
+ }
18179
+ return result;
18180
+ }
18175
18181
  var datePickerTriggerStyles = "inline-flex items-center gap-2 rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring cursor-pointer";
18176
18182
  cva({
18177
18183
  base: "inline-flex h-8 w-8 items-center justify-center rounded-md text-sm cursor-pointer hover:bg-accent hover:text-accent-foreground",
@@ -18203,7 +18209,7 @@ var DatePicker = React51.forwardRef(
18203
18209
  onChange(new Date(e.target.value));
18204
18210
  }
18205
18211
  };
18206
- return /* @__PURE__ */ jsx(
18212
+ const input = /* @__PURE__ */ jsx(
18207
18213
  "input",
18208
18214
  {
18209
18215
  ref,
@@ -18218,6 +18224,13 @@ var DatePicker = React51.forwardRef(
18218
18224
  ...props
18219
18225
  }
18220
18226
  );
18227
+ if (!format || !value) {
18228
+ return input;
18229
+ }
18230
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
18231
+ input,
18232
+ /* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground", children: formatDate(value, format, showTime) })
18233
+ ] });
18221
18234
  }
18222
18235
  );
18223
18236
  DatePicker.displayName = "DatePicker";
@@ -18513,7 +18526,6 @@ function createFileUpload(props = {}) {
18513
18526
  const dropZoneProps = {
18514
18527
  role: "button",
18515
18528
  "aria-label": "Drop files here or click to upload",
18516
- "aria-describedby": labelId,
18517
18529
  id: dropZoneId,
18518
18530
  tabIndex: 0
18519
18531
  };
@@ -23410,7 +23422,7 @@ function createPostHogHttpSink(options) {
23410
23422
  };
23411
23423
  }
23412
23424
  async function defaultLoad() {
23413
- const mod = await import('./module-XHEQRMQB.js');
23425
+ const mod = await import('./module-X3HTTRQK.js');
23414
23426
  return "default" in mod ? mod.default : mod;
23415
23427
  }
23416
23428
  function createPostHogClientSdkSink(options) {
@@ -23501,7 +23513,7 @@ function createPostHogSink(options) {
23501
23513
 
23502
23514
  // ../analytics-sink-posthog/dist/replay.js
23503
23515
  async function defaultLoad2() {
23504
- const mod = await import('./module-XHEQRMQB.js');
23516
+ const mod = await import('./module-X3HTTRQK.js');
23505
23517
  return "default" in mod ? mod.default : mod;
23506
23518
  }
23507
23519
  async function startSessionReplay(options) {