@nectary/components 0.24.0 → 0.26.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.
Files changed (295) hide show
  1. package/colors.json +2 -0
  2. package/dialog/index.js +2 -2
  3. package/icons/add/index.d.ts +11 -0
  4. package/icons/add/index.js +4 -0
  5. package/icons/add-box/index.d.ts +11 -0
  6. package/icons/add-box/index.js +4 -0
  7. package/icons/add-circle/index.d.ts +11 -0
  8. package/icons/add-circle/index.js +4 -0
  9. package/icons/add-circle-outline/index.d.ts +11 -0
  10. package/icons/add-circle-outline/index.js +4 -0
  11. package/icons/amp-stories/index.d.ts +11 -0
  12. package/icons/amp-stories/index.js +4 -0
  13. package/icons/archive/index.d.ts +11 -0
  14. package/icons/archive/index.js +4 -0
  15. package/icons/attach-file/index.d.ts +11 -0
  16. package/icons/attach-file/index.js +4 -0
  17. package/icons/attach-money/index.d.ts +11 -0
  18. package/icons/attach-money/index.js +4 -0
  19. package/icons/attribution/index.d.ts +11 -0
  20. package/icons/attribution/index.js +4 -0
  21. package/icons/backspace/index.d.ts +11 -0
  22. package/icons/backspace/index.js +4 -0
  23. package/icons/ballot/index.d.ts +11 -0
  24. package/icons/ballot/index.js +4 -0
  25. package/icons/bar-chart/index.d.ts +11 -0
  26. package/icons/bar-chart/index.js +4 -0
  27. package/icons/biotech/index.d.ts +11 -0
  28. package/icons/biotech/index.js +4 -0
  29. package/icons/block/index.d.ts +11 -0
  30. package/icons/block/index.js +4 -0
  31. package/icons/border-all/index.d.ts +11 -0
  32. package/icons/border-all/index.js +4 -0
  33. package/icons/border-bottom/index.d.ts +11 -0
  34. package/icons/border-bottom/index.js +4 -0
  35. package/icons/border-clear/index.d.ts +11 -0
  36. package/icons/border-clear/index.js +4 -0
  37. package/icons/border-horizontal/index.d.ts +11 -0
  38. package/icons/border-horizontal/index.js +4 -0
  39. package/icons/border-inner/index.d.ts +11 -0
  40. package/icons/border-inner/index.js +4 -0
  41. package/icons/border-left/index.d.ts +11 -0
  42. package/icons/border-left/index.js +4 -0
  43. package/icons/border-outer/index.d.ts +11 -0
  44. package/icons/border-outer/index.js +4 -0
  45. package/icons/border-right/index.d.ts +11 -0
  46. package/icons/border-right/index.js +4 -0
  47. package/icons/border-style/index.d.ts +11 -0
  48. package/icons/border-style/index.js +4 -0
  49. package/icons/border-top/index.d.ts +11 -0
  50. package/icons/border-top/index.js +4 -0
  51. package/icons/border-vertical/index.d.ts +11 -0
  52. package/icons/border-vertical/index.js +4 -0
  53. package/icons/bubble-chart/index.d.ts +11 -0
  54. package/icons/bubble-chart/index.js +4 -0
  55. package/icons/calculate/index.d.ts +11 -0
  56. package/icons/calculate/index.js +4 -0
  57. package/icons/clear/index.d.ts +11 -0
  58. package/icons/clear/index.js +4 -0
  59. package/icons/content-copy/index.d.ts +11 -0
  60. package/icons/content-copy/index.js +4 -0
  61. package/icons/content-cut/index.d.ts +11 -0
  62. package/icons/content-cut/index.js +4 -0
  63. package/icons/content-paste/index.d.ts +11 -0
  64. package/icons/content-paste/index.js +4 -0
  65. package/icons/delete-sweep/index.d.ts +11 -0
  66. package/icons/delete-sweep/index.js +4 -0
  67. package/icons/drafts/index.d.ts +11 -0
  68. package/icons/drafts/index.js +4 -0
  69. package/icons/drag-handle/index.d.ts +11 -0
  70. package/icons/drag-handle/index.js +4 -0
  71. package/icons/dynamic-feed/index.d.ts +11 -0
  72. package/icons/dynamic-feed/index.js +4 -0
  73. package/icons/file-copy/index.d.ts +11 -0
  74. package/icons/file-copy/index.js +4 -0
  75. package/icons/flag/index.d.ts +11 -0
  76. package/icons/flag/index.js +4 -0
  77. package/icons/font-download/index.d.ts +11 -0
  78. package/icons/font-download/index.js +4 -0
  79. package/icons/format-align-center/index.d.ts +11 -0
  80. package/icons/format-align-center/index.js +4 -0
  81. package/icons/format-align-justify/index.d.ts +11 -0
  82. package/icons/format-align-justify/index.js +4 -0
  83. package/icons/format-align-left/index.d.ts +11 -0
  84. package/icons/format-align-left/index.js +4 -0
  85. package/icons/format-align-right/index.d.ts +11 -0
  86. package/icons/format-align-right/index.js +4 -0
  87. package/icons/format-bold/index.d.ts +11 -0
  88. package/icons/format-bold/index.js +4 -0
  89. package/icons/format-clear/index.d.ts +11 -0
  90. package/icons/format-clear/index.js +4 -0
  91. package/icons/format-color-reset/index.d.ts +11 -0
  92. package/icons/format-color-reset/index.js +4 -0
  93. package/icons/format-indent-decrease/index.d.ts +11 -0
  94. package/icons/format-indent-decrease/index.js +4 -0
  95. package/icons/format-indent-increase/index.d.ts +11 -0
  96. package/icons/format-indent-increase/index.js +4 -0
  97. package/icons/format-italic/index.d.ts +11 -0
  98. package/icons/format-italic/index.js +4 -0
  99. package/icons/format-line-spacing/index.d.ts +11 -0
  100. package/icons/format-line-spacing/index.js +4 -0
  101. package/icons/format-list-bulleted/index.d.ts +11 -0
  102. package/icons/format-list-bulleted/index.js +4 -0
  103. package/icons/format-list-numbered/index.d.ts +11 -0
  104. package/icons/format-list-numbered/index.js +4 -0
  105. package/icons/format-list-numbered-rtl/index.d.ts +11 -0
  106. package/icons/format-list-numbered-rtl/index.js +4 -0
  107. package/icons/format-paint/index.d.ts +11 -0
  108. package/icons/format-paint/index.js +4 -0
  109. package/icons/format-quote/index.d.ts +11 -0
  110. package/icons/format-quote/index.js +4 -0
  111. package/icons/format-shapes/index.d.ts +11 -0
  112. package/icons/format-shapes/index.js +4 -0
  113. package/icons/format-size/index.d.ts +11 -0
  114. package/icons/format-size/index.js +4 -0
  115. package/icons/format-strikethrough/index.d.ts +11 -0
  116. package/icons/format-strikethrough/index.js +4 -0
  117. package/icons/format-textdirection-l-to-r/index.d.ts +11 -0
  118. package/icons/format-textdirection-l-to-r/index.js +4 -0
  119. package/icons/format-textdirection-r-to-l/index.d.ts +11 -0
  120. package/icons/format-textdirection-r-to-l/index.js +4 -0
  121. package/icons/format-underlined/index.d.ts +11 -0
  122. package/icons/format-underlined/index.js +4 -0
  123. package/icons/forward/index.d.ts +11 -0
  124. package/icons/forward/index.js +4 -0
  125. package/icons/functions/index.d.ts +11 -0
  126. package/icons/functions/index.js +4 -0
  127. package/icons/gesture/index.d.ts +11 -0
  128. package/icons/gesture/index.js +4 -0
  129. package/icons/height/index.d.ts +11 -0
  130. package/icons/height/index.js +4 -0
  131. package/icons/highlight/index.d.ts +11 -0
  132. package/icons/highlight/index.js +4 -0
  133. package/icons/horizontal-rule/index.d.ts +11 -0
  134. package/icons/horizontal-rule/index.js +4 -0
  135. package/icons/how-to-reg/index.d.ts +11 -0
  136. package/icons/how-to-reg/index.js +4 -0
  137. package/icons/how-to-vote/index.d.ts +11 -0
  138. package/icons/how-to-vote/index.js +4 -0
  139. package/icons/inbox/index.d.ts +11 -0
  140. package/icons/inbox/index.js +4 -0
  141. package/icons/insert-chart/index.d.ts +11 -0
  142. package/icons/insert-chart/index.js +4 -0
  143. package/icons/insert-chart-outlined/index.d.ts +11 -0
  144. package/icons/insert-chart-outlined/index.js +4 -0
  145. package/icons/insert-comment/index.d.ts +11 -0
  146. package/icons/insert-comment/index.js +4 -0
  147. package/icons/insert-drive-file/index.d.ts +11 -0
  148. package/icons/insert-drive-file/index.js +4 -0
  149. package/icons/insert-emoticon/index.js +1 -1
  150. package/icons/insert-invitation/index.d.ts +11 -0
  151. package/icons/insert-invitation/index.js +4 -0
  152. package/icons/insert-link/index.d.ts +11 -0
  153. package/icons/insert-link/index.js +4 -0
  154. package/icons/insert-photo/index.d.ts +11 -0
  155. package/icons/insert-photo/index.js +4 -0
  156. package/icons/insights/index.d.ts +11 -0
  157. package/icons/insights/index.js +4 -0
  158. package/icons/linear-scale/index.d.ts +11 -0
  159. package/icons/linear-scale/index.js +4 -0
  160. package/icons/link/index.d.ts +11 -0
  161. package/icons/link/index.js +4 -0
  162. package/icons/link-off/index.d.ts +11 -0
  163. package/icons/link-off/index.js +4 -0
  164. package/icons/low-priority/index.d.ts +11 -0
  165. package/icons/low-priority/index.js +4 -0
  166. package/icons/mail/index.d.ts +11 -0
  167. package/icons/mail/index.js +4 -0
  168. package/icons/markunread/index.d.ts +11 -0
  169. package/icons/markunread/index.js +4 -0
  170. package/icons/merge-type/index.d.ts +11 -0
  171. package/icons/merge-type/index.js +4 -0
  172. package/icons/mode/index.d.ts +11 -0
  173. package/icons/mode/index.js +4 -0
  174. package/icons/mode-comment/index.d.ts +11 -0
  175. package/icons/mode-comment/index.js +4 -0
  176. package/icons/monetization-on/index.d.ts +11 -0
  177. package/icons/monetization-on/index.js +4 -0
  178. package/icons/money-off/index.d.ts +11 -0
  179. package/icons/money-off/index.js +4 -0
  180. package/icons/money-off-csred/index.d.ts +11 -0
  181. package/icons/money-off-csred/index.js +4 -0
  182. package/icons/move-to-inbox/index.d.ts +11 -0
  183. package/icons/move-to-inbox/index.js +4 -0
  184. package/icons/multiline-chart/index.d.ts +11 -0
  185. package/icons/multiline-chart/index.js +4 -0
  186. package/icons/next-week/index.d.ts +11 -0
  187. package/icons/next-week/index.js +4 -0
  188. package/icons/notes/index.js +1 -1
  189. package/icons/outlined-flag/index.d.ts +11 -0
  190. package/icons/outlined-flag/index.js +4 -0
  191. package/icons/pie-chart/index.d.ts +11 -0
  192. package/icons/pie-chart/index.js +4 -0
  193. package/icons/pie-chart-outline/index.d.ts +11 -0
  194. package/icons/pie-chart-outline/index.js +4 -0
  195. package/icons/policy/index.d.ts +11 -0
  196. package/icons/policy/index.js +4 -0
  197. package/icons/post-add/index.d.ts +11 -0
  198. package/icons/post-add/index.js +4 -0
  199. package/icons/publish/index.d.ts +11 -0
  200. package/icons/publish/index.js +4 -0
  201. package/icons/push-pin/index.d.ts +11 -0
  202. package/icons/push-pin/index.js +4 -0
  203. package/icons/redo/index.d.ts +11 -0
  204. package/icons/redo/index.js +4 -0
  205. package/icons/remove/index.d.ts +11 -0
  206. package/icons/remove/index.js +4 -0
  207. package/icons/remove-circle/index.d.ts +11 -0
  208. package/icons/remove-circle/index.js +4 -0
  209. package/icons/remove-circle-outline/index.d.ts +11 -0
  210. package/icons/remove-circle-outline/index.js +4 -0
  211. package/icons/reply-all/index.d.ts +11 -0
  212. package/icons/reply-all/index.js +4 -0
  213. package/icons/report/index.d.ts +11 -0
  214. package/icons/report/index.js +4 -0
  215. package/icons/report-off/index.d.ts +11 -0
  216. package/icons/report-off/index.js +4 -0
  217. package/icons/report-outline/index.d.ts +11 -0
  218. package/icons/report-outline/index.js +4 -0
  219. package/icons/save/index.d.ts +11 -0
  220. package/icons/save/index.js +4 -0
  221. package/icons/save-alt/index.d.ts +11 -0
  222. package/icons/save-alt/index.js +4 -0
  223. package/icons/scatter-plot/index.d.ts +11 -0
  224. package/icons/scatter-plot/index.js +4 -0
  225. package/icons/score/index.d.ts +11 -0
  226. package/icons/score/index.js +4 -0
  227. package/icons/select-all/index.d.ts +11 -0
  228. package/icons/select-all/index.js +4 -0
  229. package/icons/short-text/index.d.ts +11 -0
  230. package/icons/short-text/index.js +4 -0
  231. package/icons/show-chart/index.d.ts +11 -0
  232. package/icons/show-chart/index.js +4 -0
  233. package/icons/smart-toy/index.d.ts +11 -0
  234. package/icons/smart-toy/index.js +4 -0
  235. package/icons/sort/index.d.ts +11 -0
  236. package/icons/sort/index.js +4 -0
  237. package/icons/space-bar/index.d.ts +11 -0
  238. package/icons/space-bar/index.js +4 -0
  239. package/icons/square-foot/index.d.ts +11 -0
  240. package/icons/square-foot/index.js +4 -0
  241. package/icons/stacked-line-chart/index.d.ts +11 -0
  242. package/icons/stacked-line-chart/index.js +4 -0
  243. package/icons/strikethrough-s/index.d.ts +11 -0
  244. package/icons/strikethrough-s/index.js +4 -0
  245. package/icons/subscript/index.d.ts +11 -0
  246. package/icons/subscript/index.js +4 -0
  247. package/icons/superscript/index.d.ts +11 -0
  248. package/icons/superscript/index.js +4 -0
  249. package/icons/table-chart/index.d.ts +11 -0
  250. package/icons/table-chart/index.js +4 -0
  251. package/icons/table-rows/index.d.ts +11 -0
  252. package/icons/table-rows/index.js +4 -0
  253. package/icons/text-fields/index.d.ts +11 -0
  254. package/icons/text-fields/index.js +4 -0
  255. package/icons/text-format/index.d.ts +11 -0
  256. package/icons/text-format/index.js +4 -0
  257. package/icons/title/index.d.ts +11 -0
  258. package/icons/title/index.js +4 -0
  259. package/icons/unarchive/index.d.ts +11 -0
  260. package/icons/unarchive/index.js +4 -0
  261. package/icons/vertical-align-bottom/index.d.ts +11 -0
  262. package/icons/vertical-align-bottom/index.js +4 -0
  263. package/icons/vertical-align-center/index.d.ts +11 -0
  264. package/icons/vertical-align-center/index.js +4 -0
  265. package/icons/vertical-align-top/index.d.ts +11 -0
  266. package/icons/vertical-align-top/index.js +4 -0
  267. package/icons/waves/index.d.ts +11 -0
  268. package/icons/waves/index.js +4 -0
  269. package/icons/weekend/index.d.ts +11 -0
  270. package/icons/weekend/index.js +4 -0
  271. package/icons/where-to-vote/index.d.ts +11 -0
  272. package/icons/where-to-vote/index.js +4 -0
  273. package/icons/wrap-text/index.d.ts +11 -0
  274. package/icons/wrap-text/index.js +4 -0
  275. package/index.d.ts +137 -0
  276. package/index.js +138 -1
  277. package/package.json +3 -5
  278. package/popover/index.js +1 -1
  279. package/search/index.js +55 -42
  280. package/search-option/index.d.ts +1 -1
  281. package/search-option/index.js +4 -4
  282. package/segment/index.d.ts +2 -1
  283. package/segment/index.js +16 -3
  284. package/segment-collapse/index.d.ts +1 -0
  285. package/segment-collapse/index.js +23 -25
  286. package/segmented-control/index.d.ts +20 -0
  287. package/segmented-control/index.js +208 -0
  288. package/segmented-control-option/index.d.ts +29 -0
  289. package/segmented-control-option/index.js +112 -0
  290. package/segmented-icon-control/index.d.ts +22 -0
  291. package/segmented-icon-control/index.js +126 -0
  292. package/segmented-icon-control-option/index.d.ts +27 -0
  293. package/segmented-icon-control-option/index.js +103 -0
  294. package/tabs/index.js +1 -1
  295. package/tabs-option/index.js +10 -26
