@carbon/ibm-products-web-components 0.31.0 → 0.32.0-rc.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 (242) hide show
  1. package/custom-elements.json +414 -5
  2. package/es/components/about-modal/about-modal.scss.js +1 -1
  3. package/es/components/big-number/big-number-skeleton.d.ts +22 -0
  4. package/es/components/big-number/big-number-skeleton.js +56 -0
  5. package/es/components/big-number/big-number-skeleton.js.map +1 -0
  6. package/es/components/big-number/big-number-skeleton.scss.js +13 -0
  7. package/es/components/big-number/big-number-skeleton.scss.js.map +1 -0
  8. package/es/components/big-number/big-number.d.ts +37 -0
  9. package/es/components/big-number/big-number.js +184 -0
  10. package/es/components/big-number/big-number.js.map +1 -0
  11. package/es/components/big-number/big-number.scss.js +13 -0
  12. package/es/components/big-number/big-number.scss.js.map +1 -0
  13. package/es/{utilities/carousel/index.d.ts → components/big-number/big-number.test.d.ts} +1 -2
  14. package/es/components/big-number/big-number.test.js +113 -0
  15. package/es/components/big-number/big-number.test.js.map +1 -0
  16. package/es/components/big-number/constants.d.ts +19 -0
  17. package/es/components/big-number/constants.js +30 -0
  18. package/es/components/big-number/constants.js.map +1 -0
  19. package/es/components/big-number/index.d.ts +10 -0
  20. package/es/{node_modules/@carbon/utilities/es/dateTimeFormat → components/big-number}/index.js +2 -5
  21. package/es/components/big-number/index.js.map +1 -0
  22. package/es/components/checklist/checklist.scss.js +1 -1
  23. package/es/components/coachmark/coachmark-tagline/coachmark-tagline.d.ts +422 -0
  24. package/es/components/coachmark/coachmark-tagline/coachmark-tagline.js +135 -0
  25. package/es/components/coachmark/coachmark-tagline/coachmark-tagline.js.map +1 -0
  26. package/es/components/coachmark/coachmark-tagline/coachmark-tagline.scss.js +13 -0
  27. package/es/components/coachmark/coachmark-tagline/coachmark-tagline.scss.js.map +1 -0
  28. package/es/{utilities/carousel/types.js → components/coachmark/coachmark-tagline/coachmark-tagline.test.d.ts} +4 -3
  29. package/es/components/coachmark/coachmark-tagline/coachmark-tagline.test.js +126 -0
  30. package/es/components/coachmark/coachmark-tagline/coachmark-tagline.test.js.map +1 -0
  31. package/es/components/coachmark/coachmark-tagline/index.d.ts +9 -0
  32. package/{es-custom/utilities/carousel → es/components/coachmark/coachmark-tagline}/index.js +1 -1
  33. package/es/components/coachmark/coachmark-tagline/index.js.map +1 -0
  34. package/es/components/guide-banner/guide-banner-element.d.ts +7 -0
  35. package/es/components/guide-banner/guide-banner-element.js +14 -0
  36. package/es/components/guide-banner/guide-banner-element.js.map +1 -1
  37. package/es/components/guide-banner/guide-banner-element.scss.js +13 -0
  38. package/es/components/guide-banner/guide-banner-element.scss.js.map +1 -0
  39. package/es/components/guide-banner/guide-banner-element.test.d.ts +7 -0
  40. package/es/components/guide-banner/guide-banner-element.test.js +58 -0
  41. package/es/components/guide-banner/guide-banner-element.test.js.map +1 -0
  42. package/es/components/guide-banner/guide-banner.d.ts +4 -4
  43. package/es/components/guide-banner/guide-banner.js +4 -4
  44. package/es/components/guide-banner/guide-banner.js.map +1 -1
  45. package/es/components/guide-banner/guide-banner.scss.js +1 -1
  46. package/es/components/guide-banner/guide-banner.test.d.ts +6 -0
  47. package/es/components/guide-banner/guide-banner.test.js +3 -3
  48. package/es/components/guide-banner/guide-banner.test.js.map +1 -1
  49. package/es/components/interstitial-screen/interstitial-screen-body-item.scss.js +1 -1
  50. package/es/components/interstitial-screen/interstitial-screen-body.d.ts +1 -0
  51. package/es/components/interstitial-screen/interstitial-screen-body.js +16 -4
  52. package/es/components/interstitial-screen/interstitial-screen-body.js.map +1 -1
  53. package/es/components/interstitial-screen/interstitial-screen-body.scss.js +1 -1
  54. package/es/components/interstitial-screen/interstitial-screen-context.d.ts +1 -0
  55. package/es/components/interstitial-screen/interstitial-screen-context.js +5 -0
  56. package/es/components/interstitial-screen/interstitial-screen-context.js.map +1 -1
  57. package/es/components/interstitial-screen/interstitial-screen.js +15 -0
  58. package/es/components/interstitial-screen/interstitial-screen.js.map +1 -1
  59. package/es/components/interstitial-screen/interstitial-screen.test.js +11 -0
  60. package/es/components/interstitial-screen/interstitial-screen.test.js.map +1 -1
  61. package/es/components/interstitial-screen/interstitial.figma.js +288 -0
  62. package/es/components/interstitial-screen/interstitial.figma.js.map +1 -0
  63. package/es/components/notification-panel/notification.js +2 -3
  64. package/es/components/notification-panel/notification.js.map +1 -1
  65. package/es/components/notification-panel/notification.test.js +2 -3
  66. package/es/components/notification-panel/notification.test.js.map +1 -1
  67. package/es/components/page-header/_story-assets/set-of-breadcrumbs.scss.js +1 -1
  68. package/es/components/page-header/_story-assets/set-of-tags/set-of-tags.js +2 -3
  69. package/es/components/page-header/_story-assets/set-of-tags/set-of-tags.js.map +1 -1
  70. package/es/components/page-header/_story-assets/set-of-tags/set-of-tags.scss.js +1 -1
  71. package/es/components/page-header/utils.js +17 -5
  72. package/es/components/page-header/utils.js.map +1 -1
  73. package/es/components/side-panel/side-panel.figma.js +229 -0
  74. package/es/components/side-panel/side-panel.figma.js.map +1 -0
  75. package/es/components/tearsheet/tearsheet.d.ts +33 -14
  76. package/es/components/tearsheet/tearsheet.js +65 -98
  77. package/es/components/tearsheet/tearsheet.js.map +1 -1
  78. package/es/components/tearsheet/tearsheet.scss.js +1 -1
  79. package/es/index.d.ts +4 -1
  80. package/es/index.js +3 -0
  81. package/es/index.js.map +1 -1
  82. package/es/packages/ibm-products-web-components/package.json.js +1 -1
  83. package/es/utilities/snapscroll/index.d.ts +7 -0
  84. package/es/utilities/snapscroll/index.js +9 -0
  85. package/es/utilities/snapscroll/index.js.map +1 -0
  86. package/es/utilities/snapscroll/snapscroll.d.ts +29 -0
  87. package/es/utilities/snapscroll/snapscroll.js +134 -0
  88. package/es/utilities/snapscroll/snapscroll.js.map +1 -0
  89. package/es/utilities/snapscroll/snapscroll.test.d.ts +1 -0
  90. package/es/utilities/snapscroll/snapscroll.test.js +41 -0
  91. package/es/utilities/snapscroll/snapscroll.test.js.map +1 -0
  92. package/es-custom/components/about-modal/about-modal.scss.js +1 -1
  93. package/es-custom/components/big-number/big-number-skeleton.d.ts +22 -0
  94. package/es-custom/components/big-number/big-number-skeleton.js +56 -0
  95. package/es-custom/components/big-number/big-number-skeleton.js.map +1 -0
  96. package/es-custom/components/big-number/big-number-skeleton.scss.js +13 -0
  97. package/es-custom/components/big-number/big-number-skeleton.scss.js.map +1 -0
  98. package/es-custom/components/big-number/big-number.d.ts +37 -0
  99. package/es-custom/components/big-number/big-number.js +184 -0
  100. package/es-custom/components/big-number/big-number.js.map +1 -0
  101. package/es-custom/components/big-number/big-number.scss.js +13 -0
  102. package/es-custom/components/big-number/big-number.scss.js.map +1 -0
  103. package/{lib/utilities/carousel/index.d.ts → es-custom/components/big-number/big-number.test.d.ts} +1 -2
  104. package/es-custom/components/big-number/big-number.test.js +113 -0
  105. package/es-custom/components/big-number/big-number.test.js.map +1 -0
  106. package/es-custom/components/big-number/constants.d.ts +19 -0
  107. package/es-custom/components/big-number/constants.js +30 -0
  108. package/es-custom/components/big-number/constants.js.map +1 -0
  109. package/es-custom/components/big-number/index.d.ts +10 -0
  110. package/es-custom/{node_modules/@carbon/utilities/es/dateTimeFormat → components/big-number}/index.js +2 -5
  111. package/es-custom/components/big-number/index.js.map +1 -0
  112. package/es-custom/components/checklist/checklist.scss.js +1 -1
  113. package/es-custom/components/coachmark/coachmark-tagline/coachmark-tagline.d.ts +422 -0
  114. package/es-custom/components/coachmark/coachmark-tagline/coachmark-tagline.js +135 -0
  115. package/es-custom/components/coachmark/coachmark-tagline/coachmark-tagline.js.map +1 -0
  116. package/es-custom/components/coachmark/coachmark-tagline/coachmark-tagline.scss.js +13 -0
  117. package/es-custom/components/coachmark/coachmark-tagline/coachmark-tagline.scss.js.map +1 -0
  118. package/es-custom/{utilities/carousel/types.js → components/coachmark/coachmark-tagline/coachmark-tagline.test.d.ts} +4 -3
  119. package/es-custom/components/coachmark/coachmark-tagline/coachmark-tagline.test.js +126 -0
  120. package/es-custom/components/coachmark/coachmark-tagline/coachmark-tagline.test.js.map +1 -0
  121. package/es-custom/components/coachmark/coachmark-tagline/index.d.ts +9 -0
  122. package/{es/utilities/carousel → es-custom/components/coachmark/coachmark-tagline}/index.js +1 -1
  123. package/es-custom/components/guide-banner/guide-banner-element.d.ts +7 -0
  124. package/es-custom/components/guide-banner/guide-banner-element.js +14 -0
  125. package/es-custom/components/guide-banner/guide-banner-element.js.map +1 -1
  126. package/es-custom/components/guide-banner/guide-banner-element.scss.js +13 -0
  127. package/es-custom/components/guide-banner/guide-banner-element.scss.js.map +1 -0
  128. package/es-custom/{utilities/carousel/index.d.ts → components/guide-banner/guide-banner-element.test.d.ts} +1 -2
  129. package/es-custom/components/guide-banner/guide-banner-element.test.js +58 -0
  130. package/es-custom/components/guide-banner/guide-banner-element.test.js.map +1 -0
  131. package/es-custom/components/guide-banner/guide-banner.d.ts +4 -4
  132. package/es-custom/components/guide-banner/guide-banner.js +4 -4
  133. package/es-custom/components/guide-banner/guide-banner.js.map +1 -1
  134. package/es-custom/components/guide-banner/guide-banner.scss.js +1 -1
  135. package/es-custom/components/guide-banner/guide-banner.test.d.ts +6 -0
  136. package/es-custom/components/guide-banner/guide-banner.test.js +3 -3
  137. package/es-custom/components/guide-banner/guide-banner.test.js.map +1 -1
  138. package/es-custom/components/interstitial-screen/interstitial-screen-body-item.scss.js +1 -1
  139. package/es-custom/components/interstitial-screen/interstitial-screen-body.d.ts +1 -0
  140. package/es-custom/components/interstitial-screen/interstitial-screen-body.js +16 -4
  141. package/es-custom/components/interstitial-screen/interstitial-screen-body.js.map +1 -1
  142. package/es-custom/components/interstitial-screen/interstitial-screen-body.scss.js +1 -1
  143. package/es-custom/components/interstitial-screen/interstitial-screen-context.d.ts +1 -0
  144. package/es-custom/components/interstitial-screen/interstitial-screen-context.js +5 -0
  145. package/es-custom/components/interstitial-screen/interstitial-screen-context.js.map +1 -1
  146. package/es-custom/components/interstitial-screen/interstitial-screen.js +15 -0
  147. package/es-custom/components/interstitial-screen/interstitial-screen.js.map +1 -1
  148. package/es-custom/components/interstitial-screen/interstitial-screen.test.js +11 -0
  149. package/es-custom/components/interstitial-screen/interstitial-screen.test.js.map +1 -1
  150. package/es-custom/components/interstitial-screen/interstitial.figma.js +288 -0
  151. package/es-custom/components/interstitial-screen/interstitial.figma.js.map +1 -0
  152. package/es-custom/components/notification-panel/notification.js +2 -3
  153. package/es-custom/components/notification-panel/notification.js.map +1 -1
  154. package/es-custom/components/notification-panel/notification.test.js +2 -3
  155. package/es-custom/components/notification-panel/notification.test.js.map +1 -1
  156. package/es-custom/components/page-header/_story-assets/set-of-breadcrumbs.scss.js +1 -1
  157. package/es-custom/components/page-header/_story-assets/set-of-tags/set-of-tags.js +2 -3
  158. package/es-custom/components/page-header/_story-assets/set-of-tags/set-of-tags.js.map +1 -1
  159. package/es-custom/components/page-header/_story-assets/set-of-tags/set-of-tags.scss.js +1 -1
  160. package/es-custom/components/page-header/utils.js +17 -5
  161. package/es-custom/components/page-header/utils.js.map +1 -1
  162. package/es-custom/components/side-panel/side-panel.figma.js +229 -0
  163. package/es-custom/components/side-panel/side-panel.figma.js.map +1 -0
  164. package/es-custom/components/tearsheet/tearsheet.d.ts +33 -14
  165. package/es-custom/components/tearsheet/tearsheet.js +65 -98
  166. package/es-custom/components/tearsheet/tearsheet.js.map +1 -1
  167. package/es-custom/components/tearsheet/tearsheet.scss.js +1 -1
  168. package/es-custom/index.d.ts +4 -1
  169. package/es-custom/index.js +3 -0
  170. package/es-custom/index.js.map +1 -1
  171. package/es-custom/packages/ibm-products-web-components/package.json.js +1 -1
  172. package/{es/utilities/carousel/swipeEvents.d.ts → es-custom/utilities/snapscroll/index.d.ts} +1 -1
  173. package/es-custom/utilities/snapscroll/index.js +9 -0
  174. package/es-custom/utilities/snapscroll/snapscroll.d.ts +29 -0
  175. package/es-custom/utilities/snapscroll/snapscroll.js +134 -0
  176. package/es-custom/utilities/snapscroll/snapscroll.js.map +1 -0
  177. package/es-custom/utilities/snapscroll/snapscroll.test.d.ts +1 -0
  178. package/es-custom/utilities/snapscroll/snapscroll.test.js +41 -0
  179. package/es-custom/utilities/snapscroll/snapscroll.test.js.map +1 -0
  180. package/lib/components/big-number/big-number-skeleton.d.ts +22 -0
  181. package/lib/components/big-number/big-number.d.ts +37 -0
  182. package/lib/components/big-number/big-number.test.d.ts +7 -0
  183. package/lib/components/big-number/constants.d.ts +19 -0
  184. package/lib/components/big-number/index.d.ts +10 -0
  185. package/lib/components/coachmark/coachmark-tagline/coachmark-tagline.d.ts +422 -0
  186. package/lib/components/coachmark/coachmark-tagline/coachmark-tagline.test.d.ts +9 -0
  187. package/lib/components/coachmark/coachmark-tagline/index.d.ts +9 -0
  188. package/lib/components/guide-banner/guide-banner-element.d.ts +7 -0
  189. package/lib/components/guide-banner/guide-banner-element.test.d.ts +7 -0
  190. package/lib/components/guide-banner/guide-banner.d.ts +4 -4
  191. package/lib/components/guide-banner/guide-banner.test.d.ts +6 -0
  192. package/lib/components/interstitial-screen/interstitial-screen-body.d.ts +1 -0
  193. package/lib/components/interstitial-screen/interstitial-screen-context.d.ts +1 -0
  194. package/lib/components/tearsheet/tearsheet.d.ts +33 -14
  195. package/lib/index.d.ts +4 -1
  196. package/lib/utilities/snapscroll/index.d.ts +7 -0
  197. package/lib/utilities/snapscroll/snapscroll.d.ts +29 -0
  198. package/lib/utilities/snapscroll/snapscroll.test.d.ts +1 -0
  199. package/package.json +6 -3
  200. package/scss/components/big-number/big-number-skeleton.scss +59 -0
  201. package/scss/components/big-number/big-number.scss +27 -0
  202. package/scss/components/coachmark/coachmark-tagline/coachmark-tagline.scss +22 -0
  203. package/scss/components/guide-banner/guide-banner-element.scss +31 -0
  204. package/scss/components/guide-banner/guide-banner.scss +2 -0
  205. package/scss/components/interstitial-screen/interstitial-screen-body-item.scss +1 -1
  206. package/scss/components/interstitial-screen/interstitial-screen-body.scss +1 -1
  207. package/scss/components/page-header/_story-assets/_storybook-styles.scss +6 -4
  208. package/telemetry.yml +12 -3
  209. package/es/node_modules/@carbon/utilities/es/dateTimeFormat/index.js.map +0 -1
  210. package/es/node_modules/@carbon/utilities/es/dateTimeFormat/relative.js +0 -11
  211. package/es/node_modules/@carbon/utilities/es/dateTimeFormat/relative.js.map +0 -1
  212. package/es/node_modules/@carbon/utilities/es/documentLang/documentLang.js +0 -9
  213. package/es/node_modules/@carbon/utilities/es/documentLang/documentLang.js.map +0 -1
  214. package/es/node_modules/@carbon/utilities/es/overflowHandler/overflowHandler.js +0 -11
  215. package/es/node_modules/@carbon/utilities/es/overflowHandler/overflowHandler.js.map +0 -1
  216. package/es/utilities/carousel/carousel.d.ts +0 -14
  217. package/es/utilities/carousel/carousel.js +0 -341
  218. package/es/utilities/carousel/carousel.js.map +0 -1
  219. package/es/utilities/carousel/swipeEvents.js +0 -109
  220. package/es/utilities/carousel/swipeEvents.js.map +0 -1
  221. package/es/utilities/carousel/types.d.ts +0 -37
  222. package/es/utilities/carousel/types.js.map +0 -1
  223. package/es-custom/node_modules/@carbon/utilities/es/dateTimeFormat/index.js.map +0 -1
  224. package/es-custom/node_modules/@carbon/utilities/es/dateTimeFormat/relative.js +0 -11
  225. package/es-custom/node_modules/@carbon/utilities/es/dateTimeFormat/relative.js.map +0 -1
  226. package/es-custom/node_modules/@carbon/utilities/es/documentLang/documentLang.js +0 -9
  227. package/es-custom/node_modules/@carbon/utilities/es/documentLang/documentLang.js.map +0 -1
  228. package/es-custom/node_modules/@carbon/utilities/es/overflowHandler/overflowHandler.js +0 -11
  229. package/es-custom/node_modules/@carbon/utilities/es/overflowHandler/overflowHandler.js.map +0 -1
  230. package/es-custom/utilities/carousel/carousel.d.ts +0 -14
  231. package/es-custom/utilities/carousel/carousel.js +0 -341
  232. package/es-custom/utilities/carousel/carousel.js.map +0 -1
  233. package/es-custom/utilities/carousel/swipeEvents.d.ts +0 -7
  234. package/es-custom/utilities/carousel/swipeEvents.js +0 -109
  235. package/es-custom/utilities/carousel/swipeEvents.js.map +0 -1
  236. package/es-custom/utilities/carousel/types.d.ts +0 -37
  237. package/es-custom/utilities/carousel/types.js.map +0 -1
  238. package/lib/utilities/carousel/carousel.d.ts +0 -14
  239. package/lib/utilities/carousel/swipeEvents.d.ts +0 -7
  240. package/lib/utilities/carousel/types.d.ts +0 -37
  241. /package/es-custom/{utilities/carousel → components/coachmark/coachmark-tagline}/index.js.map +0 -0
  242. /package/{es/utilities/carousel → es-custom/utilities/snapscroll}/index.js.map +0 -0
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @license
3
3
  *
