@skedulo/breeze-ui 0.11.0 → 1.0.0-preview.0
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/package.json +42 -8
- package/dist/custom-elements.json +0 -33408
- package/dist/lib/cjs/breeze-ui.js +0 -5000
- package/dist/lib/cjs/package.json +0 -3
- package/dist/lib/es/breeze-ui.js +0 -25629
- package/dist/lib/es/package.json +0 -3
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/dist/types/animation/fade-in-out.d.ts +0 -37
- package/dist/types/animation/fade-in-out.d.ts.map +0 -1
- package/dist/types/animation/index.d.ts +0 -2
- package/dist/types/animation/index.d.ts.map +0 -1
- package/dist/types/components/alert.d.ts +0 -58
- package/dist/types/components/alert.d.ts.map +0 -1
- package/dist/types/components/avatar.d.ts +0 -131
- package/dist/types/components/avatar.d.ts.map +0 -1
- package/dist/types/components/badge.d.ts +0 -58
- package/dist/types/components/badge.d.ts.map +0 -1
- package/dist/types/components/button.d.ts +0 -157
- package/dist/types/components/button.d.ts.map +0 -1
- package/dist/types/components/combo-box.d.ts +0 -33
- package/dist/types/components/combo-box.d.ts.map +0 -1
- package/dist/types/components/confirmation-dialog.d.ts +0 -44
- package/dist/types/components/confirmation-dialog.d.ts.map +0 -1
- package/dist/types/components/dropdown-button.d.ts +0 -44
- package/dist/types/components/dropdown-button.d.ts.map +0 -1
- package/dist/types/components/form-elements/code-theme.d.ts +0 -2
- package/dist/types/components/form-elements/code-theme.d.ts.map +0 -1
- package/dist/types/components/form-elements/index.d.ts +0 -14
- package/dist/types/components/form-elements/index.d.ts.map +0 -1
- package/dist/types/components/form-elements/input-base.d.ts +0 -76
- package/dist/types/components/form-elements/input-base.d.ts.map +0 -1
- package/dist/types/components/form-elements/input-checkbox.d.ts +0 -61
- package/dist/types/components/form-elements/input-checkbox.d.ts.map +0 -1
- package/dist/types/components/form-elements/input-code.d.ts +0 -78
- package/dist/types/components/form-elements/input-code.d.ts.map +0 -1
- package/dist/types/components/form-elements/input-error.d.ts +0 -23
- package/dist/types/components/form-elements/input-error.d.ts.map +0 -1
- package/dist/types/components/form-elements/input-guide.d.ts +0 -24
- package/dist/types/components/form-elements/input-guide.d.ts.map +0 -1
- package/dist/types/components/form-elements/input-multiselect.d.ts +0 -136
- package/dist/types/components/form-elements/input-multiselect.d.ts.map +0 -1
- package/dist/types/components/form-elements/input-number.d.ts +0 -72
- package/dist/types/components/form-elements/input-number.d.ts.map +0 -1
- package/dist/types/components/form-elements/input-radio.d.ts +0 -87
- package/dist/types/components/form-elements/input-radio.d.ts.map +0 -1
- package/dist/types/components/form-elements/input-select-base.d.ts +0 -218
- package/dist/types/components/form-elements/input-select-base.d.ts.map +0 -1
- package/dist/types/components/form-elements/input-select.d.ts +0 -92
- package/dist/types/components/form-elements/input-select.d.ts.map +0 -1
- package/dist/types/components/form-elements/input-text-base.d.ts +0 -36
- package/dist/types/components/form-elements/input-text-base.d.ts.map +0 -1
- package/dist/types/components/form-elements/input-text.d.ts +0 -38
- package/dist/types/components/form-elements/input-text.d.ts.map +0 -1
- package/dist/types/components/form-elements/input-textarea.d.ts +0 -39
- package/dist/types/components/form-elements/input-textarea.d.ts.map +0 -1
- package/dist/types/components/form-elements/input-time.d.ts +0 -106
- package/dist/types/components/form-elements/input-time.d.ts.map +0 -1
- package/dist/types/components/form-elements/labeled-input.d.ts +0 -93
- package/dist/types/components/form-elements/labeled-input.d.ts.map +0 -1
- package/dist/types/components/heading.d.ts +0 -32
- package/dist/types/components/heading.d.ts.map +0 -1
- package/dist/types/components/icon/icon.d.ts +0 -30
- package/dist/types/components/icon/icon.d.ts.map +0 -1
- package/dist/types/components/icon/icons.d.ts +0 -16
- package/dist/types/components/icon/icons.d.ts.map +0 -1
- package/dist/types/components/icon/index.d.ts +0 -3
- package/dist/types/components/icon/index.d.ts.map +0 -1
- package/dist/types/components/icon/legacy-icons.d.ts +0 -9
- package/dist/types/components/icon/legacy-icons.d.ts.map +0 -1
- package/dist/types/components/illustration/illustration.d.ts +0 -41
- package/dist/types/components/illustration/illustration.d.ts.map +0 -1
- package/dist/types/components/illustration/illustrations.d.ts +0 -6
- package/dist/types/components/illustration/illustrations.d.ts.map +0 -1
- package/dist/types/components/illustration/index.d.ts +0 -3
- package/dist/types/components/illustration/index.d.ts.map +0 -1
- package/dist/types/components/index.d.ts +0 -27
- package/dist/types/components/index.d.ts.map +0 -1
- package/dist/types/components/inline-edit/index.d.ts +0 -7
- package/dist/types/components/inline-edit/index.d.ts.map +0 -1
- package/dist/types/components/inline-edit/inline-edit-controls.d.ts +0 -29
- package/dist/types/components/inline-edit/inline-edit-controls.d.ts.map +0 -1
- package/dist/types/components/inline-edit/inline-edit-field.d.ts +0 -203
- package/dist/types/components/inline-edit/inline-edit-field.d.ts.map +0 -1
- package/dist/types/components/inline-edit/inline-edit-group.d.ts +0 -60
- package/dist/types/components/inline-edit/inline-edit-group.d.ts.map +0 -1
- package/dist/types/components/inline-edit/inline-edit.base.d.ts +0 -52
- package/dist/types/components/inline-edit/inline-edit.base.d.ts.map +0 -1
- package/dist/types/components/inline-edit/inline-edit.const.d.ts +0 -6
- package/dist/types/components/inline-edit/inline-edit.const.d.ts.map +0 -1
- package/dist/types/components/inline-edit/inline-edit.events.d.ts +0 -32
- package/dist/types/components/inline-edit/inline-edit.events.d.ts.map +0 -1
- package/dist/types/components/inline-edit/inline-edit.styles.d.ts +0 -4
- package/dist/types/components/inline-edit/inline-edit.styles.d.ts.map +0 -1
- package/dist/types/components/inline-edit/inline-edit.types.d.ts +0 -45
- package/dist/types/components/inline-edit/inline-edit.types.d.ts.map +0 -1
- package/dist/types/components/legacy-scoped-components.d.ts +0 -269
- package/dist/types/components/legacy-scoped-components.d.ts.map +0 -1
- package/dist/types/components/link.d.ts +0 -102
- package/dist/types/components/link.d.ts.map +0 -1
- package/dist/types/components/loading.d.ts +0 -27
- package/dist/types/components/loading.d.ts.map +0 -1
- package/dist/types/components/lozenge.d.ts +0 -94
- package/dist/types/components/lozenge.d.ts.map +0 -1
- package/dist/types/components/menu/dropdown-menu.d.ts +0 -142
- package/dist/types/components/menu/dropdown-menu.d.ts.map +0 -1
- package/dist/types/components/menu/index.d.ts +0 -4
- package/dist/types/components/menu/index.d.ts.map +0 -1
- package/dist/types/components/menu/menu-item.d.ts +0 -103
- package/dist/types/components/menu/menu-item.d.ts.map +0 -1
- package/dist/types/components/menu/menu.const.d.ts +0 -3
- package/dist/types/components/menu/menu.const.d.ts.map +0 -1
- package/dist/types/components/menu/menu.d.ts +0 -188
- package/dist/types/components/menu/menu.d.ts.map +0 -1
- package/dist/types/components/modal/index.d.ts +0 -3
- package/dist/types/components/modal/index.d.ts.map +0 -1
- package/dist/types/components/modal/layout.d.ts +0 -60
- package/dist/types/components/modal/layout.d.ts.map +0 -1
- package/dist/types/components/modal/modal.d.ts +0 -75
- package/dist/types/components/modal/modal.d.ts.map +0 -1
- package/dist/types/components/navigation/index.d.ts +0 -3
- package/dist/types/components/navigation/index.d.ts.map +0 -1
- package/dist/types/components/navigation/side-navigation-item.d.ts +0 -33
- package/dist/types/components/navigation/side-navigation-item.d.ts.map +0 -1
- package/dist/types/components/navigation/side-navigation.d.ts +0 -23
- package/dist/types/components/navigation/side-navigation.d.ts.map +0 -1
- package/dist/types/components/pagination-utils.d.ts +0 -2
- package/dist/types/components/pagination-utils.d.ts.map +0 -1
- package/dist/types/components/pagination.d.ts +0 -106
- package/dist/types/components/pagination.d.ts.map +0 -1
- package/dist/types/components/popover.d.ts +0 -188
- package/dist/types/components/popover.d.ts.map +0 -1
- package/dist/types/components/record-field/index.d.ts +0 -5
- package/dist/types/components/record-field/index.d.ts.map +0 -1
- package/dist/types/components/record-field/record-field-label.d.ts +0 -22
- package/dist/types/components/record-field/record-field-label.d.ts.map +0 -1
- package/dist/types/components/record-field/record-field.const.d.ts +0 -5
- package/dist/types/components/record-field/record-field.const.d.ts.map +0 -1
- package/dist/types/components/record-field/record-field.d.ts +0 -67
- package/dist/types/components/record-field/record-field.d.ts.map +0 -1
- package/dist/types/components/record-field/record-field.styles.d.ts +0 -4
- package/dist/types/components/record-field/record-field.styles.d.ts.map +0 -1
- package/dist/types/components/record-field/record-field.types.d.ts +0 -27
- package/dist/types/components/record-field/record-field.types.d.ts.map +0 -1
- package/dist/types/components/record-row.d.ts +0 -37
- package/dist/types/components/record-row.d.ts.map +0 -1
- package/dist/types/components/tabs/index.d.ts +0 -37
- package/dist/types/components/tabs/index.d.ts.map +0 -1
- package/dist/types/components/tabs/panel.d.ts +0 -29
- package/dist/types/components/tabs/panel.d.ts.map +0 -1
- package/dist/types/components/tabs/tab-bar.d.ts +0 -36
- package/dist/types/components/tabs/tab-bar.d.ts.map +0 -1
- package/dist/types/components/tabs/tab-events.d.ts +0 -11
- package/dist/types/components/tabs/tab-events.d.ts.map +0 -1
- package/dist/types/components/tabs/tab.d.ts +0 -34
- package/dist/types/components/tabs/tab.d.ts.map +0 -1
- package/dist/types/components/tooltip.d.ts +0 -66
- package/dist/types/components/tooltip.d.ts.map +0 -1
- package/dist/types/components/virtual-list.d.ts +0 -195
- package/dist/types/components/virtual-list.d.ts.map +0 -1
- package/dist/types/helpers/css-helpers.d.ts +0 -34
- package/dist/types/helpers/css-helpers.d.ts.map +0 -1
- package/dist/types/helpers/index.d.ts +0 -2
- package/dist/types/helpers/index.d.ts.map +0 -1
- package/dist/types/layout/flex.d.ts +0 -49
- package/dist/types/layout/flex.d.ts.map +0 -1
- package/dist/types/layout/footer.d.ts +0 -23
- package/dist/types/layout/footer.d.ts.map +0 -1
- package/dist/types/layout/grid/grid-item.d.ts +0 -43
- package/dist/types/layout/grid/grid-item.d.ts.map +0 -1
- package/dist/types/layout/grid/grid.d.ts +0 -50
- package/dist/types/layout/grid/grid.d.ts.map +0 -1
- package/dist/types/layout/grid/index.d.ts +0 -3
- package/dist/types/layout/grid/index.d.ts.map +0 -1
- package/dist/types/layout/header-footer-page.d.ts +0 -23
- package/dist/types/layout/header-footer-page.d.ts.map +0 -1
- package/dist/types/layout/header.d.ts +0 -25
- package/dist/types/layout/header.d.ts.map +0 -1
- package/dist/types/layout/index.d.ts +0 -9
- package/dist/types/layout/index.d.ts.map +0 -1
- package/dist/types/layout/page-header.d.ts +0 -53
- package/dist/types/layout/page-header.d.ts.map +0 -1
- package/dist/types/layout/responsive-columns.d.ts +0 -23
- package/dist/types/layout/responsive-columns.d.ts.map +0 -1
- package/dist/types/layout/split-row.d.ts +0 -84
- package/dist/types/layout/split-row.d.ts.map +0 -1
- package/dist/types/main.d.ts +0 -7
- package/dist/types/main.d.ts.map +0 -1
- package/dist/types/mixins/component-utils.d.ts +0 -18
- package/dist/types/mixins/component-utils.d.ts.map +0 -1
- package/dist/types/mixins/index.d.ts +0 -2
- package/dist/types/mixins/index.d.ts.map +0 -1
- package/dist/types/storybook/colors.stories.d.ts +0 -20
- package/dist/types/storybook/colors.stories.d.ts.map +0 -1
- package/dist/types/styles/borders.d.ts +0 -2
- package/dist/types/styles/borders.d.ts.map +0 -1
- package/dist/types/styles/breakpoints.d.ts +0 -15
- package/dist/types/styles/breakpoints.d.ts.map +0 -1
- package/dist/types/styles/colors.d.ts +0 -176
- package/dist/types/styles/colors.d.ts.map +0 -1
- package/dist/types/styles/global-styles.d.ts +0 -18
- package/dist/types/styles/global-styles.d.ts.map +0 -1
- package/dist/types/styles/index.d.ts +0 -3
- package/dist/types/styles/index.d.ts.map +0 -1
- package/dist/types/styles/legacy-scoped-variables.d.ts +0 -17
- package/dist/types/styles/legacy-scoped-variables.d.ts.map +0 -1
- package/dist/types/styles/shadows.d.ts +0 -2
- package/dist/types/styles/shadows.d.ts.map +0 -1
- package/dist/types/styles/spacing.d.ts +0 -7
- package/dist/types/styles/spacing.d.ts.map +0 -1
- package/dist/types/styles/typography.d.ts +0 -2
- package/dist/types/styles/typography.d.ts.map +0 -1
- package/dist/types/styles/z-index.d.ts +0 -2
- package/dist/types/styles/z-index.d.ts.map +0 -1
- package/dist/types/surfaces/card/card-footer.d.ts +0 -15
- package/dist/types/surfaces/card/card-footer.d.ts.map +0 -1
- package/dist/types/surfaces/card/card-header.d.ts +0 -16
- package/dist/types/surfaces/card/card-header.d.ts.map +0 -1
- package/dist/types/surfaces/card/card-section-header.d.ts +0 -15
- package/dist/types/surfaces/card/card-section-header.d.ts.map +0 -1
- package/dist/types/surfaces/card/card.const.d.ts +0 -5
- package/dist/types/surfaces/card/card.const.d.ts.map +0 -1
- package/dist/types/surfaces/card/card.d.ts +0 -33
- package/dist/types/surfaces/card/card.d.ts.map +0 -1
- package/dist/types/surfaces/card/card.styles.d.ts +0 -5
- package/dist/types/surfaces/card/card.styles.d.ts.map +0 -1
- package/dist/types/surfaces/card/card.types.d.ts +0 -49
- package/dist/types/surfaces/card/card.types.d.ts.map +0 -1
- package/dist/types/surfaces/card/index.d.ts +0 -7
- package/dist/types/surfaces/card/index.d.ts.map +0 -1
- package/dist/types/surfaces/index.d.ts +0 -3
- package/dist/types/surfaces/index.d.ts.map +0 -1
- package/dist/types/surfaces/paper.d.ts +0 -29
- package/dist/types/surfaces/paper.d.ts.map +0 -1
- package/dist/types/types.d.ts +0 -11
- package/dist/types/types.d.ts.map +0 -1
- package/dist/types/utils/findParentWithType.d.ts +0 -4
- package/dist/types/utils/findParentWithType.d.ts.map +0 -1
- package/dist/types/utils/index.d.ts +0 -3
- package/dist/types/utils/index.d.ts.map +0 -1
- package/dist/types/utils/lit-utils.d.ts +0 -29
- package/dist/types/utils/lit-utils.d.ts.map +0 -1
- package/dist/types/utils/test-utils.d.ts +0 -72
- package/dist/types/utils/test-utils.d.ts.map +0 -1
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
2
|
-
import type { JSXProps } from '../../types';
|
|
3
|
-
export declare const INPUT_GUIDE: "brz-input-guide";
|
|
4
|
-
declare global {
|
|
5
|
-
namespace JSX {
|
|
6
|
-
interface IntrinsicElements {
|
|
7
|
-
[INPUT_GUIDE]: JSXProps<InputGuide>;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
interface HTMLElementTagNameMap {
|
|
11
|
-
[INPUT_GUIDE]: InputGuide;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Guides are used for rendering supporting text under an input field
|
|
16
|
-
* i.e. char count for textarea
|
|
17
|
-
*
|
|
18
|
-
* @tag brz-input-guide
|
|
19
|
-
*/
|
|
20
|
-
export declare class InputGuide extends LitElement {
|
|
21
|
-
static styles: import("lit").CSSResult;
|
|
22
|
-
render(): import("lit-html").TemplateResult<1>;
|
|
23
|
-
}
|
|
24
|
-
//# sourceMappingURL=input-guide.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"input-guide.d.ts","sourceRoot":"","sources":["../../../../src/components/form-elements/input-guide.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAA;AAE3C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAE3C,eAAO,MAAM,WAAW,mBAAmC,CAAA;AAE3D,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,GAAG,CAAC;QACZ,UAAU,iBAAiB;YACzB,CAAC,WAAW,CAAC,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAA;SACpC;KACF;IAED,UAAU,qBAAqB;QAC7B,CAAC,WAAW,CAAC,EAAE,UAAU,CAAA;KAC1B;CACF;AAED;;;;;GAKG;AACH,qBACa,UAAW,SAAQ,UAAU;IACxC,MAAM,CAAC,MAAM,0BAIZ;IAED,MAAM;CAGP"}
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
import { MenuItem, MenuItemSelectEvent, MenuSelectEvent } from '../menu';
|
|
2
|
-
import { IInputSelectBaseAttributes, InputSelectBase, InputSelectOptionInternal } from './input-select-base';
|
|
3
|
-
import type { JSXProps } from '../../types';
|
|
4
|
-
import type { BaseInputChangeEventPayload, InputChangeEvent } from './input-base';
|
|
5
|
-
import type { InputSizes } from './labeled-input';
|
|
6
|
-
import './input-checkbox';
|
|
7
|
-
import '../lozenge';
|
|
8
|
-
export declare const INPUT_MULTISELECT: "brz-input-multiselect";
|
|
9
|
-
export type MultiSelectChangeEvent = InputChangeEvent<BaseInputChangeEventPayload<ValueType>>;
|
|
10
|
-
declare global {
|
|
11
|
-
namespace JSX {
|
|
12
|
-
interface IntrinsicElements {
|
|
13
|
-
[INPUT_MULTISELECT]: JSXProps<InputMultiselect, IInputMultiSelectAttributes>;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
interface HTMLElementTagNameMap {
|
|
17
|
-
[INPUT_MULTISELECT]: InputMultiselect;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
export interface IInputMultiSelectAttributes extends IInputSelectBaseAttributes<ValueType> {
|
|
21
|
-
size?: InputSizes;
|
|
22
|
-
'truncate-values-after'?: number;
|
|
23
|
-
}
|
|
24
|
-
type ValueType = unknown[];
|
|
25
|
-
/**
|
|
26
|
-
* Similar in functionality to an `InputSelect`, `InputMultiselect` allows a
|
|
27
|
-
* user to select multiple options from a list of choices in a dropdown menu as
|
|
28
|
-
* opposed to a single choice.
|
|
29
|
-
*
|
|
30
|
-
* @slot children Expects multiple `brz-menu-item` elements, each with unique values
|
|
31
|
-
* @slot label Text for label slot
|
|
32
|
-
* @slot error Text for error slot
|
|
33
|
-
*
|
|
34
|
-
* @tag brz-input-multiselect
|
|
35
|
-
*/
|
|
36
|
-
export declare class InputMultiselect extends InputSelectBase<ValueType> {
|
|
37
|
-
static styles: import("lit").CSSResult[];
|
|
38
|
-
/**
|
|
39
|
-
* Sets the input size
|
|
40
|
-
*/
|
|
41
|
-
size: InputSizes;
|
|
42
|
-
/**
|
|
43
|
-
* Will truncate selected values after supplied number
|
|
44
|
-
*/
|
|
45
|
-
truncateValuesAfter: number;
|
|
46
|
-
/**
|
|
47
|
-
* Value of selected options
|
|
48
|
-
*/
|
|
49
|
-
value: ValueType;
|
|
50
|
-
/**
|
|
51
|
-
* @internal
|
|
52
|
-
*/
|
|
53
|
-
valueLabels: {
|
|
54
|
-
label: string;
|
|
55
|
-
value: ValueType;
|
|
56
|
-
}[];
|
|
57
|
-
updated(changedProperties: Map<string, unknown>): void;
|
|
58
|
-
/**
|
|
59
|
-
* Determines whether all items are selected
|
|
60
|
-
*
|
|
61
|
-
* @internal
|
|
62
|
-
*/
|
|
63
|
-
private get allSelected();
|
|
64
|
-
/**
|
|
65
|
-
* Dispatches a change event
|
|
66
|
-
*/
|
|
67
|
-
dispatchChange(): void;
|
|
68
|
-
/**
|
|
69
|
-
* Side effects when dropdown closes
|
|
70
|
-
* Search cleared and selected item cleared
|
|
71
|
-
*/
|
|
72
|
-
protected handleCloseDropdown(): void;
|
|
73
|
-
/**
|
|
74
|
-
* Side effect handler when value changes
|
|
75
|
-
* Value label is synchronised with the new value and the search is reset to the value label
|
|
76
|
-
*/
|
|
77
|
-
protected handleValueChange(): void;
|
|
78
|
-
/**
|
|
79
|
-
* Handles clicking a value in the dropdown
|
|
80
|
-
*/
|
|
81
|
-
protected handleSelect(event: MenuSelectEvent): void;
|
|
82
|
-
/**
|
|
83
|
-
* Handles the item select event to enable "select-all"
|
|
84
|
-
*/
|
|
85
|
-
protected handleItemSelect({ detail: { item } }: MenuItemSelectEvent): void;
|
|
86
|
-
toggleAllSelected(): void;
|
|
87
|
-
/**
|
|
88
|
-
* Adds/removes the value from the value array
|
|
89
|
-
*/
|
|
90
|
-
toggleSelection(value?: unknown): void;
|
|
91
|
-
/**
|
|
92
|
-
* Finds and sets the toggled status on child menu options where they are toggled in the value array
|
|
93
|
-
* This needs to run on every render to ensure the elements have the correct status
|
|
94
|
-
*/
|
|
95
|
-
private syncSelected;
|
|
96
|
-
/**
|
|
97
|
-
* @internal
|
|
98
|
-
*/
|
|
99
|
-
private get truncation();
|
|
100
|
-
/**
|
|
101
|
-
* Extends the base keyboard behaviours. Enables use of Backspace key to
|
|
102
|
-
* remove selected values.
|
|
103
|
-
*/
|
|
104
|
-
protected handleKeyDown(event: KeyboardEvent): void;
|
|
105
|
-
protected renderReferenceElement(): import("lit-html").TemplateResult<1>;
|
|
106
|
-
/**
|
|
107
|
-
* @internal
|
|
108
|
-
*/
|
|
109
|
-
private get selectAllOption();
|
|
110
|
-
/**
|
|
111
|
-
* @internal
|
|
112
|
-
*/
|
|
113
|
-
private get selectAllOptionElement();
|
|
114
|
-
protected renderDropdownContent(): import("lit-html").TemplateResult<1>;
|
|
115
|
-
removeLastValue(): void;
|
|
116
|
-
/**
|
|
117
|
-
* Clears the search query
|
|
118
|
-
**/
|
|
119
|
-
resetSearch(): void;
|
|
120
|
-
setQueryInputValue(): void;
|
|
121
|
-
/**
|
|
122
|
-
* Marks anything that's text value doesn't match the search query as hidden
|
|
123
|
-
*/
|
|
124
|
-
protected search(): void;
|
|
125
|
-
/**
|
|
126
|
-
* Multi select has a select all menu item, so we need to include that when getting items
|
|
127
|
-
*/
|
|
128
|
-
getItems(): InputSelectOptionInternal<unknown>[] | MenuItem<unknown>[];
|
|
129
|
-
/**
|
|
130
|
-
* Synchronises the lozenges with a slice of selected items based on the set
|
|
131
|
-
* truncation value.
|
|
132
|
-
*/
|
|
133
|
-
private syncValueLabels;
|
|
134
|
-
}
|
|
135
|
-
export {};
|
|
136
|
-
//# sourceMappingURL=input-multiselect.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"input-multiselect.d.ts","sourceRoot":"","sources":["../../../../src/components/form-elements/input-multiselect.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,QAAQ,EACR,mBAAmB,EACnB,eAAe,EAEhB,MAAM,SAAS,CAAA;AAChB,OAAO,EACL,0BAA0B,EAC1B,eAAe,EACf,yBAAyB,EAC1B,MAAM,qBAAqB,CAAA;AAC5B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,KAAK,EACV,2BAA2B,EAC3B,gBAAgB,EACjB,MAAM,cAAc,CAAA;AACrB,OAAO,KAA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C,YAAY,CAAC,KAAK,EAAE,eAAe;IAI7C;;OAEG;IACH,SAAS,CAAC,gBAAgB,CAAC,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,mBAAmB;IAIpE,iBAAiB;IAajB;;OAEG;IACH,eAAe,CAAC,KAAK,CAAC,EAAE,OAAO;IAU/B;;;OAGG;IACH,OAAO,CAAC,YAAY;IAOpB;;OAEG;IACH,OAAO,KAAK,UAAU,GAMrB;IAED;;;OAGG;IACH,SAAS,CAAC,aAAa,CAAC,KAAK,EAAE,aAAa;IAQ5C,SAAS,CAAC,sBAAsB;IAyDhC;;OAEG;IACH,OAAO,KAAK,eAAe,GAO1B;IAED;;OAEG;IACH,OAAO,KAAK,sBAAsB,GAajC;IAED,SAAS,CAAC,qBAAqB;IAS/B,eAAe;IAKf;;QAEI;IACJ,WAAW;IAIX,kBAAkB;IAKlB;;OAEG;IACH,SAAS,CAAC,MAAM;IAkBhB;;OAEG;IACH,QAAQ;IAaR;;;OAGG;IACH,OAAO,CAAC,eAAe;CAgBxB"}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { JSXProps } from '../../types';
|
|
2
|
-
import { BaseInputChangeEventPayload, InputChangeEvent } from './input-base';
|
|
3
|
-
import { IInputTextBaseAttributes, InputTextBase } from './input-text-base';
|
|
4
|
-
export declare const INPUT_NUMBER: "brz-input-number";
|
|
5
|
-
export type NumberChangeEvent = InputChangeEvent<BaseInputChangeEventPayload<number>>;
|
|
6
|
-
declare global {
|
|
7
|
-
namespace JSX {
|
|
8
|
-
interface IntrinsicElements {
|
|
9
|
-
[INPUT_NUMBER]: JSXProps<InputNumber, IInputNumberAttributes>;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
interface HTMLElementTagNameMap {
|
|
13
|
-
[INPUT_NUMBER]: InputNumber;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
export interface IInputNumberAttributes extends IInputTextBaseAttributes<number> {
|
|
17
|
-
'has-no-stepper'?: boolean;
|
|
18
|
-
step?: number;
|
|
19
|
-
min?: number;
|
|
20
|
-
max?: number;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Input number component.
|
|
24
|
-
*
|
|
25
|
-
* @slot label Text for label slot
|
|
26
|
-
* @slot error Text for error slot
|
|
27
|
-
*
|
|
28
|
-
* @tag brz-input-number
|
|
29
|
-
*/
|
|
30
|
-
export declare class InputNumber extends InputTextBase<number> {
|
|
31
|
-
static styles: import("lit").CSSResult[];
|
|
32
|
-
/**
|
|
33
|
-
* Sets the value type
|
|
34
|
-
*/
|
|
35
|
-
value?: number;
|
|
36
|
-
/**
|
|
37
|
-
* This property toggles the stepper buttons
|
|
38
|
-
*/
|
|
39
|
-
hasNoStepper: boolean;
|
|
40
|
-
/**
|
|
41
|
-
* Sets the max number
|
|
42
|
-
*/
|
|
43
|
-
min?: number;
|
|
44
|
-
/**
|
|
45
|
-
* Sets the minimum number
|
|
46
|
-
*/
|
|
47
|
-
max?: number;
|
|
48
|
-
/**
|
|
49
|
-
* Sets the step value
|
|
50
|
-
*/
|
|
51
|
-
step: number;
|
|
52
|
-
/**
|
|
53
|
-
* @internal
|
|
54
|
-
*/
|
|
55
|
-
private inputElement;
|
|
56
|
-
private handleIncrease;
|
|
57
|
-
private handleDecrease;
|
|
58
|
-
private handleSteppedChange;
|
|
59
|
-
onInput(e: {
|
|
60
|
-
target: {
|
|
61
|
-
value: string | number;
|
|
62
|
-
};
|
|
63
|
-
}): void;
|
|
64
|
-
private handleKeyDown;
|
|
65
|
-
private handlePaste;
|
|
66
|
-
/**
|
|
67
|
-
* @internal
|
|
68
|
-
*/
|
|
69
|
-
private get stepperLayout();
|
|
70
|
-
renderInput(): import("lit-html").TemplateResult<1>;
|
|
71
|
-
}
|
|
72
|
-
//# sourceMappingURL=input-number.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"input-number.d.ts","sourceRoot":"","sources":["../../../../src/components/form-elements/input-number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C,EAAE;QAAE,MAAM,EAAE;YAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;SAAE,CAAA;KAAE;IASjD,OAAO,CAAC,aAAa;IAIrB,OAAO,CAAC,WAAW;IAInB;;OAEG;IACH,OAAO,KAAK,aAAa,GAyBxB;IAED,WAAW;CAoBZ"}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
2
|
-
import { JSXProps, SizeProperty } from '../../types';
|
|
3
|
-
import { ILabeledInputAttributes, InputSizes, LabeledInput } from './labeled-input';
|
|
4
|
-
export declare const INPUT_RADIO_GROUP: "brz-input-radio-group";
|
|
5
|
-
export declare const INPUT_RADIO_OPTION: "brz-input-radio-option";
|
|
6
|
-
declare module 'csstype' {
|
|
7
|
-
interface Properties {
|
|
8
|
-
'--brz-input-radio-button-size'?: SizeProperty;
|
|
9
|
-
'--brz-input-radio-gutter'?: SizeProperty;
|
|
10
|
-
'--brz-input-radio-label-gap'?: SizeProperty;
|
|
11
|
-
'--brz-input-radio-selected-color'?: SizeProperty;
|
|
12
|
-
'--brz-input-radio-disabled-color'?: SizeProperty;
|
|
13
|
-
'--brz-input-radio-invalid-color'?: SizeProperty;
|
|
14
|
-
'--brz-input-radio-option-gap'?: SizeProperty;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
declare global {
|
|
18
|
-
namespace JSX {
|
|
19
|
-
interface IntrinsicElements {
|
|
20
|
-
[INPUT_RADIO_GROUP]: JSXProps<InputRadio, IInputRadioAttributes>;
|
|
21
|
-
[INPUT_RADIO_OPTION]: JSXProps<InputRadioOption, InputRadioOptionAttributes>;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
interface HTMLElementTagNameMap {
|
|
25
|
-
[INPUT_RADIO_GROUP]: InputRadio;
|
|
26
|
-
[INPUT_RADIO_OPTION]: InputRadioOption;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
export declare const radioLayouts: readonly ["horizontal", "vertical"];
|
|
30
|
-
export type RadioLayout = typeof radioLayouts[number];
|
|
31
|
-
export interface IInputRadioAttributes extends ILabeledInputAttributes<string> {
|
|
32
|
-
size?: InputSizes;
|
|
33
|
-
layout?: RadioLayout;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Use the `brz-input-radio-group` with several `brz-input-radio-options` to build a radio field.
|
|
37
|
-
*
|
|
38
|
-
* The `brz-input-radio-option` element gets parsed in the `brz-input-radio-group` and relevant properties pulled off.
|
|
39
|
-
* The actual element then gets thrown away. We made the design decision to do this because of the scoping constraints
|
|
40
|
-
* applied by the shadow dom. We cannot include any render logic inside of the individual radio elements because the
|
|
41
|
-
* scope of the shadow dom will break input field association and and keyboard navigation. Separating the components
|
|
42
|
-
* like this lead to what we felt was the cleanest interface.
|
|
43
|
-
*
|
|
44
|
-
* @slot label Text for label slot
|
|
45
|
-
* @slot error Text for error slot
|
|
46
|
-
*
|
|
47
|
-
* @tag brz-input-radio-group
|
|
48
|
-
*/
|
|
49
|
-
export declare class InputRadio extends LabeledInput<string> {
|
|
50
|
-
static styles: import("lit").CSSResult[];
|
|
51
|
-
/**
|
|
52
|
-
* Sets the layout of the radio group
|
|
53
|
-
*/
|
|
54
|
-
layout: RadioLayout;
|
|
55
|
-
/**
|
|
56
|
-
* Sets the size of the radio fields
|
|
57
|
-
*/
|
|
58
|
-
size: InputSizes;
|
|
59
|
-
/**
|
|
60
|
-
* @internal
|
|
61
|
-
*/
|
|
62
|
-
_radioElements: IRadioOptionElement[];
|
|
63
|
-
handleSlotChange(): void;
|
|
64
|
-
/**
|
|
65
|
-
* Finds `brz-input-radio-option` elements inside main slot (id'd as 'options' on the template)
|
|
66
|
-
*/
|
|
67
|
-
private _findRadioOptions;
|
|
68
|
-
radioChange(evt: Event): void;
|
|
69
|
-
renderInput(): import("lit-html").TemplateResult<1>;
|
|
70
|
-
}
|
|
71
|
-
interface IRadioOptionElement extends Element {
|
|
72
|
-
value: string;
|
|
73
|
-
disabled?: boolean;
|
|
74
|
-
}
|
|
75
|
-
export type InputRadioOptionAttributes = Pick<IRadioOptionElement, 'value' | 'disabled'>;
|
|
76
|
-
/**
|
|
77
|
-
* Structural component. Not to be used outside of the input-radio-group
|
|
78
|
-
*
|
|
79
|
-
* @tag brz-input-radio-option
|
|
80
|
-
*/
|
|
81
|
-
export declare class InputRadioOption extends LitElement {
|
|
82
|
-
value?: string;
|
|
83
|
-
disabled?: boolean;
|
|
84
|
-
render(): void;
|
|
85
|
-
}
|
|
86
|
-
export {};
|
|
87
|
-
//# sourceMappingURL=input-radio.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"input-radio.d.ts","sourceRoot":"","sources":["../../../../src/components/form-elements/input-radio.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,MAAM,KAAK,CAAA;AAI3C,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAEpD,OAAO,EACL,uBAAuB,EACvB,UAAU,EACV,YAAY,EACb,MAAM,iBAAiB,CAAA;AAExB,eAAO,MAAM,iBAAiB,yBAAyC,CAAA;AACvE,eAAO,MAAM,kBAAkB,0BAA0C,CAAA;AAEzE,OAAO,QAAQ,SAAS,CAAC;IACvB,UAAU,UAAU;QAClB,+BAA+B,CAAC,EAAE,YAAY,CAAA;QAC9C,0BAA0B,CAAC,EAAE,YAAY,CAAA;QACzC,6BAA6B,CAAC,EAAE,YAAY,CAAA;QAC5C,kCAAkC,CAAC,EAAE,YAAY,CAAA;QACjD,kCAAkC,CAAC,EAAE,YAAY,CAAA;QACjD,iCAAiC,CAAC,EAAE,YAAY,CAAA;QAChD,8BAA8B,CAAC,EAAE,YAAY,CAAA;KAC9C;CACF;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,GAAG,CAAC;QACZ,UAAU,iBAAiB;YACzB,CAAC,iBAAiB,CAAC,EAAE,QAAQ,CAAC,UAAU,EAAE,qBAAqB,CAAC,CAAA;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uItem, DropdownMenu, MenuSelectEvent, MenuItemSelectEvent } from '../menu';
|
|
3
|
-
import { VirtualList } from '../virtual-list';
|
|
4
|
-
import { IInputTextBaseAttributes, InputTextBase } from './input-text-base';
|
|
5
|
-
import '../icon';
|
|
6
|
-
import '../popover';
|
|
7
|
-
export declare const SEARCH_MESSAGE_ID = "searchMessage";
|
|
8
|
-
export interface IInputSelectBaseAttributes<T> extends IInputTextBaseAttributes<T> {
|
|
9
|
-
placeholder?: string;
|
|
10
|
-
options?: InputSelectOption[];
|
|
11
|
-
'can-search'?: boolean;
|
|
12
|
-
loading?: boolean;
|
|
13
|
-
'search-message'?: string;
|
|
14
|
-
}
|
|
15
|
-
export interface InputSelectOption<ValueType = string> {
|
|
16
|
-
label: string;
|
|
17
|
-
value: ValueType;
|
|
18
|
-
disabled?: boolean;
|
|
19
|
-
}
|
|
20
|
-
export interface InputSelectOptionInternal<T = string> extends InputSelectOption<T> {
|
|
21
|
-
id?: string;
|
|
22
|
-
hidden?: boolean;
|
|
23
|
-
selected?: boolean;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* InputSelectBase is meant as a base class for field types where you can select from a list of items
|
|
27
|
-
* within a dropdown. This class will automatically handle opening/closing the dropdown, will add some default keybindings,
|
|
28
|
-
* and will dispatch changes upwards.
|
|
29
|
-
*
|
|
30
|
-
* Components implementing this class will need to (at a minimum) implement the following
|
|
31
|
-
* - `renderReferenceElement`: Rendering the "reference element" - the reference element is the dropdown trigger element
|
|
32
|
-
* - `renderDropdownContent`: Rendering the content to go within the dropdown when it is open (usually this will be a
|
|
33
|
-
* collection of `<brz-menu-item>`'s
|
|
34
|
-
*
|
|
35
|
-
* @fires {InputSelectQueryChangeEvent} brz-input-select-query-change If `canSearch` is enabled, this event fires when the query has changed, and carries the new query value.
|
|
36
|
-
*/
|
|
37
|
-
export declare class InputSelectBase<FieldValue = unknown[] | unknown, OptionValue = FieldValue extends unknown[] ? FieldValue[0] : FieldValue> extends InputTextBase<FieldValue> {
|
|
38
|
-
static styles: import("lit").CSSResult[];
|
|
39
|
-
/**
|
|
40
|
-
* This allows the input field to be type in
|
|
41
|
-
*/
|
|
42
|
-
canSearch: boolean;
|
|
43
|
-
/**
|
|
44
|
-
* This toggles the loading indicator
|
|
45
|
-
*/
|
|
46
|
-
loading: boolean;
|
|
47
|
-
/**
|
|
48
|
-
* This sets the input trailing icon
|
|
49
|
-
*/
|
|
50
|
-
trailingIcon: string;
|
|
51
|
-
/**
|
|
52
|
-
* The options to be shown in menu
|
|
53
|
-
*/
|
|
54
|
-
options: InputSelectOption<OptionValue>[];
|
|
55
|
-
/**
|
|
56
|
-
* A message shown when there are no search results. Also useful to apply a
|
|
57
|
-
* "searching" message when using the query-change event to perform an async
|
|
58
|
-
* search.
|
|
59
|
-
*/
|
|
60
|
-
searchMessage: string;
|
|
61
|
-
/**
|
|
62
|
-
* @internal
|
|
63
|
-
*/
|
|
64
|
-
protected isMenuOpen: boolean;
|
|
65
|
-
/**
|
|
66
|
-
* @internal
|
|
67
|
-
*/
|
|
68
|
-
protected hasResults?: boolean;
|
|
69
|
-
/**
|
|
70
|
-
* @internal
|
|
71
|
-
*/
|
|
72
|
-
protected query?: string;
|
|
73
|
-
/**
|
|
74
|
-
* @internal
|
|
75
|
-
*/
|
|
76
|
-
protected innerOptions: InputSelectOptionInternal<OptionValue>[];
|
|
77
|
-
/**
|
|
78
|
-
* @internal
|
|
79
|
-
*/
|
|
80
|
-
protected dropdown: DropdownMenu;
|
|
81
|
-
/**
|
|
82
|
-
* @internal
|
|
83
|
-
*/
|
|
84
|
-
protected queryInput: HTMLInputElement;
|
|
85
|
-
/**
|
|
86
|
-
* Sets an internal list of options based on data-driven options passed in.
|
|
87
|
-
* These options can also contain state required for various functions.
|
|
88
|
-
*
|
|
89
|
-
* TODO: This could also be populated with data objects based on slotted elements to simplify some functionality
|
|
90
|
-
*/
|
|
91
|
-
protected setInnerOptions(): void;
|
|
92
|
-
/**
|
|
93
|
-
* Ensures the editor content is always up to date with the supplied props
|
|
94
|
-
*/
|
|
95
|
-
updated(changedProperties: PropertyValues): void;
|
|
96
|
-
/**
|
|
97
|
-
* Gets the label of a dropdown item as a string
|
|
98
|
-
*/
|
|
99
|
-
protected getItemLabel(item?: MenuItem<OptionValue> | InputSelectOptionInternal<OptionValue>): string;
|
|
100
|
-
/**
|
|
101
|
-
* Handles some specific keyboard interactions not already covered by the Menu
|
|
102
|
-
* component.
|
|
103
|
-
*
|
|
104
|
-
* Opens the dropdown when ArrowUp/ArrowDown keys are pressed.
|
|
105
|
-
*/
|
|
106
|
-
protected handleKeyDown(event: KeyboardEvent): void;
|
|
107
|
-
/**
|
|
108
|
-
* Prevents the Space key from closing the dropdown when typing in the search
|
|
109
|
-
* input.
|
|
110
|
-
*/
|
|
111
|
-
protected handleKeyUp(event: KeyboardEvent): void;
|
|
112
|
-
protected get defaultSlot(): HTMLSlotElement | null | undefined;
|
|
113
|
-
/**
|
|
114
|
-
* Gets menu items. Switches root when options are set as they are not slotted.
|
|
115
|
-
*/
|
|
116
|
-
getItems(): InputSelectOptionInternal<OptionValue>[] | MenuItem<OptionValue>[];
|
|
117
|
-
/**
|
|
118
|
-
* @internal
|
|
119
|
-
*/
|
|
120
|
-
protected get optionElementsRenderRoot(): Element | DocumentFragment | undefined;
|
|
121
|
-
/**
|
|
122
|
-
* @internal
|
|
123
|
-
*/
|
|
124
|
-
protected get virtualListElement(): VirtualList<InputSelectOptionInternal> | null;
|
|
125
|
-
/**
|
|
126
|
-
* Gets menu item elements. Note that a data-driven menu will be virtualized
|
|
127
|
-
* and only a slice of the total options are rendered as elements.
|
|
128
|
-
*
|
|
129
|
-
* @internal
|
|
130
|
-
*/
|
|
131
|
-
protected get optionElements(): MenuItem<OptionValue>[];
|
|
132
|
-
/**
|
|
133
|
-
* Sets the value, and propagates out to the parent
|
|
134
|
-
*/
|
|
135
|
-
setValue(value: OptionValue): void;
|
|
136
|
-
protected handleSearchInputClick(event: MouseEvent): void;
|
|
137
|
-
renderInput(): import("lit-html").TemplateResult<1>;
|
|
138
|
-
/**
|
|
139
|
-
* Renders a search message in a disabled menu item. Generally used when a
|
|
140
|
-
* query has no matching items, but will also display when the query event is
|
|
141
|
-
* being used to fetch async options so the results have not arrived yet.
|
|
142
|
-
*/
|
|
143
|
-
protected renderSearchMessage(): import("lit-html").TemplateResult<1>;
|
|
144
|
-
/**
|
|
145
|
-
* Renders the reference element (the dropdown trigger)
|
|
146
|
-
*/
|
|
147
|
-
protected renderReferenceElement(): import("lit-html").TemplateResult<1>;
|
|
148
|
-
/**
|
|
149
|
-
* Should render the content of the dropdown (usually several `<brz-menu-item>`'s
|
|
150
|
-
*/
|
|
151
|
-
protected renderDropdownContent(): import("lit-html").TemplateResult<1>;
|
|
152
|
-
/**
|
|
153
|
-
* Renders options passed as data, if set, which overrides slotted content.
|
|
154
|
-
* The repeat directive is necessary here to handle deep change evaluation,
|
|
155
|
-
* particularly with the freeform feature of `InputTime`.
|
|
156
|
-
*/
|
|
157
|
-
protected renderOptionsData(options?: InputSelectOptionInternal<OptionValue>[]): import("lit-html").TemplateResult<1> | null;
|
|
158
|
-
/**
|
|
159
|
-
* Returns true when the passed item label matches the current query, or a
|
|
160
|
-
* custom matcher returns true.
|
|
161
|
-
*/
|
|
162
|
-
protected isQueryMatch(item: MenuItem<OptionValue> | InputSelectOptionInternal<OptionValue>): boolean;
|
|
163
|
-
/**
|
|
164
|
-
* Custom query matcher. Allows extensions of this base class to apply custom
|
|
165
|
-
* logic if needed. Must return true for a match, false for no match. Returns
|
|
166
|
-
* false by default.
|
|
167
|
-
*/
|
|
168
|
-
protected isCustomQueryMatch(_: MenuItem<OptionValue> | InputSelectOptionInternal<OptionValue>): boolean;
|
|
169
|
-
/**
|
|
170
|
-
* Side effect after dropdown opens
|
|
171
|
-
*/
|
|
172
|
-
protected handleOpenDropdown(): void;
|
|
173
|
-
/**
|
|
174
|
-
* Side effect after dropdown closes
|
|
175
|
-
*/
|
|
176
|
-
protected handleCloseDropdown(): void;
|
|
177
|
-
/**
|
|
178
|
-
* Side effect on selection of an item
|
|
179
|
-
*/
|
|
180
|
-
protected handleSelect(_: MenuSelectEvent): void;
|
|
181
|
-
/**
|
|
182
|
-
* Handles selection of a specific item where necessary
|
|
183
|
-
*/
|
|
184
|
-
protected handleItemSelect(_: MenuItemSelectEvent): void;
|
|
185
|
-
/**
|
|
186
|
-
* Side effect for value changing
|
|
187
|
-
*/
|
|
188
|
-
protected handleValueChange(): void;
|
|
189
|
-
/**
|
|
190
|
-
* Handles the search input value changing
|
|
191
|
-
*/
|
|
192
|
-
protected handleQueryInput(event: InputEvent): void;
|
|
193
|
-
/**
|
|
194
|
-
* @internal
|
|
195
|
-
*/
|
|
196
|
-
protected get hasQueryResults(): boolean;
|
|
197
|
-
/**
|
|
198
|
-
* @internal
|
|
199
|
-
*/
|
|
200
|
-
protected get isDataDriven(): boolean;
|
|
201
|
-
/**
|
|
202
|
-
* @internal
|
|
203
|
-
*/
|
|
204
|
-
protected get isMulti(): boolean;
|
|
205
|
-
/**
|
|
206
|
-
* @internal
|
|
207
|
-
*/
|
|
208
|
-
protected get isReadonlyOrDisabled(): boolean;
|
|
209
|
-
}
|
|
210
|
-
/**
|
|
211
|
-
* An event carrying the query value from InputSelect / InputMultiselect
|
|
212
|
-
*/
|
|
213
|
-
export declare class InputSelectQueryChangeEvent<Detail = {
|
|
214
|
-
query?: string;
|
|
215
|
-
}> extends CustomEvent<Detail> {
|
|
216
|
-
constructor(options?: ConstructorParameters<typeof CustomEvent<Detail>>[1]);
|
|
217
|
-
}
|
|
218
|
-
//# sourceMappingURL=input-select-base.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"input-select-base.d.ts","sourceRoot":"","sources":["../../../../src/components/form-elements/input-select-base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,cAAc,EAAE,MAAM,KAAK,CAAA;AAI/C,OAAO,EACL,QAAQ,EAER,YAAY,EACZ,eAAe,EACf,mB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seAttributes, InputSelectBase } from './input-select-base';
|
|
3
|
-
import type { JSXProps } from '../../types';
|
|
4
|
-
export declare const INPUT_SELECT: "brz-input-select";
|
|
5
|
-
declare global {
|
|
6
|
-
namespace JSX {
|
|
7
|
-
interface IntrinsicElements {
|
|
8
|
-
[INPUT_SELECT]: JSXProps<InputSelect, IInputSelectAttributes>;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
interface HTMLElementTagNameMap {
|
|
12
|
-
[INPUT_SELECT]: InputSelect;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
export type IInputSelectAttributes = IInputSelectBaseAttributes<ValueType>;
|
|
16
|
-
type ValueType = unknown;
|
|
17
|
-
/**
|
|
18
|
-
* Select input component
|
|
19
|
-
* Should be used with nested `brz-menu-items`, each with values
|
|
20
|
-
*
|
|
21
|
-
* @prop required Makes the field un-clearable after selecting an option.
|
|
22
|
-
*
|
|
23
|
-
* @slot label Text for label slot
|
|
24
|
-
* @slot error Text for error slot
|
|
25
|
-
*
|
|
26
|
-
* @tag brz-input-select
|
|
27
|
-
*/
|
|
28
|
-
export declare class InputSelect extends InputSelectBase<ValueType> {
|
|
29
|
-
static styles: import("lit").CSSResult[];
|
|
30
|
-
/**
|
|
31
|
-
* Selected value
|
|
32
|
-
*/
|
|
33
|
-
value: string;
|
|
34
|
-
/**
|
|
35
|
-
* @internal
|
|
36
|
-
*/
|
|
37
|
-
protected query?: string | undefined;
|
|
38
|
-
/**
|
|
39
|
-
* @internal
|
|
40
|
-
*/
|
|
41
|
-
valueLabel?: string;
|
|
42
|
-
/**
|
|
43
|
-
* @internal
|
|
44
|
-
*/
|
|
45
|
-
protected hasResults: boolean;
|
|
46
|
-
/**
|
|
47
|
-
* Side effects when dropdown closes. Search cleared.
|
|
48
|
-
*/
|
|
49
|
-
protected handleCloseDropdown(): void;
|
|
50
|
-
/**
|
|
51
|
-
* Side effect handler when value changes
|
|
52
|
-
* Value label is synchronised with the new value and the search is reset to the value label
|
|
53
|
-
*/
|
|
54
|
-
protected handleValueChange(): void;
|
|
55
|
-
/**
|
|
56
|
-
* Handles clicking a value in the dropdown
|
|
57
|
-
*/
|
|
58
|
-
protected handleSelect(event: MenuSelectEvent): void;
|
|
59
|
-
/**
|
|
60
|
-
* Sets the value property on the query input. Setting this way is easier as
|
|
61
|
-
* it allows us to deal with other side effects. Relying on a state value does
|
|
62
|
-
* not always work, particularly when the value has not actually changed.
|
|
63
|
-
*/
|
|
64
|
-
setQueryInputValue(): void;
|
|
65
|
-
private applySelectedStatusToChildren;
|
|
66
|
-
protected renderReferenceElement(): import("lit-html").TemplateResult<1>;
|
|
67
|
-
protected renderDropdownContent(): import("lit-html").TemplateResult<1>;
|
|
68
|
-
/**
|
|
69
|
-
* Clears the current query value
|
|
70
|
-
**/
|
|
71
|
-
resetSearch(): void;
|
|
72
|
-
/**
|
|
73
|
-
* Marks any item that doesn't match the search query as hidden
|
|
74
|
-
*/
|
|
75
|
-
protected search(): void;
|
|
76
|
-
protected setInnerOptions(): void;
|
|
77
|
-
disconnectedCallback(): void;
|
|
78
|
-
/**
|
|
79
|
-
* @internal
|
|
80
|
-
*/
|
|
81
|
-
selectedOptionObserver?: MutationObserver;
|
|
82
|
-
/**
|
|
83
|
-
* Finds item from a given value in the list of items
|
|
84
|
-
*/
|
|
85
|
-
private findItem;
|
|
86
|
-
/**
|
|
87
|
-
* Synchronises the field label with the selected item
|
|
88
|
-
*/
|
|
89
|
-
private syncValueLabel;
|
|
90
|
-
}
|
|
91
|
-
export {};
|
|
92
|
-
//# sourceMappingURL=input-select.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"input-select.d.ts","sourceRoot":"","sources":["../../../../src/components/form-elements/input-select.ts"],"names":[],"mappings":"AAKA,OAAO,EAAY,eAAe,EAAE,MAAM,SAAS,CAAA;AACnD,OAAO,EACL,0BAA0B,EAC1B,eAAe,EAGhB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,KAAK,EAAE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