igniteui-webcomponents 6.3.0-beta.0 → 6.3.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/CHANGELOG.md +14 -0
- package/components/accordion/accordion.js +3 -4
- package/components/accordion/accordion.js.map +1 -1
- package/components/avatar/avatar.js +3 -4
- package/components/avatar/avatar.js.map +1 -1
- package/components/badge/badge.js +3 -4
- package/components/badge/badge.js.map +1 -1
- package/components/banner/banner.js +3 -4
- package/components/banner/banner.js.map +1 -1
- package/components/button/button-base.js +1 -1
- package/components/button/button-base.js.map +1 -1
- package/components/button/button.js +3 -4
- package/components/button/button.js.map +1 -1
- package/components/button/icon-button.js +3 -4
- package/components/button/icon-button.js.map +1 -1
- package/components/button-group/button-group.js +3 -4
- package/components/button-group/button-group.js.map +1 -1
- package/components/button-group/toggle-button.js +4 -3
- package/components/button-group/toggle-button.js.map +1 -1
- package/components/calendar/calendar.js +3 -4
- package/components/calendar/calendar.js.map +1 -1
- package/components/calendar/days-view/days-view.js +4 -3
- package/components/calendar/days-view/days-view.js.map +1 -1
- package/components/calendar/months-view/months-view.js +4 -3
- package/components/calendar/months-view/months-view.js.map +1 -1
- package/components/calendar/years-view/years-view.js +4 -3
- package/components/calendar/years-view/years-view.js.map +1 -1
- package/components/card/card.actions.js +3 -4
- package/components/card/card.actions.js.map +1 -1
- package/components/card/card.content.js +3 -4
- package/components/card/card.content.js.map +1 -1
- package/components/card/card.header.js +3 -4
- package/components/card/card.header.js.map +1 -1
- package/components/card/card.js +3 -4
- package/components/card/card.js.map +1 -1
- package/components/card/card.media.js +3 -4
- package/components/card/card.media.js.map +1 -1
- package/components/carousel/carousel-indicator-container.js +3 -4
- package/components/carousel/carousel-indicator-container.js.map +1 -1
- package/components/carousel/carousel-indicator.js +3 -4
- package/components/carousel/carousel-indicator.js.map +1 -1
- package/components/carousel/carousel-slide.js +3 -4
- package/components/carousel/carousel-slide.js.map +1 -1
- package/components/carousel/carousel.js +3 -4
- package/components/carousel/carousel.js.map +1 -1
- package/components/chat/chat-input.d.ts +8 -20
- package/components/chat/chat-input.js +78 -56
- package/components/chat/chat-input.js.map +1 -1
- package/components/chat/chat-message.d.ts +6 -21
- package/components/chat/chat-message.js +113 -71
- package/components/chat/chat-message.js.map +1 -1
- package/components/chat/chat-state.d.ts +45 -50
- package/components/chat/chat-state.js +82 -91
- package/components/chat/chat-state.js.map +1 -1
- package/components/chat/chat.d.ts +68 -24
- package/components/chat/chat.js +99 -96
- package/components/chat/chat.js.map +1 -1
- package/components/chat/extras/markdown-renderer.d.ts +6 -3
- package/components/chat/extras/markdown-renderer.js +19 -14
- package/components/chat/extras/markdown-renderer.js.map +1 -1
- package/components/chat/message-attachments.d.ts +5 -5
- package/components/chat/message-attachments.js +49 -43
- package/components/chat/message-attachments.js.map +1 -1
- package/components/chat/themes/chat.base.css.js +1 -1
- package/components/chat/themes/chat.base.css.js.map +1 -1
- package/components/chat/themes/dark/chat.bootstrap.css.js +1 -1
- package/components/chat/themes/dark/chat.bootstrap.css.js.map +1 -1
- package/components/chat/themes/dark/chat.fluent.css.js +1 -1
- package/components/chat/themes/dark/chat.fluent.css.js.map +1 -1
- package/components/chat/themes/dark/chat.indigo.css.js +1 -1
- package/components/chat/themes/dark/chat.indigo.css.js.map +1 -1
- package/components/chat/themes/dark/chat.material.css.js +1 -1
- package/components/chat/themes/dark/chat.material.css.js.map +1 -1
- package/components/chat/themes/input.base.css.js +1 -1
- package/components/chat/themes/input.base.css.js.map +1 -1
- package/components/chat/themes/light/chat.bootstrap.css.js +1 -1
- package/components/chat/themes/light/chat.bootstrap.css.js.map +1 -1
- package/components/chat/themes/light/chat.indigo.css.js +1 -1
- package/components/chat/themes/light/chat.indigo.css.js.map +1 -1
- package/components/chat/themes/light/chat.shared.css.js +1 -1
- package/components/chat/themes/light/chat.shared.css.js.map +1 -1
- package/components/chat/themes/message-attachments.base.css.js +1 -1
- package/components/chat/themes/message-attachments.base.css.js.map +1 -1
- package/components/chat/themes/message.base.css.js +1 -1
- package/components/chat/themes/message.base.css.js.map +1 -1
- package/components/chat/themes/shared/chat.bootstrap.css.js +1 -1
- package/components/chat/themes/shared/chat.bootstrap.css.js.map +1 -1
- package/components/chat/themes/shared/chat.fluent.css.js +1 -1
- package/components/chat/themes/shared/chat.fluent.css.js.map +1 -1
- package/components/chat/themes/shared/chat.indigo.css.js +1 -1
- package/components/chat/themes/shared/chat.indigo.css.js.map +1 -1
- package/components/chat/themes/shared/input/input.bootstrap.css.js +1 -1
- package/components/chat/themes/shared/input/input.bootstrap.css.js.map +1 -1
- package/components/chat/themes/shared/input/input.fluent.css.js +1 -1
- package/components/chat/themes/shared/input/input.fluent.css.js.map +1 -1
- package/components/chat/themes/shared/input/input.indigo.css.js +1 -1
- package/components/chat/themes/shared/input/input.indigo.css.js.map +1 -1
- package/components/chat/themes/shared/message-attachments/message-attachments.common.css.js +1 -1
- package/components/chat/themes/shared/message-attachments/message-attachments.common.css.js.map +1 -1
- package/components/chat/types.d.ts +173 -28
- package/components/chat/types.js.map +1 -1
- package/components/chat/utils.d.ts +3 -3
- package/components/chat/utils.js +7 -11
- package/components/chat/utils.js.map +1 -1
- package/components/checkbox/checkbox.js +3 -4
- package/components/checkbox/checkbox.js.map +1 -1
- package/components/checkbox/switch.js +3 -4
- package/components/checkbox/switch.js.map +1 -1
- package/components/checkbox/themes/checkbox.base.css.js +1 -1
- package/components/checkbox/themes/checkbox.base.css.js.map +1 -1
- package/components/checkbox/themes/switch.base.css.js +1 -1
- package/components/checkbox/themes/switch.base.css.js.map +1 -1
- package/components/chip/chip.js +3 -4
- package/components/chip/chip.js.map +1 -1
- package/components/combo/combo-header.js +3 -4
- package/components/combo/combo-header.js.map +1 -1
- package/components/combo/combo-item.js +3 -4
- package/components/combo/combo-item.js.map +1 -1
- package/components/combo/combo-list.js +2 -3
- package/components/combo/combo-list.js.map +1 -1
- package/components/combo/combo.js +4 -3
- package/components/combo/combo.js.map +1 -1
- package/components/common/controllers/focus-ring.js +5 -5
- package/components/common/controllers/focus-ring.js.map +1 -1
- package/components/common/controllers/key-bindings.js +4 -4
- package/components/common/controllers/key-bindings.js.map +1 -1
- package/components/common/i18n/chat.resources.d.ts +3 -0
- package/components/common/i18n/chat.resources.js +3 -0
- package/components/common/i18n/chat.resources.js.map +1 -1
- package/components/common/mixins/forms/associated.js +1 -1
- package/components/common/mixins/forms/associated.js.map +1 -1
- package/components/common/mixins/forms/form-value.js +1 -1
- package/components/common/mixins/forms/form-value.js.map +1 -1
- package/components/common/part-map.d.ts +1 -1
- package/components/common/util.d.ts +3 -0
- package/components/common/util.js +9 -1
- package/components/common/util.js.map +1 -1
- package/components/date-picker/date-picker.js +5 -4
- package/components/date-picker/date-picker.js.map +1 -1
- package/components/date-range-picker/date-range-picker.js +5 -4
- package/components/date-range-picker/date-range-picker.js.map +1 -1
- package/components/date-range-picker/predefined-ranges-area.js +3 -4
- package/components/date-range-picker/predefined-ranges-area.js.map +1 -1
- package/components/date-time-input/date-time-input.js +2 -3
- package/components/date-time-input/date-time-input.js.map +1 -1
- package/components/date-time-input/date-util.js +11 -11
- package/components/date-time-input/date-util.js.map +1 -1
- package/components/dialog/dialog.js +3 -4
- package/components/dialog/dialog.js.map +1 -1
- package/components/divider/divider.js +3 -4
- package/components/divider/divider.js.map +1 -1
- package/components/dropdown/dropdown-group.js +3 -4
- package/components/dropdown/dropdown-group.js.map +1 -1
- package/components/dropdown/dropdown-header.js +3 -4
- package/components/dropdown/dropdown-header.js.map +1 -1
- package/components/dropdown/dropdown-item.js +3 -4
- package/components/dropdown/dropdown-item.js.map +1 -1
- package/components/dropdown/dropdown.js +4 -3
- package/components/dropdown/dropdown.js.map +1 -1
- package/components/expansion-panel/expansion-panel.js +3 -4
- package/components/expansion-panel/expansion-panel.js.map +1 -1
- package/components/file-input/file-input.js +3 -4
- package/components/file-input/file-input.js.map +1 -1
- package/components/focus-trap/focus-trap.js +7 -8
- package/components/focus-trap/focus-trap.js.map +1 -1
- package/components/icon/icon-references.js +78 -0
- package/components/icon/icon-references.js.map +1 -1
- package/components/icon/icon-state.broadcast.js +1 -1
- package/components/icon/icon-state.broadcast.js.map +1 -1
- package/components/icon/icon.js +3 -4
- package/components/icon/icon.js.map +1 -1
- package/components/icon/internal-icons-lib.js +39 -0
- package/components/icon/internal-icons-lib.js.map +1 -1
- package/components/input/input-base.js +4 -3
- package/components/input/input-base.js.map +1 -1
- package/components/input/input.js +2 -3
- package/components/input/input.js.map +1 -1
- package/components/input/themes/shared/input.bootstrap.css.js +1 -1
- package/components/input/themes/shared/input.bootstrap.css.js.map +1 -1
- package/components/input/themes/shared/input.indigo.css.js +1 -1
- package/components/input/themes/shared/input.indigo.css.js.map +1 -1
- package/components/list/list-header.js +3 -4
- package/components/list/list-header.js.map +1 -1
- package/components/list/list-item.js +3 -4
- package/components/list/list-item.js.map +1 -1
- package/components/list/list.js +3 -4
- package/components/list/list.js.map +1 -1
- package/components/list/themes/header.js +2 -28
- package/components/list/themes/header.js.map +1 -1
- package/components/list/themes/item.js +6 -20
- package/components/list/themes/item.js.map +1 -1
- package/components/mask-input/mask-input.js +2 -3
- package/components/mask-input/mask-input.js.map +1 -1
- package/components/nav-drawer/nav-drawer-header-item.js +3 -4
- package/components/nav-drawer/nav-drawer-header-item.js.map +1 -1
- package/components/nav-drawer/nav-drawer-item.js +3 -4
- package/components/nav-drawer/nav-drawer-item.js.map +1 -1
- package/components/nav-drawer/nav-drawer.js +3 -4
- package/components/nav-drawer/nav-drawer.js.map +1 -1
- package/components/navbar/navbar.js +3 -4
- package/components/navbar/navbar.js.map +1 -1
- package/components/popover/popover.js +9 -10
- package/components/popover/popover.js.map +1 -1
- package/components/progress/circular-gradient.js +2 -3
- package/components/progress/circular-gradient.js.map +1 -1
- package/components/progress/circular-progress.js +3 -4
- package/components/progress/circular-progress.js.map +1 -1
- package/components/progress/linear-progress.js +3 -4
- package/components/progress/linear-progress.js.map +1 -1
- package/components/radio/radio.js +3 -4
- package/components/radio/radio.js.map +1 -1
- package/components/radio-group/radio-group.js +3 -4
- package/components/radio-group/radio-group.js.map +1 -1
- package/components/rating/rating-symbol.js +3 -4
- package/components/rating/rating-symbol.js.map +1 -1
- package/components/rating/rating.js +3 -4
- package/components/rating/rating.js.map +1 -1
- package/components/resize-container/resize-container.js +3 -4
- package/components/resize-container/resize-container.js.map +1 -1
- package/components/ripple/ripple.js +3 -4
- package/components/ripple/ripple.js.map +1 -1
- package/components/select/select-group.js +3 -4
- package/components/select/select-group.js.map +1 -1
- package/components/select/select-header.js +3 -4
- package/components/select/select-header.js.map +1 -1
- package/components/select/select-item.js +3 -4
- package/components/select/select-item.js.map +1 -1
- package/components/select/select.js +4 -3
- package/components/select/select.js.map +1 -1
- package/components/slider/range-slider.js +2 -3
- package/components/slider/range-slider.js.map +1 -1
- package/components/slider/slider-base.js +1 -1
- package/components/slider/slider-base.js.map +1 -1
- package/components/slider/slider-label.js +7 -8
- package/components/slider/slider-label.js.map +1 -1
- package/components/slider/slider.js +2 -3
- package/components/slider/slider.js.map +1 -1
- package/components/snackbar/snackbar.js +3 -4
- package/components/snackbar/snackbar.js.map +1 -1
- package/components/stepper/step.js +3 -4
- package/components/stepper/step.js.map +1 -1
- package/components/stepper/stepper.js +3 -4
- package/components/stepper/stepper.js.map +1 -1
- package/components/tabs/tab-dom.js +1 -1
- package/components/tabs/tab-dom.js.map +1 -1
- package/components/tabs/tab.js +4 -5
- package/components/tabs/tab.js.map +1 -1
- package/components/tabs/tabs.js +3 -4
- package/components/tabs/tabs.js.map +1 -1
- package/components/textarea/textarea.js +4 -3
- package/components/textarea/textarea.js.map +1 -1
- package/components/textarea/themes/shared/textarea.bootstrap.css.js +1 -1
- package/components/textarea/themes/shared/textarea.bootstrap.css.js.map +1 -1
- package/components/tile-manager/themes/tile-manager.base.css.js +1 -1
- package/components/tile-manager/themes/tile-manager.base.css.js.map +1 -1
- package/components/tile-manager/tile-manager.js +4 -3
- package/components/tile-manager/tile-manager.js.map +1 -1
- package/components/tile-manager/tile.js +3 -4
- package/components/tile-manager/tile.js.map +1 -1
- package/components/toast/toast.js +3 -4
- package/components/toast/toast.js.map +1 -1
- package/components/tooltip/controller.js +4 -4
- package/components/tooltip/controller.js.map +1 -1
- package/components/tooltip/tooltip.js +3 -4
- package/components/tooltip/tooltip.js.map +1 -1
- package/components/tree/tree-item.js +3 -4
- package/components/tree/tree-item.js.map +1 -1
- package/components/tree/tree.js +4 -3
- package/components/tree/tree.js.map +1 -1
- package/components/validation-container/validation-container.js +3 -4
- package/components/validation-container/validation-container.js.map +1 -1
- package/custom-elements.json +2142 -2029
- package/igniteui-webcomponents.css-data.json +1 -1
- package/igniteui-webcomponents.html-data.json +1 -1
- package/package.json +24 -2
- package/web-types.json +2 -2
- package/components/list/themes/dark/header/list-header.bootstrap.css.d.ts +0 -1
- package/components/list/themes/dark/header/list-header.bootstrap.css.js +0 -3
- package/components/list/themes/dark/header/list-header.bootstrap.css.js.map +0 -1
- package/components/list/themes/dark/header/list-header.fluent.css.d.ts +0 -1
- package/components/list/themes/dark/header/list-header.fluent.css.js +0 -3
- package/components/list/themes/dark/header/list-header.fluent.css.js.map +0 -1
- package/components/list/themes/dark/header/list-header.indigo.css.d.ts +0 -1
- package/components/list/themes/dark/header/list-header.indigo.css.js +0 -3
- package/components/list/themes/dark/header/list-header.indigo.css.js.map +0 -1
- package/components/list/themes/dark/header/list-header.material.css.d.ts +0 -1
- package/components/list/themes/dark/header/list-header.material.css.js +0 -3
- package/components/list/themes/dark/header/list-header.material.css.js.map +0 -1
- package/components/list/themes/dark/item/list-item.bootstrap.css.d.ts +0 -1
- package/components/list/themes/dark/item/list-item.bootstrap.css.js +0 -3
- package/components/list/themes/dark/item/list-item.bootstrap.css.js.map +0 -1
- package/components/list/themes/dark/item/list-item.fluent.css.d.ts +0 -1
- package/components/list/themes/dark/item/list-item.fluent.css.js +0 -3
- package/components/list/themes/dark/item/list-item.fluent.css.js.map +0 -1
- package/components/list/themes/dark/item/list-item.indigo.css.d.ts +0 -1
- package/components/list/themes/dark/item/list-item.indigo.css.js +0 -3
- package/components/list/themes/dark/item/list-item.indigo.css.js.map +0 -1
- package/components/list/themes/dark/item/list-item.material.css.d.ts +0 -1
- package/components/list/themes/dark/item/list-item.material.css.js +0 -3
- package/components/list/themes/dark/item/list-item.material.css.js.map +0 -1
- package/components/list/themes/light/header/list-header.bootstrap.css.d.ts +0 -1
- package/components/list/themes/light/header/list-header.bootstrap.css.js +0 -3
- package/components/list/themes/light/header/list-header.bootstrap.css.js.map +0 -1
- package/components/list/themes/light/header/list-header.fluent.css.d.ts +0 -1
- package/components/list/themes/light/header/list-header.fluent.css.js +0 -3
- package/components/list/themes/light/header/list-header.fluent.css.js.map +0 -1
- package/components/list/themes/light/header/list-header.indigo.css.d.ts +0 -1
- package/components/list/themes/light/header/list-header.indigo.css.js +0 -3
- package/components/list/themes/light/header/list-header.indigo.css.js.map +0 -1
- package/components/list/themes/light/header/list-header.material.css.d.ts +0 -1
- package/components/list/themes/light/header/list-header.material.css.js +0 -3
- package/components/list/themes/light/header/list-header.material.css.js.map +0 -1
- package/components/list/themes/light/item/list-item.bootstrap.css.d.ts +0 -1
- package/components/list/themes/light/item/list-item.bootstrap.css.js +0 -3
- package/components/list/themes/light/item/list-item.bootstrap.css.js.map +0 -1
- package/components/list/themes/light/item/list-item.fluent.css.d.ts +0 -1
- package/components/list/themes/light/item/list-item.fluent.css.js +0 -3
- package/components/list/themes/light/item/list-item.fluent.css.js.map +0 -1
- package/components/list/themes/light/item/list-item.indigo.css.d.ts +0 -1
- package/components/list/themes/light/item/list-item.indigo.css.js +0 -3
- package/components/list/themes/light/item/list-item.indigo.css.js.map +0 -1
- package/components/list/themes/light/item/list-item.material.css.d.ts +0 -1
- package/components/list/themes/light/item/list-item.material.css.js +0 -3
- package/components/list/themes/light/item/list-item.material.css.js.map +0 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type IgcChatComponent from './chat.js';
|
|
1
2
|
/**
|
|
2
3
|
* Represents a single chat message in the conversation.
|
|
3
4
|
*/
|
|
4
|
-
export interface
|
|
5
|
+
export interface IgcChatMessage {
|
|
5
6
|
/**
|
|
6
7
|
* A unique identifier for the message.
|
|
7
8
|
*/
|
|
@@ -17,12 +18,12 @@ export interface IgcMessage {
|
|
|
17
18
|
/**
|
|
18
19
|
* The timestamp indicating when the message was sent.
|
|
19
20
|
*/
|
|
20
|
-
timestamp
|
|
21
|
+
timestamp?: string;
|
|
21
22
|
/**
|
|
22
23
|
* Optional list of attachments associated with the message,
|
|
23
24
|
* such as images, files, or links.
|
|
24
25
|
*/
|
|
25
|
-
attachments?:
|
|
26
|
+
attachments?: IgcChatMessageAttachment[];
|
|
26
27
|
/**
|
|
27
28
|
* Optional list of reactions associated with the message.
|
|
28
29
|
*/
|
|
@@ -31,7 +32,7 @@ export interface IgcMessage {
|
|
|
31
32
|
/**
|
|
32
33
|
* Represents an attachment associated with a chat message.
|
|
33
34
|
*/
|
|
34
|
-
export interface
|
|
35
|
+
export interface IgcChatMessageAttachment {
|
|
35
36
|
/**
|
|
36
37
|
* A unique identifier for the attachment.
|
|
37
38
|
*/
|
|
@@ -105,33 +106,177 @@ export type IgcChatOptions = {
|
|
|
105
106
|
*
|
|
106
107
|
* Default is `"below-messages"`.
|
|
107
108
|
*/
|
|
108
|
-
suggestionsPosition?:
|
|
109
|
+
suggestionsPosition?: ChatSuggestionsPosition;
|
|
109
110
|
/**
|
|
110
111
|
* Time in milliseconds to wait before dispatching a stop typing event.
|
|
111
112
|
* Default is `3000`.
|
|
112
113
|
*/
|
|
113
114
|
stopTypingDelay?: number;
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
115
|
+
/**
|
|
116
|
+
* A boolean flag that, when `true`, enables a **quick and dirty workaround** for styling
|
|
117
|
+
* components rendered within the Shadow DOM, from custom message renderers, by allowing them
|
|
118
|
+
* to inherit styles from the document's root. This can be useful for developers who prefer not to handle
|
|
119
|
+
* Shadow DOM encapsulation, but it is **not the recommended approach**.
|
|
120
|
+
*
|
|
121
|
+
* It is highly advised to use standard Web Component styling methods first, in this order:
|
|
122
|
+
*
|
|
123
|
+
* 1. **CSS Variables and Parts API**: Use the exposed `::part` API with custom CSS variables to style
|
|
124
|
+
* your content in your custom renderers.
|
|
125
|
+
*
|
|
126
|
+
* 2. **`link` elements**: For larger style sheets, link them directly within the Shadow DOM to maintain
|
|
127
|
+
* encapsulation.
|
|
128
|
+
*
|
|
129
|
+
* 3. **Inline `<style>` tags**: Use these for small, self-contained styles within a template.
|
|
130
|
+
*
|
|
131
|
+
* This property should be used as a **last resort** as it can lead to **style leakage**, where
|
|
132
|
+
* global styles unexpectedly bleed into the component, breaking encapsulation and causing
|
|
133
|
+
* unpredictable visual issues.
|
|
134
|
+
*
|
|
135
|
+
* **WARNING**: This is a once time shot. Changing this property in runtime won't reflect
|
|
136
|
+
* its value.
|
|
137
|
+
*/
|
|
138
|
+
adoptRootStyles?: boolean;
|
|
139
|
+
/**
|
|
140
|
+
* An object containing a collection of custom renderers for different parts of the chat UI.
|
|
141
|
+
*/
|
|
142
|
+
renderers?: ChatRenderers;
|
|
132
143
|
};
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
144
|
+
/**
|
|
145
|
+
* Represents a user's reaction to a specific chat message.
|
|
146
|
+
*/
|
|
147
|
+
export interface IgcChatMessageReaction {
|
|
148
|
+
/**
|
|
149
|
+
* The chat message that the reaction is associated with.
|
|
150
|
+
*/
|
|
151
|
+
message: IgcChatMessage;
|
|
152
|
+
/**
|
|
153
|
+
* The string representation of the reaction, such as an emoji or a string;
|
|
154
|
+
*/
|
|
155
|
+
reaction: string;
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* A collection of optional rendering functions that allow for custom UI rendering.
|
|
159
|
+
* Each property is a function that takes a context object and returns a template result.
|
|
160
|
+
*/
|
|
161
|
+
export interface ChatRenderers {
|
|
162
|
+
/**
|
|
163
|
+
* Custom renderer for a single chat message attachment.
|
|
164
|
+
*/
|
|
165
|
+
attachment?: ChatTemplateRenderer<ChatAttachmentRenderContext>;
|
|
166
|
+
/**
|
|
167
|
+
* Custom renderer for the content of an attachment.
|
|
168
|
+
*/
|
|
169
|
+
attachmentContent?: ChatTemplateRenderer<ChatAttachmentRenderContext>;
|
|
170
|
+
/**
|
|
171
|
+
* Custom renderer for the header of an attachment.
|
|
172
|
+
*/
|
|
173
|
+
attachmentHeader?: ChatTemplateRenderer<ChatAttachmentRenderContext>;
|
|
174
|
+
/**
|
|
175
|
+
* Custom renderer for the file upload button in the input area.
|
|
176
|
+
*/
|
|
177
|
+
fileUploadButton?: ChatTemplateRenderer<ChatRenderContext>;
|
|
178
|
+
/**
|
|
179
|
+
* Custom renderer for the main chat input field.
|
|
180
|
+
*/
|
|
181
|
+
input?: ChatTemplateRenderer<ChatInputRenderContext>;
|
|
182
|
+
/**
|
|
183
|
+
* Custom renderer for the actions container within the input area.
|
|
184
|
+
*/
|
|
185
|
+
inputActions?: ChatTemplateRenderer<ChatRenderContext>;
|
|
186
|
+
/**
|
|
187
|
+
* Custom renderer for the actions at the end of the input area.
|
|
188
|
+
*/
|
|
189
|
+
inputActionsEnd?: ChatTemplateRenderer<ChatRenderContext>;
|
|
190
|
+
/**
|
|
191
|
+
* Custom renderer for the actions at the start of the input area.
|
|
192
|
+
*/
|
|
193
|
+
inputActionsStart?: ChatTemplateRenderer<ChatRenderContext>;
|
|
194
|
+
/**
|
|
195
|
+
* Custom renderer for the attachment previews within the input field.
|
|
196
|
+
*/
|
|
197
|
+
inputAttachments?: ChatTemplateRenderer<ChatInputRenderContext>;
|
|
198
|
+
/**
|
|
199
|
+
* Custom renderer for an entire chat message bubble.
|
|
200
|
+
*/
|
|
201
|
+
message?: ChatTemplateRenderer<ChatMessageRenderContext>;
|
|
202
|
+
/**
|
|
203
|
+
* Custom renderer for message-specific actions (e.g., reply or delete buttons).
|
|
204
|
+
*/
|
|
205
|
+
messageActions?: ChatTemplateRenderer<ChatMessageRenderContext>;
|
|
206
|
+
/**
|
|
207
|
+
* Custom renderer for the attachments associated with a message.
|
|
208
|
+
*/
|
|
209
|
+
messageAttachments?: ChatTemplateRenderer<ChatMessageRenderContext>;
|
|
210
|
+
/**
|
|
211
|
+
* Custom renderer for the main text and content of a message.
|
|
212
|
+
*/
|
|
213
|
+
messageContent?: ChatTemplateRenderer<ChatMessageRenderContext>;
|
|
214
|
+
/**
|
|
215
|
+
* Custom renderer for the header of a message, including sender and timestamp.
|
|
216
|
+
*/
|
|
217
|
+
messageHeader?: ChatTemplateRenderer<ChatMessageRenderContext>;
|
|
218
|
+
/**
|
|
219
|
+
* Custom renderer for the "is typing" indicator.
|
|
220
|
+
*/
|
|
221
|
+
typingIndicator?: ChatTemplateRenderer<ChatRenderContext>;
|
|
222
|
+
/**
|
|
223
|
+
* Custom renderer for the message send button.
|
|
224
|
+
*/
|
|
225
|
+
sendButton?: ChatTemplateRenderer<ChatRenderContext>;
|
|
226
|
+
/**
|
|
227
|
+
* Custom renderer for the prefix text shown before suggestions.
|
|
228
|
+
*/
|
|
229
|
+
suggestionPrefix?: ChatTemplateRenderer<ChatRenderContext>;
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* A generic type for a function that serves as a custom renderer.
|
|
233
|
+
* It takes a context object of type T and returns a template result.
|
|
234
|
+
*/
|
|
235
|
+
export type ChatTemplateRenderer<T> = (ctx: T) => unknown;
|
|
236
|
+
/**
|
|
237
|
+
* A string literal type defining the two possible positions for chat suggestions.
|
|
238
|
+
*/
|
|
239
|
+
export type ChatSuggestionsPosition = 'below-input' | 'below-messages';
|
|
240
|
+
/**
|
|
241
|
+
* The base context object passed to custom renderer functions, containing the chat component instance.
|
|
242
|
+
*/
|
|
243
|
+
export interface ChatRenderContext {
|
|
244
|
+
/**
|
|
245
|
+
* The instance of the IgcChatComponent.
|
|
246
|
+
*/
|
|
247
|
+
instance: IgcChatComponent;
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* The context object for renderers that deal with the chat input area.
|
|
251
|
+
* It extends the base context with input-specific properties.
|
|
252
|
+
*/
|
|
253
|
+
export interface ChatInputRenderContext extends ChatRenderContext {
|
|
254
|
+
/**
|
|
255
|
+
* The list of attachments currently in the input area.
|
|
256
|
+
*/
|
|
257
|
+
attachments: IgcChatMessageAttachment[];
|
|
258
|
+
/**
|
|
259
|
+
* The current value of the input field.
|
|
260
|
+
*/
|
|
261
|
+
value: string;
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* The context object for renderers that deal with a specific chat message.
|
|
265
|
+
* It extends the base context with the message data.
|
|
266
|
+
*/
|
|
267
|
+
export interface ChatMessageRenderContext extends ChatRenderContext {
|
|
268
|
+
/**
|
|
269
|
+
* The specific chat message being rendered.
|
|
270
|
+
*/
|
|
271
|
+
message: IgcChatMessage;
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* The context object for renderers that deal with a specific attachment within a message.
|
|
275
|
+
* It extends the message context with the attachment data.
|
|
276
|
+
*/
|
|
277
|
+
export interface ChatAttachmentRenderContext extends ChatMessageRenderContext {
|
|
278
|
+
/**
|
|
279
|
+
* The specific attachment being rendered.
|
|
280
|
+
*/
|
|
281
|
+
attachment: IgcChatMessageAttachment;
|
|
282
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/chat/types.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Represents a single chat message in the conversation.\n */\nexport interface
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/chat/types.ts"],"names":[],"mappings":"","sourcesContent":["import type IgcChatComponent from './chat.js';\n\n/**\n * Represents a single chat message in the conversation.\n */\nexport interface IgcChatMessage {\n /**\n * A unique identifier for the message.\n */\n id: string;\n\n /**\n * The textual content of the message.\n */\n text: string;\n\n /**\n * The identifier or name of the sender of the message.\n */\n sender: string;\n\n /**\n * The timestamp indicating when the message was sent.\n */\n timestamp?: string;\n\n /**\n * Optional list of attachments associated with the message,\n * such as images, files, or links.\n */\n attachments?: IgcChatMessageAttachment[];\n\n /**\n * Optional list of reactions associated with the message.\n */\n reactions?: string[];\n}\n\n/**\n * Represents an attachment associated with a chat message.\n */\nexport interface IgcChatMessageAttachment {\n /**\n * A unique identifier for the attachment.\n */\n id: string;\n\n /**\n * The display name of the attachment (e.g. file name).\n */\n name: string;\n\n /**\n * The URL from which the attachment can be downloaded or viewed.\n * Typically used for attachments stored on a server or CDN.\n */\n url?: string;\n\n /**\n * The actual File object, if the attachment was provided locally (e.g. via upload).\n */\n file?: File;\n\n /**\n * The MIME type or a custom type identifier for the attachment (e.g. \"image/png\", \"pdf\", \"audio\").\n */\n type?: string;\n\n /**\n * Optional URL to a thumbnail preview of the attachment (e.g. for images or videos).\n */\n thumbnail?: string;\n}\n\n/**\n * Configuration options for customizing the behavior and appearance of the chat component.\n */\nexport type IgcChatOptions = {\n /**\n * The ID of the current user. Used to differentiate between incoming and outgoing messages.\n */\n currentUserId?: string;\n /**\n * If `true`, prevents the chat from automatically scrolling to the latest message.\n */\n disableAutoScroll?: boolean;\n /**\n * If `true`, disables the ability to upload and send attachments.\n * Defaults to `false`.\n */\n disableInputAttachments?: boolean;\n /**\n * Indicates whether the other user is currently typing a message.\n */\n isTyping?: boolean;\n /**\n * The accepted files that could be attached.\n * Defines the file types as a list of comma-separated values (e.g. \"image/*,.pdf\") that the file input should accept.\n */\n acceptedFiles?: string;\n /**\n * Optional header text to display at the top of the chat component.\n */\n headerText?: string;\n /**\n * Optional placeholder text for the chat input area.\n * Provides a hint to the user about what they can type (e.g. \"Type a message...\").\n */\n inputPlaceholder?: string;\n /**\n * Suggested text snippets or quick replies that can be shown as user-selectable options.\n */\n suggestions?: string[];\n /**\n * Controls the position of the chat suggestions within the component layout.\n *\n * - `\"below-input\"`: Renders suggestions below the chat input area.\n * - `\"below-messages\"`: Renders suggestions below the chat messages area.\n *\n * Default is `\"below-messages\"`.\n */\n suggestionsPosition?: ChatSuggestionsPosition;\n /**\n * Time in milliseconds to wait before dispatching a stop typing event.\n * Default is `3000`.\n */\n stopTypingDelay?: number;\n\n /**\n * A boolean flag that, when `true`, enables a **quick and dirty workaround** for styling\n * components rendered within the Shadow DOM, from custom message renderers, by allowing them\n * to inherit styles from the document's root. This can be useful for developers who prefer not to handle\n * Shadow DOM encapsulation, but it is **not the recommended approach**.\n *\n * It is highly advised to use standard Web Component styling methods first, in this order:\n *\n * 1. **CSS Variables and Parts API**: Use the exposed `::part` API with custom CSS variables to style\n * your content in your custom renderers.\n *\n * 2. **`link` elements**: For larger style sheets, link them directly within the Shadow DOM to maintain\n * encapsulation.\n *\n * 3. **Inline `<style>` tags**: Use these for small, self-contained styles within a template.\n *\n * This property should be used as a **last resort** as it can lead to **style leakage**, where\n * global styles unexpectedly bleed into the component, breaking encapsulation and causing\n * unpredictable visual issues.\n *\n * **WARNING**: This is a once time shot. Changing this property in runtime won't reflect\n * its value.\n */\n adoptRootStyles?: boolean;\n\n /**\n * An object containing a collection of custom renderers for different parts of the chat UI.\n */\n renderers?: ChatRenderers;\n};\n\n/**\n * Represents a user's reaction to a specific chat message.\n */\nexport interface IgcChatMessageReaction {\n /**\n * The chat message that the reaction is associated with.\n */\n message: IgcChatMessage;\n /**\n * The string representation of the reaction, such as an emoji or a string;\n */\n reaction: string;\n}\n\n/**\n * A collection of optional rendering functions that allow for custom UI rendering.\n * Each property is a function that takes a context object and returns a template result.\n */\nexport interface ChatRenderers {\n /**\n * Custom renderer for a single chat message attachment.\n */\n attachment?: ChatTemplateRenderer<ChatAttachmentRenderContext>;\n /**\n * Custom renderer for the content of an attachment.\n */\n attachmentContent?: ChatTemplateRenderer<ChatAttachmentRenderContext>;\n /**\n * Custom renderer for the header of an attachment.\n */\n attachmentHeader?: ChatTemplateRenderer<ChatAttachmentRenderContext>;\n /**\n * Custom renderer for the file upload button in the input area.\n */\n fileUploadButton?: ChatTemplateRenderer<ChatRenderContext>;\n /**\n * Custom renderer for the main chat input field.\n */\n input?: ChatTemplateRenderer<ChatInputRenderContext>;\n /**\n * Custom renderer for the actions container within the input area.\n */\n inputActions?: ChatTemplateRenderer<ChatRenderContext>;\n /**\n * Custom renderer for the actions at the end of the input area.\n */\n inputActionsEnd?: ChatTemplateRenderer<ChatRenderContext>;\n /**\n * Custom renderer for the actions at the start of the input area.\n */\n inputActionsStart?: ChatTemplateRenderer<ChatRenderContext>;\n /**\n * Custom renderer for the attachment previews within the input field.\n */\n inputAttachments?: ChatTemplateRenderer<ChatInputRenderContext>;\n /**\n * Custom renderer for an entire chat message bubble.\n */\n message?: ChatTemplateRenderer<ChatMessageRenderContext>;\n /**\n * Custom renderer for message-specific actions (e.g., reply or delete buttons).\n */\n messageActions?: ChatTemplateRenderer<ChatMessageRenderContext>;\n /**\n * Custom renderer for the attachments associated with a message.\n */\n messageAttachments?: ChatTemplateRenderer<ChatMessageRenderContext>;\n /**\n * Custom renderer for the main text and content of a message.\n */\n messageContent?: ChatTemplateRenderer<ChatMessageRenderContext>;\n /**\n * Custom renderer for the header of a message, including sender and timestamp.\n */\n messageHeader?: ChatTemplateRenderer<ChatMessageRenderContext>;\n /**\n * Custom renderer for the \"is typing\" indicator.\n */\n typingIndicator?: ChatTemplateRenderer<ChatRenderContext>;\n /**\n * Custom renderer for the message send button.\n */\n sendButton?: ChatTemplateRenderer<ChatRenderContext>;\n /**\n * Custom renderer for the prefix text shown before suggestions.\n */\n suggestionPrefix?: ChatTemplateRenderer<ChatRenderContext>;\n}\n\n/**\n * A generic type for a function that serves as a custom renderer.\n * It takes a context object of type T and returns a template result.\n */\nexport type ChatTemplateRenderer<T> = (ctx: T) => unknown;\n\n/**\n * A string literal type defining the two possible positions for chat suggestions.\n */\nexport type ChatSuggestionsPosition = 'below-input' | 'below-messages';\n\n/**\n * The base context object passed to custom renderer functions, containing the chat component instance.\n */\nexport interface ChatRenderContext {\n /**\n * The instance of the IgcChatComponent.\n */\n instance: IgcChatComponent;\n}\n\n/**\n * The context object for renderers that deal with the chat input area.\n * It extends the base context with input-specific properties.\n */\nexport interface ChatInputRenderContext extends ChatRenderContext {\n /**\n * The list of attachments currently in the input area.\n */\n attachments: IgcChatMessageAttachment[];\n /**\n * The current value of the input field.\n */\n value: string;\n}\n\n/**\n * The context object for renderers that deal with a specific chat message.\n * It extends the base context with the message data.\n */\nexport interface ChatMessageRenderContext extends ChatRenderContext {\n /**\n * The specific chat message being rendered.\n */\n message: IgcChatMessage;\n}\n\n/**\n * The context object for renderers that deal with a specific attachment within a message.\n * It extends the message context with the attachment data.\n */\nexport interface ChatAttachmentRenderContext extends ChatMessageRenderContext {\n /**\n * The specific attachment being rendered.\n */\n attachment: IgcChatMessageAttachment;\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type IgcChatMessageComponent from './chat-message.js';
|
|
2
|
-
import type {
|
|
2
|
+
import type { IgcChatMessageAttachment } from './types.js';
|
|
3
3
|
export type ChatAcceptedFileTypes = {
|
|
4
4
|
extensions: Set<string>;
|
|
5
5
|
mimeTypes: Set<string>;
|
|
@@ -10,7 +10,7 @@ export declare function parseAcceptedFileTypes(fileTypes: string): ChatAcceptedF
|
|
|
10
10
|
export declare function isAcceptedFileType(file: File, accepted: ChatAcceptedFileTypes | null): boolean;
|
|
11
11
|
export declare function getChatAcceptedFiles(event: DragEvent, accepted: ChatAcceptedFileTypes | null): File[];
|
|
12
12
|
export declare function getIconName(fileType?: string): "attach_document" | "attach_image";
|
|
13
|
-
export declare function createAttachmentURL(attachment:
|
|
13
|
+
export declare function createAttachmentURL(attachment: IgcChatMessageAttachment): string;
|
|
14
14
|
export declare function getFileExtension(name: string): string;
|
|
15
|
-
export declare function
|
|
15
|
+
export declare function isImageAttachment(attachment: IgcChatMessageAttachment | File): boolean;
|
|
16
16
|
export declare function chatMessageAdoptPageStyles(message: IgcChatMessageComponent): void;
|
package/components/chat/utils.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { adoptStyles } from 'lit';
|
|
2
2
|
import { last } from '../common/util.js';
|
|
3
|
-
import IgcTooltipComponent from '../tooltip/tooltip.js';
|
|
4
|
-
let actionsTooltip;
|
|
5
3
|
export const ChatFileTypeIcons = new Map(Object.entries({
|
|
6
4
|
css: 'file_css',
|
|
7
5
|
csv: 'file_csv',
|
|
@@ -43,7 +41,9 @@ export function isAcceptedFileType(file, accepted) {
|
|
|
43
41
|
wildcardTypes.has(fileBaseType));
|
|
44
42
|
}
|
|
45
43
|
export function getChatAcceptedFiles(event, accepted) {
|
|
46
|
-
return Array.from(event.dataTransfer?.
|
|
44
|
+
return Array.from(event.dataTransfer?.items ?? [])
|
|
45
|
+
.filter((item) => item.kind === 'file' && isAcceptedFileType(item.getAsFile(), accepted))
|
|
46
|
+
.map((item) => item.getAsFile());
|
|
47
47
|
}
|
|
48
48
|
export function getIconName(fileType) {
|
|
49
49
|
return fileType?.startsWith('image') ? 'attach_image' : 'attach_document';
|
|
@@ -58,15 +58,11 @@ export function getFileExtension(name) {
|
|
|
58
58
|
const parts = name.split('.');
|
|
59
59
|
return parts.length > 1 ? last(parts) : '';
|
|
60
60
|
}
|
|
61
|
-
export function
|
|
62
|
-
if (
|
|
63
|
-
|
|
64
|
-
actionsTooltip.hideTriggers = 'pointerleave,click,blur';
|
|
65
|
-
actionsTooltip.hideDelay = 100;
|
|
66
|
-
document.body.appendChild(actionsTooltip);
|
|
61
|
+
export function isImageAttachment(attachment) {
|
|
62
|
+
if (attachment instanceof File) {
|
|
63
|
+
return attachment.type.startsWith('image/');
|
|
67
64
|
}
|
|
68
|
-
|
|
69
|
-
actionsTooltip.show(target);
|
|
65
|
+
return Boolean(attachment.type === 'image' || attachment.file?.type.startsWith('image/'));
|
|
70
66
|
}
|
|
71
67
|
export function chatMessageAdoptPageStyles(message) {
|
|
72
68
|
const sheets = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/components/chat/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAmB,MAAM,KAAK,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/components/chat/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAmB,MAAM,KAAK,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAUzC,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,GAAG,CACtC,MAAM,CAAC,OAAO,CAAC;IACb,GAAG,EAAE,UAAU;IACf,GAAG,EAAE,UAAU;IACf,GAAG,EAAE,UAAU;IACf,IAAI,EAAE,UAAU;IAChB,GAAG,EAAE,UAAU;IACf,IAAI,EAAE,WAAW;IACjB,EAAE,EAAE,SAAS;IACb,IAAI,EAAE,WAAW;IACjB,GAAG,EAAE,UAAU;IACf,GAAG,EAAE,UAAU;IACf,GAAG,EAAE,UAAU;IACf,GAAG,EAAE,UAAU;IACf,GAAG,EAAE,WAAW;IAChB,GAAG,EAAE,UAAU;IACf,IAAI,EAAE,UAAU;IAChB,GAAG,EAAE,UAAU;IACf,GAAG,EAAE,UAAU;IACf,OAAO,EAAE,cAAc;CACxB,CAAC,CACH,CAAC;AAEF,MAAM,UAAU,sBAAsB,CACpC,SAAiB;IAEjB,MAAM,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,CAAC;IAC5E,OAAO;QACL,UAAU,EAAE,IAAI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C,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAC1E,CAAC;AACJ,CAAC;AAGD,MAAM,UAAU,0BAA0B,CACxC,OAAgC;IAEhC,MAAM,MAAM,GAAoB,EAAE,CAAC;IAEnC,KAAK,MAAM,KAAK,IAAI,QAAQ,CAAC,WAAW,EAAE,CAAC;QACzC,IAAI,CAAC;YACH,MAAM,WAAW,GAAG,IAAI,aAAa,EAAE,CAAC;YACxC,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC;gBAClC,WAAW,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACvC,CAAC;YACD,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAC3B,CAAC;QAAC,MAAM,CAAC,CAAA,CAAC;IACZ,CAAC;IAED,MAAM,IAAI,GAAG,OAAO,CAAC,WAAgC,CAAC;IACtD,WAAW,CAAC,OAAO,CAAC,UAAW,EAAE,CAAC,GAAG,IAAI,CAAC,aAAa,EAAE,GAAG,MAAM,CAAC,CAAC,CAAC;AACvE,CAAC","sourcesContent":["import { adoptStyles, type LitElement } from 'lit';\nimport { last } from '../common/util.js';\nimport type IgcChatMessageComponent from './chat-message.js';\nimport type { IgcChatMessageAttachment } from './types.js';\n\nexport type ChatAcceptedFileTypes = {\n extensions: Set<string>;\n mimeTypes: Set<string>;\n wildcardTypes: Set<string>;\n};\n\nexport const ChatFileTypeIcons = new Map(\n Object.entries({\n css: 'file_css',\n csv: 'file_csv',\n doc: 'file_doc',\n docx: 'file_doc',\n htm: 'file_htm',\n html: 'file_html',\n js: 'file_js',\n json: 'file_json',\n pdf: 'file_pdf',\n rtf: 'file_rtf',\n svg: 'file_svg',\n txt: 'file_txt',\n url: 'file_link',\n xls: 'file_xls',\n xlsx: 'file_xls',\n xml: 'file_xml',\n zip: 'file_zip',\n default: 'file_generic',\n })\n);\n\nexport function parseAcceptedFileTypes(\n fileTypes: string\n): ChatAcceptedFileTypes {\n const types = fileTypes.split(',').map((each) => each.trim().toLowerCase());\n return {\n extensions: new Set(types.filter((t) => t.startsWith('.'))),\n mimeTypes: new Set(\n types.filter((t) => !t.startsWith('.') && !t.endsWith('/*'))\n ),\n wildcardTypes: new Set(\n types.filter((t) => t.endsWith('/*')).map((t) => t.slice(0, -2))\n ),\n };\n}\n\nexport function isAcceptedFileType(\n file: File,\n accepted: ChatAcceptedFileTypes | null\n): boolean {\n if (!(accepted && file)) {\n return true;\n }\n\n const { extensions, mimeTypes, wildcardTypes } = accepted;\n const fileType = file.type.toLowerCase();\n const fileExtension = `.${last(file.name.split('.'))?.toLowerCase()}`;\n const [fileBaseType] = fileType.split('/');\n\n return (\n extensions.has(fileExtension) ||\n mimeTypes.has(fileType) ||\n wildcardTypes.has(fileBaseType)\n );\n}\n\nexport function getChatAcceptedFiles(\n event: DragEvent,\n accepted: ChatAcceptedFileTypes | null\n): File[] {\n return Array.from(event.dataTransfer?.items ?? [])\n .filter(\n (item) =>\n item.kind === 'file' && isAcceptedFileType(item.getAsFile()!, accepted)\n )\n .map((item) => item.getAsFile()!);\n}\n\nexport function getIconName(fileType?: string) {\n return fileType?.startsWith('image') ? 'attach_image' : 'attach_document';\n}\n\nexport function createAttachmentURL(\n attachment: IgcChatMessageAttachment\n): string {\n if (attachment.file) {\n return URL.createObjectURL(attachment.file);\n }\n\n return attachment.url || '';\n}\n\nexport function getFileExtension(name: string): string {\n const parts = name.split('.');\n return parts.length > 1 ? last(parts) : '';\n}\n\nexport function isImageAttachment(\n attachment: IgcChatMessageAttachment | File\n): boolean {\n if (attachment instanceof File) {\n return attachment.type.startsWith('image/');\n }\n\n return Boolean(\n attachment.type === 'image' || attachment.file?.type.startsWith('image/')\n );\n}\n\n// REVIEW: Maybe put that behind a configuration flag as this is nasty.\nexport function chatMessageAdoptPageStyles(\n message: IgcChatMessageComponent\n): void {\n const sheets: CSSStyleSheet[] = [];\n\n for (const sheet of document.styleSheets) {\n try {\n const constructed = new CSSStyleSheet();\n for (const rule of sheet.cssRules) {\n constructed.insertRule(rule.cssText);\n }\n sheets.push(constructed);\n } catch {}\n }\n\n const ctor = message.constructor as typeof LitElement;\n adoptStyles(message.shadowRoot!, [...ctor.elementStyles, ...sheets]);\n}\n"]}
|
|
@@ -17,7 +17,7 @@ import { styles } from './themes/checkbox.base.css.js';
|
|
|
17
17
|
import { all } from './themes/checkbox-themes.js';
|
|
18
18
|
import { styles as shared } from './themes/shared/checkbox/checkbox.common.css.js';
|
|
19
19
|
let nextId = 1;
|
|
20
|
-
class IgcCheckboxComponent extends IgcCheckboxBaseComponent {
|
|
20
|
+
export default class IgcCheckboxComponent extends IgcCheckboxBaseComponent {
|
|
21
21
|
constructor() {
|
|
22
22
|
super(...arguments);
|
|
23
23
|
this._themes = addThemingController(this, all);
|
|
@@ -25,6 +25,8 @@ class IgcCheckboxComponent extends IgcCheckboxBaseComponent {
|
|
|
25
25
|
this._labelId = `checkbox-label-${this._inputId}`;
|
|
26
26
|
this.indeterminate = false;
|
|
27
27
|
}
|
|
28
|
+
static { this.tagName = 'igc-checkbox'; }
|
|
29
|
+
static { this.styles = [styles, shared]; }
|
|
28
30
|
static register() {
|
|
29
31
|
registerComponent(IgcCheckboxComponent, IgcValidationContainerComponent);
|
|
30
32
|
}
|
|
@@ -99,9 +101,6 @@ class IgcCheckboxComponent extends IgcCheckboxBaseComponent {
|
|
|
99
101
|
`;
|
|
100
102
|
}
|
|
101
103
|
}
|
|
102
|
-
IgcCheckboxComponent.tagName = 'igc-checkbox';
|
|
103
|
-
IgcCheckboxComponent.styles = [styles, shared];
|
|
104
|
-
export default IgcCheckboxComponent;
|
|
105
104
|
__decorate([
|
|
106
105
|
property({ type: Boolean, reflect: true })
|
|
107
106
|
], IgcCheckboxComponent.prototype, "indeterminate", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.js","sourceRoot":"","sources":["../../../src/components/checkbox/checkbox.ts"],"names":[],"mappings":";;;;;;AA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AO,CAAC;QACZ,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAE7B,OAAO,IAAI,CAAA;;eAEA,OAAO,CAAC;YACb,IAAI,EAAE,IAAI;YACV,OAAO;YACP,OAAO,EAAE,IAAI,CAAC,iBAAiB,CAAC,OAAO;SACxC,CAAC;cACI,IAAI,CAAC,QAAQ;;;eAGZ,IAAI,CAAC,QAAQ;;iBAEX,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC;kBACnB,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC;sBACjB,IAAI,CAAC,QAAQ;sBACb,IAAI,CAAC,QAAQ;qBACd,IAAI,CAAC,OAAO,CAAC;2BACP,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC;4BACvB,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ;6BACtC,WAAW;mBACrB,IAAI,CAAC,YAAY;kBAClB,IAAI,CAAC,WAAW;;qBAEb,OAAO,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;uBACjC,OAAO,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;cAC9C,IAAI,CAAC,OAAO,CAAC,KAAK,KAAK,QAAQ;YAC/B,CAAC,CAAC,IAAI,CAAC,aAAa,EAAE;YACtB,CAAC,CAAC,IAAI,CAAC,eAAe,EAAE;;;;eAIvB,IAAI,CAAC,QAAQ;iBACX,OAAO,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;oBAC9B,IAAI,CAAC,UAAU;;;;QAI3B,IAAI,CAAC,yBAAyB,EAAE;KACnC,CAAC;IACJ,CAAC;;AA5EM;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;2DACd","sourcesContent":["import { html, nothing, type TemplateResult } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { live } from 'lit/directives/live.js';\nimport { addThemingController } from '../../theming/theming-controller.js';\nimport { registerComponent } from '../common/definitions/register.js';\nimport { partMap } from '../common/part-map.js';\nimport IgcValidationContainerComponent from '../validation-container/validation-container.js';\nimport { IgcCheckboxBaseComponent } from './checkbox-base.js';\nimport { styles } from './themes/checkbox.base.css.js';\nimport { all } from './themes/checkbox-themes.js';\nimport { styles as shared } from './themes/shared/checkbox/checkbox.common.css.js';\n\nlet nextId = 1;\n\n/**\n * A check box allowing single values to be selected/deselected.\n *\n * @element igc-checkbox\n *\n * @slot - The checkbox label.\n * @slot helper-text - Renders content below the input.\n * @slot value-missing - Renders content when the required validation fails.\n * @slot custom-error - Renders content when setCustomValidity(message) is set.\n * @slot invalid - Renders content when the component is in invalid state (validity.valid = false).\n *\n * @fires igcChange - Emitted when the control's checked state changes.\n *\n * @csspart base - The base wrapper of the checkbox.\n * @csspart control - The checkbox input element.\n * @csspart label - The checkbox label.\n * @csspart indicator - The checkbox indicator icon.\n */\nexport default class IgcCheckboxComponent extends IgcCheckboxBaseComponent {\n public static readonly tagName = 'igc-checkbox';\n protected static styles = [styles, shared];\n\n /* blazorSuppress */\n public static register(): void {\n registerComponent(IgcCheckboxComponent, IgcValidationContainerComponent);\n }\n\n private readonly _themes = addThemingController(this, all);\n\n private readonly _inputId = `checkbox-${nextId++}`;\n private readonly _labelId = `checkbox-label-${this._inputId}`;\n\n /**\n * Draws the checkbox in indeterminate state.\n * @attr\n */\n @property({ type: Boolean, reflect: true })\n public indeterminate = false;\n\n protected override _handleClick(event: PointerEvent): void {\n this.indeterminate = false;\n super._handleClick(event);\n }\n\n protected _renderValidatorContainer(): TemplateResult {\n return IgcValidationContainerComponent.create(this);\n }\n\n protected _renderStandard() {\n return html`\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M4.1,12.7 9,17.6 20.3,6.3\" />\n </svg>\n `;\n }\n\n protected _renderIndigo() {\n return html`\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <rect width=\"18\" height=\"4\" x=\"3\" y=\"10\" rx=\"1.85\" />\n <path\n d=\"M19.033 5a1.966 1.966 0 0 0-1.418.586l-8.479 8.577-2.753-2.77a1.971 1.971 0 0 0-2.8 0 1.998 1.998 0 0 0 0 2.822l4.155 4.196a1.955 1.955 0 0 0 2.8 0l9.879-9.99a1.998 1.998 0 0 0 0-2.821 1.966 1.966 0 0 0-1.384-.6Z\"\n />\n </svg>\n `;\n }\n\n protected override render() {\n const labelledBy = this.getAttribute('aria-labelledby');\n const describedBy = this._slots.hasAssignedElements('helper-text')\n ? 'helper-text'\n : nothing;\n const checked = this.checked;\n\n return html`\n <label\n part=${partMap({\n base: true,\n checked,\n focused: this._focusRingManager.focused,\n })}\n for=${this._inputId}\n >\n <input\n id=${this._inputId}\n type=\"checkbox\"\n name=${ifDefined(this.name)}\n value=${ifDefined(this.value)}\n ?required=${this.required}\n ?disabled=${this.disabled}\n .checked=${live(checked)}\n .indeterminate=${live(this.indeterminate)}\n aria-labelledby=${labelledBy ? labelledBy : this._labelId}\n aria-describedby=${describedBy}\n @click=${this._handleClick}\n @blur=${this._handleBlur}\n />\n <span part=${partMap({ control: true, checked })}>\n <span part=${partMap({ indicator: true, checked })}>\n ${this._themes.theme === 'indigo'\n ? this._renderIndigo()\n : this._renderStandard()}\n </span>\n </span>\n <span\n id=${this._labelId}\n part=${partMap({ label: true, checked })}\n ?hidden=${this._hideLabel}\n ><slot></slot>\n </span>\n </label>\n ${this._renderValidatorContainer()}\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-checkbox': IgcCheckboxComponent;\n }\n}\n"]}
|
|
@@ -9,7 +9,9 @@ import { styles as shared } from './themes/shared/switch/switch.common.css.js';
|
|
|
9
9
|
import { styles } from './themes/switch.base.css.js';
|
|
10
10
|
import { all } from './themes/switch-themes.js';
|
|
11
11
|
let nextId = 1;
|
|
12
|
-
class IgcSwitchComponent extends IgcCheckboxBaseComponent {
|
|
12
|
+
export default class IgcSwitchComponent extends IgcCheckboxBaseComponent {
|
|
13
|
+
static { this.tagName = 'igc-switch'; }
|
|
14
|
+
static { this.styles = [styles, shared]; }
|
|
13
15
|
static register() {
|
|
14
16
|
registerComponent(IgcSwitchComponent);
|
|
15
17
|
}
|
|
@@ -56,7 +58,4 @@ class IgcSwitchComponent extends IgcCheckboxBaseComponent {
|
|
|
56
58
|
`;
|
|
57
59
|
}
|
|
58
60
|
}
|
|
59
|
-
IgcSwitchComponent.tagName = 'igc-switch';
|
|
60
|
-
IgcSwitchComponent.styles = [styles, shared];
|
|
61
|
-
export default IgcSwitchComponent;
|
|
62
61
|
//# sourceMappingURL=switch.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch.js","sourceRoot":"","sources":["../../../src/components/checkbox/switch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,6CAA6C,CAAC;AAC/E,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAC;AAEhD,IAAI,MAAM,GAAG,CAAC,CAAC;AAgBf,
|
|
1
|
+
{"version":3,"file":"switch.js","sourceRoot":"","sources":["../../../src/components/checkbox/switch.ts"],"names":[],"mappings":"AAAA,OA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C,QAAQ;;eAE1D,IAAI,CAAC,QAAQ;;iBAEX,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC;kBACnB,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC;sBACjB,IAAI,CAAC,QAAQ;sBACb,IAAI,CAAC,QAAQ;qBACd,IAAI,CAAC,OAAO,CAAC;4BACN,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ;mBAChD,IAAI,CAAC,YAAY;kBAClB,IAAI,CAAC,WAAW;;;iBAGjB,OAAO,CAAC;YACb,OAAO,EAAE,IAAI;YACb,OAAO;YACP,OAAO,EAAE,IAAI,CAAC,iBAAiB,CAAC,OAAO;SACxC,CAAC;;uBAEW,OAAO,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;;;eAGzC,IAAI,CAAC,QAAQ;iBACX,OAAO,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;oBAC9B,IAAI,CAAC,UAAU;;;;;KAK9B,CAAC;IACJ,CAAC","sourcesContent":["import { html } from 'lit';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { live } from 'lit/directives/live.js';\nimport { addThemingController } from '../../theming/theming-controller.js';\nimport { registerComponent } from '../common/definitions/register.js';\nimport { partMap } from '../common/part-map.js';\nimport { IgcCheckboxBaseComponent } from './checkbox-base.js';\nimport { styles as shared } from './themes/shared/switch/switch.common.css.js';\nimport { styles } from './themes/switch.base.css.js';\nimport { all } from './themes/switch-themes.js';\n\nlet nextId = 1;\n\n/**\n * Similar to a checkbox, a switch controls the state of a single setting on or off.\n *\n * @element igc-switch\n *\n * @slot - The switch label.\n *\n * @fires igcChange - Emitted when the control's checked state changes.\n *\n * @csspart base - The base wrapper of the switch.\n * @csspart control - The switch input element.\n * @csspart thumb - The position indicator of the switch.\n * @csspart label - The switch label.\n */\nexport default class IgcSwitchComponent extends IgcCheckboxBaseComponent {\n public static readonly tagName = 'igc-switch';\n public static styles = [styles, shared];\n\n /* blazorSuppress */\n public static register(): void {\n registerComponent(IgcSwitchComponent);\n }\n\n private readonly _inputId = `switch-${nextId++}`;\n private readonly _labelId = `switch-label-${this._inputId}`;\n\n constructor() {\n super();\n addThemingController(this, all);\n }\n\n protected override render() {\n const labelledBy = this.getAttribute('aria-labelledby');\n const checked = this.checked;\n\n return html`\n <label part=${partMap({ base: true, checked })} for=${this._inputId}>\n <input\n id=${this._inputId}\n type=\"checkbox\"\n name=${ifDefined(this.name)}\n value=${ifDefined(this.value)}\n ?required=${this.required}\n ?disabled=${this.disabled}\n .checked=${live(checked)}\n aria-labelledby=${labelledBy ? labelledBy : this._labelId}\n @click=${this._handleClick}\n @blur=${this._handleBlur}\n />\n <span\n part=${partMap({\n control: true,\n checked,\n focused: this._focusRingManager.focused,\n })}\n >\n <span part=${partMap({ thumb: true, checked })}></span>\n </span>\n <span\n id=${this._labelId}\n part=${partMap({ label: true, checked })}\n ?hidden=${this._hideLabel}\n >\n <slot></slot>\n </span>\n </label>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-switch': IgcSwitchComponent;\n }\n}\n"]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
-
export const styles = css `:host{--is-large: clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-large, 3), 1);--is-medium: min( clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-medium, 2), 1), clamp(0, var(--ig-size-large, 3) - var(--component-size, 1), 1) );--is-small: clamp(0, var(--ig-size-medium) - var(--component-size, 1), 1);position:relative;box-sizing:border-box;scrollbar-width:var(--ig-scrollbar-size, var(--sb-size));scrollbar-color:var(--ig-scrollbar-thumb-background, var(--sb-thumb-bg-color)) var(--ig-scrollbar-track-background, var(--sb-track-bg-color))}:host ::-webkit-scrollbar{width:var(--ig-scrollbar-size, var(--sb-size));height:var(--ig-scrollbar-size, var(--sb-size));background:var(--ig-scrollbar-track-background, var(--sb-track-bg-color))}:host ::-webkit-scrollbar-thumb{background:var(--ig-scrollbar-thumb-background, var(--sb-thumb-bg-color))}:host *,:host *::before,:host *::after{box-sizing:border-box}:host([hidden]),[hidden]{display:none !important}:host{display:inline-flex;flex-direction:column;font-family:var(--ig-font-family)}input[type=checkbox]{position:absolute;width:1px;height:1px;margin:-1px;border:none;clip:rect(0, 0, 0, 0);outline:0;pointer-events:none;overflow:hidden;-webkit-appearance:none;-moz-appearance:none;appearance:none}[part~=control]{--size: 1.25rem;width:var(--size);height:var(--size);min-width:var(--size);position:relative;display:inline-flex;-webkit-user-select:none;-moz-user-select:none;user-select:none}[part~=control]::after{position:absolute;content:"";left:50%;top:50%;transform:translate(-50%, -50%);width:var(--size);height:var(--size);transition:all .15s ease-in}[part~=label]{display:inline-block;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;
|
|
2
|
+
export const styles = css `:host{--is-large: clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-large, 3), 1);--is-medium: min( clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-medium, 2), 1), clamp(0, var(--ig-size-large, 3) - var(--component-size, 1), 1) );--is-small: clamp(0, var(--ig-size-medium) - var(--component-size, 1), 1);position:relative;box-sizing:border-box;scrollbar-width:var(--ig-scrollbar-size, var(--sb-size));scrollbar-color:var(--ig-scrollbar-thumb-background, var(--sb-thumb-bg-color)) var(--ig-scrollbar-track-background, var(--sb-track-bg-color))}:host ::-webkit-scrollbar{width:var(--ig-scrollbar-size, var(--sb-size));height:var(--ig-scrollbar-size, var(--sb-size));background:var(--ig-scrollbar-track-background, var(--sb-track-bg-color))}:host ::-webkit-scrollbar-thumb{background:var(--ig-scrollbar-thumb-background, var(--sb-thumb-bg-color))}:host *,:host *::before,:host *::after{box-sizing:border-box}:host([hidden]),[hidden]{display:none !important}:host{display:inline-flex;flex-direction:column;font-family:var(--ig-font-family)}input[type=checkbox]{position:absolute;width:1px;height:1px;margin:-1px;border:none;clip:rect(0, 0, 0, 0);outline:0;pointer-events:none;overflow:hidden;-webkit-appearance:none;-moz-appearance:none;appearance:none}[part~=control]{--size: 1.25rem;width:var(--size);height:var(--size);min-width:var(--size);position:relative;display:inline-flex;-webkit-user-select:none;-moz-user-select:none;user-select:none}[part~=control]::after{position:absolute;content:"";left:50%;top:50%;transform:translate(-50%, -50%);width:var(--size);height:var(--size);transition:all .15s ease-in}[part~=label]{display:inline-block;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;overflow-wrap:break-all;transition:color .2s ease-in-out}[part~=base]{gap:.5rem}[part~=indicator]{--indicator-size: 1.125rem;display:flex;align-items:center;justify-content:center;position:absolute;inset:0;stroke-linecap:square;stroke-width:var(--mark-stroke, 3);stroke-dasharray:24;stroke-dashoffset:24;fill:none;opacity:0;z-index:1;transform-origin:center}[part~=indicator] svg{width:var(--indicator-size);height:var(--indicator-size)}label{display:flex;align-items:center;cursor:pointer;flex-flow:row nowrap}[part="indicator checked"]{transition:all .2s ease-out;stroke-dashoffset:0;opacity:1}:host([indeterminate]) [part~=indicator]{stroke-dashoffset:41;opacity:1;transform:rotate(45deg) scale(0.45) translateX(-0.25rem)}:host([indeterminate]) [part~=indicator] svg{width:100%;height:100%}:host([disabled]),:host(:disabled){-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:initial;pointer-events:none}:host([label-position=before]) [part~=label]{order:-1}`;
|
|
3
3
|
//# sourceMappingURL=checkbox.base.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.base.css.js","sourceRoot":"","sources":["../../../../src/components/checkbox/themes/checkbox.base.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,
|
|
1
|
+
{"version":3,"file":"checkbox.base.css.js","sourceRoot":"","sources":["../../../../src/components/checkbox/themes/checkbox.base.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,+pFAA+pF,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css`:host{--is-large: clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-large, 3), 1);--is-medium: min( clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-medium, 2), 1), clamp(0, var(--ig-size-large, 3) - var(--component-size, 1), 1) );--is-small: clamp(0, var(--ig-size-medium) - var(--component-size, 1), 1);position:relative;box-sizing:border-box;scrollbar-width:var(--ig-scrollbar-size, var(--sb-size));scrollbar-color:var(--ig-scrollbar-thumb-background, var(--sb-thumb-bg-color)) var(--ig-scrollbar-track-background, var(--sb-track-bg-color))}:host ::-webkit-scrollbar{width:var(--ig-scrollbar-size, var(--sb-size));height:var(--ig-scrollbar-size, var(--sb-size));background:var(--ig-scrollbar-track-background, var(--sb-track-bg-color))}:host ::-webkit-scrollbar-thumb{background:var(--ig-scrollbar-thumb-background, var(--sb-thumb-bg-color))}:host *,:host *::before,:host *::after{box-sizing:border-box}:host([hidden]),[hidden]{display:none !important}:host{display:inline-flex;flex-direction:column;font-family:var(--ig-font-family)}input[type=checkbox]{position:absolute;width:1px;height:1px;margin:-1px;border:none;clip:rect(0, 0, 0, 0);outline:0;pointer-events:none;overflow:hidden;-webkit-appearance:none;-moz-appearance:none;appearance:none}[part~=control]{--size: 1.25rem;width:var(--size);height:var(--size);min-width:var(--size);position:relative;display:inline-flex;-webkit-user-select:none;-moz-user-select:none;user-select:none}[part~=control]::after{position:absolute;content:\"\";left:50%;top:50%;transform:translate(-50%, -50%);width:var(--size);height:var(--size);transition:all .15s ease-in}[part~=label]{display:inline-block;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;overflow-wrap:break-all;transition:color .2s ease-in-out}[part~=base]{gap:.5rem}[part~=indicator]{--indicator-size: 1.125rem;display:flex;align-items:center;justify-content:center;position:absolute;inset:0;stroke-linecap:square;stroke-width:var(--mark-stroke, 3);stroke-dasharray:24;stroke-dashoffset:24;fill:none;opacity:0;z-index:1;transform-origin:center}[part~=indicator] svg{width:var(--indicator-size);height:var(--indicator-size)}label{display:flex;align-items:center;cursor:pointer;flex-flow:row nowrap}[part=\"indicator checked\"]{transition:all .2s ease-out;stroke-dashoffset:0;opacity:1}:host([indeterminate]) [part~=indicator]{stroke-dashoffset:41;opacity:1;transform:rotate(45deg) scale(0.45) translateX(-0.25rem)}:host([indeterminate]) [part~=indicator] svg{width:100%;height:100%}:host([disabled]),:host(:disabled){-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:initial;pointer-events:none}:host([label-position=before]) [part~=label]{order:-1}`;\n"]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
-
export const styles = css `:host{--is-large: clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-large, 3), 1);--is-medium: min( clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-medium, 2), 1), clamp(0, var(--ig-size-large, 3) - var(--component-size, 1), 1) );--is-small: clamp(0, var(--ig-size-medium) - var(--component-size, 1), 1);position:relative;box-sizing:border-box;scrollbar-width:var(--ig-scrollbar-size, var(--sb-size));scrollbar-color:var(--ig-scrollbar-thumb-background, var(--sb-thumb-bg-color)) var(--ig-scrollbar-track-background, var(--sb-track-bg-color))}:host ::-webkit-scrollbar{width:var(--ig-scrollbar-size, var(--sb-size));height:var(--ig-scrollbar-size, var(--sb-size));background:var(--ig-scrollbar-track-background, var(--sb-track-bg-color))}:host ::-webkit-scrollbar-thumb{background:var(--ig-scrollbar-thumb-background, var(--sb-thumb-bg-color))}:host *,:host *::before,:host *::after{box-sizing:border-box}:host([hidden]),[hidden]{display:none !important}:host{display:inline-flex;flex-direction:column;font-family:var(--ig-font-family)}input[type=checkbox]{position:absolute;width:1px;height:1px;margin:-1px;border:none;clip:rect(0, 0, 0, 0);outline:0;pointer-events:none;overflow:hidden;-webkit-appearance:none;-moz-appearance:none;appearance:none}[part~=base]{display:flex;flex-flow:row nowrap;align-items:center;cursor:pointer;gap:var(--label-gap)}[part~=control]{display:flex;flex-shrink:0;align-items:center;-webkit-user-select:none;-moz-user-select:none;user-select:none}[part~=thumb]{position:relative;animation-duration:.2s;animation-fill-mode:none}[part~=control],[part~=thumb]{transition:all .2s ease-in-out}[part~=thumb][part~=checked]{animation-duration:.2s;animation-fill-mode:forwards}[part~=label]{display:inline-block;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;
|
|
2
|
+
export const styles = css `:host{--is-large: clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-large, 3), 1);--is-medium: min( clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-medium, 2), 1), clamp(0, var(--ig-size-large, 3) - var(--component-size, 1), 1) );--is-small: clamp(0, var(--ig-size-medium) - var(--component-size, 1), 1);position:relative;box-sizing:border-box;scrollbar-width:var(--ig-scrollbar-size, var(--sb-size));scrollbar-color:var(--ig-scrollbar-thumb-background, var(--sb-thumb-bg-color)) var(--ig-scrollbar-track-background, var(--sb-track-bg-color))}:host ::-webkit-scrollbar{width:var(--ig-scrollbar-size, var(--sb-size));height:var(--ig-scrollbar-size, var(--sb-size));background:var(--ig-scrollbar-track-background, var(--sb-track-bg-color))}:host ::-webkit-scrollbar-thumb{background:var(--ig-scrollbar-thumb-background, var(--sb-thumb-bg-color))}:host *,:host *::before,:host *::after{box-sizing:border-box}:host([hidden]),[hidden]{display:none !important}:host{display:inline-flex;flex-direction:column;font-family:var(--ig-font-family)}input[type=checkbox]{position:absolute;width:1px;height:1px;margin:-1px;border:none;clip:rect(0, 0, 0, 0);outline:0;pointer-events:none;overflow:hidden;-webkit-appearance:none;-moz-appearance:none;appearance:none}[part~=base]{display:flex;flex-flow:row nowrap;align-items:center;cursor:pointer;gap:var(--label-gap)}[part~=control]{display:flex;flex-shrink:0;align-items:center;-webkit-user-select:none;-moz-user-select:none;user-select:none}[part~=thumb]{position:relative;animation-duration:.2s;animation-fill-mode:none}[part~=control],[part~=thumb]{transition:all .2s ease-in-out}[part~=thumb][part~=checked]{animation-duration:.2s;animation-fill-mode:forwards}[part~=label]{display:inline-block;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;overflow-wrap:break-word}:host([disabled]),:host(:disabled){-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none;cursor:initial}:host([label-position=before]) [part~=label]{order:-1}@keyframes thumb-on{from{margin-inline-start:var(--thumb-offset)}to{margin-inline-start:calc(var(--size) - var(--thumb-size))}}@keyframes thumb-off{from{margin-inline-start:calc(var(--size) - var(--thumb-size))}to{margin-inline-start:var(--thumb-offset)}}`;
|
|
3
3
|
//# sourceMappingURL=switch.base.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch.base.css.js","sourceRoot":"","sources":["../../../../src/components/checkbox/themes/switch.base.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,
|
|
1
|
+
{"version":3,"file":"switch.base.css.js","sourceRoot":"","sources":["../../../../src/components/checkbox/themes/switch.base.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,yvEAAyvE,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css`:host{--is-large: clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-large, 3), 1);--is-medium: min( clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-medium, 2), 1), clamp(0, var(--ig-size-large, 3) - var(--component-size, 1), 1) );--is-small: clamp(0, var(--ig-size-medium) - var(--component-size, 1), 1);position:relative;box-sizing:border-box;scrollbar-width:var(--ig-scrollbar-size, var(--sb-size));scrollbar-color:var(--ig-scrollbar-thumb-background, var(--sb-thumb-bg-color)) var(--ig-scrollbar-track-background, var(--sb-track-bg-color))}:host ::-webkit-scrollbar{width:var(--ig-scrollbar-size, var(--sb-size));height:var(--ig-scrollbar-size, var(--sb-size));background:var(--ig-scrollbar-track-background, var(--sb-track-bg-color))}:host ::-webkit-scrollbar-thumb{background:var(--ig-scrollbar-thumb-background, var(--sb-thumb-bg-color))}:host *,:host *::before,:host *::after{box-sizing:border-box}:host([hidden]),[hidden]{display:none !important}:host{display:inline-flex;flex-direction:column;font-family:var(--ig-font-family)}input[type=checkbox]{position:absolute;width:1px;height:1px;margin:-1px;border:none;clip:rect(0, 0, 0, 0);outline:0;pointer-events:none;overflow:hidden;-webkit-appearance:none;-moz-appearance:none;appearance:none}[part~=base]{display:flex;flex-flow:row nowrap;align-items:center;cursor:pointer;gap:var(--label-gap)}[part~=control]{display:flex;flex-shrink:0;align-items:center;-webkit-user-select:none;-moz-user-select:none;user-select:none}[part~=thumb]{position:relative;animation-duration:.2s;animation-fill-mode:none}[part~=control],[part~=thumb]{transition:all .2s ease-in-out}[part~=thumb][part~=checked]{animation-duration:.2s;animation-fill-mode:forwards}[part~=label]{display:inline-block;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;overflow-wrap:break-word}:host([disabled]),:host(:disabled){-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none;cursor:initial}:host([label-position=before]) [part~=label]{order:-1}@keyframes thumb-on{from{margin-inline-start:var(--thumb-offset)}to{margin-inline-start:calc(var(--size) - var(--thumb-size))}}@keyframes thumb-off{from{margin-inline-start:calc(var(--size) - var(--thumb-size))}to{margin-inline-start:var(--thumb-offset)}}`;\n"]}
|
package/components/chip/chip.js
CHANGED
|
@@ -16,7 +16,9 @@ import IgcIconComponent from '../icon/icon.js';
|
|
|
16
16
|
import { styles } from './themes/chip.base.css.js';
|
|
17
17
|
import { styles as shared } from './themes/shared/chip.common.css.js';
|
|
18
18
|
import { all } from './themes/themes.js';
|
|
19
|
-
class IgcChipComponent extends EventEmitterMixin(LitElement) {
|
|
19
|
+
export default class IgcChipComponent extends EventEmitterMixin(LitElement) {
|
|
20
|
+
static { this.tagName = 'igc-chip'; }
|
|
21
|
+
static { this.styles = [styles, shared]; }
|
|
20
22
|
static register() {
|
|
21
23
|
registerComponent(IgcChipComponent, IgcIconComponent);
|
|
22
24
|
}
|
|
@@ -108,9 +110,6 @@ class IgcChipComponent extends EventEmitterMixin(LitElement) {
|
|
|
108
110
|
`;
|
|
109
111
|
}
|
|
110
112
|
}
|
|
111
|
-
IgcChipComponent.tagName = 'igc-chip';
|
|
112
|
-
IgcChipComponent.styles = [styles, shared];
|
|
113
|
-
export default IgcChipComponent;
|
|
114
113
|
__decorate([
|
|
115
114
|
property({ type: Boolean, reflect: true })
|
|
116
115
|
], IgcChipComponent.prototype, "disabled", void 0);
|