sit-onyx 1.0.0-beta.310 → 1.0.0-beta.312

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.
@@ -0,0 +1,4 @@
1
+ import { DensityProp } from '../../composables/density.js';
2
+ import { OnyxBasicDialogProps } from '../OnyxBasicDialog/types.js';
3
+ import { OnyxBasicPopoverProps } from '../OnyxBasicPopover/types.js';
4
+ export type OnyxDialogProps = DensityProp & Omit<OnyxBasicPopoverProps, "role" | "fitParent"> & Pick<OnyxBasicDialogProps, "nonDismissible">;
@@ -0,0 +1,17 @@
1
+ import { SelectOptionValue } from '../../types/components.js';
2
+ import { OnyxSegmentedControlProps } from './types.js';
3
+ declare const _default: <TValue extends SelectOptionValue>(__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<{
4
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
5
+ readonly "onUpdate:modelValue"?: ((value: TValue) => any) | undefined;
6
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:modelValue"> & OnyxSegmentedControlProps<TValue> & Partial<{}>> & import('vue').PublicProps;
7
+ expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
8
+ attrs: any;
9
+ slots: {};
10
+ emit: (evt: "update:modelValue", value: TValue) => void;
11
+ }>) => import('vue').VNode & {
12
+ __ctx?: Awaited<typeof __VLS_setup>;
13
+ };
14
+ export default _default;
15
+ type __VLS_PrettifyLocal<T> = {
16
+ [K in keyof T]: T[K];
17
+ } & {};
@@ -1,11 +1,11 @@
1
1
  import { DensityProp } from '../../composables/density.js';
2
2
  import { SkeletonInjected } from '../../composables/useSkeletonState.js';
3
- import { BaseSelectOption } from '../../types/components.js';
4
- export type OnyxSegmentedControlProps = DensityProp & {
3
+ import { BaseSelectOption, SelectOptionValue } from '../../types/components.js';
4
+ export type OnyxSegmentedControlProps<TValue extends SelectOptionValue = SelectOptionValue> = DensityProp & {
5
5
  /**
6
- * value of the active control element
6
+ * Value of the active control element.
7
7
  */
8
- modelValue: string;
8
+ modelValue: TValue;
9
9
  /**
10
10
  * Whether to show a skeleton segmented control.
11
11
  */
@@ -13,14 +13,14 @@ export type OnyxSegmentedControlProps = DensityProp & {
13
13
  /**
14
14
  * Array of options for the segmented control.
15
15
  */
16
- options: OnyxSegmentedControlOption[];
16
+ options: OnyxSegmentedControlOption<TValue>[];
17
17
  /**
18
18
  * Same as the native `name` attribute of `<input>`.
19
19
  * Used to reference the input in JavaScript or in submitted form data.
20
20
  */
21
21
  name?: string;
22
22
  };
23
- export type OnyxSegmentedControlOption = Pick<BaseSelectOption, "value" | "label" | "hideLabel" | "autofocus" | "disabled"> & {
23
+ export type OnyxSegmentedControlOption<TValue extends SelectOptionValue = SelectOptionValue> = Pick<BaseSelectOption<TValue>, "value" | "label" | "hideLabel" | "autofocus" | "disabled"> & {
24
24
  /**
25
25
  * Icon for the option. If an icon is provided and `hideLabel` is set the width of the control will be `fit-content`.
26
26
  */
@@ -0,0 +1,7 @@
1
+ import { OnyxSegmentedControlElement } from './types.js';
2
+ declare const _default: import('vue').DefineComponent<OnyxSegmentedControlElement, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<OnyxSegmentedControlElement> & Readonly<{}>, {
3
+ disabled: import('../OnyxForm/OnyxForm.core.js', { with: { "resolution-mode": "import" } }).FormInjected<boolean>;
4
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
5
+ inputRef: HTMLInputElement;
6
+ }, any>;
7
+ export default _default;
package/dist/index.d.ts CHANGED
@@ -103,6 +103,10 @@ export { default as OnyxRadioGroup } from './components/OnyxRadioGroup/OnyxRadio
103
103
  export * from './components/OnyxRadioGroup/types.js';
104
104
  export { default as OnyxRouterLink } from './components/OnyxRouterLink/OnyxRouterLink.vue';
105
105
  export * from './components/OnyxRouterLink/types.js';
106
+ export { default as OnyxSegmentedControl } from './components/OnyxSegmentedControl/OnyxSegmentedControl.vue';
107
+ export * from './components/OnyxSegmentedControl/types.js';
108
+ export { default as OnyxSegmentedControlElement } from './components/OnyxSegmentedControlElement/OnyxSegmentedControlElement.vue';
109
+ export * from './components/OnyxSegmentedControlElement/types.js';
106
110
  export { default as OnyxSelect } from './components/OnyxSelect/OnyxSelect.vue';
107
111
  export * from './components/OnyxSelect/types.js';
108
112
  export { default as OnyxSelectDialog } from './components/OnyxSelectDialog/OnyxSelectDialog.vue';