@sit-onyx/headless 0.2.0 → 0.3.0-dev-20251027101200

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.
@@ -9,7 +9,7 @@ export type CreateCalendarOptions = {
9
9
  weekStartDay: MaybeRefOrGetter<Weekday>;
10
10
  viewMonth: Ref<DateValue>;
11
11
  modelValue?: Ref<Nullable<DateValue | DateValue[] | DateRange>>;
12
- disabled?: MaybeRefOrGetter<boolean>;
12
+ disabled?: MaybeRefOrGetter<boolean | ((date: Date) => boolean)>;
13
13
  min?: MaybeRefOrGetter<Nullable<DateValue>>;
14
14
  max?: MaybeRefOrGetter<Nullable<DateValue>>;
15
15
  showCalendarWeeks?: MaybeRefOrGetter<boolean>;
package/dist/index.js CHANGED
@@ -109,7 +109,13 @@ const _unstableCreateCalendar = createBuilder((options) => {
109
109
  });
110
110
  const isDisabled = computed(() => {
111
111
  return (date) => {
112
- if (toValue(options.disabled)) return true;
112
+ const disabledPropValue = toValue(options.disabled);
113
+ if (typeof disabledPropValue === "boolean") {
114
+ if (disabledPropValue) return true;
115
+ }
116
+ if (typeof disabledPropValue === "function") {
117
+ if (disabledPropValue(date)) return true;
118
+ }
113
119
  const min = toValue(options.min);
114
120
  const minDate = min ? new Date(min) : void 0;
115
121
  minDate?.setHours(0, 0, 0, 0);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sit-onyx/headless",
3
3
  "description": "Headless composables for Vue",
4
- "version": "0.2.0",
4
+ "version": "0.3.0-dev-20251027101200",
5
5
  "type": "module",
6
6
  "author": "Schwarz IT KG",
7
7
  "license": "Apache-2.0",
@@ -32,8 +32,8 @@
32
32
  "url": "https://github.com/SchwarzIT/onyx/issues"
33
33
  },
34
34
  "peerDependencies": {
35
- "@playwright/experimental-ct-vue": "1.56.0",
36
- "@playwright/test": "1.56.0",
35
+ "@playwright/experimental-ct-vue": "1.56.1",
36
+ "@playwright/test": "1.56.1",
37
37
  "typescript": ">= 5",
38
38
  "vue": ">= 3.5.0"
39
39
  },