@lilydesignsystem/svelte-headless 0.6.1 → 0.6.2

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 (268) hide show
  1. package/CHANGELOG.md +6 -1
  2. package/LICENSE.md +8 -8
  3. package/README.md +453 -0
  4. package/dist/components/AccordionLink/AccordionLink.svelte +12 -2
  5. package/dist/components/AccordionLink/AccordionLink.svelte.d.ts +4 -0
  6. package/dist/components/ActionBar/ActionBar.svelte +2 -2
  7. package/dist/components/ActionGroup/ActionGroup.svelte +31 -7
  8. package/dist/components/ActionGroup/ActionGroup.svelte.d.ts +4 -4
  9. package/dist/components/AddressographBox/AddressographBox.svelte +5 -1
  10. package/dist/components/AiLabel/AiLabel.svelte +2 -2
  11. package/dist/components/Alert/Alert.svelte +1 -3
  12. package/dist/components/AlertDialog/AlertDialog.svelte +2 -3
  13. package/dist/components/Answer/Answer.svelte +5 -1
  14. package/dist/components/AreaChart/AreaChart.svelte +5 -1
  15. package/dist/components/AsSaudiyahRaqmAlHuwiyahAlWataniyahInput/AsSaudiyahRaqmAlHuwiyahAlWataniyahInput.svelte +55 -0
  16. package/dist/components/AsSaudiyahRaqmAlHuwiyahAlWataniyahInput/AsSaudiyahRaqmAlHuwiyahAlWataniyahInput.svelte.d.ts +10 -0
  17. package/dist/components/AsSaudiyahRaqmAlHuwiyahAlWataniyahView/AsSaudiyahRaqmAlHuwiyahAlWataniyahView.svelte +40 -0
  18. package/dist/components/AsSaudiyahRaqmAlHuwiyahAlWataniyahView/AsSaudiyahRaqmAlHuwiyahAlWataniyahView.svelte.d.ts +8 -0
  19. package/dist/components/AustraliaTaxFileNumberInput/AustraliaTaxFileNumberInput.svelte +55 -0
  20. package/dist/components/AustraliaTaxFileNumberInput/AustraliaTaxFileNumberInput.svelte.d.ts +10 -0
  21. package/dist/components/AustraliaTaxFileNumberView/AustraliaTaxFileNumberView.svelte +40 -0
  22. package/dist/components/AustraliaTaxFileNumberView/AustraliaTaxFileNumberView.svelte.d.ts +8 -0
  23. package/dist/components/Autosuggest/Autosuggest.svelte +175 -8
  24. package/dist/components/Autosuggest/Autosuggest.svelte.d.ts +18 -4
  25. package/dist/components/AvatarGroup/AvatarGroup.svelte +5 -1
  26. package/dist/components/BarChart/BarChart.svelte +5 -1
  27. package/dist/components/BarcodeImage/BarcodeImage.svelte +7 -1
  28. package/dist/components/BreadcrumbLink/BreadcrumbLink.svelte +12 -2
  29. package/dist/components/BreadcrumbLink/BreadcrumbLink.svelte.d.ts +4 -0
  30. package/dist/components/Byline/Byline.svelte +4 -1
  31. package/dist/components/CandlestickChart/CandlestickChart.svelte +5 -1
  32. package/dist/components/Caption/Caption.svelte +1 -0
  33. package/dist/components/CareCard/CareCard.svelte +1 -0
  34. package/dist/components/Cascader/Cascader.svelte +7 -1
  35. package/dist/components/ChatComposer/ChatComposer.svelte +6 -3
  36. package/dist/components/ChatList/ChatList.svelte +6 -2
  37. package/dist/components/ChatListItem/ChatListItem.svelte +10 -2
  38. package/dist/components/ChatListItem/ChatListItem.svelte.d.ts +2 -0
  39. package/dist/components/ChatMessage/ChatMessage.svelte +6 -2
  40. package/dist/components/ChatNav/ChatNav.svelte +6 -2
  41. package/dist/components/CheckListItem/CheckListItem.svelte +4 -1
  42. package/dist/components/CheckboxGroup/CheckboxGroup.svelte +1 -0
  43. package/dist/components/ChoroplethChart/ChoroplethChart.svelte +5 -1
  44. package/dist/components/Citation/Citation.svelte +6 -2
  45. package/dist/components/Coachmark/Coachmark.svelte +20 -10
  46. package/dist/components/Code/Code.svelte +6 -2
  47. package/dist/components/CodeBlock/CodeBlock.svelte +6 -2
  48. package/dist/components/CollectionListItem/CollectionListItem.svelte +1 -1
  49. package/dist/components/ColombiaCedulaDeCiudadaniaInput/ColombiaCedulaDeCiudadaniaInput.svelte +55 -0
  50. package/dist/components/ColombiaCedulaDeCiudadaniaInput/ColombiaCedulaDeCiudadaniaInput.svelte.d.ts +10 -0
  51. package/dist/components/ColombiaCedulaDeCiudadaniaView/ColombiaCedulaDeCiudadaniaView.svelte +40 -0
  52. package/dist/components/ColombiaCedulaDeCiudadaniaView/ColombiaCedulaDeCiudadaniaView.svelte.d.ts +8 -0
  53. package/dist/components/ColumnChart/ColumnChart.svelte +5 -1
  54. package/dist/components/Combobox/Combobox.svelte +11 -9
  55. package/dist/components/Comment/Comment.svelte +5 -1
  56. package/dist/components/ComposedChart/ComposedChart.svelte +5 -1
  57. package/dist/components/ContentsListItem/ContentsListItem.svelte +4 -1
  58. package/dist/components/ContentsNav/ContentsNav.svelte +56 -36
  59. package/dist/components/ContextMenu/ContextMenu.svelte +19 -17
  60. package/dist/components/ContextualHelp/ContextualHelp.svelte +55 -26
  61. package/dist/components/ContextualHelp/ContextualHelp.svelte.d.ts +4 -2
  62. package/dist/components/ConvertDiv/ConvertDiv.svelte +3 -1
  63. package/dist/components/ConvertFromDiv/ConvertFromDiv.svelte +0 -1
  64. package/dist/components/ConvertFromUnitDiv/ConvertFromUnitDiv.svelte +0 -1
  65. package/dist/components/ConvertFromValueDiv/ConvertFromValueDiv.svelte +0 -1
  66. package/dist/components/ConvertIntoDiv/ConvertIntoDiv.svelte +0 -1
  67. package/dist/components/ConvertIntoUnitDiv/ConvertIntoUnitDiv.svelte +0 -1
  68. package/dist/components/ConvertIntoValueDiv/ConvertIntoValueDiv.svelte +0 -1
  69. package/dist/components/CurrencyInput/CurrencyInput.svelte +61 -8
  70. package/dist/components/CurrencyInput/CurrencyInput.svelte.d.ts +9 -4
  71. package/dist/components/DateTimeNowInput/DateTimeNowInput.svelte +18 -16
  72. package/dist/components/DateTimeNowInput/DateTimeNowInput.svelte.d.ts +3 -3
  73. package/dist/components/DescriptionList/DescriptionList.svelte +0 -2
  74. package/dist/components/DescriptionListItem/DescriptionListItem.svelte +0 -2
  75. package/dist/components/DialGroup/DialGroup.svelte +5 -1
  76. package/dist/components/Dialog/Dialog.svelte +2 -2
  77. package/dist/components/Diff/Diff.svelte +5 -1
  78. package/dist/components/DigitalObjectIdentifierLink/DigitalObjectIdentifierLink.svelte +16 -7
  79. package/dist/components/DigitalObjectIdentifierLink/DigitalObjectIdentifierLink.svelte.d.ts +4 -2
  80. package/dist/components/DocumentList/DocumentList.svelte +0 -1
  81. package/dist/components/DocumentListItem/DocumentListItem.svelte +0 -2
  82. package/dist/components/Drawer/Drawer.svelte +35 -12
  83. package/dist/components/DropdownMenu/DropdownMenu.svelte +27 -16
  84. package/dist/components/EcuadorCedulaDeIdentidadInput/EcuadorCedulaDeIdentidadInput.svelte +55 -0
  85. package/dist/components/EcuadorCedulaDeIdentidadInput/EcuadorCedulaDeIdentidadInput.svelte.d.ts +10 -0
  86. package/dist/components/EcuadorCedulaDeIdentidadView/EcuadorCedulaDeIdentidadView.svelte +40 -0
  87. package/dist/components/EcuadorCedulaDeIdentidadView/EcuadorCedulaDeIdentidadView.svelte.d.ts +8 -0
  88. package/dist/components/EireIndividualHealthIdentifierView/EireIndividualHealthIdentifierView.svelte +2 -1
  89. package/dist/components/EspanaTarjetaSanitariaIndividualView/EspanaTarjetaSanitariaIndividualView.svelte +2 -1
  90. package/dist/components/Event/Event.svelte +6 -2
  91. package/dist/components/FeatureCard/FeatureCard.svelte +5 -1
  92. package/dist/components/FeaturePhoto/FeaturePhoto.svelte +4 -1
  93. package/dist/components/FileTree/FileTree.svelte +20 -5
  94. package/dist/components/FiveFaceRatingPicker/FiveFaceRatingPicker.svelte +3 -1
  95. package/dist/components/FiveFaceRatingPickerButton/FiveFaceRatingPickerButton.svelte +2 -2
  96. package/dist/components/FiveStarRatingPicker/FiveStarRatingPicker.svelte +3 -1
  97. package/dist/components/FiveStarRatingPickerButton/FiveStarRatingPickerButton.svelte +2 -2
  98. package/dist/components/FlexStack/FlexStack.svelte +3 -1
  99. package/dist/components/FloatingPanel/FloatingPanel.svelte +15 -13
  100. package/dist/components/FunnelChart/FunnelChart.svelte +5 -1
  101. package/dist/components/GaugeChart/GaugeChart.svelte +5 -1
  102. package/dist/components/GoToNextSection/GoToNextSection.svelte +2 -3
  103. package/dist/components/GoToPreviousSection/GoToPreviousSection.svelte +2 -3
  104. package/dist/components/GoToTop/GoToTop.svelte +0 -2
  105. package/dist/components/GrailLayoutBottomFooter/GrailLayoutBottomFooter.svelte +4 -1
  106. package/dist/components/GrailLayoutCenterMain/GrailLayoutCenterMain.svelte +4 -1
  107. package/dist/components/GrailLayoutLeftAside/GrailLayoutLeftAside.svelte +4 -1
  108. package/dist/components/GrailLayoutRightAside/GrailLayoutRightAside.svelte +4 -1
  109. package/dist/components/GrailLayoutTopHeader/GrailLayoutTopHeader.svelte +4 -1
  110. package/dist/components/GraphicBlock/GraphicBlock.svelte +1 -1
  111. package/dist/components/Grid/Grid.svelte +12 -3
  112. package/dist/components/Grid/Grid.svelte.d.ts +2 -0
  113. package/dist/components/Headline/Headline.svelte +4 -1
  114. package/dist/components/HeatmapChart/HeatmapChart.svelte +5 -1
  115. package/dist/components/HeatmapChartWithYearOfDays/HeatmapChartWithYearOfDays.svelte +5 -1
  116. package/dist/components/Hero/Hero.svelte +6 -2
  117. package/dist/components/HongKongIdentityCardInput/HongKongIdentityCardInput.svelte +55 -0
  118. package/dist/components/HongKongIdentityCardInput/HongKongIdentityCardInput.svelte.d.ts +10 -0
  119. package/dist/components/HongKongIdentityCardView/HongKongIdentityCardView.svelte +40 -0
  120. package/dist/components/HongKongIdentityCardView/HongKongIdentityCardView.svelte.d.ts +8 -0
  121. package/dist/components/HorizontalScroller/HorizontalScroller.svelte +1 -0
  122. package/dist/components/HoverCard/HoverCard.svelte +14 -13
  123. package/dist/components/IconListItem/IconListItem.svelte +4 -1
  124. package/dist/components/InputWithMask/InputWithMask.svelte +4 -1
  125. package/dist/components/IranKodEMelliInput/IranKodEMelliInput.svelte +55 -0
  126. package/dist/components/IranKodEMelliInput/IranKodEMelliInput.svelte.d.ts +10 -0
  127. package/dist/components/IranKodEMelliView/IranKodEMelliView.svelte +40 -0
  128. package/dist/components/IranKodEMelliView/IranKodEMelliView.svelte.d.ts +8 -0
  129. package/dist/components/Kbd/Kbd.svelte +5 -1
  130. package/dist/components/KbdShortcut/KbdShortcut.svelte +9 -2
  131. package/dist/components/LineChart/LineChart.svelte +5 -1
  132. package/dist/components/Listbox/Listbox.svelte +22 -117
  133. package/dist/components/Listbox/listbox-machine.d.ts +81 -0
  134. package/dist/components/Listbox/listbox-machine.js +116 -0
  135. package/dist/components/Listbox/search-text.d.ts +22 -0
  136. package/dist/components/Listbox/search-text.js +56 -0
  137. package/dist/components/Listbox/typeahead.d.ts +19 -0
  138. package/dist/components/Listbox/typeahead.js +39 -0
  139. package/dist/components/Loading/Loading.svelte +5 -1
  140. package/dist/components/MalaysiaKadPengenalanInput/MalaysiaKadPengenalanInput.svelte +55 -0
  141. package/dist/components/MalaysiaKadPengenalanInput/MalaysiaKadPengenalanInput.svelte.d.ts +10 -0
  142. package/dist/components/MalaysiaKadPengenalanView/MalaysiaKadPengenalanView.svelte +40 -0
  143. package/dist/components/MalaysiaKadPengenalanView/MalaysiaKadPengenalanView.svelte.d.ts +8 -0
  144. package/dist/components/Mark/Mark.svelte +0 -2
  145. package/dist/components/MentionsInput/MentionsInput.svelte +14 -2
  146. package/dist/components/Menu/Menu.svelte +1 -3
  147. package/dist/components/MenuBar/MenuBar.svelte +1 -3
  148. package/dist/components/MenuGroup/MenuGroup.svelte +6 -1
  149. package/dist/components/MiddleTruncation/MiddleTruncation.svelte +13 -3
  150. package/dist/components/MockupBrowser/MockupBrowser.svelte +5 -1
  151. package/dist/components/MockupLaptop/MockupLaptop.svelte +5 -1
  152. package/dist/components/MockupPhonePortrait/MockupPhonePortrait.svelte +5 -1
  153. package/dist/components/MockupShell/MockupShell.svelte +5 -1
  154. package/dist/components/MockupTabletLandscape/MockupTabletLandscape.svelte +5 -1
  155. package/dist/components/MockupTabletPortrait/MockupTabletPortrait.svelte +5 -1
  156. package/dist/components/MockupWatch/MockupWatch.svelte +5 -1
  157. package/dist/components/MockupWindow/MockupWindow.svelte +5 -1
  158. package/dist/components/MutuallyExclusive/MutuallyExclusive.svelte +0 -1
  159. package/dist/components/NavigationMenu/NavigationMenu.svelte +51 -3
  160. package/dist/components/NavigationMenu/NavigationMenu.svelte.d.ts +4 -0
  161. package/dist/components/NavigationMenu/overflow-navigation.d.ts +35 -0
  162. package/dist/components/NavigationMenu/overflow-navigation.js +133 -0
  163. package/dist/components/NetPromoterScorePicker/NetPromoterScorePicker.svelte +3 -1
  164. package/dist/components/NetPromoterScorePickerButton/NetPromoterScorePickerButton.svelte +2 -2
  165. package/dist/components/NigeriaNationalIdentificationNumberInput/NigeriaNationalIdentificationNumberInput.svelte +55 -0
  166. package/dist/components/NigeriaNationalIdentificationNumberInput/NigeriaNationalIdentificationNumberInput.svelte.d.ts +10 -0
  167. package/dist/components/NigeriaNationalIdentificationNumberView/NigeriaNationalIdentificationNumberView.svelte +40 -0
  168. package/dist/components/NigeriaNationalIdentificationNumberView/NigeriaNationalIdentificationNumberView.svelte.d.ts +8 -0
  169. package/dist/components/Organization/Organization.svelte +6 -2
  170. package/dist/components/PaginationLink/PaginationLink.svelte +12 -2
  171. package/dist/components/PaginationLink/PaginationLink.svelte.d.ts +4 -0
  172. package/dist/components/PakistanComputerizedNationalIdentityCardInput/PakistanComputerizedNationalIdentityCardInput.svelte +55 -0
  173. package/dist/components/PakistanComputerizedNationalIdentityCardInput/PakistanComputerizedNationalIdentityCardInput.svelte.d.ts +10 -0
  174. package/dist/components/PakistanComputerizedNationalIdentityCardView/PakistanComputerizedNationalIdentityCardView.svelte +40 -0
  175. package/dist/components/PakistanComputerizedNationalIdentityCardView/PakistanComputerizedNationalIdentityCardView.svelte.d.ts +8 -0
  176. package/dist/components/Person/Person.svelte +6 -2
  177. package/dist/components/PhaseBanner/PhaseBanner.svelte +0 -1
  178. package/dist/components/Pictogram/Pictogram.svelte +4 -1
  179. package/dist/components/Picture/Picture.svelte +27 -0
  180. package/dist/components/Picture/Picture.svelte.d.ts +9 -0
  181. package/dist/components/PieChart/PieChart.svelte +5 -1
  182. package/dist/components/Place/Place.svelte +6 -2
  183. package/dist/components/PopconfirmDialog/PopconfirmDialog.svelte +16 -3
  184. package/dist/components/Popover/Popover.svelte +39 -24
  185. package/dist/components/Popover/popover.d.ts +9 -0
  186. package/dist/components/Popover/popover.js +50 -0
  187. package/dist/components/Popup/Popup.svelte +40 -25
  188. package/dist/components/ProductCard/ProductCard.svelte +5 -1
  189. package/dist/components/ProgressBar/ProgressBar.svelte +0 -1
  190. package/dist/components/Question/Question.svelte +5 -1
  191. package/dist/components/RadarChart/RadarChart.svelte +5 -1
  192. package/dist/components/RedAmberGreenPickerButton/RedAmberGreenPickerButton.svelte +2 -2
  193. package/dist/components/RedOrangeYellowGreenBluePickerButton/RedOrangeYellowGreenBluePickerButton.svelte +2 -2
  194. package/dist/components/RelatedContent/RelatedContent.svelte +0 -1
  195. package/dist/components/Resizable/Resizable.svelte +1 -0
  196. package/dist/components/RingChart/RingChart.svelte +5 -1
  197. package/dist/components/SankeyChart/SankeyChart.svelte +5 -1
  198. package/dist/components/ScatterChart/ScatterChart.svelte +5 -1
  199. package/dist/components/ScreenReaderSpan/ScreenReaderSpan.svelte +6 -2
  200. package/dist/components/ScrollArea/ScrollArea.svelte +1 -0
  201. package/dist/components/ScrollBar/ScrollBar.svelte +78 -16
  202. package/dist/components/ScrollBar/ScrollBar.svelte.d.ts +13 -1
  203. package/dist/components/Scroller/Scroller.svelte +4 -1
  204. package/dist/components/ScrollerBase/ScrollerBase.svelte +1 -1
  205. package/dist/components/SectionLink/SectionLink.svelte +0 -2
  206. package/dist/components/SectionList/SectionList.svelte +0 -2
  207. package/dist/components/SectionListItem/SectionListItem.svelte +0 -2
  208. package/dist/components/SectionNav/SectionNav.svelte +0 -1
  209. package/dist/components/Separator/Separator.svelte +1 -0
  210. package/dist/components/Sheet/Sheet.svelte +32 -11
  211. package/dist/components/ShowMore/ShowMore.svelte +9 -2
  212. package/dist/components/SlideOutDrawer/SlideOutDrawer.svelte +33 -10
  213. package/dist/components/SliderButton/SliderButton.svelte +64 -6
  214. package/dist/components/SliderButton/SliderButton.svelte.d.ts +8 -2
  215. package/dist/components/SplitButton/SplitButton.svelte +29 -5
  216. package/dist/components/SplitButton/SplitButton.svelte.d.ts +3 -3
  217. package/dist/components/SplitView/SplitView.svelte +1 -0
  218. package/dist/components/Splitter/Splitter.svelte +1 -0
  219. package/dist/components/StatusLight/StatusLight.svelte +5 -8
  220. package/dist/components/StickyPromoBanner/StickyPromoBanner.svelte +1 -0
  221. package/dist/components/SunburstChart/SunburstChart.svelte +5 -1
  222. package/dist/components/SuperBanner/SuperBanner.svelte +5 -1
  223. package/dist/components/TabBar/TabBar.svelte +1 -3
  224. package/dist/components/Tag/Tag.svelte +10 -2
  225. package/dist/components/TaiwanGuominShenfenzhengTongyiBianhaoInput/TaiwanGuominShenfenzhengTongyiBianhaoInput.svelte +55 -0
  226. package/dist/components/TaiwanGuominShenfenzhengTongyiBianhaoInput/TaiwanGuominShenfenzhengTongyiBianhaoInput.svelte.d.ts +10 -0
  227. package/dist/components/TaiwanGuominShenfenzhengTongyiBianhaoView/TaiwanGuominShenfenzhengTongyiBianhaoView.svelte +40 -0
  228. package/dist/components/TaiwanGuominShenfenzhengTongyiBianhaoView/TaiwanGuominShenfenzhengTongyiBianhaoView.svelte.d.ts +8 -0
  229. package/dist/components/TaskBar/TaskBar.svelte +1 -3
  230. package/dist/components/TextAreaInput/TextAreaInput.svelte +1 -2
  231. package/dist/components/TextAreaInputWithCharacterCounter/TextAreaInputWithCharacterCounter.svelte +4 -3
  232. package/dist/components/ThemeProvider/ThemeProvider.svelte +3 -3
  233. package/dist/components/Tile/Tile.svelte +5 -1
  234. package/dist/components/TimerButton/TimerButton.svelte +55 -7
  235. package/dist/components/TimerButton/TimerButton.svelte.d.ts +9 -3
  236. package/dist/components/ToolBar/ToolBar.svelte +1 -3
  237. package/dist/components/ToolCallError/ToolCallError.svelte +0 -1
  238. package/dist/components/ToolCallName/ToolCallName.svelte +0 -2
  239. package/dist/components/Tooltip/Tooltip.svelte +14 -12
  240. package/dist/components/Tour/Tour.svelte +5 -4
  241. package/dist/components/TourList/TourList.svelte +10 -9
  242. package/dist/components/TourList/TourList.svelte.d.ts +2 -0
  243. package/dist/components/TransferList/TransferList.svelte +8 -2
  244. package/dist/components/TreeLink/TreeLink.svelte +12 -2
  245. package/dist/components/TreeLink/TreeLink.svelte.d.ts +4 -0
  246. package/dist/components/TreeList/TreeList.svelte +3 -3
  247. package/dist/components/TreeListItem/TreeListItem.svelte +9 -1
  248. package/dist/components/TreeMenu/TreeMenu.svelte +40 -1
  249. package/dist/components/TreeSelect/TreeSelect.svelte +10 -3
  250. package/dist/components/TuaisceartEireannHealthAndCareNumberView/TuaisceartEireannHealthAndCareNumberView.svelte +2 -1
  251. package/dist/components/UruguayCedulaDeIdentidadInput/UruguayCedulaDeIdentidadInput.svelte +55 -0
  252. package/dist/components/UruguayCedulaDeIdentidadInput/UruguayCedulaDeIdentidadInput.svelte.d.ts +10 -0
  253. package/dist/components/UruguayCedulaDeIdentidadView/UruguayCedulaDeIdentidadView.svelte +40 -0
  254. package/dist/components/UruguayCedulaDeIdentidadView/UruguayCedulaDeIdentidadView.svelte.d.ts +8 -0
  255. package/dist/components/VideoPlayer/VideoPlayer.svelte +6 -2
  256. package/dist/components/VietNamCanCuocCongDanInput/VietNamCanCuocCongDanInput.svelte +55 -0
  257. package/dist/components/VietNamCanCuocCongDanInput/VietNamCanCuocCongDanInput.svelte.d.ts +10 -0
  258. package/dist/components/VietNamCanCuocCongDanView/VietNamCanCuocCongDanView.svelte +40 -0
  259. package/dist/components/VietNamCanCuocCongDanView/VietNamCanCuocCongDanView.svelte.d.ts +8 -0
  260. package/dist/components/Visible/Visible.svelte +1 -1
  261. package/dist/components/WarningText/WarningText.svelte +48 -0
  262. package/dist/components/WarningText/WarningText.svelte.d.ts +13 -0
  263. package/dist/components/WheelPicker/WheelPicker.svelte +18 -4
  264. package/dist/components/WheelPicker/wheel-picker.js +18 -3
  265. package/dist/index.d.ts +26 -0
  266. package/dist/index.js +26 -0
  267. package/index.md +4 -4
  268. package/package.json +5 -5
