@tylertech/forge 3.11.0 → 3.12.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/custom-elements.json +311 -145
- package/dist/app-bar/forge-app-bar.css +2 -0
- package/dist/button/forge-button.css +2 -0
- package/dist/checkbox/forge-checkbox.css +2 -0
- package/dist/chips/forge-chips.css +2 -0
- package/dist/floating-action-button/forge-floating-action-button.css +2 -0
- package/dist/icon-button/forge-icon-button.css +2 -0
- package/dist/lib.js +17 -17
- package/dist/lib.js.map +3 -3
- package/dist/list/forge-list.css +2 -0
- package/dist/radio/forge-radio.css +2 -0
- package/dist/skip-link/forge-skip-link.css +2 -0
- package/dist/state-layer/forge-state-layer.css +2 -0
- package/dist/switch/forge-switch.css +2 -0
- package/dist/vscode.html-custom-data.json +74 -59
- package/esm/accordion/accordion.d.ts +1 -1
- package/esm/accordion/accordion.js +1 -1
- package/esm/app-bar/app-bar/app-bar.d.ts +1 -1
- package/esm/app-bar/app-bar/app-bar.js +1 -1
- package/esm/autocomplete/autocomplete-core.js +16 -3
- package/esm/autocomplete/autocomplete.d.ts +1 -1
- package/esm/autocomplete/autocomplete.js +1 -1
- package/esm/avatar/avatar.d.ts +1 -1
- package/esm/avatar/avatar.js +1 -1
- package/esm/backdrop/backdrop.d.ts +1 -1
- package/esm/backdrop/backdrop.js +1 -1
- package/esm/badge/badge.d.ts +1 -1
- package/esm/badge/badge.js +1 -1
- package/esm/banner/banner.d.ts +1 -1
- package/esm/banner/banner.js +1 -1
- package/esm/button/button.d.ts +1 -6
- package/esm/button/button.js +1 -6
- package/esm/button-area/button-area.d.ts +1 -4
- package/esm/button-area/button-area.js +1 -4
- package/esm/button-toggle/button-toggle/button-toggle.d.ts +1 -1
- package/esm/button-toggle/button-toggle/button-toggle.js +1 -1
- package/esm/button-toggle/button-toggle-group/button-toggle-group.d.ts +1 -1
- package/esm/button-toggle/button-toggle-group/button-toggle-group.js +1 -1
- package/esm/chip-field/chip-field.d.ts +1 -1
- package/esm/chip-field/chip-field.js +1 -1
- package/esm/chips/chip/chip-adapter.d.ts +3 -0
- package/esm/chips/chip/chip-adapter.js +12 -2
- package/esm/chips/chip/chip-constants.d.ts +2 -0
- package/esm/chips/chip/chip-constants.js +2 -1
- package/esm/chips/chip/chip-core.d.ts +4 -0
- package/esm/chips/chip/chip-core.js +9 -0
- package/esm/chips/chip/chip.d.ts +4 -0
- package/esm/chips/chip/chip.js +8 -0
- package/esm/chips/chip-set/chip-set.d.ts +1 -1
- package/esm/chips/chip-set/chip-set.js +1 -1
- package/esm/circular-progress/circular-progress.d.ts +1 -2
- package/esm/circular-progress/circular-progress.js +1 -2
- package/esm/color-picker/color-picker.d.ts +1 -1
- package/esm/color-picker/color-picker.js +1 -1
- package/esm/date-picker/date-picker.d.ts +1 -1
- package/esm/date-picker/date-picker.js +1 -1
- package/esm/dialog/dialog.d.ts +1 -1
- package/esm/dialog/dialog.js +1 -1
- package/esm/divider/divider.d.ts +1 -1
- package/esm/divider/divider.js +1 -1
- package/esm/drawer/base/base-drawer-adapter.d.ts +2 -0
- package/esm/drawer/base/base-drawer-adapter.js +3 -0
- package/esm/drawer/base/base-drawer-core.js +3 -0
- package/esm/drawer/drawer/drawer.d.ts +1 -1
- package/esm/drawer/drawer/drawer.js +1 -1
- package/esm/drawer/modal-drawer/modal-drawer.d.ts +1 -1
- package/esm/drawer/modal-drawer/modal-drawer.js +1 -1
- package/esm/expansion-panel/expansion-panel.d.ts +1 -1
- package/esm/expansion-panel/expansion-panel.js +1 -1
- package/esm/field/field.d.ts +1 -2
- package/esm/field/field.js +1 -2
- package/esm/file-picker/file-picker.d.ts +2 -3
- package/esm/file-picker/file-picker.js +2 -3
- package/esm/floating-action-button/floating-action-button.d.ts +1 -1
- package/esm/floating-action-button/floating-action-button.js +1 -1
- package/esm/focus-indicator/focus-indicator.d.ts +1 -1
- package/esm/focus-indicator/focus-indicator.js +22 -21
- package/esm/icon/icon.d.ts +1 -1
- package/esm/icon/icon.js +1 -1
- package/esm/icon-button/icon-button.d.ts +1 -1
- package/esm/icon-button/icon-button.js +1 -1
- package/esm/inline-message/inline-message.d.ts +1 -1
- package/esm/inline-message/inline-message.js +1 -1
- package/esm/label/label.d.ts +1 -1
- package/esm/label/label.js +1 -1
- package/esm/label-value/label-value.d.ts +1 -1
- package/esm/label-value/label-value.js +1 -1
- package/esm/linear-progress/linear-progress.d.ts +1 -2
- package/esm/linear-progress/linear-progress.js +1 -2
- package/esm/list/list/list.d.ts +1 -1
- package/esm/list/list/list.js +1 -1
- package/esm/list/list-item/list-item-constants.js +1 -1
- package/esm/list-dropdown/list-dropdown-constants.d.ts +5 -1
- package/esm/list-dropdown/list-dropdown-utils.d.ts +3 -1
- package/esm/list-dropdown/list-dropdown-utils.js +41 -20
- package/esm/menu/menu-adapter.d.ts +2 -0
- package/esm/menu/menu-adapter.js +12 -8
- package/esm/menu/menu-constants.d.ts +1 -0
- package/esm/menu/menu-constants.js +3 -2
- package/esm/menu/menu-core.d.ts +5 -0
- package/esm/menu/menu-core.js +41 -2
- package/esm/menu/menu.d.ts +16 -1
- package/esm/menu/menu.js +14 -2
- package/esm/open-icon/open-icon.d.ts +2 -1
- package/esm/open-icon/open-icon.js +2 -1
- package/esm/overlay/overlay.d.ts +1 -2
- package/esm/overlay/overlay.js +1 -2
- package/esm/page-state/page-state.d.ts +1 -1
- package/esm/page-state/page-state.js +1 -1
- package/esm/paginator/paginator-core.d.ts +16 -0
- package/esm/paginator/paginator-core.js +29 -9
- package/esm/paginator/paginator.d.ts +37 -1
- package/esm/paginator/paginator.js +45 -1
- package/esm/popover/popover-adapter.js +1 -1
- package/esm/popover/popover-constants.d.ts +4 -0
- package/esm/popover/popover-constants.js +4 -2
- package/esm/popover/popover-core.d.ts +5 -1
- package/esm/popover/popover-core.js +13 -0
- package/esm/popover/popover.d.ts +6 -2
- package/esm/popover/popover.js +9 -1
- package/esm/profile-card/profile-card.d.ts +2 -1
- package/esm/profile-card/profile-card.js +2 -1
- package/esm/radio/radio/radio.d.ts +1 -2
- package/esm/radio/radio/radio.js +1 -2
- package/esm/scaffold/scaffold.d.ts +1 -1
- package/esm/scaffold/scaffold.js +1 -1
- package/esm/select/option/option.d.ts +1 -1
- package/esm/select/option/option.js +1 -1
- package/esm/select/select/select.d.ts +1 -1
- package/esm/select/select/select.js +2 -2
- package/esm/skeleton/skeleton.d.ts +1 -1
- package/esm/skeleton/skeleton.js +1 -1
- package/esm/skip-link/skip-link.d.ts +1 -1
- package/esm/skip-link/skip-link.js +1 -1
- package/esm/slider/slider.d.ts +1 -1
- package/esm/slider/slider.js +1 -1
- package/esm/split-button/split-button.d.ts +1 -1
- package/esm/split-button/split-button.js +1 -1
- package/esm/split-view/split-view-panel/split-view-panel.js +1 -1
- package/esm/stack/stack.d.ts +1 -8
- package/esm/stack/stack.js +1 -8
- package/esm/state-layer/state-layer.d.ts +1 -1
- package/esm/state-layer/state-layer.js +2 -2
- package/esm/table/table-adapter.d.ts +4 -4
- package/esm/table/table-adapter.js +4 -4
- package/esm/table/table-core.js +2 -2
- package/esm/table/table-utils.d.ts +2 -2
- package/esm/table/table-utils.js +22 -18
- package/esm/table/table.d.ts +2 -2
- package/esm/table/table.js +1 -1
- package/esm/tabs/tab/tab.d.ts +1 -1
- package/esm/tabs/tab/tab.js +1 -1
- package/esm/tabs/tab-bar/tab-bar.d.ts +1 -1
- package/esm/tabs/tab-bar/tab-bar.js +1 -1
- package/esm/text-field/text-field-adapter.d.ts +6 -4
- package/esm/text-field/text-field-adapter.js +11 -4
- package/esm/text-field/text-field-core.d.ts +4 -0
- package/esm/text-field/text-field-core.js +13 -2
- package/esm/text-field/text-field.d.ts +1 -1
- package/esm/text-field/text-field.js +1 -1
- package/esm/time-picker/time-picker-adapter.js +1 -0
- package/esm/time-picker/time-picker-core.js +3 -3
- package/esm/toast/toast-adapter.d.ts +20 -0
- package/esm/toast/toast-adapter.js +30 -0
- package/esm/toast/toast-core.d.ts +17 -0
- package/esm/toast/toast-core.js +66 -0
- package/esm/toast/toast.d.ts +9 -2
- package/esm/toast/toast.js +10 -1
- package/esm/toolbar/toolbar.d.ts +1 -3
- package/esm/toolbar/toolbar.js +1 -3
- package/esm/tooltip/tooltip.d.ts +1 -1
- package/esm/tooltip/tooltip.js +1 -1
- package/esm/view-switcher/view/view.d.ts +1 -1
- package/esm/view-switcher/view/view.js +1 -1
- package/esm/view-switcher/view-switcher.d.ts +1 -1
- package/esm/view-switcher/view-switcher.js +1 -1
- package/package.json +1 -1
- package/sass/state-layer/_core.scss +2 -0
|
@@ -15,7 +15,7 @@ declare global {
|
|
|
15
15
|
/**
|
|
16
16
|
* @tag forge-accordion
|
|
17
17
|
*
|
|
18
|
-
* @summary Accordions
|
|
18
|
+
* @summary Accordions wrap a collection of expansion panels to ensure that only one panel is expanded at a time.
|
|
19
19
|
*
|
|
20
20
|
* @dependency forge-expansion-panel
|
|
21
21
|
*
|
|
@@ -13,7 +13,7 @@ import { AccordionCore } from './accordion-core';
|
|
|
13
13
|
/**
|
|
14
14
|
* @tag forge-accordion
|
|
15
15
|
*
|
|
16
|
-
* @summary Accordions
|
|
16
|
+
* @summary Accordions wrap a collection of expansion panels to ensure that only one panel is expanded at a time.
|
|
17
17
|
*
|
|
18
18
|
* @dependency forge-expansion-panel
|
|
19
19
|
*
|
|
@@ -24,7 +24,7 @@ declare global {
|
|
|
24
24
|
/**
|
|
25
25
|
* @tag forge-app-bar
|
|
26
26
|
*
|
|
27
|
-
* @summary App bars are
|
|
27
|
+
* @summary App bars are headers used to display branding, navigation, and actions at the top of an application. They typically contain a logo, title, and various action items.
|
|
28
28
|
*
|
|
29
29
|
* @property {string} titleText - The text to display in the title.
|
|
30
30
|
* @property {AppBarElevation} [elevation="raised"] - The elevation of the app bar.
|
|
@@ -14,7 +14,7 @@ const styles = ':host{--_app-bar-background:var(--forge-app-bar-background, var(
|
|
|
14
14
|
/**
|
|
15
15
|
* @tag forge-app-bar
|
|
16
16
|
*
|
|
17
|
-
* @summary App bars are
|
|
17
|
+
* @summary App bars are headers used to display branding, navigation, and actions at the top of an application. They typically contain a logo, title, and various action items.
|
|
18
18
|
*
|
|
19
19
|
* @property {string} titleText - The text to display in the title.
|
|
20
20
|
* @property {AppBarElevation} [elevation="raised"] - The elevation of the app bar.
|
|
@@ -138,6 +138,7 @@ export class AutocompleteCore extends ListDropdownAwareCore {
|
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
_onClear(evt) {
|
|
141
|
+
evt.preventDefault();
|
|
141
142
|
this._filterText = '';
|
|
142
143
|
this._clearValue();
|
|
143
144
|
this._adapter.setSelectedText(this._getSelectedText());
|
|
@@ -352,14 +353,26 @@ export class AutocompleteCore extends ListDropdownAwareCore {
|
|
|
352
353
|
asyncStyle: ListDropdownAsyncStyle.Skeleton,
|
|
353
354
|
headerBuilder: this._popupHeaderBuilder,
|
|
354
355
|
footerBuilder: this._popupFooterBuilder,
|
|
355
|
-
transform: label => {
|
|
356
|
-
|
|
357
|
-
|
|
356
|
+
transform: (label, option, isSelected) => {
|
|
357
|
+
const inputValue = this._adapter.getInputValue();
|
|
358
|
+
const isUserTyping = this._filterText &&
|
|
359
|
+
inputValue?.length &&
|
|
360
|
+
inputValue !== label && // User hasn't just selected this exact option
|
|
361
|
+
this._adapter.hasFocus();
|
|
362
|
+
if (isUserTyping) {
|
|
363
|
+
// When filtering: highlight only the matching search text
|
|
358
364
|
const highlightElement = highlightTextHTML(label, this._filterText);
|
|
359
365
|
if (highlightElement) {
|
|
360
366
|
return highlightElement;
|
|
361
367
|
}
|
|
362
368
|
}
|
|
369
|
+
else if (isSelected) {
|
|
370
|
+
// When not filtering: bold the entire text of selected options
|
|
371
|
+
const boldElement = document.createElement('span');
|
|
372
|
+
boldElement.style.fontWeight = 'bold';
|
|
373
|
+
boldElement.textContent = label;
|
|
374
|
+
return boldElement;
|
|
375
|
+
}
|
|
363
376
|
return label;
|
|
364
377
|
},
|
|
365
378
|
allowBusy: true,
|
|
@@ -41,7 +41,7 @@ declare global {
|
|
|
41
41
|
/**
|
|
42
42
|
* @tag forge-autocomplete
|
|
43
43
|
*
|
|
44
|
-
* @summary Autocomplete components provide real-time suggestions as users type in a text field.
|
|
44
|
+
* @summary Autocomplete components provide real-time typeahead suggestions as users type in a text field. Use autocompletes to help users quickly find and select from a list of options, improving form usability and data accuracy.
|
|
45
45
|
*
|
|
46
46
|
* @event {CustomEvent<any>} forge-autocomplete-change - Fired when the value changes.
|
|
47
47
|
* @event {CustomEvent<IAutocompleteSelectEventData>} forge-autocomplete-select - Fired when an option is selected. Only applies when in "stateless" `mode`.
|
|
@@ -22,7 +22,7 @@ const styles = ':host{display:block}:host([hidden]){display:none}';
|
|
|
22
22
|
/**
|
|
23
23
|
* @tag forge-autocomplete
|
|
24
24
|
*
|
|
25
|
-
* @summary Autocomplete components provide real-time suggestions as users type in a text field.
|
|
25
|
+
* @summary Autocomplete components provide real-time typeahead suggestions as users type in a text field. Use autocompletes to help users quickly find and select from a list of options, improving form usability and data accuracy.
|
|
26
26
|
*
|
|
27
27
|
* @event {CustomEvent<any>} forge-autocomplete-change - Fired when the value changes.
|
|
28
28
|
* @event {CustomEvent<IAutocompleteSelectEventData>} forge-autocomplete-select - Fired when an option is selected. Only applies when in "stateless" `mode`.
|
package/esm/avatar/avatar.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export declare const AVATAR_TAG_NAME: keyof HTMLElementTagNameMap;
|
|
|
20
20
|
/**
|
|
21
21
|
* @tag forge-avatar
|
|
22
22
|
*
|
|
23
|
-
* @summary Avatars represent an entity via text or image.
|
|
23
|
+
* @summary Avatars represent an entity via text or image. Use avatars to visually represent users, objects, or identifiers in your application.
|
|
24
24
|
*
|
|
25
25
|
* @cssproperty {string} --forge-avatar-background - The background color of the avatar.
|
|
26
26
|
* @cssproperty {number} --forge-avatar-shape - The border radius of the avatar, defaults to 50%.
|
package/esm/avatar/avatar.js
CHANGED
|
@@ -28,7 +28,7 @@ export const AVATAR_TAG_NAME = 'forge-avatar';
|
|
|
28
28
|
/**
|
|
29
29
|
* @tag forge-avatar
|
|
30
30
|
*
|
|
31
|
-
* @summary Avatars represent an entity via text or image.
|
|
31
|
+
* @summary Avatars represent an entity via text or image. Use avatars to visually represent users, objects, or identifiers in your application.
|
|
32
32
|
*
|
|
33
33
|
* @cssproperty {string} --forge-avatar-background - The background color of the avatar.
|
|
34
34
|
* @cssproperty {number} --forge-avatar-shape - The border radius of the avatar, defaults to 50%.
|
|
@@ -20,7 +20,7 @@ declare global {
|
|
|
20
20
|
/**
|
|
21
21
|
* @tag forge-backdrop
|
|
22
22
|
*
|
|
23
|
-
* @summary Backdrops provide a semi-transparent overlay behind modal content like dialogs and drawers.
|
|
23
|
+
* @summary Backdrops provide a semi-transparent overlay behind modal content like dialogs and drawers. These are building blocks for creating modal experiences, not intended to be used directly.
|
|
24
24
|
*
|
|
25
25
|
* @property {boolean} [visible=false] - Whether the backdrop is visible.
|
|
26
26
|
* @property {boolean} [fixed=false] - Whether the backdrop uses "fixed" or "relative" positioning.
|
package/esm/backdrop/backdrop.js
CHANGED
|
@@ -12,7 +12,7 @@ const styles = '@keyframes enter{from{opacity:0}to{opacity:var(--_backdrop-opaci
|
|
|
12
12
|
/**
|
|
13
13
|
* @tag forge-backdrop
|
|
14
14
|
*
|
|
15
|
-
* @summary Backdrops provide a semi-transparent overlay behind modal content like dialogs and drawers.
|
|
15
|
+
* @summary Backdrops provide a semi-transparent overlay behind modal content like dialogs and drawers. These are building blocks for creating modal experiences, not intended to be used directly.
|
|
16
16
|
*
|
|
17
17
|
* @property {boolean} [visible=false] - Whether the backdrop is visible.
|
|
18
18
|
* @property {boolean} [fixed=false] - Whether the backdrop uses "fixed" or "relative" positioning.
|
package/esm/badge/badge.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export declare const BADGE_TAG_NAME: keyof HTMLElementTagNameMap;
|
|
|
22
22
|
/**
|
|
23
23
|
* @tag forge-badge
|
|
24
24
|
*
|
|
25
|
-
* @summary Badges display small amounts of information like counts, status indicators, or notifications.
|
|
25
|
+
* @summary Badges display small amounts of non-interactive information like counts, status indicators, or notifications.
|
|
26
26
|
*
|
|
27
27
|
* @cssproperty --forge-badge-background - The background color.
|
|
28
28
|
* @cssproperty --forge-badge-color - The text color.
|
package/esm/badge/badge.js
CHANGED
|
@@ -15,7 +15,7 @@ export const BADGE_TAG_NAME = 'forge-badge';
|
|
|
15
15
|
/**
|
|
16
16
|
* @tag forge-badge
|
|
17
17
|
*
|
|
18
|
-
* @summary Badges display small amounts of information like counts, status indicators, or notifications.
|
|
18
|
+
* @summary Badges display small amounts of non-interactive information like counts, status indicators, or notifications.
|
|
19
19
|
*
|
|
20
20
|
* @cssproperty --forge-badge-background - The background color.
|
|
21
21
|
* @cssproperty --forge-badge-color - The text color.
|
package/esm/banner/banner.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ declare global {
|
|
|
25
25
|
/**
|
|
26
26
|
* @tag forge-banner
|
|
27
27
|
*
|
|
28
|
-
* @summary Banners are used to inform users of important information, such as errors, warnings, or success messages.
|
|
28
|
+
* @summary Banners are used to inform users of important information, such as errors, warnings, or success messages. Use banners for non-critical messages that require user attention but do not interrupt workflow.
|
|
29
29
|
*
|
|
30
30
|
* @property {boolean} [dismissed=false] - Controls the visibility of the banner.
|
|
31
31
|
* @property {boolean} [persistent=false] - Controls the visibility of the built-in dismiss button.
|
package/esm/banner/banner.js
CHANGED
|
@@ -18,7 +18,7 @@ const styles = ':host{display:block;container-type:inline-size}:host([hidden]){d
|
|
|
18
18
|
/**
|
|
19
19
|
* @tag forge-banner
|
|
20
20
|
*
|
|
21
|
-
* @summary Banners are used to inform users of important information, such as errors, warnings, or success messages.
|
|
21
|
+
* @summary Banners are used to inform users of important information, such as errors, warnings, or success messages. Use banners for non-critical messages that require user attention but do not interrupt workflow.
|
|
22
22
|
*
|
|
23
23
|
* @property {boolean} [dismissed=false] - Controls the visibility of the banner.
|
|
24
24
|
* @property {boolean} [persistent=false] - Controls the visibility of the built-in dismiss button.
|
package/esm/button/button.d.ts
CHANGED
|
@@ -20,12 +20,7 @@ declare global {
|
|
|
20
20
|
/**
|
|
21
21
|
* @tag forge-button
|
|
22
22
|
*
|
|
23
|
-
* @summary Buttons
|
|
24
|
-
*
|
|
25
|
-
* @description
|
|
26
|
-
* Buttons are used when a user needs to take an action, such as submitting a form or opening a dialog.
|
|
27
|
-
* Buttons can be used to trigger an action or to navigate to a new location. Buttons can be styled with
|
|
28
|
-
* a variety of themes and variants.
|
|
23
|
+
* @summary Buttons are used when a user needs to take an action. They can be used to trigger an action, navigate to a new location, and can be styled with a variety of themes and variants.
|
|
29
24
|
*
|
|
30
25
|
* @dependency forge-icon
|
|
31
26
|
* @dependency forge-focus-indicator
|
package/esm/button/button.js
CHANGED
|
@@ -18,12 +18,7 @@ const styles = ':host{--_button-display:var(--forge-button-display, inline-grid)
|
|
|
18
18
|
/**
|
|
19
19
|
* @tag forge-button
|
|
20
20
|
*
|
|
21
|
-
* @summary Buttons
|
|
22
|
-
*
|
|
23
|
-
* @description
|
|
24
|
-
* Buttons are used when a user needs to take an action, such as submitting a form or opening a dialog.
|
|
25
|
-
* Buttons can be used to trigger an action or to navigate to a new location. Buttons can be styled with
|
|
26
|
-
* a variety of themes and variants.
|
|
21
|
+
* @summary Buttons are used when a user needs to take an action. They can be used to trigger an action, navigate to a new location, and can be styled with a variety of themes and variants.
|
|
27
22
|
*
|
|
28
23
|
* @dependency forge-icon
|
|
29
24
|
* @dependency forge-focus-indicator
|
|
@@ -15,10 +15,7 @@ declare global {
|
|
|
15
15
|
/**
|
|
16
16
|
* @tag forge-button-area
|
|
17
17
|
*
|
|
18
|
-
* @summary Button areas are used to create
|
|
19
|
-
*
|
|
20
|
-
* @description
|
|
21
|
-
* The button area component wraps any arbitrary content with a `<button>` element to enable accessible clickable interfaces including nested controls and other complex content.
|
|
18
|
+
* @summary Button areas are used to create clickable areas that group related information and actions about a single subject. The button area component wraps any arbitrary content with a `<button>` element to enable accessible, clickable interfaces including nested controls and other complex content.
|
|
22
19
|
*
|
|
23
20
|
* @property {boolean} [disabled=false] - Sets whether the button area and slotted button are disabled. Setting this on one will also set it on the other.
|
|
24
21
|
*
|
|
@@ -16,10 +16,7 @@ const styles = ':host{display:block;position:relative}:host .forge-button-area{c
|
|
|
16
16
|
/**
|
|
17
17
|
* @tag forge-button-area
|
|
18
18
|
*
|
|
19
|
-
* @summary Button areas are used to create
|
|
20
|
-
*
|
|
21
|
-
* @description
|
|
22
|
-
* The button area component wraps any arbitrary content with a `<button>` element to enable accessible clickable interfaces including nested controls and other complex content.
|
|
19
|
+
* @summary Button areas are used to create clickable areas that group related information and actions about a single subject. The button area component wraps any arbitrary content with a `<button>` element to enable accessible, clickable interfaces including nested controls and other complex content.
|
|
23
20
|
*
|
|
24
21
|
* @property {boolean} [disabled=false] - Sets whether the button area and slotted button are disabled. Setting this on one will also set it on the other.
|
|
25
22
|
*
|
|
@@ -27,7 +27,7 @@ declare const ButtonToggleComponent_base: import("../../constants").AbstractCons
|
|
|
27
27
|
/**
|
|
28
28
|
* @tag forge-button-toggle
|
|
29
29
|
*
|
|
30
|
-
* @summary
|
|
30
|
+
* @summary Button toggles allow users to select from a group of choices with single or multiple selection.
|
|
31
31
|
*
|
|
32
32
|
* @property {unknown} value - The value of the button toggle.
|
|
33
33
|
* @property {boolean} [selected=false] - Whether or not the button is selected.
|
|
@@ -19,7 +19,7 @@ const styles = ':host{--_button-toggle-display:var(--forge-button-toggle-display
|
|
|
19
19
|
/**
|
|
20
20
|
* @tag forge-button-toggle
|
|
21
21
|
*
|
|
22
|
-
* @summary
|
|
22
|
+
* @summary Button toggles allow users to select from a group of choices with single or multiple selection.
|
|
23
23
|
*
|
|
24
24
|
* @property {unknown} value - The value of the button toggle.
|
|
25
25
|
* @property {boolean} [selected=false] - Whether or not the button is selected.
|
|
@@ -36,7 +36,7 @@ declare const ButtonToggleGroupComponent_base: import("../../constants").Abstrac
|
|
|
36
36
|
/**
|
|
37
37
|
* @tag forge-button-toggle-group
|
|
38
38
|
*
|
|
39
|
-
* @summary Button toggle groups allow users to select one or more options from a set of
|
|
39
|
+
* @summary Button toggle groups allow users to select one or more options from a set of button toggles.
|
|
40
40
|
*
|
|
41
41
|
* @property {any} value - The value of the selected button toggle(s).
|
|
42
42
|
* @property {boolean} [outlined=true] - Whether or not the group should be outlined.
|
|
@@ -21,7 +21,7 @@ const styles = ':host{--_button-toggle-group-display:var(--forge-button-toggle-g
|
|
|
21
21
|
/**
|
|
22
22
|
* @tag forge-button-toggle-group
|
|
23
23
|
*
|
|
24
|
-
* @summary Button toggle groups allow users to select one or more options from a set of
|
|
24
|
+
* @summary Button toggle groups allow users to select one or more options from a set of button toggles.
|
|
25
25
|
*
|
|
26
26
|
* @property {any} value - The value of the selected button toggle(s).
|
|
27
27
|
* @property {boolean} [outlined=true] - Whether or not the group should be outlined.
|
|
@@ -19,7 +19,7 @@ declare global {
|
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
|
-
* @summary A specialized input field component that allows users to create and manage a collection of chips representing text values or selections.
|
|
22
|
+
* @summary A specialized input field component that allows users to create and manage a collection of chips representing text values or selections. Use a chip field when you want to allow users to input multiple discrete items, such as tags, categories, or selections from a predefined list. Prefer alternatives such as a select or autocomplete when dealing with a large number of options or when single selection is sufficient.
|
|
23
23
|
*
|
|
24
24
|
* @tag forge-chip-field
|
|
25
25
|
*
|
|
@@ -14,7 +14,7 @@ import { BASE_FIELD_CONSTANTS, FieldComponent } from '../field';
|
|
|
14
14
|
const template = '<template><forge-field id=\"field\" multiline><slot slot=\"label\" name=\"label\"></slot><slot slot=\"start\" name=\"start\"></slot><div class=\"container\" data-forge-field-input><slot name=\"member\"></slot><slot></slot></div><slot slot=\"end\" name=\"end\"></slot><slot slot=\"accessory\" name=\"accessory\"></slot><slot slot=\"support-text\" name=\"support-text\"></slot><slot slot=\"support-text-end\" name=\"support-text-end\"></slot><slot slot=\"start\" name=\"leading\"></slot><slot slot=\"end\" name=\"trailing\"></slot><slot slot=\"accessory\" name=\"addon-end\"></slot><slot slot=\"support-text\" name=\"helper-text\"></slot></forge-field></template>';
|
|
15
15
|
const styles = '@keyframes float-in-label-animation{from{translate:0;opacity:40%}to{translate:var(--_field-floating-label-translation);opacity:100%}}@keyframes float-out-label-animation{from{translate:var(--_field-floating-label-translation);opacity:40%}to{translate:0;opacity:100%}}@keyframes multiline-inset-label-background-animation{from{opacity:0%}to{opacity:100%}}:host{display:block}:host([hidden]){display:none}forge-field{--_chip-field-member-spacing:var(--forge-chip-field-member-spacing, var(--forge-spacing-xsmall, 8px));--_chip-field-content-spacing:var(--forge-chip-field-content-spacing, var(--forge-spacing-xxsmall, 4px))}.container{display:flex;flex-wrap:wrap;align-items:center;gap:var(--_chip-field-member-spacing);block-size:auto}.container.has-members{margin-block:var(--_chip-field-content-spacing)}.container.has-members ::slotted(input){block-size:auto;inline-size:auto}::slotted(input){flex-grow:1;cursor:inherit;box-sizing:border-box;margin:0;outline:0;border:none;background-color:transparent;padding-block:0;padding-inline:0;inline-size:100%;block-size:100%;color:inherit;font:inherit;font-size:var(--_field-font-size);text-overflow:ellipsis;padding-block-start:0;padding-block-end:0;transition:padding-block var(--_field-floating-animation-duration) var(--_field-floating-animation-timing)}forge-field{display:contents;--forge-field-multiline-resize:none}forge-field::part(label)::after{content:none}:host([theme=primary]) ::slotted([slot=member]){--forge-chip-field-background:var(--forge-theme-primary, #3f51b5);--forge-chip-field-color:var(--forge-theme-on-primary, #ffffff);--forge-chip-focus-indicator-color:var(--forge-theme-primary, #3f51b5)}:host([theme=secondary]) ::slotted([slot=member]){--forge-chip-field-background:var(--forge-theme-secondary, #ffc107);--forge-chip-field-color:var(--forge-theme-on-secondary, #000000);--forge-chip-focus-indicator-color:var(--forge-theme-secondary, #ffc107)}:host([theme=tertiary]) ::slotted([slot=member]){--forge-chip-field-background:var(--forge-theme-tertiary, #3d5afe);--forge-chip-field-color:var(--forge-theme-on-tertiary, #ffffff);--forge-chip-focus-indicator-color:var(--forge-theme-tertiary, #3d5afe)}:host([theme=success]) ::slotted([slot=member]){--forge-chip-field-background:var(--forge-theme-success, #2e7d32);--forge-chip-field-color:var(--forge-theme-on-success, #ffffff);--forge-chip-focus-indicator-color:var(--forge-theme-success, #2e7d32)}:host([theme=warning]) ::slotted([slot=member]){--forge-chip-field-background:var(--forge-theme-warning, #d14900);--forge-chip-field-color:var(--forge-theme-on-warning, #ffffff);--forge-chip-focus-indicator-color:var(--forge-theme-warning, #d14900)}:host([theme=error]) ::slotted([slot=member]){--forge-chip-field-background:var(--forge-theme-error, #b00020);--forge-chip-field-color:var(--forge-theme-on-error, #ffffff);--forge-chip-focus-indicator-color:var(--forge-theme-error, #b00020)}:host([theme=info]) ::slotted([slot=member]){--forge-chip-field-background:var(--forge-theme-info, #1565c0);--forge-chip-field-color:var(--forge-theme-on-info, #ffffff);--forge-chip-focus-indicator-color:var(--forge-theme-info, #1565c0)}';
|
|
16
16
|
/**
|
|
17
|
-
* @summary A specialized input field component that allows users to create and manage a collection of chips representing text values or selections.
|
|
17
|
+
* @summary A specialized input field component that allows users to create and manage a collection of chips representing text values or selections. Use a chip field when you want to allow users to input multiple discrete items, such as tags, categories, or selections from a predefined list. Prefer alternatives such as a select or autocomplete when dealing with a large number of options or when single selection is sufficient.
|
|
18
18
|
*
|
|
19
19
|
* @tag forge-chip-field
|
|
20
20
|
*
|
|
@@ -22,6 +22,7 @@ export interface IChipAdapter extends IBaseAdapter {
|
|
|
22
22
|
getChipSetState(): IChipState | null;
|
|
23
23
|
setDisabled(value: boolean): void;
|
|
24
24
|
setSelected(value: boolean): void;
|
|
25
|
+
setRemoveButtonLabel(value: string): void;
|
|
25
26
|
focusTrigger(options?: FocusOptions): void;
|
|
26
27
|
tryFocusRemoveButton(): void;
|
|
27
28
|
clickRemoveButton(): void;
|
|
@@ -47,6 +48,7 @@ export declare class ChipAdapter extends BaseAdapter<IChipComponent> implements
|
|
|
47
48
|
setCheckmarkVisibility(value: boolean): void;
|
|
48
49
|
setDisabled(value: boolean): void;
|
|
49
50
|
setSelected(value: boolean): void;
|
|
51
|
+
setRemoveButtonLabel(value: string): void;
|
|
50
52
|
toggleFieldVariant(value: boolean): void;
|
|
51
53
|
setDeleteButtonVisibility(value: boolean): void;
|
|
52
54
|
setStartSlotVisibility(value: boolean): void;
|
|
@@ -55,6 +57,7 @@ export declare class ChipAdapter extends BaseAdapter<IChipComponent> implements
|
|
|
55
57
|
tryFocusRemoveButton(): void;
|
|
56
58
|
clickRemoveButton(): void;
|
|
57
59
|
animateStateLayer(): void;
|
|
60
|
+
private _getDefaultRemoveButtonLabel;
|
|
58
61
|
private _createRemoveButton;
|
|
59
62
|
private _createAnchorElement;
|
|
60
63
|
private _createButtonElement;
|
|
@@ -104,6 +104,12 @@ export class ChipAdapter extends BaseAdapter {
|
|
|
104
104
|
}
|
|
105
105
|
toggleAttribute(this._triggerElement, value, 'aria-pressed', String(value));
|
|
106
106
|
}
|
|
107
|
+
setRemoveButtonLabel(value) {
|
|
108
|
+
if (this._removeButtonElement) {
|
|
109
|
+
const label = value?.trim() || this._getDefaultRemoveButtonLabel();
|
|
110
|
+
this._removeButtonElement.setAttribute('aria-label', label);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
107
113
|
toggleFieldVariant(value) {
|
|
108
114
|
if (value) {
|
|
109
115
|
if (!this._stateLayerElement.isConnected) {
|
|
@@ -160,17 +166,21 @@ export class ChipAdapter extends BaseAdapter {
|
|
|
160
166
|
animateStateLayer() {
|
|
161
167
|
this._stateLayerElement.playAnimation();
|
|
162
168
|
}
|
|
169
|
+
_getDefaultRemoveButtonLabel() {
|
|
170
|
+
return `Remove ${this._component.innerText}`;
|
|
171
|
+
}
|
|
163
172
|
_createRemoveButton() {
|
|
164
173
|
const buttonEl = document.createElement('forge-icon-button');
|
|
165
174
|
buttonEl.density = 'small';
|
|
166
175
|
buttonEl.id = 'remove-button';
|
|
167
176
|
buttonEl.classList.add('remove');
|
|
168
|
-
buttonEl.tabIndex = -1;
|
|
169
|
-
buttonEl.setAttribute('aria-label', `Remove ${this._component.innerText}`);
|
|
170
177
|
buttonEl.setAttribute('part', 'remove-button');
|
|
171
178
|
const iconEl = document.createElement('forge-icon');
|
|
172
179
|
iconEl.name = 'close';
|
|
173
180
|
buttonEl.appendChild(iconEl);
|
|
181
|
+
// Set initial aria-label, this will be updated by setRemoveButtonLabel if a custom label is provided
|
|
182
|
+
const label = this._component.removeButtonLabel?.trim() || this._getDefaultRemoveButtonLabel();
|
|
183
|
+
buttonEl.setAttribute('aria-label', label);
|
|
174
184
|
return buttonEl;
|
|
175
185
|
}
|
|
176
186
|
_createAnchorElement() {
|
|
@@ -18,6 +18,7 @@ export declare const CHIP_CONSTANTS: {
|
|
|
18
18
|
TARGET: string;
|
|
19
19
|
DOWNLOAD: string;
|
|
20
20
|
REL: string;
|
|
21
|
+
REMOVE_BUTTON_LABEL: string;
|
|
21
22
|
};
|
|
22
23
|
attributes: {
|
|
23
24
|
TYPE: string;
|
|
@@ -31,6 +32,7 @@ export declare const CHIP_CONSTANTS: {
|
|
|
31
32
|
TARGET: string;
|
|
32
33
|
DOWNLOAD: string;
|
|
33
34
|
REL: string;
|
|
35
|
+
REMOVE_BUTTON_LABEL: string;
|
|
34
36
|
};
|
|
35
37
|
selectors: {
|
|
36
38
|
ROOT: string;
|
|
@@ -17,6 +17,7 @@ export interface IChipCore {
|
|
|
17
17
|
target: string;
|
|
18
18
|
download: string;
|
|
19
19
|
rel: string;
|
|
20
|
+
removeButtonLabel: string;
|
|
20
21
|
focus(options?: FocusOptions): void;
|
|
21
22
|
focusRemoveButton(): void;
|
|
22
23
|
click(): void;
|
|
@@ -34,6 +35,7 @@ export declare class ChipCore implements IChipCore {
|
|
|
34
35
|
private _target;
|
|
35
36
|
private _download;
|
|
36
37
|
private _rel;
|
|
38
|
+
private _removeButtonLabel;
|
|
37
39
|
private _clickListener;
|
|
38
40
|
private _keydownListener;
|
|
39
41
|
constructor(_adapter: IChipAdapter);
|
|
@@ -75,4 +77,6 @@ export declare class ChipCore implements IChipCore {
|
|
|
75
77
|
set download(value: string);
|
|
76
78
|
get rel(): string;
|
|
77
79
|
set rel(value: string);
|
|
80
|
+
get removeButtonLabel(): string;
|
|
81
|
+
set removeButtonLabel(value: string);
|
|
78
82
|
}
|
|
@@ -287,4 +287,13 @@ export class ChipCore {
|
|
|
287
287
|
this._adapter.toggleHostAttribute(CHIP_CONSTANTS.attributes.REL, !!this._rel?.trim(), this._rel);
|
|
288
288
|
}
|
|
289
289
|
}
|
|
290
|
+
get removeButtonLabel() {
|
|
291
|
+
return this._removeButtonLabel;
|
|
292
|
+
}
|
|
293
|
+
set removeButtonLabel(value) {
|
|
294
|
+
if (this._removeButtonLabel !== value) {
|
|
295
|
+
this._removeButtonLabel = value;
|
|
296
|
+
this._adapter.setRemoveButtonLabel(this._removeButtonLabel);
|
|
297
|
+
}
|
|
298
|
+
}
|
|
290
299
|
}
|
package/esm/chips/chip/chip.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export interface IChipComponent extends IBaseComponent {
|
|
|
18
18
|
target: string;
|
|
19
19
|
download: string;
|
|
20
20
|
rel: string;
|
|
21
|
+
removeButtonLabel: string;
|
|
21
22
|
focusRemoveButton(): void;
|
|
22
23
|
}
|
|
23
24
|
declare global {
|
|
@@ -45,6 +46,7 @@ declare global {
|
|
|
45
46
|
* @property {string} target - The target of the chip.
|
|
46
47
|
* @property {string} download - The download of the chip.
|
|
47
48
|
* @property {string} rel - The rel of the chip.
|
|
49
|
+
* @property {string} removeButtonLabel - The custom aria-label for the remove button.
|
|
48
50
|
*
|
|
49
51
|
* @attribute {ChipType} type - The type of chip.
|
|
50
52
|
* @attribute {unknown} value - The value of the chip.
|
|
@@ -57,6 +59,7 @@ declare global {
|
|
|
57
59
|
* @attribute {string} target - The target of the chip.
|
|
58
60
|
* @attribute {string} download - The download of the chip.
|
|
59
61
|
* @attribute {string} rel - The rel of the chip.
|
|
62
|
+
* @attribute {string} remove-button-label - The custom aria-label for the remove button.
|
|
60
63
|
*
|
|
61
64
|
* @fires {CustomEvent<IChipDeleteEventData>} forge-chip-delete - Event fired when the chip is deleted.
|
|
62
65
|
* @fires {CustomEvent<IChipSelectEventData>} forge-chip-select - Event fired when the chip is selected.
|
|
@@ -145,4 +148,5 @@ export declare class ChipComponent extends BaseComponent implements IChipCompone
|
|
|
145
148
|
target: string;
|
|
146
149
|
download: string;
|
|
147
150
|
rel: string;
|
|
151
|
+
removeButtonLabel: string;
|
|
148
152
|
}
|
package/esm/chips/chip/chip.js
CHANGED
|
@@ -32,6 +32,7 @@ const styles = ':host{display:inline-flex}:host([hidden]){display:none}.forge-ch
|
|
|
32
32
|
* @property {string} target - The target of the chip.
|
|
33
33
|
* @property {string} download - The download of the chip.
|
|
34
34
|
* @property {string} rel - The rel of the chip.
|
|
35
|
+
* @property {string} removeButtonLabel - The custom aria-label for the remove button.
|
|
35
36
|
*
|
|
36
37
|
* @attribute {ChipType} type - The type of chip.
|
|
37
38
|
* @attribute {unknown} value - The value of the chip.
|
|
@@ -44,6 +45,7 @@ const styles = ':host{display:inline-flex}:host([hidden]){display:none}.forge-ch
|
|
|
44
45
|
* @attribute {string} target - The target of the chip.
|
|
45
46
|
* @attribute {string} download - The download of the chip.
|
|
46
47
|
* @attribute {string} rel - The rel of the chip.
|
|
48
|
+
* @attribute {string} remove-button-label - The custom aria-label for the remove button.
|
|
47
49
|
*
|
|
48
50
|
* @fires {CustomEvent<IChipDeleteEventData>} forge-chip-delete - Event fired when the chip is deleted.
|
|
49
51
|
* @fires {CustomEvent<IChipSelectEventData>} forge-chip-select - Event fired when the chip is selected.
|
|
@@ -160,6 +162,9 @@ let ChipComponent = class ChipComponent extends BaseComponent {
|
|
|
160
162
|
case CHIP_CONSTANTS.attributes.REL:
|
|
161
163
|
this.rel = newValue;
|
|
162
164
|
break;
|
|
165
|
+
case CHIP_CONSTANTS.attributes.REMOVE_BUTTON_LABEL:
|
|
166
|
+
this.removeButtonLabel = newValue;
|
|
167
|
+
break;
|
|
163
168
|
}
|
|
164
169
|
}
|
|
165
170
|
focus(options) {
|
|
@@ -205,6 +210,9 @@ __decorate([
|
|
|
205
210
|
__decorate([
|
|
206
211
|
coreProperty()
|
|
207
212
|
], ChipComponent.prototype, "rel", void 0);
|
|
213
|
+
__decorate([
|
|
214
|
+
coreProperty()
|
|
215
|
+
], ChipComponent.prototype, "removeButtonLabel", void 0);
|
|
208
216
|
ChipComponent = __decorate([
|
|
209
217
|
customElement({
|
|
210
218
|
name: CHIP_CONSTANTS.elementName,
|
|
@@ -21,7 +21,7 @@ declare global {
|
|
|
21
21
|
/**
|
|
22
22
|
* @tag forge-chip-set
|
|
23
23
|
*
|
|
24
|
-
* @summary
|
|
24
|
+
* @summary Chip sets are used to group multiple chips together and orchestrate their behavior.
|
|
25
25
|
*
|
|
26
26
|
* @property {boolean} [vertical=false] - Whether the chip set is vertical.
|
|
27
27
|
* @property {ChipType} [type='action'] - The type of chip.
|
|
@@ -14,7 +14,7 @@ const styles = ':host{display:inline-block}:host([hidden]){display:none}.forge-c
|
|
|
14
14
|
/**
|
|
15
15
|
* @tag forge-chip-set
|
|
16
16
|
*
|
|
17
|
-
* @summary
|
|
17
|
+
* @summary Chip sets are used to group multiple chips together and orchestrate their behavior.
|
|
18
18
|
*
|
|
19
19
|
* @property {boolean} [vertical=false] - Whether the chip set is vertical.
|
|
20
20
|
* @property {ChipType} [type='action'] - The type of chip.
|
|
@@ -22,8 +22,7 @@ declare const CircularProgressComponent_base: import("..").AbstractConstructor<i
|
|
|
22
22
|
/**
|
|
23
23
|
* @tag forge-circular-progress
|
|
24
24
|
*
|
|
25
|
-
* @summary
|
|
26
|
-
* Circular progress indicators display progress by animating along a circular track in a clockwise direction.
|
|
25
|
+
* @summary Circular progress indicators display progress by animating along a circular track in a clockwise direction. They can be used to represent both determinate and indeterminate progress.
|
|
27
26
|
*
|
|
28
27
|
* @description
|
|
29
28
|
* Progress indicators inform users about the status of ongoing processes.
|
|
@@ -16,8 +16,7 @@ const styles = ':host{--_circular-progress-size:var(--forge-circular-progress-si
|
|
|
16
16
|
/**
|
|
17
17
|
* @tag forge-circular-progress
|
|
18
18
|
*
|
|
19
|
-
* @summary
|
|
20
|
-
* Circular progress indicators display progress by animating along a circular track in a clockwise direction.
|
|
19
|
+
* @summary Circular progress indicators display progress by animating along a circular track in a clockwise direction. They can be used to represent both determinate and indeterminate progress.
|
|
21
20
|
*
|
|
22
21
|
* @description
|
|
23
22
|
* Progress indicators inform users about the status of ongoing processes.
|
|
@@ -22,7 +22,7 @@ declare global {
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
|
-
* @summary An interactive color selection component with support for multiple color formats (hex, RGB, HSV) and optional opacity control.
|
|
25
|
+
* @summary An interactive color selection component with support for multiple color formats (hex, RGB, HSV) and optional opacity control. Intended to be used either inline, or within a popover or dialog for selecting colors.
|
|
26
26
|
*
|
|
27
27
|
* @tag forge-color-picker
|
|
28
28
|
*
|
|
@@ -16,7 +16,7 @@ import { ColorPickerCore } from './color-picker-core';
|
|
|
16
16
|
const template = '<template><div class=\"forge-color-picker\" part=\"root\"><input type=\"color\" tabindex=\"-1\" class=\"forge-color-picker__input\" spellcheck=\"false\" autocomplete=\"off\" aria-label=\"Color picker value\" part=\"input\"><div class=\"forge-color-picker__container\" part=\"container\"><div class=\"forge-color-picker__gradient\" tabindex=\"0\" part=\"gradient\"><div class=\"forge-color-picker__gradient-color\" part=\"gradient-color\"></div><div class=\"forge-color-picker__gradient-thumb\" part=\"gradient-thumb\"></div></div><div class=\"forge-color-picker__control-preview\" part=\"controls-preview-container\"><div class=\"forge-color-picker__controls\" part=\"controls-container\"><div class=\"forge-color-picker__slider-control\" part=\"hue-control-container\"><div class=\"forge-color-picker__slider forge-color-picker__hue-slider\" part=\"hue-control-slider\"><div class=\"forge-color-picker__slider-thumb\" id=\"forge-color-picker-hue-thumb\" part=\"hue-control-slider-thumb\" tabindex=\"0\" role=\"slider\" aria-label=\"Change hue\" aria-valuemin=\"0\" aria-valuemax=\"360\" aria-valuenow=\"0\" aria-orientation=\"horizontal\" aria-valuetext=\"0\"></div></div></div><div class=\"forge-color-picker__slider-control\" part=\"opacity-control-container\"><div class=\"forge-color-picker__canvas\" part=\"opacity-control-canvas\"><div class=\"forge-color-picker__slider forge-color-picker__opacity-slider\" part=\"opacity-control-slider\"><div class=\"forge-color-picker__slider-thumb\" id=\"forge-color-picker-opacity-thumb\" part=\"opacity-control-slider-thumb\" tabindex=\"0\" role=\"slider\" aria-label=\"Change opacity\" aria-valuemin=\"0\" aria-valuemax=\"100\" aria-valuenow=\"0\" aria-orientation=\"horizontal\" aria-valuetext=\"0\"></div></div></div></div></div><div class=\"forge-color-picker__color-preview-container forge-color-picker__canvas\" part=\"color-preview-container\"><div class=\"forge-color-picker__color-preview\" part=\"color-preview\"></div></div></div><div class=\"forge-color-picker__value\" part=\"value-container\"><div class=\"forge-color-picker__color-types\" part=\"types-container\"><div class=\"forge-color-picker__color-hex\" part=\"hex-type-container\"><div part=\"hex-type-label-wrapper\"><label for=\"forge-color-picker-hex-input\" part=\"hex-label\">HEX</label></div><input type=\"text\" id=\"forge-color-picker-hex-input\" part=\"hex-input\" style=\"width: 88px\" maxlength=\"9\" spellcheck=\"false\" autocomplete=\"off\" aria-label=\"HEX value\"></div><div class=\"forge-color-picker__color-rgba\" part=\"rgba-type-container\"><div part=\"rgba-type-wrapper-r\"><label for=\"forge-color-picker-rgba-r-input\" part=\"rgba-type-label-r\">R</label> <input type=\"number\" id=\"forge-color-picker-rgba-r-input\" part=\"rgba-type-input-r\" min=\"0\" max=\"255\" maxlength=\"3\" autocomplete=\"off\" aria-label=\"Red\"></div><div part=\"rgba-type-wrapper-g\"><label for=\"forge-color-picker-rgba-g-input\" part=\"rgba-type-label-g\">G</label> <input type=\"number\" id=\"forge-color-picker-rgba-g-input\" part=\"rgba-type-input-g\" min=\"0\" max=\"255\" maxlength=\"3\" autocomplete=\"off\" aria-label=\"Green\"></div><div part=\"rgba-type-wrapper-b\"><label for=\"forge-color-picker-rgba-b-input\" part=\"rgba-type-label-b\">B</label> <input type=\"number\" id=\"forge-color-picker-rgba-b-input\" part=\"rgba-type-input-b\" min=\"0\" max=\"255\" maxlength=\"3\" autocomplete=\"off\" aria-label=\"Blue\"></div><div part=\"rgba-type-wrapper-a\"><label for=\"forge-color-picker-rgba-a-input\" part=\"rgba-type-label-a\">A</label> <input type=\"number\" id=\"forge-color-picker-rgba-a-input\" part=\"rgba-type-input-a\" min=\"0\" max=\"1\" step=\"0.1\" maxlength=\"3\" autocomplete=\"off\" aria-label=\"Alpha\"></div></div><div class=\"forge-color-picker__color-hsva\" part=\"hsva-type-container\"><div part=\"hsva-type-wrapper-h\"><label for=\"forge-color-picker-hsva-h-input\" part=\"hsva-type-label-h\">H</label> <input type=\"number\" id=\"forge-color-picker-hsva-h-input\" part=\"hsva-type-input-h\" min=\"0\" max=\"360\" maxlength=\"3\" autocomplete=\"off\" aria-label=\"Hue\"></div><div part=\"hsva-type-wrapper-s\"><label for=\"forge-color-picker-hsva-s-input\" part=\"hsva-type-label-s\">S</label> <input type=\"number\" id=\"forge-color-picker-hsva-s-input\" part=\"hsva-type-input-s\" min=\"0\" max=\"100\" maxlength=\"3\" autocomplete=\"off\" aria-label=\"Saturation\"></div><div part=\"hsva-type-wrapper-v\"><label for=\"forge-color-picker-hsva-v-input\" part=\"hsva-type-label-v\">V</label> <input type=\"number\" id=\"forge-color-picker-hsva-v-input\" part=\"hsva-type-input-v\" min=\"0\" max=\"100\" maxlength=\"3\" autocomplete=\"off\" aria-label=\"Value\"></div><div part=\"hsva-type-wrapper-a\"><label for=\"forge-color-picker-hsva-a-input\" part=\"hsva-type-label-a\">A</label> <input type=\"number\" id=\"forge-color-picker-hsva-a-input\" part=\"hsva-type-input-a\" min=\"0\" max=\"1\" step=\"0.1\" maxlength=\"3\" autocomplete=\"off\" aria-label=\"Alpha\"></div></div></div><div class=\"forge-color-picker__type-button\" part=\"type-container\"><forge-icon-button part=\"type-button\" id=\"forge-color-picker-type-button\" aria-labelledby=\"type-button-tooltip\" part=\"type-button-element\"><forge-icon name=\"unfold_more\" part=\"type-button-icon\"></forge-icon></forge-icon-button><forge-tooltip placement=\"bottom\" id=\"type-button-tooltip\">Change color format</forge-tooltip></div></div></div></div></template>';
|
|
17
17
|
const styles = '*{box-sizing:border-box}.forge-color-picker{width:var(--forge-color-picker-width,272px);position:relative;display:inline-block;overflow:hidden}.forge-color-picker__input{height:1px;opacity:0;position:absolute;width:1px}.forge-color-picker__gradient{position:relative;outline:0}.forge-color-picker__gradient-color{background:linear-gradient(to bottom,rgba(0,0,0,0) 0,#000 100%),linear-gradient(to right,#fff 0,rgba(255,255,255,0) 100%);height:152px}.forge-color-picker__gradient-thumb{border:1px solid #fff;border-radius:50%;cursor:pointer;display:inline-block;height:10px;width:10px;margin-left:-5px;margin-top:-5px;position:absolute;touch-action:none;user-select:none;transition:left .2s cubic-bezier(.25, .8, .25, 1) 0s,top .2s cubic-bezier(.25, .8, .25, 1) 0s}.forge-color-picker__control-preview{display:flex;align-items:center;width:100%;padding:16px}.forge-color-picker__controls{flex:1;margin-right:16px}.forge-color-picker__slider{position:relative}.forge-color-picker__slider-thumb{outline:0;height:16px;width:16px;background-color:#fff;box-shadow:0 1px 2px rgba(0,0,0,.3);position:absolute;border-radius:50%;top:calc(50% - 8px);margin-left:-8px;transition:left .4s cubic-bezier(.25, .8, .25, 1)}.forge-color-picker__slider-thumb--active{transition:none}.forge-color-picker__slider-thumb:hover{cursor:pointer}.forge-color-picker__color-preview-container{border-radius:50%;box-shadow:0 0 2px 0 rgba(0,0,0,.54) inset,0 0 2px 0 rgba(0,0,0,.54);overflow:hidden}.forge-color-picker__color-preview{height:32px;width:32px;transition:background-color .2s cubic-bezier(.25, .8, .25, 1)}.forge-color-picker__value{display:flex;width:100%;align-items:center;padding:0 8px 16px 16px;font-size:12px}.forge-color-picker__color-types{flex:1}.forge-color-picker__color-types label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label2-font-family, var(--forge-typography-font-family, \"Roboto\", sans-serif));font-size:var(--forge-typography-label2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .8125)));font-weight:var(--forge-typography-label2-font-weight,400);line-height:var(--forge-typography-label2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label2-letter-spacing, .0096153846em);text-transform:var(--forge-typography-label2-text-transform,inherit);text-decoration:var(--forge-typography-label2-text-decoration,inherit);color:var(--forge-theme-text-medium,rgba(0,0,0,.6))}.forge-color-picker__color-types input{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label2-font-family, var(--forge-typography-font-family, \"Roboto\", sans-serif));font-size:var(--forge-typography-label2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .8125)));font-weight:var(--forge-typography-label2-font-weight,400);line-height:var(--forge-typography-label2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label2-letter-spacing, .0096153846em);text-transform:var(--forge-typography-label2-text-transform,inherit);text-decoration:var(--forge-typography-label2-text-decoration,inherit)}.forge-color-picker__color-types input[type=number],.forge-color-picker__color-types input[type=text]{border-color:var(--forge-theme-outline,#e0e0e0);color:var(--forge-theme-on-surface,#000);background-color:transparent;padding:4px 8px;border-width:1px;border-style:solid;border-radius:4px;box-sizing:border-box;outline:0;transition-property:box-shadow,border-colo;transition-duration:var(--forge-animation-duration-short4, 200ms);transition-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1))}.forge-color-picker__color-types input[type=number]:hover,.forge-color-picker__color-types input[type=text]:hover{border-color:var(--forge-theme-text-high,rgba(0,0,0,.87))}.forge-color-picker__color-types input[type=number]:focus,.forge-color-picker__color-types input[type=text]:focus{border-color:var(--forge-theme-primary,#3f51b5);box-shadow:0 0 0 1px inset var(--forge-theme-primary,#3f51b5)}.forge-color-picker__color-types input[type=number]{text-align:center}.forge-color-picker__color-types input[type=number]::-webkit-inner-spin-button,.forge-color-picker__color-types input[type=number]::-webkit-outer-spin-button{appearance:none;margin:0}.forge-color-picker__color-types input[type=number]{-moz-appearance:textfield}.forge-color-picker__color-hex{display:flex;flex-direction:column;justify-content:center;align-items:space-between}.forge-color-picker__canvas{background-image:url(\"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iNnB4IiBoZWlnaHQ9IjZweCIgdmlld0JveD0iMCAwIDYgNiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KICAgIDwhLS0gR2VuZXJhdG9yOiBTa2V0Y2ggNTAgKDU0OTgzKSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT5Hcm91cCA5PC90aXRsZT4KICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPgogICAgPGRlZnM+PC9kZWZzPgogICAgPGcgaWQ9IlBhZ2UtMSIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPGcgaWQ9Ikdyb3VwLTkiPgogICAgICAgICAgICA8cmVjdCBpZD0iUmVjdGFuZ2xlLTExIiBmaWxsPSIjRTBFMEUwIiB4PSIwIiB5PSIwIiB3aWR0aD0iMyIgaGVpZ2h0PSIzIj48L3JlY3Q+CiAgICAgICAgICAgIDxyZWN0IGlkPSJSZWN0YW5nbGUtMTEtQ29weS0yIiBmaWxsPSIjRkZGRkZGIiB4PSIwIiB5PSIzIiB3aWR0aD0iMyIgaGVpZ2h0PSIzIj48L3JlY3Q+CiAgICAgICAgICAgIDxyZWN0IGlkPSJSZWN0YW5nbGUtMTEtQ29weSIgZmlsbD0iI0ZGRkZGRiIgeD0iMyIgeT0iMCIgd2lkdGg9IjMiIGhlaWdodD0iMyI+PC9yZWN0PgogICAgICAgICAgICA8cmVjdCBpZD0iUmVjdGFuZ2xlLTExLUNvcHktMyIgZmlsbD0iI0UwRTBFMCIgeD0iMyIgeT0iMyIgd2lkdGg9IjMiIGhlaWdodD0iMyI+PC9yZWN0PgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+\")}.forge-color-picker__hue-slider{height:8px;background:linear-gradient(to right,red 0,#ff0 16%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 84%,#ff0004 100%)}.forge-color-picker__opacity-slider{height:8px;margin-top:16px;background:linear-gradient(to right,rgba(255,0,0,0) 0,red 100%)}.forge-color-picker__color-hsva,.forge-color-picker__color-rgba{display:flex}.forge-color-picker__color-hsva div,.forge-color-picker__color-rgba div{margin-right:4px}.forge-color-picker__color-hsva label,.forge-color-picker__color-rgba label{display:block;text-align:center}.forge-color-picker__color-hsva input,.forge-color-picker__color-rgba input{width:44px}:host{display:inline-block}:host([hidden]){display:none}';
|
|
18
18
|
/**
|
|
19
|
-
* @summary An interactive color selection component with support for multiple color formats (hex, RGB, HSV) and optional opacity control.
|
|
19
|
+
* @summary An interactive color selection component with support for multiple color formats (hex, RGB, HSV) and optional opacity control. Intended to be used either inline, or within a popover or dialog for selecting colors.
|
|
20
20
|
*
|
|
21
21
|
* @tag forge-color-picker
|
|
22
22
|
*
|
|
@@ -19,7 +19,7 @@ declare global {
|
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
|
-
* @summary A date input component with an integrated calendar popup for selecting single dates
|
|
22
|
+
* @summary A date input component with an integrated calendar popup for selecting single dates.
|
|
23
23
|
*
|
|
24
24
|
* @tag forge-date-picker
|
|
25
25
|
*
|
|
@@ -18,7 +18,7 @@ import { DatePickerCore } from './date-picker-core';
|
|
|
18
18
|
const template = '<template><slot></slot></template>';
|
|
19
19
|
const styles = ':host{display:block}:host([hidden]){display:none}';
|
|
20
20
|
/**
|
|
21
|
-
* @summary A date input component with an integrated calendar popup for selecting single dates
|
|
21
|
+
* @summary A date input component with an integrated calendar popup for selecting single dates.
|
|
22
22
|
*
|
|
23
23
|
* @tag forge-date-picker
|
|
24
24
|
*
|