sit-onyx 1.2.0-dev-20251016073921 → 1.2.0-dev-20251016153744

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.
@@ -1,6 +1,6 @@
1
1
  import { HTMLAttributes } from 'vue';
2
2
  import { SkeletonInjected } from '../../composables/useSkeletonState.js';
3
- import { IfExtends, IfNotEmpty, MaybePick, RecordValues, UnionByKey } from '../../types/index.js';
3
+ import { IfExtends, IfNotEmpty, MaybeUnwrap, RecordValues, UnionByKey } from '../../types/index.js';
4
4
  import { OnyxHeadlineProps } from '../OnyxHeadline/types.js';
5
5
  import { OnyxTableProps } from '../OnyxTable/types.js';
6
6
  import { BASE_FEATURE } from './features/base/base.js';
@@ -21,7 +21,7 @@ export type MaybeArray<T> = T | Array<T>;
21
21
  * Unwraps the typeRenderers from the given feature(s).
22
22
  *
23
23
  */
24
- export type ColumnTypesFromFeatures<TFeatures extends MaybeArray<DataGridFeature<any, any, any>>> = IfExtends<RecordValues<MapTypeRenderOptions<IfNotEmpty<MaybePick<UnionByKey<ReturnType<TFeatures extends any[] ? TFeatures[number] : TFeatures>>, "typeRenderer">>>>, ColumnConfigTypeOption<PropertyKey, unknown>>;
24
+ export type ColumnTypesFromFeatures<TFeatures extends MaybeArray<DataGridFeature<any, any, any>>> = IfExtends<RecordValues<MapTypeRenderOptions<IfNotEmpty<MaybeUnwrap<UnionByKey<ReturnType<TFeatures extends any[] ? TFeatures[number] : TFeatures>>, "typeRenderer">>>>, ColumnConfigTypeOption<PropertyKey, unknown>>;
25
25
  /**
26
26
  * @experimental The DataGrid is still working in progress and the props will change in the future.
27
27
  */
@@ -2,9 +2,11 @@ import { Nullable } from '../../types/index.js';
2
2
  import { OnyxInputProps } from '../OnyxInput/types.js';