@@ -13,6 +13,10 @@
13
13
  </script>
14
14
 
15
15
  <!-- MockupTabletLandscape.svelte -->
16
- <div class={`mockup-tablet-landscape ${className}`} aria-label={label} {...restProps}>
16
+ <div
17
+ class={`mockup-tablet-landscape ${className}`}
18
+ aria-label={label}
19
+ {...restProps}
20
+ >
17
21
  {@render children?.()}
18
22
  </div>
@@ -13,6 +13,10 @@
13
13
  </script>
14
14
 
15
15
  <!-- MockupTabletPortrait.svelte -->
16
- <div class={`mockup-tablet-portrait ${className}`} aria-label={label} {...restProps}>
16
+ <div
17
+ class={`mockup-tablet-portrait ${className}`}
18
+ aria-label={label}
19
+ {...restProps}
20
+ >
17
21
  {@render children?.()}
18
22
  </div>
@@ -13,6 +13,10 @@
13
13
  </script>
14
14
 
15
15
  <!-- MockupWatch.svelte -->
16
- <div class={`mockup-watch ${className}`} aria-label={label} {...restProps}>
16
+ <div
17
+ class={`mockup-watch ${className}`}
18
+ aria-label={label}
19
+ {...restProps}
20
+ >
17
21
  {@render children?.()}
