sit-onyx 1.3.0-dev-20251029130423 → 1.3.0-dev-20251029150535

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.
@@ -16,7 +16,7 @@ declare const _default: <TSelection extends OnyxCalendarSelectionMode>(__VLS_pro
16
16
  */
17
17
  actions?(): unknown;
18
18
  /**
19
- * Optional slot that is displayed inside each day, for custom calender content.
19
+ * Optional slot that is displayed inside each day, for custom calendar content.
20
20
  */
21
21
  day?(props: {
22
22
  /**
@@ -34,7 +34,7 @@ declare const _default: <TSelection extends OnyxCalendarSelectionMode>(__VLS_pro
34
34
  */
35
35
  actions?(): unknown;
36
36
  /**
37
- * Optional slot that is displayed inside each day, for custom calender content.
37
+ * Optional slot that is displayed inside each day, for custom calendar content.
38
38
  */
39
39
  day?(props: {
40
40
  /**
@@ -27,5 +27,9 @@ export type OnyxCalendarCellProps = DensityProp & {
27
27
  */
28
28
  rangeType?: CalendarCellRangeType;
29
29
  buttonAttributes?: HTMLAttributes;
30
+ /**
31
+ * Optional tooltip text
32
+ */
33
+ tooltipText?: string;
30
34
  };
31
35
  export type CalendarCellRangeType = "start" | "middle" | "end";
@@ -226,7 +226,8 @@
226
226
  },
227
227
  "calendar": {
228
228
  "todayButton": { "label": "Heute", "tooltip": "Springe zu Heute" },
229
- "calenderWeek": "KW",
229
+ "calendarWeek": "KW",
230
+ "calendarWeekButtonLabel": "Kalenderwoche {weekNumber} auswählen",
230
231
  "previousMonthButton": "Vorheriger Monat",
231
232
  "nextMonthButton": "Nächster Monat"
232
233
  },
@@ -229,7 +229,8 @@
229
229
  "label": "Today",
230
230
  "tooltip": "Jump to today"
231
231
  },
232
- "calenderWeek": "CW",
232
+ "calendarWeek": "CW",
233
+ "calendarWeekButtonLabel": "Select calendar week {weekNumber}",
233
234
  "previousMonthButton": "Previous month",
234
235
  "nextMonthButton": "Next month"
235
236
  },
@@ -229,7 +229,8 @@ declare const _default: {
229
229
  "label": "Today",
230
230
  "tooltip": "Jump to today"
231
231
  },
232
- "calenderWeek": "CW",
232
+ "calendarWeek": "CW",
233
+ "calendarWeekButtonLabel": "Select calendar week {weekNumber}",
233
234
  "previousMonthButton": "Previous month",
234
235
  "nextMonthButton": "Next month"
235
236
  },