3
3
  export type OnyxDatePickerProps = Omit<OnyxInputProps, "type" | "modelValue" | "autocapitalize" | "maxlength" | "minlength" | "pattern" | "withCounter" | "placeholder" | "autocomplete"> & {
4
4
  /**
5
- * Current date value. Supports all data types that are parsable by `new Date()`.
5
+ * A date string compliant with [ISO8601](https://en.wikipedia.org/wiki/ISO_8601).
6
+ * @example "date.toISOString()"
7
+ * @example "2011-10-31"
6
8
  */
7
- modelValue?: Nullable<DateValue>;
9
+ modelValue?: Nullable<string>;
8
10
  /**
9
11
  * Whether the user should be able to select only date or date + time.
10
12
  */
@@ -17,7 +17,7 @@ declare function __VLS_template(): {
17
17
  };
18
18
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
19
19
  declare const __VLS_component: import('vue').DefineComponent<OnyxLinkProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<OnyxLinkProps> & Readonly<{}>, {
20
- target: import('../../index.js', { with: { "resolution-mode": "import" } }).LinkTarget;
20
+ target: import('../OnyxRouterLink/types.js', { with: { "resolution-mode": "import" } }).LinkTarget;
21
21
  withExternalIcon: boolean | "auto";
22
22
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLAnchorElement>;
23
23
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
@@ -468,6 +468,17 @@ const replacePlaceholders = (message, placeholders) => {
468
468
  replacedMessage = replacedMessage.replace(/{'(.*?)'}/g, "$1");
469
469
  return replacedMessage.replace(/{.*}\s?/gi, "");
470
470
  };
471
+ const useForwardProps = (props, target) => {
472
+ const keys = new Set(Object.keys(target.props ?? {}));
473
+ if (!target.props) {
474
+ userConsole?.error(
475
+ `The provided component does not have props. Please ensure that the target component is a valid Vue component. Functional components without defined properties are not supported.`
476
+ );
477
+ }
478
+ return computed(
479
+ () => Object.fromEntries(Object.entries(props).filter(([key]) => keys.has(key)))
480
+ );
481
+ };
471
482
  const createBuilder = (builder) => builder;
472
483
  function createElRef() {
473
484
  const elementRef = shallowRef();
@@ -1941,8 +1952,9 @@ const _sfc_main$1w = /* @__PURE__ */ defineComponent({
1941
1952
  setup(__props, { expose: __expose }) {
1942
1953
  __expose();
1943
1954
  const props = __props;
1955
+ const buttonOrLinkLayoutProps = useForwardProps(props, ButtonOrLinkLayout);
1944
1956
  const skeleton = useSkeletonContext(props);
1945
- const __returned__ = { props, skeleton, ButtonOrLinkLayout, OnyxIcon, OnyxSkeleton };
1957
+ const __returned__ = { props, buttonOrLinkLayoutProps, skeleton, ButtonOrLinkLayout, OnyxIcon, OnyxSkeleton };
1946
1958
  Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
1947
1959
  return __returned__;
1948
1960
  }
@@ -1951,7 +1963,7 @@ function _sfc_render$1w(_ctx, _cache, $props, $setup, $data, $options) {
1951
1963
  return $setup.skeleton ? (openBlock(), createBlock($setup["OnyxSkeleton"], {
1952
1964
  key: 0,
1953
1965
  class: normalizeClass(["onyx-system-button-skeleton", $setup.props.icon ? "" : "onyx-system-button-skeleton--text"])
1954
- }, null, 8, ["class"])) : (openBlock(), createBlock($setup["ButtonOrLinkLayout"], mergeProps({ key: 1 }, $setup.props, {
1966
+ }, null, 8, ["class"])) : (openBlock(), createBlock($setup["ButtonOrLinkLayout"], mergeProps({ key: 1 }, $setup.buttonOrLinkLayoutProps, {
1955
1967
  type: "button",
1956
1968
  class: ["onyx-system-button", "onyx-text--small", `onyx-system-button--${$setup.props.color}`],
1957
1969
  "aria-label": $setup.props.label,
@@ -1993,11 +2005,12 @@ const _sfc_main$1v = /* @__PURE__ */ defineComponent({
1993
2005
  setup(__props, { expose: __expose, emit: __emit }) {
1994
2006
  __expose();
1995
2007
  const props = __props;
2008
+ const dialogProps = useForwardProps(props, OnyxBasicDialog);
1996
2009
  const emit = __emit;
1997
2010
  const { t } = injectI18n();
1998
2011
  const { densityClass } = useDensity(props);
1999
2012
  const describedById = useId();
2000
- const __returned__ = { props, emit, t, densityClass, describedById, get iconXSmall() {
2013
+ const __returned__ = { props, dialogProps, emit, t, densityClass, describedById, get iconXSmall() {
2001
2014
  return iconXSmall;
2002
2015
  }, OnyxBasicDialog, OnyxHeadline, OnyxIcon, OnyxSystemButton };
2003
2016
  Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
@@ -2011,7 +2024,7 @@ const _hoisted_4$l = { class: "onyx-alert-modal__actions" };
2011
2024
  function _sfc_render$1v(_ctx, _cache, $props, $setup, $data, $options) {
2012
2025
  return openBlock(), createBlock($setup["OnyxBasicDialog"], mergeProps({
2013
2026
  class: ["onyx-alert-modal", $setup.densityClass]
2014
- }, $setup.props, {
2027
+ }, $setup.dialogProps, {
2015
2028
  "aria-describedby": $setup.describedById,
2016
2029
  modal: "",
2017
2030
  alert: "",
@@ -2807,6 +2820,7 @@ const _sfc_main$1r = /* @__PURE__ */ defineComponent({
2807
2820
  const slots = useSlots();
2808
2821
  const { densityClass } = useDensity(props);
2809
2822
  const skeleton = useSkeletonContext(props);
2823
+ const fabButtonProps = useForwardProps(props, OnyxFABButton);
2810
2824
  const isExpanded = useVModel({
2811
2825
  props,
2812
2826
  emit,
@@ -2818,7 +2832,7 @@ const _sfc_main$1r = /* @__PURE__ */ defineComponent({
2818
2832
  if (!hasOptions.value) return props.icon;
2819
2833
  return isExpanded.value ? iconX : iconMoreHorizontalSmall;
2820
2834
  });
2821
- const __returned__ = { props, emit, slots, densityClass, skeleton, isExpanded, hasOptions, triggerIcon, get mergeVueProps() {
2835
+ const __returned__ = { props, emit, slots, densityClass, skeleton, fabButtonProps, isExpanded, hasOptions, triggerIcon, get mergeVueProps() {
2822
2836
  return mergeVueProps;
2823
2837
  }, OnyxFABButton, OnyxFlyoutMenu };
2824
2838
  Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
@@ -2829,7 +2843,7 @@ function _sfc_render$1r(_ctx, _cache, $props, $setup, $data, $options) {
2829
2843
  return !$setup.hasOptions || $setup.skeleton ? (openBlock(), createBlock($setup["OnyxFABButton"], mergeProps({
2830
2844
  key: 0,
2831
2845
  class: ["onyx-fab", `onyx-fab--${$setup.props.alignment}`]
2832
- }, $setup.props, {
2846
+ }, $setup.fabButtonProps, {
2833
2847
  icon: $setup.triggerIcon,
2834
2848
  skeleton: $setup.skeleton
2835
2849
  }), null, 16, ["class", "icon", "skeleton"])) : (openBlock(), createBlock($setup["OnyxFlyoutMenu"], {
@@ -3147,12 +3161,13 @@ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
3147
3161
  setup(__props, { expose: __expose }) {
3148
3162
  __expose();
3149
3163
  const props = __props;
3164
+ const forwardProps = useForwardProps(props, ButtonOrLinkLayout);
3150
3165
  const { densityClass } = useDensity(props);
3151
3166
  const { disabled } = useFormContext(props);
3152
3167
  const skeleton = useSkeletonContext(props);
3153
3168
  const ripple = useTemplateRef("rippleRef");
3154
3169
  const rippleEvents = computed(() => ripple.value?.events ?? {});
3155
- const __returned__ = { props, densityClass, disabled, skeleton, ripple, rippleEvents, OnyxIcon, OnyxLoadingIndicator, OnyxRipple, OnyxSkeleton, ButtonOrLinkLayout };
3170
+ const __returned__ = { props, forwardProps, densityClass, disabled, skeleton, ripple, rippleEvents, OnyxIcon, OnyxLoadingIndicator, OnyxRipple, OnyxSkeleton, ButtonOrLinkLayout };
3156
3171
  Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
3157
3172
  return __returned__;
3158
3173
  }
@@ -3162,7 +3177,7 @@ function _sfc_render$1k(_ctx, _cache, $props, $setup, $data, $options) {
3162
3177
  return $setup.skeleton ? (openBlock(), createBlock($setup["OnyxSkeleton"], {
3163
3178
  key: 0,
3164
3179
  class: normalizeClass(["onyx-button-skeleton", $setup.densityClass])
3165
- }, null, 8, ["class"])) : (openBlock(), createBlock($setup["ButtonOrLinkLayout"], mergeProps({ key: 1 }, $setup.props, {
3180
+ }, null, 8, ["class"])) : (openBlock(), createBlock($setup["ButtonOrLinkLayout"], mergeProps({ key: 1 }, $setup.forwardProps, {
3166
3181
  class: [
3167
3182
  "onyx-component",
3168
3183
  "onyx-button",
@@ -4669,7 +4684,8 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
4669
4684
  const props = __props;
4670
4685
  const { densityClass } = useDensity(props);
4671
4686
  const skeleton = useSkeletonContext(props);
4672
- const __returned__ = { props, densityClass, skeleton, ButtonOrLinkLayout, OnyxIcon, OnyxLoadingIndicator, OnyxSkeleton };
4687
+ const forwardProps = useForwardProps(props, ButtonOrLinkLayout);
4688
+ const __returned__ = { props, densityClass, skeleton, forwardProps, ButtonOrLinkLayout, OnyxIcon, OnyxLoadingIndicator, OnyxSkeleton };
4673
4689
  Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
4674
4690
  return __returned__;
4675
4691
  }
@@ -4678,7 +4694,7 @@ function _sfc_render$11(_ctx, _cache, $props, $setup, $data, $options) {
4678
4694
  return $setup.skeleton ? (openBlock(), createBlock($setup["OnyxSkeleton"], {
4679
4695
  key: 0,
4680
4696
  class: normalizeClass(["onyx-icon-button-skeleton", $setup.densityClass])
4681
- }, null, 8, ["class"])) : (openBlock(), createBlock($setup["ButtonOrLinkLayout"], mergeProps({ key: 1 }, $setup.props, {
4697
+ }, null, 8, ["class"])) : (openBlock(), createBlock($setup["ButtonOrLinkLayout"], mergeProps({ key: 1 }, $setup.forwardProps, {
4682
4698
  "aria-label": $setup.props.label,
4683
4699
  title: $setup.props.label,
4684
4700
  class: [
@@ -5258,8 +5274,22 @@ const useRequired = (props, requiredMarker) => ({
5258
5274
  "onyx-optional-marker": !props.required
5259
5275
  }))
5260
5276
  });
5261
- const isValidDate = (date) => {
5262
- return date instanceof Date && !isNaN(date);
5277
+ const isValidDate = (date) => date instanceof Date && !isNaN(date.getTime());
5278
+ const dateToISOString = (date, type) => {
5279
+ if (!isValidDate(date)) {
5280
+ return void 0;
5281
+ }
5282
+ const dateString = date.toISOString();
5283
+ if (type === "datetime-utc") {
5284
+ return dateString;
5285
+ }
5286
+ const dateOnlyString = dateString.split("T")[0];
5287
+ if (type === "date") {
5288
+ return dateOnlyString;
5289
+ }
5290
+ const hours = date.getHours().toString().padStart(2, "0");
5291
+ const minutes = date.getMinutes().toString().padStart(2, "0");
5292
+ return `${dateOnlyString}T${hours}:${minutes}`;
5263
5293
  };
5264
5294
  const getValidityStateProperties = () => Object.entries(Object.getOwnPropertyDescriptors(ValidityState.prototype)).filter(([_, value]) => value.enumerable).map(([key]) => key);
5265
5295
  const transformValidityStateToObject = (validityState) => {
@@ -5700,11 +5730,12 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
5700
5730
  emit,
5701
5731
  key: "open"
5702
5732
  });
5733
+ const tooltipProps = useForwardProps(props, OnyxTooltip);
5703
5734
  const triggerType = computed(() => {
5704
5735
  if (typeof props.trigger === "object") return props.trigger.type;
5705
5736
  return props.trigger;
5706
5737
  });
5707
- const __returned__ = { props, emit, isVisible, triggerType, get iconCircleInformation() {
5738
+ const __returned__ = { props, emit, isVisible, tooltipProps, triggerType, get iconCircleInformation() {
5708
5739
  return iconCircleInformation;
5709
5740
  }, OnyxIcon, OnyxSystemButton, OnyxTooltip, OnyxVisuallyHidden };
5710
5741
  Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
@@ -5714,7 +5745,7 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
5714
5745
  const _hoisted_1$I = { class: "onyx-component onyx-info-tooltip" };
5715
5746
  function _sfc_render$X(_ctx, _cache, $props, $setup, $data, $options) {
5716
5747
  return openBlock(), createElementBlock("span", _hoisted_1$I, [
5717
- $setup.triggerType === "click" ? (openBlock(), createBlock($setup["OnyxTooltip"], mergeProps({ key: 0 }, $setup.props, {
5748
+ $setup.triggerType === "click" ? (openBlock(), createBlock($setup["OnyxTooltip"], mergeProps({ key: 0 }, $setup.tooltipProps, {
5718
5749
  open: $setup.isVisible,
5719
5750
  "onUpdate:open": _cache[0] || (_cache[0] = ($event) => $setup.isVisible = $event)
5720
5751
  }), {
@@ -5735,7 +5766,7 @@ function _sfc_render$X(_ctx, _cache, $props, $setup, $data, $options) {
5735
5766
  Fragment,
5736
5767
  { key: 1 },
5737
5768
  [
5738
- createVNode($setup["OnyxTooltip"], mergeProps($setup.props, {
5769
+ createVNode($setup["OnyxTooltip"], mergeProps($setup.tooltipProps, {
5739
5770
  open: $setup.isVisible,
5740
5771
  "onUpdate:open": _cache[1] || (_cache[1] = ($event) => $setup.isVisible = $event),
5741
5772
  "aria-hidden": "true"
@@ -6148,6 +6179,7 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
6148
6179
  __expose();
6149
6180
  const props = __props;
6150
6181
  const slots = useSlots();
6182
+ const tableProps = useForwardProps(props, OnyxTable);
6151
6183
  const columnStyle = computed(() => {
6152
6184
  return {
6153
6185
  "--onyx-data-grid-column-count": props.columns.length,
@@ -6159,7 +6191,7 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
6159
6191
  }).join(" ")
6160
6192
  };
6161
6193
  });
6162
- const __returned__ = { props, slots, columnStyle, get mergeVueProps() {
6194
+ const __returned__ = { props, slots, tableProps, columnStyle, get mergeVueProps() {
6163
6195
  return mergeVueProps;
6164
6196
  }, OnyxTable };
6165
6197
  Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
@@ -6167,7 +6199,7 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
6167
6199
  }
6168
6200
  });
6169
6201
  function _sfc_render$T(_ctx, _cache, $props, $setup, $data, $options) {
6170
- return openBlock(), createBlock($setup["OnyxTable"], mergeProps({ class: "onyx-data-grid" }, $setup.props, {
6202
+ return openBlock(), createBlock($setup["OnyxTable"], mergeProps({ class: "onyx-data-grid" }, $setup.tableProps, {
6171
6203
  "scroll-container-attrs": $setup.mergeVueProps($setup.props.scrollContainerAttrs, { style: $setup.columnStyle })
6172
6204
  }), createSlots({
6173
6205
  head: withCtx(() => [
@@ -7151,6 +7183,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
7151
7183
  const { disabled, showError } = useFormContext(props);
7152
7184
  const skeleton = useSkeletonContext(props);
7153
7185
  const errorClass = useErrorClass(showError);
7186
+ const formElementProps = useForwardProps(props, OnyxFormElement);
7154
7187
  const selectionCount = computed(() => {
7155
7188
  return props.modelValue ? props.modelValue.length : 0;
7156
7189
  });
@@ -7185,7 +7218,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
7185
7218
  event.preventDefault();
7186
7219
  };
7187
7220
  useAutofocus(input2, props);
7188
- const __returned__ = { rootAttrs, restAttrs, props, emit, t, vCustomValidity, errorMessages, successMessages, messages, disabled, showError, skeleton, errorClass, selectionCount, selectionText, wasTouched, densityClass, input: input2, navigationalKeys, blockTyping, get iconCheckSmall() {
7221
+ const __returned__ = { rootAttrs, restAttrs, props, emit, t, vCustomValidity, errorMessages, successMessages, messages, disabled, showError, skeleton, errorClass, formElementProps, selectionCount, selectionText, wasTouched, densityClass, input: input2, navigationalKeys, blockTyping, get iconCheckSmall() {
7189
7222
  return iconCheckSmall;
7190
7223
  }, get iconChevronDownUp() {
7191
7224
  return iconChevronDownUp;
@@ -7225,7 +7258,7 @@ function _sfc_render$O(_ctx, _cache, $props, $setup, $data, $options) {
7225
7258
  ]
7226
7259
  }, $setup.rootAttrs),
7227
7260
  [
7228
- createVNode($setup["OnyxFormElement"], mergeProps($setup.props, {
7261
+ createVNode($setup["OnyxFormElement"], mergeProps($setup.formElementProps, {
7229
7262
  message: $setup.messages,
7230
7263
  "success-messages": $setup.successMessages,
7231
7264
  "error-messages": $setup.errorMessages
@@ -7331,14 +7364,15 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
7331
7364
  setup(__props, { expose: __expose }) {
7332
7365
  __expose();
7333
7366
  const props = __props;
7334
- const __returned__ = { props, OnyxIcon, OnyxListItem };
7367
+ const listItemProps = useForwardProps(props, OnyxListItem);
7368
+ const __returned__ = { props, listItemProps, OnyxIcon, OnyxListItem };
7335
7369
  Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
7336
7370
  return __returned__;
7337
7371
  }
7338
7372
  });
7339
7373
  const _hoisted_1$z = ["checked", "aria-labelledby", "disabled", "indeterminate"];
7340
7374
  function _sfc_render$N(_ctx, _cache, $props, $setup, $data, $options) {
7341
- return openBlock(), createBlock($setup["OnyxListItem"], mergeProps({ class: "onyx-component onyx-select-option" }, $setup.props, {
7375
+ return openBlock(), createBlock($setup["OnyxListItem"], mergeProps({ class: "onyx-component onyx-select-option" }, $setup.listItemProps, {
7342
7376
  checked: !!_ctx.$attrs["aria-checked"],
7343
7377
  selected: !!_ctx.$attrs["aria-selected"],
7344
7378
  disabled: !!_ctx.$attrs["aria-disabled"]
@@ -8000,7 +8034,8 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
8000
8034
  __expose();
8001
8035
  const props = __props;
8002
8036
  const emit = __emit;
8003
- const __returned__ = { props, emit, OnyxSelectPagination };
8037
+ const selectPaginationProps = useForwardProps(props, OnyxSelectPagination);
8038
+ const __returned__ = { props, emit, selectPaginationProps, OnyxSelectPagination };
8004
8039
  Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
8005
8040
  return __returned__;
8006
8041
  }
@@ -8008,7 +8043,7 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
8008
8043
  function _sfc_render$K(_ctx, _cache, $props, $setup, $data, $options) {
8009
8044
  return openBlock(), createBlock(
8010
8045
  $setup["OnyxSelectPagination"],
8011
- mergeProps($setup.props, {
8046
+ mergeProps($setup.selectPaginationProps, {
8012
8047
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.emit("update:modelValue", $event))
8013
8048
  }),
8014
8049
  null,
@@ -9079,15 +9114,11 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
9079
9114
  const { disabled, showError } = useFormContext(props);
9080
9115
  const skeleton = useSkeletonContext(props);
9081
9116
  const errorClass = useErrorClass(showError);
9117
+ const formElementProps = useForwardProps(props, OnyxFormElement);
9082
9118
  const getNormalizedDate = computed(() => {
9083
9119
  return (value2) => {
9084
9120
  const date = value2 != void 0 && value2 != null ? new Date(value2) : void 0;
9085
- if (!isValidDate(date)) return;
9086
- const dateString = date.toISOString().split("T")[0];
9087
- if (props.type === "date") return dateString;
9088
- const hours = date.getHours().toString().padStart(2, "0");
9089
- const minutes = date.getMinutes().toString().padStart(2, "0");
9090
- return `${dateString}T${hours}:${minutes}`;
9121
+ return dateToISOString(date, props.type);
9091
9122
  };
9092
9123
  });
9093
9124
  const modelValue = useVModel({
@@ -9099,12 +9130,11 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
9099
9130
  get: () => getNormalizedDate.value(modelValue.value),
9100
9131
  set: (value2) => {
9101
9132
  const newDate = new Date(value2 ?? "");
9102
- modelValue.value = isValidDate(newDate) ? newDate.toISOString() : void 0;
9133
+ modelValue.value = dateToISOString(newDate, props.type === "date" ? "date" : "datetime-utc");
9103
9134
  }
9104
9135
  });
9105
- const input2 = useTemplateRef("inputRef");
9106
- useAutofocus(input2, props);
9107
- const __returned__ = { props, emit, rootAttrs, restAttrs, vCustomValidity, errorMessages, successMessages, messages, densityClass, disabled, showError, skeleton, errorClass, getNormalizedDate, modelValue, value, input: input2, OnyxFormElement, OnyxLoadingIndicator, OnyxSkeleton };
9136
+ useAutofocus(useTemplateRef("inputRef"), props);
9137
+ const __returned__ = { props, emit, rootAttrs, restAttrs, vCustomValidity, errorMessages, successMessages, messages, densityClass, disabled, showError, skeleton, errorClass, formElementProps, getNormalizedDate, modelValue, value, OnyxFormElement, OnyxLoadingIndicator, OnyxSkeleton };
9108
9138
  Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
9109
9139
  return __returned__;
9110
9140
  }
@@ -9134,7 +9164,7 @@ function _sfc_render$G(_ctx, _cache, $props, $setup, $data, $options) {
9134
9164
  class: ["onyx-component", "onyx-datepicker", $setup.densityClass, $setup.errorClass]
9135
9165
  }, $setup.rootAttrs),
9136
9166
  [
9137
- createVNode($setup["OnyxFormElement"], mergeProps($setup.props, {
9167
+ createVNode($setup["OnyxFormElement"], mergeProps($setup.formElementProps, {
9138
9168
  "error-messages": $setup.errorMessages,
9139
9169
  "success-messages": $setup.successMessages,
9140
9170
  message: $setup.messages
@@ -9198,13 +9228,14 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
9198
9228
  const slots = useSlots();
9199
9229
  const { t } = injectI18n();
9200
9230
  const { densityClass } = useDensity(props);
9231
+ const basicPopoverProps = useForwardProps(props, OnyxBasicPopover);
9201
9232
  const isExpanded = useVModel({
9202
9233
  props,
9203
9234
  emit,
9204
9235
  key: "open",
9205
9236
  default: false
9206
9237
  });
9207
- const __returned__ = { props, emit, slots, t, densityClass, isExpanded, get iconXSmall() {
9238
+ const __returned__ = { props, emit, slots, t, densityClass, basicPopoverProps, isExpanded, get iconXSmall() {
9208
9239
  return iconXSmall;
9209
9240
  }, OnyxBasicPopover, OnyxHeadline, OnyxSystemButton };
9210
9241
  Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
@@ -9220,7 +9251,7 @@ const _hoisted_5$a = {
9220
9251
  class: "onyx-dialog__footer"
9221
9252
  };
9222
9253
  function _sfc_render$F(_ctx, _cache, $props, $setup, $data, $options) {
9223
- return openBlock(), createBlock($setup["OnyxBasicPopover"], mergeProps($setup.props, {
9254
+ return openBlock(), createBlock($setup["OnyxBasicPopover"], mergeProps($setup.basicPopoverProps, {
9224
9255
  open: $setup.isExpanded,
9225
9256
  "onUpdate:open": _cache[1] || (_cache[1] = ($event) => $setup.isExpanded = $event),
9226
9257
  class: ["onyx-dialog", $setup.densityClass]
@@ -9530,6 +9561,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
9530
9561
  default: ""
9531
9562
  });
9532
9563
  const { rootAttrs, restAttrs } = useRootAttrs();
9564
+ const formElementProps = useForwardProps(props, OnyxFormElement);
9533
9565
  const { t } = injectI18n();
9534
9566
  const { maxLength, maxLengthError } = useLenientMaxLengthValidation({ modelValue, props });
9535
9567
  const error = computed(() => props.error ?? maxLengthError.value);
@@ -9559,7 +9591,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
9559
9591
  }
9560
9592
  return props.type;
9561
9593
  });
9562
- const __returned__ = { props, emit, slots, modelValue, rootAttrs, restAttrs, t, maxLength, maxLengthError, error, vCustomValidity, errorMessages, successMessages, messages, densityClass, patternSource, input: input2, disabled, showError, skeleton, errorClass, showPassword, displayType, get iconCheckSmall() {
9594
+ const __returned__ = { props, emit, slots, modelValue, rootAttrs, restAttrs, formElementProps, t, maxLength, maxLengthError, error, vCustomValidity, errorMessages, successMessages, messages, densityClass, patternSource, input: input2, disabled, showError, skeleton, errorClass, showPassword, displayType, get iconCheckSmall() {
9563
9595
  return iconCheckSmall;
9564
9596
  }, get iconEye() {
9565
9597
  return iconEye;
@@ -9598,7 +9630,7 @@ function _sfc_render$B(_ctx, _cache, $props, $setup, $data, $options) {
9598
9630
  class: ["onyx-component", "onyx-input", $setup.densityClass, $setup.errorClass]
9599
9631
  }, $setup.rootAttrs),
9600
9632
  [
9601
- createVNode($setup["OnyxFormElement"], mergeProps($setup.props, {
9633
+ createVNode($setup["OnyxFormElement"], mergeProps($setup.formElementProps, {
9602
9634
  "error-messages": $setup.errorMessages,
9603
9635
  "success-messages": $setup.successMessages,
9604
9636
  message: $setup.messages
@@ -9693,7 +9725,9 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
9693
9725
  setup(__props, { expose: __expose }) {
9694
9726
  __expose();
9695
9727
  const props = __props;
9696
- const __returned__ = { props, OnyxExternalLinkIcon, OnyxRouterLink };
9728
+ const routerLinkProps = useForwardProps(props, OnyxRouterLink);
9729
+ const externalLinkIconProps = useForwardProps(props, OnyxExternalLinkIcon);
9730
+ const __returned__ = { props, routerLinkProps, externalLinkIconProps, OnyxExternalLinkIcon, OnyxRouterLink };
9697
9731
  Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
9698
9732
  return __returned__;
9699
9733
  }
@@ -9701,13 +9735,13 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
9701
9735
  function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) {
9702
9736
  return openBlock(), createBlock(
9703
9737
  $setup["OnyxRouterLink"],
9704
- mergeProps({ class: "onyx-component onyx-link" }, $setup.props),
9738
+ mergeProps({ class: "onyx-component onyx-link" }, $setup.routerLinkProps),
9705
9739
  {
9706
9740
  default: withCtx(() => [
9707
9741
  renderSlot(_ctx.$slots, "default"),
9708
9742
  createVNode(
9709
9743
  $setup["OnyxExternalLinkIcon"],
9710
- normalizeProps(guardReactiveProps($setup.props)),
9744
+ normalizeProps(guardReactiveProps($setup.externalLinkIconProps)),
9711
9745
  null,
9712
9746
  16
9713
9747
  /* FULL_PROPS */
@@ -9814,9 +9848,10 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
9814
9848
  const slots = useSlots();
9815
9849
  const { t } = injectI18n();
9816
9850
  const { densityClass } = useDensity(props);
9851
+ const basicDialogProps = useForwardProps(props, OnyxBasicDialog);
9817
9852
  const descriptionId = useId();
9818
9853
  const hasDescription = computed(() => !!slots.description);
9819
- const __returned__ = { props, emit, slots, t, densityClass, descriptionId, hasDescription, get iconXSmall() {
9854
+ const __returned__ = { props, emit, slots, t, densityClass, basicDialogProps, descriptionId, hasDescription, get iconXSmall() {
9820
9855
  return iconXSmall;
9821
9856
  }, OnyxBasicDialog, OnyxHeadline, OnyxSystemButton };
9822
9857
  Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
@@ -9833,7 +9868,7 @@ const _hoisted_6$7 = {
9833
9868
  class: "onyx-modal__footer"
9834
9869
  };
9835
9870
  function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) {
9836
- return openBlock(), createBlock($setup["OnyxBasicDialog"], mergeProps($setup.props, {
9871
+ return openBlock(), createBlock($setup["OnyxBasicDialog"], mergeProps($setup.basicDialogProps, {
9837
9872
  modal: "",
9838
9873
  class: ["onyx-modal", $setup.densityClass],
9839
9874
  "aria-describedby": $setup.hasDescription ? $setup.descriptionId : void 0,
@@ -9955,6 +9990,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
9955
9990
  const props = __props;
9956
9991
  const emit = __emit;
9957
9992
  const slots = useSlots();
9993
+ const modalProps = useForwardProps(props, OnyxModal);
9958
9994
  const currentValue = ref();
9959
9995
  watchEffect(() => currentValue.value = props.modelValue);
9960
9996
  const { t } = injectI18n();
@@ -9968,7 +10004,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
9968
10004
  emit("update:modelValue", currentValue.value);
9969
10005
  emit("update:open", false);
9970
10006
  };
9971
- const __returned__ = { props, emit, slots, currentValue, t, formId, handleChange, handleApply, OnyxBottomBar, OnyxButton, OnyxCard, OnyxIcon, OnyxModal, OnyxVisuallyHidden };
10007
+ const __returned__ = { props, emit, slots, modalProps, currentValue, t, formId, handleChange, handleApply, OnyxBottomBar, OnyxButton, OnyxCard, OnyxIcon, OnyxModal, OnyxVisuallyHidden };
9972
10008
  Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
9973
10009
  return __returned__;
9974
10010
  }
@@ -9981,7 +10017,7 @@ const _hoisted_4$a = {
9981
10017
  class: "onyx-text--small"
9982
10018
  };
9983
10019
  function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) {
9984
- return openBlock(), createBlock($setup["OnyxModal"], mergeProps($setup.props, {
10020
+ return openBlock(), createBlock($setup["OnyxModal"], mergeProps($setup.modalProps, {
9985
10021
  open: $setup.props.open,
9986
10022
  class: "onyx-select-dialog",
9987
10023
  label: $setup.props.label,
@@ -10120,6 +10156,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
10120
10156
  const props = __props;
10121
10157
  const emit = __emit;
10122
10158
  const { t } = injectI18n();
10159
+ const selectDialogProps = useForwardProps(props, OnyxSelectDialog);
10123
10160
  const options = computed(() => {
10124
10161
  return [
10125
10162
  {
@@ -10142,13 +10179,13 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
10142
10179
  }
10143
10180
  ];
10144
10181
  });
10145
- const __returned__ = { props, emit, t, options, OnyxSelectDialog };
10182
+ const __returned__ = { props, emit, t, selectDialogProps, options, OnyxSelectDialog };
10146
10183
  Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
10147
10184
  return __returned__;
10148
10185
  }
10149
10186
  });
10150
10187
  function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) {
10151
- return openBlock(), createBlock($setup["OnyxSelectDialog"], mergeProps({ class: "onyx-color-scheme-dialog" }, $setup.props, {
10188
+ return openBlock(), createBlock($setup["OnyxSelectDialog"], mergeProps({ class: "onyx-color-scheme-dialog" }, $setup.selectDialogProps, {
10152
10189
  label: $setup.t("colorScheme.headline"),
10153
10190
  options: $setup.options,
10154
10191
  open: $setup.props.open,
@@ -10310,14 +10347,15 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
10310
10347
  __expose();
10311
10348
  const props = __props;
10312
10349
  const slots = useSlots();
10350
+ const menuItemProps = useForwardProps(props, OnyxMenuItem);
10313
10351
  const hasChildren = computed(() => !!slots.children);
10314
- const __returned__ = { props, slots, hasChildren, OnyxMenuItem };
10352
+ const __returned__ = { props, slots, menuItemProps, hasChildren, OnyxMenuItem };
10315
10353
  Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
10316
10354
  return __returned__;
10317
10355
  }
10318
10356
  });
10319
10357
  function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) {
10320
- return openBlock(), createBlock($setup["OnyxMenuItem"], mergeProps($setup.props, {
10358
+ return openBlock(), createBlock($setup["OnyxMenuItem"], mergeProps($setup.menuItemProps, {
10321
10359
  link: $setup.hasChildren && $setup.props.context !== "navbar" ? void 0 : $setup.props.link,
10322
10360
  class: {
10323
10361
  "onyx-nav-item": true,
@@ -12245,6 +12283,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
12245
12283
  const { vCustomValidity, errorMessages } = useFormElementError({ props, emit });
12246
12284
  const successMessages = computed(() => getFormMessages(props.success));
12247
12285
  const messages = computed(() => getFormMessages(props.message));
12286
+ const formElementProps = useForwardProps(props, OnyxFormElement);
12248
12287
  const { rootAttrs, restAttrs } = useRootAttrs();
12249
12288
  const wasTouched = ref(false);
12250
12289
  const modelValue = useVModel({
@@ -12308,7 +12347,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
12308
12347
  const decrementLabel = computed(() => t.value("stepper.decrement", { stepSize: props.stepSize }));
12309
12348
  __expose({ input: input2 });
12310
12349
  useAutofocus(input2, props);
12311
- const __returned__ = { props, emit, t, locale, input: input2, disabled, showError, skeleton, errorClass, densityClass, vCustomValidity, errorMessages, successMessages, messages, rootAttrs, restAttrs, wasTouched, modelValue, inputValue, displayValue, getFormattedValue, getDisplayValue, handleClick, handleChange, incrementLabel, decrementLabel, get iconMinus() {
12350
+ const __returned__ = { props, emit, t, locale, input: input2, disabled, showError, skeleton, errorClass, densityClass, vCustomValidity, errorMessages, successMessages, messages, formElementProps, rootAttrs, restAttrs, wasTouched, modelValue, inputValue, displayValue, getFormattedValue, getDisplayValue, handleClick, handleChange, incrementLabel, decrementLabel, get iconMinus() {
12312
12351
  return iconMinus;
12313
12352
  }, get iconPlus() {
12314
12353
  return iconPlus;
@@ -12348,7 +12387,7 @@ function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
12348
12387
  class: ["onyx-component", "onyx-stepper", $setup.densityClass, $setup.errorClass]
12349
12388
  }, $setup.rootAttrs),
12350
12389
  [
12351
- createVNode($setup["OnyxFormElement"], mergeProps($setup.props, {
12390
+ createVNode($setup["OnyxFormElement"], mergeProps($setup.formElementProps, {
12352
12391
  message: $setup.messages,
12353
12392
  "success-messages": $setup.successMessages,
12354
12393
  "error-messages": $setup.errorMessages
@@ -12754,6 +12793,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
12754
12793
  setup(__props, { expose: __expose }) {
12755
12794
  __expose();
12756
12795
  const props = __props;
12796
+ const iconProps = useForwardProps(props, OnyxIcon);
12757
12797
  const FALLBACK_ICON = iconFile;
12758
12798
  const icon = computed(() => {
12759
12799
  if (!props.type) return FALLBACK_ICON;
@@ -12793,13 +12833,13 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
12793
12833
  if (props.type.startsWith("text/")) return iconFileText;
12794
12834
  return FALLBACK_ICON;
12795
12835
  });
12796
- const __returned__ = { props, FALLBACK_ICON, icon, OnyxIcon };
12836
+ const __returned__ = { props, iconProps, FALLBACK_ICON, icon, OnyxIcon };
12797
12837
  Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
12798
12838
  return __returned__;
12799
12839
  }
12800
12840
  });
12801
12841
  function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
12802
- return openBlock(), createBlock($setup["OnyxIcon"], mergeProps($setup.props, { icon: $setup.icon }), null, 16, ["icon"]);
12842
+ return openBlock(), createBlock($setup["OnyxIcon"], mergeProps($setup.iconProps, { icon: $setup.icon }), null, 16, ["icon"]);
12803
12843
  }
12804
12844
  const OnyxFileTypeIcon = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$7], ["__file", "/home/runner/work/onyx/onyx/packages/sit-onyx/src/components/OnyxFileTypeIcon/OnyxFileTypeIcon.vue"]]);
12805
12845
  const _sfc_main$6 = /* @__PURE__ */ defineComponent({
@@ -13476,6 +13516,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
13476
13516
  const props = __props;
13477
13517
  const emit = __emit;
13478
13518
  const { t } = injectI18n();
13519
+ const tagProps = useForwardProps(props, OnyxTag);
13479
13520
  const active = useVModel({
13480
13521
  props,
13481
13522
  emit,
@@ -13486,7 +13527,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
13486
13527
  () => active.value ? t.value("filterTag.clickToRemove", { label: props.label }) : t.value("filterTag.clickToAdd", { label: props.label })
13487
13528
  );
13488
13529
  const skeleton = useSkeletonContext(props);
13489
- const __returned__ = { props, emit, t, active, tooltipLabel, skeleton, get iconXSmall() {
13530
+ const __returned__ = { props, emit, t, tagProps, active, tooltipLabel, skeleton, get iconXSmall() {
13490
13531
  return iconXSmall;
13491
13532
  }, OnyxTag };
13492
13533
  Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
@@ -13494,7 +13535,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
13494
13535
  }
13495
13536
  });
13496
13537
  function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
13497
- return openBlock(), createBlock($setup["OnyxTag"], mergeProps($setup.props, {
13538
+ return openBlock(), createBlock($setup["OnyxTag"], mergeProps($setup.tagProps, {
13498
13539
  clickable: { label: $setup.tooltipLabel, actionIcon: $setup.active ? $setup.iconXSmall : void 0 },
13499
13540
  class: "onyx-filter-tag",
13500
13541
  skeleton: $setup.skeleton,
@@ -13543,6 +13584,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
13543
13584
  default: ""
13544
13585
  });
13545
13586
  const { rootAttrs, restAttrs } = useRootAttrs();
13587
+ const formElementProps = useForwardProps(props, OnyxFormElement);
13546
13588
  const { maxLength, maxLengthError } = useLenientMaxLengthValidation({ props, modelValue });
13547
13589
  const error = computed(() => props.error ?? maxLengthError.value);
13548
13590
  const { vCustomValidity, errorMessages } = useFormElementError({ props, emit, error });
@@ -13565,7 +13607,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
13565
13607
  const input2 = useTemplateRef("inputRef");
13566
13608
  __expose({ input: input2 });
13567
13609
  useAutofocus(input2, props);
13568
- const __returned__ = { props, emit, modelValue, rootAttrs, restAttrs, maxLength, maxLengthError, error, vCustomValidity, errorMessages, densityClass, successMessages, messages, autosizeMinMaxStyles, handleInput, disabled, showError, skeleton, errorClass, input: input2, OnyxFormElement, OnyxSkeleton };
13610
+ const __returned__ = { props, emit, modelValue, rootAttrs, restAttrs, formElementProps, maxLength, maxLengthError, error, vCustomValidity, errorMessages, densityClass, successMessages, messages, autosizeMinMaxStyles, handleInput, disabled, showError, skeleton, errorClass, input: input2, OnyxFormElement, OnyxSkeleton };
13569
13611
  Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
13570
13612
  return __returned__;
13571
13613
  }
@@ -13597,7 +13639,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
13597
13639
  style: $setup.autosizeMinMaxStyles
13598
13640
  }, $setup.rootAttrs),
13599
13641
  [
13600
- createVNode($setup["OnyxFormElement"], mergeProps($setup.props, {
13642
+ createVNode($setup["OnyxFormElement"], mergeProps($setup.formElementProps, {
13601
13643
  message: $setup.messages,
13602
13644
  "success-messages": $setup.successMessages,
13603
13645
  "error-messages": $setup.errorMessages