@nectary/components 0.22.0 → 0.24.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/accordion/index.js +3 -6
- package/accordion-item/index.d.ts +1 -1
- package/accordion-item/index.js +4 -7
- package/alert/index.js +3 -5
- package/alert-button/index.js +3 -6
- package/alert-close/index.d.ts +1 -1
- package/alert-close/index.js +4 -7
- package/avatar/index.d.ts +1 -1
- package/avatar/index.js +4 -6
- package/avatar-badge/index.d.ts +1 -1
- package/avatar-badge/index.js +4 -6
- package/avatar-status/index.d.ts +1 -1
- package/avatar-status/index.js +4 -6
- package/button/index.js +3 -6
- package/card/index.js +3 -6
- package/card-button/index.js +3 -6
- package/card-container/index.js +3 -6
- package/card-link/index.d.ts +1 -1
- package/card-link/index.js +4 -7
- package/chat/index.js +3 -6
- package/chat-avatar/index.js +3 -6
- package/chat-block/index.js +3 -6
- package/chat-bubble/index.js +3 -6
- package/checkbox/index.js +3 -6
- package/dialog/index.d.ts +3 -4
- package/dialog/index.js +5 -8
- package/dropdown/index.js +4 -7
- package/dropdown-option/index.d.ts +2 -1
- package/dropdown-option/index.js +4 -6
- package/grid/index.js +3 -5
- package/grid-item/index.js +3 -5
- package/help-tooltip/index.d.ts +1 -1
- package/help-tooltip/index.js +4 -6
- package/icon-button/index.js +3 -6
- package/icons/access-time/index.d.ts +11 -0
- package/icons/access-time/index.js +4 -0
- package/icons/add-alert/index.js +4 -0
- package/icons/add-comment/index.d.ts +11 -0
- package/icons/add-comment/index.js +4 -0
- package/icons/alt-route/index.d.ts +11 -0
- package/icons/alt-route/index.js +4 -0
- package/icons/app-settings-alt/index.js +4 -0
- package/icons/apps/index.js +4 -0
- package/icons/arrow-back/index.js +4 -0
- package/icons/arrow-back-ios/index.js +4 -0
- package/icons/arrow-downward/index.js +4 -0
- package/icons/arrow-drop-down/index.js +4 -0
- package/icons/arrow-drop-down-circle/index.js +4 -0
- package/icons/arrow-drop-up/index.js +4 -0
- package/icons/arrow-forward/index.js +4 -0
- package/icons/arrow-forward-ios/index.js +4 -0
- package/icons/arrow-left/index.js +4 -0
- package/icons/arrow-right/index.js +4 -0
- package/icons/arrow-upward/index.js +4 -0
- package/icons/assignment/index.d.ts +11 -0
- package/icons/assignment/index.js +4 -0
- package/icons/attach-email/index.js +4 -0
- package/icons/attachment/index.js +4 -0
- package/icons/auto-delete/index.js +4 -0
- package/icons/campaign/index.js +4 -0
- package/icons/cancel/index.js +4 -0
- package/icons/chat/index.d.ts +11 -0
- package/icons/chat/index.js +4 -0
- package/icons/chat-bubble-outline/index.d.ts +11 -0
- package/icons/chat-bubble-outline/index.js +4 -0
- package/icons/check/index.js +4 -0
- package/icons/check-circle-outline/index.d.ts +11 -0
- package/icons/check-circle-outline/index.js +4 -0
- package/icons/chevron-left/index.js +4 -0
- package/icons/chevron-right/index.js +4 -0
- package/icons/close/index.js +4 -0
- package/icons/cloud/index.js +4 -0
- package/icons/cloud-circle/index.js +4 -0
- package/icons/cloud-done/index.js +4 -0
- package/icons/cloud-download/index.js +4 -0
- package/icons/cloud-off/index.js +4 -0
- package/icons/cloud-queue/index.js +4 -0
- package/icons/cloud-upload/index.js +4 -0
- package/icons/comment/index.d.ts +11 -0
- package/icons/comment/index.js +4 -0
- package/icons/create/index.d.ts +11 -0
- package/icons/create/index.js +4 -0
- package/{icon → icons}/create-icon-class.d.ts +1 -1
- package/{icon → icons}/create-icon-class.js +3 -5
- package/icons/create-new-folder/index.js +4 -0
- package/icons/done-all/index.d.ts +11 -0
- package/icons/done-all/index.js +4 -0
- package/icons/double-arrow/index.js +4 -0
- package/icons/download/index.js +4 -0
- package/icons/download-done/index.js +4 -0
- package/{icon → icons}/east/index.js +1 -1
- package/icons/error/index.js +4 -0
- package/icons/error-outline/index.js +4 -0
- package/icons/expand-less/index.js +4 -0
- package/icons/expand-more/index.js +4 -0
- package/icons/filter-list/index.js +4 -0
- package/icons/first-page/index.js +4 -0
- package/icons/folder/index.js +4 -0
- package/icons/folder-open/index.js +4 -0
- package/icons/folder-shared/index.js +4 -0
- package/icons/forum/index.d.ts +11 -0
- package/icons/forum/index.js +4 -0
- package/icons/fullscreen/index.js +4 -0
- package/icons/fullscreen-exit/index.js +4 -0
- package/icons/help-outline/index.js +4 -0
- package/icons/history/index.d.ts +11 -0
- package/icons/history/index.js +4 -0
- package/icons/home-work/index.js +4 -0
- package/icons/info-outline/index.d.ts +11 -0
- package/icons/info-outline/index.js +4 -0
- package/icons/insert-emoticon/index.d.ts +11 -0
- package/icons/insert-emoticon/index.js +4 -0
- package/icons/keyboard-arrow-down/index.js +4 -0
- package/icons/keyboard-arrow-left/index.js +4 -0
- package/icons/keyboard-arrow-right/index.js +4 -0
- package/icons/keyboard-arrow-up/index.js +4 -0
- package/icons/last-page/index.js +4 -0
- package/icons/legend-toggle/index.js +4 -0
- package/icons/local-offer/index.d.ts +11 -0
- package/icons/local-offer/index.js +4 -0
- package/icons/mark-chat-read/index.d.ts +11 -0
- package/icons/mark-chat-read/index.js +4 -0
- package/icons/mark-chat-unread/index.d.ts +11 -0
- package/icons/mark-chat-unread/index.js +4 -0
- package/icons/menu/index.js +4 -0
- package/icons/menu-open/index.js +4 -0
- package/icons/mic-none/index.d.ts +11 -0
- package/icons/mic-none/index.js +4 -0
- package/{icon → icons}/more-horiz/index.js +1 -1
- package/icons/more-time/index.d.ts +11 -0
- package/icons/more-time/index.js +4 -0
- package/{icon → icons}/more-vert/index.js +1 -1
- package/{icon → icons}/north/index.js +1 -1
- package/{icon → icons}/north-east/index.js +1 -1
- package/{icon → icons}/north-west/index.js +1 -1
- package/icons/notes/index.d.ts +11 -0
- package/icons/notes/index.js +4 -0
- package/icons/notification-important/index.js +4 -0
- package/icons/notifications-none/index.d.ts +11 -0
- package/icons/notifications-none/index.js +4 -0
- package/icons/open-in-new/index.js +4 -0
- package/icons/pause-circle-outline/index.d.ts +11 -0
- package/icons/pause-circle-outline/index.js +4 -0
- package/icons/payments/index.js +4 -0
- package/icons/play-circle-outline/index.d.ts +11 -0
- package/icons/play-circle-outline/index.js +4 -0
- package/icons/refresh/index.js +4 -0
- package/icons/reply/index.d.ts +11 -0
- package/icons/reply/index.js +4 -0
- package/icons/request-quote/index.js +4 -0
- package/icons/rule-folder/index.js +4 -0
- package/icons/search/index.js +4 -0
- package/icons/send/index.d.ts +11 -0
- package/icons/send/index.js +4 -0
- package/icons/settings/index.d.ts +11 -0
- package/icons/settings/index.js +4 -0
- package/icons/snippet-folder/index.js +4 -0
- package/{icon → icons}/south/index.js +1 -1
- package/{icon → icons}/south-east/index.js +1 -1
- package/{icon → icons}/south-west/index.js +1 -1
- package/icons/star/index.d.ts +11 -0
- package/icons/star/index.js +4 -0
- package/icons/star-outline/index.d.ts +11 -0
- package/icons/star-outline/index.js +4 -0
- package/icons/stop/index.d.ts +11 -0
- package/icons/stop/index.js +4 -0
- package/icons/subdirectory-arrow-left/index.js +4 -0
- package/icons/subdirectory-arrow-right/index.js +4 -0
- package/icons/swap-vert/index.d.ts +11 -0
- package/icons/swap-vert/index.js +4 -0
- package/icons/switch-left/index.d.ts +11 -0
- package/icons/switch-left/index.js +4 -0
- package/icons/switch-right/index.d.ts +11 -0
- package/icons/switch-right/index.js +4 -0
- package/icons/text-snippet/index.js +4 -0
- package/icons/topic/index.js +4 -0
- package/icons/types.js +1 -0
- package/icons/undo/index.d.ts +11 -0
- package/icons/undo/index.js +4 -0
- package/icons/unfold-less/index.js +4 -0
- package/icons/unfold-more/index.js +4 -0
- package/icons/update/index.d.ts +11 -0
- package/icons/update/index.js +4 -0
- package/icons/upload/index.js +4 -0
- package/icons/volume-off/index.d.ts +11 -0
- package/icons/volume-off/index.js +4 -0
- package/icons/volume-up/index.d.ts +11 -0
- package/icons/volume-up/index.js +4 -0
- package/icons/warning/index.js +4 -0
- package/icons/warning-amber/index.js +4 -0
- package/{icon → icons}/west/index.js +1 -1
- package/icons-branded/barchart-down/index.d.ts +11 -0
- package/{icon-branded → icons-branded}/barchart-down/index.js +2 -2
- package/icons-branded/barchart-up/index.d.ts +11 -0
- package/{icon-branded → icons-branded}/barchart-up/index.js +2 -2
- package/{icon-branded/contact → icons-branded/bell}/index.d.ts +2 -2
- package/icons-branded/bell/index.js +4 -0
- package/{icon-branded/multiple-channels → icons-branded/campaigns}/index.d.ts +2 -2
- package/{icon-branded → icons-branded}/campaigns/index.js +2 -2
- package/icons-branded/chatbot/index.d.ts +11 -0
- package/{icon-branded → icons-branded}/chatbot/index.js +2 -2
- package/icons-branded/contact/index.d.ts +11 -0
- package/{icon-branded → icons-branded}/contact/index.js +2 -2
- package/{icon-branded → icons-branded}/create-icon-class.d.ts +1 -1
- package/{icon-branded → icons-branded}/create-icon-class.js +4 -6
- package/{icon-branded/campaigns → icons-branded/home}/index.d.ts +2 -2
- package/{icon-branded → icons-branded}/home/index.js +2 -2
- package/icons-branded/multiple-channels/index.d.ts +11 -0
- package/{icon-branded → icons-branded}/multiple-channels/index.js +2 -2
- package/{icon-branded/chatbot → icons-branded/rocket}/index.d.ts +2 -2
- package/{icon-branded → icons-branded}/rocket/index.js +2 -2
- package/icons-branded/settings/index.d.ts +11 -0
- package/{icon-branded → icons-branded}/settings/index.js +2 -2
- package/{icon-branded/barchart-up → icons-branded/user}/index.d.ts +2 -2
- package/icons-branded/user/index.js +4 -0
- package/{icon-branded/barchart-down → icons-branded/users}/index.d.ts +2 -2
- package/{icon-branded → icons-branded}/users/index.js +2 -2
- package/icons-channel/apple-business-chat/index.d.ts +11 -0
- package/icons-channel/apple-business-chat/index.js +4 -0
- package/icons-channel/create-icon-class.d.ts +310 -0
- package/icons-channel/create-icon-class.js +51 -0
- package/icons-channel/facebook-messenger/index.d.ts +11 -0
- package/icons-channel/facebook-messenger/index.js +4 -0
- package/icons-channel/instagram/index.d.ts +11 -0
- package/icons-channel/instagram/index.js +4 -0
- package/icons-channel/line/index.d.ts +11 -0
- package/icons-channel/line/index.js +4 -0
- package/icons-channel/talk/index.d.ts +11 -0
- package/icons-channel/talk/index.js +4 -0
- package/icons-channel/telegram/index.d.ts +11 -0
- package/icons-channel/telegram/index.js +4 -0
- package/icons-channel/twitter/index.d.ts +11 -0
- package/icons-channel/twitter/index.js +4 -0
- package/icons-channel/types.d.ts +7 -0
- package/icons-channel/viber/index.d.ts +11 -0
- package/icons-channel/viber/index.js +4 -0
- package/icons-channel/wechat/index.d.ts +11 -0
- package/icons-channel/wechat/index.js +4 -0
- package/icons-channel/whatsapp/index.d.ts +11 -0
- package/icons-channel/whatsapp/index.js +4 -0
- package/illustration/create-illustration-class.d.ts +1 -1
- package/illustration/create-illustration-class.js +3 -5
- package/index.d.ts +140 -95
- package/index.js +140 -95
- package/input/index.js +3 -6
- package/link/index.d.ts +1 -1
- package/link/index.js +6 -27
- package/logo/create-logo-class.d.ts +1 -1
- package/logo/create-logo-class.js +3 -5
- package/package.json +1 -1
- package/pagination/index.d.ts +6 -3
- package/pagination/index.js +19 -8
- package/popover/index.js +3 -6
- package/radio/index.js +3 -6
- package/radio-option/index.js +3 -6
- package/search/index.d.ts +2 -2
- package/search/index.js +6 -9
- package/search-option/index.js +3 -5
- package/segment/index.js +3 -6
- package/segment-collapse/index.d.ts +2 -2
- package/segment-collapse/index.js +5 -7
- package/select/index.js +22 -8
- package/spinner/index.js +3 -5
- package/table/index.js +3 -5
- package/table-body/index.js +3 -5
- package/table-cell/index.js +3 -5
- package/table-head/index.js +3 -5
- package/table-head-cell/index.js +3 -5
- package/table-row/index.js +3 -5
- package/tabs/index.js +3 -6
- package/tabs-option/index.js +4 -7
- package/tag/index.d.ts +1 -1
- package/tag/index.js +4 -6
- package/tag-close/index.d.ts +1 -1
- package/tag-close/index.js +4 -7
- package/textarea/index.js +3 -6
- package/title/index.d.ts +1 -1
- package/title/index.js +4 -7
- package/toggle/index.js +3 -6
- package/tooltip/index.js +3 -5
- package/utils.d.ts +10 -3
- package/utils.js +22 -14
- package/icon/add-alert/index.js +0 -4
- package/icon/app-settings-alt/index.js +0 -4
- package/icon/apps/index.js +0 -4
- package/icon/arrow-back/index.js +0 -4
- package/icon/arrow-back-ios/index.js +0 -4
- package/icon/arrow-downward/index.js +0 -4
- package/icon/arrow-drop-down/index.js +0 -4
- package/icon/arrow-drop-down-circle/index.js +0 -4
- package/icon/arrow-drop-up/index.js +0 -4
- package/icon/arrow-forward/index.js +0 -4
- package/icon/arrow-forward-ios/index.js +0 -4
- package/icon/arrow-left/index.js +0 -4
- package/icon/arrow-right/index.js +0 -4
- package/icon/arrow-upward/index.js +0 -4
- package/icon/attach-email/index.js +0 -4
- package/icon/attachment/index.js +0 -4
- package/icon/auto-delete/index.js +0 -4
- package/icon/campaign/index.js +0 -4
- package/icon/cancel/index.js +0 -4
- package/icon/check/index.js +0 -4
- package/icon/chevron-left/index.js +0 -4
- package/icon/chevron-right/index.js +0 -4
- package/icon/close/index.js +0 -4
- package/icon/cloud/index.js +0 -4
- package/icon/cloud-circle/index.js +0 -4
- package/icon/cloud-done/index.js +0 -4
- package/icon/cloud-download/index.js +0 -4
- package/icon/cloud-off/index.js +0 -4
- package/icon/cloud-queue/index.js +0 -4
- package/icon/cloud-upload/index.js +0 -4
- package/icon/create-new-folder/index.js +0 -4
- package/icon/double-arrow/index.js +0 -4
- package/icon/download/index.js +0 -4
- package/icon/download-done/index.js +0 -4
- package/icon/error/index.js +0 -4
- package/icon/error-outline/index.js +0 -4
- package/icon/expand-less/index.js +0 -4
- package/icon/expand-more/index.js +0 -4
- package/icon/filter-list/index.js +0 -4
- package/icon/first-page/index.js +0 -4
- package/icon/folder/index.js +0 -4
- package/icon/folder-open/index.js +0 -4
- package/icon/folder-shared/index.js +0 -4
- package/icon/fullscreen/index.js +0 -4
- package/icon/fullscreen-exit/index.js +0 -4
- package/icon/help-outline/index.js +0 -4
- package/icon/home-work/index.js +0 -4
- package/icon/keyboard-arrow-down/index.js +0 -4
- package/icon/keyboard-arrow-left/index.js +0 -4
- package/icon/keyboard-arrow-right/index.js +0 -4
- package/icon/keyboard-arrow-up/index.js +0 -4
- package/icon/last-page/index.js +0 -4
- package/icon/legend-toggle/index.js +0 -4
- package/icon/menu/index.js +0 -4
- package/icon/menu-open/index.js +0 -4
- package/icon/notification-important/index.js +0 -4
- package/icon/open-in-new/index.js +0 -4
- package/icon/payments/index.js +0 -4
- package/icon/refresh/index.js +0 -4
- package/icon/request-quote/index.js +0 -4
- package/icon/rule-folder/index.js +0 -4
- package/icon/search/index.js +0 -4
- package/icon/snippet-folder/index.js +0 -4
- package/icon/subdirectory-arrow-left/index.js +0 -4
- package/icon/subdirectory-arrow-right/index.js +0 -4
- package/icon/switch-left/index.d.ts +0 -11
- package/icon/switch-left/index.js +0 -4
- package/icon/switch-right/index.d.ts +0 -11
- package/icon/switch-right/index.js +0 -4
- package/icon/text-snippet/index.js +0 -4
- package/icon/topic/index.js +0 -4
- package/icon/unfold-less/index.js +0 -4
- package/icon/unfold-more/index.js +0 -4
- package/icon/upload/index.js +0 -4
- package/icon/warning/index.js +0 -4
- package/icon/warning-amber/index.js +0 -4
- package/icon-branded/home/index.d.ts +0 -11
- package/icon-branded/rocket/index.d.ts +0 -11
- package/icon-branded/settings/index.d.ts +0 -11
- package/icon-branded/user/index.d.ts +0 -11
- package/icon-branded/user/index.js +0 -4
- package/icon-branded/users/index.d.ts +0 -11
- /package/{icon → icons}/add-alert/index.d.ts +0 -0
- /package/{icon → icons}/app-settings-alt/index.d.ts +0 -0
- /package/{icon → icons}/apps/index.d.ts +0 -0
- /package/{icon → icons}/arrow-back/index.d.ts +0 -0
- /package/{icon → icons}/arrow-back-ios/index.d.ts +0 -0
- /package/{icon → icons}/arrow-downward/index.d.ts +0 -0
- /package/{icon → icons}/arrow-drop-down/index.d.ts +0 -0
- /package/{icon → icons}/arrow-drop-down-circle/index.d.ts +0 -0
- /package/{icon → icons}/arrow-drop-up/index.d.ts +0 -0
- /package/{icon → icons}/arrow-forward/index.d.ts +0 -0
- /package/{icon → icons}/arrow-forward-ios/index.d.ts +0 -0
- /package/{icon → icons}/arrow-left/index.d.ts +0 -0
- /package/{icon → icons}/arrow-right/index.d.ts +0 -0
- /package/{icon → icons}/arrow-upward/index.d.ts +0 -0
- /package/{icon → icons}/attach-email/index.d.ts +0 -0
- /package/{icon → icons}/attachment/index.d.ts +0 -0
- /package/{icon → icons}/auto-delete/index.d.ts +0 -0
- /package/{icon → icons}/campaign/index.d.ts +0 -0
- /package/{icon → icons}/cancel/index.d.ts +0 -0
- /package/{icon → icons}/check/index.d.ts +0 -0
- /package/{icon → icons}/chevron-left/index.d.ts +0 -0
- /package/{icon → icons}/chevron-right/index.d.ts +0 -0
- /package/{icon → icons}/close/index.d.ts +0 -0
- /package/{icon → icons}/cloud/index.d.ts +0 -0
- /package/{icon → icons}/cloud-circle/index.d.ts +0 -0
- /package/{icon → icons}/cloud-done/index.d.ts +0 -0
- /package/{icon → icons}/cloud-download/index.d.ts +0 -0
- /package/{icon → icons}/cloud-off/index.d.ts +0 -0
- /package/{icon → icons}/cloud-queue/index.d.ts +0 -0
- /package/{icon → icons}/cloud-upload/index.d.ts +0 -0
- /package/{icon → icons}/create-new-folder/index.d.ts +0 -0
- /package/{icon → icons}/double-arrow/index.d.ts +0 -0
- /package/{icon → icons}/download/index.d.ts +0 -0
- /package/{icon → icons}/download-done/index.d.ts +0 -0
- /package/{icon → icons}/east/index.d.ts +0 -0
- /package/{icon → icons}/error/index.d.ts +0 -0
- /package/{icon → icons}/error-outline/index.d.ts +0 -0
- /package/{icon → icons}/expand-less/index.d.ts +0 -0
- /package/{icon → icons}/expand-more/index.d.ts +0 -0
- /package/{icon → icons}/filter-list/index.d.ts +0 -0
- /package/{icon → icons}/first-page/index.d.ts +0 -0
- /package/{icon → icons}/folder/index.d.ts +0 -0
- /package/{icon → icons}/folder-open/index.d.ts +0 -0
- /package/{icon → icons}/folder-shared/index.d.ts +0 -0
- /package/{icon → icons}/fullscreen/index.d.ts +0 -0
- /package/{icon → icons}/fullscreen-exit/index.d.ts +0 -0
- /package/{icon → icons}/help-outline/index.d.ts +0 -0
- /package/{icon → icons}/home-work/index.d.ts +0 -0
- /package/{icon → icons}/keyboard-arrow-down/index.d.ts +0 -0
- /package/{icon → icons}/keyboard-arrow-left/index.d.ts +0 -0
- /package/{icon → icons}/keyboard-arrow-right/index.d.ts +0 -0
- /package/{icon → icons}/keyboard-arrow-up/index.d.ts +0 -0
- /package/{icon → icons}/last-page/index.d.ts +0 -0
- /package/{icon → icons}/legend-toggle/index.d.ts +0 -0
- /package/{icon → icons}/menu/index.d.ts +0 -0
- /package/{icon → icons}/menu-open/index.d.ts +0 -0
- /package/{icon → icons}/more-horiz/index.d.ts +0 -0
- /package/{icon → icons}/more-vert/index.d.ts +0 -0
- /package/{icon → icons}/north/index.d.ts +0 -0
- /package/{icon → icons}/north-east/index.d.ts +0 -0
- /package/{icon → icons}/north-west/index.d.ts +0 -0
- /package/{icon → icons}/notification-important/index.d.ts +0 -0
- /package/{icon → icons}/open-in-new/index.d.ts +0 -0
- /package/{icon → icons}/payments/index.d.ts +0 -0
- /package/{icon → icons}/refresh/index.d.ts +0 -0
- /package/{icon → icons}/request-quote/index.d.ts +0 -0
- /package/{icon → icons}/rule-folder/index.d.ts +0 -0
- /package/{icon → icons}/search/index.d.ts +0 -0
- /package/{icon → icons}/snippet-folder/index.d.ts +0 -0
- /package/{icon → icons}/south/index.d.ts +0 -0
- /package/{icon → icons}/south-east/index.d.ts +0 -0
- /package/{icon → icons}/south-west/index.d.ts +0 -0
- /package/{icon → icons}/subdirectory-arrow-left/index.d.ts +0 -0
- /package/{icon → icons}/subdirectory-arrow-right/index.d.ts +0 -0
- /package/{icon → icons}/text-snippet/index.d.ts +0 -0
- /package/{icon → icons}/topic/index.d.ts +0 -0
- /package/{icon → icons}/types.d.ts +0 -0
- /package/{icon → icons}/unfold-less/index.d.ts +0 -0
- /package/{icon → icons}/unfold-more/index.d.ts +0 -0
- /package/{icon → icons}/upload/index.d.ts +0 -0
- /package/{icon → icons}/warning/index.d.ts +0 -0
- /package/{icon → icons}/warning-amber/index.d.ts +0 -0
- /package/{icon → icons}/west/index.d.ts +0 -0
- /package/{icon-branded → icons-branded}/types.d.ts +0 -0
- /package/{icon-branded → icons-branded}/types.js +0 -0
- /package/{icon → icons-channel}/types.js +0 -0
package/accordion/index.js
CHANGED
|
@@ -8,11 +8,11 @@ function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedec
|
|
|
8
8
|
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
|
9
9
|
|
|
10
10
|
import { isAccordionItemElement } from '../accordion-item';
|
|
11
|
-
import { defineCustomElement, getAttribute, getBooleanAttribute, getCSVSet, getFirstCSValue, updateAttribute, updateBooleanAttribute, updateCSV } from '../utils';
|
|
11
|
+
import { defineCustomElement, getAttribute, getBooleanAttribute, getCSVSet, getFirstCSValue, NectaryElement, updateAttribute, updateBooleanAttribute, updateCSV } from '../utils';
|
|
12
12
|
const templateHTML = '<style>:host{display:block}#wrapper{display:flex;flex-direction:column;box-sizing:border-box;width:100%;height:100%}::slotted(sinch-accordion-item){flex-shrink:1}</style><div id="wrapper"><slot></slot></div>';
|
|
13
13
|
const template = document.createElement('template');
|
|
14
14
|
template.innerHTML = templateHTML;
|
|
15
|
-
defineCustomElement('sinch-accordion', (_$slot = new WeakMap(), _onSlotChange = new WeakMap(), _onOptionChange = new WeakMap(), class extends
|
|
15
|
+
defineCustomElement('sinch-accordion', (_$slot = new WeakMap(), _onSlotChange = new WeakMap(), _onOptionChange = new WeakMap(), class extends NectaryElement {
|
|
16
16
|
constructor() {
|
|
17
17
|
super();
|
|
18
18
|
|
|
@@ -49,10 +49,7 @@ defineCustomElement('sinch-accordion', (_$slot = new WeakMap(), _onSlotChange =
|
|
|
49
49
|
}
|
|
50
50
|
});
|
|
51
51
|
|
|
52
|
-
const shadowRoot = this.attachShadow(
|
|
53
|
-
mode: 'closed',
|
|
54
|
-
delegatesFocus: true
|
|
55
|
-
});
|
|
52
|
+
const shadowRoot = this.attachShadow();
|
|
56
53
|
shadowRoot.appendChild(template.content.cloneNode(true));
|
|
57
54
|
shadowRoot.addEventListener('change', _classPrivateFieldGet(this, _onOptionChange));
|
|
58
55
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '../
|
|
1
|
+
import '../icons/keyboard-arrow-down';
|
|
2
2
|
import type { TSinchElementReact } from '../types';
|
|
3
3
|
import type { FocusEvent } from 'react';
|
|
4
4
|
export declare const isAccordionItemElement: (element: EventTarget | Element | null) => element is TSinchAccordionItemElement;
|
package/accordion-item/index.js
CHANGED
|
@@ -7,8 +7,8 @@ function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedec
|
|
|
7
7
|
|
|
8
8
|
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
|
9
9
|
|
|
10
|
-
import '../
|
|
11
|
-
import { defineCustomElement, getAttribute, getBooleanAttribute, getLiteralAttribute, isAttrTrue, updateAttribute, updateBooleanAttribute, updateLiteralAttribute } from '../utils';
|
|
10
|
+
import '../icons/keyboard-arrow-down';
|
|
11
|
+
import { defineCustomElement, getAttribute, getBooleanAttribute, getLiteralAttribute, isAttrTrue, NectaryElement, updateAttribute, updateBooleanAttribute, updateLiteralAttribute } from '../utils';
|
|
12
12
|
const templateHTML = '<style>:host{display:block;outline:0;min-height:48px}#wrapper{display:flex;flex-direction:column;position:relative;width:100%;height:100%;box-sizing:border-box;overflow:hidden;border-bottom:1px solid var(--sinch-color-stormy-200);--sinch-size-icon:16px}#button{all:initial;cursor:pointer;display:flex;align-items:center;gap:8px;box-sizing:border-box;width:100%;height:48px;padding:12px 8px;font:var(--sinch-font-title-s);color:var(--sinch-color-text-default);fill:var(--sinch-color-stormy-500)}#button>*{pointer-events:none}#button:disabled{cursor:initial;color:var(--sinch-color-stormy-100);fill:var(--sinch-color-stormy-100)}#button::before{width:8px;height:8px;border-radius:50%;margin-left:2px;margin-right:8px}:host([status=success]) #button::before{content:"";background-color:var(--sinch-color-success-500)}:host([status=warn]) #button::before{content:"";background-color:var(--sinch-color-warning-500)}:host([status=error]) #button::before{content:"";background-color:var(--sinch-color-error-500)}:host([status=info]) #button::before{content:"";background-color:var(--sinch-color-informative-500)}#title{flex:1;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}#content{display:none;overflow-y:auto;flex-shrink:1;min-height:0;padding:0 8px 18px;font:var(--sinch-font-body);color:var(--sinch-color-text-default)}#dropdown-icon{--sinch-size-icon:24px}#button[aria-expanded=true]>#dropdown-icon{transform:rotate(180deg)}#button[aria-expanded=true]+#content{display:block}#optional{font:var(--sinch-font-small-text);color:var(--sinch-color-stormy-300)}</style><div id="wrapper"><button id="button" aria-controls="content" aria-expanded="false"><slot name="icon"></slot><span id="title"></span> <span id="optional"></span><sinch-icon-keyboard-arrow-down id="dropdown-icon"></sinch-icon-keyboard-arrow-down></button><div id="content" role="region" aria-labelledby="button"><slot name="content"></slot></div></div>';
|
|
13
13
|
export const isAccordionItemElement = element => {
|
|
14
14
|
return element instanceof Element && element.tagName === 'SINCH-ACCORDION-ITEM';
|
|
@@ -16,7 +16,7 @@ export const isAccordionItemElement = element => {
|
|
|
16
16
|
const statusValues = ['info', 'success', 'warn', 'error'];
|
|
17
17
|
const template = document.createElement('template');
|
|
18
18
|
template.innerHTML = templateHTML;
|
|
19
|
-
defineCustomElement('sinch-accordion-item', (_$button = new WeakMap(), _$buttonContent = new WeakMap(), _$optionalText = new WeakMap(), _onButtonClick = new WeakMap(), class extends
|
|
19
|
+
defineCustomElement('sinch-accordion-item', (_$button = new WeakMap(), _$buttonContent = new WeakMap(), _$optionalText = new WeakMap(), _onButtonClick = new WeakMap(), class extends NectaryElement {
|
|
20
20
|
constructor() {
|
|
21
21
|
super();
|
|
22
22
|
|
|
@@ -49,10 +49,7 @@ defineCustomElement('sinch-accordion-item', (_$button = new WeakMap(), _$buttonC
|
|
|
49
49
|
}
|
|
50
50
|
});
|
|
51
51
|
|
|
52
|
-
const shadowRoot = this.attachShadow(
|
|
53
|
-
mode: 'closed',
|
|
54
|
-
delegatesFocus: true
|
|
55
|
-
});
|
|
52
|
+
const shadowRoot = this.attachShadow();
|
|
56
53
|
shadowRoot.appendChild(template.content.cloneNode(true));
|
|
57
54
|
|
|
58
55
|
_classPrivateFieldSet(this, _$button, shadowRoot.querySelector('#button'));
|
package/alert/index.js
CHANGED
|
@@ -7,12 +7,12 @@ function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedec
|
|
|
7
7
|
|
|
8
8
|
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
|
9
9
|
|
|
10
|
-
import { defineCustomElement, getBooleanAttribute, getAttribute, getLiteralAttribute, updateBooleanAttribute, updateAttribute, updateLiteralAttribute } from '../utils';
|
|
10
|
+
import { defineCustomElement, getBooleanAttribute, getAttribute, getLiteralAttribute, updateBooleanAttribute, updateAttribute, updateLiteralAttribute, NectaryElement } from '../utils';
|
|
11
11
|
const templateHTML = '<style>:host{--sinch-color-alert-info-background:#D5E5F8;--sinch-color-alert-success-background:#D7F1D8;--sinch-color-alert-warn-background:#FFE8D6;--sinch-color-alert-error-background:#FCD7D4;display:block}#wrapper{display:flex;flex-direction:row;column-gap:12px;align-items:center;position:relative;padding:12px 18px;border-radius:4px;font:var(--sinch-font-body);color:var(--sinch-color-stormy-600);background-color:var(--sinch-color-alert-info-background);box-sizing:border-box;width:100%;min-height:56px}#body-wrapper{display:flex;flex-direction:row;align-items:center;column-gap:12px;flex:1;min-width:0}#title{display:none;font:var(--sinch-font-title-s);margin:0;margin-bottom:4px}#text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0;flex:1;min-width:0}:is(#icon-info,#icon-success,#icon-warn,#icon-error){display:none}:host([type=success]) #wrapper{background-color:var(--sinch-color-alert-success-background)}:host([type=warn]) #wrapper{background-color:var(--sinch-color-alert-warn-background)}:host([type=error]) #wrapper{background-color:var(--sinch-color-alert-error-background)}:host([type=info]) #wrapper{background-color:var(--sinch-color-alert-info-background)}:host([type=success]) #icon-success{display:block}:host([type=warn]) #icon-warn{display:block}:host([type=error]) #icon-error{display:block}:host(:is([type=info],:not([type]))) #icon-info{display:block}:host([multiline]:not([multiline=false])) #wrapper{align-items:flex-start;padding:16px 18px}:host([multiline]:not([multiline=false])) #body-wrapper{flex-direction:column;align-items:flex-start}:host([multiline]:not([multiline=false])) #title{display:block}:host([multiline]:not([multiline=false])) :is(#icon-info,#icon-success,#icon-warn,#icon-error){margin-top:2px}:host([multiline]:not([multiline=false])) #text{overflow:unset;text-overflow:unset;white-space:unset}:host([multiline]:not([multiline=false])) ::slotted(sinch-alert-button){margin-top:10px}</style><div id="wrapper"><svg id="icon-info" width="20" height="20" viewBox="0 0 20 20" aria-hidden="true"><path d="M10 0C4.48 0 0 4.48 0 10s4.48 10 10 10 10-4.48 10-10S15.52 0 10 0Zm0 15c-.55 0-1-.45-1-1v-4c0-.55.45-1 1-1s1 .45 1 1v4c0 .55-.45 1-1 1Zm1-8H9V5h2v2Z" fill="#2071CE"/></svg> <svg id="icon-success" width="20" height="20" viewBox="0 0 20 20" aria-hidden="true"><path d="M10 0C4.48 0 0 4.48 0 10s4.48 10 10 10 10-4.48 10-10S15.52 0 10 0ZM7.29 14.29 3.7 10.7a.996.996 0 1 1 1.41-1.41L8 12.17l6.88-6.88a.996.996 0 1 1 1.41 1.41L8.7 14.29a.996.996 0 0 1-1.41 0Z" fill="#2E8540"/></svg> <svg id="icon-warn" width="20" height="20" viewBox="0 0 20 20" aria-hidden="true"><path d="M2.47 18h15.06c1.54 0 2.5-1.67 1.73-3L11.73 1.99c-.77-1.33-2.69-1.33-3.46 0L.74 15c-.77 1.33.19 3 1.73 3ZM10 11c-.55 0-1-.45-1-1V8c0-.55.45-1 1-1s1 .45 1 1v2c0 .55-.45 1-1 1Zm1 4H9v-2h2v2Z" fill="#FF8C34"/></svg> <svg id="icon-error" width="20" height="20" viewBox="0 0 18 18" aria-hidden="true"><path d="M12.32 0H5.68c-.26 0-.52.11-.7.29L.29 4.98c-.18.18-.29.44-.29.7v6.63c0 .27.11.52.29.71l4.68 4.68c.19.19.45.3.71.3h6.63c.27 0 .52-.11.71-.29l4.68-4.68a.99.99 0 0 0 .29-.71V5.68c0-.27-.11-.52-.29-.71L13.02.29c-.18-.18-.44-.29-.7-.29ZM9 14.3c-.72 0-1.3-.58-1.3-1.3 0-.72.58-1.3 1.3-1.3.72 0 1.3.58 1.3 1.3 0 .72-.58 1.3-1.3 1.3ZM9 10c-.55 0-1-.45-1-1V5c0-.55.45-1 1-1s1 .45 1 1v4c0 .55-.45 1-1 1Z" fill="#E31C3D"/></svg><div id="body-wrapper"><p id="title"></p><p id="text"></p><slot name="button"></slot></div><slot name="close"></slot></div>';
|
|
12
12
|
const typeValues = ['info', 'success', 'warn', 'error'];
|
|
13
13
|
const template = document.createElement('template');
|
|
14
14
|
template.innerHTML = templateHTML;
|
|
15
|
-
defineCustomElement('sinch-alert', (_$text = new WeakMap(), _$title = new WeakMap(), class extends
|
|
15
|
+
defineCustomElement('sinch-alert', (_$text = new WeakMap(), _$title = new WeakMap(), class extends NectaryElement {
|
|
16
16
|
constructor() {
|
|
17
17
|
super();
|
|
18
18
|
|
|
@@ -26,9 +26,7 @@ defineCustomElement('sinch-alert', (_$text = new WeakMap(), _$title = new WeakMa
|
|
|
26
26
|
value: void 0
|
|
27
27
|
});
|
|
28
28
|
|
|
29
|
-
const shadowRoot = this.attachShadow(
|
|
30
|
-
mode: 'closed'
|
|
31
|
-
});
|
|
29
|
+
const shadowRoot = this.attachShadow();
|
|
32
30
|
shadowRoot.appendChild(template.content.cloneNode(true));
|
|
33
31
|
|
|
34
32
|
_classPrivateFieldSet(this, _$text, shadowRoot.querySelector('#text'));
|
package/alert-button/index.js
CHANGED
|
@@ -7,11 +7,11 @@ function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedec
|
|
|
7
7
|
|
|
8
8
|
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
|
9
9
|
|
|
10
|
-
import { defineCustomElement, getAttribute, updateAttribute } from '../utils';
|
|
10
|
+
import { defineCustomElement, getAttribute, NectaryElement, updateAttribute } from '../utils';
|
|
11
11
|
const templateHTML = '<style>:host{display:inline-block;vertical-align:middle;outline:0}button{all:initial;padding:9px 16px;border:1px solid var(--sinch-color-stormy-500);border-radius:4px;font:var(--sinch-font-body);font-size:14px;line-height:14px;color:var(--sinch-color-stormy-500);white-space:nowrap;text-overflow:ellipsis;overflow:hidden;cursor:pointer;height:32px;box-sizing:border-box}</style><button></button>';
|
|
12
12
|
const template = document.createElement('template');
|
|
13
13
|
template.innerHTML = templateHTML;
|
|
14
|
-
defineCustomElement('sinch-alert-button', (_$button = new WeakMap(), class extends
|
|
14
|
+
defineCustomElement('sinch-alert-button', (_$button = new WeakMap(), class extends NectaryElement {
|
|
15
15
|
constructor() {
|
|
16
16
|
super();
|
|
17
17
|
|
|
@@ -20,10 +20,7 @@ defineCustomElement('sinch-alert-button', (_$button = new WeakMap(), class exten
|
|
|
20
20
|
value: void 0
|
|
21
21
|
});
|
|
22
22
|
|
|
23
|
-
const shadowRoot = this.attachShadow(
|
|
24
|
-
mode: 'closed',
|
|
25
|
-
delegatesFocus: true
|
|
26
|
-
});
|
|
23
|
+
const shadowRoot = this.attachShadow();
|
|
27
24
|
shadowRoot.appendChild(template.content.cloneNode(true));
|
|
28
25
|
|
|
29
26
|
_classPrivateFieldSet(this, _$button, shadowRoot.querySelector('button'));
|
package/alert-close/index.d.ts
CHANGED
package/alert-close/index.js
CHANGED
|
@@ -7,12 +7,12 @@ function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedec
|
|
|
7
7
|
|
|
8
8
|
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
|
9
9
|
|
|
10
|
-
import '../
|
|
11
|
-
import { defineCustomElement } from '../utils';
|
|
10
|
+
import '../icons/close';
|
|
11
|
+
import { defineCustomElement, NectaryElement } from '../utils';
|
|
12
12
|
const templateHTML = '<style>:host{display:inline-block;vertical-align:middle;outline:0}button{all:initial;display:block;width:24px;height:24px;box-sizing:border-box;cursor:pointer;--sinch-size-icon:24px}sinch-icon-close{display:block;pointer-events:none}</style><button aria-label="close"><sinch-icon-close></sinch-icon-close></button>';
|
|
13
13
|
const template = document.createElement('template');
|
|
14
14
|
template.innerHTML = templateHTML;
|
|
15
|
-
defineCustomElement('sinch-alert-close', (_$button = new WeakMap(), class extends
|
|
15
|
+
defineCustomElement('sinch-alert-close', (_$button = new WeakMap(), class extends NectaryElement {
|
|
16
16
|
constructor() {
|
|
17
17
|
super();
|
|
18
18
|
|
|
@@ -21,10 +21,7 @@ defineCustomElement('sinch-alert-close', (_$button = new WeakMap(), class extend
|
|
|
21
21
|
value: void 0
|
|
22
22
|
});
|
|
23
23
|
|
|
24
|
-
const shadowRoot = this.attachShadow(
|
|
25
|
-
mode: 'closed',
|
|
26
|
-
delegatesFocus: true
|
|
27
|
-
});
|
|
24
|
+
const shadowRoot = this.attachShadow();
|
|
28
25
|
shadowRoot.appendChild(template.content.cloneNode(true));
|
|
29
26
|
|
|
30
27
|
_classPrivateFieldSet(this, _$button, shadowRoot.querySelector('button'));
|
package/avatar/index.d.ts
CHANGED
package/avatar/index.js
CHANGED
|
@@ -7,14 +7,14 @@ function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedec
|
|
|
7
7
|
|
|
8
8
|
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
|
9
9
|
|
|
10
|
-
import '../
|
|
11
|
-
import { defineCustomElement, getAttribute, getLiteralAttribute, updateAttribute, updateLiteralAttribute } from '../utils';
|
|
10
|
+
import '../icons/cancel';
|
|
11
|
+
import { defineCustomElement, getAttribute, getLiteralAttribute, NectaryElement, updateAttribute, updateLiteralAttribute } from '../utils';
|
|
12
12
|
const templateHTML = '<style>:host{display:inline-block;vertical-align:middle;outline:0}#wrapper{position:relative;width:40px;height:40px;font:var(--sinch-font-title-s);line-height:38px;color:var(--sinch-color-text-default);background-color:var(--sinch-color-snow-700);text-align:center;border-radius:50%;border:1px solid var(--sinch-color-snow-100);box-sizing:border-box;text-transform:uppercase;--sinch-avatar-badge-size:16px;--sinch-avatar-badge-font:700 12px/14px "Gilroy","Arial","sans-serif"}:host([background=blue]) #wrapper{background-color:var(--sinch-color-stormy-500);color:var(--sinch-color-snow-100)}:host([background=yellow]) #wrapper{background-color:var(--sinch-color-honey-500)}:host([size="l"]) #wrapper{width:56px;height:56px;font:var(--sinch-font-title-m);line-height:54px;--sinch-avatar-badge-size:20px;--sinch-avatar-badge-font:700 12px/18px "Gilroy","Arial","sans-serif"}:host([size="s"]) #wrapper{width:24px;height:24px;font:var(--sinch-font-extra-small-text);line-height:22px;--sinch-avatar-badge-size:11px;--sinch-avatar-badge-font:500 8px/9px "Gilroy","Arial","sans-serif"}#text{display:block;width:100%;height:100%;box-sizing:border-box}#image{display:none;width:100%;height:100%;object-fit:contain;position:absolute;left:0;top:0;border-radius:50%}:host([src]:not([src=""])) #image{display:block}::slotted(sinch-avatar-badge){position:absolute;top:-2px;left:calc(100% - 15px)}:host([size="l"]) ::slotted(sinch-avatar-badge){left:calc(100% - 19px)}:host([size="s"]) ::slotted(sinch-avatar-badge){left:calc(100% - 9px)}::slotted(sinch-avatar-status){position:absolute;bottom:-2px;right:-2px}:host([size="l"]) ::slotted(sinch-avatar-status){bottom:2px;right:2px}</style><div id="wrapper"><span id="text"></span> <img id="image" alt=""/><slot name="badge"></slot><slot name="status"></slot></div>';
|
|
13
13
|
const backgroundValues = ['grey', 'yellow', 'blue'];
|
|
14
14
|
const sizeValues = ['l', 'm', 's'];
|
|
15
15
|
const template = document.createElement('template');
|
|
16
16
|
template.innerHTML = templateHTML;
|
|
17
|
-
defineCustomElement('sinch-avatar', (_$text = new WeakMap(), _$image = new WeakMap(), class extends
|
|
17
|
+
defineCustomElement('sinch-avatar', (_$text = new WeakMap(), _$image = new WeakMap(), class extends NectaryElement {
|
|
18
18
|
constructor() {
|
|
19
19
|
super();
|
|
20
20
|
|
|
@@ -28,9 +28,7 @@ defineCustomElement('sinch-avatar', (_$text = new WeakMap(), _$image = new WeakM
|
|
|
28
28
|
value: void 0
|
|
29
29
|
});
|
|
30
30
|
|
|
31
|
-
const shadowRoot = this.attachShadow(
|
|
32
|
-
mode: 'closed'
|
|
33
|
-
});
|
|
31
|
+
const shadowRoot = this.attachShadow();
|
|
34
32
|
shadowRoot.appendChild(template.content.cloneNode(true));
|
|
35
33
|
|
|
36
34
|
_classPrivateFieldSet(this, _$text, shadowRoot.querySelector('#text'));
|
package/avatar-badge/index.d.ts
CHANGED
package/avatar-badge/index.js
CHANGED
|
@@ -7,12 +7,12 @@ function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedec
|
|
|
7
7
|
|
|
8
8
|
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
|
9
9
|
|
|
10
|
-
import '../
|
|
11
|
-
import { defineCustomElement, getAttribute, setClass, updateAttribute } from '../utils';
|
|
10
|
+
import '../icons/cancel';
|
|
11
|
+
import { defineCustomElement, getAttribute, NectaryElement, setClass, updateAttribute } from '../utils';
|
|
12
12
|
const templateHTML = '<style>#text{width:var(--sinch-avatar-badge-size);height:var(--sinch-avatar-badge-size);border:1px solid var(--sinch-color-snow-100);border-radius:calc(var(--sinch-avatar-badge-size)/ 2);text-align:center;box-sizing:border-box;color:var(--sinch-color-snow-100);font:var(--sinch-avatar-badge-font);background-color:var(--sinch-color-raspberry-500)}#text.long{width:fit-content;padding:0 calc(var(--sinch-avatar-badge-size)/ 4)}</style><div id="text"></div>';
|
|
13
13
|
const template = document.createElement('template');
|
|
14
14
|
template.innerHTML = templateHTML;
|
|
15
|
-
defineCustomElement('sinch-avatar-badge', (_$text = new WeakMap(), class extends
|
|
15
|
+
defineCustomElement('sinch-avatar-badge', (_$text = new WeakMap(), class extends NectaryElement {
|
|
16
16
|
constructor() {
|
|
17
17
|
super();
|
|
18
18
|
|
|
@@ -21,9 +21,7 @@ defineCustomElement('sinch-avatar-badge', (_$text = new WeakMap(), class extends
|
|
|
21
21
|
value: void 0
|
|
22
22
|
});
|
|
23
23
|
|
|
24
|
-
const shadowRoot = this.attachShadow(
|
|
25
|
-
mode: 'closed'
|
|
26
|
-
});
|
|
24
|
+
const shadowRoot = this.attachShadow();
|
|
27
25
|
shadowRoot.appendChild(template.content.cloneNode(true));
|
|
28
26
|
|
|
29
27
|
_classPrivateFieldSet(this, _$text, shadowRoot.querySelector('#text'));
|
package/avatar-status/index.d.ts
CHANGED
package/avatar-status/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import '../
|
|
2
|
-
import { defineCustomElement, getLiteralAttribute, updateLiteralAttribute } from '../utils';
|
|
1
|
+
import '../icons/cancel';
|
|
2
|
+
import { defineCustomElement, getLiteralAttribute, NectaryElement, updateLiteralAttribute } from '../utils';
|
|
3
3
|
const templateHTML = '<style>#circle{width:10px;height:10px;border:1px solid var(--sinch-color-snow-100);border-radius:50%;box-sizing:border-box}:host([color=grey]) #circle{background-color:var(--sinch-color-snow-600)}:host([color=yellow]) #circle{background-color:var(--sinch-color-honey-500)}:host([color=red]) #circle{background-color:var(--sinch-color-raspberry-500)}:host([color=green]) #circle{background-color:var(--sinch-color-grass-400)}</style><div id="circle"></div>';
|
|
4
4
|
const colorValues = ['red', 'yellow', 'green', 'grey'];
|
|
5
5
|
|
|
@@ -11,12 +11,10 @@ const assertColor = value => {
|
|
|
11
11
|
|
|
12
12
|
const template = document.createElement('template');
|
|
13
13
|
template.innerHTML = templateHTML;
|
|
14
|
-
defineCustomElement('sinch-avatar-status', class extends
|
|
14
|
+
defineCustomElement('sinch-avatar-status', class extends NectaryElement {
|
|
15
15
|
constructor() {
|
|
16
16
|
super();
|
|
17
|
-
const shadowRoot = this.attachShadow(
|
|
18
|
-
mode: 'closed'
|
|
19
|
-
});
|
|
17
|
+
const shadowRoot = this.attachShadow();
|
|
20
18
|
shadowRoot.appendChild(template.content.cloneNode(true));
|
|
21
19
|
}
|
|
22
20
|
|
package/button/index.js
CHANGED
|
@@ -7,12 +7,12 @@ function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedec
|
|
|
7
7
|
|
|
8
8
|
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
|
9
9
|
|
|
10
|
-
import { defineCustomElement, getBooleanAttribute, getAttribute, getLiteralAttribute, isAttrTrue, updateBooleanAttribute, updateAttribute, updateLiteralAttribute } from '../utils';
|
|
10
|
+
import { defineCustomElement, getBooleanAttribute, getAttribute, getLiteralAttribute, isAttrTrue, updateBooleanAttribute, updateAttribute, updateLiteralAttribute, NectaryElement } from '../utils';
|
|
11
11
|
const templateHTML = '<style>:host{--sinch-color-button-background:var(--sinch-color-tropical-500);--sinch-color-button-background-hover:var(--sinch-color-tropical-400);--sinch-color-button-background-focus:var(--sinch-color-tropical-500);--sinch-color-button-background-active:var(--sinch-color-tropical-600);--sinch-color-button-background-disabled:var(--sinch-color-tropical-100);--sinch-color-button-text:var(--sinch-color-text-inverted);--sinch-color-button-text-disabled:var(--sinch-color-text-inverted);--sinch-color-button-border:var(--sinch-color-transparent);--sinch-color-button-border-hover:var(--sinch-color-transparent);--sinch-color-button-border-focus:var(--sinch-color-tropical-700);--sinch-color-button-border-active:var(--sinch-color-transparent);--sinch-color-button-border-disabled:var(--sinch-color-transparent);--sinch-color-spinner-bg:var(--sinch-color-tropical-300);--sinch-color-spinner-fg:var(--sinch-color-snow-100);--sinch-color-icon:var(--sinch-color-text-inverted);display:inline-block;vertical-align:middle;outline:0}:host([type=secondary]){--sinch-color-button-background:var(--sinch-color-snow-100);--sinch-color-button-background-hover:var(--sinch-color-tropical-100);--sinch-color-button-background-focus:var(--sinch-color-snow-100);--sinch-color-button-background-active:var(--sinch-color-tropical-100);--sinch-color-button-background-disabled:var(--sinch-color-snow-100);--sinch-color-button-text:var(--sinch-color-tropical-500);--sinch-color-button-text-disabled:var(--sinch-color-tropical-100);--sinch-color-button-border:var(--sinch-color-tropical-500);--sinch-color-button-border-hover:var(--sinch-color-tropical-500);--sinch-color-button-border-focus:var(--sinch-color-tropical-700);--sinch-color-button-border-active:var(--sinch-color-tropical-500);--sinch-color-button-border-disabled:var(--sinch-color-tropical-100);--sinch-color-spinner-bg:var(--sinch-color-tropical-100);--sinch-color-spinner-fg:var(--sinch-color-tropical-500);--sinch-color-icon:var(--sinch-color-tropical-500)}:host([type=secondary]) button:is(:hover,:active){--sinch-color-spinner-bg:var(--sinch-color-tropical-300);--sinch-color-spinner-fg:var(--sinch-color-snow-100)}:host([type=secondary]) button:disabled{--sinch-color-spinner-bg:var(--sinch-color-tropical-200);--sinch-color-spinner-fg:var(--sinch-color-tropical-400)}:host([type=cta-primary]){--sinch-color-button-background:var(--sinch-color-honey-500);--sinch-color-button-background-hover:var(--sinch-color-honey-400);--sinch-color-button-background-focus:var(--sinch-color-honey-500);--sinch-color-button-background-active:var(--sinch-color-honey-600);--sinch-color-button-background-disabled:var(--sinch-color-honey-100);--sinch-color-button-text:var(--sinch-color-text-default);--sinch-color-button-text-disabled:var(--sinch-color-stormy-300);--sinch-color-button-border:var(--sinch-color-transparent);--sinch-color-button-border-hover:var(--sinch-color-transparent);--sinch-color-button-border-focus:var(--sinch-color-text-default);--sinch-color-button-border-active:var(--sinch-color-transparent);--sinch-color-button-border-disabled:var(--sinch-color-transparent);--sinch-color-spinner-bg:var(--sinch-color-honey-700);--sinch-color-spinner-fg:var(--sinch-color-stormy-600);--sinch-color-icon:var(--sinch-color-text-default)}:host([type=cta-primary]) button:disabled{--sinch-color-spinner-bg:var(--sinch-color-snow-100);--sinch-color-spinner-fg:var(--sinch-color-stormy-300)}:host([type=cta-secondary]){--sinch-color-button-background:var(--sinch-color-snow-100);--sinch-color-button-background-hover:var(--sinch-color-snow-500);--sinch-color-button-background-focus:var(--sinch-color-snow-100);--sinch-color-button-background-active:var(--sinch-color-snow-500);--sinch-color-button-background-disabled:var(--sinch-color-snow-100);--sinch-color-button-text:var(--sinch-color-stormy-500);--sinch-color-button-text-disabled:var(--sinch-color-stormy-200);--sinch-color-button-border:var(--sinch-color-stormy-500);--sinch-color-button-border-hover:var(--sinch-color-stormy-500);--sinch-color-button-border-focus:var(--sinch-color-stormy-500);--sinch-color-button-border-active:var(--sinch-color-stormy-500);--sinch-color-button-border-disabled:var(--sinch-color-stormy-200);--sinch-color-spinner-bg:var(--sinch-color-snow-800);--sinch-color-spinner-fg:var(--sinch-color-stormy-600);--sinch-color-icon:var(--sinch-color-stormy-500)}:host([type=cta-secondary]) button:disabled{--sinch-color-spinner-bg:var(--sinch-color-snow-600);--sinch-color-spinner-fg:var(--sinch-color-stormy-200);--sinch-color-icon:var(--sinch-color-stormy-200)}:host([type=destructive]){--sinch-color-button-background:var(--sinch-color-snow-100);--sinch-color-button-background-hover:var(--sinch-color-error-200);--sinch-color-button-background-focus:var(--sinch-color-snow-100);--sinch-color-button-background-active:var(--sinch-color-error-200);--sinch-color-button-background-disabled:var(--sinch-color-snow-100);--sinch-color-button-text:var(--sinch-color-text-invalid);--sinch-color-button-text-disabled:var(--sinch-color-error-200);--sinch-color-button-border:var(--sinch-color-error-500);--sinch-color-button-border-hover:var(--sinch-color-error-500);--sinch-color-button-border-focus:var(--sinch-color-error-800);--sinch-color-button-border-active:var(--sinch-color-error-500);--sinch-color-button-border-disabled:var(--sinch-color-error-200);--sinch-color-spinner-bg:var(--sinch-color-raspberry-100);--sinch-color-spinner-fg:var(--sinch-color-raspberry-500);--sinch-color-icon:var(--sinch-color-text-invalid)}:host([type=destructive]) button:is(:hover,:active){--sinch-color-spinner-bg:var(--sinch-color-raspberry-200);--sinch-color-spinner-fg:var(--sinch-color-raspberry-500)}:host([type=destructive]) button:disabled{--sinch-color-spinner-bg:var(--sinch-color-raspberry-100);--sinch-color-spinner-fg:var(--sinch-color-raspberry-500)}button{all:initial;display:flex;align-items:center;justify-content:center;gap:15px;box-sizing:border-box;width:100%;height:48px;padding:12px;border-radius:4px;font:var(--sinch-font-title-s);color:var(--sinch-color-button-text);background-color:var(--sinch-color-button-background);box-shadow:0 0 0 1px var(--sinch-color-button-border) inset;cursor:pointer;--sinch-size-icon:24px}button:focus{background-color:var(--sinch-color-button-background-focus);box-shadow:0 0 0 2px var(--sinch-color-button-border-focus) inset}button:hover{background-color:var(--sinch-color-button-background-hover);box-shadow:0 0 0 1px var(--sinch-color-button-border-hover) inset}button:active{background-color:var(--sinch-color-button-background-active);box-shadow:0 0 0 2px var(--sinch-color-button-border-active) inset}button:disabled{color:var(--sinch-color-button-text-disabled);background-color:var(--sinch-color-button-background-disabled);box-shadow:0 0 0 1px var(--sinch-color-button-border-disabled) inset;cursor:initial;--sinch-color-spinner-bg:var(--sinch-color-snow-100);--sinch-color-spinner-fg:var(--sinch-color-tropical-200);--sinch-color-icon:var(--sinch-color-button-text-disabled)}button>*{pointer-events:none}#text{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;display:none}:host([text]:not([text=""])) #text{display:initial}:host([text]:not([text=""])) button{padding:12px 24px}:host([small]:not([small=false]))>button{height:32px;padding:8px;line-height:16px;font-size:14px;gap:8px;--sinch-size-icon:16px}:host([text]:not([text=""])[small]:not([small=false])) button{padding:8px 16px}</style><button><slot name="icon"></slot><span id="text"></span></button>';
|
|
12
12
|
const buttonTypes = ['primary', 'secondary', 'cta-primary', 'cta-secondary', 'destructive'];
|
|
13
13
|
const template = document.createElement('template');
|
|
14
14
|
template.innerHTML = templateHTML;
|
|
15
|
-
defineCustomElement('sinch-button', (_$button = new WeakMap(), _$text = new WeakMap(), class extends
|
|
15
|
+
defineCustomElement('sinch-button', (_$button = new WeakMap(), _$text = new WeakMap(), class extends NectaryElement {
|
|
16
16
|
constructor() {
|
|
17
17
|
super();
|
|
18
18
|
|
|
@@ -26,10 +26,7 @@ defineCustomElement('sinch-button', (_$button = new WeakMap(), _$text = new Weak
|
|
|
26
26
|
value: void 0
|
|
27
27
|
});
|
|
28
28
|
|
|
29
|
-
const shadowRoot = this.attachShadow(
|
|
30
|
-
mode: 'closed',
|
|
31
|
-
delegatesFocus: true
|
|
32
|
-
});
|
|
29
|
+
const shadowRoot = this.attachShadow();
|
|
33
30
|
shadowRoot.appendChild(template.content.cloneNode(true));
|
|
34
31
|
|
|
35
32
|
_classPrivateFieldSet(this, _$button, shadowRoot.querySelector('button'));
|
package/card/index.js
CHANGED
|
@@ -9,11 +9,11 @@ function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollect
|
|
|
9
9
|
|
|
10
10
|
import { isSinchCardButtonElement } from '../card-button';
|
|
11
11
|
import { isSinchCardLinkElement } from '../card-link';
|
|
12
|
-
import { defineCustomElement, getBooleanAttribute, getAttribute, updateBooleanAttribute, updateAttribute, setClass } from '../utils';
|
|
12
|
+
import { defineCustomElement, getBooleanAttribute, getAttribute, updateBooleanAttribute, updateAttribute, setClass, NectaryElement } from '../utils';
|
|
13
13
|
const templateHTML = '<style>:host{display:block;outline:0}#wrapper{position:relative}#card-body{padding:24px;box-sizing:border-box;display:flex;flex-direction:column;gap:16px;background-color:var(--sinch-color-snow-100);border-radius:8px;border:1px solid var(--sinch-color-snow-700)}#illustration-wrapper{display:none;flex-direction:column;align-items:center;border-top-left-radius:8px;border-top-right-radius:8px;overflow:hidden;background-color:var(--sinch-color-stormy-500);height:240px}#illustration-wrapper.active{display:flex}#illustration-wrapper.active+#card-body{border-top-left-radius:0;border-top-right-radius:0;border-top:none}#label{margin:0;font:var(--sinch-font-title-xs);color:var(--sinch-color-stormy-300);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}#label:empty{display:none}#header{display:flex;flex-direction:row;align-items:center;gap:8px;--sinch-size-icon:48px}#title{font:var(--sinch-font-title-m);color:var(--sinch-color-stormy-500);flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}#description{margin:0;font:var(--sinch-font-body);color:var(--sinch-color-stormy-500);flex:1;min-height:0;max-height:120px;overflow-y:auto}#description:empty{display:none}:host([disabled]:not([disabled=false])) :is(#illustration-wrapper,#description,#header,#label){opacity:.6}::slotted(sinch-card-button),::slotted(sinch-card-link){margin-top:20px;align-self:flex-start;max-width:100%}</style><div id="wrapper"><div id="illustration-wrapper"><slot name="illustration"></slot></div><div id="card-body"><p id="label"></p><div id="header"><slot name="icon"></slot><span id="title"></span></div><p id="description"></p><slot name="action"></slot></div></div>';
|
|
14
14
|
const template = document.createElement('template');
|
|
15
15
|
template.innerHTML = templateHTML;
|
|
16
|
-
defineCustomElement('sinch-card', (_$text = new WeakMap(), _$label = new WeakMap(), _$title = new WeakMap(), _$illustrationSlot = new WeakMap(), _$actionSlot = new WeakMap(), _$illustrationSlotWrapper = new WeakMap(), _onIllustrationSlotChange = new WeakMap(), _updateDisabledAttributeInChildren = new WeakMap(), class extends
|
|
16
|
+
defineCustomElement('sinch-card', (_$text = new WeakMap(), _$label = new WeakMap(), _$title = new WeakMap(), _$illustrationSlot = new WeakMap(), _$actionSlot = new WeakMap(), _$illustrationSlotWrapper = new WeakMap(), _onIllustrationSlotChange = new WeakMap(), _updateDisabledAttributeInChildren = new WeakMap(), class extends NectaryElement {
|
|
17
17
|
constructor() {
|
|
18
18
|
super();
|
|
19
19
|
|
|
@@ -65,10 +65,7 @@ defineCustomElement('sinch-card', (_$text = new WeakMap(), _$label = new WeakMap
|
|
|
65
65
|
}
|
|
66
66
|
});
|
|
67
67
|
|
|
68
|
-
const shadowRoot = this.attachShadow(
|
|
69
|
-
mode: 'closed',
|
|
70
|
-
delegatesFocus: true
|
|
71
|
-
});
|
|
68
|
+
const shadowRoot = this.attachShadow();
|
|
72
69
|
shadowRoot.appendChild(template.content.cloneNode(true));
|
|
73
70
|
|
|
74
71
|
_classPrivateFieldSet(this, _$text, shadowRoot.querySelector('#description'));
|
package/card-button/index.js
CHANGED
|
@@ -7,14 +7,14 @@ function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedec
|
|
|
7
7
|
|
|
8
8
|
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
|
9
9
|
|
|
10
|
-
import { defineCustomElement, getBooleanAttribute, getAttribute, updateAttribute } from '../utils';
|
|
10
|
+
import { defineCustomElement, getBooleanAttribute, getAttribute, updateAttribute, NectaryElement } from '../utils';
|
|
11
11
|
const templateHTML = '<style>:host{display:inline-block;outline:0}sinch-button{display:block}</style><sinch-button type="primary" small></sinch-button>';
|
|
12
12
|
export const isSinchCardButtonElement = el => {
|
|
13
13
|
return el.tagName === 'SINCH-CARD-BUTTON';
|
|
14
14
|
};
|
|
15
15
|
const template = document.createElement('template');
|
|
16
16
|
template.innerHTML = templateHTML;
|
|
17
|
-
defineCustomElement('sinch-card-button', (_$button = new WeakMap(), class extends
|
|
17
|
+
defineCustomElement('sinch-card-button', (_$button = new WeakMap(), class extends NectaryElement {
|
|
18
18
|
constructor() {
|
|
19
19
|
super();
|
|
20
20
|
|
|
@@ -23,10 +23,7 @@ defineCustomElement('sinch-card-button', (_$button = new WeakMap(), class extend
|
|
|
23
23
|
value: void 0
|
|
24
24
|
});
|
|
25
25
|
|
|
26
|
-
const shadowRoot = this.attachShadow(
|
|
27
|
-
mode: 'closed',
|
|
28
|
-
delegatesFocus: true
|
|
29
|
-
});
|
|
26
|
+
const shadowRoot = this.attachShadow();
|
|
30
27
|
shadowRoot.appendChild(template.content.cloneNode(true));
|
|
31
28
|
|
|
32
29
|
_classPrivateFieldSet(this, _$button, shadowRoot.querySelector('sinch-button'));
|
package/card-container/index.js
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
import { defineCustomElement } from '../utils';
|
|
1
|
+
import { defineCustomElement, NectaryElement } from '../utils';
|
|
2
2
|
const templateHTML = '<style>:host{display:block}#wrapper{position:relative;padding:24px;box-sizing:border-box;background-color:var(--sinch-color-snow-100);border-radius:8px;border:1px solid var(--sinch-color-snow-700)}</style><div id="wrapper"><slot></slot></div>';
|
|
3
3
|
const template = document.createElement('template');
|
|
4
4
|
template.innerHTML = templateHTML;
|
|
5
|
-
defineCustomElement('sinch-card-container', class extends
|
|
5
|
+
defineCustomElement('sinch-card-container', class extends NectaryElement {
|
|
6
6
|
constructor() {
|
|
7
7
|
super();
|
|
8
|
-
const shadowRoot = this.attachShadow(
|
|
9
|
-
mode: 'closed',
|
|
10
|
-
delegatesFocus: true
|
|
11
|
-
});
|
|
8
|
+
const shadowRoot = this.attachShadow();
|
|
12
9
|
shadowRoot.appendChild(template.content.cloneNode(true));
|
|
13
10
|
}
|
|
14
11
|
|
package/card-link/index.d.ts
CHANGED
package/card-link/index.js
CHANGED
|
@@ -7,15 +7,15 @@ function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedec
|
|
|
7
7
|
|
|
8
8
|
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
|
9
9
|
|
|
10
|
-
import '../
|
|
11
|
-
import { defineCustomElement, getBooleanAttribute, getAttribute, updateBooleanAttribute, updateAttribute } from '../utils';
|
|
10
|
+
import '../icons/arrow-forward';
|
|
11
|
+
import { defineCustomElement, getBooleanAttribute, getAttribute, updateBooleanAttribute, updateAttribute, NectaryElement } from '../utils';
|
|
12
12
|
const templateHTML = '<style>:host{display:inline;outline:0}a{display:flex;flex-direction:row;gap:8px;font:var(--sinch-font-emphasized-body);color:var(--sinch-color-tropical-500);text-decoration:none;outline:0;--sinch-color-icon:var(--sinch-color-tropical-500);--sinch-size-icon:24px}a:hover{color:var(--sinch-color-tropical-600);fill:var(--sinch-color-tropical-600)}:host([disabled]:not([disabled=false])) a{color:var(--sinch-color-tropical-300);pointer-events:none;cursor:initial;--sinch-color-icon:var(--sinch-color-tropical-300)}span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;flex-shrink:1}</style><a><span></span><sinch-icon-arrow-forward></sinch-icon-arrow-forward></a>';
|
|
13
13
|
export const isSinchCardLinkElement = el => {
|
|
14
14
|
return el.tagName === 'SINCH-CARD-LINK';
|
|
15
15
|
};
|
|
16
16
|
const template = document.createElement('template');
|
|
17
17
|
template.innerHTML = templateHTML;
|
|
18
|
-
defineCustomElement('sinch-card-link', (_$anchor = new WeakMap(), _$text = new WeakMap(), _onClick = new WeakMap(), class extends
|
|
18
|
+
defineCustomElement('sinch-card-link', (_$anchor = new WeakMap(), _$text = new WeakMap(), _onClick = new WeakMap(), class extends NectaryElement {
|
|
19
19
|
constructor() {
|
|
20
20
|
super();
|
|
21
21
|
|
|
@@ -39,10 +39,7 @@ defineCustomElement('sinch-card-link', (_$anchor = new WeakMap(), _$text = new W
|
|
|
39
39
|
}
|
|
40
40
|
});
|
|
41
41
|
|
|
42
|
-
const shadowRoot = this.attachShadow(
|
|
43
|
-
mode: 'closed',
|
|
44
|
-
delegatesFocus: true
|
|
45
|
-
});
|
|
42
|
+
const shadowRoot = this.attachShadow();
|
|
46
43
|
shadowRoot.appendChild(template.content.cloneNode(true));
|
|
47
44
|
|
|
48
45
|
_classPrivateFieldSet(this, _$anchor, shadowRoot.querySelector('a'));
|
package/chat/index.js
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
import { defineCustomElement } from '../utils';
|
|
1
|
+
import { defineCustomElement, NectaryElement } from '../utils';
|
|
2
2
|
const templateHTML = '<style>:host{display:block;outline:0}#wrapper{display:flex;flex-direction:column;gap:32px;box-sizing:border-box;width:100%}</style><div id="wrapper"><slot></slot></div>';
|
|
3
3
|
const template = document.createElement('template');
|
|
4
4
|
template.innerHTML = templateHTML;
|
|
5
|
-
defineCustomElement('sinch-chat', class extends
|
|
5
|
+
defineCustomElement('sinch-chat', class extends NectaryElement {
|
|
6
6
|
constructor() {
|
|
7
7
|
super();
|
|
8
|
-
const shadowRoot = this.attachShadow(
|
|
9
|
-
mode: 'closed',
|
|
10
|
-
delegatesFocus: true
|
|
11
|
-
});
|
|
8
|
+
const shadowRoot = this.attachShadow();
|
|
12
9
|
shadowRoot.appendChild(template.content.cloneNode(true));
|
|
13
10
|
}
|
|
14
11
|
|
package/chat-avatar/index.js
CHANGED
|
@@ -8,11 +8,11 @@ function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedec
|
|
|
8
8
|
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
|
9
9
|
|
|
10
10
|
import '../avatar';
|
|
11
|
-
import { defineCustomElement, getAttribute, updateAttribute } from '../utils';
|
|
11
|
+
import { defineCustomElement, getAttribute, NectaryElement, updateAttribute } from '../utils';
|
|
12
12
|
const templateHTML = '<style>sinch-avatar{display:block}</style><sinch-avatar background="blue" size="l"></sinch-avatar>';
|
|
13
13
|
const template = document.createElement('template');
|
|
14
14
|
template.innerHTML = templateHTML;
|
|
15
|
-
defineCustomElement('sinch-chat-avatar', (_$avatar = new WeakMap(), class extends
|
|
15
|
+
defineCustomElement('sinch-chat-avatar', (_$avatar = new WeakMap(), class extends NectaryElement {
|
|
16
16
|
constructor() {
|
|
17
17
|
super();
|
|
18
18
|
|
|
@@ -21,10 +21,7 @@ defineCustomElement('sinch-chat-avatar', (_$avatar = new WeakMap(), class extend
|
|
|
21
21
|
value: void 0
|
|
22
22
|
});
|
|
23
23
|
|
|
24
|
-
const shadowRoot = this.attachShadow(
|
|
25
|
-
mode: 'closed',
|
|
26
|
-
delegatesFocus: true
|
|
27
|
-
});
|
|
24
|
+
const shadowRoot = this.attachShadow();
|
|
28
25
|
shadowRoot.appendChild(template.content.cloneNode(true));
|
|
29
26
|
|
|
30
27
|
_classPrivateFieldSet(this, _$avatar, shadowRoot.querySelector('sinch-avatar'));
|
package/chat-block/index.js
CHANGED
|
@@ -12,11 +12,11 @@ function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollect
|
|
|
12
12
|
function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
|
|
13
13
|
|
|
14
14
|
import { typeValues } from '../chat-bubble';
|
|
15
|
-
import { defineCustomElement, getAttribute, getLiteralAttribute, updateAttribute, updateLiteralAttribute } from '../utils';
|
|
15
|
+
import { defineCustomElement, getAttribute, getLiteralAttribute, NectaryElement, updateAttribute, updateLiteralAttribute } from '../utils';
|
|
16
16
|
const templateHTML = '<style>:host{display:block;outline:0}#wrapper{position:relative;display:flex;flex-direction:column;gap:4px;align-items:flex-end;padding-left:72px}#stamp{display:flex;gap:4px;margin:0;font:var(--sinch-font-extra-small-text);color:var(--sinch-color-stormy-400)}#avatar{display:none;position:absolute;left:0;top:24px}:host([type=customer])>#wrapper{align-items:flex-start}:host([type=customer]) #avatar{display:block}</style><div id="wrapper"><div id="avatar"><slot name="avatar"></slot></div><p id="stamp"><span id="firstname"></span><span id="lastname"></span>•<span id="time"></span></p><slot name="bubble"></slot></div>';
|
|
17
17
|
const template = document.createElement('template');
|
|
18
18
|
template.innerHTML = templateHTML;
|
|
19
|
-
defineCustomElement('sinch-chat-block', (_$firstName = new WeakMap(), _$lastName = new WeakMap(), _$timeStamp = new WeakMap(), _$bubbleSlot = new WeakMap(), _onBubbleSlotChange = new WeakMap(), _updateBubbleTypes = new WeakSet(), class extends
|
|
19
|
+
defineCustomElement('sinch-chat-block', (_$firstName = new WeakMap(), _$lastName = new WeakMap(), _$timeStamp = new WeakMap(), _$bubbleSlot = new WeakMap(), _onBubbleSlotChange = new WeakMap(), _updateBubbleTypes = new WeakSet(), class extends NectaryElement {
|
|
20
20
|
constructor() {
|
|
21
21
|
super();
|
|
22
22
|
|
|
@@ -49,10 +49,7 @@ defineCustomElement('sinch-chat-block', (_$firstName = new WeakMap(), _$lastName
|
|
|
49
49
|
}
|
|
50
50
|
});
|
|
51
51
|
|
|
52
|
-
const shadowRoot = this.attachShadow(
|
|
53
|
-
mode: 'closed',
|
|
54
|
-
delegatesFocus: true
|
|
55
|
-
});
|
|
52
|
+
const shadowRoot = this.attachShadow();
|
|
56
53
|
shadowRoot.appendChild(template.content.cloneNode(true));
|
|
57
54
|
|
|
58
55
|
_classPrivateFieldSet(this, _$firstName, shadowRoot.querySelector('#firstname'));
|
package/chat-bubble/index.js
CHANGED
|
@@ -7,12 +7,12 @@ function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedec
|
|
|
7
7
|
|
|
8
8
|
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
|
9
9
|
|
|
10
|
-
import { defineCustomElement, getAttribute, getLiteralAttribute, updateAttribute } from '../utils';
|
|
10
|
+
import { defineCustomElement, getAttribute, getLiteralAttribute, NectaryElement, updateAttribute } from '../utils';
|
|
11
11
|
const templateHTML = '<style>:host{display:block;outline:0}#text{padding:12px 16px;border-radius:16px;font:var(--sinch-font-body);color:var(--sinch-color-stormy-500);margin:0;max-width:595px;box-sizing:border-box}:host([data-type=customer])>#text{background-color:var(--sinch-color-snow-500);border-top-left-radius:0}:host([data-type=agent-prev])>#text{background-color:var(--sinch-color-snow-700);border-top-right-radius:0}:host([data-type=agent])>#text{background-color:var(--sinch-color-honey-200);border-top-right-radius:0}</style><p id="text"></p>';
|
|
12
12
|
export const typeValues = ['customer', 'agent', 'agent-prev'];
|
|
13
13
|
const template = document.createElement('template');
|
|
14
14
|
template.innerHTML = templateHTML;
|
|
15
|
-
defineCustomElement('sinch-chat-bubble', (_$text = new WeakMap(), class extends
|
|
15
|
+
defineCustomElement('sinch-chat-bubble', (_$text = new WeakMap(), class extends NectaryElement {
|
|
16
16
|
constructor() {
|
|
17
17
|
super();
|
|
18
18
|
|
|
@@ -21,10 +21,7 @@ defineCustomElement('sinch-chat-bubble', (_$text = new WeakMap(), class extends
|
|
|
21
21
|
value: void 0
|
|
22
22
|
});
|
|
23
23
|
|
|
24
|
-
const shadowRoot = this.attachShadow(
|
|
25
|
-
mode: 'closed',
|
|
26
|
-
delegatesFocus: true
|
|
27
|
-
});
|
|
24
|
+
const shadowRoot = this.attachShadow();
|
|
28
25
|
shadowRoot.appendChild(template.content.cloneNode(true));
|
|
29
26
|
|
|
30
27
|
_classPrivateFieldSet(this, _$text, shadowRoot.querySelector('#text'));
|
package/checkbox/index.js
CHANGED
|
@@ -7,11 +7,11 @@ function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedec
|
|
|
7
7
|
|
|
8
8
|
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
|
9
9
|
|
|
10
|
-
import { defineCustomElement, getAttribute, getBooleanAttribute, isAttrTrue, updateAttribute, updateBooleanAttribute } from '../utils';
|
|
10
|
+
import { defineCustomElement, getAttribute, getBooleanAttribute, isAttrTrue, NectaryElement, updateAttribute, updateBooleanAttribute } from '../utils';
|
|
11
11
|
const templateHTML = '<style>:host{--sinch-color-checkbox-circle:var(--sinch-color-transparent);--sinch-color-checkbox-background:var(--sinch-color-snow-100);--sinch-color-checkbox-border:var(--sinch-color-stormy-300);--sinch-color-checkbox-circle-checked:var(--sinch-color-transparent);--sinch-color-checkbox-background-checked:var(--sinch-color-tropical-500);--sinch-color-checkbox-border-checked:var(--sinch-color-tropical-500);--sinch-color-checkbox-circle-hover:var(--sinch-color-snow-500);--sinch-color-checkbox-background-hover:var(--sinch-color-snow-100);--sinch-color-checkbox-border-hover:var(--sinch-color-stormy-300);--sinch-color-checkbox-circle-hover-checked:var(--sinch-color-tropical-100);--sinch-color-checkbox-background-hover-checked:var(--sinch-color-tropical-500);--sinch-color-checkbox-border-hover-checked:var(--sinch-color-tropical-500);--sinch-color-checkbox-circle-focus:var(--sinch-color-snow-800);--sinch-color-checkbox-background-focus:var(--sinch-color-snow-100);--sinch-color-checkbox-border-focus:var(--sinch-color-stormy-300);--sinch-color-checkbox-circle-focus-checked:var(--sinch-color-tropical-200);--sinch-color-checkbox-background-focus-checked:var(--sinch-color-tropical-500);--sinch-color-checkbox-border-focus-checked:var(--sinch-color-tropical-500);--sinch-color-checkbox-circle-active:var(--sinch-color-stormy-100);--sinch-color-checkbox-background-active:var(--sinch-color-snow-100);--sinch-color-checkbox-border-active:var(--sinch-color-stormy-300);--sinch-color-checkbox-circle-active-checked:var(--sinch-color-tropical-300);--sinch-color-checkbox-background-active-checked:var(--sinch-color-tropical-500);--sinch-color-checkbox-border-active-checked:var(--sinch-color-tropical-500);--sinch-color-checkbox-circle-disabled:var(--sinch-color-transparent);--sinch-color-checkbox-background-disabled:var(--sinch-color-snow-100);--sinch-color-checkbox-border-disabled:var(--sinch-color-stormy-100);--sinch-color-checkbox-circle-disabled-checked:var(--sinch-color-transparent);--sinch-color-checkbox-background-disabled-checked:var(--sinch-color-stormy-100);--sinch-color-checkbox-border-disabled-checked:var(--sinch-color-stormy-100);--sinch-color-checkbox-text:var(--sinch-color-text-default);--sinch-color-checkbox-text-disabled:var(--sinch-color-stormy-200);display:inline-block;vertical-align:middle;outline:0}:host([invalid]:not([invalid=false])){--sinch-color-checkbox-border:var(--sinch-color-raspberry-500);--sinch-color-checkbox-background-checked:var(--sinch-color-raspberry-500);--sinch-color-checkbox-border-checked:var(--sinch-color-raspberry-500);--sinch-color-checkbox-border-hover:var(--sinch-color-raspberry-500);--sinch-color-checkbox-circle-hover-checked:var(--sinch-color-raspberry-100);--sinch-color-checkbox-background-hover-checked:var(--sinch-color-raspberry-500);--sinch-color-checkbox-border-hover-checked:var(--sinch-color-raspberry-500);--sinch-color-checkbox-border-focus:var(--sinch-color-raspberry-500);--sinch-color-checkbox-circle-focus-checked:var(--sinch-color-raspberry-200);--sinch-color-checkbox-background-focus-checked:var(--sinch-color-raspberry-500);--sinch-color-checkbox-border-focus-checked:var(--sinch-color-raspberry-500);--sinch-color-checkbox-border-active:var(--sinch-color-raspberry-500);--sinch-color-checkbox-circle-active-checked:var(--sinch-color-raspberry-300);--sinch-color-checkbox-background-active-checked:var(--sinch-color-raspberry-500);--sinch-color-checkbox-border-active-checked:var(--sinch-color-raspberry-500);--sinch-color-checkbox-border-disabled:var(--sinch-color-raspberry-200);--sinch-color-checkbox-background-disabled-checked:var(--sinch-color-raspberry-200);--sinch-color-checkbox-border-disabled-checked:var(--sinch-color-raspberry-200);--sinch-color-checkbox-text:var(--sinch-color-text-invalid);--sinch-color-checkbox-text-disabled:var(--sinch-color-raspberry-200)}#wrapper{display:flex;flex-direction:row;box-sizing:border-box;width:100%;height:32px}#checkbox{all:initial;display:block;width:32px;height:32px;cursor:pointer}#checkbox:disabled{cursor:initial}#icon-container{position:relative;width:32px;height:32px}#checkbox::before{content:"";position:absolute;top:0;left:0;width:32px;height:32px;border-radius:16px;pointer-events:none;background-color:var(--sinch-color-checkbox-circle);transition:background-color .1s linear}#checkbox::after{content:"";position:absolute;top:7px;left:7px;width:18px;height:18px;border-radius:2px;pointer-events:none;background-color:var(--sinch-color-checkbox-background);box-shadow:0 0 0 2px var(--sinch-color-checkbox-border) inset;transition:background-color .1s linear}#icon-checkmark{position:absolute;left:9px;top:10px;transition:opacity .1s linear;opacity:0;pointer-events:none}#icon-indeterminate{position:absolute;left:10px;top:15px;transition:opacity .1s linear;opacity:0;pointer-events:none}@media (prefers-reduced-motion){#checkbox::after,#checkbox::before,#icon-checkmark,#icon-indeterminate{transition:none}}#label{display:none;flex:1;align-self:center;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding-left:6px;font:var(--sinch-font-body);color:var(--sinch-color-checkbox-text)}:host([text]:not([text=""])) #label{display:block}:host([disabled]:not([disabled=false])) #label{color:var(--sinch-color-checkbox-text-disabled)}:host(:is(:not([indeterminate]),[indeterminate=false])) #checkbox:checked~#icon-checkmark{opacity:1}:host([indeterminate]:not([indeterminate=false])) #checkbox:checked~#icon-indeterminate{opacity:1}#checkbox:checked::before{background-color:var(--sinch-color-checkbox-circle-checked)}#checkbox:checked::after{background-color:var(--sinch-color-checkbox-background-checked);box-shadow:0 0 0 2px var(--sinch-color-checkbox-border-checked) inset}#checkbox:focus::before{background-color:var(--sinch-color-checkbox-circle-focus)}#checkbox:focus::after{background-color:var(--sinch-color-checkbox-background-focus);box-shadow:0 0 0 2px var(--sinch-color-checkbox-border-focus) inset}#checkbox:hover::before{background-color:var(--sinch-color-checkbox-circle-hover)}#checkbox:hover::after{background-color:var(--sinch-color-checkbox-background-hover);box-shadow:0 0 0 2px var(--sinch-color-checkbox-border-hover) inset}#checkbox:active::before{background-color:var(--sinch-color-checkbox-circle-active)}#checkbox:active::after{background-color:var(--sinch-color-checkbox-background-active);box-shadow:0 0 0 2px var(--sinch-color-checkbox-border-active) inset}#checkbox:disabled::before{background-color:var(--sinch-color-checkbox-circle-disabled)}#checkbox:disabled::after{background-color:var(--sinch-color-checkbox-background-disabled);box-shadow:0 0 0 2px var(--sinch-color-checkbox-border-disabled) inset}#checkbox:focus:checked::before{background-color:var(--sinch-color-checkbox-circle-focus-checked)}#checkbox:focus:checked::after{background-color:var(--sinch-color-checkbox-background-focus-checked);box-shadow:0 0 0 2px var(--sinch-color-checkbox-border-focus-checked) inset}#checkbox:hover:checked::before{background-color:var(--sinch-color-checkbox-circle-hover-checked)}#checkbox:hover:checked::after{background-color:var(--sinch-color-checkbox-background-hover-checked);box-shadow:0 0 0 2px var(--sinch-color-checkbox-border-hover-checked) inset}#checkbox:active:checked::before{background-color:var(--sinch-color-checkbox-circle-active-checked)}#checkbox:active:checked::after{background-color:var(--sinch-color-checkbox-background-active-checked);box-shadow:0 0 0 2px var(--sinch-color-checkbox-border-active-checked) inset}#checkbox:disabled:checked::before{background-color:var(--sinch-color-checkbox-circle-disabled-checked)}#checkbox:disabled:checked::after{background-color:var(--sinch-color-checkbox-background-disabled-checked);box-shadow:0 0 0 2px var(--sinch-color-checkbox-border-disabled-checked) inset}</style><div id="wrapper"><div id="icon-container"><input id="checkbox" type="checkbox"/> <svg id="icon-checkmark" width="14" height="11" aria-hidden="true"><path d="M14 1.99999L12.59 0.579987L4.98995 8.17L1.49997 4.5L0.0799694 5.91L4.98995 11L14 1.99999Z" fill="white"/></svg> <svg id="icon-indeterminate" width="12" height="2" aria-hidden="true"><line y1="1" x2="12" y2="1" stroke="white" stroke-width="2"/></svg></div><label for="checkbox" id="label"></label></div>';
|
|
12
12
|
const template = document.createElement('template');
|
|
13
13
|
template.innerHTML = templateHTML;
|
|
14
|
-
defineCustomElement('sinch-checkbox', (_$input = new WeakMap(), _$label = new WeakMap(), _onCheckboxInput = new WeakMap(), class extends
|
|
14
|
+
defineCustomElement('sinch-checkbox', (_$input = new WeakMap(), _$label = new WeakMap(), _onCheckboxInput = new WeakMap(), class extends NectaryElement {
|
|
15
15
|
constructor() {
|
|
16
16
|
super();
|
|
17
17
|
|
|
@@ -40,10 +40,7 @@ defineCustomElement('sinch-checkbox', (_$input = new WeakMap(), _$label = new We
|
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
42
|
|
|
43
|
-
const shadowRoot = this.attachShadow(
|
|
44
|
-
mode: 'closed',
|
|
45
|
-
delegatesFocus: true
|
|
46
|
-
});
|
|
43
|
+
const shadowRoot = this.attachShadow();
|
|
47
44
|
shadowRoot.appendChild(template.content.cloneNode(true));
|
|
48
45
|
|
|
49
46
|
_classPrivateFieldSet(this, _$input, shadowRoot.querySelector('input'));
|
package/dialog/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import '../icon-button';
|
|
2
|
-
import '../
|
|
2
|
+
import '../icons/close';
|
|
3
3
|
import type { TRect, TSinchElementReact } from '../types';
|
|
4
4
|
import type { SyntheticEvent } from 'react';
|
|
5
|
-
declare type TSinchDialogElement = HTMLElement & {
|
|
5
|
+
export declare type TSinchDialogElement = HTMLElement & {
|
|
6
6
|
caption: string;
|
|
7
7
|
readonly dialogRect: TRect;
|
|
8
8
|
readonly closeButtonRect: TRect;
|
|
9
9
|
};
|
|
10
|
-
declare type TSinchDialogReact = TSinchElementReact<TSinchDialogElement> & {
|
|
10
|
+
export declare type TSinchDialogReact = TSinchElementReact<TSinchDialogElement> & {
|
|
11
11
|
open: boolean;
|
|
12
12
|
caption: string;
|
|
13
13
|
'aria-label': string;
|
|
@@ -23,4 +23,3 @@ declare global {
|
|
|
23
23
|
'sinch-dialog': TSinchDialogElement;
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
export {};
|