18
22
  </div>
@@ -13,6 +13,10 @@
13
13
  </script>
14
14
 
15
15
  <!-- MockupWindow.svelte -->
16
- <div class={`mockup-window ${className}`} aria-label={label} {...restProps}>
16
+ <div
17
+ class={`mockup-window ${className}`}
18
+ aria-label={label}
19
+ {...restProps}
20
+ >
17
21
  {@render children?.()}
18
22
  </div>
@@ -16,7 +16,6 @@
16
16
  <!-- MutuallyExclusive.svelte -->
17
17
  <fieldset
18
18
  class={`mutually-exclusive ${className}`}
19
-
20
19
  aria-label={label}
21
20
  {...restProps}
22
21
  >
@@ -10,6 +10,10 @@
10
10
  // Props:
11
11
  // className — string, optional. CSS class name.
12
12
  // label — string, required. Accessible name via aria-label to distinguish this nav landmark.
13
+ // overflow — boolean, optional (default false). Overflow mode: renders the list (<ul class="navigation-menu-list">,
14
+ // so your children must be <li> items) and a hidden "More" item; a ResizeObserver moves the items that do not
15
+ // fit into a disclosure. Publishes data-overflow="true" on the root. Without JavaScript the links simply wrap.
16
+ // moreLabel — string, required when overflow is set. The More button's accessible name (no English from us).
13
17
  // children — Snippet, required. Navigation content (links, lists, nested menus).
