@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
|
@@ -24,13 +24,7 @@
|
|
|
24
24
|
// - Adobe Spectrum StatusLight: https://spectrum.adobe.com/page/status-light/
|
|
25
25
|
|
|
26
26
|
type Variant =
|
|
27
|
-
| "
|
|
28
|
-
| "informative"
|
|
29
|
-
| "positive"
|
|
30
|
-
| "notice"
|
|
31
|
-
| "negative"
|
|
32
|
-
| "active"
|
|
33
|
-
| "inactive";
|
|
27
|
+
"neutral" | "informative" | "positive" | "notice" | "negative" | "active" | "inactive";
|
|
34
28
|
|
|
35
29
|
let {
|
|
36
30
|
class: className = "",
|
|
@@ -54,6 +48,9 @@
|
|
|
54
48
|
role="status"
|
|
55
49
|
{...restProps}
|
|
56
50
|
>
|
|
57
|
-
<span
|
|
51
|
+
<span
|
|
52
|
+
class="status-light-dot"
|
|
53
|
+
aria-hidden="true"
|
|
54
|
+
></span>
|
|
58
55
|
<span class="status-light-label">{label}</span>
|
|
59
56
|
</span>
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
// class — string, optional. CSS class appended to the base class.
|
|
10
10
|
// status — "waiting" | "in-progress" | "finished" | "error",
|
|
11
11
|
// default "waiting". Renders as data-status.
|
|
12
|
-
// current — boolean, default false. When true, renders
|
|
12
|
+
// current — boolean, default false. When true, renders data-current.
|
|
13
13
|
// label — string, optional. aria-label override.
|
|
14
14
|
// children — Snippet, required. Step content (typically title and description).
|
|
15
15
|
// ...restProps — additional HTML attributes spread onto the <li>.
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
// <StepListItem status="finished">Cart</StepListItem>
|
|
19
19
|
//
|
|
20
20
|
// Accessibility:
|
|
21
|
-
// -
|
|
21
|
+
// - data-current when current=true.
|
|
22
22
|
// - aria-label optional override.
|
|
23
23
|
//
|
|
24
24
|
// Internationalization:
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
<li
|
|
61
61
|
class={`step-list-item ${className}`}
|
|
62
62
|
data-status={status}
|
|
63
|
-
|
|
63
|
+
data-current={current ? "" : undefined}
|
|
64
64
|
aria-label={label}
|
|
65
65
|
{...restProps}
|
|
66
66
|
>
|
|
@@ -52,7 +52,11 @@
|
|
|
52
52
|
class={`sunburst-chart ${className}`}
|
|
53
53
|
{...restProps}
|
|
54
54
|
>
|
|
55
|
-
<div
|
|
55
|
+
<div
|
|
56
|
+
class="sunburst-chart-graphic"
|
|
57
|
+
role="img"
|
|
58
|
+
aria-label={label}
|
|
59
|
+
>
|
|
56
60
|
{@render children?.()}
|
|
57
61
|
</div>
|
|
58
62
|
{#if dataTable}
|
|
@@ -70,9 +70,7 @@
|
|
|
70
70
|
|
|
71
71
|
function onkeydown(event: KeyboardEvent) {
|
|
72
72
|
if (!barRef) return;
|
|
73
|
-
const items = Array.from(
|
|
74
|
-
barRef.querySelectorAll<HTMLElement>("[role='tab']"),
|
|
75
|
-
);
|
|
73
|
+
const items = Array.from(barRef.querySelectorAll<HTMLElement>("[role='tab']"));
|
|
76
74
|
const current = document.activeElement as HTMLElement;
|
|
77
75
|
const index = items.indexOf(current);
|
|
78
76
|
switch (event.key) {
|
|
@@ -68,7 +68,12 @@
|
|
|
68
68
|
|
|
69
69
|
<!-- Tag.svelte -->
|
|
70
70
|
{#if live}
|
|
71
|
-
<span
|
|
71
|
+
<span
|
|
72
|
+
class={`tag ${className}`}
|
|
73
|
+
role="status"
|
|
74
|
+
aria-label={label}
|
|
75
|
+
{...restProps}
|
|
76
|
+
>
|
|
72
77
|
{@render children?.()}
|
|
73
78
|
</span>
|
|
74
79
|
{:else}
|
|
@@ -76,7 +81,10 @@
|
|
|
76
81
|
label is screen-reader text appended after the content (the themes hide
|
|
77
82
|
.screen-reader-span). The content stays exposed: it may hold a focusable
|
|
78
83
|
control, such as a remove button. -->
|
|
79
|
-
<span
|
|
84
|
+
<span
|
|
85
|
+
class={`tag ${className}`}
|
|
86
|
+
{...restProps}
|
|
87
|
+
>
|
|
80
88
|
{@render children?.()}{#if label}<span class="screen-reader-span">{label}</span>{/if}
|
|
81
89
|
</span>
|
|
82
90
|
{/if}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// TaiwanGuominShenfenzhengTongyiBianhaoInput component
|
|
3
|
+
//
|
|
4
|
+
// A headless input for entering Taiwan's National Identification Card Number.
|
|
5
|
+
// Format: One uppercase letter for the household-registration office, then nine digits. The first digit is 1 for a male and 2 for a female citizen (8 or 9 for a foreign resident), and the last digit is a check digit. The letter is converted to a two-digit number (A=10, B=11 and so on in the official order A-H, J-N, P-V, X, Y, W, Z, I, O), the eleven resulting digits are multiplied by the weights 1,9,8,7,6,5,4,3,2,1,1, and the sum 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
|
+
// <TaiwanGuominShenfenzhengTongyiBianhaoInput label="National Identification Card 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_identification_card_(Taiwan)
|
|
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
|
+
<!-- TaiwanGuominShenfenzhengTongyiBianhaoInput.svelte -->
|
|
46
|
+
<input
|
|
47
|
+
class={`taiwan-guomin-shenfenzheng-tongyi-bianhao-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 TaiwanGuominShenfenzhengTongyiBianhaoInput: import("svelte").Component<$$ComponentProps, {}, "value">;
|
|
9
|
+
type TaiwanGuominShenfenzhengTongyiBianhaoInput = ReturnType<typeof TaiwanGuominShenfenzhengTongyiBianhaoInput>;
|
|
10
|
+
export default TaiwanGuominShenfenzhengTongyiBianhaoInput;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// TaiwanGuominShenfenzhengTongyiBianhaoView component
|
|
3
|
+
//
|
|
4
|
+
// A headless display component for showing Taiwan's
|
|
5
|
+
// National Identification Card Number in a read-only format.
|
|
6
|
+
// Format: One uppercase letter for the household-registration office, then nine digits. The first digit is 1 for a male and 2 for a female citizen (8 or 9 for a foreign resident), and the last digit is a check digit. The letter is converted to a two-digit number (A=10, B=11 and so on in the official order A-H, J-N, P-V, X, Y, W, Z, I, O), the eleven resulting digits are multiplied by the weights 1,9,8,7,6,5,4,3,2,1,1, and the sum 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
|
+
// <TaiwanGuominShenfenzhengTongyiBianhaoView label="National Identification Card 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_identification_card_(Taiwan)
|
|
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
|
+
<!-- TaiwanGuominShenfenzhengTongyiBianhaoView.svelte -->
|
|
36
|
+
<span
|
|
37
|
+
class={`taiwan-guomin-shenfenzheng-tongyi-bianhao-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 TaiwanGuominShenfenzhengTongyiBianhaoView: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
7
|
+
type TaiwanGuominShenfenzhengTongyiBianhaoView = ReturnType<typeof TaiwanGuominShenfenzhengTongyiBianhaoView>;
|
|
8
|
+
export default TaiwanGuominShenfenzhengTongyiBianhaoView;
|
|
@@ -69,9 +69,7 @@
|
|
|
69
69
|
function onkeydown(event: KeyboardEvent) {
|
|
70
70
|
if (!barRef) return;
|
|
71
71
|
const items = Array.from(
|
|
72
|
-
barRef.querySelectorAll<HTMLElement>(
|
|
73
|
-
"button, [role='button'], [tabindex]",
|
|
74
|
-
),
|
|
72
|
+
barRef.querySelectorAll<HTMLElement>("button, [role='button'], [tabindex]"),
|
|
75
73
|
);
|
|
76
74
|
const current = document.activeElement as HTMLElement;
|
|
77
75
|
const index = items.indexOf(current);
|
package/dist/components/TextAreaInputWithCharacterCounter/TextAreaInputWithCharacterCounter.svelte
CHANGED
|
@@ -68,7 +68,9 @@
|
|
|
68
68
|
const counterId = `counter-${uid}`;
|
|
69
69
|
|
|
70
70
|
let counterText = $derived(
|
|
71
|
-
counterTemplate
|
|
71
|
+
counterTemplate
|
|
72
|
+
.replace("{count}", String(value.length))
|
|
73
|
+
.replace("{max}", String(maxLength)),
|
|
72
74
|
);
|
|
73
75
|
</script>
|
|
74
76
|
|
|
@@ -85,8 +87,7 @@
|
|
|
85
87
|
{rows}
|
|
86
88
|
{placeholder}
|
|
87
89
|
{required}
|
|
88
|
-
{disabled}
|
|
89
|
-
></textarea>
|
|
90
|
+
{disabled}></textarea>
|
|
90
91
|
<span
|
|
91
92
|
id={counterId}
|
|
92
93
|
aria-live="polite"
|
|
@@ -13,6 +13,19 @@
|
|
|
13
13
|
children: Snippet;
|
|
14
14
|
[key: string]: unknown;
|
|
15
15
|
} = $props();
|
|
16
|
+
|
|
17
|
+
// Always rendered, shown while `open`: as a real modal where the browser has one (see Dialog/modal.ts).
|
|
18
|
+
let el: HTMLDialogElement | undefined = $state(undefined);
|
|
19
|
+
$effect(() => {
|
|
20
|
+
if (!el) return;
|
|
21
|
+
if (open && !el.open) {
|
|
22
|
+
if (typeof el.showModal === "function") el.showModal();
|
|
23
|
+
else el.setAttribute("open", "");
|
|
24
|
+
} else if (!open && el.open) {
|
|
25
|
+
if (typeof el.close === "function") el.close();
|
|
26
|
+
else el.removeAttribute("open");
|
|
27
|
+
}
|
|
28
|
+
});
|
|
16
29
|
</script>
|
|
17
30
|
|
|
18
31
|
<!-- TimeoutDialog.svelte -->
|
|
@@ -20,7 +33,7 @@
|
|
|
20
33
|
class={`timeout-dialog ${className}`}
|
|
21
34
|
role="alertdialog"
|
|
22
35
|
aria-label={label}
|
|
23
|
-
{
|
|
36
|
+
bind:this={el}
|
|
24
37
|
{...restProps}
|
|
25
38
|
>
|
|
26
39
|
{@render children?.()}
|
|
@@ -1,18 +1,66 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
|
|
2
|
+
// TimerButton: a button that counts down `duration` seconds and then activates itself; a click (or Enter /
|
|
3
|
+
// Space, natively) activates it at once. It activates once only. data-remaining-seconds carries the countdown
|
|
4
|
+
// for the consumer's display; aria-live="polite" announces the consumer's text as it changes.
|
|
5
|
+
import { onMount, type Snippet } from "svelte";
|
|
3
6
|
let {
|
|
4
7
|
class: className = "",
|
|
5
|
-
label
|
|
6
|
-
|
|
8
|
+
label,
|
|
9
|
+
duration,
|
|
10
|
+
disabled = false,
|
|
11
|
+
onclick = undefined,
|
|
12
|
+
children = undefined,
|
|
7
13
|
...restProps
|
|
8
14
|
}: {
|
|
9
|
-
label
|
|
10
|
-
|
|
15
|
+
/** Accessible label describing the action. */
|
|
16
|
+
label: string;
|
|
17
|
+
/** Countdown duration in seconds. */
|
|
18
|
+
duration: number;
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
/** Called once, when the countdown ends or the button is pressed. */
|
|
21
|
+
onclick?: () => void;
|
|
22
|
+
children?: Snippet;
|
|
11
23
|
[key: string]: unknown;
|
|
12
24
|
} = $props();
|
|
25
|
+
|
|
26
|
+
let remaining = $state(0);
|
|
27
|
+
let fired = false;
|
|
28
|
+
let timer: ReturnType<typeof setInterval> | undefined;
|
|
29
|
+
|
|
30
|
+
function fire() {
|
|
31
|
+
if (fired) return;
|
|
32
|
+
fired = true;
|
|
33
|
+
clearInterval(timer);
|
|
34
|
+
onclick?.();
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
onMount(() => {
|
|
38
|
+
remaining = duration;
|
|
39
|
+
if (disabled) return;
|
|
40
|
+
const start = Date.now();
|
|
41
|
+
timer = setInterval(() => {
|
|
42
|
+
remaining = Math.max(0, duration - Math.floor((Date.now() - start) / 1000));
|
|
43
|
+
if (remaining === 0) fire();
|
|
44
|
+
}, 250);
|
|
45
|
+
return () => clearInterval(timer);
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
function handleClick() {
|
|
49
|
+
if (disabled) return;
|
|
50
|
+
fire();
|
|
51
|
+
}
|
|
13
52
|
</script>
|
|
14
53
|
|
|
15
54
|
<!-- TimerButton.svelte -->
|
|
16
|
-
<
|
|
55
|
+
<button
|
|
56
|
+
type="button"
|
|
57
|
+
class={`timer-button ${className}`}
|
|
58
|
+
aria-label={label}
|
|
59
|
+
aria-live="polite"
|
|
60
|
+
data-remaining-seconds={remaining}
|
|
61
|
+
{disabled}
|
|
62
|
+
onclick={handleClick}
|
|
63
|
+
{...restProps}
|
|
64
|
+
>
|
|
17
65
|
{@render children?.()}
|
|
18
|
-
</
|
|
66
|
+
</button>
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Snippet } from "svelte";
|
|
2
2
|
type $$ComponentProps = {
|
|
3
|
-
label
|
|
4
|
-
|
|
3
|
+
/** Accessible label describing the action. */
|
|
4
|
+
label: string;
|
|
5
|
+
/** Countdown duration in seconds. */
|
|
6
|
+
duration: number;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
/** Called once, when the countdown ends or the button is pressed. */
|
|
9
|
+
onclick?: () => void;
|
|
10
|
+
children?: Snippet;
|
|
5
11
|
[key: string]: unknown;
|
|
6
12
|
};
|
|
7
13
|
declare const TimerButton: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
@@ -68,9 +68,7 @@
|
|
|
68
68
|
function onkeydown(event: KeyboardEvent) {
|
|
69
69
|
if (!toolbarRef) return;
|
|
70
70
|
const items = Array.from(
|
|
71
|
-
toolbarRef.querySelectorAll<HTMLElement>(
|
|
72
|
-
"button, [role='button'], [tabindex]",
|
|
73
|
-
),
|
|
71
|
+
toolbarRef.querySelectorAll<HTMLElement>("button, [role='button'], [tabindex]"),
|
|
74
72
|
);
|
|
75
73
|
const current = document.activeElement as HTMLElement;
|
|
76
74
|
const index = items.indexOf(current);
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
children,
|
|
11
11
|
...restProps
|
|
12
12
|
}: {
|
|
13
|
-
|
|
14
13
|
/** The content. */
|
|
15
14
|
children?: Snippet;
|
|
16
15
|
[key: string]: unknown;
|
|
@@ -20,7 +19,6 @@
|
|
|
20
19
|
<!-- ToolCallName.svelte -->
|
|
21
20
|
<span
|
|
22
21
|
class={`tool-call-name ${className}`}
|
|
23
|
-
|
|
24
22
|
{...restProps}
|
|
25
23
|
>
|
|
26
24
|
{@render children?.()}
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
// Accessibility:
|
|
32
32
|
// - role="tooltip" identifies the element as a tooltip popup
|
|
33
33
|
// - id enables aria-describedby linking to the trigger element
|
|
34
|
-
// -
|
|
34
|
+
// - Always rendered as popover="manual"; hidden (display: none) when not visible
|
|
35
35
|
//
|
|
36
36
|
// Internationalization:
|
|
37
37
|
// - The label prop accepts any translated string
|
|
@@ -39,13 +39,15 @@
|
|
|
39
39
|
//
|
|
40
40
|
// Claude rules:
|
|
41
41
|
// - Headless: no CSS, no styles -- consumer provides all styling
|
|
42
|
-
// -
|
|
42
|
+
// - Native first: popover="manual" (top layer) opened and closed by the `open` state through ./Popover/popover.ts; where the Popover API is missing (jsdom, older browsers) it falls back to the `hidden` attribute. Placement is the theme's CSS (anchor positioning); light dismiss and Escape stay the consumer's.
|
|
43
43
|
// - Consumer manages visibility (hover, focus, etc.)
|
|
44
44
|
//
|
|
45
45
|
// References:
|
|
46
46
|
// - WAI-ARIA Tooltip Pattern: https://www.w3.org/WAI/ARIA/apg/patterns/tooltip/
|
|
47
47
|
// - MDN aria-describedby: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-describedby
|
|
48
48
|
|
|
49
|
+
import { popoverState } from "../Popover/popover.js";
|
|
50
|
+
|
|
49
51
|
let {
|
|
50
52
|
class: className = "",
|
|
51
53
|
label,
|
|
@@ -64,13 +66,13 @@
|
|
|
64
66
|
</script>
|
|
65
67
|
|
|
66
68
|
<!-- Tooltip.svelte -->
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
69
|
+
<div
|
|
70
|
+
class={`tooltip ${className}`}
|
|
71
|
+
role="tooltip"
|
|
72
|
+
popover="manual"
|
|
73
|
+
use:popoverState={visible}
|
|
74
|
+
{id}
|
|
75
|
+
{...restProps}
|
|
76
|
+
>
|
|
77
|
+
{label}
|
|
78
|
+
</div>
|
|
@@ -4,8 +4,10 @@
|
|
|
4
4
|
// A tour guide is an outer container for a guided walkthrough experience,
|
|
5
5
|
// such as for sightseeing, or pathways, or demonstrations, or onboarding.
|
|
6
6
|
// It wraps a TourList and its TourListItem children, providing
|
|
7
|
-
// the dialog
|
|
8
|
-
// renders as a modal dialog that
|
|
7
|
+
// the dialog container and keyboard dismissal behavior. When active, it
|
|
8
|
+
// renders as a NON-modal dialog that can be closed with Escape: a tour points
|
|
9
|
+
// at parts of the real page and often asks the user to try them, so the page
|
|
10
|
+
// must stay usable. It therefore does not set aria-modal and does not trap focus.
|
|
9
11
|
//
|
|
10
12
|
// Props:
|
|
11
13
|
// className — string, optional. CSS class name.
|
|
@@ -46,7 +48,7 @@
|
|
|
46
48
|
//
|
|
47
49
|
// Accessibility:
|
|
48
50
|
// - role="dialog" identifies the overlay as a dialog window
|
|
49
|
-
// - aria-modal
|
|
51
|
+
// - no aria-modal: the tour is non-modal, the page behind it stays usable
|
|
50
52
|
// - aria-label={label} provides an accessible name for the tour
|
|
51
53
|
// - tabindex="-1" allows the dialog to receive focus for keyboard events
|
|
52
54
|
//
|
|
@@ -92,7 +94,6 @@
|
|
|
92
94
|
<div
|
|
93
95
|
class={`tour ${className}`}
|
|
94
96
|
role="dialog"
|
|
95
|
-
aria-modal="true"
|
|
96
97
|
aria-label={label}
|
|
97
98
|
tabindex="-1"
|
|
98
99
|
{onkeydown}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
// TourList component
|
|
3
3
|
//
|
|
4
|
-
// A headless guided walkthrough
|
|
5
|
-
// instructions to users.
|
|
4
|
+
// A headless ordered list of guided walkthrough steps that presents step-by-step
|
|
5
|
+
// instructions to users. It is a plain <ol> (no role="dialog", no aria-modal), so
|
|
6
|
+
// screen readers keep its list semantics and announce the step count; any dialog
|
|
7
|
+
// semantics belong to the enclosing Tour, which is non-modal. Useful for onboarding flows, feature tutorials, or
|
|
6
8
|
// contextual help systems. The consumer provides TourListItem children to
|
|
7
9
|
// define each step of the tour.
|
|
8
10
|
//
|
|
@@ -11,7 +13,7 @@
|
|
|
11
13
|
// label — string, required. Accessible name for the tour dialog via aria-label.
|
|
12
14
|
// active — boolean, default false. Whether the tour is visible; bindable with bind:active.
|
|
13
15
|
// children — Snippet, required. TourListItem elements.
|
|
14
|
-
// ...restProps — additional HTML attributes spread onto the <
|
|
16
|
+
// ...restProps — additional HTML attributes spread onto the <ol>.
|
|
15
17
|
//
|
|
16
18
|
// Syntax:
|
|
17
19
|
// <TourList label="Getting started" bind:active>...</TourList>
|
|
@@ -34,10 +36,9 @@
|
|
|
34
36
|
// - Escape: closes the tour by setting active to false
|
|
35
37
|
//
|
|
36
38
|
// Accessibility:
|
|
37
|
-
// - role="dialog"
|
|
38
|
-
// - aria-
|
|
39
|
-
// -
|
|
40
|
-
// - tabindex="-1" allows the dialog to receive focus for keyboard events
|
|
39
|
+
// - native <ol> list semantics (no role="dialog": it would hide the list; no aria-modal: not modal)
|
|
40
|
+
// - aria-label={label} provides an accessible name for the list of steps
|
|
41
|
+
// - tabindex="-1" allows the list to receive focus for keyboard events
|
|
41
42
|
//
|
|
42
43
|
// Internationalization:
|
|
43
44
|
// - The label prop accepts any translated string
|
|
@@ -62,6 +63,8 @@
|
|
|
62
63
|
}: {
|
|
63
64
|
/** Accessible label for the tour. */
|
|
64
65
|
label: string;
|
|
66
|
+
/** Whether the tour is visible. Bindable. */
|
|
67
|
+
active?: boolean;
|
|
65
68
|
/** TourListItem elements. */
|
|
66
69
|
children: Snippet;
|
|
67
70
|
[key: string]: unknown;
|
|
@@ -78,8 +81,6 @@
|
|
|
78
81
|
{#if active}
|
|
79
82
|
<ol
|
|
80
83
|
class={`tour-list ${className}`}
|
|
81
|
-
role="dialog"
|
|
82
|
-
aria-modal="true"
|
|
83
84
|
aria-label={label}
|
|
84
85
|
tabindex="-1"
|
|
85
86
|
{onkeydown}
|
|
@@ -2,6 +2,8 @@ import type { Snippet } from "svelte";
|
|
|
2
2
|
type $$ComponentProps = {
|
|
3
3
|
/** Accessible label for the tour. */
|
|
4
4
|
label: string;
|
|
5
|
+
/** Whether the tour is visible. Bindable. */
|
|
6
|
+
active?: boolean;
|
|
5
7
|
/** TourListItem elements. */
|
|
6
8
|
children: Snippet;
|
|
7
9
|
[key: string]: unknown;
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
// - role="group" groups the step content semantically
|
|
41
41
|
// - aria-roledescription="step" identifies the element as a tour step
|
|
42
42
|
// - aria-label includes step label and optional "Step N of M" progress
|
|
43
|
-
// -
|
|
43
|
+
// - data-current indicates the currently active step
|
|
44
44
|
// - aria-hidden="true" and hidden attribute hide inactive steps
|
|
45
45
|
//
|
|
46
46
|
// Internationalization:
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
role="group"
|
|
96
96
|
aria-roledescription="step"
|
|
97
97
|
aria-label={fullLabel}
|
|
98
|
-
|
|
98
|
+
data-current={current ? "" : undefined}
|
|
99
99
|
aria-hidden={!current ? "true" : undefined}
|
|
100
100
|
hidden={!current ? true : undefined}
|
|
101
101
|
{...restProps}
|