@@ -354,7 +354,7 @@ const languageSelect = { "label": "Language", "headline": "Change language", "su
354
354
  const resizeHandle = { "label": "Drag to change width" };
355
355
  const fileUpload = { "select": "Select", "clickToUpload": "Click to select", "orDragAndDrop": "or drag and drop file", "maxFileSize": "Maximum file size", "inTotal": "in total", "maxFileCount": "Maximum {n} files to select in total", "allowedFileTypes": "Allowed file types: {types}", "hideFilesButton": "Hide all files", "revealFilesButton": "Show all files", "removeFile": "Remove file", "status": { "fileTypeError": "File with extension '.{extension}' is invalid", "fileSizeError": "File exceeds maximum allowed size of {size}", "maxFileSizeError": "Total size of all files exceeds maximum allowed of {size}", "maxCountError": "Number of files exceeds maximum allowed of {count}" } };
356
356
  const globalFAB = { "label": "Global actions" };
357
- const calendar = { "todayButton": { "label": "Today", "tooltip": "Jump to today" }, "calenderWeek": "CW", "previousMonthButton": "Previous month", "nextMonthButton": "Next month" };
357
+ const calendar = { "todayButton": { "label": "Today", "tooltip": "Jump to today" }, "calendarWeek": "CW", "calendarWeekButtonLabel": "Select calendar week {weekNumber}", "previousMonthButton": "Previous month", "nextMonthButton": "Next month" };
358
358
  const flyoutMenu = { "moreActions": "More actions", "toggleActions": { "click": "Click to toggle action visibility", "hover": "Hover/Focus to toggle action visibility" } };
359
359
  const slider = { "decreaseValue": "Decrease value by {n}", "increaseValue": "Increase value by {n}" };
360
360
  const enUS = {
@@ -549,7 +549,17 @@ const _unstableCreateCalendar = createBuilder((options) => {
549
549
  const index = WEEKDAYS.indexOf(weekStartDay);
550
550
  return names.slice(index).concat(names.slice(0, index));
551
551
  });
552
- const focusedDate = ref(/* @__PURE__ */ new Date());
552
+ const initialFocusedDate = () => {
553
+ const today = /* @__PURE__ */ new Date();
554
+ const view = viewMonth.value;
555
+ const isTodayInViewMonth = today.getFullYear() === view.getFullYear() && today.getMonth() === view.getMonth();
556
+ if (isTodayInViewMonth) {
557
+ return today;
558
+ } else {
559
+ return new Date(view.getFullYear(), view.getMonth(), 1);
560
+ }
561
+ };
562
+ const focusedDate = ref(initialFocusedDate());
553
563
  watch(
554
564
  () => toValue(options.modelValue),
555
565
  (newValue) => {
@@ -563,7 +573,8 @@ const _unstableCreateCalendar = createBuilder((options) => {
563
573
  newFocusDate = new Date(newValue);
564
574
  }
565
575
  if (newFocusDate) focusedDate.value = newFocusDate;
566
- }
576
+ },
577
+ { immediate: true }
567
578
  );
568
579
  const isToday = (date) => {
569
580
  return date.toDateString() === (/* @__PURE__ */ new Date()).toDateString();
@@ -733,6 +744,8 @@ const _unstableCreateCalendar = createBuilder((options) => {
733
744
  start.setHours(0, 0, 0, 0);
734
745
  const end = sortedRange.end ? new Date(sortedRange.end) : void 0;
735
746
  end?.setHours(23, 59, 59, 999);
747
+ if (date.toDateString() === start.toDateString() && date.toDateString() === end?.toDateString())
748
+ return;
736
749
  if (date.toDateString() === start.toDateString()) return "start";
737
750
  if (date.toDateString() === end?.toDateString()) return "end";
738
751
  if (end && isInDateRange(date, start, end)) return "middle";
@@ -4109,7 +4122,7 @@ const _hoisted_2$L = { class: "onyx-toast-message__content onyx-truncation-ellip
4109
4122
  const _hoisted_3$x = { class: "onyx-toast-message__headline onyx-text" };
4110
4123
  const _hoisted_4$m = { class: "onyx-truncation-ellipsis" };
4111
4124
  const _hoisted_5$g = ["aria-label"];
4112
- const _hoisted_6$c = {
4125
+ const _hoisted_6$b = {
4113
4126
  key: 0,
4114
4127
  class: "onyx-toast-message__description onyx-text--small onyx-truncation-multiline",
4115
4128
  tabindex: "0"
@@ -4147,7 +4160,7 @@ function _sfc_render$1i(_ctx, _cache, $props, $setup, $data, $options) {
4147
4160
  ]),
4148
4161
  $setup.props.description ? (openBlock(), createElementBlock(
4149
4162
  "p",
4150
- _hoisted_6$c,
4163
+ _hoisted_6$b,
4151
4164
  toDisplayString($setup.props.description),
4152
4165
  1
4153
4166
  /* TEXT */
@@ -5147,146 +5160,6 @@ function _sfc_render$15(_ctx, _cache, $props, $setup, $data, $options) {
5147
5160
  }
5148
5161
  const OnyxCard = /* @__PURE__ */ _export_sfc(_sfc_main$15, [["render", _sfc_render$15], ["__file", "/home/runner/work/onyx/onyx/packages/sit-onyx/src/components/OnyxCard/OnyxCard.vue"]]);
5149
5162
  const _sfc_main$14 = /* @__PURE__ */ defineComponent({
5150
- __name: "OnyxCalendarCell",
5151
- props: {
5152
- density: { type: null, required: false },
5153
- date: { type: Number, required: true },
5154
- size: { type: String, required: true },
5155
- is: { type: String, required: false, default: "div" },
5156
- disabled: { type: Boolean, required: false },
5157
- showAsDisabled: { type: Boolean, required: false },
5158
- color: { type: String, required: false },
5159
- backgroundColor: { type: String, required: false, default: "blank" },
5160
- rangeType: { type: String, required: false },
5161
- buttonAttributes: { type: Object, required: false }
5162
- },
5163
- setup(__props, { expose: __expose }) {
5164
- __expose();
5165
- const props = __props;
5166
- const slots = useSlots();
5167
- const { densityClass } = useDensity(props);
5168
- const contentAttributes = computed(() => {
5169
- return props.is === "button" ? { type: "button", disabled: props.disabled } : { "aria-disabled": props.disabled };
5170
- });
5171
- const __returned__ = { props, slots, densityClass, contentAttributes, get mergeVueProps() {
5172
- return mergeVueProps;
5173
- } };
5174
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
5175
- return __returned__;
5176
- }
5177
- });
5178
- const _hoisted_1$Q = { class: "onyx-calendar-cell__header" };
5179
- const _hoisted_2$F = { class: "onyx-calendar-cell__date-container" };
5180
- const _hoisted_3$s = { class: "onyx-calendar-cell__date" };
5181
- const _hoisted_4$l = {
5182
- key: 0,
5183
- class: "onyx-calendar-cell__main"
5184
- };
5185
- function _sfc_render$14(_ctx, _cache, $props, $setup, $data, $options) {
5186
- return openBlock(), createElementBlock(
5187
- "td",
5188
- {
5189
- class: normalizeClass([
5190
- "onyx-component",
5191
- "onyx-calendar-cell",
5192
- `onyx-calendar-cell--${$setup.props.backgroundColor}`,
5193
- `onyx-calendar-cell--${$setup.props.size}`,
5194
- $setup.densityClass,
5195
- {
5196
- [`onyx-calendar-cell--${$setup.props.color}`]: $setup.props.color,
5197
- [`onyx-calendar-cell--range-${$setup.props.rangeType}`]: $setup.props.rangeType
5198
- }
5199
- ])
5200
- },
5201
- [
5202
- (openBlock(), createBlock(resolveDynamicComponent($setup.props.is), mergeProps($setup.mergeVueProps($setup.contentAttributes, $setup.props.buttonAttributes), {
5203
- class: [
5204
- "onyx-calendar-cell__content",
5205
- {
5206
- "onyx-calendar-cell__content--disabled": $setup.props.is !== "button" && $setup.props.disabled || $setup.props.showAsDisabled
5207
- }
5208
- ]
5209
- }), {
5210
- default: withCtx(() => [
5211
- createElementVNode("div", _hoisted_1$Q, [
5212
- createElementVNode("div", _hoisted_2$F, [
5213
- createElementVNode(
5214
- "span",
5215
- _hoisted_3$s,
5216
- toDisplayString($setup.props.date),
5217
- 1
5218
- /* TEXT */
5219
- )
5220
- ])
5221
- ]),
5222
- !!$setup.slots.default ? (openBlock(), createElementBlock("div", _hoisted_4$l, [
5223
- renderSlot(_ctx.$slots, "default")
5224
- ])) : createCommentVNode("v-if", true)
5225
- ]),
5226
- _: 3
5227
- /* FORWARDED */
5228
- }, 16, ["class"]))
5229
- ],
5230
- 2
5231
- /* CLASS */
5232
- );
5233
- }
5234
- const OnyxCalendarCell = /* @__PURE__ */ _export_sfc(_sfc_main$14, [["render", _sfc_render$14], ["__file", "/home/runner/work/onyx/onyx/packages/sit-onyx/src/components/OnyxCalendarCell/OnyxCalendarCell.vue"]]);
5235
- const _sfc_main$13 = /* @__PURE__ */ defineComponent({
5236
- __name: "OnyxIconButton",
5237
- props: {
5238
- density: { type: null, required: false },
5239
- autofocus: { type: Boolean, required: false },
5240
- link: { type: null, required: false },
5241
- label: { type: String, required: true },
5242
- disabled: { type: [Boolean, Symbol], required: false, default: FORM_INJECTED_SYMBOL },
5243
- type: { type: null, required: false, default: "button" },
5244
- color: { type: null, required: false, default: "primary" },
5245
- loading: { type: Boolean, required: false },
5246
- icon: { type: String, required: false },
5247
- skeleton: { type: [Symbol, Boolean, Number], required: false, default: SKELETON_INJECTED_SYMBOL }
5248
- },
5249
- setup(__props, { expose: __expose }) {
5250
- __expose();
5251
- const props = __props;
5252
- const { densityClass } = useDensity(props);
5253
- const skeleton = useSkeletonContext(props);
5254
- const forwardProps = useForwardProps(props, ButtonOrLinkLayout);
5255
- const __returned__ = { props, densityClass, skeleton, forwardProps, ButtonOrLinkLayout, OnyxIcon, OnyxLoadingIndicator, OnyxSkeleton };
5256
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
5257
- return __returned__;
5258
- }
5259
- });
5260
- function _sfc_render$13(_ctx, _cache, $props, $setup, $data, $options) {
5261
- return $setup.skeleton ? (openBlock(), createBlock($setup["OnyxSkeleton"], {
5262
- key: 0,
5263
- class: normalizeClass(["onyx-icon-button-skeleton", $setup.densityClass])
5264
- }, null, 8, ["class"])) : (openBlock(), createBlock($setup["ButtonOrLinkLayout"], mergeProps({ key: 1 }, $setup.forwardProps, {
5265
- "aria-label": $setup.props.label,
5266
- title: $setup.props.label,
5267
- class: [
5268
- "onyx-component",
5269
- "onyx-icon-button",
5270
- `onyx-icon-button--${$setup.props.color}`,
5271
- { "onyx-icon-button--loading": $setup.props.loading },
5272
- $setup.densityClass
5273
- ]
5274
- }), {
5275
- default: withCtx(() => [
5276
- $setup.props.loading ? (openBlock(), createBlock($setup["OnyxLoadingIndicator"], {
5277
- key: 0,
5278
- type: "circle"
5279
- })) : $setup.props.icon ? (openBlock(), createBlock($setup["OnyxIcon"], {
5280
- key: 1,
5281
- icon: $setup.props.icon
5282
- }, null, 8, ["icon"])) : renderSlot(_ctx.$slots, "default", { key: 2 })
5283
- ]),
5284
- _: 3
5285
- /* FORWARDED */
5286
- }, 16, ["aria-label", "title", "class"]));
5287
- }
5288
- const OnyxIconButton = /* @__PURE__ */ _export_sfc(_sfc_main$13, [["render", _sfc_render$13], ["__file", "/home/runner/work/onyx/onyx/packages/sit-onyx/src/components/OnyxIconButton/OnyxIconButton.vue"]]);
5289
- const _sfc_main$12 = /* @__PURE__ */ defineComponent({
5290
5163
  __name: "OnyxTooltip",
5291
5164
  props: {
5292
5165
  density: { type: null, required: false },
@@ -5441,8 +5314,8 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
5441
5314
  return __returned__;
5442
5315
  }
5443
5316
  });
5444
- const _hoisted_1$P = { class: "onyx-tooltip--content" };
5445
- function _sfc_render$12(_ctx, _cache, $props, $setup, $data, $options) {
5317
+ const _hoisted_1$Q = { class: "onyx-tooltip--content" };
5318
+ function _sfc_render$14(_ctx, _cache, $props, $setup, $data, $options) {
5446
5319
  return openBlock(), createElementBlock(
5447
5320
  "div",
5448
5321
  {
@@ -5458,7 +5331,7 @@ function _sfc_render$12(_ctx, _cache, $props, $setup, $data, $options) {
5458
5331
  style: $setup.tooltipStyles
5459
5332
  }),
5460
5333
  [
5461
- createElementVNode("div", _hoisted_1$P, [
5334
+ createElementVNode("div", _hoisted_1$Q, [
5462
5335
  $setup.props.icon ? (openBlock(), createBlock($setup["OnyxIcon"], {
5463
5336
  key: 0,
5464
5337
  icon: $setup.props.icon,
@@ -5482,7 +5355,167 @@ function _sfc_render$12(_ctx, _cache, $props, $setup, $data, $options) {
5482
5355
  /* CLASS, STYLE */
5483
5356
  );
5484
5357
  }
5485
- const OnyxTooltip = /* @__PURE__ */ _export_sfc(_sfc_main$12, [["render", _sfc_render$12], ["__file", "/home/runner/work/onyx/onyx/packages/sit-onyx/src/components/OnyxTooltip/OnyxTooltip.vue"]]);
5358
+ const OnyxTooltip = /* @__PURE__ */ _export_sfc(_sfc_main$14, [["render", _sfc_render$14], ["__file", "/home/runner/work/onyx/onyx/packages/sit-onyx/src/components/OnyxTooltip/OnyxTooltip.vue"]]);
5359
+ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
5360
+ __name: "OnyxCalendarCell",
5361
+ props: {
5362
+ density: { type: null, required: false },
5363
+ date: { type: Number, required: true },
5364
+ size: { type: String, required: true },
5365
+ is: { type: String, required: false, default: "div" },
5366
+ disabled: { type: Boolean, required: false },
5367
+ showAsDisabled: { type: Boolean, required: false },
5368
+ color: { type: String, required: false },
5369
+ backgroundColor: { type: String, required: false, default: "blank" },
5370
+ rangeType: { type: String, required: false },
5371
+ buttonAttributes: { type: Object, required: false },
5372
+ tooltipText: { type: String, required: false }
5373
+ },
5374
+ setup(__props, { expose: __expose }) {
5375
+ __expose();
5376
+ const props = __props;
5377
+ const slots = useSlots();
5378
+ const { densityClass } = useDensity(props);
5379
+ const contentAttributes = computed(() => {
5380
+ return props.is === "button" ? { type: "button", disabled: props.disabled } : { "aria-disabled": props.disabled };
5381
+ });
5382
+ const __returned__ = { props, slots, densityClass, contentAttributes, get mergeVueProps() {
5383
+ return mergeVueProps;
5384
+ }, OnyxTooltip };
5385
+ Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
5386
+ return __returned__;
5387
+ }
5388
+ });
5389
+ const _hoisted_1$P = { class: "onyx-calendar-cell__header" };
5390
+ const _hoisted_2$F = { class: "onyx-calendar-cell__date-container" };
5391
+ const _hoisted_3$s = {
5392
+ key: 1,
5393
+ class: "onyx-calendar-cell__date"
5394
+ };
5395
+ const _hoisted_4$l = {
5396
+ key: 0,
5397
+ class: "onyx-calendar-cell__main"
5398
+ };
5399
+ function _sfc_render$13(_ctx, _cache, $props, $setup, $data, $options) {
5400
+ return openBlock(), createElementBlock(
5401
+ "td",
5402
+ {
5403
+ class: normalizeClass([
5404
+ "onyx-component",
5405
+ "onyx-calendar-cell",
5406
+ `onyx-calendar-cell--${$setup.props.backgroundColor}`,
5407
+ `onyx-calendar-cell--${$setup.props.size}`,
5408
+ $setup.densityClass,
5409
+ {
5410
+ [`onyx-calendar-cell--${$setup.props.color}`]: $setup.props.color,
5411
+ [`onyx-calendar-cell--range-${$setup.props.rangeType}`]: $setup.props.rangeType
5412
+ }
5413
+ ])
5414
+ },
5415
+ [
5416
+ (openBlock(), createBlock(resolveDynamicComponent($setup.props.is), mergeProps($setup.mergeVueProps($setup.contentAttributes, $setup.props.buttonAttributes), {
5417
+ class: [
5418
+ "onyx-calendar-cell__content",
5419
+ {
5420
+ "onyx-calendar-cell__content--disabled": $setup.props.is !== "button" && $setup.props.disabled || $setup.props.showAsDisabled
5421
+ }
5422
+ ]
5423
+ }), {
5424
+ default: withCtx(() => [
5425
+ createElementVNode("div", _hoisted_1$P, [
5426
+ createElementVNode("div", _hoisted_2$F, [
5427
+ $setup.props.tooltipText ? (openBlock(), createBlock($setup["OnyxTooltip"], {
5428
+ key: 0,
5429
+ text: $setup.props.tooltipText,
5430
+ "without-wedge": ""
5431
+ }, {
5432
+ default: withCtx(({ trigger }) => [
5433
+ createElementVNode(
5434
+ "span",
5435
+ mergeProps({ class: "onyx-calendar-cell__date" }, trigger),
5436
+ toDisplayString($setup.props.date),
5437
+ 17
5438
+ /* TEXT, FULL_PROPS */
5439
+ )
5440
+ ]),
5441
+ _: 1
5442
+ /* STABLE */
5443
+ }, 8, ["text"])) : (openBlock(), createElementBlock(
5444
+ "span",
5445
+ _hoisted_3$s,
5446
+ toDisplayString($setup.props.date),
5447
+ 1
5448
+ /* TEXT */
5449
+ ))
5450
+ ])
5451
+ ]),
5452
+ !!$setup.slots.default ? (openBlock(), createElementBlock("div", _hoisted_4$l, [
5453
+ renderSlot(_ctx.$slots, "default")
5454
+ ])) : createCommentVNode("v-if", true)
5455
+ ]),
5456
+ _: 3
5457
+ /* FORWARDED */
5458
+ }, 16, ["class"]))
5459
+ ],
5460
+ 2
5461
+ /* CLASS */
5462
+ );
5463
+ }
5464
+ const OnyxCalendarCell = /* @__PURE__ */ _export_sfc(_sfc_main$13, [["render", _sfc_render$13], ["__file", "/home/runner/work/onyx/onyx/packages/sit-onyx/src/components/OnyxCalendarCell/OnyxCalendarCell.vue"]]);
5465
+ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
5466
+ __name: "OnyxIconButton",
5467
+ props: {
5468
+ density: { type: null, required: false },
5469
+ autofocus: { type: Boolean, required: false },
5470
+ link: { type: null, required: false },
5471
+ label: { type: String, required: true },
5472
+ disabled: { type: [Boolean, Symbol], required: false, default: FORM_INJECTED_SYMBOL },
5473
+ type: { type: null, required: false, default: "button" },
5474
+ color: { type: null, required: false, default: "primary" },
5475
+ loading: { type: Boolean, required: false },
5476
+ icon: { type: String, required: false },
5477
+ skeleton: { type: [Symbol, Boolean, Number], required: false, default: SKELETON_INJECTED_SYMBOL }
5478
+ },
5479
+ setup(__props, { expose: __expose }) {
5480
+ __expose();
5481
+ const props = __props;
5482
+ const { densityClass } = useDensity(props);
5483
+ const skeleton = useSkeletonContext(props);
5484
+ const forwardProps = useForwardProps(props, ButtonOrLinkLayout);
5485
+ const __returned__ = { props, densityClass, skeleton, forwardProps, ButtonOrLinkLayout, OnyxIcon, OnyxLoadingIndicator, OnyxSkeleton };
5486
+ Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
5487
+ return __returned__;
5488
+ }
5489
+ });
5490
+ function _sfc_render$12(_ctx, _cache, $props, $setup, $data, $options) {
5491
+ return $setup.skeleton ? (openBlock(), createBlock($setup["OnyxSkeleton"], {
5492
+ key: 0,
5493
+ class: normalizeClass(["onyx-icon-button-skeleton", $setup.densityClass])
5494
+ }, null, 8, ["class"])) : (openBlock(), createBlock($setup["ButtonOrLinkLayout"], mergeProps({ key: 1 }, $setup.forwardProps, {
5495
+ "aria-label": $setup.props.label,
5496
+ title: $setup.props.label,
5497
+ class: [
5498
+ "onyx-component",
5499
+ "onyx-icon-button",
5500
+ `onyx-icon-button--${$setup.props.color}`,
5501
+ { "onyx-icon-button--loading": $setup.props.loading },
5502
+ $setup.densityClass
5503
+ ]
5504
+ }), {
5505
+ default: withCtx(() => [
5506
+ $setup.props.loading ? (openBlock(), createBlock($setup["OnyxLoadingIndicator"], {
5507
+ key: 0,
5508
+ type: "circle"
5509
+ })) : $setup.props.icon ? (openBlock(), createBlock($setup["OnyxIcon"], {
5510
+ key: 1,
5511
+ icon: $setup.props.icon
5512
+ }, null, 8, ["icon"])) : renderSlot(_ctx.$slots, "default", { key: 2 })
5513
+ ]),
5514
+ _: 3
5515
+ /* FORWARDED */
5516
+ }, 16, ["aria-label", "title", "class"]));
5517
+ }
5518
+ const OnyxIconButton = /* @__PURE__ */ _export_sfc(_sfc_main$12, [["render", _sfc_render$12], ["__file", "/home/runner/work/onyx/onyx/packages/sit-onyx/src/components/OnyxIconButton/OnyxIconButton.vue"]]);
5486
5519
  const _sfc_main$11 = /* @__PURE__ */ defineComponent({
5487
5520
  __name: "OnyxTag",
5488
5521
  props: {
@@ -5648,7 +5681,7 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
5648
5681
  };
5649
5682
  const tableHeaders = computed(() => {
5650
5683
  if (!props.showCalendarWeeks) return weekdayNames.value;
5651
- return [t.value("calendar.calenderWeek"), ...weekdayNames.value];
5684
+ return [t.value("calendar.calendarWeek"), ...weekdayNames.value];
5652
5685
  });
5653
5686
  const getDayRangeType = computed(() => {
5654
5687
  return (date) => {
@@ -5656,15 +5689,39 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
5656
5689
  if (!currentRange || currentRange.end || !hoveredDate.value) return getRangeType.value(date);
5657
5690
  return getRangeType.value(date, {
5658
5691
  start: currentRange.start,
5659
- end: hoveredDate.value
5692
+ end: hoveredDate.value.getTime() === currentRange.start.getTime() ? void 0 : hoveredDate.value
5660
5693
  });
5661
5694
  };
5662
5695
  });
5663
- const __returned__ = { props, emit, slots, modelValue, viewMonth, densityClass, skeleton, t, locale, d, calendarRef, width, calendarSize, disabled, min, max, weekStartDay, showCalendarWeeks, selectionMode, weeksToRender, weekdayNames, tableProps, cellProps, buttonProps, goToMonthByOffset, goToToday, isSelected, isToday, getRangeType, isDisabled, hoveredDate, hoverHandlers, tableHeaders, getDayRangeType, get iconChevronLeftSmall() {
5696
+ const selectWeek = (week) => {
5697
+ const newRange = {
5698
+ start: week.days[0].date,
5699
+ end: week.days.at(-1).date
5700
+ };
5701
+ modelValue.value = newRange;
5702
+ };
5703
+ const getWeekNumberProps = computed(() => {
5704
+ return (week) => {
5705
+ if (props.selectionMode !== "range") return;
5706
+ const startDisabled = isDisabled.value(week.days[0].date);
5707
+ const endDisabled = isDisabled.value(week.days[6].date);
5708
+ const disabled2 = startDisabled || endDisabled;
5709
+ return {
5710
+ role: "button",
5711
+ "aria-label": t.value("calendar.calendarWeekButtonLabel", { weekNumber: week.weekNumber }),
5712
+ "aria-disabled": disabled2,
5713
+ onClick: disabled2 ? void 0 : () => selectWeek(week)
5714
+ };
5715
+ };
5716
+ });
5717
+ const calendarWeeksDisplay = computed(
5718
+ () => `${t.value("calendar.calendarWeek")} ${weeksToRender.value[0]?.weekNumber} - ${weeksToRender.value[weeksToRender.value.length - 1]?.weekNumber} `
5719
+ );
5720
+ const __returned__ = { props, emit, slots, modelValue, viewMonth, densityClass, skeleton, t, locale, d, calendarRef, width, calendarSize, disabled, min, max, weekStartDay, showCalendarWeeks, selectionMode, weeksToRender, weekdayNames, tableProps, cellProps, buttonProps, goToMonthByOffset, goToToday, isSelected, isToday, getRangeType, isDisabled, hoveredDate, hoverHandlers, tableHeaders, getDayRangeType, selectWeek, getWeekNumberProps, calendarWeeksDisplay, get iconChevronLeftSmall() {
5664
5721
  return iconChevronLeftSmall;
5665
5722
  }, get iconChevronRightSmall() {
5666
5723
  return iconChevronRightSmall;
5667
- }, OnyxCalendarCell, OnyxHeadline, OnyxIconButton, OnyxSkeleton, OnyxTag };
5724
+ }, OnyxCalendarCell, OnyxHeadline, OnyxIconButton, OnyxSkeleton, OnyxSystemButton, OnyxTag };
5668
5725
  Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
5669
5726
  return __returned__;
5670
5727
  }
@@ -5674,10 +5731,6 @@ const _hoisted_2$D = { class: "control-container time-control-container" };
5674
5731
  const _hoisted_3$r = { class: "control-container" };
5675
5732
  const _hoisted_4$k = { class: "onyx-calendar__body" };
5676
5733
  const _hoisted_5$f = ["abbr"];
5677
- const _hoisted_6$b = {
5678
- key: 0,
5679
- scope: "row"
5680
- };
5681
5734
  function _sfc_render$10(_ctx, _cache, $props, $setup, $data, $options) {
5682
5735
  return $setup.skeleton ? (openBlock(), createElementBlock(
5683
5736
  "div",
@@ -5701,21 +5754,12 @@ function _sfc_render$10(_ctx, _cache, $props, $setup, $data, $options) {
5701
5754
  [
5702
5755
  createElementVNode("div", _hoisted_1$N, [
5703
5756
  createElementVNode("div", _hoisted_2$D, [
5704
- $setup.calendarSize !== "small" ? (openBlock(), createBlock($setup["OnyxTag"], {
5705
- key: 0,
5757
+ createVNode($setup["OnyxSystemButton"], {
5706
5758
  label: $setup.t("calendar.todayButton.label"),
5707
5759
  class: "control-container__today-btn",
5708
5760
  disabled: $setup.disabled === true,
5709
- clickable: $setup.t("calendar.todayButton.tooltip"),
5710
5761
  onClick: $setup.goToToday
5711
- }, null, 8, ["label", "disabled", "clickable", "onClick"])) : createCommentVNode("v-if", true),
5712
- createVNode($setup["OnyxIconButton"], {
5713
- label: $setup.t("calendar.previousMonthButton"),
5714
- color: "neutral",
5715
- icon: $setup.iconChevronLeftSmall,
5716
- disabled: $setup.disabled === true,
5717
- onClick: _cache[0] || (_cache[0] = ($event) => $setup.goToMonthByOffset(-1))
5718
- }, null, 8, ["label", "icon", "disabled"]),
5762
+ }, null, 8, ["label", "disabled", "onClick"]),
5719
5763
  createVNode($setup["OnyxHeadline"], {
5720
5764
  is: "h2",
5721
5765
  class: "control-container__date-display"
@@ -5730,7 +5774,21 @@ function _sfc_render$10(_ctx, _cache, $props, $setup, $data, $options) {
5730
5774
  _: 1
5731
5775
  /* STABLE */
5732
5776
  }),
5777
+ $setup.showCalendarWeeks && $setup.calendarSize === "big" ? (openBlock(), createBlock($setup["OnyxTag"], {
5778
+ key: 0,
5779
+ color: "primary",
5780
+ label: $setup.calendarWeeksDisplay
5781
+ }, null, 8, ["label"])) : createCommentVNode("v-if", true),
5733
5782
  createVNode($setup["OnyxIconButton"], {
5783
+ class: "control-container__prev-month-button",
5784
+ label: $setup.t("calendar.previousMonthButton"),
5785
+ color: "neutral",
5786
+ icon: $setup.iconChevronLeftSmall,
5787
+ disabled: $setup.disabled === true,
5788
+ onClick: _cache[0] || (_cache[0] = ($event) => $setup.goToMonthByOffset(-1))
5789
+ }, null, 8, ["label", "icon", "disabled"]),
5790
+ createVNode($setup["OnyxIconButton"], {
5791
+ class: "control-container__next-month-button",
5734
5792
  label: $setup.t("calendar.nextMonthButton"),
5735
5793
  color: "neutral",
5736
5794
  icon: $setup.iconChevronRightSmall,
@@ -5774,10 +5832,13 @@ function _sfc_render$10(_ctx, _cache, $props, $setup, $data, $options) {
5774
5832
  }, [
5775
5833
  $setup.showCalendarWeeks ? (openBlock(), createElementBlock(
5776
5834
  "th",
5777
- _hoisted_6$b,
5835
+ mergeProps({
5836
+ key: 0,
5837
+ scope: "row"
5838
+ }, { ref_for: true }, $setup.getWeekNumberProps(week)),
5778
5839
  toDisplayString(week.weekNumber),
5779
- 1
5780
- /* TEXT */
5840
+ 17
5841
+ /* TEXT, FULL_PROPS */
5781
5842
  )) : createCommentVNode("v-if", true),
5782
5843
  (openBlock(true), createElementBlock(
5783
5844
  Fragment,
@@ -5794,7 +5855,8 @@ function _sfc_render$10(_ctx, _cache, $props, $setup, $data, $options) {
5794
5855
  color: $setup.isSelected(day.date) ? "primary" : $setup.isToday(day.date) ? "neutral" : void 0,
5795
5856
  "background-color": [0, 6].includes(day.date.getDay()) ? "tinted" : "blank",
5796
5857
  "range-type": $setup.getDayRangeType(day.date),
5797
- size: $setup.calendarSize
5858
+ size: $setup.calendarSize,
5859
+ "tooltip-text": $setup.isToday(day.date) ? $setup.t("calendar.todayButton.label") : void 0
5798
5860
  }), createSlots({
5799
5861
  _: 2
5800
5862
  /* DYNAMIC */
@@ -5809,7 +5871,7 @@ function _sfc_render$10(_ctx, _cache, $props, $setup, $data, $options) {
5809
5871
  ]),
5810
5872
  key: "0"
5811
5873
  } : void 0
5812
- ]), 1040, ["is", "date", "button-attributes", "disabled", "show-as-disabled", "color", "background-color", "range-type", "size"]);
5874
+ ]), 1040, ["is", "date", "button-attributes", "disabled", "show-as-disabled", "color", "background-color", "range-type", "size", "tooltip-text"]);
5813
5875
  }),
5814
5876
  128
5815
5877
  /* KEYED_FRAGMENT */