@mhome/ui 0.1.8 → 0.1.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mhome/ui",
3
- "version": "0.1.8",
3
+ "version": "0.1.10",
4
4
  "type": "module",
5
5
  "description": "mHome UI Component Library",
6
6
  "main": "dist/index.cjs.js",
@@ -34,6 +34,7 @@
34
34
  "dependencies": {
35
35
  "class-variance-authority": "^0.7.1",
36
36
  "clsx": "^2.1.1",
37
+ "dayjs": "^1.11.10",
37
38
  "tailwind-merge": "^3.4.0"
38
39
  },
39
40
  "devDependencies": {
@@ -1,8 +1,13 @@
1
1
  import * as React from "react";
2
2
  import { cn } from "../lib/utils";
3
3
  import { TextField } from "./text-field";
4
+ // Import dayjs - handle both ESM and CJS formats
5
+ // dayjs is a CommonJS module that exports the function directly
6
+ // When imported as namespace, the function is available directly
4
7
  import * as dayjsModule from "dayjs";
5
- const dayjs = dayjsModule.default || dayjsModule;
8
+ // In CommonJS/UMD, dayjsModule is the function itself
9
+ // In ESM, it's wrapped in namespace, but the function is still accessible
10
+ const dayjs = typeof dayjsModule === "function" ? dayjsModule : dayjsModule;
6
11
 
7
12
  const DatePicker = React.forwardRef(
8
13
  (
@@ -335,17 +335,17 @@ const DialogHeaderContext = React.createContext(false);
335
335
 
336
336
  const DialogHeader = ({ className, ...props }) => (
337
337
  <DialogHeaderContext.Provider value={true}>
338
- <div
339
- className={cn(
340
- "flex flex-col space-y-1.5 px-6 pt-6",
341
- className
342
- )}
343
- style={{
344
- textAlign: "left", // Ensure left alignment for all children
345
- ...props.style,
346
- }}
347
- {...props}
348
- />
338
+ <div
339
+ className={cn(
340
+ "flex flex-col space-y-1.5 px-6 pt-6",
341
+ className
342
+ )}
343
+ style={{
344
+ textAlign: "left", // Ensure left alignment for all children
345
+ ...props.style,
346
+ }}
347
+ {...props}
348
+ />
349
349
  </DialogHeaderContext.Provider>
350
350
  );
351
351
  DialogHeader.displayName = "DialogHeader";