4
- * Copyright IBM Corp. 2024, 2025
4
+ * Copyright IBM Corp. 2024, 2026
5
5
  *
6
6
  * This source code is licensed under the Apache-2.0 license found in the
7
7
  * LICENSE file in the root directory of this source tree.
@@ -23,3 +23,6 @@ export { default as CDSGuideBanner } from './components/guide-banner/guide-banne
23
23
  export { default as CDSGuideBannerElement } from './components/guide-banner/guide-banner-element';
24
24
  export { default as CDSCoachmark } from './components/coachmark/coachmark';
25
25
  export { default as CDSCoachmarkBeacon } from './components/coachmark/coachmark-beacon/coachmark-beacon';
26
+ export { default as CDSCoachmarkTagline } from './components/coachmark/coachmark-tagline/coachmark-tagline';
27
+ export { default as CDSBigNumber } from './components/big-number/big-number';
28
+ export { default as CDSBigNumberSkeleton } from './components/big-number/big-number-skeleton';
@@ -22,4 +22,7 @@ export { default as CDSGuideBanner } from './components/guide-banner/guide-banne
22
22
  export { default as CDSGuideBannerElement } from './components/guide-banner/guide-banner-element.js';
23
23
  export { default as CDSCoachmark } from './components/coachmark/coachmark.js';
