@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
|
@@ -74,7 +74,10 @@
|
|
|
74
74
|
aria-label={label}
|
|
75
75
|
{...restProps}
|
|
76
76
|
>
|
|
77
|
-
<section
|
|
77
|
+
<section
|
|
78
|
+
class="transfer-list-source"
|
|
79
|
+
aria-label={sourceLabel}
|
|
80
|
+
>
|
|
78
81
|
{@render source()}
|
|
79
82
|
</section>
|
|
80
83
|
{#if actions}
|
|
@@ -82,7 +85,10 @@
|
|
|
82
85
|
{@render actions()}
|
|
83
86
|
</div>
|
|
84
87
|
{/if}
|
|
85
|
-
<section
|
|
88
|
+
<section
|
|
89
|
+
class="transfer-list-target"
|
|
90
|
+
aria-label={targetLabel}
|
|
91
|
+
>
|
|
86
92
|
{@render target()}
|
|
87
93
|
</section>
|
|
88
94
|
</div>
|
|
@@ -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
|
<!-- TreeLink.svelte -->
|
|
16
|
-
<
|
|
21
|
+
<a
|
|
22
|
+
class={`tree-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
|
};
|
|
@@ -66,9 +66,9 @@
|
|
|
66
66
|
|
|
67
67
|
function onkeydown(event: KeyboardEvent) {
|
|
68
68
|
if (!treeRef) return;
|
|
69
|
-
const items = Array.from(
|
|
70
|
-
|
|
71
|
-
)
|
|
69
|
+
const items = Array.from(treeRef.querySelectorAll<HTMLElement>("[role='treeitem']")).filter(
|
|
70
|
+
(el) => !el.parentElement?.closest("[role='treeitem'][aria-expanded='false']"),
|
|
71
|
+
);
|
|
72
72
|
const current = document.activeElement as HTMLElement;
|
|
73
73
|
const index = items.indexOf(current);
|
|
74
74
|
switch (event.key) {
|
|
@@ -49,6 +49,14 @@
|
|
|
49
49
|
</script>
|
|
50
50
|
|
|
51
51
|
<!-- TreeListItem.svelte -->
|
|
52
|
-
<li
|
|
52
|
+
<li
|
|
53
|
+
class={`tree-list-item ${className}`}
|
|
54
|
+
role="treeitem"
|
|
55
|
+
tabindex="-1"
|
|
56
|
+
aria-label={label}
|
|
57
|
+
aria-expanded={expanded}
|
|
58
|
+
{onkeydown}
|
|
59
|
+
{...restProps}
|
|
60
|
+
>
|
|
53
61
|
{@render children?.()}
|
|
54
62
|
</li>
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
// TreeMenu — a hierarchical tree menu with expandable branches.
|
|
3
|
+
//
|
|
4
|
+
// The root is a <div role="tree"> named by `label`; the consumer supplies the
|
|
5
|
+
// items, each an element with role="treeitem" and tabindex="-1" (one may be
|
|
6
|
+
// tabindex="0" as the tab stop). The component moves focus between them.
|
|
7
|
+
//
|
|
8
|
+
// Keyboard:
|
|
9
|
+
// - ArrowDown / ArrowUp: next / previous tree item, wrapping at the ends
|
|
10
|
+
// - Home / End: first / last tree item
|
|
11
|
+
//
|
|
12
|
+
// No CSS, no default text: the label and the items are the consumer's.
|
|
2
13
|
import type { Snippet } from "svelte";
|
|
3
14
|
let {
|
|
4
15
|
class: className = "",
|
|
@@ -10,9 +21,37 @@
|
|
|
10
21
|
children: Snippet;
|
|
11
22
|
[key: string]: unknown;
|
|
12
23
|
} = $props();
|
|
24
|
+
|
|
25
|
+
let root: HTMLDivElement | undefined = $state();
|
|
26
|
+
|
|
27
|
+
function onkeydown(event: KeyboardEvent) {
|
|
28
|
+
if (!root || !["ArrowDown", "ArrowUp", "Home", "End"].includes(event.key)) return;
|
|
29
|
+
const items = Array.from(root.querySelectorAll<HTMLElement>('[role="treeitem"]'));
|
|
30
|
+
if (items.length === 0) return;
|
|
31
|
+
const current = items.indexOf((event.target as Element).closest('[role="treeitem"]') as HTMLElement);
|
|
32
|
+
const last = items.length - 1;
|
|
33
|
+
const next =
|
|
34
|
+
event.key === "Home"
|
|
35
|
+
? 0
|
|
36
|
+
: event.key === "End"
|
|
37
|
+
? last
|
|
38
|
+
: event.key === "ArrowDown"
|
|
39
|
+
? current >= last ? 0 : current + 1
|
|
40
|
+
: current <= 0 ? last : current - 1;
|
|
41
|
+
event.preventDefault();
|
|
42
|
+
items[next].focus();
|
|
43
|
+
}
|
|
13
44
|
</script>
|
|
14
45
|
|
|
15
46
|
<!-- TreeMenu.svelte -->
|
|
16
|
-
<div
|
|
47
|
+
<div
|
|
48
|
+
bind:this={root}
|
|
49
|
+
class={`tree-menu ${className}`}
|
|
50
|
+
role="tree"
|
|
51
|
+
aria-label={label}
|
|
52
|
+
tabindex="-1"
|
|
53
|
+
{onkeydown}
|
|
54
|
+
{...restProps}
|
|
55
|
+
>
|
|
17
56
|
{@render children?.()}
|
|
18
57
|
</div>
|
|
@@ -19,7 +19,8 @@
|
|
|
19
19
|
//
|
|
20
20
|
// Accessibility:
|
|
21
21
|
// - role="combobox" with aria-haspopup="tree", aria-expanded, aria-label,
|
|
22
|
-
//
|
|
22
|
+
// data-multiple="true" when multiple=true (aria-multiselectable is not
|
|
23
|
+
// valid on a combobox; the consumer's role="tree" carries it).
|
|
23
24
|
// - Trigger is a native <button>.
|
|
24
25
|
//
|
|
25
26
|
// Internationalization:
|
|
@@ -35,6 +36,8 @@
|
|
|
35
36
|
|
|
36
37
|
import type { Snippet } from "svelte";
|
|
37
38
|
|
|
39
|
+
import { popoverState } from "../Popover/popover.js";
|
|
40
|
+
|
|
38
41
|
let {
|
|
39
42
|
class: className = "",
|
|
40
43
|
label,
|
|
@@ -76,7 +79,7 @@
|
|
|
76
79
|
aria-haspopup="tree"
|
|
77
80
|
aria-expanded={expanded}
|
|
78
81
|
aria-label={label}
|
|
79
|
-
|
|
82
|
+
data-multiple={multiple || undefined}
|
|
80
83
|
{...restProps}
|
|
81
84
|
>
|
|
82
85
|
<button
|
|
@@ -87,7 +90,11 @@
|
|
|
87
90
|
>
|
|
88
91
|
{value ?? placeholder ?? ""}
|
|
89
92
|
</button>
|
|
90
|
-
<div
|
|
93
|
+
<div
|
|
94
|
+
class="tree-select-panel"
|
|
95
|
+
popover="manual"
|
|
96
|
+
use:popoverState={expanded}
|
|
97
|
+
>
|
|
91
98
|
{#if children}{@render children?.()}{/if}
|
|
92
99
|
</div>
|
|
93
100
|
</div>
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// UruguayCedulaDeIdentidadInput component
|
|
3
|
+
//
|
|
4
|
+
// A headless input for entering Uruguay's Cedula de Identidad Number.
|
|
5
|
+
// Format: Six or seven digits plus a trailing check digit, written 1.234.567-2. The body is left-padded with zeros to seven digits, multiplied by the weights 2,9,8,7,6,3,4 and summed, and the check digit is the amount that brings the sum to the next multiple of 10 (0 when it already is one).
|
|
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
|
+
// <UruguayCedulaDeIdentidadInput label="Cedula de Identidad 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/C%C3%A9dula_de_identidad
|
|
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
|
+
<!-- UruguayCedulaDeIdentidadInput.svelte -->
|
|
46
|
+
<input
|
|
47
|
+
class={`uruguay-cedula-de-identidad-input ${className}`}
|
|
48
|
+
type="text"
|
|
49
|
+
aria-label={label}
|
|
50
|
+
autocomplete="off"
|
|
51
|
+
bind:value
|
|
52
|
+
{required}
|
|
53
|
+
{disabled}
|
|
54
|
+
{...restProps}
|
|
55
|
+
/>
|
package/dist/components/UruguayCedulaDeIdentidadInput/UruguayCedulaDeIdentidadInput.svelte.d.ts
ADDED
|
@@ -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 UruguayCedulaDeIdentidadInput: import("svelte").Component<$$ComponentProps, {}, "value">;
|
|
9
|
+
type UruguayCedulaDeIdentidadInput = ReturnType<typeof UruguayCedulaDeIdentidadInput>;
|
|
10
|
+
export default UruguayCedulaDeIdentidadInput;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// UruguayCedulaDeIdentidadView component
|
|
3
|
+
//
|
|
4
|
+
// A headless display component for showing Uruguay's
|
|
5
|
+
// Cedula de Identidad Number in a read-only format.
|
|
6
|
+
// Format: Six or seven digits plus a trailing check digit, written 1.234.567-2. The body is left-padded with zeros to seven digits, multiplied by the weights 2,9,8,7,6,3,4 and summed, and the check digit is the amount that brings the sum to the next multiple of 10 (0 when it already is one).
|
|
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
|
+
// <UruguayCedulaDeIdentidadView label="Cedula de Identidad 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/C%C3%A9dula_de_identidad
|
|
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
|
+
<!-- UruguayCedulaDeIdentidadView.svelte -->
|
|
36
|
+
<span
|
|
37
|
+
class={`uruguay-cedula-de-identidad-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 UruguayCedulaDeIdentidadView: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
7
|
+
type UruguayCedulaDeIdentidadView = ReturnType<typeof UruguayCedulaDeIdentidadView>;
|
|
8
|
+
export default UruguayCedulaDeIdentidadView;
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
|
-
{ threshold: 0.5 }
|
|
50
|
+
{ threshold: 0.5 },
|
|
51
51
|
);
|
|
52
52
|
observer.observe(video);
|
|
53
53
|
return () => observer.disconnect();
|
|
@@ -55,7 +55,11 @@
|
|
|
55
55
|
</script>
|
|
56
56
|
|
|
57
57
|
<!-- VideoPlayer.svelte -->
|
|
58
|
-
<figure
|
|
58
|
+
<figure
|
|
59
|
+
class={`video-player ${className}`}
|
|
60
|
+
aria-label={label}
|
|
61
|
+
{...restProps}
|
|
62
|
+
>
|
|
59
63
|
<video
|
|
60
64
|
bind:this={videoEl}
|
|
61
65
|
class="video-player-element"
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// VietNamCanCuocCongDanInput component
|
|
3
|
+
//
|
|
4
|
+
// A headless input for entering Viet Nam's Citizen Identification Number (CCCD).
|
|
5
|
+
// Format: Twelve digits: a three-digit code for the province or country of registration, one digit for gender and century of birth (0 male and 1 female for the 1900s, 2 male and 3 female for the 2000s, and so on in pairs), the last two digits of the year of birth, and six random digits. There is no published check digit.
|
|
6
|
+
//
|
|
7
|
+
// Props:
|
|
8
|
+
// className — string, optional. CSS class name.
|
|
9
|
+
// label — string, required. Accessible label for screen readers via aria-label.
|
|
10
|
+
// value — string, default "". Bindable input value; supports bind:value.
|
|
11
|
+
// required — boolean, default false. Whether the input is required for form submission.
|
|
12
|
+
// disabled — boolean, default false. Whether the input is disabled.
|
|
13
|
+
// ...restProps — additional HTML attributes spread onto the <input>.
|
|
14
|
+
//
|
|
15
|
+
// Syntax:
|
|
16
|
+
// <VietNamCanCuocCongDanInput label="Citizen Identification Number (CCCD)" 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/Vietnamese_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
|
+
<!-- VietNamCanCuocCongDanInput.svelte -->
|
|
46
|
+
<input
|
|
47
|
+
class={`viet-nam-can-cuoc-cong-dan-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 VietNamCanCuocCongDanInput: import("svelte").Component<$$ComponentProps, {}, "value">;
|
|
9
|
+
type VietNamCanCuocCongDanInput = ReturnType<typeof VietNamCanCuocCongDanInput>;
|
|
10
|
+
export default VietNamCanCuocCongDanInput;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// VietNamCanCuocCongDanView component
|
|
3
|
+
//
|
|
4
|
+
// A headless display component for showing Viet Nam's
|
|
5
|
+
// Citizen Identification Number (CCCD) in a read-only format.
|
|
6
|
+
// Format: Twelve digits: a three-digit code for the province or country of registration, one digit for gender and century of birth (0 male and 1 female for the 1900s, 2 male and 3 female for the 2000s, and so on in pairs), the last two digits of the year of birth, and six random digits. There is no published check digit.
|
|
7
|
+
//
|
|
8
|
+
// Props:
|
|
9
|
+
// className — string, optional. CSS class name.
|
|
10
|
+
// label — string, required. Accessible label for screen readers via aria-label.
|
|
11
|
+
// value — string, default "". The identifier string to display.
|
|
12
|
+
// ...restProps — additional HTML attributes spread onto the <span>.
|
|
13
|
+
//
|
|
14
|
+
// Syntax:
|
|
15
|
+
// <VietNamCanCuocCongDanView label="Citizen Identification Number (CCCD)" 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/Vietnamese_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
|
+
<!-- VietNamCanCuocCongDanView.svelte -->
|
|
36
|
+
<span
|
|
37
|
+
class={`viet-nam-can-cuoc-cong-dan-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 VietNamCanCuocCongDanView: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
7
|
+
type VietNamCanCuocCongDanView = ReturnType<typeof VietNamCanCuocCongDanView>;
|
|
8
|
+
export default VietNamCanCuocCongDanView;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// WarningText component
|
|
3
|
+
//
|
|
4
|
+
// A short warning: an optional decorative icon and one bold line of text (the GOV.UK and DHCW
|
|
5
|
+
// warning-text pattern). The icon is the consumer's (Lily bundles none) and is hidden from
|
|
6
|
+
// assistive technology. The visually hidden prefix, such as "Warning", is part of the
|
|
7
|
+
// consumer's children, in the consumer's language; there is no prop or default for it.
|
|
8
|
+
//
|
|
9
|
+
// Props:
|
|
10
|
+
// class — string, optional. CSS class appended to the base class.
|
|
11
|
+
// icon — Snippet, optional. Decorative icon, rendered inside an aria-hidden span.
|
|
12
|
+
// children — Snippet, required. The hidden prefix, then the warning text.
|
|
13
|
+
// ...restProps — additional HTML attributes spread onto the <div>.
|
|
14
|
+
//
|
|
15
|
+
// Syntax:
|
|
16
|
+
// <WarningText>
|
|
17
|
+
// {#snippet icon()}!{/snippet}
|
|
18
|
+
// <span class="visually-hidden">Warning</span>
|
|
19
|
+
// You can be fined if you do not register.
|
|
20
|
+
// </WarningText>
|
|
21
|
+
import type { Snippet } from "svelte";
|
|
22
|
+
|
|
23
|
+
let {
|
|
24
|
+
class: className = "",
|
|
25
|
+
icon = undefined,
|
|
26
|
+
children,
|
|
27
|
+
...restProps
|
|
28
|
+
}: {
|
|
29
|
+
/** Optional CSS class appended to the base class */
|
|
30
|
+
class?: string;
|
|
31
|
+
/** Optional decorative icon (aria-hidden) */
|
|
32
|
+
icon?: Snippet;
|
|
33
|
+
/** The visually hidden prefix, then the warning text */
|
|
34
|
+
children: Snippet;
|
|
35
|
+
[key: string]: unknown;
|
|
36
|
+
} = $props();
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<!-- WarningText.svelte -->
|
|
40
|
+
<div
|
|
41
|
+
class={`warning-text ${className}`}
|
|
42
|
+
{...restProps}
|
|
43
|
+
>
|
|
44
|
+
{#if icon}
|
|
45
|
+
<span class="warning-text-icon" aria-hidden="true">{@render icon()}</span>
|
|
46
|
+
{/if}
|
|
47
|
+
<strong class="warning-text-text">{@render children?.()}</strong>
|
|
48
|
+
</div>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Snippet } from "svelte";
|
|
2
|
+
type $$ComponentProps = {
|
|
3
|
+
/** Optional CSS class appended to the base class */
|
|
4
|
+
class?: string;
|
|
5
|
+
/** Optional decorative icon (aria-hidden) */
|
|
6
|
+
icon?: Snippet;
|
|
7
|
+
/** The visually hidden prefix, then the warning text */
|
|
8
|
+
children: Snippet;
|
|
9
|
+
[key: string]: unknown;
|
|
10
|
+
};
|
|
11
|
+
declare const WarningText: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
12
|
+
type WarningText = ReturnType<typeof WarningText>;
|
|
13
|
+
export default WarningText;
|
|
@@ -93,7 +93,12 @@
|
|
|
93
93
|
if (disabled) return;
|
|
94
94
|
if (WHEEL_MOVE_KEYS.includes(event.key)) {
|
|
95
95
|
event.preventDefault();
|
|
96
|
-
select(
|
|
96
|
+
select(
|
|
97
|
+
nextWheelIndex(options, selectedIndex, event.key as WheelMoveKey, {
|
|
98
|
+
loop,
|
|
99
|
+
pageSize,
|
|
100
|
+
}),
|
|
101
|
+
);
|
|
97
102
|
} else if (isWheelTypeaheadKey(event)) {
|
|
98
103
|
typeahead = nextWheelPrefix(typeahead, event.key, Date.now());
|
|
99
104
|
select(wheelTypeaheadIndex(options, selectedIndex, typeahead.prefix));
|
|
@@ -119,7 +124,10 @@
|
|
|
119
124
|
</script>
|
|
120
125
|
|
|
121
126
|
<!-- WheelPicker.svelte -->
|
|
122
|
-
<div
|
|
127
|
+
<div
|
|
128
|
+
class={`wheel-picker ${className}`}
|
|
129
|
+
{...restProps}
|
|
130
|
+
>
|
|
123
131
|
<div
|
|
124
132
|
bind:this={list}
|
|
125
133
|
class="wheel-picker-list"
|
|
@@ -141,10 +149,16 @@
|
|
|
141
149
|
aria-disabled={option.disabled ? "true" : undefined}
|
|
142
150
|
data-value={option.value}
|
|
143
151
|
data-index={index}
|
|
144
|
-
>
|
|
152
|
+
>
|
|
153
|
+
{option.label}
|
|
154
|
+
</div>
|
|
145
155
|
{/each}
|
|
146
156
|
</div>
|
|
147
157
|
{#if name}
|
|
148
|
-
<input
|
|
158
|
+
<input
|
|
159
|
+
type="hidden"
|
|
160
|
+
{name}
|
|
161
|
+
{value}
|
|
162
|
+
/>
|
|
149
163
|
{/if}
|
|
150
164
|
</div>
|
|
@@ -4,7 +4,14 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Disabled options are skipped by every move. Arrows wrap only when `loop` is set; Home, End, PageUp and PageDown never wrap.
|
|
6
6
|
*/
|
|
7
|
-
export const WHEEL_MOVE_KEYS = [
|
|
7
|
+
export const WHEEL_MOVE_KEYS = [
|
|
8
|
+
"ArrowUp",
|
|
9
|
+
"ArrowDown",
|
|
10
|
+
"Home",
|
|
11
|
+
"End",
|
|
12
|
+
"PageUp",
|
|
13
|
+
"PageDown",
|
|
14
|
+
];
|
|
8
15
|
/** Indexes of the options that can be selected. */
|
|
9
16
|
function enabledIndexes(options) {
|
|
10
17
|
const out = [];
|
|
@@ -34,7 +41,11 @@ export function nextWheelIndex(options, current, key, move = {}) {
|
|
|
34
41
|
return key === "ArrowDown" || key === "PageDown" ? first : last;
|
|
35
42
|
switch (key) {
|
|
36
43
|
case "ArrowDown":
|
|
37
|
-
return position + 1 < enabled.length
|
|
44
|
+
return position + 1 < enabled.length
|
|
45
|
+
? enabled[position + 1]
|
|
46
|
+
: move.loop
|
|
47
|
+
? first
|
|
48
|
+
: current;
|
|
38
49
|
case "ArrowUp":
|
|
39
50
|
return position > 0 ? enabled[position - 1] : move.loop ? last : current;
|
|
40
51
|
case "PageDown":
|
|
@@ -55,7 +66,11 @@ export function nextWheelPrefix(previous, key, now, resetMs = WHEEL_TYPEAHEAD_RE
|
|
|
55
66
|
}
|
|
56
67
|
/** Whether a key press is a type-ahead character: one printable character other than space, no Ctrl, Alt or Meta. */
|
|
57
68
|
export function isWheelTypeaheadKey(event) {
|
|
58
|
-
return event.key.length === 1 &&
|
|
69
|
+
return (event.key.length === 1 &&
|
|
70
|
+
event.key !== " " &&
|
|
71
|
+
!event.ctrlKey &&
|
|
72
|
+
!event.altKey &&
|
|
73
|
+
!event.metaKey);
|
|
59
74
|
}
|
|
60
75
|
/**
|
|
61
76
|
* The enabled option to move to for the typed `prefix`, or -1. Searches from the option after `current` and wraps; a prefix of one
|