package/search/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import _classPrivateFieldGet from '@babel/runtime/helpers/classPrivateFieldGet';
2
2
  import _classPrivateFieldSet from '@babel/runtime/helpers/classPrivateFieldSet';
3
3
 
4
- var _$label, _$input, _selectionStart, _selectionEnd, _$optionSlot, _$listbox, _$clear, _isPendingDk, _onCompositionStart, _onInput, _onValueChange, _onClearMouseDown, _onClear, _onInputFocus, _onInputBlur, _onListboxClick, _onListboxKeyPress, _onListboxKeyDown, _onOptionSlotChange, _onExpand, _onCollapse, _getFirstOption, _getLastOption, _getNextOption, _getPrevOption, _selectOption, _getOptionElements;
4
+ var _$label, _$input, _selectionStart, _selectionEnd, _$optionSlot, _$listbox, _$clear, _isPendingDk, _sh, _onCompositionStart, _onInput, _onValueChange, _onClearMouseDown, _onClear, _onInputFocus, _onInputBlur, _onListboxClick, _onListboxKeyUp, _onListboxKeyDown, _onOptionSlotChange, _onExpand, _onCollapse, _getFirstOption, _getLastOption, _getNextOption, _getPrevOption, _selectOption, _findSelectedOption;
5
5
 