14
18
  // ...restProps — additional HTML attributes spread onto the <nav>.
15
19
  //
@@ -33,9 +37,16 @@
33
37
  // </ul>
34
38
  // </NavigationMenu>
35
39
  //
40
+ // <!-- Overflow mode: the items must be <li> -->
41
+ // <NavigationMenu label="Main navigation" overflow moreLabel="More">
42
+ // <li><a href="/">Home</a></li>
43
+ // <li><a href="/about">About</a></li>
44
+ // </NavigationMenu>
45
+ //
36
46
  // Keyboard:
37
- // - None — this is a passive container. Navigation links inside use standard
38
- // Tab key focus and Enter/Space activation provided by the browser.
47
+ // - None by default — a passive container; links use the browser's Tab and Enter.
48
+ // - Overflow mode: Enter / Space toggle the More button; Escape closes the list and returns focus to the button;
49
+ // Tab moves through the moved links in order; a click outside closes it. The opened list is in normal flow.
39
50
  //
40
51
  // Accessibility:
41
52
  // - <nav> element implicitly has role="navigation", making it a navigation landmark
@@ -55,26 +66,63 @@
55
66
  // - WAI-ARIA Landmarks: https://www.w3.org/WAI/ARIA/apd/practices/landmark-regions/
56
67
 
