sit-onyx 1.4.0-dev-20251106105154 → 1.4.0-dev-20251106141823
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/components/OnyxSlider/types.d.ts +4 -4
- package/dist/components/OnyxSliderControl/OnyxSliderControl.d.vue.ts +21 -0
- package/dist/components/OnyxSliderControl/types.d.ts +48 -0
- package/dist/i18n/locales/de-DE.json +3 -2
- package/dist/i18n/locales/en-US.json +3 -2
- package/dist/i18n/locales/en-US.json.d.ts +3 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.esm-bundler.js +911 -803
- package/dist/index.esm-bundler.js.map +1 -1
- package/dist/index.js +3225 -3131
- package/dist/style.css +1 -1
- package/package.json +5 -5
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { CustomValidityProp } from '../../composables/useFormElementError.js';
|
|
2
2
|
import { SkeletonInjected } from '../../composables/useSkeletonState.js';
|
|
3
3
|
import { OnyxFormElementProps } from '../OnyxFormElement/types.js';
|
|
4
|
-
|
|
5
|
-
export type SliderControl = (typeof SLIDER_CONTROLS)[number];
|
|
4
|
+
import { SliderControl } from '../OnyxSliderControl/types.js';
|
|
6
5
|
export type SliderMark = {
|
|
7
6
|
value: number;
|
|
8
7
|
label?: string;
|
|
@@ -70,8 +69,9 @@ export type OnyxSliderProps<TSliderMode extends SliderMode> = CustomValidityProp
|
|
|
70
69
|
* Defines if and which control to display in addition to the slider.
|
|
71
70
|
* Can be used to e.g. display inputs or icon buttons that can also be used to change the value.
|
|
72
71
|
*
|
|
73
|
-
* - `value`: shows min and max value labels.
|
|
74
|
-
* - `icon`: shows icon buttons to increment/decrement the value.
|
|
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.
|
|
75
75
|
*/
|
|
76
76
|
control?: SliderControl;
|
|
77
77
|
/**
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { SliderMode } from '../OnyxSlider/types.js';
|
|
2
|
+
import { OnyxSliderControlProps } from './types.js';
|
|
3
|
+
/**
|
|
4
|
+
* @experimental
|
|
5
|
+
* @deprecated This component is still under active development and its API might change in patch releases.
|
|
6
|
+
*/
|
|
7
|
+
declare const _default: <TSliderMode extends SliderMode>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
8
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
9
|
+
readonly "onUpdate:modelValue"?: ((value: number) => any) | undefined;
|
|
10
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:modelValue"> & OnyxSliderControlProps & Partial<{}>> & import('vue').PublicProps;
|
|
11
|
+
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
12
|
+
attrs: any;
|
|
13
|
+
slots: {};
|
|
14
|
+
emit: (evt: "update:modelValue", value: number) => void;
|
|
15
|
+
}>) => import('vue').VNode & {
|
|
16
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
17
|
+
};
|
|
18
|
+
export default _default;
|
|
19
|
+
type __VLS_PrettifyLocal<T> = {
|
|
20
|
+
[K in keyof T]: T[K];
|
|
21
|
+
} & {};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { DensityProp } from '../../composables/density.js';
|
|
2
|
+
export declare const SLIDER_CONTROLS: readonly ["icon", "value", "input"];
|
|
3
|
+
export type SliderControl = (typeof SLIDER_CONTROLS)[number];
|
|
4
|
+
export type OnyxSliderControlSharedProps = {
|
|
5
|
+
/**
|
|
6
|
+
* The type of control to render.
|
|
7
|
+
*
|
|
8
|
+
* - `value`: Renders a read-only display of the provided slider value.
|
|
9
|
+
* - `icon`: Renders an icon button for increasing or decreasing the slider value.
|
|
10
|
+
* - `input`: Renders an `<OnyxStepper />` component for direct value entry.
|
|
11
|
+
*/
|
|
12
|
+
control: SliderControl;
|
|
13
|
+
/**
|
|
14
|
+
* Slider control model value
|
|
15
|
+
*/
|
|
16
|
+
modelValue?: number;
|
|
17
|
+
/**
|
|
18
|
+
* The direction the icon button represents.
|
|
19
|
+
*
|
|
20
|
+
* - `decrease`: Decreases the slider value and renders a "minus" icon.
|
|
21
|
+
* - `increase`: Increases the slider value and renders a "plus" icon.
|
|
22
|
+
*/
|
|
23
|
+
direction?: "increase" | "decrease";
|
|
24
|
+
/**
|
|
25
|
+
* `shiftStep` of associated slider. Used to determine the amount to increase/decrease the value by when the icon button is clicked.
|
|
26
|
+
*/
|
|
27
|
+
shiftStep?: number;
|
|
28
|
+
/**
|
|
29
|
+
* Indicates whether the control is disabled.
|
|
30
|
+
*/
|
|
31
|
+
disabled?: boolean;
|
|
32
|
+
};
|
|
33
|
+
export type OnyxSliderControlValueProps = {
|
|
34
|
+
control: "value";
|
|
35
|
+
modelValue: number;
|
|
36
|
+
};
|
|
37
|
+
export type OnyxSliderControlIconProps = {
|
|
38
|
+
control: "icon";
|
|
39
|
+
direction: "increase" | "decrease";
|
|
40
|
+
shiftStep: number;
|
|
41
|
+
disabled?: boolean;
|
|
42
|
+
};
|
|
43
|
+
export type OnyxSliderControlInputProps = {
|
|
44
|
+
control: "input";
|
|
45
|
+
disabled?: boolean;
|
|
46
|
+
modelValue: number;
|
|
47
|
+
};
|
|
48
|
+
export type OnyxSliderControlProps = OnyxSliderControlSharedProps & DensityProp & (OnyxSliderControlValueProps | OnyxSliderControlIconProps | OnyxSliderControlInputProps);
|
|
@@ -239,8 +239,9 @@
|
|
|
239
239
|
}
|
|
240
240
|
},
|
|
241
241
|
"slider": {
|
|
242
|
-
"
|
|
243
|
-
"
|
|
242
|
+
"decreaseValueBy": "Wert um {n} verringern",
|
|
243
|
+
"increaseValueBy": "Wert um {n} erhöhen",
|
|
244
|
+
"changeValue": "Wert ändern"
|
|
244
245
|
},
|
|
245
246
|
"codeTabs": {
|
|
246
247
|
"label": "Codeausschnitte",
|
|
@@ -242,8 +242,9 @@
|
|
|
242
242
|
}
|
|
243
243
|
},
|
|
244
244
|
"slider": {
|
|
245
|
-
"
|
|
246
|
-
"
|
|
245
|
+
"decreaseValueBy": "Decrease value by {n}",
|
|
246
|
+
"increaseValueBy": "Increase value by {n}",
|
|
247
|
+
"changeValue": "Change value"
|
|
247
248
|
},
|
|
248
249
|
"codeTabs": {
|
|
249
250
|
"label": "Code snippets",
|
|
@@ -242,8 +242,9 @@ declare const _default: {
|
|
|
242
242
|
}
|
|
243
243
|
},
|
|
244
244
|
"slider": {
|
|
245
|
-
"
|
|
246
|
-
"
|
|
245
|
+
"decreaseValueBy": "Decrease value by {n}",
|
|
246
|
+
"increaseValueBy": "Increase value by {n}",
|
|
247
|
+
"changeValue": "Change value"
|
|
247
248
|
},
|
|
248
249
|
"codeTabs": {
|
|
249
250
|
"label": "Code snippets",
|
package/dist/index.d.ts
CHANGED
|
@@ -131,6 +131,8 @@ export * from './components/OnyxSidebar/types.js';
|
|
|
131
131
|
export { default as OnyxSkeleton } from './components/OnyxSkeleton/OnyxSkeleton.vue';
|
|
132
132
|
export { default as OnyxUnstableSlider } from './components/OnyxSlider/OnyxSlider.vue';
|
|
133
133
|
export * from './components/OnyxSlider/types.js';
|
|
134
|
+
export { default as OnyxUnstableSliderControl } from './components/OnyxSliderControl/OnyxSliderControl.vue';
|
|
135
|
+
export * from './components/OnyxSliderControl/types.js';
|
|
134
136
|
export { default as OnyxStepper } from './components/OnyxStepper/OnyxStepper.vue';
|
|
135
137
|
export * from './components/OnyxStepper/types.js';
|
|
136
138
|
export { default as OnyxSwitch } from './components/OnyxSwitch/OnyxSwitch.vue';
|