@lilydesignsystem/svelte-headless 0.6.0 → 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.
- package/CHANGELOG.md +6 -1
- package/LICENSE.md +8 -8
- package/README.md +4 -4
- package/dist/components/AccordionLink/AccordionLink.svelte +12 -2
- package/dist/components/AccordionLink/AccordionLink.svelte.d.ts +4 -0
- package/dist/components/ActionBar/ActionBar.svelte +2 -2
- package/dist/components/ActionGroup/ActionGroup.svelte +31 -7
- package/dist/components/ActionGroup/ActionGroup.svelte.d.ts +4 -4
- package/dist/components/AddressographBox/AddressographBox.svelte +5 -1
- package/dist/components/AiLabel/AiLabel.svelte +2 -2
- package/dist/components/Alert/Alert.svelte +1 -3
- package/dist/components/AlertDialog/AlertDialog.svelte +9 -4
- package/dist/components/Answer/Answer.svelte +5 -1
- package/dist/components/AreaChart/AreaChart.svelte +5 -1
- package/dist/components/AsSaudiyahRaqmAlHuwiyahAlWataniyahInput/AsSaudiyahRaqmAlHuwiyahAlWataniyahInput.svelte +55 -0
- package/dist/components/AsSaudiyahRaqmAlHuwiyahAlWataniyahInput/AsSaudiyahRaqmAlHuwiyahAlWataniyahInput.svelte.d.ts +10 -0
- package/dist/components/AsSaudiyahRaqmAlHuwiyahAlWataniyahView/AsSaudiyahRaqmAlHuwiyahAlWataniyahView.svelte +40 -0
- package/dist/components/AsSaudiyahRaqmAlHuwiyahAlWataniyahView/AsSaudiyahRaqmAlHuwiyahAlWataniyahView.svelte.d.ts +8 -0
- package/dist/components/AustraliaTaxFileNumberInput/AustraliaTaxFileNumberInput.svelte +55 -0
- package/dist/components/AustraliaTaxFileNumberInput/AustraliaTaxFileNumberInput.svelte.d.ts +10 -0
- package/dist/components/AustraliaTaxFileNumberView/AustraliaTaxFileNumberView.svelte +40 -0
- package/dist/components/AustraliaTaxFileNumberView/AustraliaTaxFileNumberView.svelte.d.ts +8 -0
- package/dist/components/Autosuggest/Autosuggest.svelte +175 -8
- package/dist/components/Autosuggest/Autosuggest.svelte.d.ts +18 -4
- package/dist/components/AvatarGroup/AvatarGroup.svelte +5 -1
- package/dist/components/BarChart/BarChart.svelte +5 -1
- package/dist/components/BarcodeImage/BarcodeImage.svelte +7 -1
- package/dist/components/BreadcrumbLink/BreadcrumbLink.svelte +12 -2
- package/dist/components/BreadcrumbLink/BreadcrumbLink.svelte.d.ts +4 -0
- package/dist/components/BreadcrumbListItem/BreadcrumbListItem.svelte +3 -3
- package/dist/components/Byline/Byline.svelte +4 -1
- package/dist/components/CandlestickChart/CandlestickChart.svelte +5 -1
- package/dist/components/Caption/Caption.svelte +1 -0
- package/dist/components/CareCard/CareCard.svelte +1 -0
- package/dist/components/Cascader/Cascader.svelte +7 -1
- package/dist/components/ChatComposer/ChatComposer.svelte +6 -3
- package/dist/components/ChatList/ChatList.svelte +6 -2
- package/dist/components/ChatListItem/ChatListItem.svelte +10 -2
- package/dist/components/ChatListItem/ChatListItem.svelte.d.ts +2 -0
- package/dist/components/ChatMessage/ChatMessage.svelte +6 -2
- package/dist/components/ChatNav/ChatNav.svelte +6 -2
- package/dist/components/CheckListItem/CheckListItem.svelte +4 -1
- package/dist/components/CheckboxGroup/CheckboxGroup.svelte +1 -0
- package/dist/components/ChoroplethChart/ChoroplethChart.svelte +5 -1
- package/dist/components/Citation/Citation.svelte +6 -2
- package/dist/components/Coachmark/Coachmark.svelte +20 -10
- package/dist/components/Code/Code.svelte +6 -2
- package/dist/components/CodeBlock/CodeBlock.svelte +6 -2
- package/dist/components/CollectionListItem/CollectionListItem.svelte +1 -1
- package/dist/components/ColombiaCedulaDeCiudadaniaInput/ColombiaCedulaDeCiudadaniaInput.svelte +55 -0
- package/dist/components/ColombiaCedulaDeCiudadaniaInput/ColombiaCedulaDeCiudadaniaInput.svelte.d.ts +10 -0
- package/dist/components/ColombiaCedulaDeCiudadaniaView/ColombiaCedulaDeCiudadaniaView.svelte +40 -0
- package/dist/components/ColombiaCedulaDeCiudadaniaView/ColombiaCedulaDeCiudadaniaView.svelte.d.ts +8 -0
- package/dist/components/ColumnChart/ColumnChart.svelte +5 -1
- package/dist/components/Combobox/Combobox.svelte +11 -9
- package/dist/components/Comment/Comment.svelte +5 -1
- package/dist/components/ComposedChart/ComposedChart.svelte +5 -1
- package/dist/components/ContentsListItem/ContentsListItem.svelte +4 -1
- package/dist/components/ContentsNav/ContentsNav.svelte +56 -36
- package/dist/components/ContextMenu/ContextMenu.svelte +19 -17
- package/dist/components/ContextualHelp/ContextualHelp.svelte +55 -26
- package/dist/components/ContextualHelp/ContextualHelp.svelte.d.ts +4 -2
- package/dist/components/ConvertDiv/ConvertDiv.svelte +31 -0
- package/dist/components/ConvertDiv/ConvertDiv.svelte.d.ts +11 -0
- package/dist/components/ConvertFromDiv/ConvertFromDiv.svelte +25 -0
- package/dist/components/ConvertFromDiv/ConvertFromDiv.svelte.d.ts +9 -0
- package/dist/components/ConvertFromUnitDiv/ConvertFromUnitDiv.svelte +25 -0
- package/dist/components/ConvertFromUnitDiv/ConvertFromUnitDiv.svelte.d.ts +9 -0
- package/dist/components/ConvertFromValueDiv/ConvertFromValueDiv.svelte +25 -0
- package/dist/components/ConvertFromValueDiv/ConvertFromValueDiv.svelte.d.ts +9 -0
- package/dist/components/ConvertIntoDiv/ConvertIntoDiv.svelte +25 -0
- package/dist/components/ConvertIntoDiv/ConvertIntoDiv.svelte.d.ts +9 -0
- package/dist/components/ConvertIntoUnitDiv/ConvertIntoUnitDiv.svelte +25 -0
- package/dist/components/ConvertIntoUnitDiv/ConvertIntoUnitDiv.svelte.d.ts +9 -0
- package/dist/components/ConvertIntoValueDiv/ConvertIntoValueDiv.svelte +25 -0
- package/dist/components/ConvertIntoValueDiv/ConvertIntoValueDiv.svelte.d.ts +9 -0
- package/dist/components/CurrencyInput/CurrencyInput.svelte +61 -8
- package/dist/components/CurrencyInput/CurrencyInput.svelte.d.ts +9 -4
- package/dist/components/DateTimeNowInput/DateTimeNowInput.svelte +18 -16
- package/dist/components/DateTimeNowInput/DateTimeNowInput.svelte.d.ts +3 -3
- package/dist/components/DescriptionList/DescriptionList.svelte +0 -2
- package/dist/components/DescriptionListItem/DescriptionListItem.svelte +0 -2
- package/dist/components/DialGroup/DialGroup.svelte +5 -1
- package/dist/components/Dialog/Dialog.svelte +14 -1
- package/dist/components/Dialog/modal.d.ts +4 -0
- package/dist/components/Dialog/modal.js +47 -0
- package/dist/components/Diff/Diff.svelte +5 -1
- package/dist/components/DigitalObjectIdentifierLink/DigitalObjectIdentifierLink.svelte +16 -7
- package/dist/components/DigitalObjectIdentifierLink/DigitalObjectIdentifierLink.svelte.d.ts +4 -2
- package/dist/components/DocumentList/DocumentList.svelte +0 -1
- package/dist/components/DocumentListItem/DocumentListItem.svelte +0 -2
- package/dist/components/Drawer/Drawer.svelte +35 -12
- package/dist/components/DropdownMenu/DropdownMenu.svelte +27 -16
- package/dist/components/EcuadorCedulaDeIdentidadInput/EcuadorCedulaDeIdentidadInput.svelte +55 -0
- package/dist/components/EcuadorCedulaDeIdentidadInput/EcuadorCedulaDeIdentidadInput.svelte.d.ts +10 -0
- package/dist/components/EcuadorCedulaDeIdentidadView/EcuadorCedulaDeIdentidadView.svelte +40 -0
- package/dist/components/EcuadorCedulaDeIdentidadView/EcuadorCedulaDeIdentidadView.svelte.d.ts +8 -0
- package/dist/components/EireIndividualHealthIdentifierView/EireIndividualHealthIdentifierView.svelte +2 -1
- package/dist/components/EspanaTarjetaSanitariaIndividualView/EspanaTarjetaSanitariaIndividualView.svelte +2 -1
- package/dist/components/Event/Event.svelte +6 -2
- package/dist/components/FeatureCard/FeatureCard.svelte +5 -1
- package/dist/components/FeaturePhoto/FeaturePhoto.svelte +4 -1
- package/dist/components/FileDialog/FileDialog.svelte +7 -1
- package/dist/components/FileTree/FileTree.svelte +20 -5
- package/dist/components/FiveFaceRatingPicker/FiveFaceRatingPicker.svelte +3 -1
- package/dist/components/FiveFaceRatingPickerButton/FiveFaceRatingPickerButton.svelte +2 -2
- package/dist/components/FiveStarRatingPicker/FiveStarRatingPicker.svelte +3 -1
- package/dist/components/FiveStarRatingPickerButton/FiveStarRatingPickerButton.svelte +2 -2
- package/dist/components/FlexStack/FlexStack.svelte +3 -1
- package/dist/components/FloatingPanel/FloatingPanel.svelte +15 -13
- package/dist/components/FunnelChart/FunnelChart.svelte +5 -1
- package/dist/components/GaugeChart/GaugeChart.svelte +5 -1
- package/dist/components/GoToNextSection/GoToNextSection.svelte +2 -3
- package/dist/components/GoToPreviousSection/GoToPreviousSection.svelte +2 -3
- package/dist/components/GoToTop/GoToTop.svelte +0 -2
- package/dist/components/GrailLayoutBottomFooter/GrailLayoutBottomFooter.svelte +4 -1
- package/dist/components/GrailLayoutCenterMain/GrailLayoutCenterMain.svelte +4 -1
- package/dist/components/GrailLayoutLeftAside/GrailLayoutLeftAside.svelte +4 -1
- package/dist/components/GrailLayoutRightAside/GrailLayoutRightAside.svelte +4 -1
- package/dist/components/GrailLayoutTopHeader/GrailLayoutTopHeader.svelte +4 -1
- package/dist/components/GraphicBlock/GraphicBlock.svelte +1 -1
- package/dist/components/Grid/Grid.svelte +12 -3
- package/dist/components/Grid/Grid.svelte.d.ts +2 -0
- package/dist/components/Headline/Headline.svelte +4 -1
- package/dist/components/HeatmapChart/HeatmapChart.svelte +5 -1
- package/dist/components/HeatmapChartWithYearOfDays/HeatmapChartWithYearOfDays.svelte +5 -1
- package/dist/components/Hero/Hero.svelte +6 -2
- package/dist/components/HongKongIdentityCardInput/HongKongIdentityCardInput.svelte +55 -0
- package/dist/components/HongKongIdentityCardInput/HongKongIdentityCardInput.svelte.d.ts +10 -0
- package/dist/components/HongKongIdentityCardView/HongKongIdentityCardView.svelte +40 -0
- package/dist/components/HongKongIdentityCardView/HongKongIdentityCardView.svelte.d.ts +8 -0
- package/dist/components/HorizontalScroller/HorizontalScroller.svelte +1 -0
- package/dist/components/HoverCard/HoverCard.svelte +14 -13
- package/dist/components/IconListItem/IconListItem.svelte +4 -1
- package/dist/components/InputWithMask/InputWithMask.svelte +4 -1
- package/dist/components/IranKodEMelliInput/IranKodEMelliInput.svelte +55 -0
- package/dist/components/IranKodEMelliInput/IranKodEMelliInput.svelte.d.ts +10 -0
- package/dist/components/IranKodEMelliView/IranKodEMelliView.svelte +40 -0
- package/dist/components/IranKodEMelliView/IranKodEMelliView.svelte.d.ts +8 -0
- package/dist/components/Kbd/Kbd.svelte +5 -1
- package/dist/components/KbdShortcut/KbdShortcut.svelte +9 -2
- package/dist/components/LineChart/LineChart.svelte +5 -1
- package/dist/components/Listbox/Listbox.svelte +22 -117
- package/dist/components/Listbox/listbox-machine.d.ts +81 -0
- package/dist/components/Listbox/listbox-machine.js +116 -0
- package/dist/components/Listbox/search-text.d.ts +22 -0
- package/dist/components/Listbox/search-text.js +56 -0
- package/dist/components/Listbox/typeahead.d.ts +19 -0
- package/dist/components/Listbox/typeahead.js +39 -0
- package/dist/components/Loading/Loading.svelte +5 -1
- package/dist/components/MalaysiaKadPengenalanInput/MalaysiaKadPengenalanInput.svelte +55 -0
- package/dist/components/MalaysiaKadPengenalanInput/MalaysiaKadPengenalanInput.svelte.d.ts +10 -0
- package/dist/components/MalaysiaKadPengenalanView/MalaysiaKadPengenalanView.svelte +40 -0
- package/dist/components/MalaysiaKadPengenalanView/MalaysiaKadPengenalanView.svelte.d.ts +8 -0
- package/dist/components/Mark/Mark.svelte +0 -2
- package/dist/components/MentionsInput/MentionsInput.svelte +14 -2
- package/dist/components/Menu/Menu.svelte +1 -3
- package/dist/components/MenuBar/MenuBar.svelte +1 -3
- package/dist/components/MenuGroup/MenuGroup.svelte +6 -1
- package/dist/components/MiddleTruncation/MiddleTruncation.svelte +13 -3
- package/dist/components/MockupBrowser/MockupBrowser.svelte +5 -1
- package/dist/components/MockupLaptop/MockupLaptop.svelte +5 -1
- package/dist/components/MockupPhonePortrait/MockupPhonePortrait.svelte +5 -1
- package/dist/components/MockupShell/MockupShell.svelte +5 -1
- package/dist/components/MockupTabletLandscape/MockupTabletLandscape.svelte +5 -1
- package/dist/components/MockupTabletPortrait/MockupTabletPortrait.svelte +5 -1
- package/dist/components/MockupWatch/MockupWatch.svelte +5 -1
- package/dist/components/MockupWindow/MockupWindow.svelte +5 -1
- package/dist/components/MutuallyExclusive/MutuallyExclusive.svelte +0 -1
- package/dist/components/NavigationMenu/NavigationMenu.svelte +51 -3
- package/dist/components/NavigationMenu/NavigationMenu.svelte.d.ts +4 -0
- package/dist/components/NavigationMenu/overflow-navigation.d.ts +35 -0
- package/dist/components/NavigationMenu/overflow-navigation.js +133 -0
- package/dist/components/NetPromoterScorePicker/NetPromoterScorePicker.svelte +3 -1
- package/dist/components/NetPromoterScorePickerButton/NetPromoterScorePickerButton.svelte +2 -2
- package/dist/components/NigeriaNationalIdentificationNumberInput/NigeriaNationalIdentificationNumberInput.svelte +55 -0
- package/dist/components/NigeriaNationalIdentificationNumberInput/NigeriaNationalIdentificationNumberInput.svelte.d.ts +10 -0
- package/dist/components/NigeriaNationalIdentificationNumberView/NigeriaNationalIdentificationNumberView.svelte +40 -0
- package/dist/components/NigeriaNationalIdentificationNumberView/NigeriaNationalIdentificationNumberView.svelte.d.ts +8 -0
- package/dist/components/Organization/Organization.svelte +6 -2
- package/dist/components/PaginationLink/PaginationLink.svelte +12 -2
- package/dist/components/PaginationLink/PaginationLink.svelte.d.ts +4 -0
- package/dist/components/PakistanComputerizedNationalIdentityCardInput/PakistanComputerizedNationalIdentityCardInput.svelte +55 -0
- package/dist/components/PakistanComputerizedNationalIdentityCardInput/PakistanComputerizedNationalIdentityCardInput.svelte.d.ts +10 -0
- package/dist/components/PakistanComputerizedNationalIdentityCardView/PakistanComputerizedNationalIdentityCardView.svelte +40 -0
- package/dist/components/PakistanComputerizedNationalIdentityCardView/PakistanComputerizedNationalIdentityCardView.svelte.d.ts +8 -0
- package/dist/components/Person/Person.svelte +6 -2
- package/dist/components/PhaseBanner/PhaseBanner.svelte +0 -1
- package/dist/components/Pictogram/Pictogram.svelte +4 -1
- package/dist/components/Picture/Picture.svelte +27 -0
- package/dist/components/Picture/Picture.svelte.d.ts +9 -0
- package/dist/components/PieChart/PieChart.svelte +5 -1
- package/dist/components/Place/Place.svelte +6 -2
- package/dist/components/PopconfirmDialog/PopconfirmDialog.svelte +16 -3
- package/dist/components/Popover/Popover.svelte +39 -24
- package/dist/components/Popover/popover.d.ts +9 -0
- package/dist/components/Popover/popover.js +50 -0
- package/dist/components/Popup/Popup.svelte +40 -25
- package/dist/components/ProductCard/ProductCard.svelte +5 -1
- package/dist/components/ProgressBar/ProgressBar.svelte +0 -1
- package/dist/components/Question/Question.svelte +5 -1
- package/dist/components/RadarChart/RadarChart.svelte +5 -1
- package/dist/components/RedAmberGreenPickerButton/RedAmberGreenPickerButton.svelte +2 -2
- package/dist/components/RedOrangeYellowGreenBluePickerButton/RedOrangeYellowGreenBluePickerButton.svelte +2 -2
- package/dist/components/RelatedContent/RelatedContent.svelte +0 -1
- package/dist/components/Resizable/Resizable.svelte +1 -0
- package/dist/components/RingChart/RingChart.svelte +5 -1
- package/dist/components/SankeyChart/SankeyChart.svelte +5 -1
- package/dist/components/ScatterChart/ScatterChart.svelte +5 -1
- package/dist/components/ScreenReaderSpan/ScreenReaderSpan.svelte +6 -2
- package/dist/components/ScrollArea/ScrollArea.svelte +1 -0
- package/dist/components/ScrollBar/ScrollBar.svelte +78 -16
- package/dist/components/ScrollBar/ScrollBar.svelte.d.ts +13 -1
- package/dist/components/Scroller/Scroller.svelte +4 -1
- package/dist/components/ScrollerBase/ScrollerBase.svelte +1 -1
- package/dist/components/SectionLink/SectionLink.svelte +0 -2
- package/dist/components/SectionList/SectionList.svelte +0 -2
- package/dist/components/SectionListItem/SectionListItem.svelte +1 -3
- package/dist/components/SectionNav/SectionNav.svelte +0 -1
- package/dist/components/Separator/Separator.svelte +1 -0
- package/dist/components/Sheet/Sheet.svelte +32 -11
- package/dist/components/ShowMore/ShowMore.svelte +9 -2
- package/dist/components/SlideOutDrawer/SlideOutDrawer.svelte +33 -10
- package/dist/components/SliderButton/SliderButton.svelte +64 -6
- package/dist/components/SliderButton/SliderButton.svelte.d.ts +8 -2
- package/dist/components/SplitButton/SplitButton.svelte +29 -5
- package/dist/components/SplitButton/SplitButton.svelte.d.ts +3 -3
- package/dist/components/SplitView/SplitView.svelte +1 -0
- package/dist/components/Splitter/Splitter.svelte +1 -0
- package/dist/components/StatusLight/StatusLight.svelte +5 -8
- package/dist/components/StepListItem/StepListItem.svelte +3 -3
- package/dist/components/StickyPromoBanner/StickyPromoBanner.svelte +1 -0
- package/dist/components/SunburstChart/SunburstChart.svelte +5 -1
- package/dist/components/SuperBanner/SuperBanner.svelte +5 -1
- package/dist/components/TabBar/TabBar.svelte +1 -3
- package/dist/components/Tag/Tag.svelte +10 -2
- package/dist/components/TaiwanGuominShenfenzhengTongyiBianhaoInput/TaiwanGuominShenfenzhengTongyiBianhaoInput.svelte +55 -0
- package/dist/components/TaiwanGuominShenfenzhengTongyiBianhaoInput/TaiwanGuominShenfenzhengTongyiBianhaoInput.svelte.d.ts +10 -0
- package/dist/components/TaiwanGuominShenfenzhengTongyiBianhaoView/TaiwanGuominShenfenzhengTongyiBianhaoView.svelte +40 -0
- package/dist/components/TaiwanGuominShenfenzhengTongyiBianhaoView/TaiwanGuominShenfenzhengTongyiBianhaoView.svelte.d.ts +8 -0
- package/dist/components/TaskBar/TaskBar.svelte +1 -3
- package/dist/components/TextAreaInput/TextAreaInput.svelte +1 -2
- package/dist/components/TextAreaInputWithCharacterCounter/TextAreaInputWithCharacterCounter.svelte +4 -3
- package/dist/components/ThemeProvider/ThemeProvider.svelte +3 -3
- package/dist/components/Tile/Tile.svelte +5 -1
- package/dist/components/TimeoutDialog/TimeoutDialog.svelte +14 -1
- package/dist/components/TimerButton/TimerButton.svelte +55 -7
- package/dist/components/TimerButton/TimerButton.svelte.d.ts +9 -3
- package/dist/components/ToolBar/ToolBar.svelte +1 -3
- package/dist/components/ToolCallError/ToolCallError.svelte +0 -1
- package/dist/components/ToolCallName/ToolCallName.svelte +0 -2
- package/dist/components/Tooltip/Tooltip.svelte +14 -12
- package/dist/components/Tour/Tour.svelte +5 -4
- package/dist/components/TourList/TourList.svelte +10 -9
- package/dist/components/TourList/TourList.svelte.d.ts +2 -0
- package/dist/components/TourListItem/TourListItem.svelte +2 -2
- package/dist/components/TransferList/TransferList.svelte +8 -2
- package/dist/components/TreeLink/TreeLink.svelte +12 -2
- package/dist/components/TreeLink/TreeLink.svelte.d.ts +4 -0
- package/dist/components/TreeList/TreeList.svelte +3 -3
- package/dist/components/TreeListItem/TreeListItem.svelte +9 -1
- package/dist/components/TreeMenu/TreeMenu.svelte +40 -1
- package/dist/components/TreeSelect/TreeSelect.svelte +10 -3
- package/dist/components/TuaisceartEireannHealthAndCareNumberView/TuaisceartEireannHealthAndCareNumberView.svelte +2 -1
- package/dist/components/UruguayCedulaDeIdentidadInput/UruguayCedulaDeIdentidadInput.svelte +55 -0
- package/dist/components/UruguayCedulaDeIdentidadInput/UruguayCedulaDeIdentidadInput.svelte.d.ts +10 -0
- package/dist/components/UruguayCedulaDeIdentidadView/UruguayCedulaDeIdentidadView.svelte +40 -0
- package/dist/components/UruguayCedulaDeIdentidadView/UruguayCedulaDeIdentidadView.svelte.d.ts +8 -0
- package/dist/components/VideoPlayer/VideoPlayer.svelte +6 -2
- package/dist/components/VietNamCanCuocCongDanInput/VietNamCanCuocCongDanInput.svelte +55 -0
- package/dist/components/VietNamCanCuocCongDanInput/VietNamCanCuocCongDanInput.svelte.d.ts +10 -0
- package/dist/components/VietNamCanCuocCongDanView/VietNamCanCuocCongDanView.svelte +40 -0
- package/dist/components/VietNamCanCuocCongDanView/VietNamCanCuocCongDanView.svelte.d.ts +8 -0
- package/dist/components/Visible/Visible.svelte +1 -1
- package/dist/components/WarningText/WarningText.svelte +48 -0
- package/dist/components/WarningText/WarningText.svelte.d.ts +13 -0
- package/dist/components/WheelPicker/WheelPicker.svelte +18 -4
- package/dist/components/WheelPicker/wheel-picker.js +18 -3
- package/dist/index.d.ts +33 -0
- package/dist/index.js +33 -0
- package/index.md +4 -4
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,11 @@
|
|
|
3
3
|
The format is loosely based on [Keep a Changelog](https://keepachangelog.com/)
|
|
4
4
|
and the package follows [Semantic Versioning](https://semver.org/).
|
|
5
5
|
|
|
6
|
+
|
|
7
|
+
## 0.6.2 — 2026-11-03
|
|
8
|
+
|
|
9
|
+
- Fixed: the published barrel now exports every component in the catalog (recent components were missing). Dependencies updated within range (Svelte 5.57.3).
|
|
10
|
+
|
|
6
11
|
## 0.6.0 — 2026-10-23 (three components)
|
|
7
12
|
|
|
8
13
|
- New: `HeatmapChartWithYearOfDays`, `MiddleTruncation`, `WheelPicker`.
|
|
@@ -114,7 +119,7 @@ Metadata-only patch; no code change. Ships the corrected package
|
|
|
114
119
|
metadata to the registry:
|
|
115
120
|
|
|
116
121
|
- `license` is the project SPDX menu (`MIT OR Apache-2.0 OR
|
|
117
|
-
|
|
122
|
+
GPL-2.0-only OR GPL-3.0-only OR BSD-3-Clause`), replacing the
|
|
118
123
|
single-license field that contradicted the repository's LICENSE.md.
|
|
119
124
|
- `repository`, `homepage`, and `bugs` point at the LilyDesignSystem
|
|
120
125
|
organisation and the documentation site.
|
package/LICENSE.md
CHANGED
|
@@ -8,15 +8,15 @@ Lily Design System™ is free open source software.
|
|
|
8
8
|
|
|
9
9
|
License is any of these, at your option, or contact us for custom license options.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
- [MIT](https://opensource.org/license/mit) ([SPDX: MIT](https://spdx.org/licenses/MIT.html))
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
- [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) ([SPDX: Apache-2.0](https://spdx.org/licenses/Apache-2.0.html))
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
- [GNU General Public License v2.0](https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html) ([SPDX: GPL-2.0-only](https://spdx.org/licenses/GPL-2.0-only.html))
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
- [GNU General Public License v3.0](https://www.gnu.org/licenses/gpl-3.0-standalone.html) ([SPDX: GPL-3.0-only](https://spdx.org/licenses/GPL-3.0-only.html))
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
- [BSD 3-Clause License](https://opensource.org/license/bsd-3-clause) ([SPDX: BSD-3-Clause](https://spdx.org/licenses/BSD-3-Clause.html))
|
|
20
20
|
|
|
21
21
|
## SPDX
|
|
22
22
|
|
|
@@ -31,9 +31,9 @@ single identifier from the list where the packaging format does not accept a
|
|
|
31
31
|
disjunction. You do not need permission to pick one: choose whichever member of
|
|
32
32
|
the list suits your project and comply with that one.
|
|
33
33
|
|
|
34
|
-
This applies to the whole repository — the component catalog, the
|
|
35
|
-
libraries, the
|
|
36
|
-
|
|
34
|
+
This applies to the whole repository — the component catalog, the headless
|
|
35
|
+
libraries, the example applications, the helper packages, the `themes/`
|
|
36
|
+
stylesheets, the `bin/` tooling, and the documentation.
|
|
37
37
|
|
|
38
38
|
## Scope note
|
|
39
39
|
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Lily Design System™ - Svelte Headless
|
|
2
2
|
|
|
3
|
-
A headless Svelte 5 component library with
|
|
3
|
+
A headless Svelte 5 component library with 607 components. All components are headless (no built-in styles), fully accessible (WCAG 2.2 AAA), and use Svelte 5 runes.
|
|
4
4
|
|
|
5
5
|
## Components
|
|
6
6
|
|
|
@@ -394,7 +394,7 @@ A headless Svelte 5 component library with 490 components. All components are he
|
|
|
394
394
|
| table-body | `<tbody>` |
|
|
395
395
|
| table-foot | `<tfoot>` |
|
|
396
396
|
| table-row | `<tr>` |
|
|
397
|
-
| table-td
|
|
397
|
+
| table-td | `<td>` |
|
|
398
398
|
| select | `<select>` |
|
|
399
399
|
| span | `<span>` |
|
|
400
400
|
|
|
@@ -422,7 +422,7 @@ All components follow WCAG 2.2 AAA guidelines:
|
|
|
422
422
|
|
|
423
423
|
- **Semantic HTML**: Proper element usage (`<button>`, `<nav>`, `<dialog>`, etc.)
|
|
424
424
|
- **ARIA attributes**: Roles, labels, states, and properties
|
|
425
|
-
- **Keyboard
|
|
425
|
+
- **Keyboard**: native elements are keyboard-operable by default; about 34 components add APG key handling (arrows, Home/End, Escape, type-ahead) — see each component's `AGENTS.md`
|
|
426
426
|
- **Screen readers**: Proper announcements via aria-live, role="alert", etc.
|
|
427
427
|
- **Focus management**: Logical focus order and visible focus indicators
|
|
428
428
|
- **Error handling**: Accessible error messages linked via aria-errormessage
|
|
@@ -433,7 +433,7 @@ No strings are hardcoded in any component. All user-facing text comes through pr
|
|
|
433
433
|
|
|
434
434
|
## Related Projects
|
|
435
435
|
|
|
436
|
-
- [Lily Design System](https://github.com/LilyDesignSystem/lily) — Parent project
|
|
436
|
+
- [Lily Design System](https://github.com/LilyDesignSystem/lily-design-system) — Parent project
|
|
437
437
|
- [Svelte SvelteKit Examples](../lily-design-system-svelte-sveltekit-examples/) — Example app with simple styling
|
|
438
438
|
- [React Headless](../lily-design-system-react-headless/) — React equivalent
|
|
439
439
|
- [Vue Headless](../lily-design-system-vue-headless/) — Vue equivalent
|
|
@@ -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
|
<!-- AccordionLink.svelte -->
|
|
16
|
-
<
|
|
21
|
+
<a
|
|
22
|
+
class={`accordion-link ${className}`}
|
|
23
|
+
{href}
|
|
24
|
+
aria-label={label}
|
|
25
|
+
{...restProps}
|
|
26
|
+
>
|
|
17
27
|
{@render children?.()}
|
|
18
|
-
</
|
|
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
|
};
|
|
@@ -33,11 +33,12 @@
|
|
|
33
33
|
// - Adobe Spectrum ActionGroup: https://spectrum.adobe.com/page/action-group/
|
|
34
34
|
|
|
35
35
|
import type { Snippet } from "svelte";
|
|
36
|
+
import { popoverState, popoverSupported, toggleOpened } from "../Popover/popover.js";
|
|
36
37
|
|
|
37
38
|
let {
|
|
38
39
|
class: className = "",
|
|
39
40
|
label,
|
|
40
|
-
overflowOpen = false,
|
|
41
|
+
overflowOpen = $bindable(false),
|
|
41
42
|
overflowLabel = undefined,
|
|
42
43
|
onOverflowToggle = undefined,
|
|
43
44
|
children = undefined,
|
|
@@ -47,18 +48,30 @@
|
|
|
47
48
|
class?: string;
|
|
48
49
|
/** Accessible label for the group (REQUIRED) */
|
|
49
50
|
label: string;
|
|
50
|
-
/** Whether the overflow menu is open */
|
|
51
|
+
/** Whether the overflow menu is open. Bindable: the browser opens and light-dismisses it. */
|
|
51
52
|
overflowOpen?: boolean;
|
|
52
53
|
/** Accessible label for the overflow trigger button */
|
|
53
54
|
overflowLabel?: string;
|
|
54
|
-
/** Click handler for the overflow trigger */
|
|
55
|
-
onOverflowToggle?: () => void;
|
|
55
|
+
/** Click handler for the overflow trigger; call preventDefault() on the event to keep the menu as it is */
|
|
56
|
+
onOverflowToggle?: (event: MouseEvent) => void;
|
|
56
57
|
/** Visible action buttons */
|
|
57
58
|
children?: Snippet;
|
|
58
59
|
/** Overflow menu content */
|
|
59
60
|
overflow?: Snippet;
|
|
60
61
|
[key: string]: unknown;
|
|
61
62
|
} = $props();
|
|
63
|
+
|
|
64
|
+
const uid = $props.id();
|
|
65
|
+
const menuId = `action-group-overflow-menu-${uid}`;
|
|
66
|
+
let menu: HTMLDivElement | undefined = $state();
|
|
67
|
+
|
|
68
|
+
// With the Popover API the trigger's command="toggle-popover" opens and closes the menu and the toggle event
|
|
69
|
+
// writes `overflowOpen` back; without it, the click toggles `overflowOpen` and popoverState sets `hidden`.
|
|
70
|
+
function toggle(event: MouseEvent) {
|
|
71
|
+
onOverflowToggle?.(event);
|
|
72
|
+
if (event.defaultPrevented) return;
|
|
73
|
+
if (menu && !popoverSupported(menu)) overflowOpen = !overflowOpen;
|
|
74
|
+
}
|
|
62
75
|
</script>
|
|
63
76
|
|
|
64
77
|
<!-- ActionGroup.svelte -->
|
|
@@ -78,9 +91,20 @@
|
|
|
78
91
|
aria-haspopup="menu"
|
|
79
92
|
aria-expanded={overflowOpen}
|
|
80
93
|
aria-label={overflowLabel}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
94
|
+
aria-controls={menuId}
|
|
95
|
+
command="toggle-popover"
|
|
96
|
+
commandfor={menuId}
|
|
97
|
+
popovertarget={menuId}
|
|
98
|
+
onclick={toggle}>…</button
|
|
99
|
+
>
|
|
100
|
+
<div
|
|
101
|
+
bind:this={menu}
|
|
102
|
+
class="action-group-overflow-menu"
|
|
103
|
+
id={menuId}
|
|
104
|
+
popover="auto"
|
|
105
|
+
use:popoverState={overflowOpen}
|
|
106
|
+
ontoggle={(event) => (overflowOpen = toggleOpened(event))}
|
|
107
|
+
>
|
|
84
108
|
{@render overflow()}
|
|
85
109
|
</div>
|
|
86
110
|
{/if}
|
|
@@ -3,18 +3,18 @@ type $$ComponentProps = {
|
|
|
3
3
|
class?: string;
|
|
4
4
|
/** Accessible label for the group (REQUIRED) */
|
|
5
5
|
label: string;
|
|
6
|
-
/** Whether the overflow menu is open */
|
|
6
|
+
/** Whether the overflow menu is open. Bindable: the browser opens and light-dismisses it. */
|
|
7
7
|
overflowOpen?: boolean;
|
|
8
8
|
/** Accessible label for the overflow trigger button */
|
|
9
9
|
overflowLabel?: string;
|
|
10
|
-
/** Click handler for the overflow trigger */
|
|
11
|
-
onOverflowToggle?: () => void;
|
|
10
|
+
/** Click handler for the overflow trigger; call preventDefault() on the event to keep the menu as it is */
|
|
11
|
+
onOverflowToggle?: (event: MouseEvent) => void;
|
|
12
12
|
/** Visible action buttons */
|
|
13
13
|
children?: Snippet;
|
|
14
14
|
/** Overflow menu content */
|
|
15
15
|
overflow?: Snippet;
|
|
16
16
|
[key: string]: unknown;
|
|
17
17
|
};
|
|
18
|
-
declare const ActionGroup: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
18
|
+
declare const ActionGroup: import("svelte").Component<$$ComponentProps, {}, "overflowOpen">;
|
|
19
19
|
type ActionGroup = ReturnType<typeof ActionGroup>;
|
|
20
20
|
export default ActionGroup;
|
|
@@ -13,6 +13,10 @@
|
|
|
13
13
|
</script>
|
|
14
14
|
|
|
15
15
|
<!-- AddressographBox.svelte -->
|
|
16
|
-
<div
|
|
16
|
+
<div
|
|
17
|
+
class={`addressograph-box ${className}`}
|
|
18
|
+
aria-label={label}
|
|
19
|
+
{...restProps}
|
|
20
|
+
>
|
|
17
21
|
{@render children?.()}
|
|
18
22
|
</div>
|
|
@@ -89,9 +89,7 @@
|
|
|
89
89
|
} = $props();
|
|
90
90
|
|
|
91
91
|
// Default aria-live based on role if not explicitly set
|
|
92
|
-
let ariaLive = $derived(
|
|
93
|
-
live ?? (role === "alert" ? "assertive" : "polite"),
|
|
94
|
-
);
|
|
92
|
+
let ariaLive = $derived(live ?? (role === "alert" ? "assertive" : "polite"));
|
|
95
93
|
</script>
|
|
96
94
|
|
|
97
95
|
<!-- Alert.svelte -->
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
// </AlertDialog>
|
|
39
39
|
//
|
|
40
40
|
// Keyboard:
|
|
41
|
-
// - Escape:
|
|
42
|
-
// - Tab:
|
|
41
|
+
// - Escape: closes the dialog (showModal(): the browser fires cancel; the component sets open to false)
|
|
42
|
+
// - Tab: stays inside the dialog (the browser traps it while the dialog is modal)
|
|
43
43
|
//
|
|
44
44
|
// Accessibility:
|
|
45
45
|
// - role="alertdialog" signals critical content requiring acknowledgment
|
|
@@ -55,7 +55,6 @@
|
|
|
55
55
|
//
|
|
56
56
|
// Claude rules:
|
|
57
57
|
// - Headless: no CSS, no styles — consumer provides all styling
|
|
58
|
-
// - Consumer is responsible for focus trapping and Escape key handling
|
|
59
58
|
// - The open prop must use $bindable() for two-way binding
|
|
60
59
|
// - Do not use heading elements; use <p><strong> for the title
|
|
61
60
|
// - Distinct from Dialog: use AlertDialog only for critical messages
|
|
@@ -65,6 +64,7 @@
|
|
|
65
64
|
// - WAI-ARIA Alert and Message Dialogs Pattern: https://www.w3.org/WAI/ARIA/apg/patterns/alertdialog/
|
|
66
65
|
|
|
67
66
|
import type { Snippet } from "svelte";
|
|
67
|
+
import { modalDialog } from "../Dialog/modal.js";
|
|
68
68
|
|
|
69
69
|
let {
|
|
70
70
|
class: className = "",
|
|
@@ -95,7 +95,12 @@
|
|
|
95
95
|
{#if open}
|
|
96
96
|
<dialog
|
|
97
97
|
class={`alert-dialog ${className}`}
|
|
98
|
-
|
|
98
|
+
use:modalDialog={true}
|
|
99
|
+
oncancel={(event) => {
|
|
100
|
+
event.preventDefault();
|
|
101
|
+
open = false;
|
|
102
|
+
}}
|
|
103
|
+
onclose={() => (open = false)}
|
|
99
104
|
role="alertdialog"
|
|
100
105
|
aria-labelledby={titleId}
|
|
101
106
|
aria-describedby={description ? descriptionId : undefined}
|
|
@@ -52,7 +52,11 @@
|
|
|
52
52
|
class={`area-chart ${className}`}
|
|
53
53
|
{...restProps}
|
|
54
54
|
>
|
|
55
|
-
<div
|
|
55
|
+
<div
|
|
56
|
+
class="area-chart-graphic"
|
|
57
|
+
role="img"
|
|
58
|
+
aria-label={label}
|
|
59
|
+
>
|
|
56
60
|
{@render children?.()}
|
|
57
61
|
</div>
|
|
58
62
|
{#if dataTable}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// AsSaudiyahRaqmAlHuwiyahAlWataniyahInput component
|
|
3
|
+
//
|
|
4
|
+
// A headless input for entering Saudi Arabia's National Identification Number.
|
|
5
|
+
// Format: Ten digits. The first digit is 1 for a Saudi citizen and 2 for a resident (the iqama number), and the last digit is a check digit under the Luhn algorithm: counting from the right, every second digit is doubled (subtracting 9 when the result exceeds 9), and the total must be a multiple of 10.
|
|
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
|
+
// <AsSaudiyahRaqmAlHuwiyahAlWataniyahInput label="National Identification Number" 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_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
|
+
<!-- AsSaudiyahRaqmAlHuwiyahAlWataniyahInput.svelte -->
|
|
46
|
+
<input
|
|
47
|
+
class={`as-saudiyah-raqm-al-huwiyah-al-wataniyah-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 AsSaudiyahRaqmAlHuwiyahAlWataniyahInput: import("svelte").Component<$$ComponentProps, {}, "value">;
|
|
9
|
+
type AsSaudiyahRaqmAlHuwiyahAlWataniyahInput = ReturnType<typeof AsSaudiyahRaqmAlHuwiyahAlWataniyahInput>;
|
|
10
|
+
export default AsSaudiyahRaqmAlHuwiyahAlWataniyahInput;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// AsSaudiyahRaqmAlHuwiyahAlWataniyahView component
|
|
3
|
+
//
|
|
4
|
+
// A headless display component for showing Saudi Arabia's
|
|
5
|
+
// National Identification Number in a read-only format.
|
|
6
|
+
// Format: Ten digits. The first digit is 1 for a Saudi citizen and 2 for a resident (the iqama number), and the last digit is a check digit under the Luhn algorithm: counting from the right, every second digit is doubled (subtracting 9 when the result exceeds 9), and the total must be a multiple of 10.
|
|
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
|
+
// <AsSaudiyahRaqmAlHuwiyahAlWataniyahView label="National Identification Number" 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_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
|
+
<!-- AsSaudiyahRaqmAlHuwiyahAlWataniyahView.svelte -->
|
|
36
|
+
<span
|
|
37
|
+
class={`as-saudiyah-raqm-al-huwiyah-al-wataniyah-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 AsSaudiyahRaqmAlHuwiyahAlWataniyahView: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
7
|
+
type AsSaudiyahRaqmAlHuwiyahAlWataniyahView = ReturnType<typeof AsSaudiyahRaqmAlHuwiyahAlWataniyahView>;
|
|
8
|
+
export default AsSaudiyahRaqmAlHuwiyahAlWataniyahView;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// AustraliaTaxFileNumberInput component
|
|
3
|
+
//
|
|
4
|
+
// A headless input for entering Australia's Tax File Number (TFN).
|
|
5
|
+
// Format: Nine digits, written 123 456 782 (older numbers have eight). The digits are multiplied by the weights 1,4,3,7,5,8,6,9,10 and summed, and the sum must be a multiple of 11.
|
|
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
|
+
// <AustraliaTaxFileNumberInput label="Tax File Number (TFN)" 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/Tax_file_number
|
|
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
|
+
<!-- AustraliaTaxFileNumberInput.svelte -->
|
|
46
|
+
<input
|
|
47
|
+
class={`australia-tax-file-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 AustraliaTaxFileNumberInput: import("svelte").Component<$$ComponentProps, {}, "value">;
|
|
9
|
+
type AustraliaTaxFileNumberInput = ReturnType<typeof AustraliaTaxFileNumberInput>;
|
|
10
|
+
export default AustraliaTaxFileNumberInput;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// AustraliaTaxFileNumberView component
|
|
3
|
+
//
|
|
4
|
+
// A headless display component for showing Australia's
|
|
5
|
+
// Tax File Number (TFN) in a read-only format.
|
|
6
|
+
// Format: Nine digits, written 123 456 782 (older numbers have eight). The digits are multiplied by the weights 1,4,3,7,5,8,6,9,10 and summed, and the sum must be a multiple of 11.
|
|
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
|
+
// <AustraliaTaxFileNumberView label="Tax File Number (TFN)" 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/Tax_file_number
|
|
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
|
+
<!-- AustraliaTaxFileNumberView.svelte -->
|
|
36
|
+
<span
|
|
37
|
+
class={`australia-tax-file-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 AustraliaTaxFileNumberView: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
7
|
+
type AustraliaTaxFileNumberView = ReturnType<typeof AustraliaTaxFileNumberView>;
|
|
8
|
+
export default AustraliaTaxFileNumberView;
|