sit-onyx 1.4.0-dev-20251112133447 → 1.4.0-dev-20251118092838

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,7 +1,19 @@
1
+ import { Ref } from 'vue';
1
2
  import { DataGridEntry } from '../../types.js';
2
3
  import { DataGridFeatureOptions } from '../index.js';
3
4
  /**
4
5
  * The configuration options for the resizing feature in the OnyxDataGrid component.
5
6
  * Includes settings for the individual columns and general resizing behavior.
6
7
  */
7
- export type ResizingOptions<TEntry extends DataGridEntry> = DataGridFeatureOptions<TEntry, object>;
8
+ export type ResizingOptions<TEntry extends DataGridEntry> = DataGridFeatureOptions<TEntry, object> & {
9
+ /**
10
+ * The current column resizing state.
11
+ * Can be used to e.g. save the user resized columns and restore them on page load.
12
+ */
13
+ resizeState?: Ref<ResizeState<TEntry>>;
14
+ };
15
+ /**
16
+ * Defines the current column resizing state.
17
+ * Key = Column key, value = resized width.
18
+ */
19
+ export type ResizeState<TEntry> = Map<keyof TEntry, string>;
@@ -5,32 +5,20 @@ import { SliderControl } from '../OnyxSliderControl/types.js';
5
5
  export type SliderMark = {
6
6
  value: number;
7
7
  label?: string;
8
- } | number;
8
+ };
9
9
  export declare const SLIDER_MODES: readonly ["single", "range"];
10
10
  export type SliderMode = (typeof SLIDER_MODES)[number];
11
11
  export type SliderValue<TSliderMode extends SliderMode> = TSliderMode extends "single" ? number : [number, number];
