@codeandfunction/callaloo 2.0.0 → 2.1.1
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/assets/styles.css +1 -0
- package/dist/components/Assets/CLIcon.vue.d.ts +16 -0
- package/dist/components/Assets/index.d.ts +3 -0
- package/dist/components/Assets/utils.d.ts +6 -0
- package/dist/components/Buttons/CLA11yButton.vue.d.ts +39 -0
- package/dist/components/Buttons/CLButton.vue.d.ts +258 -0
- package/dist/components/Buttons/index.d.ts +5 -0
- package/dist/components/Buttons/utils.d.ts +8 -0
- package/dist/components/Containers/CLCard.vue.d.ts +48 -0
- package/dist/components/Containers/CLDisclosure.vue.d.ts +78 -0
- package/dist/components/Containers/Carousel/CLCarousel.vue.d.ts +59 -0
- package/dist/components/Containers/Carousel/CLCarouselNavigation.vue.d.ts +21 -0
- package/dist/components/Containers/Carousel/CLCarouselSlide.vue.d.ts +17 -0
- package/dist/components/Containers/index.d.ts +9 -0
- package/dist/components/Containers/utils.d.ts +8 -0
- package/dist/components/Form/CLCheckbox.vue.d.ts +54 -0
- package/dist/components/Form/CLFormField.vue.d.ts +23 -0
- package/dist/components/Form/CLInput.vue.d.ts +87 -0
- package/dist/components/Form/CLInputMessages.vue.d.ts +10 -0
- package/dist/components/Form/CLRadioButton.vue.d.ts +54 -0
- package/dist/components/Form/CLSelect.vue.d.ts +60 -0
- package/dist/components/Form/CLTextArea.vue.d.ts +79 -0
- package/dist/components/Form/index.d.ts +11 -0
- package/dist/components/Form/utils.d.ts +12 -0
- package/dist/components/Indicators/CLBadge.vue.d.ts +24 -0
- package/dist/components/Indicators/CLBanner.vue.d.ts +13 -0
- package/dist/components/Indicators/CLPill.vue.d.ts +29 -0
- package/dist/components/Indicators/index.d.ts +7 -0
- package/dist/components/Indicators/utils.d.ts +9 -0
- package/dist/components/Loading/CLSkeleton.vue.d.ts +20 -0
- package/dist/components/Loading/CLSpinner.vue.d.ts +21 -0
- package/dist/components/Loading/index.d.ts +5 -0
- package/dist/components/Loading/utils.d.ts +6 -0
- package/dist/components/Modals/CLModal.vue.d.ts +46 -0
- package/dist/components/Modals/index.d.ts +3 -0
- package/dist/components/Modals/utils.d.ts +1 -0
- package/dist/components/Navigation/CLLink.vue.d.ts +45 -0
- package/dist/components/Navigation/CLNavLink.vue.d.ts +43 -0
- package/dist/components/Navigation/CLNavSection.vue.d.ts +17 -0
- package/dist/components/Navigation/index.d.ts +7 -0
- package/dist/components/Navigation/utils.d.ts +7 -0
- package/dist/components/Popups/CLDropdownMenu.vue.d.ts +543 -0
- package/dist/components/Popups/CLToast.vue.d.ts +13 -0
- package/dist/components/Popups/index.d.ts +5 -0
- package/dist/components/Popups/utils.d.ts +7 -0
- package/dist/components/Table/CLTable.vue.d.ts +46 -0
- package/dist/components/Table/CLTableBody.vue.d.ts +17 -0
- package/dist/components/Table/CLTableCell.vue.d.ts +41 -0
- package/dist/components/Table/CLTableFooter.vue.d.ts +17 -0
- package/dist/components/Table/CLTableHeader.vue.d.ts +17 -0
- package/dist/components/Table/CLTableNestedCell.vue.d.ts +20 -0
- package/dist/components/Table/CLTableRow.vue.d.ts +22 -0
- package/dist/components/Table/index.d.ts +15 -0
- package/dist/components/Table/utils.d.ts +1 -0
- package/dist/components/Theme/CLThemeProvider.vue.d.ts +28 -0
- package/dist/components/Theme/base-theme.d.ts +41 -0
- package/dist/components/Theme/index.d.ts +3 -0
- package/dist/components/Theme/utils.d.ts +38 -0
- package/dist/components/Typography/CLHeading.vue.d.ts +63 -0
- package/dist/components/Typography/CLText.vue.d.ts +86 -0
- package/dist/components/Typography/index.d.ts +5 -0
- package/dist/components/Typography/utils.d.ts +6 -0
- package/dist/composables/useDropdown.d.ts +14 -0
- package/dist/composables/useEsc.d.ts +9 -0
- package/dist/composables/useHasSlotContent.d.ts +1 -0
- package/dist/constants.d.ts +22 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +5287 -0
- package/dist/types.d.ts +586 -0
- package/dist/utils/helper.d.ts +16 -0
- package/package.json +3 -2
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { CLBorderRadius, CLColors, CLColorVariants, CLHeadingTypes, CLHeadingLevels, CLIconNames, CLIconSizes, CLSizes, CLTextTypes } from '../../index';
|
|
2
|
+
export interface Props {
|
|
3
|
+
/** When set to `true` adds borders to the disclosure's trigger container and content. */
|
|
4
|
+
bordered?: boolean;
|
|
5
|
+
/** The border radius size. The property can be one of `CLBorderRadius`, e.g. `CLBorderRadius.Medium`. */
|
|
6
|
+
borderRadius?: CLBorderRadius;
|
|
7
|
+
/** Sets the color of the Disclosure. The property can be one of `CLColors`, e.g. `CLColors.Primary`. */
|
|
8
|
+
color?: CLColors;
|
|
9
|
+
/** When set to `true`, it will remove any horizontal padding and overrides the vertical padding of the trigger and slot content. */
|
|
10
|
+
compact?: boolean;
|
|
11
|
+
/** When set to `false`, it will remove any horizontal and vertical padding. */
|
|
12
|
+
contentSpacing?: boolean;
|
|
13
|
+
/** A unique identifier, this is required. It ensures that if multiple disclosures are used, each will be handled properly. */
|
|
14
|
+
disclosureId: string;
|
|
15
|
+
/** Set the expanded state of the disclosure. */
|
|
16
|
+
expanded?: boolean;
|
|
17
|
+
/** Set the icon to display when the disclosure is expanded. */
|
|
18
|
+
expandedIcon?: CLIconNames;
|
|
19
|
+
/** Set the text of the heading which should be displayed in the trigger. */
|
|
20
|
+
heading?: string;
|
|
21
|
+
/** Set the heading type. The property can be one of `CLHeadingTypes`, e.g. `CLHeadingTypes.Title` */
|
|
22
|
+
headingType?: CLHeadingTypes;
|
|
23
|
+
/** Set the heading level. The property can be one of `CLHeadingLevels`, e.g. `CLHeadingLevels.H1` */
|
|
24
|
+
headingLevel?: CLHeadingLevels;
|
|
25
|
+
/** Set the icon to display before the heading text. */
|
|
26
|
+
iconBefore?: CLIconNames;
|
|
27
|
+
/** Set the size of the icon before the heading text. The property can be one of `CLIconSizes`, e.g. `CLIconSizes.Medium` */
|
|
28
|
+
iconBeforeSize?: CLIconSizes;
|
|
29
|
+
/** Set the icon to display when the disclosure is collapsed. */
|
|
30
|
+
iconAfter?: CLIconNames;
|
|
31
|
+
/** Set the size of the icon after the heading text. The property can be one of `CLIconSizes`, e.g. `CLIconSizes.Medium` */
|
|
32
|
+
iconAfterSize?: CLIconSizes;
|
|
33
|
+
/** Set the rounded state of the disclosure. */
|
|
34
|
+
rounded?: boolean;
|
|
35
|
+
/** Set the text of the sub-heading which should be displayed in the trigger after the heading. */
|
|
36
|
+
subHeading?: string;
|
|
37
|
+
/** Set the sub-heading text type. The property can be one of `CLTextTypes`, e.g. `CLTextTypes.Body` */
|
|
38
|
+
subHeadingType?: CLTextTypes;
|
|
39
|
+
/** Sets a custom ID used for unit tests. */
|
|
40
|
+
testId?: string;
|
|
41
|
+
/** Set the size of the trigger button. The property can be one of `CLSizes`, e.g. `CLSizes.Primary` */
|
|
42
|
+
triggerButtonSize?: CLSizes;
|
|
43
|
+
/** Sets the color variant. The property can be on of `CLColorVariants`, e.g `CLColorVariants.Soft`. */
|
|
44
|
+
variant?: CLColorVariants;
|
|
45
|
+
}
|
|
46
|
+
declare function __VLS_template(): {
|
|
47
|
+
attrs: Partial<{}>;
|
|
48
|
+
slots: {
|
|
49
|
+
default?(_: {}): any;
|
|
50
|
+
};
|
|
51
|
+
refs: {};
|
|
52
|
+
rootEl: HTMLDivElement;
|
|
53
|
+
};
|
|
54
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
55
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
56
|
+
color: CLColors;
|
|
57
|
+
variant: CLColorVariants;
|
|
58
|
+
borderRadius: CLBorderRadius;
|
|
59
|
+
testId: string;
|
|
60
|
+
bordered: boolean;
|
|
61
|
+
rounded: boolean;
|
|
62
|
+
iconAfter: CLIconNames;
|
|
63
|
+
iconAfterSize: CLIconSizes;
|
|
64
|
+
contentSpacing: boolean;
|
|
65
|
+
disclosureId: string;
|
|
66
|
+
expanded: boolean;
|
|
67
|
+
expandedIcon: CLIconNames;
|
|
68
|
+
headingType: CLHeadingTypes;
|
|
69
|
+
subHeadingType: CLTextTypes;
|
|
70
|
+
triggerButtonSize: CLSizes;
|
|
71
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
72
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
73
|
+
export default _default;
|
|
74
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
75
|
+
new (): {
|
|
76
|
+
$slots: S;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { CLAlign, CLPaginationType, CLOrder, CLColors } from '../../../index';
|
|
2
|
+
type PerPageBreakpoint = [number, number];
|
|
3
|
+
export interface Props {
|
|
4
|
+
/** Sets the color of the carousel navigation components. The property can be one of `CLColors`, e.g. `CLColors.Primary`. */
|
|
5
|
+
color?: CLColors;
|
|
6
|
+
/** Set the horizontal alignment of the controls. The property can be one of `CLAlign`, e.g. `CLAlign.Right` */
|
|
7
|
+
controlAlign?: CLAlign;
|
|
8
|
+
/** Set the position of the controls. The controls can be set to appear above or below the slot content. */
|
|
9
|
+
controlPosition?: CLOrder;
|
|
10
|
+
/** When set to `false` it will remove the carousel's functionality and layout. */
|
|
11
|
+
enabled?: boolean;
|
|
12
|
+
/** Set a custom label for the more button. Default is `More`. */
|
|
13
|
+
moreLabel?: string;
|
|
14
|
+
/** A callback function to handle when the more button is clicked. */
|
|
15
|
+
onShowMore?: () => void;
|
|
16
|
+
/** Set the the display style of the pagination. The property can be one of `CLPaginationType`, e.g. `CLPaginationType.Numbered */
|
|
17
|
+
paginationType?: CLPaginationType;
|
|
18
|
+
/** Number of slides displayed on each page. */
|
|
19
|
+
perPage?: number;
|
|
20
|
+
/** An array of the number of slides displayed on each page, based on a provided breakpoint, e.g. [[768,2],[1024,4]]. When set, it uses the `perPage` value as the default for mobile. */
|
|
21
|
+
perPageByBreakpoints?: PerPageBreakpoint[];
|
|
22
|
+
/** Sets a custom ID used for unit tests. */
|
|
23
|
+
testId?: string;
|
|
24
|
+
/** Sets the title of the carousel. */
|
|
25
|
+
title?: string;
|
|
26
|
+
/** Explicity set a width for the carousel. Default is 100% of it's parent container. */
|
|
27
|
+
width?: string;
|
|
28
|
+
}
|
|
29
|
+
declare function __VLS_template(): {
|
|
30
|
+
attrs: Partial<{}>;
|
|
31
|
+
slots: {
|
|
32
|
+
default?(_: {}): any;
|
|
33
|
+
};
|
|
34
|
+
refs: {
|
|
35
|
+
scrollContainer: HTMLDivElement;
|
|
36
|
+
};
|
|
37
|
+
rootEl: HTMLDivElement;
|
|
38
|
+
};
|
|
39
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
40
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
41
|
+
color: CLColors;
|
|
42
|
+
width: string;
|
|
43
|
+
testId: string;
|
|
44
|
+
enabled: boolean;
|
|
45
|
+
moreLabel: string;
|
|
46
|
+
paginationType: CLPaginationType;
|
|
47
|
+
controlAlign: CLAlign;
|
|
48
|
+
controlPosition: CLOrder;
|
|
49
|
+
perPage: number;
|
|
50
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
51
|
+
scrollContainer: HTMLDivElement;
|
|
52
|
+
}, HTMLDivElement>;
|
|
53
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
54
|
+
export default _default;
|
|
55
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
56
|
+
new (): {
|
|
57
|
+
$slots: S;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { CLGenericFunction, CLPaginationType, CLColors } from '../../../index';
|
|
2
|
+
interface Props {
|
|
3
|
+
color: CLColors;
|
|
4
|
+
currentPage: number;
|
|
5
|
+
enabled: boolean;
|
|
6
|
+
gotoPage: (index: number) => void;
|
|
7
|
+
moreLabel: string;
|
|
8
|
+
moreAriaLabel?: string;
|
|
9
|
+
nextPageEnabled: boolean;
|
|
10
|
+
paginationType: CLPaginationType;
|
|
11
|
+
prefix: string;
|
|
12
|
+
prevPageEnabled: boolean;
|
|
13
|
+
showMore?: CLGenericFunction;
|
|
14
|
+
showNextItems?: CLGenericFunction;
|
|
15
|
+
showPrevItems?: CLGenericFunction;
|
|
16
|
+
totalPages: number;
|
|
17
|
+
}
|
|
18
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
19
|
+
moreAriaLabel: string;
|
|
20
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare function __VLS_template(): {
|
|
2
|
+
attrs: Partial<{}>;
|
|
3
|
+
slots: {
|
|
4
|
+
default?(_: {}): any;
|
|
5
|
+
};
|
|
6
|
+
refs: {};
|
|
7
|
+
rootEl: HTMLDivElement;
|
|
8
|
+
};
|
|
9
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
10
|
+
declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
11
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
12
|
+
export default _default;
|
|
13
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
14
|
+
new (): {
|
|
15
|
+
$slots: S;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as CLCard } from './CLCard.vue';
|
|
2
|
+
import { default as CLCarousel } from './Carousel/CLCarousel.vue';
|
|
3
|
+
import { default as CLCarouselSlide } from './Carousel/CLCarouselSlide.vue';
|
|
4
|
+
import { default as CLDisclosure } from './CLDisclosure.vue';
|
|
5
|
+
export { CLCard, CLCarousel, CLCarouselSlide, CLDisclosure };
|
|
6
|
+
export type CLCard = InstanceType<typeof CLCard>;
|
|
7
|
+
export type CLCarousel = InstanceType<typeof CLCarousel>;
|
|
8
|
+
export type CLCarouselSlide = InstanceType<typeof CLCarouselSlide>;
|
|
9
|
+
export type CLDisclosure = InstanceType<typeof CLDisclosure>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CLColors, CLColorVariants } from '../../index';
|
|
2
|
+
interface ThemeProps {
|
|
3
|
+
color: CLColors;
|
|
4
|
+
variant: CLColorVariants;
|
|
5
|
+
}
|
|
6
|
+
export declare const cardTheme: ({ color, variant }: ThemeProps) => string;
|
|
7
|
+
export declare const disclosureTheme: ({ color, variant }: ThemeProps) => string;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { CLBorderRadius, CLColors, CLGenericFunction, CLGenericFocusFunction, CLSizes } from '../../index';
|
|
2
|
+
interface Props {
|
|
3
|
+
/** Sets the aria-label on the input. It should be used when there is no label present. */
|
|
4
|
+
ariaLabel?: string;
|
|
5
|
+
/** The border radius size. The property can be one of `CLBorderRadius`, e.g. `CLBorderRadius.Medium`. */
|
|
6
|
+
borderRadius?: CLBorderRadius;
|
|
7
|
+
/** A `boolean` value which dictates the busy state of the checkbox. */
|
|
8
|
+
busy?: boolean;
|
|
9
|
+
/** Sets the color of element's borders. The property can be one of `CLColors`, e.g. `CLColors.Primary`. */
|
|
10
|
+
color?: CLColors;
|
|
11
|
+
/** Set the checked state. */
|
|
12
|
+
checked?: boolean;
|
|
13
|
+
/** Set the disabled state. */
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
/** The form whom the checkbox belongs to. Useful for when a checkbox is not within a `form` element. */
|
|
16
|
+
form?: string;
|
|
17
|
+
/** A unique identifier, this is required. */
|
|
18
|
+
id: string;
|
|
19
|
+
/** The label text to be displayed which is associated to the checkbox. */
|
|
20
|
+
label?: string;
|
|
21
|
+
/** An array of messages to be displayed. */
|
|
22
|
+
messages?: string[];
|
|
23
|
+
/** The message type. The property can be one of `CLColors`, e.g. `CLColors.Danger`. */
|
|
24
|
+
messageType?: CLColors;
|
|
25
|
+
/** A string representing name of the checkbox. The name is submitted along with the checkbox value when the form it belongs to is submitted. */
|
|
26
|
+
name: string;
|
|
27
|
+
/** Set the required state. */
|
|
28
|
+
required?: boolean;
|
|
29
|
+
/** When set to `false` it will not render with rounded corners. */
|
|
30
|
+
rounded?: boolean;
|
|
31
|
+
/** Sets the checkbox size. The property can be one of `CLSizes`, e.g. `CLSizes.Medium`. */
|
|
32
|
+
size?: CLSizes;
|
|
33
|
+
/** Sets a custom ID used for unit tests. */
|
|
34
|
+
testId?: string;
|
|
35
|
+
/** Set the value for the checkbox when it's checked. */
|
|
36
|
+
value?: string | number;
|
|
37
|
+
/** A callback function which handles when the checkbox loses focus. */
|
|
38
|
+
onBlur?: CLGenericFocusFunction;
|
|
39
|
+
/** A callback function which handles when the checkbox is clicked. */
|
|
40
|
+
onChange?: CLGenericFunction;
|
|
41
|
+
/** A callback function which handles when the checkbox gains focus. */
|
|
42
|
+
onFocus?: CLGenericFocusFunction;
|
|
43
|
+
/** A callback function which handles when the checkbox input state is updated. */
|
|
44
|
+
onInput?: CLGenericFunction;
|
|
45
|
+
}
|
|
46
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
47
|
+
color: CLColors;
|
|
48
|
+
testId: string;
|
|
49
|
+
rounded: boolean;
|
|
50
|
+
size: CLSizes;
|
|
51
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
52
|
+
checkboxElem: HTMLInputElement;
|
|
53
|
+
}, HTMLDivElement>;
|
|
54
|
+
export default _default;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { CLOrientation } from '../../index';
|
|
2
|
+
interface Props {
|
|
3
|
+
fluid?: boolean;
|
|
4
|
+
hasPill?: boolean;
|
|
5
|
+
orientation?: CLOrientation;
|
|
6
|
+
}
|
|
7
|
+
declare function __VLS_template(): {
|
|
8
|
+
attrs: Partial<{}>;
|
|
9
|
+
slots: {
|
|
10
|
+
default?(_: {}): any;
|
|
11
|
+
};
|
|
12
|
+
refs: {};
|
|
13
|
+
rootEl: HTMLDivElement;
|
|
14
|
+
};
|
|
15
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
16
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
17
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
18
|
+
export default _default;
|
|
19
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
20
|
+
new (): {
|
|
21
|
+
$slots: S;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { CLBorderRadius, CLIconNames, CLInputTypes, CLGenericFocusFunction, CLGenericFunction, CLSizes, CLColors, CLOrientation } from '../../index';
|
|
2
|
+
interface Props {
|
|
3
|
+
/** Sets the aria-label on the input. It should be used when there is no label present. */
|
|
4
|
+
ariaLabel?: string;
|
|
5
|
+
/** See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#autocomplete for more details. */
|
|
6
|
+
autoComplete?: boolean;
|
|
7
|
+
/** The border radius size. The property can be one of `CLBorderRadius`, e.g. `CLBorderRadius.Medium`. */
|
|
8
|
+
borderRadius?: CLBorderRadius;
|
|
9
|
+
/** A `boolean` value which dictates the busy state of the input. */
|
|
10
|
+
busy?: boolean;
|
|
11
|
+
/** Sets the color of element's borders. The property can be one of `CLColors`, e.g. `CLColors.Primary`. */
|
|
12
|
+
color?: CLColors;
|
|
13
|
+
/** Set the disabled state. */
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
/** When set to true, sets the width of the Input to 100% of it's parent. */
|
|
16
|
+
fluid?: boolean;
|
|
17
|
+
/** The form whom the input belongs to. Useful for when a input is not within a `form` element. */
|
|
18
|
+
form?: string;
|
|
19
|
+
/** When a prefix or suffix is set, setting this to `true` changes the layout. */
|
|
20
|
+
grouped?: boolean;
|
|
21
|
+
/** A unique identifier, this is required. */
|
|
22
|
+
id: string;
|
|
23
|
+
/** The label text to be displayed which is associated to the input. */
|
|
24
|
+
label?: string;
|
|
25
|
+
/** The maximum amount of characters allowed for entry. */
|
|
26
|
+
maxLength?: number;
|
|
27
|
+
/** The minimum amount of characters required for entry. */
|
|
28
|
+
minLength?: number;
|
|
29
|
+
/** An array of messages to be displayed. */
|
|
30
|
+
messages?: string[];
|
|
31
|
+
/** The message type. The property can be one of `CLColors`, e.g. `CLColors.Danger`. */
|
|
32
|
+
messageType?: CLColors;
|
|
33
|
+
/** A string representing name of the input. The name is submitted along with the input value when the form it belongs to is submitted. */
|
|
34
|
+
name: string;
|
|
35
|
+
/** Sets the label position to be above or to the left of the form element. The property can be one of `CLOrientation` */
|
|
36
|
+
orientation?: CLOrientation;
|
|
37
|
+
/** A regexp pattern that can be used for validation. */
|
|
38
|
+
pattern?: string;
|
|
39
|
+
/** Setting this value would render the string the `<CLPill />` component below the input. */
|
|
40
|
+
pill?: string;
|
|
41
|
+
/** The default text shown when there is no value. Useful for providing a hint of what type of input is expected. */
|
|
42
|
+
placeholder?: string;
|
|
43
|
+
/** Sets the icon or text to be displayed before the user input. */
|
|
44
|
+
prefix?: string | CLIconNames;
|
|
45
|
+
/** When set to `true` the input cannot be edited. */
|
|
46
|
+
readonly?: boolean;
|
|
47
|
+
/** Set the required state. */
|
|
48
|
+
required?: boolean;
|
|
49
|
+
/** When set to `false` it will not render with rounded corners. */
|
|
50
|
+
rounded?: boolean;
|
|
51
|
+
/** Sets the input size. The property can be one of `CLSizes`, e.g. `CLSizes.Medium`. */
|
|
52
|
+
size?: CLSizes;
|
|
53
|
+
/** A hint provided to browsers that support it, whether or not to check for spelling errors. */
|
|
54
|
+
spellCheck?: boolean;
|
|
55
|
+
/**Sets the icon or text to be displayed after the user input. */
|
|
56
|
+
suffix?: string | CLIconNames;
|
|
57
|
+
/** Sets a custom ID used for unit tests. */
|
|
58
|
+
testId?: string;
|
|
59
|
+
/**Set the type of input, supports various input types. */
|
|
60
|
+
type?: CLInputTypes;
|
|
61
|
+
/** Set the value for the input when it's checked. */
|
|
62
|
+
value?: string | number;
|
|
63
|
+
/** A callback function which handles when the input loses focus. */
|
|
64
|
+
onBlur?: CLGenericFocusFunction;
|
|
65
|
+
/** A callback function which handles when the input value changes. */
|
|
66
|
+
onChange?: CLGenericFunction;
|
|
67
|
+
/** A callback function which handles when the input gains focus. */
|
|
68
|
+
onFocus?: CLGenericFocusFunction;
|
|
69
|
+
/** A callback function which handles when the input state is updated. */
|
|
70
|
+
onInput?: CLGenericFunction;
|
|
71
|
+
}
|
|
72
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
73
|
+
reset: (...args: any[]) => void;
|
|
74
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
75
|
+
onReset?: ((...args: any[]) => any) | undefined;
|
|
76
|
+
}>, {
|
|
77
|
+
color: CLColors;
|
|
78
|
+
testId: string;
|
|
79
|
+
type: CLInputTypes;
|
|
80
|
+
rounded: boolean;
|
|
81
|
+
fluid: boolean;
|
|
82
|
+
size: CLSizes;
|
|
83
|
+
orientation: CLOrientation;
|
|
84
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
85
|
+
inputElem: HTMLInputElement;
|
|
86
|
+
}, HTMLDivElement>;
|
|
87
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CLColors } from '../../index';
|
|
2
|
+
export interface Props {
|
|
3
|
+
id: string;
|
|
4
|
+
messages?: string[];
|
|
5
|
+
messageType?: CLColors;
|
|
6
|
+
}
|
|
7
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
8
|
+
messageType: CLColors;
|
|
9
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { CLColors, CLBorderRadius, CLGenericFunction, CLGenericFocusFunction, CLSizes } from '../../index';
|
|
2
|
+
interface Props {
|
|
3
|
+
/** Sets the aria-label on the input. It should be used when there is no label present. */
|
|
4
|
+
ariaLabel?: string;
|
|
5
|
+
/** The border radius size. The property can be one of `CLBorderRadius`, e.g. `CLBorderRadius.Medium`. */
|
|
6
|
+
borderRadius?: CLBorderRadius;
|
|
7
|
+
/** A `boolean` value which dictates the busy state of the radiobutton. */
|
|
8
|
+
busy?: boolean;
|
|
9
|
+
/** Sets the color of element's borders. The property can be one of `CLColors`, e.g. `CLColors.Primary`. */
|
|
10
|
+
color?: CLColors;
|
|
11
|
+
/** Set the checked state. */
|
|
12
|
+
checked?: boolean;
|
|
13
|
+
/** Set the disabled state. */
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
/** The form whom the radiobutton belongs to. Useful for when a radiobutton is not within a `form` element. */
|
|
16
|
+
form?: string;
|
|
17
|
+
/** A unique identifier, this is required. */
|
|
18
|
+
id: string;
|
|
19
|
+
/** The label text to be displayed which is associated to the radiobutton. */
|
|
20
|
+
label?: string;
|
|
21
|
+
/** An array of messages to be displayed. */
|
|
22
|
+
messages?: string[];
|
|
23
|
+
/** The message type. The property can be one of `CLColors`, e.g. `CLColors.Danger`. */
|
|
24
|
+
messageType?: CLColors;
|
|
25
|
+
/** A string representing name of the radiobutton. The name is submitted along with the radiobutton value when the form it belongs to is submitted. */
|
|
26
|
+
name: string;
|
|
27
|
+
/** Set the required state. */
|
|
28
|
+
required?: boolean;
|
|
29
|
+
/** When set to `false` it will not render with rounded corners. */
|
|
30
|
+
rounded?: boolean;
|
|
31
|
+
/** Sets the radiobutton size. The property can be one of `CLSizes`, e.g. `CLSizes.Medium`. */
|
|
32
|
+
size?: CLSizes;
|
|
33
|
+
/** Sets a custom ID used for unit tests. */
|
|
34
|
+
testId?: string;
|
|
35
|
+
/** Set the value for the radiobutton when it's checked. */
|
|
36
|
+
value?: string | number;
|
|
37
|
+
/** A callback function which handles when the radiobutton loses focus. */
|
|
38
|
+
onBlur?: CLGenericFocusFunction;
|
|
39
|
+
/** A callback function which handles when the radiobutton is clicked. */
|
|
40
|
+
onChange?: CLGenericFunction;
|
|
41
|
+
/** A callback function which handles when the radiobutton gains focus. */
|
|
42
|
+
onFocus?: CLGenericFocusFunction;
|
|
43
|
+
/** A callback function which handles when the radiobutton input state is updated. */
|
|
44
|
+
onInput?: CLGenericFunction;
|
|
45
|
+
}
|
|
46
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
47
|
+
color: CLColors;
|
|
48
|
+
testId: string;
|
|
49
|
+
rounded: boolean;
|
|
50
|
+
size: CLSizes;
|
|
51
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
52
|
+
radioButtonElem: HTMLInputElement;
|
|
53
|
+
}, HTMLDivElement>;
|
|
54
|
+
export default _default;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { CLBorderRadius, CLColors, CLGenericFocusFunction, CLGenericFunction, CLOption, CLOrientation, CLSizes } from '../../index';
|
|
2
|
+
interface Props {
|
|
3
|
+
/** Sets the aria-label on the input. It should be used when there is no label present. */
|
|
4
|
+
ariaLabel?: string;
|
|
5
|
+
/** The border radius size. The property can be one of `CLBorderRadius`, e.g. `CLBorderRadius.Medium`. */
|
|
6
|
+
borderRadius?: CLBorderRadius;
|
|
7
|
+
/** A `boolean` value which dictates the busy state of the select. */
|
|
8
|
+
busy?: boolean;
|
|
9
|
+
/** Sets the color of element's borders. The property can be one of `CLColors`, e.g. `CLColors.Primary`. */
|
|
10
|
+
color?: CLColors;
|
|
11
|
+
/** Set the disabled state. */
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
/** When set to true, sets the width of the select to 100% of it's parent. */
|
|
14
|
+
fluid?: boolean;
|
|
15
|
+
/** The form whom the select belongs to. Useful for when a select is not within a `form` element. */
|
|
16
|
+
form?: string;
|
|
17
|
+
/** A unique identifier, this is required. */
|
|
18
|
+
id: string;
|
|
19
|
+
/** The label text to be displayed which is associated to the select. */
|
|
20
|
+
label?: string;
|
|
21
|
+
/** An array of messages to be displayed. */
|
|
22
|
+
messages?: string[];
|
|
23
|
+
/** The message type. The property can be one of `CLColors`, e.g. `CLColors.Danger`. */
|
|
24
|
+
messageType?: CLColors;
|
|
25
|
+
/** A string representing name of the select. The name is submitted along with the select value when the form it belongs to is submitted. */
|
|
26
|
+
name: string;
|
|
27
|
+
/** Sets the label position to be above or to the left of the form element. The property can be one of `CLOrientation` */
|
|
28
|
+
orientation?: CLOrientation;
|
|
29
|
+
/** A list of options */
|
|
30
|
+
options: CLOption[];
|
|
31
|
+
/** Set the required state. */
|
|
32
|
+
required?: boolean;
|
|
33
|
+
/** When set to `false` it will not render with rounded corners. */
|
|
34
|
+
rounded?: boolean;
|
|
35
|
+
/** Sets the select size. The property can be one of `CLSizes`, e.g. `CLSizes.Medium`. */
|
|
36
|
+
size?: CLSizes;
|
|
37
|
+
/** Sets a custom ID used for unit tests. */
|
|
38
|
+
testId?: string;
|
|
39
|
+
/** Set the default value for the select. */
|
|
40
|
+
value?: string | number;
|
|
41
|
+
/** A callback function which handles when the select loses focus. */
|
|
42
|
+
onBlur?: CLGenericFocusFunction;
|
|
43
|
+
/** A callback function which handles when the select is clicked. */
|
|
44
|
+
onChange?: CLGenericFunction;
|
|
45
|
+
/** A callback function which handles when the select gains focus. */
|
|
46
|
+
onFocus?: CLGenericFocusFunction;
|
|
47
|
+
/** A callback function which handles when the select state is updated. */
|
|
48
|
+
onInput?: CLGenericFunction;
|
|
49
|
+
}
|
|
50
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
51
|
+
color: CLColors;
|
|
52
|
+
testId: string;
|
|
53
|
+
rounded: boolean;
|
|
54
|
+
fluid: boolean;
|
|
55
|
+
size: CLSizes;
|
|
56
|
+
orientation: CLOrientation;
|
|
57
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
58
|
+
selectElem: HTMLSelectElement;
|
|
59
|
+
}, HTMLDivElement>;
|
|
60
|
+
export default _default;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { CLBorderRadius, CLGenericFunction, CLGenericFocusFunction, CLOrientation, CLSizes, CLColors } from '../../index';
|
|
2
|
+
interface Props {
|
|
3
|
+
/** Sets the aria-label on the textarea. It should be used when there is no label present. */
|
|
4
|
+
ariaLabel?: string;
|
|
5
|
+
/** See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#autocomplete for more details. */
|
|
6
|
+
autoComplete?: boolean;
|
|
7
|
+
/** The border radius size. The property can be one of `CLBorderRadius`, e.g. `CLBorderRadius.Medium`. */
|
|
8
|
+
borderRadius?: CLBorderRadius;
|
|
9
|
+
/** A `boolean` value which dictates the busy state of the textarea. */
|
|
10
|
+
busy?: boolean;
|
|
11
|
+
/** Sets the color of element's borders. The property can be one of `CLColors`, e.g. `CLColors.Primary`. */
|
|
12
|
+
color?: CLColors;
|
|
13
|
+
/** Set the exact number of columns, to specify the size of the rendered textarea. */
|
|
14
|
+
cols?: number;
|
|
15
|
+
/** Set the disabled state. */
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
/** When set to true, sets the width of the TextArea to 100% of it's parent. */
|
|
18
|
+
fluid?: boolean;
|
|
19
|
+
/** The form whom the textarea belongs to. Useful for when a textarea is not within a `form` element. */
|
|
20
|
+
form?: string;
|
|
21
|
+
/** A unique identifier, this is required. */
|
|
22
|
+
id: string;
|
|
23
|
+
/** The label text to be displayed which is associated to the textarea. */
|
|
24
|
+
label?: string;
|
|
25
|
+
/** The maximum amount of characters allowed for entry. */
|
|
26
|
+
maxLength?: number;
|
|
27
|
+
/** The minimum amount of characters required for entry. */
|
|
28
|
+
minLength?: number;
|
|
29
|
+
/** An array of messages to be displayed. */
|
|
30
|
+
messages?: string[];
|
|
31
|
+
/** The message type. The property can be one of `CLColors`, e.g. `CLColors.Danger`. */
|
|
32
|
+
messageType?: CLColors;
|
|
33
|
+
/** A string representing name of the textarea. The name is submitted along with the textarea value when the form it belongs to is submitted. */
|
|
34
|
+
name: string;
|
|
35
|
+
/** Sets the label position to be above or to the left of the form element. The property can be one of `CLOrientation` */
|
|
36
|
+
orientation?: CLOrientation;
|
|
37
|
+
/** A regexp pattern that can be used for validation. */
|
|
38
|
+
pattern?: string;
|
|
39
|
+
/** The default text shown when there is no value. Useful for providing a hint of what type of textarea is expected. */
|
|
40
|
+
placeholder?: string;
|
|
41
|
+
/** When set to `true` the textarea cannot be edited. */
|
|
42
|
+
readonly?: boolean;
|
|
43
|
+
/** Set the required state. */
|
|
44
|
+
required?: boolean;
|
|
45
|
+
/** When set to `true` the textarea will be able to be resized. */
|
|
46
|
+
resizable?: boolean;
|
|
47
|
+
/** When set to `false` it will not render with rounded corners. */
|
|
48
|
+
rounded?: boolean;
|
|
49
|
+
/** Set the exact number of rows, to specify the size of the rendered textarea */
|
|
50
|
+
rows?: number;
|
|
51
|
+
/** Sets the textarea size. The property can be one of `CLSizes`, e.g. `CLSizes.Medium`. */
|
|
52
|
+
size?: CLSizes;
|
|
53
|
+
/** A hint provided to browsers that support it, whether or not to check for spelling errors. */
|
|
54
|
+
spellCheck?: boolean;
|
|
55
|
+
/** Sets a custom ID used for unit tests. */
|
|
56
|
+
testId?: string;
|
|
57
|
+
/** Set the value for the textarea when it's checked. */
|
|
58
|
+
value?: string | number;
|
|
59
|
+
/** A callback function which handles when the textarea loses focus. */
|
|
60
|
+
onBlur?: CLGenericFocusFunction;
|
|
61
|
+
/** A callback function which handles when the textarea value changes. */
|
|
62
|
+
onChange?: CLGenericFunction;
|
|
63
|
+
/** A callback function which handles when the textarea gains focus. */
|
|
64
|
+
onFocus?: CLGenericFocusFunction;
|
|
65
|
+
/** A callback function which handles when the textarea state is updated. */
|
|
66
|
+
onInput?: CLGenericFunction;
|
|
67
|
+
}
|
|
68
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
69
|
+
color: CLColors;
|
|
70
|
+
testId: string;
|
|
71
|
+
rounded: boolean;
|
|
72
|
+
fluid: boolean;
|
|
73
|
+
size: CLSizes;
|
|
74
|
+
orientation: CLOrientation;
|
|
75
|
+
resizable: boolean;
|
|
76
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
77
|
+
inputElem: HTMLTextAreaElement;
|
|
78
|
+
}, HTMLDivElement>;
|
|
79
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as CLCheckbox } from './CLCheckbox.vue';
|
|
2
|
+
import { default as CLInput } from './CLInput.vue';
|
|
3
|
+
import { default as CLRadioButton } from './CLRadioButton.vue';
|
|
4
|
+
import { default as CLSelect } from './CLSelect.vue';
|
|
5
|
+
import { default as CLTextArea } from './CLTextArea.vue';
|
|
6
|
+
export { CLCheckbox, CLInput, CLRadioButton, CLSelect, CLTextArea };
|
|
7
|
+
export type CLCheckbox = InstanceType<typeof CLCheckbox>;
|
|
8
|
+
export type CLInput = InstanceType<typeof CLInput>;
|
|
9
|
+
export type CLRadioButton = InstanceType<typeof CLRadioButton>;
|
|
10
|
+
export type CLSelect = InstanceType<typeof CLSelect>;
|
|
11
|
+
export type CLTextArea = InstanceType<typeof CLTextArea>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CLColors } from '../../index';
|
|
2
|
+
interface ThemeProps {
|
|
3
|
+
color: CLColors;
|
|
4
|
+
component?: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
readonly?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const checkboxTheme: ({ color, component, disabled }: ThemeProps) => string;
|
|
9
|
+
export declare const inputTheme: ({ color, component, disabled, readonly }: ThemeProps) => string;
|
|
10
|
+
export declare const inputMessagesTheme: ({ color }: ThemeProps) => string;
|
|
11
|
+
export declare const selectTheme: ({ color, disabled }: ThemeProps) => string;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { CLBorderRadius, CLColors, CLColorVariants } from '../../index';
|
|
2
|
+
export interface Props {
|
|
3
|
+
/** The border radius size. The property can be one of `CLBorderRadius`, e.g. `CLBorderRadius.Medium`. */
|
|
4
|
+
borderRadius?: CLBorderRadius;
|
|
5
|
+
/** Sets the color of the Badge. The property can be one of `CLColors`, e.g. `CLColors.Primary`. */
|
|
6
|
+
color?: CLColors;
|
|
7
|
+
/** The count to display in the Badge. */
|
|
8
|
+
label: string | number;
|
|
9
|
+
/** The `elevated` property displays a shadow to indicate elevation. */
|
|
10
|
+
elevated?: boolean;
|
|
11
|
+
/** The maximum amount of characters to display. Once the amount characters goes beyond the limit, a plus sign is added after the displayed characters. */
|
|
12
|
+
limit?: number;
|
|
13
|
+
/** Sets a custom ID used for unit tests. */
|
|
14
|
+
testId?: string;
|
|
15
|
+
/** Sets the color variant. The property can be on of `CLColorVariants`, e.g `CLColorVariants.Soft`. */
|
|
16
|
+
variant?: CLColorVariants;
|
|
17
|
+
}
|
|
18
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
19
|
+
color: CLColors;
|
|
20
|
+
variant: CLColorVariants;
|
|
21
|
+
elevated: boolean;
|
|
22
|
+
testId: string;
|
|
23
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
24
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CLAlign, CLBannerProps, CLColors, CLColorVariants } from '../../index';
|
|
2
|
+
declare const _default: import('vue').DefineComponent<CLBannerProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<CLBannerProps> & Readonly<{}>, {
|
|
3
|
+
color: CLColors;
|
|
4
|
+
width: string;
|
|
5
|
+
height: string;
|
|
6
|
+
variant: CLColorVariants;
|
|
7
|
+
testId: string;
|
|
8
|
+
align: CLAlign;
|
|
9
|
+
bordered: boolean;
|
|
10
|
+
busy: boolean;
|
|
11
|
+
rounded: boolean;
|
|
12
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
13
|
+
export default _default;
|