@esri/calcite-components 1.0.0-beta.79 → 1.0.0-beta.80
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/calcite/calcite.esm.js +1 -1
- package/dist/calcite/p-162604a0.entry.js +5 -0
- package/dist/calcite/p-364f0abe.system.entry.js +5 -0
- package/dist/calcite/{p-e65b6bfb.entry.js → p-46071f17.entry.js} +1 -1
- package/dist/calcite/p-4905189e.system.entry.js +5 -0
- package/dist/calcite/p-5802a565.entry.js +5 -0
- package/dist/calcite/p-5c637131.entry.js +5 -0
- package/dist/calcite/p-5f6e35f3.entry.js +5 -0
- package/dist/calcite/{p-a38fe099.entry.js → p-653bd7bf.entry.js} +1 -1
- package/dist/calcite/{p-da7c2542.entry.js → p-8b982f91.entry.js} +1 -1
- package/dist/calcite/p-b0827b8c.system.entry.js +5 -0
- package/dist/calcite/p-b2b6f712.js +5 -0
- package/dist/calcite/{p-dd460534.system.entry.js → p-b9a38a28.system.entry.js} +2 -2
- package/dist/calcite/{p-3b707a1c.system.entry.js → p-c2caeb2a.system.entry.js} +1 -1
- package/dist/calcite/p-e55c5bb4.entry.js +5 -0
- package/dist/calcite/{p-3cdee187.system.entry.js → p-eb3c084f.system.entry.js} +1 -1
- package/dist/calcite/p-ecc31b40.system.entry.js +5 -0
- package/dist/calcite/{p-3ea157ba.system.entry.js → p-edf1e815.system.entry.js} +1 -1
- package/dist/calcite/p-ee522afa.system.entry.js +5 -0
- package/dist/calcite/p-f68725d7.entry.js +5 -0
- package/dist/calcite/p-fa922721.system.js +5 -0
- package/dist/calcite/p-fe9380a0.system.js +1 -1
- package/dist/cjs/calcite-action-bar.cjs.entry.js +4 -11
- package/dist/cjs/calcite-action-menu.cjs.entry.js +2 -2
- package/dist/cjs/calcite-action-pad.cjs.entry.js +3 -13
- package/dist/cjs/calcite-dropdown_3.cjs.entry.js +26 -23
- package/dist/cjs/calcite-input-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/calcite-pick-list_3.cjs.entry.js +6 -16
- package/dist/cjs/calcite-popover_2.cjs.entry.js +3 -2
- package/dist/cjs/calcite-tooltip_2.cjs.entry.js +1 -1
- package/dist/cjs/calcite-value-list_2.cjs.entry.js +1 -1
- package/dist/cjs/calcite.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{resources-daf15d54.js → resources-e43fc9f3.js} +14 -1
- package/dist/collection/collection-manifest.json +3 -3
- package/dist/collection/components/action-bar/action-bar.js +4 -11
- package/dist/collection/components/action-menu/action-menu.js +6 -6
- package/dist/collection/components/action-pad/action-pad.js +3 -15
- package/dist/collection/components/combobox-item/combobox-item.js +1 -1
- package/dist/collection/components/combobox-item-group/combobox-item-group.js +1 -1
- package/dist/collection/components/dropdown/dropdown.js +15 -18
- package/dist/collection/components/dropdown-item/dropdown-item.js +11 -5
- package/dist/collection/components/input-date-picker/input-date-picker.css +5 -0
- package/dist/collection/components/pick-list/shared-list-logic.js +2 -1
- package/dist/collection/components/popover/popover.css +1 -1
- package/dist/collection/components/popover/popover.js +7 -7
- package/dist/collection/components/popover/resources.js +1 -0
- package/dist/collection/components/radio-group/radio-group.js +2 -4
- package/dist/collection/components/select/select.js +2 -4
- package/dist/collection/components/tooltip/tooltip.css +1 -1
- package/dist/components/action-menu.js +2 -2
- package/dist/components/calcite-action-bar.js +4 -11
- package/dist/components/calcite-action-pad.js +3 -13
- package/dist/components/calcite-dropdown-item.js +11 -5
- package/dist/components/calcite-input-date-picker.js +1 -1
- package/dist/components/calcite-pick-list-group.js +1 -10
- package/dist/components/calcite-radio-group.js +1 -1
- package/dist/components/calcite-select.js +1 -1
- package/dist/components/calcite-tip-manager.js +1 -1
- package/dist/components/calcite-tip.js +1 -1
- package/dist/components/calcite-tooltip.js +1 -1
- package/dist/components/dropdown.js +15 -18
- package/dist/components/popover.js +3 -3
- package/dist/components/resources.js +2 -1
- package/dist/components/resources4.js +5 -22
- package/dist/components/resources5.js +32 -0
- package/dist/components/shared-list-render.js +4 -3
- package/dist/custom-elements/index.js +53 -66
- package/dist/esm/calcite-action-bar.entry.js +4 -11
- package/dist/esm/calcite-action-menu.entry.js +2 -2
- package/dist/esm/calcite-action-pad.entry.js +3 -13
- package/dist/esm/calcite-dropdown_3.entry.js +26 -23
- package/dist/esm/calcite-input-date-picker.entry.js +1 -1
- package/dist/esm/calcite-pick-list_3.entry.js +1 -11
- package/dist/esm/calcite-popover_2.entry.js +3 -2
- package/dist/esm/calcite-tooltip_2.entry.js +1 -1
- package/dist/esm/calcite-value-list_2.entry.js +1 -1
- package/dist/esm/calcite.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{resources-cbfcf4a3.js → resources-b5c3d9a7.js} +12 -2
- package/dist/esm-es5/calcite-action-bar.entry.js +1 -1
- package/dist/esm-es5/calcite-action-menu.entry.js +1 -1
- package/dist/esm-es5/calcite-action-pad.entry.js +2 -2
- package/dist/esm-es5/calcite-dropdown_3.entry.js +1 -1
- package/dist/esm-es5/calcite-input-date-picker.entry.js +1 -1
- package/dist/esm-es5/calcite-pick-list_3.entry.js +1 -1
- package/dist/esm-es5/calcite-popover_2.entry.js +1 -1
- package/dist/esm-es5/calcite-tooltip_2.entry.js +1 -1
- package/dist/esm-es5/calcite-value-list_2.entry.js +1 -1
- package/dist/esm-es5/calcite.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/resources-b5c3d9a7.js +5 -0
- package/dist/extras/docs-json.json +10 -12
- package/dist/types/components/accordion/accordion.d.ts +42 -0
- package/dist/types/components/accordion-item/accordion-item.d.ts +54 -0
- package/dist/types/components/action/action.d.ts +75 -0
- package/dist/types/components/action-bar/action-bar.d.ts +69 -0
- package/dist/types/components/action-group/action-group.d.ts +42 -0
- package/dist/types/components/action-menu/action-menu.d.ts +82 -0
- package/dist/types/components/action-pad/action-pad.d.ts +54 -0
- package/dist/types/components/alert/alert.d.ts +83 -0
- package/dist/types/components/avatar/avatar.d.ts +26 -0
- package/dist/types/components/block/block.d.ts +79 -0
- package/dist/types/components/block-section/block-section.d.ts +44 -0
- package/dist/types/components/button/button.d.ts +80 -0
- package/dist/types/components/card/card.d.ts +46 -0
- package/dist/types/components/checkbox/checkbox.d.ts +75 -0
- package/dist/types/components/chip/chip.d.ts +40 -0
- package/dist/types/components/color-picker/color-picker.d.ts +232 -0
- package/dist/types/components/color-picker-hex-input/color-picker-hex-input.d.ts +51 -0
- package/dist/types/components/color-picker-swatch/color-picker-swatch.d.ts +23 -0
- package/dist/types/components/combobox/combobox.d.ts +184 -0
- package/dist/types/components/combobox/interfaces.d.ts +6 -0
- package/dist/types/components/combobox/utils.d.ts +6 -0
- package/dist/types/components/combobox-item/combobox-item.d.ts +48 -0
- package/dist/types/components/combobox-item-group/combobox-item-group.d.ts +17 -0
- package/dist/types/components/date-picker/date-picker.d.ts +132 -0
- package/dist/types/components/date-picker-day/date-picker-day.d.ts +48 -0
- package/dist/types/components/date-picker-month/date-picker-month.d.ts +97 -0
- package/dist/types/components/date-picker-month-header/date-picker-month-header.d.ts +57 -0
- package/dist/types/components/dropdown/dropdown.d.ts +106 -0
- package/dist/types/components/dropdown-group/dropdown-group.d.ts +32 -0
- package/dist/types/components/dropdown-item/dropdown-item.d.ts +54 -0
- package/dist/types/components/fab/fab.d.ts +49 -0
- package/dist/types/components/filter/filter.d.ts +59 -0
- package/dist/types/components/flow/flow.d.ts +22 -0
- package/dist/types/components/functional/ExpandToggle.d.ts +19 -0
- package/dist/types/components/graph/graph.d.ts +28 -0
- package/dist/types/components/handle/handle.d.ts +22 -0
- package/dist/types/components/icon/icon.d.ts +32 -0
- package/dist/types/components/inline-editable/inline-editable.d.ts +74 -0
- package/dist/types/components/input/input.d.ts +171 -0
- package/dist/types/components/input-date-picker/input-date-picker.d.ts +186 -0
- package/dist/types/components/input-message/input-message.d.ts +27 -0
- package/dist/types/components/input-time-picker/input-time-picker.d.ts +94 -0
- package/dist/types/components/label/label.d.ts +39 -0
- package/dist/types/components/link/link.d.ts +36 -0
- package/dist/types/components/list/list.d.ts +22 -0
- package/dist/types/components/list-item/list-item.d.ts +42 -0
- package/dist/types/components/list-item-group/list-item-group.d.ts +18 -0
- package/dist/types/components/loader/loader.d.ts +27 -0
- package/dist/types/components/modal/modal.d.ts +89 -0
- package/dist/types/components/notice/notice.d.ts +51 -0
- package/dist/types/components/pagination/pagination.d.ts +51 -0
- package/dist/types/components/panel/panel.d.ts +132 -0
- package/dist/types/components/pick-list/pick-list.d.ts +77 -0
- package/dist/types/components/pick-list/shared-list-logic.d.ts +32 -0
- package/dist/types/components/pick-list/shared-list-render.d.ts +18 -0
- package/dist/types/components/pick-list-group/pick-list-group.d.ts +21 -0
- package/dist/types/components/pick-list-item/pick-list-item.d.ts +108 -0
- package/dist/types/components/popover/popover.d.ts +107 -0
- package/dist/types/components/popover/resources.d.ts +1 -0
- package/dist/types/components/popover-manager/popover-manager.d.ts +19 -0
- package/dist/types/components/progress/progress.d.ts +15 -0
- package/dist/types/components/radio-button/radio-button.d.ts +94 -0
- package/dist/types/components/radio-button-group/radio-button-group.d.ts +34 -0
- package/dist/types/components/radio-group/radio-group.d.ts +58 -0
- package/dist/types/components/radio-group-item/radio-group-item.d.ts +24 -0
- package/dist/types/components/rating/rating.d.ts +62 -0
- package/dist/types/components/scrim/scrim.d.ts +17 -0
- package/dist/types/components/select/select.d.ts +77 -0
- package/dist/types/components/shell/shell.d.ts +24 -0
- package/dist/types/components/shell-center-row/shell-center-row.d.ts +25 -0
- package/dist/types/components/shell-panel/shell-panel.d.ts +69 -0
- package/dist/types/components/slider/slider.d.ts +194 -0
- package/dist/types/components/sortable-list/sortable-list.d.ts +52 -0
- package/dist/types/components/split-button/split-button.d.ts +56 -0
- package/dist/types/components/stepper/stepper.d.ts +58 -0
- package/dist/types/components/stepper-item/stepper-item.d.ts +67 -0
- package/dist/types/components/switch/switch.d.ts +45 -0
- package/dist/types/components/tab/tab.d.ts +42 -0
- package/dist/types/components/tab-nav/tab-nav.d.ts +74 -0
- package/dist/types/components/tab-title/tab-title.d.ts +94 -0
- package/dist/types/components/tabs/tabs.d.ts +65 -0
- package/dist/types/components/tile/tile.d.ts +38 -0
- package/dist/types/components/tile-select/tile-select.d.ts +59 -0
- package/dist/types/components/tile-select-group/tile-select-group.d.ts +15 -0
- package/dist/types/components/time-picker/time-picker.d.ts +137 -0
- package/dist/types/components/tip/tip.d.ts +47 -0
- package/dist/types/components/tip-manager/tip-manager.d.ts +65 -0
- package/dist/types/components/tooltip/tooltip.d.ts +60 -0
- package/dist/types/components/tooltip-manager/tooltip-manager.d.ts +41 -0
- package/dist/types/components/tree/interfaces.d.ts +10 -0
- package/dist/types/components/tree/tree.d.ts +39 -0
- package/dist/types/components/tree-item/tree-item.d.ts +60 -0
- package/dist/types/components/value-list/value-list.d.ts +92 -0
- package/dist/types/components/value-list-item/value-list-item.d.ts +81 -0
- package/dist/types/components.d.ts +4 -5
- package/dist/types/utils/label.d.ts +41 -0
- package/hydrate/index.js +53 -66
- package/package.json +1 -1
- package/readme.md +2 -2
- package/dist/calcite/p-184049cb.entry.js +0 -5
- package/dist/calcite/p-1b1bca2d.entry.js +0 -5
- package/dist/calcite/p-4696e56f.entry.js +0 -5
- package/dist/calcite/p-4730df46.js +0 -5
- package/dist/calcite/p-57e0428a.system.entry.js +0 -5
- package/dist/calcite/p-58adb34d.system.entry.js +0 -5
- package/dist/calcite/p-73d23656.entry.js +0 -5
- package/dist/calcite/p-7dfd6480.system.entry.js +0 -5
- package/dist/calcite/p-a3527241.system.entry.js +0 -5
- package/dist/calcite/p-bcdc20c3.system.entry.js +0 -5
- package/dist/calcite/p-c33f47d5.system.js +0 -5
- package/dist/calcite/p-c5c42405.entry.js +0 -5
- package/dist/calcite/p-e5a7ca2a.entry.js +0 -5
- package/dist/esm-es5/resources-cbfcf4a3.js +0 -5
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import "form-request-submit-polyfill/form-request-submit-polyfill";
|
|
2
|
+
import { VNode } from "../../stencil-public-runtime";
|
|
3
|
+
import { ButtonAlignment, ButtonAppearance, ButtonColor } from "./interfaces";
|
|
4
|
+
import { FlipContext, Scale, Width } from "../interfaces";
|
|
5
|
+
import { LabelableComponent } from "../../utils/label";
|
|
6
|
+
import { InteractiveComponent } from "../../utils/interactive";
|
|
7
|
+
/** Passing a 'href' will render an anchor link, instead of a button. Role will be set to link, or button, depending on this. */
|
|
8
|
+
/** It is the consumers responsibility to add aria information, rel, target, for links, and any button attributes for form submission */
|
|
9
|
+
/** @slot - A slot for adding text. */
|
|
10
|
+
export declare class Button implements LabelableComponent, InteractiveComponent {
|
|
11
|
+
el: HTMLCalciteButtonElement;
|
|
12
|
+
/** optionally specify alignment of button elements. */
|
|
13
|
+
alignment?: ButtonAlignment;
|
|
14
|
+
/** specify the appearance style of the button, defaults to solid. */
|
|
15
|
+
appearance: ButtonAppearance;
|
|
16
|
+
/** Applies to the aria-label attribute on the button or hyperlink */
|
|
17
|
+
label?: string;
|
|
18
|
+
/** specify the color of the button, defaults to blue */
|
|
19
|
+
color: ButtonColor;
|
|
20
|
+
/** is the button disabled */
|
|
21
|
+
disabled: boolean;
|
|
22
|
+
/** optionally pass a href - used to determine if the component should render as a button or an anchor */
|
|
23
|
+
href?: string;
|
|
24
|
+
/** optionally pass an icon to display at the end of a button - accepts calcite ui icon names */
|
|
25
|
+
iconEnd?: string;
|
|
26
|
+
/** flip the icon(s) in rtl */
|
|
27
|
+
iconFlipRtl?: FlipContext;
|
|
28
|
+
/** optionally pass an icon to display at the start of a button - accepts calcite ui icon names */
|
|
29
|
+
iconStart?: string;
|
|
30
|
+
/** string to override English loading text
|
|
31
|
+
* @default "Loading"
|
|
32
|
+
*/
|
|
33
|
+
intlLoading?: string;
|
|
34
|
+
/** optionally add a calcite-loader component to the button, disabling interaction. */
|
|
35
|
+
loading: boolean;
|
|
36
|
+
/** The name attribute to apply to the button */
|
|
37
|
+
name?: string;
|
|
38
|
+
/** The rel attribute to apply to the hyperlink */
|
|
39
|
+
rel?: string;
|
|
40
|
+
/**
|
|
41
|
+
* The form ID to associate with the component
|
|
42
|
+
*
|
|
43
|
+
* @deprecated – this property is no longer needed if placed inside a form.
|
|
44
|
+
*/
|
|
45
|
+
form?: string;
|
|
46
|
+
/** optionally add a round style to the button */
|
|
47
|
+
round: boolean;
|
|
48
|
+
/** specify the scale of the button, defaults to m */
|
|
49
|
+
scale: Scale;
|
|
50
|
+
/** is the button a child of a calcite-split-button */
|
|
51
|
+
splitChild?: "primary" | "secondary" | false;
|
|
52
|
+
/** The target attribute to apply to the hyperlink */
|
|
53
|
+
target?: string;
|
|
54
|
+
/** The type attribute to apply to the button */
|
|
55
|
+
type?: string;
|
|
56
|
+
/** specify the width of the button, defaults to auto */
|
|
57
|
+
width: Width;
|
|
58
|
+
loadingChanged(newValue: boolean, oldValue: boolean): void;
|
|
59
|
+
connectedCallback(): void;
|
|
60
|
+
disconnectedCallback(): void;
|
|
61
|
+
componentWillLoad(): void;
|
|
62
|
+
componentDidRender(): void;
|
|
63
|
+
render(): VNode;
|
|
64
|
+
/** Sets focus on the component. */
|
|
65
|
+
setFocus(): Promise<void>;
|
|
66
|
+
formEl: HTMLFormElement;
|
|
67
|
+
labelEl: HTMLCalciteLabelElement;
|
|
68
|
+
/** watches for changing text content **/
|
|
69
|
+
private mutationObserver;
|
|
70
|
+
/** the rendered child element */
|
|
71
|
+
private childEl?;
|
|
72
|
+
/** determine if there is slotted content for styling purposes */
|
|
73
|
+
private hasContent;
|
|
74
|
+
/** determine if loader present for styling purposes */
|
|
75
|
+
private hasLoader;
|
|
76
|
+
private updateHasContent;
|
|
77
|
+
private setupTextContentObserver;
|
|
78
|
+
onLabelClick(): void;
|
|
79
|
+
private handleClick;
|
|
80
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { EventEmitter, VNode } from "../../stencil-public-runtime";
|
|
2
|
+
import { ConditionalSlotComponent } from "../../utils/conditionalSlot";
|
|
3
|
+
/** Cards do not include a grid or bounding container
|
|
4
|
+
* - cards will expand to fit the width of their container
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* @slot - A slot for adding subheader/description content.
|
|
8
|
+
* @slot thumbnail - A slot for adding a thumbnail to the card.
|
|
9
|
+
* @slot title - A slot for adding a card title.
|
|
10
|
+
* @slot subtitle - A slot for adding a card subtitle or short summary.
|
|
11
|
+
* @slot footer-leading - A slot for adding a leading footer.
|
|
12
|
+
* @slot footer-trailing - A slot for adding a trailing footer.
|
|
13
|
+
*/
|
|
14
|
+
export declare class Card implements ConditionalSlotComponent {
|
|
15
|
+
el: HTMLCalciteCardElement;
|
|
16
|
+
/** When true, the cards content is waiting to be loaded. This state shows a busy indicator.*/
|
|
17
|
+
loading: boolean;
|
|
18
|
+
/** Indicates whether the card is selected. */
|
|
19
|
+
selected: boolean;
|
|
20
|
+
/** Indicates whether the card is selectable. */
|
|
21
|
+
selectable: boolean;
|
|
22
|
+
/** string to override English loading text
|
|
23
|
+
* @default "Loading"
|
|
24
|
+
*/
|
|
25
|
+
intlLoading?: string;
|
|
26
|
+
/** string to override English select text for checkbox when selectable is true
|
|
27
|
+
* @default "Select"
|
|
28
|
+
*/
|
|
29
|
+
intlSelect: string;
|
|
30
|
+
/** string to override English deselect text for checkbox when selectable is true
|
|
31
|
+
* @default "Deselect"
|
|
32
|
+
*/
|
|
33
|
+
intlDeselect: string;
|
|
34
|
+
/** Fired when a selectable card is selected */
|
|
35
|
+
calciteCardSelect: EventEmitter;
|
|
36
|
+
connectedCallback(): void;
|
|
37
|
+
disonnectedCallback(): void;
|
|
38
|
+
render(): VNode;
|
|
39
|
+
private cardSelectClick;
|
|
40
|
+
private cardSelectKeyDown;
|
|
41
|
+
private selectCard;
|
|
42
|
+
private renderThumbnail;
|
|
43
|
+
private renderCheckbox;
|
|
44
|
+
private renderHeader;
|
|
45
|
+
private renderFooter;
|
|
46
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { EventEmitter, VNode } from "../../stencil-public-runtime";
|
|
2
|
+
import { Scale } from "../interfaces";
|
|
3
|
+
import { CheckableFormCompoment } from "../../utils/form";
|
|
4
|
+
import { LabelableComponent } from "../../utils/label";
|
|
5
|
+
import { InteractiveComponent } from "../../utils/interactive";
|
|
6
|
+
export declare class Checkbox implements LabelableComponent, CheckableFormCompoment, InteractiveComponent {
|
|
7
|
+
el: HTMLCalciteCheckboxElement;
|
|
8
|
+
/** The checked state of the checkbox. */
|
|
9
|
+
checked: boolean;
|
|
10
|
+
/** True if the checkbox is disabled */
|
|
11
|
+
disabled: boolean;
|
|
12
|
+
/** The id attribute of the checkbox. When omitted, a globally unique identifier is used. */
|
|
13
|
+
guid: string;
|
|
14
|
+
/**
|
|
15
|
+
* The hovered state of the checkbox.
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
hovered: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* True if the checkbox is initially indeterminate,
|
|
21
|
+
* which is independent from its checked state
|
|
22
|
+
* https://css-tricks.com/indeterminate-checkboxes/
|
|
23
|
+
* */
|
|
24
|
+
indeterminate: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* The label of the checkbox input
|
|
27
|
+
* @internal
|
|
28
|
+
*/
|
|
29
|
+
label?: string;
|
|
30
|
+
/** The name of the checkbox input */
|
|
31
|
+
name: any;
|
|
32
|
+
/**
|
|
33
|
+
* When true, makes the component required for form-submission.
|
|
34
|
+
*
|
|
35
|
+
* @internal
|
|
36
|
+
*/
|
|
37
|
+
required: boolean;
|
|
38
|
+
/** specify the scale of the checkbox, defaults to m */
|
|
39
|
+
scale: Scale;
|
|
40
|
+
/** The value of the checkbox input */
|
|
41
|
+
value: any;
|
|
42
|
+
readonly checkedPath = "M5.5 12L2 8.689l.637-.636L5.5 10.727l8.022-7.87.637.637z";
|
|
43
|
+
readonly indeterminatePath = "M13 8v1H3V8z";
|
|
44
|
+
labelEl: HTMLCalciteLabelElement;
|
|
45
|
+
formEl: HTMLFormElement;
|
|
46
|
+
defaultValue: Checkbox["checked"];
|
|
47
|
+
toggleEl: HTMLDivElement;
|
|
48
|
+
/** Sets focus on the component. */
|
|
49
|
+
setFocus(): Promise<void>;
|
|
50
|
+
getPath: () => string;
|
|
51
|
+
toggle: () => void;
|
|
52
|
+
keyDownHandler: (event: KeyboardEvent) => void;
|
|
53
|
+
clickHandler: () => void;
|
|
54
|
+
/**
|
|
55
|
+
* Emitted when the checkbox is blurred
|
|
56
|
+
*
|
|
57
|
+
* @internal
|
|
58
|
+
*/
|
|
59
|
+
calciteInternalCheckboxBlur: EventEmitter;
|
|
60
|
+
/** Emitted when the checkbox checked status changes */
|
|
61
|
+
calciteCheckboxChange: EventEmitter;
|
|
62
|
+
/**
|
|
63
|
+
* Emitted when the checkbox is focused
|
|
64
|
+
*
|
|
65
|
+
* @internal
|
|
66
|
+
*/
|
|
67
|
+
calciteInternalCheckboxFocus: EventEmitter;
|
|
68
|
+
onToggleBlur: () => void;
|
|
69
|
+
onToggleFocus: () => void;
|
|
70
|
+
onLabelClick: () => void;
|
|
71
|
+
connectedCallback(): void;
|
|
72
|
+
disconnectedCallback(): void;
|
|
73
|
+
componentDidRender(): void;
|
|
74
|
+
render(): VNode;
|
|
75
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { EventEmitter, VNode } from "../../stencil-public-runtime";
|
|
2
|
+
import { ChipColor } from "./interfaces";
|
|
3
|
+
import { Appearance, Scale } from "../interfaces";
|
|
4
|
+
import { ConditionalSlotComponent } from "../../utils/conditionalSlot";
|
|
5
|
+
/**
|
|
6
|
+
* @slot - A slot for adding text.
|
|
7
|
+
* @slot image - A slot for adding an image.
|
|
8
|
+
*/
|
|
9
|
+
export declare class Chip implements ConditionalSlotComponent {
|
|
10
|
+
/** specify the appearance style of the button, defaults to solid. */
|
|
11
|
+
appearance: Extract<"solid" | "clear", Appearance>;
|
|
12
|
+
/** specify the color of the button, defaults to blue */
|
|
13
|
+
color: ChipColor;
|
|
14
|
+
/** Optionally show a button the user can click to dismiss the chip */
|
|
15
|
+
dismissible: boolean;
|
|
16
|
+
/** Aria label for the "x" button
|
|
17
|
+
* @default "Close"
|
|
18
|
+
*/
|
|
19
|
+
dismissLabel?: string;
|
|
20
|
+
/** optionally pass an icon to display - accepts Calcite UI icon names */
|
|
21
|
+
icon?: string;
|
|
22
|
+
/** flip the icon in rtl */
|
|
23
|
+
iconFlipRtl: boolean;
|
|
24
|
+
/** specify the scale of the chip, defaults to m */
|
|
25
|
+
scale: Scale;
|
|
26
|
+
/** The assigned value for the chip */
|
|
27
|
+
value: any;
|
|
28
|
+
el: HTMLCalciteChipElement;
|
|
29
|
+
connectedCallback(): void;
|
|
30
|
+
disconnectedCallback(): void;
|
|
31
|
+
/** Sets focus on the component. */
|
|
32
|
+
setFocus(): Promise<void>;
|
|
33
|
+
/** Emitted when the dismiss button is clicked */
|
|
34
|
+
calciteChipDismiss: EventEmitter;
|
|
35
|
+
closeClickHandler: (event: MouseEvent) => void;
|
|
36
|
+
private closeButton;
|
|
37
|
+
private guid;
|
|
38
|
+
renderChipImage(): VNode;
|
|
39
|
+
render(): VNode;
|
|
40
|
+
}
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
import { EventEmitter, VNode } from "../../stencil-public-runtime";
|
|
2
|
+
import Color from "color";
|
|
3
|
+
import { ColorAppearance, ColorMode, ColorValue, InternalColor } from "./interfaces";
|
|
4
|
+
import { Scale } from "../interfaces";
|
|
5
|
+
import { Format } from "./utils";
|
|
6
|
+
import { InteractiveComponent } from "../../utils/interactive";
|
|
7
|
+
export declare class ColorPicker implements InteractiveComponent {
|
|
8
|
+
el: HTMLCalciteColorPickerElement;
|
|
9
|
+
/**
|
|
10
|
+
* When false, empty color (null) will be allowed as a value. Otherwise, a color value is always enforced by the component.
|
|
11
|
+
*
|
|
12
|
+
* When true, clearing the input and blurring will restore the last valid color set. When false, it will set it to empty.
|
|
13
|
+
*/
|
|
14
|
+
allowEmpty: boolean;
|
|
15
|
+
/** specify the appearance - default (containing border), or minimal (no containing border) */
|
|
16
|
+
appearance: ColorAppearance;
|
|
17
|
+
/**
|
|
18
|
+
* Internal prop for advanced use-cases.
|
|
19
|
+
*
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
|
+
color: InternalColor | null;
|
|
23
|
+
handleColorChange(color: Color | null, oldColor: Color | null): void;
|
|
24
|
+
/**
|
|
25
|
+
* When true, disabled prevents user interaction.
|
|
26
|
+
*/
|
|
27
|
+
disabled: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* The format of the value property.
|
|
30
|
+
*
|
|
31
|
+
* When "auto", the format will be inferred from `value` when set.
|
|
32
|
+
* @default "auto"
|
|
33
|
+
*/
|
|
34
|
+
format: Format;
|
|
35
|
+
handleFormatChange(format: ColorPicker["format"]): void;
|
|
36
|
+
/** When true, hides the hex input */
|
|
37
|
+
hideHex: boolean;
|
|
38
|
+
/** When true, hides the RGB/HSV channel inputs */
|
|
39
|
+
hideChannels: boolean;
|
|
40
|
+
/** When true, hides the saved colors section */
|
|
41
|
+
hideSaved: boolean;
|
|
42
|
+
/** Label used for the blue channel
|
|
43
|
+
* @default "B"
|
|
44
|
+
*/
|
|
45
|
+
intlB: string;
|
|
46
|
+
/** Label used for the blue channel description
|
|
47
|
+
* @default "Blue"
|
|
48
|
+
*/
|
|
49
|
+
intlBlue: string;
|
|
50
|
+
/** Label used for the delete color button.
|
|
51
|
+
* @default "Delete color"
|
|
52
|
+
*/
|
|
53
|
+
intlDeleteColor: string;
|
|
54
|
+
/** Label used for the green channel
|
|
55
|
+
* @default "G"
|
|
56
|
+
*/
|
|
57
|
+
intlG: string;
|
|
58
|
+
/** Label used for the green channel description
|
|
59
|
+
* @default "Green"
|
|
60
|
+
*/
|
|
61
|
+
intlGreen: string;
|
|
62
|
+
/** Label used for the hue channel
|
|
63
|
+
* @default "H"
|
|
64
|
+
*/
|
|
65
|
+
intlH: string;
|
|
66
|
+
/** Label used for the HSV mode
|
|
67
|
+
* @default "HSV"
|
|
68
|
+
*/
|
|
69
|
+
intlHsv: string;
|
|
70
|
+
/** Label used for the hex input
|
|
71
|
+
* @default "Hex"
|
|
72
|
+
*/
|
|
73
|
+
intlHex: string;
|
|
74
|
+
/** Label used for the hue channel description
|
|
75
|
+
* @default "Hue"
|
|
76
|
+
*/
|
|
77
|
+
intlHue: string;
|
|
78
|
+
/**
|
|
79
|
+
* Label used for the hex input when there is no color selected.
|
|
80
|
+
* @default "No color"
|
|
81
|
+
*/
|
|
82
|
+
intlNoColor: string;
|
|
83
|
+
/** Label used for the red channel
|
|
84
|
+
* @default "R"
|
|
85
|
+
*/
|
|
86
|
+
intlR: string;
|
|
87
|
+
/** Label used for the red channel description
|
|
88
|
+
* @default "Red"
|
|
89
|
+
*/
|
|
90
|
+
intlRed: string;
|
|
91
|
+
/** Label used for the RGB mode
|
|
92
|
+
* @default "RGB"
|
|
93
|
+
*/
|
|
94
|
+
intlRgb: string;
|
|
95
|
+
/** Label used for the saturation channel
|
|
96
|
+
* @default "S"
|
|
97
|
+
*/
|
|
98
|
+
intlS: string;
|
|
99
|
+
/** Label used for the saturation channel description
|
|
100
|
+
* @default "Saturation"
|
|
101
|
+
*/
|
|
102
|
+
intlSaturation: string;
|
|
103
|
+
/** Label used for the save color button.
|
|
104
|
+
* @default "Save color"
|
|
105
|
+
*/
|
|
106
|
+
intlSaveColor: string;
|
|
107
|
+
/** Label used for the saved colors section
|
|
108
|
+
* @default "Saved"
|
|
109
|
+
*/
|
|
110
|
+
intlSaved: string;
|
|
111
|
+
/** Label used for the value channel
|
|
112
|
+
* @default "V"
|
|
113
|
+
*/
|
|
114
|
+
intlV: string;
|
|
115
|
+
/** Label used for the
|
|
116
|
+
* @default "Value"
|
|
117
|
+
*/
|
|
118
|
+
intlValue: string;
|
|
119
|
+
/**
|
|
120
|
+
* The scale of the color picker.
|
|
121
|
+
*/
|
|
122
|
+
scale: Scale;
|
|
123
|
+
handleScaleChange(scale?: Scale): void;
|
|
124
|
+
/**
|
|
125
|
+
* Storage ID for colors.
|
|
126
|
+
*/
|
|
127
|
+
storageId: string;
|
|
128
|
+
/**
|
|
129
|
+
* The color value.
|
|
130
|
+
*
|
|
131
|
+
* This value can be either a {@link https://developer.mozilla.org/en-US/docs/Web/CSS/color|CSS string}
|
|
132
|
+
* a RGB, HSL or HSV object.
|
|
133
|
+
*
|
|
134
|
+
* The type will be preserved as the color is updated.
|
|
135
|
+
* @default "#007ac2"
|
|
136
|
+
* @see [ColorValue](https://github.com/Esri/calcite-components/blob/master/src/components/color-picker/interfaces.ts#L10)
|
|
137
|
+
*/
|
|
138
|
+
value: ColorValue | null;
|
|
139
|
+
handleValueChange(value: ColorValue | null, oldValue: ColorValue | null): void;
|
|
140
|
+
private get baseColorFieldColor();
|
|
141
|
+
private activeColorFieldAndSliderRect;
|
|
142
|
+
private colorFieldAndSliderHovered;
|
|
143
|
+
private fieldAndSliderRenderingContext;
|
|
144
|
+
private colorFieldScopeNode;
|
|
145
|
+
private hueThumbState;
|
|
146
|
+
private hueScopeNode;
|
|
147
|
+
private internalColorUpdateContext;
|
|
148
|
+
private previousColor;
|
|
149
|
+
private mode;
|
|
150
|
+
private shiftKeyChannelAdjustment;
|
|
151
|
+
private sliderThumbState;
|
|
152
|
+
colorFieldAndSliderInteractive: boolean;
|
|
153
|
+
channelMode: ColorMode;
|
|
154
|
+
channels: [number, number, number];
|
|
155
|
+
dimensions: {
|
|
156
|
+
slider: {
|
|
157
|
+
height: number;
|
|
158
|
+
width: number;
|
|
159
|
+
};
|
|
160
|
+
colorField: {
|
|
161
|
+
height: number;
|
|
162
|
+
width: number;
|
|
163
|
+
};
|
|
164
|
+
thumb: {
|
|
165
|
+
radius: number;
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
savedColors: string[];
|
|
169
|
+
colorFieldScopeTop: number;
|
|
170
|
+
colorFieldScopeLeft: number;
|
|
171
|
+
scopeOrientation: "vertical" | "horizontal";
|
|
172
|
+
hueScopeLeft: number;
|
|
173
|
+
hueScopeTop: number;
|
|
174
|
+
/**
|
|
175
|
+
* Fires when the color value has changed.
|
|
176
|
+
*/
|
|
177
|
+
calciteColorPickerChange: EventEmitter;
|
|
178
|
+
/**
|
|
179
|
+
* Fires as the color value changes.
|
|
180
|
+
*
|
|
181
|
+
* This is similar to the change event with the exception of dragging. When dragging the color field or hue slider thumb, this event fires as the thumb is moved.
|
|
182
|
+
*/
|
|
183
|
+
calciteColorPickerInput: EventEmitter;
|
|
184
|
+
private handleTabActivate;
|
|
185
|
+
private handleColorFieldScopeKeyDown;
|
|
186
|
+
private handleHueScopeKeyDown;
|
|
187
|
+
private handleHexInputChange;
|
|
188
|
+
private handleSavedColorSelect;
|
|
189
|
+
private handleChannelInput;
|
|
190
|
+
protected handleChannelKeyUpOrDown(event: KeyboardEvent): void;
|
|
191
|
+
private handleChannelChange;
|
|
192
|
+
private handleSavedColorKeyDown;
|
|
193
|
+
private handleColorFieldAndSliderMouseLeave;
|
|
194
|
+
private handleColorFieldAndSliderMouseDown;
|
|
195
|
+
private globalMouseUpHandler;
|
|
196
|
+
private globalMouseMoveHandler;
|
|
197
|
+
private handleColorFieldAndSliderMouseEnterOrMove;
|
|
198
|
+
/** Sets focus on the component. */
|
|
199
|
+
setFocus(): Promise<void>;
|
|
200
|
+
componentWillLoad(): void;
|
|
201
|
+
disconnectedCallback(): void;
|
|
202
|
+
componentDidRender(): void;
|
|
203
|
+
render(): VNode;
|
|
204
|
+
private storeColorFieldScope;
|
|
205
|
+
private storeHueScope;
|
|
206
|
+
private renderChannelsTabTitle;
|
|
207
|
+
private renderChannelsTab;
|
|
208
|
+
private renderChannel;
|
|
209
|
+
private showIncompatibleColorWarning;
|
|
210
|
+
private setMode;
|
|
211
|
+
private captureHueSliderColor;
|
|
212
|
+
private getCanvasRegion;
|
|
213
|
+
private internalColorSet;
|
|
214
|
+
private toValue;
|
|
215
|
+
private getSliderCapSpacing;
|
|
216
|
+
private updateDimensions;
|
|
217
|
+
private deleteColor;
|
|
218
|
+
private saveColor;
|
|
219
|
+
private drawColorFieldAndSlider;
|
|
220
|
+
private drawColorField;
|
|
221
|
+
private setCanvasContextSize;
|
|
222
|
+
private captureColorFieldColor;
|
|
223
|
+
private initColorFieldAndSlider;
|
|
224
|
+
private containsPoint;
|
|
225
|
+
private drawActiveColorFieldColor;
|
|
226
|
+
private drawThumb;
|
|
227
|
+
private drawActiveHueSliderColor;
|
|
228
|
+
private drawHueSlider;
|
|
229
|
+
private updateColorFromChannels;
|
|
230
|
+
private updateChannelsFromColor;
|
|
231
|
+
private toChannels;
|
|
232
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { EventEmitter, VNode } from "../../stencil-public-runtime";
|
|
2
|
+
import Color from "color";
|
|
3
|
+
import { Scale } from "../interfaces";
|
|
4
|
+
export declare class ColorPickerHexInput {
|
|
5
|
+
el: HTMLCalciteColorPickerHexInputElement;
|
|
6
|
+
connectedCallback(): void;
|
|
7
|
+
/**
|
|
8
|
+
* When false, empty color (null) will be allowed as a value. Otherwise, a color value is always enforced by the component.
|
|
9
|
+
*
|
|
10
|
+
* When true, clearing the input and blurring will restore the last valid color set. When false, it will set it to empty.
|
|
11
|
+
*/
|
|
12
|
+
allowEmpty: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Label used for the hex input.
|
|
15
|
+
* @default "Hex"
|
|
16
|
+
*/
|
|
17
|
+
intlHex: string;
|
|
18
|
+
/**
|
|
19
|
+
* Label used for the hex input when there is no color selected.
|
|
20
|
+
* @default "No color"
|
|
21
|
+
*/
|
|
22
|
+
intlNoColor: string;
|
|
23
|
+
/**
|
|
24
|
+
* The component's scale.
|
|
25
|
+
*/
|
|
26
|
+
scale: Scale;
|
|
27
|
+
/**
|
|
28
|
+
* The hex value.
|
|
29
|
+
*/
|
|
30
|
+
value: string;
|
|
31
|
+
handleValueChange(value: string, oldValue: string): void;
|
|
32
|
+
/**
|
|
33
|
+
* Emitted when the hex value changes.
|
|
34
|
+
*/
|
|
35
|
+
calciteColorPickerHexInputChange: EventEmitter;
|
|
36
|
+
private onCalciteInputBlur;
|
|
37
|
+
private onInputChange;
|
|
38
|
+
protected onInputKeyDown(event: KeyboardEvent): void;
|
|
39
|
+
private inputNode;
|
|
40
|
+
/**
|
|
41
|
+
* The last valid/selected color. Used as a fallback if an invalid hex code is entered.
|
|
42
|
+
*/
|
|
43
|
+
internalColor: Color | null;
|
|
44
|
+
private previousNonNullValue;
|
|
45
|
+
render(): VNode;
|
|
46
|
+
/** Sets focus on the component. */
|
|
47
|
+
setFocus(): Promise<void>;
|
|
48
|
+
private storeInputRef;
|
|
49
|
+
private formatForInternalInput;
|
|
50
|
+
private nudgeRGBChannels;
|
|
51
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { VNode } from "../../stencil-public-runtime";
|
|
2
|
+
import { Scale } from "../interfaces";
|
|
3
|
+
export declare class ColorPickerSwatch {
|
|
4
|
+
/**
|
|
5
|
+
* Used to display whether the swatch is active or not.
|
|
6
|
+
*/
|
|
7
|
+
active: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* The color value.
|
|
10
|
+
*
|
|
11
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/color_value
|
|
12
|
+
*/
|
|
13
|
+
color: string;
|
|
14
|
+
handleColorChange(color: string): void;
|
|
15
|
+
/**
|
|
16
|
+
* The component scale.
|
|
17
|
+
*/
|
|
18
|
+
scale: Scale;
|
|
19
|
+
el: HTMLCalciteColorPickerSwatchElement;
|
|
20
|
+
private internalColor;
|
|
21
|
+
componentWillLoad(): void;
|
|
22
|
+
render(): VNode;
|
|
23
|
+
}
|