57
68
  import type { Snippet } from "svelte";
69
+ import { setupOverflowNavigation } from "./overflow-navigation";
58
70
 
59
71
  let {
60
72
  class: className = "",
61
73
  label,
74
+ overflow = false,
75
+ moreLabel = "",
62
76
  children,
63
77
  ...restProps
64
78
  }: {
65
79
  /** Accessible label. */
66
80
  label: string;
81
+ /** Overflow mode: items that do not fit move into a "More" disclosure. Children must be <li> items. */
82
+ overflow?: boolean;
83
+ /** Accessible name of the More button. Required when `overflow` is set. */
84
+ moreLabel?: string;
67
85
  /** Navigation content. */
68
86
  children: Snippet;
69
87
  [key: string]: unknown;
70
88
  } = $props();
89
+
90
+ let root: HTMLElement | undefined = $state();
91
+
92
+ $effect(() => {
93
+ if (!overflow || !root) return;
94
+ const handle = setupOverflowNavigation(root);
95
+ return () => handle?.dispose();
96
+ });
71
97
  </script>
72
98
 
73
99
  <!-- NavigationMenu.svelte -->
74
100
  <nav
101
+ bind:this={root}
75
102
  class={`navigation-menu ${className}`}
76
103
  aria-label={label}
104
+ data-overflow={overflow ? "true" : undefined}
77
105
  {...restProps}
78
106
  >