6
6
  function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
7
7
 
@@ -11,31 +11,20 @@ function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollect
11
11
 
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
- import { isSearchOptionElement } from '../search-option';
15
- import { attrValueToPixels, defineCustomElement, getAttribute, getIntegerAttribute, getRect, NectaryElement, updateAttribute, updateIntegerAttribute } from '../utils';
16
- const templateHTML = '<style>:host{display:inline-block;vertical-align:middle;outline:0}#wrapper{position:relative;width:100%;box-sizing:border-box;--sinch-size-icon:24px}#label{display:none;font:var(--sinch-font-title-s);color:var(--sinch-color-text-default);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%;height:24px;margin-bottom:2px}#input{all:initial;display:block;border:1px solid var(--sinch-color-stormy-200);box-sizing:border-box;border-radius:4px;width:100%;height:48px;padding:0 44px;padding-right:12px;font:var(--sinch-font-body);color:var(--sinch-color-text-default);caret-color:var(--sinch-caret-color,auto);background-color:var(--sinch-color-snow-100)}#input::placeholder{font:var(--sinch-font-body);color:var(--sinch-color-text-muted)}#input:focus{border-color:var(--sinch-color-stormy-600)}#icon-search{position:absolute;left:12px;top:12px;pointer-events:none;--sinch-color-icon:var(--sinch-color-stormy-500)}#clear{position:absolute;right:8px;top:8px;display:none;--sinch-color-icon:red}#clear:focus{--sinch-color-icon:var(--sinch-color-stormy-500)}:host([value]:not([value=""])) #clear{display:flex}:host([value]:not([value=""])) #input{padding-right:44px}#listbox{display:none;position:absolute;z-index:1;left:0;top:calc(100% + 8px);width:100%;box-sizing:border-box;font:var(--sinch-font-body);color:var(--sinch-color-text-default);background-color:var(--sinch-color-snow-100);box-shadow:1px 2px 4px rgba(0,0,0,.15);overflow-y:auto;contain:content}:host([aria-expanded=true]) #listbox{display:block}:host([label]:not([label=""])) #label{display:block}</style><label id="label" for="input"></label><div id="wrapper"><input id="input" type="text"/><sinch-icon-search id="icon-search"></sinch-icon-search><sinch-icon-button id="clear" small><sinch-icon-close id="icon-close" slot="icon"></sinch-icon-close></sinch-icon-button><div id="listbox"><slot name="option"></slot></div></div>';
14
+ import { isSinchSearchOptionElement } from '../search-option';
15
+ import { attrValueToPixels, defineCustomElement, getAttribute, getBooleanAttribute, getIntegerAttribute, getRect, NectaryElement, updateAttribute, updateIntegerAttribute } from '../utils';
16
+ const templateHTML = '<style>:host{display:inline-block;vertical-align:middle;outline:0}#wrapper{position:relative;width:100%;box-sizing:border-box;--sinch-size-icon:24px}#label{display:none;font:var(--sinch-font-title-s);color:var(--sinch-color-text-default);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%;height:24px;margin-bottom:2px}#input{all:initial;display:block;border:1px solid var(--sinch-color-stormy-200);box-sizing:border-box;border-radius:4px;width:100%;height:48px;padding:0 44px;padding-right:12px;font:var(--sinch-font-body);color:var(--sinch-color-text-default);caret-color:var(--sinch-caret-color,auto);background-color:var(--sinch-color-snow-100)}#input::placeholder{font:var(--sinch-font-body);color:var(--sinch-color-text-muted)}#input:focus{border-color:var(--sinch-color-stormy-600)}#icon-search{position:absolute;left:12px;top:12px;pointer-events:none;--sinch-color-icon:var(--sinch-color-stormy-500)}#clear{position:absolute;right:8px;top:8px;display:none;--sinch-color-icon:red}#clear:focus{--sinch-color-icon:var(--sinch-color-stormy-500)}:host([value]:not([value=""])) #clear{display:flex}:host([value]:not([value=""])) #input{padding-right:44px}#listbox{display:none;position:absolute;z-index:1;left:0;top:calc(100% + 8px);width:100%;box-sizing:border-box;font:var(--sinch-font-body);color:var(--sinch-color-text-default);background-color:var(--sinch-color-snow-100);box-shadow:1px 2px 4px rgba(0,0,0,.15);overflow-y:auto}:host([aria-expanded=true]) #listbox{display:block}:host([label]:not([label=""])) #label{display:block}</style><label id="label" for="input"></label><div id="wrapper"><input id="input" type="text"/><sinch-icon-search id="icon-search"></sinch-icon-search><sinch-icon-button id="clear" small><sinch-icon-close id="icon-close" slot="icon"></sinch-icon-close></sinch-icon-button><div id="listbox"><slot name="option"></slot></div></div>';
17
17
  import '../icons/search';