12
12
  export type OnyxSliderProps<TSliderMode extends SliderMode> = CustomValidityProp & Omit<OnyxFormElementProps<SliderValue<TSliderMode>>, "autocapitalize" | "autocomplete" | "loading" | "minlength" | "maxlength" | "placeholder" | "readonly" | "required" | "requiredMarker" | "withCounter" | "modelValue"> & {
13
13
  /**
14
- * Defines the mode of the slider.
15
- *
16
- * - `single`: A single-thumb slider for selecting one value.
17
- * - `range`: A range slider with two thumbs for selecting a value range.
18
- *
19
- * @default "single"
14
+ * Defines the mode of the slider (single or range).
20
15
  */
21
16
  mode?: TSliderMode;
22
17
  /**
23
- * Current value(s) of the slider.
24
- *
25
- * - `single` mode: provide a single value, e.g. `42`.
26
- * - `range` mode: provide two values, e.g. `[20, 80]`.
18
+ * Current value(s) of the slider, depending on the `mode`.
19
+ * For a single mode, pass a single number. For range model pass an array with two numbers.
27
20
  *
28
- * Constraints:
29
- * - Each value must be within `[min, max]`.
30
- * - Values should align to `step` (when `discrete` is true they will snap).
31
- * - For `range` mode, values should be in ascending order.
32
- *
33
- * Recommended defaults (if your product has no specific initial value):
21
+ * Recommended defaults (if your project has no specific initial value):
34
22
  * - `single` mode: middle of the range → `(min + max) / 2`.
35
23
  * - `range` mode: full range → `[min, max]`.
36
24
  */
@@ -44,56 +32,35 @@ export type OnyxSliderProps<TSliderMode extends SliderMode> = CustomValidityProp
44
32
  */
45
33
  max?: number;
46
34
  /**
47
- * Step size.
48
- *
49
- * @default 1
35
+ * Step size to increase/decrease the slider value when moving the thumb(s).
50
36
  */
51
37
  step?: number;
52
38
  /**
53
- * Step size when holding shift key or using Page Up/Page Down keys.
39
+ * Step size to increase/decrease the slider value when changing the value via keyboard while pressing the "Shift" key.
54
40
  *
55
- * @default 10% of the total range (max - min) multiplied by the step size.
56
- * This provides intuitive behavior that automatically scales with different slider ranges.
41
+ * @default 10% of the total range (max - min)
57
42
  */
58
43
  shiftStep?: number;
59
44
  /**
60
- * Marks to show for each step.
61
- * - If set to `true`, marks will be generated automatically based on `step` prop.
62
- * - If an array of `SliderMark` is provided, marks will be shown at the specified values with optional labels.
63
- * - If set to `false`, no marks will be displayed.
64
- *
65
- * @default false
45
+ * Whether to show marks inside the slider rail.
46
+ * - `true`: will generate marks automatically based on `step` prop
47
+ * - array of numbers or `SliderMark` objects: will shown at the specified values with optional labels
66
48
  */
67
- marks?: SliderMark[] | boolean;
49
+ marks?: SliderMark[] | number[] | boolean;
68
50
  /**
69
- * Defines if and which control to display in addition to the slider.
70
- * Can be used to e.g. display inputs or icon buttons that can also be used to change the value.
51
+ * Optional value controls to display in addition to the slider.
71
52
  *
72
- * - `value`: shows min and max value labels. Works in both `single` and `range` modes for discrete and non-discrete sliders.
73
- * - `icon`: shows icon buttons to increment/decrement the value. Works only in `single` mode for discrete and non-discrete sliders.
74
- * - `input`: shows `<OnyxStepper />` components to input the value directly. Works in both `single` and `range` modes for discrete and non-discrete sliders.
53
+ * - `value`: shows min and max value labels (non-interactive)
54
+ * - `icon`: shows icon buttons to increment/decrement the value. Works only in `single` mode
55
+ * - `input`: shows stepper(s) to input the value directly
75
56
  */
76
57
  control?: SliderControl;
77
58
  /**
78
- * When to show the tooltip with the current value over the thumb.
79
- *
80
- * @default undefined
59
+ * Whether to disable/hide the tooltip to show the value when hovering over the thumb.
81
60
  */
82
61
  disableTooltip?: boolean;
83
62
  /**
84
63
  * Whether to show a skeleton slider.
85
64
  */
86
65
  skeleton?: SkeletonInjected;
87
- /**
88
- * Whether to render the slider in discrete mode.
89
- * In discrete mode, the slider will snap to the nearest step/mark.
90
- *
91
- * @default false
92
- */
93
- discrete?: boolean;
94
- /**
95
- * Label to show above the form element. Required due to accessibility / screen readers.
96
- * If you want to visually hide the label, use the `hideLabel` property.
97
- */
98
- label: string;
99
66
  };
@@ -241,7 +241,9 @@
241
241
  "slider": {
242
242
  "decreaseValueBy": "Wert um {n} verringern",
243
243
  "increaseValueBy": "Wert um {n} erhöhen",
244
- "changeValue": "Wert ändern"
244
+ "changeValue": "Wert ändern",
245
+ "changeStartValue": "Startwert ändern",
246
+ "changeEndValue": "Endwert ändern"
245
247
  },
246
248
  "codeTabs": {
247
249
  "label": "Codeausschnitte",
@@ -244,7 +244,9 @@
244
244
  "slider": {
245
245
  "decreaseValueBy": "Decrease value by {n}",
246
246
  "increaseValueBy": "Increase value by {n}",
247
- "changeValue": "Change value"
247
+ "changeValue": "Change value",
248
+ "changeStartValue": "Change start value",
249
+ "changeEndValue": "Change end value"
248
250
  },
249
251
  "codeTabs": {
250
252
  "label": "Code snippets",
@@ -244,7 +244,9 @@ declare const _default: {
244
244
  "slider": {
245
245
  "decreaseValueBy": "Decrease value by {n}",
246
246
  "increaseValueBy": "Increase value by {n}",
247
- "changeValue": "Change value"
247
+ "changeValue": "Change value",
248
+ "changeStartValue": "Change start value",
249
+ "changeEndValue": "Change end value"
248
250
  },
249
251
  "codeTabs": {
250
252
  "label": "Code snippets",