79
- {@render children?.()}
107
+ {#if overflow}
108
+ <ul class="navigation-menu-list">
109
+ {@render children?.()}
110
+ <li
111
+ class="navigation-menu-more"
112
+ hidden
113
+ >
114
+ <button
115
+ class="navigation-menu-more-button"
116
+ type="button"
117
+ aria-expanded="false">{moreLabel}</button
118
+ >
119
+ <ul
120
+ class="navigation-menu-more-list"
121
+ hidden
122
+ ></ul>
123
+ </li>
124
+ </ul>
125
+ {:else}
126
+ {@render children?.()}
127
+ {/if}
80
128
  </nav>
@@ -2,6 +2,10 @@ import type { Snippet } from "svelte";
2
2
  type $$ComponentProps = {
3
3
  /** Accessible label. */
4
4
  label: string;
5
+ /** Overflow mode: items that do not fit move into a "More" disclosure. Children must be <li> items. */
6
+ overflow?: boolean;
7
+ /** Accessible name of the More button. Required when `overflow` is set. */
8
+ moreLabel?: string;
5
9
  /** Navigation content. */
6
10
  children: Snippet;
7
11
  [key: string]: unknown;
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Overflow navigation: measure which items of a navigation list fit on one row and move the rest into a "More" disclosure.
3
+ * Framework-neutral and dependency-free; the component renders the markup, this module only moves nodes and toggles state.
4
+ *
5
+ * Expected markup (rendered by every NavigationMenu in `overflow` mode, nothing here creates it):
6
+ *
7
+ * <nav class="navigation-menu" data-overflow="true">
8
+ * <ul class="navigation-menu-list">
9
+ * <li>…item…</li> …
10
+ * <li class="navigation-menu-more" hidden>
11
+ * <button class="navigation-menu-more-button" type="button" aria-expanded="false">{moreLabel}</button>
12
+ * <ul class="navigation-menu-more-list" hidden></ul>
13
+ * </li>
14
+ * </ul>
15
+ * </nav>
16
+ *
17
+ * Progressive enhancement: without this script the More item stays `hidden` and the list wraps (consumer CSS: flex-wrap).
18
+ * With it, a ResizeObserver on the list (never a window `resize` listener) re-measures; the items that do not fit, in order,
19
+ * are appended to the More list, and moved back, in order, when room returns. The opened More list stays in normal flow, so it
20
+ * pushes the content below it down and never covers it (WCAG 2.4.11). Escape closes it and returns focus to the button, and a
21
+ * click outside closes it. Items keep their links and `aria-current`; the module reads and writes no text.
22
+ */
23
+ /** How many of `widths` fit in `available` on one row, in the unit the widths use. Pure.
24
+ * If all fit, returns widths.length. Otherwise the most that fit beside the More item (`moreWidth`). `gap` separates items. */
25
+ export declare function fitCount(widths: number[], available: number, moreWidth: number, gap?: number): number;
26
+ export interface OverflowNavigation {
27
+ /** Re-measure now (the observer calls this; call it yourself after the items change). */
28
+ update(): void;
29
+ /** Remove every listener and the observer; moved items go back to the list. */
30
+ dispose(): void;
31
+ }
32
+ /** Attach overflow behaviour to a `.navigation-menu` root. Returns null when the expected markup is missing. */
33
+ export declare function setupOverflowNavigation(root: HTMLElement): OverflowNavigation | null;
34
+ /** The name the Blazor JS-interop module and the HTML snippet call. */
35
+ export declare const attach: typeof setupOverflowNavigation;
@@ -0,0 +1,133 @@
1
+ /**
2
+ * Overflow navigation: measure which items of a navigation list fit on one row and move the rest into a "More" disclosure.
3
+ * Framework-neutral and dependency-free; the component renders the markup, this module only moves nodes and toggles state.
4
+ *
5
+ * Expected markup (rendered by every NavigationMenu in `overflow` mode, nothing here creates it):
6
+ *
7
+ * <nav class="navigation-menu" data-overflow="true">
8
+ * <ul class="navigation-menu-list">
9
+ * <li>…item…</li> …
10
+ * <li class="navigation-menu-more" hidden>
11
+ * <button class="navigation-menu-more-button" type="button" aria-expanded="false">{moreLabel}</button>
12
+ * <ul class="navigation-menu-more-list" hidden></ul>
13
+ * </li>
14
+ * </ul>
15
+ * </nav>
16
+ *
17
+ * Progressive enhancement: without this script the More item stays `hidden` and the list wraps (consumer CSS: flex-wrap).
18
+ * With it, a ResizeObserver on the list (never a window `resize` listener) re-measures; the items that do not fit, in order,
19
+ * are appended to the More list, and moved back, in order, when room returns. The opened More list stays in normal flow, so it
20
+ * pushes the content below it down and never covers it (WCAG 2.4.11). Escape closes it and returns focus to the button, and a
21
+ * click outside closes it. Items keep their links and `aria-current`; the module reads and writes no text.
22
+ */
23
+ /** How many of `widths` fit in `available` on one row, in the unit the widths use. Pure.
24
+ * If all fit, returns widths.length. Otherwise the most that fit beside the More item (`moreWidth`). `gap` separates items. */
25
+ export function fitCount(widths, available, moreWidth, gap = 0) {
26
+ const total = widths.reduce((sum, w) => sum + w, 0) + gap * Math.max(0, widths.length - 1);
27
+ if (total <= available)
28
+ return widths.length;
29
+ let used = moreWidth;
30
+ let count = 0;
31
+ for (const w of widths) {
32
+ if (used + w + gap > available)
33
+ break;
34
+ used += w + gap;
35
+ count += 1;
36
+ }
37
+ return count;
38
+ }
39
+ let counter = 0;
40
+ /** Attach overflow behaviour to a `.navigation-menu` root. Returns null when the expected markup is missing. */
41
+ export function setupOverflowNavigation(root) {
42
+ const list = root.querySelector(".navigation-menu-list");
43
+ const more = list?.querySelector(":scope > .navigation-menu-more") ?? null;
44
+ const button = more?.querySelector(":scope > .navigation-menu-more-button") ?? null;
45
+ const moreList = more?.querySelector(":scope > .navigation-menu-more-list") ?? null;
46
+ if (!list || !more || !button || !moreList)
47
+ return null;
48
+ const doc = root.ownerDocument;
49
+ if (!moreList.id)
50
+ moreList.id = `navigation-menu-more-list-${++counter}`;
51
+ button.setAttribute("aria-controls", moreList.id);
52
+ if (!button.hasAttribute("aria-expanded"))
53
+ button.setAttribute("aria-expanded", "false");
54
+ let lastAvailable = -1;
55
+ let lastCount = -1;
56
+ const setOpen = (open, refocus = false) => {
57
+ moreList.hidden = !open;
58
+ button.setAttribute("aria-expanded", String(open));
59
+ if (!open && refocus)
60
+ button.focus();
61
+ };
62
+ const items = () => [
63
+ ...Array.from(list.children).filter((c) => c !== more),
64
+ ...Array.from(moreList.children),
65
+ ];
66
+ const update = () => {
67
+ const available = list.clientWidth;
68
+ const all = items();
69
+ if (available === lastAvailable && all.length === lastCount)
70
+ return;
71
+ lastAvailable = available;
72
+ lastCount = all.length;
73
+ const active = doc.activeElement;
74
+ // Put everything back in order so each item can be measured where it sits on the row.
75
+ for (const item of all)
76
+ list.insertBefore(item, more);
77
+ more.hidden = true;
78
+ const gap = parseFloat(root.ownerDocument.defaultView?.getComputedStyle(list).columnGap ?? "") || 0;
79
+ const widths = all.map((item) => item.offsetWidth);
80
+ let count = fitCount(widths, available, 0, gap);
81
+ if (count < all.length) {
82
+ more.hidden = false;
83
+ count = fitCount(widths, available, more.offsetWidth, gap);
84
+ }
85
+ for (const item of all.slice(count))
86
+ moreList.appendChild(item);
87
+ if (count >= all.length) {
88
+ more.hidden = true;
89
+ setOpen(false);
90
+ }
91
+ if (active instanceof HTMLElement &&
92
+ active !== doc.body &&
93
+ doc.contains(active) &&
94
+ doc.activeElement !== active) {
95
+ active.focus();
96
+ }
97
+ };
98
+ const onClick = () => setOpen(Boolean(moreList.hidden));
99
+ const onKeydown = (event) => {
100
+ if (event.key === "Escape" && !moreList.hidden) {
101
+ event.stopPropagation();
102
+ setOpen(false, true);
103
+ }
104
+ };
105
+ const onOutside = (event) => {
106
+ if (!moreList.hidden && event.target instanceof Node && !more.contains(event.target))
107
+ setOpen(false);
108
+ };
109
+ button.addEventListener("click", onClick);
110
+ more.addEventListener("keydown", onKeydown);
111
+ doc.addEventListener("click", onOutside);
112
+ let observer = null;
113
+ if (typeof ResizeObserver !== "undefined") {
114
+ observer = new ResizeObserver(() => update());
115
+ observer.observe(list);
116
+ }
117
+ update();
118
+ return {
119
+ update,
120
+ dispose() {
121
+ observer?.disconnect();
122
+ button.removeEventListener("click", onClick);
123
+ more.removeEventListener("keydown", onKeydown);
124
+ doc.removeEventListener("click", onOutside);
125
+ for (const item of Array.from(moreList.children))
126
+ list.insertBefore(item, more);
127
+ more.hidden = true;
128
+ setOpen(false);
129
+ },
130
+ };
131
+ }
132
+ /** The name the Blazor JS-interop module and the HTML snippet call. */
133
+ export const attach = setupOverflowNavigation;
@@ -86,7 +86,9 @@
86
86
  timer = setTimeout(() => {
87
87
  if (event.defaultPrevented || !root) return;
88
88
  value = initialValue;
89
- for (const input of root.querySelectorAll<HTMLInputElement>('input[type="radio"]')) {
89
+ for (const input of root.querySelectorAll<HTMLInputElement>(
90
+ 'input[type="radio"]',
91
+ )) {
90
92
  input.checked = input.value === String(initialValue);
91
93
  }
92
94
  }, 0);
@@ -77,5 +77,5 @@
77
77
  {disabled}
78
78
  data-value={value}
79
79
  {onclick}
80
- {...restProps}
81
- >{label}</button>
80
+ {...restProps}>{label}</button
81
+ >
@@ -0,0 +1,55 @@
1
+ <script lang="ts">
2
+ // NigeriaNationalIdentificationNumberInput component
3
+ //
4
+ // A headless input for entering Nigeria's National Identification Number (NIN).
5
+ // Format: Eleven digits issued by the National Identity Management Commission (NIMC). No check-digit algorithm is published, so only the length and digits can be checked.
6
+ //
7
+ // Props:
8
+ // className — string, optional. CSS class name.
9
+ // label — string, required. Accessible label for screen readers via aria-label.
10
+ // value — string, default "". Bindable input value; supports bind:value.
11
+ // required — boolean, default false. Whether the input is required for form submission.
12
+ // disabled — boolean, default false. Whether the input is disabled.
13
+ // ...restProps — additional HTML attributes spread onto the <input>.
14
+ //
15
+ // Syntax:
16
+ // <NigeriaNationalIdentificationNumberInput label="National Identification Number (NIN)" bind:value />
17
+ //
18
+ // Accessibility:
19
+ // - aria-label provides the accessible name for screen readers
20
+ // - autocomplete="off" protects sensitive identifiers
21
+ // - required and disabled states are conveyed to assistive technology
22
+ //
23
+ // Internationalization:
24
+ // - The label prop externalizes user-facing text for translation
25
+ //
26
+ // References:
27
+ // - https://en.wikipedia.org/wiki/National_Identity_Management_Commission
28
+
29
+ let {
30
+ class: className = "",
31
+ label,
32
+ value = $bindable(""),
33
+ required = false,
34
+ disabled = false,
35
+ ...restProps
36
+ }: {
37
+ label: string;
38
+ value?: string;
39
+ required?: boolean;
40
+ disabled?: boolean;
41
+ [key: string]: unknown;
42
+ } = $props();
43
+ </script>
44
+
45
+ <!-- NigeriaNationalIdentificationNumberInput.svelte -->
46
+ <input
47
+ class={`nigeria-national-identification-number-input ${className}`}
48
+ type="text"
49
+ aria-label={label}
50
+ autocomplete="off"
51
+ bind:value
52
+ {required}
53
+ {disabled}
54
+ {...restProps}
55
+ />
@@ -0,0 +1,10 @@
1
+ type $$ComponentProps = {
2
+ label: string;
3
+ value?: string;
4
+ required?: boolean;
5
+ disabled?: boolean;
6
+ [key: string]: unknown;
7
+ };
8
+ declare const NigeriaNationalIdentificationNumberInput: import("svelte").Component<$$ComponentProps, {}, "value">;
9
+ type NigeriaNationalIdentificationNumberInput = ReturnType<typeof NigeriaNationalIdentificationNumberInput>;
10
+ export default NigeriaNationalIdentificationNumberInput;
@@ -0,0 +1,40 @@
1
+ <script lang="ts">
2
+ // NigeriaNationalIdentificationNumberView component
3
+ //
4
+ // A headless display component for showing Nigeria's
5
+ // National Identification Number (NIN) in a read-only format.
6
+ // Format: Eleven digits issued by the National Identity Management Commission (NIMC). No check-digit algorithm is published, so only the length and digits can be checked.
7
+ //
8
+ // Props:
9
+ // className — string, optional. CSS class name.
10
+ // label — string, required. Accessible label for screen readers via aria-label.
11
+ // value — string, default "". The identifier string to display.
12
+ // ...restProps — additional HTML attributes spread onto the <span>.
13
+ //
14
+ // Syntax:
15
+ // <NigeriaNationalIdentificationNumberView label="National Identification Number (NIN)" value={value} />
16
+ //
17
+ // Accessibility:
18
+ // - aria-label provides the accessible name so screen readers announce the purpose
19
+ //
20
+ // References:
21
+ // - https://en.wikipedia.org/wiki/National_Identity_Management_Commission
22
+
23
+ let {
24
+ class: className = "",
25
+ label,
26
+ value = "",
27
+ ...restProps
28
+ }: {
29
+ label: string;
30
+ value?: string;
31
+ [key: string]: unknown;
32
+ } = $props();
33
+ </script>
34
+
35
+ <!-- NigeriaNationalIdentificationNumberView.svelte -->
36
+ <span
37
+ class={`nigeria-national-identification-number-view ${className}`}
38
+ aria-label={label}
39
+ {...restProps}>{value}</span
40
+ >
@@ -0,0 +1,8 @@
1
+ type $$ComponentProps = {
2
+ label: string;
3
+ value?: string;
4
+ [key: string]: unknown;
5
+ };
6
+ declare const NigeriaNationalIdentificationNumberView: import("svelte").Component<$$ComponentProps, {}, "">;
7
+ type NigeriaNationalIdentificationNumberView = ReturnType<typeof NigeriaNationalIdentificationNumberView>;
8
+ export default NigeriaNationalIdentificationNumberView;
@@ -13,6 +13,10 @@
13
13
  </script>
14
14
 
15
15
  <!-- Organization.svelte -->
16
- <div class={`organization ${className}`} aria-label={label} {...restProps}>
16
+ <article
17
+ class={`organization ${className}`}
18
+ aria-label={label}
19
+ {...restProps}
20
+ >
17
21
  {@render children?.()}
18
- </div>
22
+ </article>
@@ -2,17 +2,27 @@
2
2
  import type { Snippet } from "svelte";
3
3
  let {
4
4
  class: className = "",
5
+ href,
5
6
  label = undefined,
6
7
  children,
7
8
  ...restProps
8
9
  }: {
10
+ /** The URL to navigate to. */
11
+ href: string;
12
+ /** Accessible label override for screen readers. */
9
13
  label?: string;
14
+ /** The link content. */
10
15
  children: Snippet;
11
16
  [key: string]: unknown;
12
17
  } = $props();
13
18
  </script>
14
19
 
15
20
  <!-- PaginationLink.svelte -->
16
- <div class={`pagination-link ${className}`} aria-label={label} {...restProps}>
21
+ <a
22
+ class={`pagination-link ${className}`}
23
+ {href}
24
+ aria-label={label}
25
+ {...restProps}
26
+ >
17
27
  {@render children?.()}
18
- </div>
28
+ </a>
@@ -1,6 +1,10 @@
1
1
  import type { Snippet } from "svelte";
2
2
  type $$ComponentProps = {
3
+ /** The URL to navigate to. */
4
+ href: string;
5
+ /** Accessible label override for screen readers. */
3
6
  label?: string;
7
+ /** The link content. */
4
8
  children: Snippet;
5
9
  [key: string]: unknown;
6
10
  };
@@ -0,0 +1,55 @@
1
+ <script lang="ts">
2
+ // PakistanComputerizedNationalIdentityCardInput component
3
+ //
4
+ // A headless input for entering Pakistan's Computerized National Identity Card Number (CNIC).
5
+ // Format: Thirteen digits, written 12345-1234567-1: a five-digit locality code (province, division, district and tehsil), a seven-digit family number, and a final digit that is odd for a male and even for a female. There is no check digit.
6
+ //
7
+ // Props:
8
+ // className — string, optional. CSS class name.
9
+ // label — string, required. Accessible label for screen readers via aria-label.
10
+ // value — string, default "". Bindable input value; supports bind:value.
11
+ // required — boolean, default false. Whether the input is required for form submission.
12
+ // disabled — boolean, default false. Whether the input is disabled.
13
+ // ...restProps — additional HTML attributes spread onto the <input>.
14
+ //
15
+ // Syntax:
16
+ // <PakistanComputerizedNationalIdentityCardInput label="Computerized National Identity Card Number (CNIC)" bind:value />
17
+ //
18
+ // Accessibility:
19
+ // - aria-label provides the accessible name for screen readers
20
+ // - autocomplete="off" protects sensitive identifiers
21
+ // - required and disabled states are conveyed to assistive technology
22
+ //
23
+ // Internationalization:
24
+ // - The label prop externalizes user-facing text for translation
25
+ //
26
+ // References:
27
+ // - https://en.wikipedia.org/wiki/Computerized_National_Identity_Card
28
+
29
+ let {
30
+ class: className = "",
31
+ label,
32
+ value = $bindable(""),
33
+ required = false,
34
+ disabled = false,
35
+ ...restProps
36
+ }: {
37
+ label: string;
38
+ value?: string;
39
+ required?: boolean;
40
+ disabled?: boolean;
41
+ [key: string]: unknown;
42
+ } = $props();
43
+ </script>
44
+
45
+ <!-- PakistanComputerizedNationalIdentityCardInput.svelte -->
46
+ <input
47
+ class={`pakistan-computerized-national-identity-card-input ${className}`}
48
+ type="text"
49
+ aria-label={label}
50
+ autocomplete="off"
51
+ bind:value
52
+ {required}
53
+ {disabled}
54
+ {...restProps}
55
+ />
@@ -0,0 +1,10 @@
1
+ type $$ComponentProps = {
2
+ label: string;
3
+ value?: string;
4
+ required?: boolean;
5
+ disabled?: boolean;
6
+ [key: string]: unknown;
7
+ };
8
+ declare const PakistanComputerizedNationalIdentityCardInput: import("svelte").Component<$$ComponentProps, {}, "value">;
9
+ type PakistanComputerizedNationalIdentityCardInput = ReturnType<typeof PakistanComputerizedNationalIdentityCardInput>;
10
+ export default PakistanComputerizedNationalIdentityCardInput;
@@ -0,0 +1,40 @@
1
+ <script lang="ts">
2
+ // PakistanComputerizedNationalIdentityCardView component
3
+ //
4
+ // A headless display component for showing Pakistan's
5
+ // Computerized National Identity Card Number (CNIC) in a read-only format.
6
+ // Format: Thirteen digits, written 12345-1234567-1: a five-digit locality code (province, division, district and tehsil), a seven-digit family number, and a final digit that is odd for a male and even for a female. There is no check digit.
7
+ //
8
+ // Props:
9
+ // className — string, optional. CSS class name.
10
+ // label — string, required. Accessible label for screen readers via aria-label.
11
+ // value — string, default "". The identifier string to display.
12
+ // ...restProps — additional HTML attributes spread onto the <span>.
13
+ //
14
+ // Syntax:
15
+ // <PakistanComputerizedNationalIdentityCardView label="Computerized National Identity Card Number (CNIC)" value={value} />
16
+ //
17
+ // Accessibility:
18
+ // - aria-label provides the accessible name so screen readers announce the purpose
19
+ //
20
+ // References:
21
+ // - https://en.wikipedia.org/wiki/Computerized_National_Identity_Card
22
+
23
+ let {
24
+ class: className = "",
25
+ label,
26
+ value = "",
27
+ ...restProps
28
+ }: {
29
+ label: string;
30
+ value?: string;
31
+ [key: string]: unknown;
32
+ } = $props();
33
+ </script>
34
+
35
+ <!-- PakistanComputerizedNationalIdentityCardView.svelte -->
36
+ <span
37
+ class={`pakistan-computerized-national-identity-card-view ${className}`}
38
+ aria-label={label}
39
+ {...restProps}>{value}</span
40
+ >
@@ -0,0 +1,8 @@
1
+ type $$ComponentProps = {
2
+ label: string;
3
+ value?: string;
4
+ [key: string]: unknown;
5
+ };
6
+ declare const PakistanComputerizedNationalIdentityCardView: import("svelte").Component<$$ComponentProps, {}, "">;
7
+ type PakistanComputerizedNationalIdentityCardView = ReturnType<typeof PakistanComputerizedNationalIdentityCardView>;
8
+ export default PakistanComputerizedNationalIdentityCardView;