sit-onyx 1.0.0-alpha.13 → 1.0.0-alpha.130
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/README.md +2 -44
- package/dist/components/OnyxAppLayout/OnyxAppLayout.vue.d.ts +50 -0
- package/dist/components/OnyxAppLayout/types.d.ts +4 -0
- package/dist/components/OnyxAvatar/FemaleAvatar.vue.d.ts +2 -0
- package/dist/components/OnyxAvatar/MaleAvatar.vue.d.ts +2 -0
- package/dist/components/OnyxAvatar/OnyxAvatar.vue.d.ts +45 -0
- package/dist/components/OnyxAvatar/types.d.ts +20 -0
- package/dist/components/OnyxAvatarStack/OnyxAvatarStack.vue.d.ts +17 -0
- package/dist/components/OnyxBadge/OnyxBadge.vue.d.ts +45 -0
- package/dist/components/OnyxBadge/types.d.ts +18 -0
- package/dist/components/OnyxButton/OnyxButton.vue.d.ts +18 -10
- package/dist/components/OnyxButton/types.d.ts +18 -4
- package/dist/components/OnyxCheckbox/OnyxCheckbox.vue.d.ts +75 -0
- package/dist/components/OnyxCheckbox/types.d.ts +5 -13
- package/dist/components/OnyxCheckboxGroup/OnyxCheckboxGroup.vue.d.ts +63 -0
- package/dist/components/OnyxCheckboxGroup/types.d.ts +42 -0
- package/dist/components/OnyxDialog/OnyxDialog.vue.d.ts +56 -0
- package/dist/components/OnyxDialog/types.d.ts +25 -0
- package/dist/components/OnyxEmpty/OnyxEmpty.vue.d.ts +25 -0
- package/dist/components/OnyxFlyoutMenu/OnyxFlyoutMenu.vue.d.ts +33 -0
- package/dist/components/OnyxHeadline/OnyxHeadline.vue.d.ts +4 -3
- package/dist/components/OnyxIcon/OnyxIcon.vue.d.ts +5 -4
- package/dist/components/OnyxIcon/types.d.ts +10 -6
- package/dist/components/OnyxIconButton/OnyxIconButton.vue.d.ts +51 -0
- package/dist/components/OnyxIconButton/types.d.ts +34 -0
- package/dist/components/OnyxInfoTooltip/OnyxInfoTooltip.vue.d.ts +13 -0
- package/dist/components/OnyxInfoTooltip/types.d.ts +7 -0
- package/dist/components/OnyxInput/OnyxInput.vue.d.ts +60 -0
- package/dist/components/OnyxInput/types.d.ts +124 -0
- package/dist/components/OnyxLink/OnyxLink.vue.d.ts +49 -0
- package/dist/components/OnyxLink/types.d.ts +19 -0
- package/dist/components/OnyxListItem/OnyxListItem.vue.d.ts +24 -0
- package/dist/components/OnyxLoadingIndicator/CircleSpinner.vue.d.ts +2 -0
- package/dist/components/OnyxLoadingIndicator/LoadingDots.vue.d.ts +2 -0
- package/dist/components/OnyxLoadingIndicator/OnyxLoadingIndicator.vue.d.ts +27 -0
- package/dist/components/OnyxLoadingIndicator/types.d.ts +6 -0
- package/dist/components/OnyxMiniSearch/OnyxMiniSearch.vue.d.ts +32 -0
- package/dist/components/OnyxNavAppArea/OnyxNavAppArea.vue.d.ts +32 -0
- package/dist/components/OnyxNavAppArea/types.d.ts +14 -0
- package/dist/components/OnyxNavBar/OnyxNavBar.vue.d.ts +50 -0
- package/dist/components/OnyxNavBar/types.d.ts +13 -0
- package/dist/components/OnyxNavItem/OnyxNavItem.vue.d.ts +49 -0
- package/dist/components/OnyxNavItem/types.d.ts +25 -0
- package/dist/components/OnyxNavSeparator/OnyxNavSeparator.vue.d.ts +2 -0
- package/dist/components/OnyxPageLayout/OnyxPageLayout.vue.d.ts +36 -0
- package/dist/components/OnyxPageLayout/types.d.ts +11 -0
- package/dist/components/OnyxRadioButton/OnyxRadioButton.vue.d.ts +69 -0
- package/dist/components/OnyxRadioButton/types.d.ts +17 -18
- package/dist/components/OnyxRadioButtonGroup/OnyxRadioButtonGroup.vue.d.ts +69 -0
- package/dist/components/OnyxRadioButtonGroup/types.d.ts +39 -0
- package/dist/components/OnyxSelect/OnyxSelect.vue.d.ts +443 -0
- package/dist/components/OnyxSelect/types.d.ts +94 -0
- package/dist/components/OnyxSelectInput/OnyxSelectInput.vue.d.ts +129 -0
- package/dist/components/OnyxSelectInput/types.d.ts +66 -0
- package/dist/components/OnyxSelectOption/OnyxSelectOption.vue.d.ts +48 -0
- package/dist/components/OnyxSelectOption/types.d.ts +26 -0
- package/dist/components/OnyxSkeleton/OnyxSkeleton.vue.d.ts +2 -0
- package/dist/components/OnyxSwitch/OnyxSwitch.vue.d.ts +45 -0
- package/dist/components/OnyxSwitch/types.d.ts +36 -0
- package/dist/components/OnyxTable/OnyxTable.vue.d.ts +45 -0
- package/dist/components/OnyxTable/types.d.ts +12 -0
- package/dist/components/OnyxTag/OnyxTag.vue.d.ts +27 -0
- package/dist/components/OnyxTag/types.d.ts +17 -0
- package/dist/components/OnyxTextarea/OnyxTextarea.vue.d.ts +57 -0
- package/dist/components/OnyxTextarea/types.d.ts +31 -0
- package/dist/components/OnyxTimer/OnyxTimer.vue.d.ts +17 -0
- package/dist/components/OnyxTimer/types.d.ts +16 -0
- package/dist/components/OnyxTooltip/OnyxTooltip.vue.d.ts +69 -0
- package/dist/components/OnyxTooltip/types.d.ts +35 -0
- package/dist/components/OnyxUserMenu/OnyxUserMenu.vue.d.ts +72 -0
- package/dist/components/OnyxUserMenu/types.d.ts +22 -0
- package/dist/components/OnyxVisuallyHidden/OnyxVisuallyHidden.vue.d.ts +34 -0
- package/dist/components/OnyxVisuallyHidden/types.d.ts +3 -0
- package/dist/composables/checkAll.d.ts +22 -0
- package/dist/composables/density.d.ts +14 -0
- package/dist/composables/required.d.ts +27 -0
- package/dist/composables/scrollEnd.d.ts +29 -0
- package/dist/composables/useCustomValidity.d.ts +71 -0
- package/dist/composables/useTimer.d.ts +15 -0
- package/dist/i18n/index.d.ts +10 -8
- package/dist/i18n/locales/en-US.json.d.ts +78 -13
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +71 -7
- package/dist/index.js +2849 -170
- package/dist/{playwright-axe.d.ts → playwright/a11y.d.ts} +4 -3
- package/dist/playwright/screenshots.d.ts +65 -0
- package/dist/style.css +1 -1
- package/dist/types/breakpoints.d.ts +13 -0
- package/dist/types/components.d.ts +40 -0
- package/dist/types/fonts.d.ts +4 -0
- package/dist/types/i18n.d.ts +3 -3
- package/dist/types/index.d.ts +8 -0
- package/dist/types/utils.d.ts +0 -2
- package/dist/utils/attrs.d.ts +18 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/{comparator.d.ts → objects.d.ts} +1 -0
- package/dist/utils/plugin.d.ts +12 -0
- package/dist/utils/storybook.d.ts +28 -0
- package/dist/utils/strings.d.ts +5 -0
- package/dist/utils/time.d.ts +22 -0
- package/dist/utils/{forms.d.ts → validity.d.ts} +1 -1
- package/package.json +17 -16
- package/src/i18n/locales/de-DE.json +78 -13
- package/src/i18n/locales/en-US.json +78 -13
- package/src/i18n/locales/ko-KR.json +27 -0
- package/src/styles/breakpoints.scss +40 -0
- package/src/styles/density.scss +41 -0
- package/src/styles/fonts.scss +38 -0
- package/src/styles/global.css +21 -0
- package/src/styles/grid.ct.tsx +71 -69
- package/src/styles/grid.scss +89 -72
- package/src/styles/index.scss +7 -6
- package/src/styles/layers.scss +2 -0
- package/src/styles/mixins/checkbox.scss +74 -0
- package/src/styles/mixins/density.scss +27 -0
- package/src/styles/mixins/input.scss +175 -0
- package/src/styles/mixins/layers.scss +11 -0
- package/src/styles/mixins/list.scss +53 -0
- package/src/styles/mixins/normalize.scss +220 -0
- package/src/styles/mixins/sizes.scss +17 -0
- package/src/styles/required.scss +41 -0
- package/src/styles/root.scss +36 -0
- package/src/styles/variables-dark.css +1 -2
- package/src/styles/variables-light.css +1 -2
- package/src/styles/z-indices.scss +15 -0
- package/src/types/breakpoints.ts +14 -0
- package/src/types/colors.ts +10 -0
- package/src/types/components.ts +48 -0
- package/src/types/fonts.ts +7 -0
- package/src/types/i18n.ts +68 -0
- package/src/types/index.ts +9 -0
- package/src/types/utils.ts +4 -0
- package/dist/components/GridPlayground/GridPlayground.stories.d.ts +0 -13
- package/dist/components/OnyxButton/OnyxButton.stories.d.ts +0 -39
- package/dist/components/OnyxCheckbox/OnyxCheckbox.stories.d.ts +0 -44
- package/dist/components/OnyxHeadline/OnyxHeadline.stories.d.ts +0 -24
- package/dist/components/OnyxIcon/OnyxIcon.stories.d.ts +0 -37
- package/dist/components/OnyxRadioButton/OnyxRadioButton.stories.d.ts +0 -18
- package/dist/components/OnyxRadioButtonGroup/OnyxRadioButtonGroup.stories.d.ts +0 -27
- package/dist/components/TestInput/TestInput.stories.d.ts +0 -33
- package/dist/components/TestInput/TestInput.vue.d.ts +0 -80
- package/dist/types/dom.d.ts +0 -10
package/README.md
CHANGED
|
@@ -16,48 +16,6 @@ A design system and Vue.js component library created by [Schwarz IT](https://it.
|
|
|
16
16
|
|
|
17
17
|
<br />
|
|
18
18
|
|
|
19
|
-
##
|
|
19
|
+
## Documentation
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
### pnpm
|
|
24
|
-
|
|
25
|
-
```sh
|
|
26
|
-
pnpm add sit-onyx
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
### npm
|
|
30
|
-
|
|
31
|
-
```sh
|
|
32
|
-
npm install sit-onyx
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
### yarn
|
|
36
|
-
|
|
37
|
-
```sh
|
|
38
|
-
yarn install sit-onyx
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
After that, import the global CSS file in your `main.ts` file:
|
|
42
|
-
|
|
43
|
-
```ts
|
|
44
|
-
import "sit-onyx/style.css";
|
|
45
|
-
// if you override some onyx styles (e.g. CSS variables),
|
|
46
|
-
// make sure to import your custom CSS file after the default "sit-onyx/style.css"
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
Components are now ready to be used, e.g.:
|
|
50
|
-
|
|
51
|
-
```vue
|
|
52
|
-
<script lang="ts" setup>
|
|
53
|
-
import { OnyxButton } from "sit-onyx";
|
|
54
|
-
</script>
|
|
55
|
-
|
|
56
|
-
<template>
|
|
57
|
-
<OnyxButton label="Click me" />
|
|
58
|
-
</template>
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
<br />
|
|
62
|
-
|
|
63
|
-
## [Contributing](../../CONTRIBUTING.md)
|
|
21
|
+
You can find our documentation [here](https://onyx.schwarz).
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { OnyxAppLayoutProps } from './types';
|
|
2
|
+
|
|
3
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<OnyxAppLayoutProps>, {
|
|
4
|
+
navBarAlignment: string;
|
|
5
|
+
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<OnyxAppLayoutProps>, {
|
|
6
|
+
navBarAlignment: string;
|
|
7
|
+
}>>>, {
|
|
8
|
+
navBarAlignment: "top" | "left";
|
|
9
|
+
}, {}>, Readonly<{
|
|
10
|
+
/** Navigation area of the application */
|
|
11
|
+
navBar?(): unknown;
|
|
12
|
+
/** Page content area of the application */
|
|
13
|
+
default(): unknown;
|
|
14
|
+
/** Overlays that cover the page and exclude the nav area */
|
|
15
|
+
pageOverlay?(): unknown;
|
|
16
|
+
/** Overlays that cover the complete page */
|
|
17
|
+
appOverlay?(): unknown;
|
|
18
|
+
}> & {
|
|
19
|
+
/** Navigation area of the application */
|
|
20
|
+
navBar?(): unknown;
|
|
21
|
+
/** Page content area of the application */
|
|
22
|
+
default(): unknown;
|
|
23
|
+
/** Overlays that cover the page and exclude the nav area */
|
|
24
|
+
pageOverlay?(): unknown;
|
|
25
|
+
/** Overlays that cover the complete page */
|
|
26
|
+
appOverlay?(): unknown;
|
|
27
|
+
}>;
|
|
28
|
+
export default _default;
|
|
29
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
30
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
31
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
32
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
33
|
+
} : {
|
|
34
|
+
type: import('vue').PropType<T[K]>;
|
|
35
|
+
required: true;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
type __VLS_WithDefaults<P, D> = {
|
|
39
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
40
|
+
default: D[K];
|
|
41
|
+
}> : P[K];
|
|
42
|
+
};
|
|
43
|
+
type __VLS_Prettify<T> = {
|
|
44
|
+
[K in keyof T]: T[K];
|
|
45
|
+
} & {};
|
|
46
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
47
|
+
new (): {
|
|
48
|
+
$slots: S;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { OnyxAvatarProps } from './types';
|
|
2
|
+
|
|
3
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<OnyxAvatarProps>, {
|
|
4
|
+
size: string;
|
|
5
|
+
type: string;
|
|
6
|
+
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<OnyxAvatarProps>, {
|
|
7
|
+
size: string;
|
|
8
|
+
type: string;
|
|
9
|
+
}>>>, {
|
|
10
|
+
type: "initials" | "female" | "male";
|
|
11
|
+
size: "16px" | "24px" | "32px" | "48px" | "64px" | "96px";
|
|
12
|
+
}, {}>, Readonly<{
|
|
13
|
+
/**
|
|
14
|
+
* Optional slot to override the default initials. Will only be used if `type` is `initials`.
|
|
15
|
+
*/
|
|
16
|
+
default?(): unknown;
|
|
17
|
+
}> & {
|
|
18
|
+
/**
|
|
19
|
+
* Optional slot to override the default initials. Will only be used if `type` is `initials`.
|
|
20
|
+
*/
|
|
21
|
+
default?(): unknown;
|
|
22
|
+
}>;
|
|
23
|
+
export default _default;
|
|
24
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
25
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
26
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
27
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
28
|
+
} : {
|
|
29
|
+
type: import('vue').PropType<T[K]>;
|
|
30
|
+
required: true;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
type __VLS_WithDefaults<P, D> = {
|
|
34
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
35
|
+
default: D[K];
|
|
36
|
+
}> : P[K];
|
|
37
|
+
};
|
|
38
|
+
type __VLS_Prettify<T> = {
|
|
39
|
+
[K in keyof T]: T[K];
|
|
40
|
+
} & {};
|
|
41
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
42
|
+
new (): {
|
|
43
|
+
$slots: S;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { IconSize, IconSizeProp } from '../OnyxIcon/types';
|
|
2
|
+
|
|
3
|
+
export type OnyxAvatarProps = IconSizeProp<Exclude<IconSize, "12px">> & {
|
|
4
|
+
/**
|
|
5
|
+
* Label (e.g. the user name), required for accessibility.
|
|
6
|
+
* For `type="initials"`, the label will determine the displayed initials.
|
|
7
|
+
*/
|
|
8
|
+
label: string;
|
|
9
|
+
/**
|
|
10
|
+
* Image URL to show. If unset or an error occurs while loading, a fallback will be displayed
|
|
11
|
+
* depending on the `type` property.
|
|
12
|
+
*/
|
|
13
|
+
src?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Avatar type to use.
|
|
16
|
+
*/
|
|
17
|
+
type?: AvatarType;
|
|
18
|
+
};
|
|
19
|
+
export declare const AVATAR_TYPES: readonly ["initials", "female", "male"];
|
|
20
|
+
export type AvatarType = (typeof AVATAR_TYPES)[number];
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{}>>, {}, {}>, Readonly<{
|
|
2
|
+
/**
|
|
3
|
+
* Default slot to place the avatars.
|
|
4
|
+
*/
|
|
5
|
+
default(): unknown;
|
|
6
|
+
}> & {
|
|
7
|
+
/**
|
|
8
|
+
* Default slot to place the avatars.
|
|
9
|
+
*/
|
|
10
|
+
default(): unknown;
|
|
11
|
+
}>;
|
|
12
|
+
export default _default;
|
|
13
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
14
|
+
new (): {
|
|
15
|
+
$slots: S;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { OnyxBadgeProps } from './types';
|
|
2
|
+
|
|
3
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<OnyxBadgeProps>, {
|
|
4
|
+
color: string;
|
|
5
|
+
dot: boolean;
|
|
6
|
+
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<OnyxBadgeProps>, {
|
|
7
|
+
color: string;
|
|
8
|
+
dot: boolean;
|
|
9
|
+
}>>>, {
|
|
10
|
+
color: "primary" | "secondary" | "neutral" | "danger" | "warning" | "success" | "info";
|
|
11
|
+
dot: boolean;
|
|
12
|
+
}, {}>, Readonly<{
|
|
13
|
+
/**
|
|
14
|
+
* Badge content.
|
|
15
|
+
*/
|
|
16
|
+
default?(): unknown;
|
|
17
|
+
}> & {
|
|
18
|
+
/**
|
|
19
|
+
* Badge content.
|
|
20
|
+
*/
|
|
21
|
+
default?(): unknown;
|
|
22
|
+
}>;
|
|
23
|
+
export default _default;
|
|
24
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
25
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
26
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
27
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
28
|
+
} : {
|
|
29
|
+
type: import('vue').PropType<T[K]>;
|
|
30
|
+
required: true;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
type __VLS_WithDefaults<P, D> = {
|
|
34
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
35
|
+
default: D[K];
|
|
36
|
+
}> : P[K];
|
|
37
|
+
};
|
|
38
|
+
type __VLS_Prettify<T> = {
|
|
39
|
+
[K in keyof T]: T[K];
|
|
40
|
+
} & {};
|
|
41
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
42
|
+
new (): {
|
|
43
|
+
$slots: S;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { DensityProp } from '../../composables/density';
|
|
2
|
+
import { OnyxColor } from '../../types/colors';
|
|
3
|
+
|
|
4
|
+
export type OnyxBadgeProps = DensityProp & {
|
|
5
|
+
/**
|
|
6
|
+
* The color of the badge.
|
|
7
|
+
*/
|
|
8
|
+
color?: OnyxColor;
|
|
9
|
+
/**
|
|
10
|
+
* An icon which will be displayed inside the badge.
|
|
11
|
+
* Note: If the icon property is set, the default slot will not be rendered.
|
|
12
|
+
*/
|
|
13
|
+
icon?: string;
|
|
14
|
+
/**
|
|
15
|
+
* If `true`, only a colored dot will be displayed instead of the icon or slot content.
|
|
16
|
+
*/
|
|
17
|
+
dot?: boolean;
|
|
18
|
+
};
|
|
@@ -1,22 +1,30 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { OnyxButtonProps } from './types';
|
|
2
|
+
|
|
3
|
+
declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<OnyxButtonProps>, {
|
|
4
4
|
disabled: boolean;
|
|
5
|
+
loading: boolean;
|
|
5
6
|
type: string;
|
|
6
|
-
|
|
7
|
+
color: string;
|
|
7
8
|
mode: string;
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
skeleton: boolean;
|
|
10
|
+
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
11
|
+
click: () => void;
|
|
12
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<OnyxButtonProps>, {
|
|
10
13
|
disabled: boolean;
|
|
14
|
+
loading: boolean;
|
|
11
15
|
type: string;
|
|
12
|
-
|
|
16
|
+
color: string;
|
|
13
17
|
mode: string;
|
|
14
|
-
|
|
18
|
+
skeleton: boolean;
|
|
19
|
+
}>>> & {
|
|
20
|
+
onClick?: (() => any) | undefined;
|
|
21
|
+
}, {
|
|
15
22
|
type: "button" | "submit" | "reset";
|
|
16
|
-
|
|
23
|
+
color: "primary" | "neutral" | "danger";
|
|
17
24
|
disabled: boolean;
|
|
18
|
-
|
|
25
|
+
loading: boolean;
|
|
19
26
|
mode: "default" | "outline" | "plain";
|
|
27
|
+
skeleton: boolean;
|
|
20
28
|
}, {}>;
|
|
21
29
|
export default _default;
|
|
22
30
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { DensityProp } from '../../composables/density';
|
|
2
|
+
|
|
3
|
+
export type OnyxButtonProps = DensityProp & {
|
|
2
4
|
/**
|
|
3
5
|
* The text content of the button.
|
|
4
6
|
*/
|
|
@@ -7,6 +9,10 @@ export type ButtonProps = {
|
|
|
7
9
|
* If the button should be disabled or not.
|
|
8
10
|
*/
|
|
9
11
|
disabled?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Shows a loading indicator.
|
|
14
|
+
*/
|
|
15
|
+
loading?: boolean;
|
|
10
16
|
/**
|
|
11
17
|
* The button type.
|
|
12
18
|
*/
|
|
@@ -14,15 +20,23 @@ export type ButtonProps = {
|
|
|
14
20
|
/**
|
|
15
21
|
* The color of the button.
|
|
16
22
|
*/
|
|
17
|
-
|
|
23
|
+
color?: ButtonColor;
|
|
18
24
|
/**
|
|
19
25
|
* The style of the button.
|
|
20
26
|
*/
|
|
21
27
|
mode?: ButtonMode;
|
|
28
|
+
/**
|
|
29
|
+
* An icon which will be displayed on the left side of the label.
|
|
30
|
+
*/
|
|
31
|
+
icon?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Whether to show a skeleton button.
|
|
34
|
+
*/
|
|
35
|
+
skeleton?: boolean;
|
|
22
36
|
};
|
|
23
37
|
export declare const BUTTON_TYPES: readonly ["button", "submit", "reset"];
|
|
24
38
|
export type ButtonType = (typeof BUTTON_TYPES)[number];
|
|
25
|
-
export declare const
|
|
26
|
-
export type
|
|
39
|
+
export declare const BUTTON_COLORS: readonly ["primary", "neutral", "danger"];
|
|
40
|
+
export type ButtonColor = (typeof BUTTON_COLORS)[number];
|
|
27
41
|
export declare const BUTTON_MODES: readonly ["default", "outline", "plain"];
|
|
28
42
|
export type ButtonMode = (typeof BUTTON_MODES)[number];
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { SelectOptionValue } from '../../types';
|
|
2
|
+
|
|
3
|
+
declare const _default: <TValue extends SelectOptionValue = SelectOptionValue>(__VLS_props: {
|
|
4
|
+
required?: boolean | undefined;
|
|
5
|
+
label: string;
|
|
6
|
+
value: TValue;
|
|
7
|
+
density?: "default" | "compact" | "cozy" | undefined;
|
|
8
|
+
disabled?: boolean | undefined;
|
|
9
|
+
loading?: boolean | undefined;
|
|
10
|
+
skeleton?: boolean | undefined;
|
|
11
|
+
customError?: string | undefined;
|
|
12
|
+
indeterminate?: boolean | undefined;
|
|
13
|
+
hideLabel?: boolean | undefined;
|
|
14
|
+
truncation?: "ellipsis" | "multiline" | undefined;
|
|
15
|
+
requiredMarker?: "required" | "optional" | undefined;
|
|
16
|
+
modelValue?: boolean | undefined;
|
|
17
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
18
|
+
onValidityChange?: ((validity: ValidityState) => any) | undefined;
|
|
19
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, __VLS_ctx?: {
|
|
20
|
+
attrs: any;
|
|
21
|
+
slots: {};
|
|
22
|
+
emit: ((evt: "validityChange", validity: ValidityState) => void) & ((evt: "update:modelValue", value: boolean) => void);
|
|
23
|
+
} | undefined, __VLS_expose?: ((exposed: import('vue').ShallowUnwrapRef<{}>) => void) | undefined, __VLS_setup?: Promise<{
|
|
24
|
+
props: {
|
|
25
|
+
required?: boolean | undefined;
|
|
26
|
+
label: string;
|
|
27
|
+
value: TValue;
|
|
28
|
+
density?: "default" | "compact" | "cozy" | undefined;
|
|
29
|
+
disabled?: boolean | undefined;
|
|
30
|
+
loading?: boolean | undefined;
|
|
31
|
+
skeleton?: boolean | undefined;
|
|
32
|
+
customError?: string | undefined;
|
|
33
|
+
indeterminate?: boolean | undefined;
|
|
34
|
+
hideLabel?: boolean | undefined;
|
|
35
|
+
truncation?: "ellipsis" | "multiline" | undefined;
|
|
36
|
+
requiredMarker?: "required" | "optional" | undefined;
|
|
37
|
+
modelValue?: boolean | undefined;
|
|
38
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
39
|
+
onValidityChange?: ((validity: ValidityState) => any) | undefined;
|
|
40
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
41
|
+
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
42
|
+
attrs: any;
|
|
43
|
+
slots: {};
|
|
44
|
+
emit: ((evt: "validityChange", validity: ValidityState) => void) & ((evt: "update:modelValue", value: boolean) => void);
|
|
45
|
+
}>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
46
|
+
[key: string]: any;
|
|
47
|
+
}> & {
|
|
48
|
+
__ctx?: {
|
|
49
|
+
props: {
|
|
50
|
+
required?: boolean | undefined;
|
|
51
|
+
label: string;
|
|
52
|
+
value: TValue;
|
|
53
|
+
density?: "default" | "compact" | "cozy" | undefined;
|
|
54
|
+
disabled?: boolean | undefined;
|
|
55
|
+
loading?: boolean | undefined;
|
|
56
|
+
skeleton?: boolean | undefined;
|
|
57
|
+
customError?: string | undefined;
|
|
58
|
+
indeterminate?: boolean | undefined;
|
|
59
|
+
hideLabel?: boolean | undefined;
|
|
60
|
+
truncation?: "ellipsis" | "multiline" | undefined;
|
|
61
|
+
requiredMarker?: "required" | "optional" | undefined;
|
|
62
|
+
modelValue?: boolean | undefined;
|
|
63
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
64
|
+
onValidityChange?: ((validity: ValidityState) => any) | undefined;
|
|
65
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
66
|
+
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
67
|
+
attrs: any;
|
|
68
|
+
slots: {};
|
|
69
|
+
emit: ((evt: "validityChange", validity: ValidityState) => void) & ((evt: "update:modelValue", value: boolean) => void);
|
|
70
|
+
} | undefined;
|
|
71
|
+
};
|
|
72
|
+
export default _default;
|
|
73
|
+
type __VLS_Prettify<T> = {
|
|
74
|
+
[K in keyof T]: T[K];
|
|
75
|
+
} & {};
|
|
@@ -1,22 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
import { RequiredMarkerProp } from '../../composables/required';
|
|
2
|
+
import { CustomValidityProp } from '../../composables/useCustomValidity';
|
|
3
|
+
import { BaseSelectOption, SelectOptionValue } from '../../types';
|
|
4
|
+
|
|
5
|
+
export type OnyxCheckboxProps<TValue extends SelectOptionValue = SelectOptionValue> = BaseSelectOption<TValue> & RequiredMarkerProp & CustomValidityProp & {
|
|
2
6
|
/**
|
|
3
7
|
* Whether the checkbox is checked.
|
|
4
8
|
*/
|
|
5
9
|
modelValue?: boolean;
|
|
6
|
-
/**
|
|
7
|
-
* Label to show.
|
|
8
|
-
*/
|
|
9
|
-
label?: string;
|
|
10
10
|
/**
|
|
11
11
|
* If `true`, an indeterminate indicator is shown.
|
|
12
12
|
*/
|
|
13
13
|
indeterminate?: boolean;
|
|
14
|
-
/**
|
|
15
|
-
* Whether to disable the checkbox and prevent user interaction.
|
|
16
|
-
*/
|
|
17
|
-
disabled?: boolean;
|
|
18
|
-
/**
|
|
19
|
-
* Whether the checkbox is required / has to be checked.
|
|
20
|
-
*/
|
|
21
|
-
required?: boolean;
|
|
22
14
|
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { SelectOptionValue } from '../../types';
|
|
2
|
+
|
|
3
|
+
declare const _default: <TValue extends SelectOptionValue>(__VLS_props: {
|
|
4
|
+
density?: "default" | "compact" | "cozy" | undefined;
|
|
5
|
+
disabled?: boolean | undefined;
|
|
6
|
+
skeleton?: number | undefined;
|
|
7
|
+
modelValue?: TValue[] | undefined;
|
|
8
|
+
"onUpdate:modelValue"?: ((value: TValue[]) => any) | undefined;
|
|
9
|
+
options: import('./types').CheckboxGroupOption<TValue>[];
|
|
10
|
+
headline?: string | undefined;
|
|
11
|
+
direction?: "horizontal" | "vertical" | undefined;
|
|
12
|
+
withCheckAll?: boolean | {
|
|
13
|
+
label?: string | undefined;
|
|
14
|
+
} | undefined;
|
|
15
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, __VLS_ctx?: {
|
|
16
|
+
attrs: any;
|
|
17
|
+
slots: {};
|
|
18
|
+
emit: (evt: "update:modelValue", value: TValue[]) => void;
|
|
19
|
+
} | undefined, __VLS_expose?: ((exposed: import('vue').ShallowUnwrapRef<{}>) => void) | undefined, __VLS_setup?: Promise<{
|
|
20
|
+
props: {
|
|
21
|
+
density?: "default" | "compact" | "cozy" | undefined;
|
|
22
|
+
disabled?: boolean | undefined;
|
|
23
|
+
skeleton?: number | undefined;
|
|
24
|
+
modelValue?: TValue[] | undefined;
|
|
25
|
+
"onUpdate:modelValue"?: ((value: TValue[]) => any) | undefined;
|
|
26
|
+
options: import('./types').CheckboxGroupOption<TValue>[];
|
|
27
|
+
headline?: string | undefined;
|
|
28
|
+
direction?: "horizontal" | "vertical" | undefined;
|
|
29
|
+
withCheckAll?: boolean | {
|
|
30
|
+
label?: string | undefined;
|
|
31
|
+
} | undefined;
|
|
32
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
33
|
+
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
34
|
+
attrs: any;
|
|
35
|
+
slots: {};
|
|
36
|
+
emit: (evt: "update:modelValue", value: TValue[]) => void;
|
|
37
|
+
}>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
38
|
+
[key: string]: any;
|
|
39
|
+
}> & {
|
|
40
|
+
__ctx?: {
|
|
41
|
+
props: {
|
|
42
|
+
density?: "default" | "compact" | "cozy" | undefined;
|
|
43
|
+
disabled?: boolean | undefined;
|
|
44
|
+
skeleton?: number | undefined;
|
|
45
|
+
modelValue?: TValue[] | undefined;
|
|
46
|
+
"onUpdate:modelValue"?: ((value: TValue[]) => any) | undefined;
|
|
47
|
+
options: import('./types').CheckboxGroupOption<TValue>[];
|
|
48
|
+
headline?: string | undefined;
|
|
49
|
+
direction?: "horizontal" | "vertical" | undefined;
|
|
50
|
+
withCheckAll?: boolean | {
|
|
51
|
+
label?: string | undefined;
|
|
52
|
+
} | undefined;
|
|
53
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
54
|
+
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
55
|
+
attrs: any;
|
|
56
|
+
slots: {};
|
|
57
|
+
emit: (evt: "update:modelValue", value: TValue[]) => void;
|
|
58
|
+
} | undefined;
|
|
59
|
+
};
|
|
60
|
+
export default _default;
|
|
61
|
+
type __VLS_Prettify<T> = {
|
|
62
|
+
[K in keyof T]: T[K];
|
|
63
|
+
} & {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { DensityProp } from '../../composables/density';
|
|
2
|
+
import { RequiredMarkerProp } from '../../composables/required';
|
|
3
|
+
import { BaseSelectOption, Direction, SelectOptionValue } from '../../types';
|
|
4
|
+
|
|
5
|
+
export type OnyxCheckboxGroupProps<TValue extends SelectOptionValue = SelectOptionValue> = DensityProp & {
|
|
6
|
+
/**
|
|
7
|
+
* Checkbox options.
|
|
8
|
+
*/
|
|
9
|
+
options: CheckboxGroupOption<TValue>[];
|
|
10
|
+
/**
|
|
11
|
+
* Currently checked checkboxes.
|
|
12
|
+
*/
|
|
13
|
+
modelValue?: TValue[];
|
|
14
|
+
/**
|
|
15
|
+
* Headline to show above all checkboxes which is also the fieldset legend.
|
|
16
|
+
*/
|
|
17
|
+
headline?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Direction of the checkboxes.
|
|
20
|
+
*/
|
|
21
|
+
direction?: Direction;
|
|
22
|
+
/**
|
|
23
|
+
* If true, an additional checkbox will be displayed to check/uncheck all options.
|
|
24
|
+
* Disabled and skeleton checkboxes will be excluded from the check/uncheck behavior.
|
|
25
|
+
*/
|
|
26
|
+
withCheckAll?: boolean | {
|
|
27
|
+
/**
|
|
28
|
+
* Label for the `select all` checkbox.
|
|
29
|
+
* If unset, a default label will be shown depending on the current locale/language.
|
|
30
|
+
*/
|
|
31
|
+
label?: string;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Whether all checkboxes should be disabled.
|
|
35
|
+
*/
|
|
36
|
+
disabled?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* If set, the specified number of skeleton radio buttons will be shown.
|
|
39
|
+
*/
|
|
40
|
+
skeleton?: number;
|
|
41
|
+
};
|
|
42
|
+
export type CheckboxGroupOption<TValue extends SelectOptionValue = SelectOptionValue> = BaseSelectOption<TValue> & RequiredMarkerProp;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { OnyxDialogProps } from './types';
|
|
2
|
+
|
|
3
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<OnyxDialogProps>, {
|
|
4
|
+
open: boolean;
|
|
5
|
+
modal: boolean;
|
|
6
|
+
alert: boolean;
|
|
7
|
+
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
8
|
+
close: () => void;
|
|
9
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<OnyxDialogProps>, {
|
|
10
|
+
open: boolean;
|
|
11
|
+
modal: boolean;
|
|
12
|
+
alert: boolean;
|
|
13
|
+
}>>> & {
|
|
14
|
+
onClose?: (() => any) | undefined;
|
|
15
|
+
}, {
|
|
16
|
+
open: boolean;
|
|
17
|
+
modal: boolean;
|
|
18
|
+
alert: boolean;
|
|
19
|
+
}, {}>, Readonly<{
|
|
20
|
+
/**
|
|
21
|
+
* Dialog content. For accessibility purposes it is strongly recommended
|
|
22
|
+
* to focus an element inside the dialog when it opens. The element will depend
|
|
23
|
+
* on your use case (e.g. an input, button etc.).
|
|
24
|
+
*/
|
|
25
|
+
default(): unknown;
|
|
26
|
+
}> & {
|
|
27
|
+
/**
|
|
28
|
+
* Dialog content. For accessibility purposes it is strongly recommended
|
|
29
|
+
* to focus an element inside the dialog when it opens. The element will depend
|
|
30
|
+
* on your use case (e.g. an input, button etc.).
|
|
31
|
+
*/
|
|
32
|
+
default(): unknown;
|
|
33
|
+
}>;
|
|
34
|
+
export default _default;
|
|
35
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
36
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
37
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
38
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
39
|
+
} : {
|
|
40
|
+
type: import('vue').PropType<T[K]>;
|
|
41
|
+
required: true;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
type __VLS_WithDefaults<P, D> = {
|
|
45
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
46
|
+
default: D[K];
|
|
47
|
+
}> : P[K];
|
|
48
|
+
};
|
|
49
|
+
type __VLS_Prettify<T> = {
|
|
50
|
+
[K in keyof T]: T[K];
|
|
51
|
+
} & {};
|
|
52
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
53
|
+
new (): {
|
|
54
|
+
$slots: S;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { DensityProp } from '../../composables/density';
|
|
2
|
+
|
|
3
|
+
export type OnyxDialogProps = DensityProp & {
|
|
4
|
+
/**
|
|
5
|
+
* (Aria) label that describes the dialog. Required for accessibility / screen readers.
|
|
6
|
+
*/
|
|
7
|
+
label: string;
|
|
8
|
+
/**
|
|
9
|
+
* Whether the dialog is open.
|
|
10
|
+
*/
|
|
11
|
+
open?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Whether the dialog is a modal.
|
|
14
|
+
* If `true`, interaction with the rest of the page is prevented and a backdrop is displayed.
|
|
15
|
+
* Also the `close` event is emitted when pressing "Escape".
|
|
16
|
+
*/
|
|
17
|
+
modal?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Whether the dialog is an [alert dialog](https://www.w3.org/WAI/ARIA/apg/patterns/alertdialog/).
|
|
20
|
+
* Should be set for better accessibility / screen reader support when the dialog
|
|
21
|
+
* interrupts the user's workflow to communicate an important message and acquire a response,
|
|
22
|
+
* e.g. a delete confirmation.
|
|
23
|
+
*/
|
|
24
|
+
alert?: boolean;
|
|
25
|
+
};
|