24
24
  export { default as CDSCoachmarkBeacon } from './components/coachmark/coachmark-beacon/coachmark-beacon.js';
25
+ export { default as CDSCoachmarkTagline } from './components/coachmark/coachmark-tagline/coachmark-tagline.js';
26
+ export { default as CDSBigNumber } from './components/big-number/big-number.js';
27
+ export { default as CDSBigNumberSkeleton } from './components/big-number/big-number-skeleton.js';
25
28
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- var version = "0.31.0-rc.0";
8
+ var version = "0.31.0";
9
9
  var packageJson = {
10
10
  version: version};
11
11
 
@@ -4,4 +4,4 @@
4
4
  * This source code is licensed under the Apache-2.0 license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- export declare const registerSwipeEvents: (carousel: HTMLElement, next: () => void, prev: () => void, destroy: boolean) => void;
7
+ export { snapScroll, scrollNext, scrollPrevious, blockClass, getNextSibling, getPreviousSibling, } from './snapscroll';
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Copyright IBM Corp. 2024
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ export { blockClass, getNextSibling, getPreviousSibling, scrollNext, scrollPrevious, snapScroll } from './snapscroll.js';
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Copyright IBM Corp. 2025
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ /**
8
+ * Initiates the snapScroll functionality
9
+ * @param body selector for element that contains the items
10
+ * @param child selector for the item elements
11
+ * @returns void
12
+ */
13
+ export declare const blockClass = "c4p--snappy";
14
+ export declare function snapScroll(body: string, child: string): void;
15
+ /**
16
+ * Retreives the currently focused element
17
+ * @returns currently focused element
18
+ */
19
+ export declare function getFocusedItem(): Element | null;
20
+ /**
21
+ * Scrolls to the next sibling element of the currently focused element
22
+ */
23
+ export declare function scrollNext(): void;
24
+ /**
25
+ * Scrolls to the previous sibling element of the currently focused element
26
+ */
27
+ export declare function scrollPrevious(): void;
28
+ export declare function getNextSibling(): Element | null | undefined;
29
+ export declare function getPreviousSibling(): Element | null | undefined;
@@ -0,0 +1,134 @@
1
+ /**
2
+ * Copyright IBM Corp. 2024
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ import { prefix } from '../../globals/settings.js';
9
+
10
+ /**
11
+ * Copyright IBM Corp. 2025
12
+ *
13
+ * This source code is licensed under the Apache-2.0 license found in the
14
+ * LICENSE file in the root directory of this source tree.
15
+ */
16
+ /**
17
+ * Initiates the snapScroll functionality
18
+ * @param body selector for element that contains the items
19
+ * @param child selector for the item elements
20
+ * @returns void
21
+ */
22
+ const blockClass = `${prefix}--snappy`;
23
+ const elmClass = `${blockClass}__elm`;
24
+ const selectionClass = `${blockClass}__selection`;
25
+ function snapScroll(body, child) {
26
+ const bodyEl = document.querySelector(body);
27
+ if (!bodyEl) {
28
+ return;
29
+ }
30
+ const styleElement = document.createElement('style');
31
+ styleElement.textContent = `
32
+ .${blockClass} {
33
+ display: flex;
34
+ flex: none;
35
+ overflow: scroll;
36
+ scroll-snap-type: x mandatory;
37
+ width: 100%;
38
+ }
39
+
40
+ .${blockClass}::-webkit-scrollbar {
41
+ display: none;
42
+ }
43
+
44
+ .${blockClass}__elm {
45
+ scroll-snap-align: start;
46
+ flex: none;
47
+ width: 100%;
48
+ }
49
+ `;
50
+ document.head.appendChild(styleElement);
51
+ bodyEl.classList.add(blockClass);
52
+ const scrollsnapSupported = 'onscrollsnapchange' in bodyEl;
53
+ const children = bodyEl.querySelectorAll(child);
54
+ if (children.length > 0) {
55
+ children.forEach((el) => {
56
+ el.classList.add(elmClass);
57
+ });
58
+ }
59
+ if (scrollsnapSupported) {
60
+ bodyEl.addEventListener('scrollsnapchange', (event) => {
61
+ const snapevent = event;
62
+ const currentlySnapped = document.querySelector(`.${selectionClass}`);
63
+ if (currentlySnapped) {
64
+ currentlySnapped.classList.remove(selectionClass);
65
+ }
66
+ snapevent.snapTargetInline.classList.add(selectionClass);
67
+ });
68
+ }
69
+ else {
70
+ const handler = (entries) => {
71
+ entries.forEach((entry) => {
72
+ entry.target.classList.toggle(selectionClass, entry.isIntersecting);
73
+ });
74
+ };
75
+ let observer;
76
+ const createObserver = () => {
77
+ if (observer) {
78
+ observer.disconnect();
79
+ }
80
+ observer = new IntersectionObserver(handler, {
81
+ root: bodyEl,
82
+ threshold: 1,
83
+ });
84
+ children.forEach((child) => {
85
+ observer.observe(child);
86
+ });
87
+ };
88
+ createObserver();
89
+ }
90
+ }
91
+ /**
92
+ * Retreives the currently focused element
93
+ * @returns currently focused element
94
+ */
95
+ function getFocusedItem() {
96
+ return document.querySelector(`.${selectionClass}`);
97
+ }
98
+ /**
99
+ * Scrolls to the next sibling element of the currently focused element
100
+ */
101
+ function scrollNext() {
102
+ const sibling = getNextSibling();
103
+ sibling === null || sibling === void 0 ? void 0 : sibling.scrollIntoView({
104
+ behavior: 'smooth',
105
+ inline: 'start',
106
+ });
107
+ }
108
+ /**
109
+ * Scrolls to the previous sibling element of the currently focused element
110
+ */
111
+ function scrollPrevious() {
112
+ const sibling = getPreviousSibling();
113
+ sibling === null || sibling === void 0 ? void 0 : sibling.scrollIntoView({
114
+ behavior: 'smooth',
115
+ inline: 'start',
116
+ });
117
+ }
118
+ function getNextSibling() {
119
+ const item = getFocusedItem();
120
+ if (!item) {
121
+ return;
122
+ }
123
+ return item.nextElementSibling;
124
+ }
125
+ function getPreviousSibling() {
126
+ const item = getFocusedItem();
127
+ if (!item) {
128
+ return;
129
+ }
130
+ return item.previousElementSibling;
131
+ }
132
+
133
+ export { blockClass, getFocusedItem, getNextSibling, getPreviousSibling, scrollNext, scrollPrevious, snapScroll };
134
+ //# sourceMappingURL=snapscroll.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"snapscroll.js","sources":["../../../src/utilities/snapscroll/snapscroll.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;AAAA;;;;;AAKG;AAYH;;;;;AAKG;AAEU,MAAA,UAAU,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Q;AAClB,QAAA,MAAM,EAAE,OAAO;AAChB,KAAA,CAAC;AACJ;SAEgB,cAAc,GAAA;AAC5B,IAAA,MAAM,IAAI,GAAG,cAAc,EAAE;IAC7B,IAAI,CAAC,IAAI,EAAE;QACT;;IAGF,OAAO,IAAI,CAAC,kBAAkB;AAChC;SAEgB,kBAAkB,GAAA;AAChC,IAAA,MAAM,IAAI,GAAG,cAAc,EAAE;IAC7B,IAAI,CAAC,IAAI,EAAE;QACT;;IAGF,OAAO,IAAI,CAAC,sBAAsB;AACpC;;;;"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Copyright IBM Corp. 2024
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ import { describe, it, expect } from 'vitest';
9
+ import { fixture, html } from '@open-wc/testing';
10
+ import { snapScroll } from './snapscroll.js';
11
+
12
+ /**
13
+ * Copyright IBM Corp. 2025
14
+ *
15
+ * This source code is licensed under the Apache-2.0 license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */
18
+ const template = () => {
19
+ return html `
20
+ <div class="app">
21
+ <div class="body">
22
+ <div class="child">child element</div>
23
+ <div class="child">child element</div>
24
+ <div class="child">child element</div>
25
+ </div>
26
+ </div>
27
+ `;
28
+ };
29
+ describe('snapscroll', () => {
30
+ it('snaps', async () => {
31
+ const el = await fixture(template());
32
+ snapScroll('.body', '.child');
33
+ const body = el.querySelector('.body');
34
+ expect(body === null || body === void 0 ? void 0 : body.classList.contains('c4p--snappy')).toBe(true);
35
+ const child = el.querySelector('.child');
36
+ expect(child === null || child === void 0 ? void 0 : child.classList.contains('c4p--snappy__elm')).toBe(true);
37
+ const children = el.querySelectorAll('.c4p--snappy__elm');
38
+ expect(children.length).toBe(3);
39
+ });
40
+ });
41
+ //# sourceMappingURL=snapscroll.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"snapscroll.test.js","sources":["../../../src/utilities/snapscroll/snapscroll.test.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;AAAA;;;;;AAKG;AAKH,MAAM,QAAQ,GAAG,MAAK;AACpB,IAAA,OAAO,IAAI,CAAA;;;;;;;;GAQV;AACH,CAAC;AAED,QAAQ,CAAC,YAAY,EAAE,MAAK;AAC1B,IAAA,EAAE,CAAC,OAAO,EAAE,YAAW;QACrB,MAAM,EAAE,GAAG,MAAM,OAAO,CAAC,QAAQ,EAAE,CAAC;AACpC,QAAA,UAAU,CAAC,OAAO,EAAE,QAAQ,CAAC;QAC7B,MAAM,IAAI,GAAG,EAAE,CAAC,aAAa,CAAC,OAAO,CAAC;AACtC,QAAA,MAAM,CAAC,IAAI,KAAA,IAAA,IAAJ,IAAI,KAAJ,MAAA,GAAA,MAAA,GAAA,IAAI,CAAE,SAAS,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;QAC1D,MAAM,KAAK,GAAG,EAAE,CAAC,aAAa,CAAC,QAAQ,CAAC;AACxC,QAAA,MAAM,CAAC,KAAK,KAAA,IAAA,IAAL,KAAK,KAAL,MAAA,GAAA,MAAA,GAAA,KAAK,CAAE,SAAS,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;QAChE,MAAM,QAAQ,GAAG,EAAE,CAAC,gBAAgB,CAAC,mBAAmB,CAAC;QACzD,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;AACjC,KAAC,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * @license
3
+ *
4
+ * Copyright IBM Corp. 2025
5
+ *
6
+ * This source code is licensed under the Apache-2.0 license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
+ import { LitElement } from 'lit';
10
+ import '@carbon/web-components/es/components/skeleton-text/index.js';
11
+ import '@carbon/web-components/es/components/skeleton-placeholder/index.js';
12
+ import { BigNumberSizeValues } from './constants';
13
+ /**
14
+ * @element c4p-big-number-skeleton
15
+ * Note: This component is only used within c4p-big-number. It displays a skeleton version while content is loading (handled by the c4p-big-number prop `loading').
16
+ */
17
+ declare class CDSBigNumberSkeleton extends LitElement {
18
+ size?: BigNumberSizeValues;
19
+ render(): import("lit-html").TemplateResult<1>;
20
+ static styles: any;
21
+ }
22
+ export default CDSBigNumberSkeleton;
@@ -0,0 +1,37 @@
1
+ /**
2
+ * @license
3
+ *
4
+ * Copyright IBM Corp. 2025
5
+ *
6
+ * This source code is licensed under the Apache-2.0 license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
+ import { LitElement } from 'lit';
10
+ import './big-number-skeleton';
11
+ import { BigNumberSizeValues } from './constants';
12
+ /**
13
+ * @element c4p-big-number
14
+ * @slot label - Header area that displays the label above the value. This slot can be customized to include an info icon and a tooltip for additional context.
15
+ * @slot trending-icon - Displays an icon indicating trend direction. Can be customized to show a downward arrow when the trend is not upward.
16
+ * @slot icon-button - Displays an icon button next to `value`.
17
+ */
18
+ declare class CDSBigNumber extends LitElement {
19
+ fractionDigits: number;
20
+ label: string | undefined;
21
+ loading: boolean;
22
+ locale: string;
23
+ percentage: boolean;
24
+ size: BigNumberSizeValues;
25
+ total?: number;
26
+ trending: boolean;
27
+ truncate: boolean;
28
+ value?: number;
29
+ private _getSupportedLocale;
30
+ private _formatValue;
31
+ private _getTruncatedValue;
32
+ private _shouldDisplayDenominator;
33
+ private _getTrendingIcon;
34
+ render(): import("lit-html").TemplateResult<1>;
35
+ static styles: any;
36
+ }
37
+ export default CDSBigNumber;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Copyright IBM Corp. 2025
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ import './index';
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Copyright IBM Corp. 2025
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ export declare enum BigNumberSize {
8
+ Default = "default",
9
+ Large = "lg",
10
+ XLarge = "xl"
11
+ }
12
+ export type BigNumberSizeValues = `${BigNumberSize}`;
13
+ export declare enum Characters {
14
+ Dash = "\u2013",
15
+ Slash = "/",
16
+ Percentage = "%"
17
+ }
18
+ export declare const DefaultLocale = "en-US";
19
+ export declare const UNKNOWN = "Unknown";
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @license
3
+ *
4
+ * Copyright IBM Corp. 2025
5
+ *
6
+ * This source code is licensed under the Apache-2.0 license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
+ import './big-number';
10
+ import './big-number-skeleton';