18
18
  import '../icons/close';
19
19
  import '../icon-button';
20
20
  const ITEM_HEIGHT = 40;
21
-
22
- const findSelectedOption = elements => {
23
- for (const el of elements) {
24
- if (el.selected) {
25
- return el;
26
- }
27
- }
28
-
29
- return null;
30
- };
31
-
32
21
  const template = document.createElement('template');
33
22
  template.innerHTML = templateHTML;
34
- defineCustomElement('sinch-search', (_$label = new WeakMap(), _$input = new WeakMap(), _selectionStart = new WeakMap(), _selectionEnd = new WeakMap(), _$optionSlot = new WeakMap(), _$listbox = new WeakMap(), _$clear = new WeakMap(), _isPendingDk = new WeakMap(), _onCompositionStart = new WeakMap(), _onInput = new WeakMap(), _onValueChange = new WeakSet(), _onClearMouseDown = new WeakMap(), _onClear = new WeakMap(), _onInputFocus = new WeakMap(), _onInputBlur = new WeakMap(), _onListboxClick = new WeakMap(), _onListboxKeyPress = new WeakMap(), _onListboxKeyDown = new WeakMap(), _onOptionSlotChange = new WeakMap(), _onExpand = new WeakSet(), _onCollapse = new WeakSet(), _getFirstOption = new WeakSet(), _getLastOption = new WeakSet(), _getNextOption = new WeakSet(), _getPrevOption = new WeakSet(), _selectOption = new WeakSet(), _getOptionElements = new WeakSet(), class extends NectaryElement {
23
+ defineCustomElement('sinch-search', (_$label = new WeakMap(), _$input = new WeakMap(), _selectionStart = new WeakMap(), _selectionEnd = new WeakMap(), _$optionSlot = new WeakMap(), _$listbox = new WeakMap(), _$clear = new WeakMap(), _isPendingDk = new WeakMap(), _sh = new WeakMap(), _onCompositionStart = new WeakMap(), _onInput = new WeakMap(), _onValueChange = new WeakSet(), _onClearMouseDown = new WeakMap(), _onClear = new WeakMap(), _onInputFocus = new WeakMap(), _onInputBlur = new WeakMap(), _onListboxClick = new WeakMap(), _onListboxKeyUp = new WeakMap(), _onListboxKeyDown = new WeakMap(), _onOptionSlotChange = new WeakMap(), _onExpand = new WeakSet(), _onCollapse = new WeakSet(), _getFirstOption = new WeakSet(), _getLastOption = new WeakSet(), _getNextOption = new WeakSet(), _getPrevOption = new WeakSet(), _selectOption = new WeakSet(), _findSelectedOption = new WeakSet(), class extends NectaryElement {
35
24
  constructor() {
36
25
  super();
37
26
 
38
- _classPrivateMethodInitSpec(this, _getOptionElements);
27
+ _classPrivateMethodInitSpec(this, _findSelectedOption);
39
28
 
40
29
  _classPrivateMethodInitSpec(this, _selectOption);
41
30
 
@@ -93,6 +82,11 @@ defineCustomElement('sinch-search', (_$label = new WeakMap(), _$input = new Weak
93
82
  value: false
94
83
  });
95
84
 
85
+ _classPrivateFieldInitSpec(this, _sh, {
86
+ writable: true,
87
+ value: void 0
88
+ });
89
+
96
90
  _classPrivateFieldInitSpec(this, _onCompositionStart, {
97
91
  writable: true,
98
92
  value: () => {
@@ -147,7 +141,7 @@ defineCustomElement('sinch-search', (_$label = new WeakMap(), _$input = new Weak
147
141
  e.stopPropagation();
148
142
  const $elem = e.target;
149
143
 
150
- if (isSearchOptionElement($elem)) {
144
+ if (isSinchSearchOptionElement($elem)) {
151
145
  _classPrivateMethodGet(this, _onValueChange, _onValueChange2).call(this, $elem.text);
152
146
  }
153
147
 
@@ -155,17 +149,18 @@ defineCustomElement('sinch-search', (_$label = new WeakMap(), _$input = new Weak
155
149
  }
156
150
  });
157
151
 
158
- _classPrivateFieldInitSpec(this, _onListboxKeyPress, {
152
+ _classPrivateFieldInitSpec(this, _onListboxKeyUp, {
159
153
  writable: true,
160
154
  value: e => {
161
155
  switch (e.code) {
162
156
  case 'Enter':
163
157
  {
164
158
  e.preventDefault();
165
- const $elem = findSelectedOption(_classPrivateMethodGet(this, _getOptionElements, _getOptionElements2).call(this));
166
159
 
167
- if ($elem != null) {
168
- _classPrivateMethodGet(this, _onValueChange, _onValueChange2).call(this, $elem.text);
160
+ const $opt = _classPrivateMethodGet(this, _findSelectedOption, _findSelectedOption2).call(this);
161
+
162
+ if ($opt != null) {
163
+ _classPrivateMethodGet(this, _onValueChange, _onValueChange2).call(this, $opt.text);
169
164
  }
170
165
 
171
166
  _classPrivateMethodGet(this, _onCollapse, _onCollapse2).call(this);
@@ -183,6 +178,7 @@ defineCustomElement('sinch-search', (_$label = new WeakMap(), _$input = new Weak
183
178
  case 'ArrowUp':
184
179
  {
185
180
  e.preventDefault();
181
+ e.stopPropagation();
186
182
 
187
183
  _classPrivateMethodGet(this, _selectOption, _selectOption2).call(this, _classPrivateMethodGet(this, _getPrevOption, _getPrevOption2).call(this));
188
184
 
@@ -192,6 +188,7 @@ defineCustomElement('sinch-search', (_$label = new WeakMap(), _$input = new Weak
192
188
  case 'ArrowDown':
193
189
  {
194
190
  e.preventDefault();
191
+ e.stopPropagation();
195
192
 
196
193
  _classPrivateMethodGet(this, _selectOption, _selectOption2).call(this, _classPrivateMethodGet(this, _getNextOption, _getNextOption2).call(this));
197
194
 
@@ -213,6 +210,12 @@ defineCustomElement('sinch-search', (_$label = new WeakMap(), _$input = new Weak
213
210
  _classPrivateFieldInitSpec(this, _onOptionSlotChange, {
214
211
  writable: true,
215
212
  value: () => {
213
+ const $opts = _classPrivateFieldGet(this, _$optionSlot).assignedElements();
214
+
215
+ if ($opts.length === 0) {
216
+ return _classPrivateMethodGet(this, _onCollapse, _onCollapse2).call(this);
217
+ }
218
+
216
219
  _classPrivateMethodGet(this, _onExpand, _onExpand2).call(this);
217
220
  }
218
221
  });
@@ -220,6 +223,8 @@ defineCustomElement('sinch-search', (_$label = new WeakMap(), _$input = new Weak
220
223
  const shadowRoot = this.attachShadow();
221
224
  shadowRoot.appendChild(template.content.cloneNode(true));
222
225
 
226
+ _classPrivateFieldSet(this, _sh, shadowRoot);
227
+
223
228
  _classPrivateFieldSet(this, _$input, shadowRoot.querySelector('#input'));
224
229
 
225
230
  _classPrivateFieldSet(this, _$label, shadowRoot.querySelector('#label'));
@@ -246,9 +251,9 @@ defineCustomElement('sinch-search', (_$label = new WeakMap(), _$input = new Weak
246
251
 
247
252
  _classPrivateFieldGet(this, _$input).addEventListener('keydown', _classPrivateFieldGet(this, _onListboxKeyDown));
248
253
 
249
- _classPrivateFieldGet(this, _$input).addEventListener('keypress', _classPrivateFieldGet(this, _onListboxKeyPress));
254
+ _classPrivateFieldGet(this, _$input).addEventListener('keyup', _classPrivateFieldGet(this, _onListboxKeyUp));
250
255
 
251
- _classPrivateFieldGet(this, _$listbox).addEventListener('click', _classPrivateFieldGet(this, _onListboxClick));
256
+ _classPrivateFieldGet(this, _$listbox).addEventListener('mousedown', _classPrivateFieldGet(this, _onListboxClick));
252
257
 
253
258
  _classPrivateFieldGet(this, _$optionSlot).addEventListener('slotchange', _classPrivateFieldGet(this, _onOptionSlotChange));
254
259
 
@@ -268,9 +273,9 @@ defineCustomElement('sinch-search', (_$label = new WeakMap(), _$input = new Weak
268
273
 
269
274
  _classPrivateFieldGet(this, _$input).removeEventListener('keydown', _classPrivateFieldGet(this, _onListboxKeyDown));
270
275
 
271
- _classPrivateFieldGet(this, _$input).removeEventListener('keypress', _classPrivateFieldGet(this, _onListboxKeyPress));
276
+ _classPrivateFieldGet(this, _$input).removeEventListener('keyup', _classPrivateFieldGet(this, _onListboxKeyUp));
272
277
 
273
- _classPrivateFieldGet(this, _$listbox).removeEventListener('click', _classPrivateFieldGet(this, _onListboxClick));
278
+ _classPrivateFieldGet(this, _$listbox).removeEventListener('mousedown', _classPrivateFieldGet(this, _onListboxClick));
274
279
 
275
280
  _classPrivateFieldGet(this, _$optionSlot).removeEventListener('slotchange', _classPrivateFieldGet(this, _onOptionSlotChange));
276
281
 
@@ -444,17 +449,17 @@ function _onValueChange2(nextValue) {
444
449
  }
445
450
 
446
451
  function _onExpand2() {
447
- const elems = _classPrivateMethodGet(this, _getOptionElements, _getOptionElements2).call(this);
452
+ const isOpen = getBooleanAttribute(this, 'aria-expanded');
448
453
 
449
- if (elems.length === 0 || this.getRootNode().activeElement !== this) {
450
- _classPrivateMethodGet(this, _onCollapse, _onCollapse2).call(this);
454
+ const $opts = _classPrivateFieldGet(this, _$optionSlot).assignedElements();
451
455
 
452
- return;
453
- }
456
+ if (!isOpen && $opts.length > 0 && _classPrivateFieldGet(this, _sh).activeElement === _classPrivateFieldGet(this, _$input)) {
457
+ const opt = _classPrivateMethodGet(this, _getFirstOption, _getFirstOption2).call(this);
454
458
 
455
- this.setAttribute('aria-expanded', 'true');
459
+ _classPrivateMethodGet(this, _selectOption, _selectOption2).call(this, opt);
456
460
 
457
- _classPrivateMethodGet(this, _selectOption, _selectOption2).call(this, elems[0]);
461
+ this.setAttribute('aria-expanded', 'true');
462
+ }
458
463
  }
459
464
 
460
465
  function _onCollapse2() {
@@ -462,17 +467,18 @@ function _onCollapse2() {
462
467
  }
463
468
 
464
469
  function _getFirstOption2() {
465
- return _classPrivateMethodGet(this, _getOptionElements, _getOptionElements2).call(this)[0] ?? null;
470
+ return _classPrivateFieldGet(this, _$optionSlot).assignedElements().filter(isSinchSearchOptionElement)[0] ?? null;
466
471
  }
467
472
 
468
473
  function _getLastOption2() {
469
- return _classPrivateMethodGet(this, _getOptionElements, _getOptionElements2).call(this).reverse()[0] ?? null;
474
+ return _classPrivateFieldGet(this, _$optionSlot).assignedElements().filter(isSinchSearchOptionElement).reverse()[0] ?? null;
470
475
  }
471
476
 
472
477
  function _getNextOption2() {
473
- const $options = _classPrivateMethodGet(this, _getOptionElements, _getOptionElements2).call(this);
478
+ const $options = _classPrivateFieldGet(this, _$optionSlot).assignedElements().filter(isSinchSearchOptionElement);
479
+
480
+ const $selectedOption = _classPrivateMethodGet(this, _findSelectedOption, _findSelectedOption2).call(this);
474
481
 
475
- const $selectedOption = findSelectedOption($options);
476
482
  const currentIndex = $selectedOption !== null ? $options.indexOf($selectedOption) : -1;
477
483
 
478
484
  if (currentIndex < 0) {
@@ -483,9 +489,10 @@ function _getNextOption2() {
483
489
  }
484
490
 
485
491
  function _getPrevOption2() {
486
- const $options = _classPrivateMethodGet(this, _getOptionElements, _getOptionElements2).call(this);
492
+ const $options = _classPrivateFieldGet(this, _$optionSlot).assignedElements().filter(isSinchSearchOptionElement);
493
+
494
+ const $selectedOption = _classPrivateMethodGet(this, _findSelectedOption, _findSelectedOption2).call(this);
487
495
 
488
- const $selectedOption = findSelectedOption($options);
489
496
  const currentIndex = $selectedOption !== null ? $options.indexOf($selectedOption) : -1;
490
497
 
491
498
  if (currentIndex < 0) {
@@ -496,7 +503,7 @@ function _getPrevOption2() {
496
503
  }
497
504
 
498
505
  function _selectOption2($option) {
499
- for (const $op of _classPrivateMethodGet(this, _getOptionElements, _getOptionElements2).call(this)) {
506
+ for (const $op of _classPrivateFieldGet(this, _$optionSlot).assignedElements()) {
500
507
  const isSelected = $op === $option;
501
508
  $op.selected = isSelected;
502
509
 
@@ -508,6 +515,12 @@ function _selectOption2($option) {
508
515
  }
509
516
  }
510
517
 
511
- function _getOptionElements2() {
512
- return _classPrivateFieldGet(this, _$optionSlot).assignedElements().filter(isSearchOptionElement);
518
+ function _findSelectedOption2() {
519
+ for (const el of _classPrivateFieldGet(this, _$optionSlot).assignedElements()) {
520
+ if (isSinchSearchOptionElement(el) && el.selected) {
521
+ return el;
522
+ }
523
+ }
524
+
525
+ return null;
513
526
  }
@@ -1,5 +1,5 @@
1
1
  import type { TSinchElementReact } from '../types';
2
- export declare const isSearchOptionElement: (element: EventTarget | Element | null) => element is TSinchSearchOptionElement;
2
+ export declare const isSinchSearchOptionElement: (element: EventTarget | Element | null) => element is TSinchSearchOptionElement;
3
3
  export declare type TSinchSearchOptionElement = HTMLElement & {
4
4
  text: string;
5
5
  selected: boolean;
@@ -12,7 +12,7 @@ template.innerHTML = templateHTML;
12
12
 
13
13
  var _$content = new WeakMap();
14
14
 
15
- class SearchOption extends NectaryElement {
15
+ class SinchSearchOption extends NectaryElement {
16
16
  constructor() {
17
17
  super();
18
18
 
@@ -68,7 +68,7 @@ class SearchOption extends NectaryElement {
68
68
 
69
69
  }
70
70
 
71
- defineCustomElement('sinch-search-option', SearchOption);
72
- export const isSearchOptionElement = element => {
73
- return element instanceof SearchOption;
71
+ defineCustomElement('sinch-search-option', SinchSearchOption);
72
+ export const isSinchSearchOptionElement = element => {
73
+ return element instanceof SinchSearchOption;
74
74
  };
@@ -1,7 +1,8 @@
1
- import type { TSinchElementReact } from '../types';
1
+ import type { TRect, TSinchElementReact } from '../types';
2
2
  declare type TSinchSegmentElement = HTMLElement & {
3
3
  caption: string;
4
4
  collapsed: boolean;
5
+ readonly collapseButtonRect: TRect | null;
5
6
  };
6
7
  declare type TSinchSegmentReact = TSinchElementReact<TSinchSegmentElement> & {
7
8
  caption: string;
package/segment/index.js CHANGED
@@ -1,17 +1,17 @@
1
1
  import _classPrivateFieldGet from '@babel/runtime/helpers/classPrivateFieldGet';
2
2
  import _classPrivateFieldSet from '@babel/runtime/helpers/classPrivateFieldSet';
3
3
 
4
- var _$caption;
4
+ var _$caption, _$collapseSlot;
5
5
 
6
6
  function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
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, NectaryElement, updateAttribute, updateBooleanAttribute } from '../utils';
10
+ import { defineCustomElement, getAttribute, getBooleanAttribute, getRect, NectaryElement, updateAttribute, updateBooleanAttribute } from '../utils';
11
11
  const templateHTML = '<style>:host{display:block}#wrapper{display:flex;flex-direction:column;width:100%;height:100%;border-radius:4px;box-sizing:border-box;background-color:var(--sinch-color-snow-100);color:var(--sinch-color-text-default);font:var(--sinch-font-body);border:none;box-shadow:1px 2px 8px rgba(0,0,0,.1)}#header{position:relative;display:flex;flex-direction:row;align-items:center;gap:16px;height:32px;padding:24px 32px 16px;--sinch-size-icon:32px}#caption{font:var(--sinch-font-title-l);color:var(--sinch-color-text-default);flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}#content-wrapper{padding:0 32px;flex:1;min-height:0;overflow:auto}#action{display:flex;flex-direction:row;justify-content:flex-end;gap:16px;padding:16px 32px 24px}#info{position:relative;display:flex;flex-direction:row;align-items:center;gap:16px;z-index:1}:host([collapsed]:not([collapsed=false])) :is(#content-wrapper,#action){display:none}:host([collapsed]:not([collapsed=false])) #header{padding-bottom:24px}</style><div id="wrapper"><div id="header"><slot name="icon"></slot><span id="caption"></span><div id="info"><slot name="info"></slot></div><slot name="collapse"></slot></div><div id="content-wrapper"><slot name="content"></slot></div><div id="action"><slot name="action"></slot></div></div>';
12
12
  const template = document.createElement('template');
13
13
  template.innerHTML = templateHTML;
14
- defineCustomElement('sinch-segment', (_$caption = new WeakMap(), class extends NectaryElement {
14
+ defineCustomElement('sinch-segment', (_$caption = new WeakMap(), _$collapseSlot = new WeakMap(), class extends NectaryElement {
15
15
  constructor() {
16
16
  super();
17
17
 
@@ -20,10 +20,17 @@ defineCustomElement('sinch-segment', (_$caption = new WeakMap(), class extends N
20
20
  value: void 0
21
21
  });
22
22
 
23
+ _classPrivateFieldInitSpec(this, _$collapseSlot, {
24
+ writable: true,
25
+ value: void 0
26
+ });
27
+
23
28
  const shadowRoot = this.attachShadow();
24
29
  shadowRoot.appendChild(template.content.cloneNode(true));
25
30
 
26
31
  _classPrivateFieldSet(this, _$caption, shadowRoot.querySelector('#caption'));
32
+
33
+ _classPrivateFieldSet(this, _$collapseSlot, shadowRoot.querySelector('slot[name="collapse"]'));
27
34
  }
28
35
 
29
36
  static get observedAttributes() {
@@ -56,4 +63,10 @@ defineCustomElement('sinch-segment', (_$caption = new WeakMap(), class extends N
56
63
  return getBooleanAttribute(this, 'collapsed');
57
64
  }
58
65
 
66
+ get collapseButtonRect() {
67
+ const $collapseButton = _classPrivateFieldGet(this, _$collapseSlot).assignedElements()[0];
68
+
69
+ return $collapseButton != null ? getRect($collapseButton) : null;
70
+ }
71
+
59
72
  }));
@@ -1,5 +1,6 @@
1
1
  import '../icons/expand-less';
2
2
  import '../icons/expand-more';
3
+ import '../icon-button';
3
4
  import type { TSinchElementReact } from '../types';
4
5
  import type { FocusEvent, SyntheticEvent } from 'react';
5
6
  export declare type TSinchSegmentExpandElement = HTMLElement & {
@@ -2,7 +2,7 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
2
  import _classPrivateFieldGet from '@babel/runtime/helpers/classPrivateFieldGet';
3
3
  import _classPrivateFieldSet from '@babel/runtime/helpers/classPrivateFieldSet';
4
4
 
5
- var _$input;
5
+ var _$button;
6
6
 
7
7
  function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
8
8
 
@@ -10,27 +10,24 @@ function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollect
10
10
 
11
11
  import '../icons/expand-less';
12
12
  import '../icons/expand-more';
13
+ import '../icon-button';
13
14
  import { defineCustomElement, getBooleanAttribute, isAttrTrue, NectaryElement, updateBooleanAttribute } from '../utils';
14
- const templateHTML = '<style>:host{display:contents;--sinch-size-icon:32px}input{all:initial;position:absolute;left:0;top:0;width:100%;height:100%;box-sizing:border-box;cursor:pointer}input:focus~sinch-icon-expand-less,input:focus~sinch-icon-expand-more{border-radius:4px;box-shadow:0 0 0 1px var(--sinch-color-stormy-500) inset}#up{display:block}#down{display:none}:host([value]:not([value=false])) #up{display:none}:host([value]:not([value=false])) #down{display:block}</style><input type="checkbox"/><sinch-icon-expand-less id="up"></sinch-icon-expand-less><sinch-icon-expand-more id="down"></sinch-icon-expand-more>';
15
+ const templateHTML = '<style>:host{display:block;--sinch-size-icon:32px}#up{display:block}#down{display:none}:host([value]:not([value=false])) #up{display:none}:host([value]:not([value=false])) #down{display:block}</style><sinch-icon-button id="button" small><sinch-icon-expand-less id="up" slot="icon"></sinch-icon-expand-less><sinch-icon-expand-more id="down" slot="icon"></sinch-icon-expand-more></sinch-icon-button>';
15
16
  const template = document.createElement('template');
16
17
  template.innerHTML = templateHTML;
17
- defineCustomElement('sinch-segment-collapse', (_$input = new WeakMap(), class extends NectaryElement {
18
+ defineCustomElement('sinch-segment-collapse', (_$button = new WeakMap(), class extends NectaryElement {
18
19
  constructor() {
19
20
  super();
20
21
 
21
- _classPrivateFieldInitSpec(this, _$input, {
22
+ _classPrivateFieldInitSpec(this, _$button, {
22
23
  writable: true,
23
24
  value: void 0
24
25
  });
25
26
 
26
- _defineProperty(this, 'onCheckboxInput', e => {
27
+ _defineProperty(this, 'onClick', e => {
27
28
  e.stopPropagation();
28
-
29
- const isChecked = _classPrivateFieldGet(this, _$input).checked;
30
-
31
- _classPrivateFieldGet(this, _$input).checked = this.value;
32
29
  this.dispatchEvent(new CustomEvent('change', {
33
- detail: isChecked,
30
+ detail: !this.value,
34
31
  bubbles: true
35
32
  }));
36
33
  });
@@ -38,41 +35,42 @@ defineCustomElement('sinch-segment-collapse', (_$input = new WeakMap(), class ex
38
35
  const shadowRoot = this.attachShadow();
39
36
  shadowRoot.appendChild(template.content.cloneNode(true));
40
37
 
41
- _classPrivateFieldSet(this, _$input, shadowRoot.querySelector('input'));
38
+ _classPrivateFieldSet(this, _$button, shadowRoot.querySelector('#button'));
42
39
  }
43
40
 
44
41
  connectedCallback() {
45
42
  this.setAttribute('role', 'checkbox');
43
+ this.setAttribute('aria-checked', String(getBooleanAttribute(this, 'value')));
46
44
 
47
- _classPrivateFieldGet(this, _$input).addEventListener('input', this.onCheckboxInput);
45
+ _classPrivateFieldGet(this, _$button).addEventListener('click', this.onClick);
48
46
  }
49
47
 
50
48
  disconnectedCallback() {
51
- _classPrivateFieldGet(this, _$input).removeEventListener('input', this.onCheckboxInput);
52
- }
53
-
54
- get type() {
55
- return 'text';
56
- }
57
-
58
- get nodeName() {
59
- return 'input';
49
+ _classPrivateFieldGet(this, _$button).removeEventListener('click', this.onClick);
60
50
  }
61
51
 
62
52
  static get observedAttributes() {
63
53
  return ['value'];
64
54
  }
65
55
 
66
- attributeChangedCallback(name, _, newVal) {
56
+ attributeChangedCallback(name, oldVal, newVal) {
67
57
  switch (name) {
68
58
  case 'value':
69
59
  {
70
- _classPrivateFieldGet(this, _$input).checked = isAttrTrue(newVal);
60
+ this.setAttribute('aria-checked', String(isAttrTrue(newVal)));
71
61
  break;
72
62
  }
73
63
  }
74
64
  }
75
65
 
66
+ get type() {
67
+ return 'text';
68
+ }
69
+
70
+ get nodeName() {
71
+ return 'input';
72
+ }
73
+
76
74
  set value(isChecked) {
77
75
  updateBooleanAttribute(this, 'value', isChecked);
78
76
  }
@@ -82,11 +80,11 @@ defineCustomElement('sinch-segment-collapse', (_$input = new WeakMap(), class ex
82
80
  }
83
81
 
84
82
  focus() {
85
- _classPrivateFieldGet(this, _$input).focus();
83
+ _classPrivateFieldGet(this, _$button).focus();
86
84
  }
87
85
 
88
86
  blur() {
89
- _classPrivateFieldGet(this, _$input).blur();
87
+ _classPrivateFieldGet(this, _$button).blur();
90
88
  }
91
89
 
92
90
  }));
@@ -0,0 +1,20 @@
1
+ import type { TSinchElementReact } from '../types';
2
+ import type { SyntheticEvent } from 'react';
3
+ export declare type TSinchSegmentedControlElement = HTMLElement & {
4
+ value: string;
5
+ };
6
+ export declare type TSinchSegmentedControlReact = TSinchElementReact<TSinchSegmentedControlElement> & {
7
+ value: string;
8
+ 'aria-label': string;
9
+ onChange: (event: SyntheticEvent<TSinchSegmentedControlElement, CustomEvent<string>>) => void;
10
+ };
11
+ declare global {
12
+ namespace JSX {
13
+ interface IntrinsicElements {
14
+ 'sinch-segmented-control': TSinchSegmentedControlReact;
15
+ }
16
+ }
17
+ interface HTMLElementTagNameMap {
18
+ 'sinch-segmented-control': TSinchSegmentedControlElement;
19
+ }
20
+ }