@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
|
@@ -1,24 +1,191 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
|
|
2
|
+
// Autosuggest component
|
|
3
|
+
//
|
|
4
|
+
// A text input that proposes matching options as users type: the WAI-ARIA
|
|
5
|
+
// combobox pattern with list autocomplete. The input is the combobox; the
|
|
6
|
+
// suggestions are a listbox of options. The consumer computes the
|
|
7
|
+
// suggestions in onInput (filtering, fetching) and passes them back in
|
|
8
|
+
// `suggestions`; the component owns the open state, the highlight, the keys
|
|
9
|
+
// and the selection.
|
|
10
|
+
//
|
|
11
|
+
// Props:
|
|
12
|
+
// class — string, optional. Appended to the root's class list.
|
|
13
|
+
// label — string, required. Accessible name of the input and the listbox.
|
|
14
|
+
// value — string, default "". Bindable. The input's text.
|
|
15
|
+
// suggestions — { value: string; label: string }[], default []. The options to show.
|
|
16
|
+
// onInput — (query: string) => void, optional. Called as the user types.
|
|
17
|
+
// onSelect — (value: string) => void, optional. Called when a suggestion is chosen.
|
|
18
|
+
// placeholder — string, optional. Placeholder text.
|
|
19
|
+
// name — string, optional. Form field name of the input.
|
|
20
|
+
// ...restProps — additional HTML attributes spread onto the root <div>.
|
|
21
|
+
//
|
|
22
|
+
// Syntax:
|
|
23
|
+
// <Autosuggest label="Country" bind:value {suggestions} onInput={search} />
|
|
24
|
+
//
|
|
25
|
+
// Keyboard:
|
|
26
|
+
// - ArrowDown: open the list / highlight the next option (wraps)
|
|
27
|
+
// - ArrowUp: open the list / highlight the previous option (wraps)
|
|
28
|
+
// - Home / End: highlight the first / last option while the list is open
|
|
29
|
+
// - Enter: choose the highlighted option
|
|
30
|
+
// - Escape: close the list without choosing
|
|
31
|
+
//
|
|
32
|
+
// Accessibility:
|
|
33
|
+
// - role="combobox" on the input, aria-autocomplete="list", aria-expanded,
|
|
34
|
+
// aria-controls naming the listbox, aria-activedescendant naming the
|
|
35
|
+
// highlighted option (which carries aria-selected="true")
|
|
36
|
+
// - The list stays in the DOM, hidden while closed, so aria-controls always resolves
|
|
37
|
+
//
|
|
38
|
+
// Claude rules:
|
|
39
|
+
// - Choosing an option writes its `value` into the input and closes the list
|
|
40
|
+
// - The list opens only while there are suggestions; blur closes it
|
|
41
|
+
// - Pressing on an option does not blur the input, so a click can choose it
|
|
42
|
+
// - A form reset restores the starting text (defaultValue + bind:value)
|
|
43
|
+
//
|
|
44
|
+
// References:
|
|
45
|
+
// - WAI-ARIA APG combobox pattern: https://www.w3.org/WAI/ARIA/apg/patterns/combobox/
|
|
46
|
+
|
|
47
|
+
import { untrack } from "svelte";
|
|
48
|
+
|
|
49
|
+
const uid = $props.id();
|
|
50
|
+
const listId = `autosuggest-list-${uid}`;
|
|
51
|
+
const optionId = (index: number) => `autosuggest-option-${uid}-${index}`;
|
|
3
52
|
|
|
4
53
|
let {
|
|
5
54
|
class: className = "",
|
|
6
|
-
label
|
|
7
|
-
|
|
55
|
+
label,
|
|
56
|
+
value = $bindable(""),
|
|
57
|
+
suggestions = [],
|
|
58
|
+
onInput = undefined,
|
|
59
|
+
onSelect = undefined,
|
|
60
|
+
placeholder = undefined,
|
|
61
|
+
name = undefined,
|
|
8
62
|
...restProps
|
|
9
63
|
}: {
|
|
10
|
-
label
|
|
11
|
-
|
|
64
|
+
/** Accessible label. */
|
|
65
|
+
label: string;
|
|
66
|
+
/** The input's text. Bindable. */
|
|
67
|
+
value?: string;
|
|
68
|
+
/** The options to show. */
|
|
69
|
+
suggestions?: { value: string; label: string }[];
|
|
70
|
+
/** Called with the typed text. */
|
|
71
|
+
onInput?: (query: string) => void;
|
|
72
|
+
/** Called with the chosen suggestion's value. */
|
|
73
|
+
onSelect?: (value: string) => void;
|
|
74
|
+
/** Placeholder text. */
|
|
75
|
+
placeholder?: string;
|
|
76
|
+
/** Form field name. */
|
|
77
|
+
name?: string;
|
|
12
78
|
[key: string]: unknown;
|
|
13
79
|
} = $props();
|
|
80
|
+
|
|
81
|
+
// The starting text, which a form reset restores (bind:value reads defaultValue).
|
|
82
|
+
const initialValue = untrack(() => value);
|
|
83
|
+
let wanted = $state(false);
|
|
84
|
+
let active = $state(-1);
|
|
85
|
+
const open = $derived(wanted && suggestions.length > 0);
|
|
86
|
+
|
|
87
|
+
function choose(index: number) {
|
|
88
|
+
const suggestion = suggestions[index];
|
|
89
|
+
if (!suggestion) return;
|
|
90
|
+
value = suggestion.value;
|
|
91
|
+
wanted = false;
|
|
92
|
+
active = -1;
|
|
93
|
+
onSelect?.(suggestion.value);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function oninput(event: Event) {
|
|
97
|
+
value = (event.currentTarget as HTMLInputElement).value;
|
|
98
|
+
wanted = true;
|
|
99
|
+
active = -1;
|
|
100
|
+
onInput?.(value);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function onkeydown(event: KeyboardEvent) {
|
|
104
|
+
const count = suggestions.length;
|
|
105
|
+
switch (event.key) {
|
|
106
|
+
case "ArrowDown":
|
|
107
|
+
if (count === 0) return;
|
|
108
|
+
active = open ? (active + 1) % count : 0;
|
|
109
|
+
wanted = true;
|
|
110
|
+
break;
|
|
111
|
+
case "ArrowUp":
|
|
112
|
+
if (count === 0) return;
|
|
113
|
+
active = open && active > 0 ? active - 1 : count - 1;
|
|
114
|
+
wanted = true;
|
|
115
|
+
break;
|
|
116
|
+
case "Home":
|
|
117
|
+
if (!open) return;
|
|
118
|
+
active = 0;
|
|
119
|
+
break;
|
|
120
|
+
case "End":
|
|
121
|
+
if (!open) return;
|
|
122
|
+
active = count - 1;
|
|
123
|
+
break;
|
|
124
|
+
case "Enter":
|
|
125
|
+
if (!open || active < 0) return;
|
|
126
|
+
choose(active);
|
|
127
|
+
break;
|
|
128
|
+
case "Escape":
|
|
129
|
+
if (!open) return;
|
|
130
|
+
wanted = false;
|
|
131
|
+
active = -1;
|
|
132
|
+
break;
|
|
133
|
+
default:
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
event.preventDefault();
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
function onblur() {
|
|
140
|
+
wanted = false;
|
|
141
|
+
active = -1;
|
|
142
|
+
}
|
|
14
143
|
</script>
|
|
15
144
|
|
|
16
145
|
<!-- Autosuggest.svelte -->
|
|
17
146
|
<div
|
|
18
147
|
class={`autosuggest ${className}`}
|
|
19
|
-
role="combobox"
|
|
20
|
-
aria-label={label}
|
|
21
148
|
{...restProps}
|
|
22
149
|
>
|
|
23
|
-
|
|
150
|
+
<input
|
|
151
|
+
class="autosuggest-input"
|
|
152
|
+
type="text"
|
|
153
|
+
role="combobox"
|
|
154
|
+
autocomplete="off"
|
|
155
|
+
aria-label={label}
|
|
156
|
+
aria-autocomplete="list"
|
|
157
|
+
aria-expanded={open}
|
|
158
|
+
aria-controls={listId}
|
|
159
|
+
aria-activedescendant={open && active >= 0 ? optionId(active) : undefined}
|
|
160
|
+
{placeholder}
|
|
161
|
+
{name}
|
|
162
|
+
bind:value
|
|
163
|
+
defaultValue={initialValue}
|
|
164
|
+
{oninput}
|
|
165
|
+
{onkeydown}
|
|
166
|
+
{onblur}
|
|
167
|
+
/>
|
|
168
|
+
<!-- svelte-ignore a11y_no_noninteractive_element_interactions (keeps focus in the input while an option is pressed) -->
|
|
169
|
+
<ul
|
|
170
|
+
class="autosuggest-list"
|
|
171
|
+
role="listbox"
|
|
172
|
+
id={listId}
|
|
173
|
+
aria-label={label}
|
|
174
|
+
hidden={!open}
|
|
175
|
+
onmousedown={(event) => event.preventDefault()}
|
|
176
|
+
>
|
|
177
|
+
{#each suggestions as suggestion, index (suggestion.value)}
|
|
178
|
+
<!-- svelte-ignore a11y_click_events_have_key_events (the input owns the keys) -->
|
|
179
|
+
<li
|
|
180
|
+
class="autosuggest-option"
|
|
181
|
+
role="option"
|
|
182
|
+
id={optionId(index)}
|
|
183
|
+
aria-selected={index === active}
|
|
184
|
+
data-value={suggestion.value}
|
|
185
|
+
onclick={() => choose(index)}
|
|
186
|
+
>
|
|
187
|
+
{suggestion.label}
|
|
188
|
+
</li>
|
|
189
|
+
{/each}
|
|
190
|
+
</ul>
|
|
24
191
|
</div>
|
|
@@ -1,9 +1,23 @@
|
|
|
1
|
-
import type { Snippet } from "svelte";
|
|
2
1
|
type $$ComponentProps = {
|
|
3
|
-
label
|
|
4
|
-
|
|
2
|
+
/** Accessible label. */
|
|
3
|
+
label: string;
|
|
4
|
+
/** The input's text. Bindable. */
|
|
5
|
+
value?: string;
|
|
6
|
+
/** The options to show. */
|
|
7
|
+
suggestions?: {
|
|
8
|
+
value: string;
|
|
9
|
+
label: string;
|
|
10
|
+
}[];
|
|
11
|
+
/** Called with the typed text. */
|
|
12
|
+
onInput?: (query: string) => void;
|
|
13
|
+
/** Called with the chosen suggestion's value. */
|
|
14
|
+
onSelect?: (value: string) => void;
|
|
15
|
+
/** Placeholder text. */
|
|
16
|
+
placeholder?: string;
|
|
17
|
+
/** Form field name. */
|
|
18
|
+
name?: string;
|
|
5
19
|
[key: string]: unknown;
|
|
6
20
|
};
|
|
7
|
-
declare const Autosuggest: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
21
|
+
declare const Autosuggest: import("svelte").Component<$$ComponentProps, {}, "value">;
|
|
8
22
|
type Autosuggest = ReturnType<typeof Autosuggest>;
|
|
9
23
|
export default Autosuggest;
|
|
@@ -52,7 +52,11 @@
|
|
|
52
52
|
class={`bar-chart ${className}`}
|
|
53
53
|
{...restProps}
|
|
54
54
|
>
|
|
55
|
-
<div
|
|
55
|
+
<div
|
|
56
|
+
class="bar-chart-graphic"
|
|
57
|
+
role="img"
|
|
58
|
+
aria-label={label}
|
|
59
|
+
>
|
|
56
60
|
{@render children?.()}
|
|
57
61
|
</div>
|
|
58
62
|
{#if dataTable}
|
|
@@ -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
|
<!-- BreadcrumbLink.svelte -->
|
|
16
|
-
<
|
|
21
|
+
<a
|
|
22
|
+
class={`breadcrumb-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
|
};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
//
|
|
4
4
|
// A single step in a breadcrumb navigation trail. Renders as a semantic <li>
|
|
5
5
|
// element designed to be placed inside a BreadcrumbList component. Supports
|
|
6
|
-
//
|
|
6
|
+
// data-current to indicate the user's current location. Typically
|
|
7
7
|
// contains a link for ancestor pages, or plain text for the current page.
|
|
8
8
|
//
|
|
9
9
|
// Props:
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
//
|
|
28
28
|
// Accessibility:
|
|
29
29
|
// - Implicit listitem role from the semantic <li> element
|
|
30
|
-
// -
|
|
30
|
+
// - data-current set when current is true, indicating the user's location
|
|
31
31
|
//
|
|
32
32
|
// Internationalization:
|
|
33
33
|
// - All text comes through children snippet; no hardcoded strings
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
<!-- BreadcrumbListItem.svelte -->
|
|
59
59
|
<li
|
|
60
60
|
class={`breadcrumb-list-item ${className}`}
|
|
61
|
-
|
|
61
|
+
data-current={current ? "" : undefined}
|
|
62
62
|
{...restProps}
|
|
63
63
|
>
|
|
64
64
|
{@render children?.()}
|
|
@@ -27,7 +27,10 @@
|
|
|
27
27
|
</script>
|
|
28
28
|
|
|
29
29
|
<!-- Byline.svelte -->
|
|
30
|
-
<div
|
|
30
|
+
<div
|
|
31
|
+
class={`byline ${className}`}
|
|
32
|
+
{...restProps}
|
|
33
|
+
>
|
|
31
34
|
<span class="byline-authors">{@render children?.()}</span>
|
|
32
35
|
{#if published}
|
|
33
36
|
<span class="byline-published">{@render published()}</span>
|
|
@@ -52,7 +52,11 @@
|
|
|
52
52
|
class={`candlestick-chart ${className}`}
|
|
53
53
|
{...restProps}
|
|
54
54
|
>
|
|
55
|
-
<div
|
|
55
|
+
<div
|
|
56
|
+
class="candlestick-chart-graphic"
|
|
57
|
+
role="img"
|
|
58
|
+
aria-label={label}
|
|
59
|
+
>
|
|
56
60
|
{@render children?.()}
|
|
57
61
|
</div>
|
|
58
62
|
{#if dataTable}
|
|
@@ -39,6 +39,8 @@
|
|
|
39
39
|
|
|
40
40
|
import type { Snippet } from "svelte";
|
|
41
41
|
|
|
42
|
+
import { popoverState } from "../Popover/popover.js";
|
|
43
|
+
|
|
42
44
|
let {
|
|
43
45
|
class: className = "",
|
|
44
46
|
label,
|
|
@@ -87,7 +89,11 @@
|
|
|
87
89
|
>
|
|
88
90
|
{value ?? placeholder ?? ""}
|
|
89
91
|
</button>
|
|
90
|
-
<div
|
|
92
|
+
<div
|
|
93
|
+
class="cascader-panel"
|
|
94
|
+
popover="manual"
|
|
95
|
+
use:popoverState={expanded}
|
|
96
|
+
>
|
|
91
97
|
{#if children}{@render children?.()}{/if}
|
|
92
98
|
</div>
|
|
93
99
|
</div>
|
|
@@ -86,7 +86,11 @@
|
|
|
86
86
|
</script>
|
|
87
87
|
|
|
88
88
|
<!-- ChatComposer.svelte -->
|
|
89
|
-
<form
|
|
89
|
+
<form
|
|
90
|
+
class={`chat-composer ${className}`}
|
|
91
|
+
onsubmit={onSubmit}
|
|
92
|
+
{...restProps}
|
|
93
|
+
>
|
|
90
94
|
{@render children?.()}
|
|
91
95
|
<textarea
|
|
92
96
|
class="chat-composer-input"
|
|
@@ -96,8 +100,7 @@
|
|
|
96
100
|
{placeholder}
|
|
97
101
|
{name}
|
|
98
102
|
{disabled}
|
|
99
|
-
onkeydown={onKeydown}
|
|
100
|
-
></textarea>
|
|
103
|
+
onkeydown={onKeydown}></textarea>
|
|
101
104
|
<button
|
|
102
105
|
class="chat-composer-button"
|
|
103
106
|
type={busy ? "button" : "submit"}
|
|
@@ -3,16 +3,24 @@
|
|
|
3
3
|
let {
|
|
4
4
|
class: className = "",
|
|
5
5
|
label = undefined,
|
|
6
|
+
current = false,
|
|
6
7
|
children,
|
|
7
8
|
...restProps
|
|
8
9
|
}: {
|
|
9
10
|
label?: string;
|
|
11
|
+
/** Marks the currently selected conversation (aria-current="true"). */
|
|
12
|
+
current?: boolean;
|
|
10
13
|
children: Snippet;
|
|
11
14
|
[key: string]: unknown;
|
|
12
15
|
} = $props();
|
|
13
16
|
</script>
|
|
14
17
|
|
|
15
18
|
<!-- ChatListItem.svelte -->
|
|
16
|
-
<
|
|
19
|
+
<li
|
|
20
|
+
class={`chat-list-item ${className}`}
|
|
21
|
+
aria-label={label}
|
|
22
|
+
aria-current={current ? "true" : undefined}
|
|
23
|
+
{...restProps}
|
|
24
|
+
>
|
|
17
25
|
{@render children?.()}
|
|
18
|
-
</
|
|
26
|
+
</li>
|
|
@@ -13,6 +13,10 @@
|
|
|
13
13
|
</script>
|
|
14
14
|
|
|
15
15
|
<!-- ChatMessage.svelte -->
|
|
16
|
-
<
|
|
16
|
+
<article
|
|
17
|
+
class={`chat-message ${className}`}
|
|
18
|
+
aria-label={label}
|
|
19
|
+
{...restProps}
|
|
20
|
+
>
|
|
17
21
|
{@render children?.()}
|
|
18
|
-
</
|
|
22
|
+
</article>
|
|
@@ -52,7 +52,11 @@
|
|
|
52
52
|
class={`choropleth-chart ${className}`}
|
|
53
53
|
{...restProps}
|
|
54
54
|
>
|
|
55
|
-
<div
|
|
55
|
+
<div
|
|
56
|
+
class="choropleth-chart-graphic"
|
|
57
|
+
role="img"
|
|
58
|
+
aria-label={label}
|
|
59
|
+
>
|
|
56
60
|
{@render children?.()}
|
|
57
61
|
</div>
|
|
58
62
|
{#if dataTable}
|
|
@@ -13,6 +13,10 @@
|
|
|
13
13
|
</script>
|
|
14
14
|
|
|
15
15
|
<!-- Citation.svelte -->
|
|
16
|
-
<
|
|
16
|
+
<cite
|
|
17
|
+
class={`citation ${className}`}
|
|
18
|
+
aria-label={label}
|
|
19
|
+
{...restProps}
|
|
20
|
+
>
|
|
17
21
|
{@render children?.()}
|
|
18
|
-
</
|
|
22
|
+
</cite>
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
// - role="dialog" with aria-modal="false" (non-modal popover dialog)
|
|
28
28
|
// - aria-labelledby points at the heading
|
|
29
29
|
// - aria-describedby points at the description (when provided)
|
|
30
|
-
// - hidden attribute
|
|
30
|
+
// - closed, it is display: none (popover="manual", or the hidden attribute where the Popover API is missing), so out of the AT tree
|
|
31
31
|
//
|
|
32
32
|
// Internationalization:
|
|
33
33
|
// - All user-facing strings via props
|
|
@@ -37,15 +37,14 @@
|
|
|
37
37
|
// - WAI-ARIA Dialog Pattern: https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/
|
|
38
38
|
|
|
39
39
|
function makeId(prefix: string): string {
|
|
40
|
-
if (
|
|
41
|
-
typeof crypto !== "undefined" &&
|
|
42
|
-
typeof crypto.randomUUID === "function"
|
|
43
|
-
) {
|
|
40
|
+
if (typeof crypto !== "undefined" && typeof crypto.randomUUID === "function") {
|
|
44
41
|
return `${prefix}-${crypto.randomUUID()}`;
|
|
45
42
|
}
|
|
46
43
|
return `${prefix}-${Math.random().toString(36).slice(2, 11)}`;
|
|
47
44
|
}
|
|
48
45
|
|
|
46
|
+
import { popoverState } from "../Popover/popover.js";
|
|
47
|
+
|
|
49
48
|
let {
|
|
50
49
|
class: className = "",
|
|
51
50
|
open = false,
|
|
@@ -80,17 +79,28 @@
|
|
|
80
79
|
aria-modal="false"
|
|
81
80
|
aria-labelledby={titleId}
|
|
82
81
|
aria-describedby={description ? descId : undefined}
|
|
83
|
-
|
|
82
|
+
popover="manual"
|
|
83
|
+
use:popoverState={open}
|
|
84
84
|
{...restProps}
|
|
85
85
|
>
|
|
86
|
-
<h2
|
|
86
|
+
<h2
|
|
87
|
+
class="coachmark-title"
|
|
88
|
+
id={titleId}
|
|
89
|
+
>
|
|
90
|
+
{title}
|
|
91
|
+
</h2>
|
|
87
92
|
{#if description}
|
|
88
|
-
<p
|
|
93
|
+
<p
|
|
94
|
+
class="coachmark-description"
|
|
95
|
+
id={descId}
|
|
96
|
+
>
|
|
97
|
+
{description}
|
|
98
|
+
</p>
|
|
89
99
|
{/if}
|
|
90
100
|
<button
|
|
91
101
|
class="coachmark-dismiss"
|
|
92
102
|
type="button"
|
|
93
103
|
aria-label={dismissLabel}
|
|
94
|
-
onclick={onDismiss}
|
|
95
|
-
|
|
104
|
+
onclick={onDismiss}>×</button
|
|
105
|
+
>
|
|
96
106
|
</div>
|
|
@@ -13,6 +13,10 @@
|
|
|
13
13
|
</script>
|
|
14
14
|
|
|
15
15
|
<!-- CodeBlock.svelte -->
|
|
16
|
-
<
|
|
16
|
+
<pre
|
|
17
|
+
class={`code-block ${className}`}
|
|
18
|
+
aria-label={label}
|
|
19
|
+
{...restProps}
|
|
20
|
+
>
|
|
17
21
|
{@render children?.()}
|
|
18
|
-
</
|
|
22
|
+
</pre>
|