@witchcraft/ui 0.4.1 → 0.4.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.
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "witchcraftUi",
3
3
  "configKey": "witchcraftUi",
4
- "version": "0.4.1",
4
+ "version": "0.4.3",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -2,7 +2,7 @@ import type { CalendarDate, ZonedDateTime } from "@internationalized/date";
2
2
  import type { RangeDate } from "../../types/index.js";
3
3
  type __VLS_Props = {
4
4
  useTime?: boolean;
5
- id: string;
5
+ id?: string;
6
6
  fallbackDate?: Date;
7
7
  timeZone?: string;
8
8
  updateInterval?: number;
@@ -14,7 +14,7 @@ import WIcon from "../WIcon/WIcon.vue";
14
14
  const attrs = useAttrs();
15
15
  const props = defineProps({
16
16
  useTime: { type: Boolean, required: false, default: false },
17
- id: { type: String, required: true },
17
+ id: { type: String, required: false },
18
18
  fallbackDate: { type: Date, required: false, default: (_) => getNow({ withTime: _.useTime ?? false }).toDate(_.timeZone ?? getLocalTimeZone()) },
19
19
  timeZone: { type: String, required: false, default: getLocalTimeZone() },
20
20
  updateInterval: { type: Number, required: false, default: 1e4 }
@@ -2,7 +2,7 @@ import type { CalendarDate, ZonedDateTime } from "@internationalized/date";
2
2
  import type { RangeDate } from "../../types/index.js";
3
3
  type __VLS_Props = {
4
4
  useTime?: boolean;
5
- id: string;
5
+ id?: string;
6
6
  fallbackDate?: Date;
7
7
  timeZone?: string;
8
8
  updateInterval?: number;
@@ -1,7 +1,7 @@
1
1
  import type { SingleDate } from "../../types/index.js";
2
2
  type __VLS_Props = {
3
3
  useTime?: boolean;
4
- id: string;
4
+ id?: string;
5
5
  fallbackDate?: Date;
6
6
  timeZone?: string;
7
7
  updateInterval?: number;
@@ -14,7 +14,7 @@ import WIcon from "../WIcon/WIcon.vue";
14
14
  const attrs = useAttrs();
15
15
  const props = defineProps({
16
16
  useTime: { type: Boolean, required: false, default: false },
17
- id: { type: String, required: true },
17
+ id: { type: String, required: false },
18
18
  fallbackDate: { type: Date, required: false, default: (_) => getNow({ withTime: _.useTime ?? false }).toDate(_.timeZone ?? getLocalTimeZone()) },
19
19
  timeZone: { type: String, required: false, default: getLocalTimeZone() },
20
20
  updateInterval: { type: Number, required: false, default: 1e4 }
@@ -1,7 +1,7 @@
1
1
  import type { SingleDate } from "../../types/index.js";
2
2
  type __VLS_Props = {
3
3
  useTime?: boolean;
4
- id: string;
4
+ id?: string;
5
5
  fallbackDate?: Date;
6
6
  timeZone?: string;
7
7
  updateInterval?: number;
@@ -54,11 +54,11 @@ export type RawNotificationEntry<TOptions extends string[] = ["Ok", "Cancel"], T
54
54
  message: string;
55
55
  component?: string | Component;
56
56
  /** Props for the custom component. By default the component is passed the message, the messageClasses, and the full notification. Both will be overriden if you set them on componentProps. */
57
- componentProps?: Record<string, any> & {
57
+ componentProps?: Record<string, any> & Partial<{
58
58
  notification: NotificationEntry;
59
59
  message: string;
60
60
  messageClasses: string;
61
- };
61
+ }>;
62
62
  /**
63
63
  * Attributes for the notification component itself. They are bound to the root of the element and the class property is merged with twMerge.
64
64
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@witchcraft/ui",
3
- "version": "0.4.1",
3
+ "version": "0.4.3",
4
4
  "description": "Vue component library.",
5
5
  "type": "module",
6
6
  "main": "./dist/runtime/main.lib.js",
@@ -22,7 +22,7 @@ const attrs = useAttrs()
22
22
 
23
23
  const props = withDefaults(defineProps<{
24
24
  useTime?: boolean
25
- id: string
25
+ id?: string
26
26
  fallbackDate?: Date
27
27
  timeZone?: string
28
28
  updateInterval?: number
@@ -20,7 +20,7 @@ const attrs = useAttrs()
20
20
 
21
21
  const props = withDefaults(defineProps<{
22
22
  useTime?: boolean
23
- id: string
23
+ id?: string
24
24
  fallbackDate?: Date
25
25
  timeZone?: string
26
26
  updateInterval?: number
@@ -237,7 +237,7 @@ export type RawNotificationEntry<
237
237
  message: string
238
238
  component?: string | Component
239
239
  /** Props for the custom component. By default the component is passed the message, the messageClasses, and the full notification. Both will be overriden if you set them on componentProps. */
240
- componentProps?: Record<string, any> & { notification: NotificationEntry, message: string, messageClasses: string }
240
+ componentProps?: Record<string, any> & Partial<{ notification: NotificationEntry, message: string, messageClasses: string }>
241
241
  /**
242
242
  * Attributes for the notification component itself. They are bound to the root of the element and the class property is merged with twMerge.
243
243
  *