@krelborn/stylesui 0.0.0-stage → 0.9.0
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/LICENSE +74 -0
- package/README.md +129 -2
- package/dist/accessibility/RequiredAccessibleName.d.ts +26 -0
- package/dist/accessibility/idSegment.d.ts +7 -0
- package/dist/accessibility/idSegment.js +5 -0
- package/dist/accessibility/index.d.ts +2 -0
- package/dist/collections/index.d.ts +7 -0
- package/dist/collections/optionId.d.ts +8 -0
- package/dist/collections/optionId.js +6 -0
- package/dist/collections/renderedOptions.d.ts +37 -0
- package/dist/collections/renderedOptions.js +17 -0
- package/dist/collections/targetIndexForKey.d.ts +45 -0
- package/dist/collections/targetIndexForKey.js +16 -0
- package/dist/collections/typeAhead.d.ts +43 -0
- package/dist/collections/typeAhead.js +18 -0
- package/dist/components/Accordion/Accordion.css +1 -0
- package/dist/components/Accordion/Accordion.d.ts +90 -0
- package/dist/components/Accordion/Accordion.js +47 -0
- package/dist/components/Accordion/Accordion.module.js +19 -0
- package/dist/components/Accordion/AccordionContext.d.ts +40 -0
- package/dist/components/Accordion/AccordionContext.js +4 -0
- package/dist/components/Accordion/AccordionItem.d.ts +51 -0
- package/dist/components/Accordion/AccordionItem.js +69 -0
- package/dist/components/Accordion/AccordionToggleContent.d.ts +30 -0
- package/dist/components/Accordion/AccordionToggleContent.js +44 -0
- package/dist/components/Accordion/accordionIds.d.ts +24 -0
- package/dist/components/Accordion/accordionIds.js +12 -0
- package/dist/components/Accordion/index.d.ts +4 -0
- package/dist/components/Accordion/useAccordionContext.d.ts +9 -0
- package/dist/components/Accordion/useAccordionContext.js +10 -0
- package/dist/components/Accordion/useFindablePanel.d.ts +25 -0
- package/dist/components/Accordion/useFindablePanel.js +36 -0
- package/dist/components/Accordion/useFragmentTargetReveal.d.ts +27 -0
- package/dist/components/Accordion/useFragmentTargetReveal.js +36 -0
- package/dist/components/Accordion/useHasOpened.d.ts +7 -0
- package/dist/components/Accordion/useHasOpened.js +7 -0
- package/dist/components/Alert/Alert.css +1 -0
- package/dist/components/Alert/Alert.d.ts +47 -0
- package/dist/components/Alert/Alert.js +27 -0
- package/dist/components/Alert/Alert.module.js +8 -0
- package/dist/components/Alert/AlertIcon.d.ts +14 -0
- package/dist/components/Alert/AlertIcon.js +42 -0
- package/dist/components/Alert/index.d.ts +2 -0
- package/dist/components/Avatar/Avatar.css +1 -0
- package/dist/components/Avatar/Avatar.d.ts +33 -0
- package/dist/components/Avatar/Avatar.js +26 -0
- package/dist/components/Avatar/Avatar.module.js +6 -0
- package/dist/components/Avatar/index.d.ts +2 -0
- package/dist/components/Avatar/initialsOf.d.ts +9 -0
- package/dist/components/Avatar/initialsOf.js +9 -0
- package/dist/components/AvatarGroup/AvatarGroup.css +1 -0
- package/dist/components/AvatarGroup/AvatarGroup.d.ts +30 -0
- package/dist/components/AvatarGroup/AvatarGroup.js +33 -0
- package/dist/components/AvatarGroup/AvatarGroup.module.js +6 -0
- package/dist/components/AvatarGroup/index.d.ts +2 -0
- package/dist/components/Badge/Badge.css +1 -0
- package/dist/components/Badge/Badge.d.ts +36 -0
- package/dist/components/Badge/Badge.js +15 -0
- package/dist/components/Badge/Badge.module.js +3 -0
- package/dist/components/Badge/index.d.ts +2 -0
- package/dist/components/Box/Box.css +1 -0
- package/dist/components/Box/Box.d.ts +31 -0
- package/dist/components/Box/Box.js +17 -0
- package/dist/components/Box/Box.module.js +3 -0
- package/dist/components/Box/index.d.ts +2 -0
- package/dist/components/Button/Button.css +1 -0
- package/dist/components/Button/Button.d.ts +42 -0
- package/dist/components/Button/Button.js +24 -0
- package/dist/components/Button/Button.module.js +6 -0
- package/dist/components/Button/index.d.ts +2 -0
- package/dist/components/Card/Card.css +1 -0
- package/dist/components/Card/Card.d.ts +24 -0
- package/dist/components/Card/Card.js +14 -0
- package/dist/components/Card/Card.module.js +3 -0
- package/dist/components/Card/index.d.ts +2 -0
- package/dist/components/Center/Center.css +1 -0
- package/dist/components/Center/Center.d.ts +34 -0
- package/dist/components/Center/Center.js +19 -0
- package/dist/components/Center/Center.module.js +3 -0
- package/dist/components/Center/index.d.ts +2 -0
- package/dist/components/Checkbox/Checkbox.d.ts +23 -0
- package/dist/components/Checkbox/Checkbox.js +12 -0
- package/dist/components/Checkbox/index.d.ts +2 -0
- package/dist/components/ChoiceControl/ChoiceControl.css +1 -0
- package/dist/components/ChoiceControl/ChoiceControl.d.ts +21 -0
- package/dist/components/ChoiceControl/ChoiceControl.js +39 -0
- package/dist/components/ChoiceControl/ChoiceControl.module.js +8 -0
- package/dist/components/ChoiceControl/index.d.ts +1 -0
- package/dist/components/Cluster/Cluster.d.ts +29 -0
- package/dist/components/Cluster/Cluster.js +13 -0
- package/dist/components/Cluster/index.d.ts +2 -0
- package/dist/components/Code/Code.css +1 -0
- package/dist/components/Code/Code.d.ts +13 -0
- package/dist/components/Code/Code.js +19 -0
- package/dist/components/Code/Code.module.js +3 -0
- package/dist/components/Code/index.d.ts +2 -0
- package/dist/components/Combobox/Autocomplete.d.ts +83 -0
- package/dist/components/Combobox/Autocomplete.js +102 -0
- package/dist/components/Combobox/Combobox.css +1 -0
- package/dist/components/Combobox/Combobox.d.ts +59 -0
- package/dist/components/Combobox/Combobox.js +82 -0
- package/dist/components/Combobox/Combobox.module.js +17 -0
- package/dist/components/Combobox/ComboboxContext.d.ts +88 -0
- package/dist/components/Combobox/ComboboxContext.js +4 -0
- package/dist/components/Combobox/ComboboxFieldValue.d.ts +17 -0
- package/dist/components/Combobox/ComboboxFieldValue.js +33 -0
- package/dist/components/Combobox/ComboboxOption.d.ts +51 -0
- package/dist/components/Combobox/ComboboxOption.js +74 -0
- package/dist/components/Combobox/ComboboxOptionContent.d.ts +32 -0
- package/dist/components/Combobox/ComboboxOptionContent.js +51 -0
- package/dist/components/Combobox/ComboboxPopup.d.ts +50 -0
- package/dist/components/Combobox/ComboboxPopup.js +59 -0
- package/dist/components/Combobox/autocompleteKeys.d.ts +31 -0
- package/dist/components/Combobox/autocompleteKeys.js +25 -0
- package/dist/components/Combobox/comboboxKeys.d.ts +10 -0
- package/dist/components/Combobox/comboboxKeys.js +22 -0
- package/dist/components/Combobox/containsText.d.ts +9 -0
- package/dist/components/Combobox/containsText.js +8 -0
- package/dist/components/Combobox/index.d.ts +6 -0
- package/dist/components/Combobox/isAltArrow.d.ts +9 -0
- package/dist/components/Combobox/isAltArrow.js +5 -0
- package/dist/components/Combobox/isOptionShown.d.ts +10 -0
- package/dist/components/Combobox/isOptionShown.js +5 -0
- package/dist/components/Combobox/useAutocompleteText.d.ts +56 -0
- package/dist/components/Combobox/useAutocompleteText.js +27 -0
- package/dist/components/Combobox/useComboboxContext.d.ts +9 -0
- package/dist/components/Combobox/useComboboxContext.js +10 -0
- package/dist/components/Combobox/useComboboxList.d.ts +129 -0
- package/dist/components/Combobox/useComboboxList.js +138 -0
- package/dist/components/Combobox/useComboboxOption.d.ts +35 -0
- package/dist/components/Combobox/useComboboxOption.js +46 -0
- package/dist/components/Combobox/useComboboxSelection.d.ts +45 -0
- package/dist/components/Combobox/useComboboxSelection.js +17 -0
- package/dist/components/Combobox/useResultsAnnouncement.d.ts +23 -0
- package/dist/components/Combobox/useResultsAnnouncement.js +24 -0
- package/dist/components/ContextMenu/index.d.ts +2 -0
- package/dist/components/ContextMenu/useContextMenu.d.ts +112 -0
- package/dist/components/ContextMenu/useContextMenu.js +202 -0
- package/dist/components/ContextMenu/watchLongPress.d.ts +35 -0
- package/dist/components/ContextMenu/watchLongPress.js +38 -0
- package/dist/components/Counter/Counter.css +1 -0
- package/dist/components/Counter/Counter.d.ts +39 -0
- package/dist/components/Counter/Counter.js +18 -0
- package/dist/components/Counter/Counter.module.js +3 -0
- package/dist/components/Counter/index.d.ts +2 -0
- package/dist/components/Cover/Cover.css +1 -0
- package/dist/components/Cover/Cover.d.ts +40 -0
- package/dist/components/Cover/Cover.js +29 -0
- package/dist/components/Cover/Cover.module.js +6 -0
- package/dist/components/Cover/index.d.ts +2 -0
- package/dist/components/Divider/Divider.css +1 -0
- package/dist/components/Divider/Divider.d.ts +25 -0
- package/dist/components/Divider/Divider.js +15 -0
- package/dist/components/Divider/Divider.module.js +3 -0
- package/dist/components/Divider/index.d.ts +2 -0
- package/dist/components/Field/Field.css +1 -0
- package/dist/components/Field/Field.d.ts +49 -0
- package/dist/components/Field/Field.js +49 -0
- package/dist/components/Field/Field.module.js +8 -0
- package/dist/components/Field/index.d.ts +2 -0
- package/dist/components/Fieldset/Fieldset.css +1 -0
- package/dist/components/Fieldset/Fieldset.d.ts +35 -0
- package/dist/components/Fieldset/Fieldset.js +64 -0
- package/dist/components/Fieldset/Fieldset.module.js +8 -0
- package/dist/components/Fieldset/index.d.ts +2 -0
- package/dist/components/Frame/Frame.css +1 -0
- package/dist/components/Frame/Frame.d.ts +23 -0
- package/dist/components/Frame/Frame.js +16 -0
- package/dist/components/Frame/Frame.module.js +3 -0
- package/dist/components/Frame/index.d.ts +2 -0
- package/dist/components/Grid/Grid.css +1 -0
- package/dist/components/Grid/Grid.d.ts +25 -0
- package/dist/components/Grid/Grid.js +22 -0
- package/dist/components/Grid/Grid.module.js +3 -0
- package/dist/components/Grid/index.d.ts +2 -0
- package/dist/components/Heading/Heading.css +1 -0
- package/dist/components/Heading/Heading.d.ts +39 -0
- package/dist/components/Heading/Heading.js +23 -0
- package/dist/components/Heading/Heading.module.js +3 -0
- package/dist/components/Heading/index.d.ts +2 -0
- package/dist/components/HorizontalFlow/HorizontalFlow.css +1 -0
- package/dist/components/HorizontalFlow/HorizontalFlow.d.ts +30 -0
- package/dist/components/HorizontalFlow/HorizontalFlow.js +30 -0
- package/dist/components/HorizontalFlow/HorizontalFlow.module.js +3 -0
- package/dist/components/HorizontalFlow/index.d.ts +2 -0
- package/dist/components/Icon/AddIcon.d.ts +11 -0
- package/dist/components/Icon/AddIcon.js +21 -0
- package/dist/components/Icon/CheckIcon.d.ts +11 -0
- package/dist/components/Icon/CheckIcon.js +18 -0
- package/dist/components/Icon/ChevronDownIcon.d.ts +11 -0
- package/dist/components/Icon/ChevronDownIcon.js +18 -0
- package/dist/components/Icon/ChevronRightIcon.d.ts +11 -0
- package/dist/components/Icon/ChevronRightIcon.js +19 -0
- package/dist/components/Icon/CloseIcon.d.ts +12 -0
- package/dist/components/Icon/CloseIcon.js +21 -0
- package/dist/components/Icon/ColorModeIcon.d.ts +12 -0
- package/dist/components/Icon/ColorModeIcon.js +36 -0
- package/dist/components/Icon/DeleteIcon.d.ts +11 -0
- package/dist/components/Icon/DeleteIcon.js +36 -0
- package/dist/components/Icon/Icon.css +1 -0
- package/dist/components/Icon/Icon.d.ts +40 -0
- package/dist/components/Icon/Icon.js +27 -0
- package/dist/components/Icon/Icon.module.js +6 -0
- package/dist/components/Icon/InfoIcon.d.ts +11 -0
- package/dist/components/Icon/InfoIcon.js +30 -0
- package/dist/components/Icon/MenuIcon.d.ts +12 -0
- package/dist/components/Icon/MenuIcon.js +28 -0
- package/dist/components/Icon/MoreHorizontalIcon.d.ts +11 -0
- package/dist/components/Icon/MoreHorizontalIcon.js +34 -0
- package/dist/components/Icon/MoreVerticalIcon.d.ts +11 -0
- package/dist/components/Icon/MoreVerticalIcon.js +34 -0
- package/dist/components/Icon/PaletteIcon.d.ts +12 -0
- package/dist/components/Icon/PaletteIcon.js +48 -0
- package/dist/components/Icon/RefreshIcon.d.ts +13 -0
- package/dist/components/Icon/RefreshIcon.js +32 -0
- package/dist/components/Icon/RemoveIcon.d.ts +11 -0
- package/dist/components/Icon/RemoveIcon.js +18 -0
- package/dist/components/Icon/SendIcon.d.ts +11 -0
- package/dist/components/Icon/SendIcon.js +22 -0
- package/dist/components/Icon/index.d.ts +16 -0
- package/dist/components/IconButton/IconButton.css +1 -0
- package/dist/components/IconButton/IconButton.d.ts +45 -0
- package/dist/components/IconButton/IconButton.js +40 -0
- package/dist/components/IconButton/IconButton.module.js +7 -0
- package/dist/components/IconButton/index.d.ts +2 -0
- package/dist/components/Kbd/Kbd.css +1 -0
- package/dist/components/Kbd/Kbd.d.ts +13 -0
- package/dist/components/Kbd/Kbd.js +19 -0
- package/dist/components/Kbd/Kbd.module.js +3 -0
- package/dist/components/Kbd/index.d.ts +2 -0
- package/dist/components/Link/Link.css +1 -0
- package/dist/components/Link/Link.d.ts +52 -0
- package/dist/components/Link/Link.js +26 -0
- package/dist/components/Link/Link.module.js +3 -0
- package/dist/components/Link/index.d.ts +2 -0
- package/dist/components/Listbox/Listbox.css +1 -0
- package/dist/components/Listbox/Listbox.d.ts +46 -0
- package/dist/components/Listbox/Listbox.js +55 -0
- package/dist/components/Listbox/Listbox.module.js +6 -0
- package/dist/components/Listbox/ListboxContext.d.ts +38 -0
- package/dist/components/Listbox/ListboxContext.js +4 -0
- package/dist/components/Listbox/ListboxOption.d.ts +31 -0
- package/dist/components/Listbox/ListboxOption.js +42 -0
- package/dist/components/Listbox/index.d.ts +4 -0
- package/dist/components/Listbox/useListbox.d.ts +54 -0
- package/dist/components/Listbox/useListbox.js +103 -0
- package/dist/components/Listbox/useListboxContext.d.ts +9 -0
- package/dist/components/Listbox/useListboxContext.js +10 -0
- package/dist/components/Menu/Menu.d.ts +70 -0
- package/dist/components/Menu/Menu.js +76 -0
- package/dist/components/Menu/MenuContext.d.ts +29 -0
- package/dist/components/Menu/MenuContext.js +4 -0
- package/dist/components/Menu/MenuGroup.d.ts +22 -0
- package/dist/components/Menu/MenuGroup.js +32 -0
- package/dist/components/Menu/MenuItem.d.ts +77 -0
- package/dist/components/Menu/MenuItem.js +54 -0
- package/dist/components/Menu/MenuItemCheckbox.d.ts +61 -0
- package/dist/components/Menu/MenuItemCheckbox.js +37 -0
- package/dist/components/Menu/MenuItemRadio.d.ts +47 -0
- package/dist/components/Menu/MenuItemRadio.js +39 -0
- package/dist/components/Menu/MenuRadioGroup.d.ts +34 -0
- package/dist/components/Menu/MenuRadioGroup.js +27 -0
- package/dist/components/Menu/MenuRadioGroupContext.d.ts +17 -0
- package/dist/components/Menu/MenuRadioGroupContext.js +4 -0
- package/dist/components/Menu/MenuSeparator.d.ts +16 -0
- package/dist/components/Menu/MenuSeparator.js +20 -0
- package/dist/components/Menu/Submenu.d.ts +36 -0
- package/dist/components/Menu/Submenu.js +122 -0
- package/dist/components/Menu/index.d.ts +18 -0
- package/dist/components/Menu/useMenu.d.ts +18 -0
- package/dist/components/Menu/useMenu.js +20 -0
- package/dist/components/Menu/useMenuButton.d.ts +124 -0
- package/dist/components/Menu/useMenuButton.js +92 -0
- package/dist/components/Menu/useMenuContext.d.ts +9 -0
- package/dist/components/Menu/useMenuContext.js +10 -0
- package/dist/components/Menu/useMenuItemContent.d.ts +55 -0
- package/dist/components/Menu/useMenuItemContent.js +66 -0
- package/dist/components/Menu/useMenuPointer.d.ts +27 -0
- package/dist/components/Menu/useMenuPointer.js +56 -0
- package/dist/components/Menu/useMenuRadioGroupContext.d.ts +9 -0
- package/dist/components/Menu/useMenuRadioGroupContext.js +10 -0
- package/dist/components/MenuSurface/MenuSurface.css +1 -0
- package/dist/components/MenuSurface/MenuSurface.module.js +16 -0
- package/dist/components/Menubar/Menubar.css +1 -0
- package/dist/components/Menubar/Menubar.d.ts +23 -0
- package/dist/components/Menubar/Menubar.js +67 -0
- package/dist/components/Menubar/Menubar.module.js +7 -0
- package/dist/components/Menubar/MenubarContext.d.ts +29 -0
- package/dist/components/Menubar/MenubarContext.js +4 -0
- package/dist/components/Menubar/MenubarMenu.d.ts +26 -0
- package/dist/components/Menubar/MenubarMenu.js +88 -0
- package/dist/components/Menubar/findOpenMenubarItem.d.ts +7 -0
- package/dist/components/Menubar/findOpenMenubarItem.js +6 -0
- package/dist/components/Menubar/index.d.ts +4 -0
- package/dist/components/Menubar/menubarItems.d.ts +7 -0
- package/dist/components/Menubar/menubarItems.js +5 -0
- package/dist/components/Menubar/useMenubarContext.d.ts +9 -0
- package/dist/components/Menubar/useMenubarContext.js +10 -0
- package/dist/components/NavBar/NavBar.css +1 -0
- package/dist/components/NavBar/NavBar.d.ts +53 -0
- package/dist/components/NavBar/NavBar.js +97 -0
- package/dist/components/NavBar/NavBar.module.js +22 -0
- package/dist/components/NavBar/NavBarContext.d.ts +21 -0
- package/dist/components/NavBar/NavBarContext.js +4 -0
- package/dist/components/NavBar/NavBarItem.d.ts +32 -0
- package/dist/components/NavBar/NavBarItem.js +18 -0
- package/dist/components/NavBar/NavBarMenu.d.ts +32 -0
- package/dist/components/NavBar/NavBarMenu.js +84 -0
- package/dist/components/NavBar/NavBarMenuGroup.d.ts +25 -0
- package/dist/components/NavBar/NavBarMenuGroup.js +40 -0
- package/dist/components/NavBar/NavBarMenuItem.d.ts +36 -0
- package/dist/components/NavBar/NavBarMenuItem.js +49 -0
- package/dist/components/NavBar/index.d.ts +10 -0
- package/dist/components/NavBar/isNavBarCollapsed.d.ts +8 -0
- package/dist/components/NavBar/isNavBarCollapsed.js +5 -0
- package/dist/components/NavBar/leavesPageInPlace.d.ts +12 -0
- package/dist/components/NavBar/leavesPageInPlace.js +29 -0
- package/dist/components/NavBar/renderNavBarLink.d.ts +12 -0
- package/dist/components/NavBar/renderNavBarLink.js +16 -0
- package/dist/components/NavBar/useLayoutSwitch.d.ts +26 -0
- package/dist/components/NavBar/useLayoutSwitch.js +25 -0
- package/dist/components/NavBar/useNavBarContext.d.ts +9 -0
- package/dist/components/NavBar/useNavBarContext.js +10 -0
- package/dist/components/NavList/NavList.css +1 -0
- package/dist/components/NavList/NavList.d.ts +20 -0
- package/dist/components/NavList/NavList.js +27 -0
- package/dist/components/NavList/NavList.module.js +11 -0
- package/dist/components/NavList/NavListGroup.d.ts +25 -0
- package/dist/components/NavList/NavListGroup.js +39 -0
- package/dist/components/NavList/NavListItem.d.ts +49 -0
- package/dist/components/NavList/NavListItem.js +56 -0
- package/dist/components/NavList/index.d.ts +6 -0
- package/dist/components/Overlay/Overlay.css +1 -0
- package/dist/components/Overlay/Overlay.d.ts +33 -0
- package/dist/components/Overlay/Overlay.js +35 -0
- package/dist/components/Overlay/Overlay.module.js +3 -0
- package/dist/components/Overlay/index.d.ts +1 -0
- package/dist/components/PageLayout/PageLayout.css +1 -0
- package/dist/components/PageLayout/PageLayout.d.ts +26 -0
- package/dist/components/PageLayout/PageLayout.js +17 -0
- package/dist/components/PageLayout/PageLayout.module.js +3 -0
- package/dist/components/PageLayout/index.d.ts +2 -0
- package/dist/components/Popover/Popover.css +1 -0
- package/dist/components/Popover/Popover.d.ts +52 -0
- package/dist/components/Popover/Popover.js +20 -0
- package/dist/components/Popover/Popover.module.js +3 -0
- package/dist/components/Popover/index.d.ts +4 -0
- package/dist/components/Popover/usePopover.d.ts +96 -0
- package/dist/components/Popover/usePopover.js +71 -0
- package/dist/components/Prose/Prose.css +1 -0
- package/dist/components/Prose/Prose.d.ts +50 -0
- package/dist/components/Prose/Prose.js +15 -0
- package/dist/components/Prose/Prose.module.js +3 -0
- package/dist/components/Prose/index.d.ts +2 -0
- package/dist/components/Radio/Radio.d.ts +29 -0
- package/dist/components/Radio/Radio.js +23 -0
- package/dist/components/Radio/index.d.ts +2 -0
- package/dist/components/RadioGroup/RadioGroup.css +1 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts +58 -0
- package/dist/components/RadioGroup/RadioGroup.js +36 -0
- package/dist/components/RadioGroup/RadioGroup.module.js +3 -0
- package/dist/components/RadioGroup/index.d.ts +2 -0
- package/dist/components/RequiredIndicator/RequiredIndicator.css +1 -0
- package/dist/components/RequiredIndicator/RequiredIndicator.d.ts +6 -0
- package/dist/components/RequiredIndicator/RequiredIndicator.js +15 -0
- package/dist/components/RequiredIndicator/RequiredIndicator.module.js +3 -0
- package/dist/components/RequiredIndicator/index.d.ts +1 -0
- package/dist/components/Row/Row.d.ts +29 -0
- package/dist/components/Row/Row.js +13 -0
- package/dist/components/Row/index.d.ts +2 -0
- package/dist/components/SegmentedControl/Segment.d.ts +24 -0
- package/dist/components/SegmentedControl/Segment.js +41 -0
- package/dist/components/SegmentedControl/SegmentedControl.css +1 -0
- package/dist/components/SegmentedControl/SegmentedControl.d.ts +25 -0
- package/dist/components/SegmentedControl/SegmentedControl.js +19 -0
- package/dist/components/SegmentedControl/SegmentedControl.module.js +9 -0
- package/dist/components/SegmentedControl/index.d.ts +4 -0
- package/dist/components/Select/Select.d.ts +27 -0
- package/dist/components/Select/Select.js +11 -0
- package/dist/components/Select/index.d.ts +2 -0
- package/dist/components/Sidebar/Sidebar.css +1 -0
- package/dist/components/Sidebar/Sidebar.d.ts +42 -0
- package/dist/components/Sidebar/Sidebar.js +23 -0
- package/dist/components/Sidebar/Sidebar.module.js +3 -0
- package/dist/components/Sidebar/index.d.ts +2 -0
- package/dist/components/SkipLink/SkipLink.css +1 -0
- package/dist/components/SkipLink/SkipLink.d.ts +20 -0
- package/dist/components/SkipLink/SkipLink.js +20 -0
- package/dist/components/SkipLink/SkipLink.module.js +3 -0
- package/dist/components/SkipLink/index.d.ts +2 -0
- package/dist/components/Spinner/Spinner.css +1 -0
- package/dist/components/Spinner/Spinner.d.ts +13 -0
- package/dist/components/Spinner/Spinner.js +32 -0
- package/dist/components/Spinner/Spinner.module.js +7 -0
- package/dist/components/Spinner/index.d.ts +1 -0
- package/dist/components/Stack/Stack.css +1 -0
- package/dist/components/Stack/Stack.d.ts +25 -0
- package/dist/components/Stack/Stack.js +20 -0
- package/dist/components/Stack/Stack.module.js +3 -0
- package/dist/components/Stack/index.d.ts +2 -0
- package/dist/components/StatusDot/StatusDot.css +1 -0
- package/dist/components/StatusDot/StatusDot.d.ts +57 -0
- package/dist/components/StatusDot/StatusDot.js +20 -0
- package/dist/components/StatusDot/StatusDot.module.js +3 -0
- package/dist/components/StatusDot/index.d.ts +2 -0
- package/dist/components/Switch/Switch.d.ts +24 -0
- package/dist/components/Switch/Switch.js +12 -0
- package/dist/components/Switch/index.d.ts +2 -0
- package/dist/components/Switcher/Switcher.css +1 -0
- package/dist/components/Switcher/Switcher.d.ts +27 -0
- package/dist/components/Switcher/Switcher.js +22 -0
- package/dist/components/Switcher/Switcher.module.js +3 -0
- package/dist/components/Switcher/index.d.ts +2 -0
- package/dist/components/Tabs/Tab.d.ts +26 -0
- package/dist/components/Tabs/Tab.js +60 -0
- package/dist/components/Tabs/TabList.d.ts +16 -0
- package/dist/components/Tabs/TabList.js +22 -0
- package/dist/components/Tabs/TabPanel.d.ts +24 -0
- package/dist/components/Tabs/TabPanel.js +21 -0
- package/dist/components/Tabs/Tabs.css +1 -0
- package/dist/components/Tabs/Tabs.d.ts +81 -0
- package/dist/components/Tabs/Tabs.js +30 -0
- package/dist/components/Tabs/Tabs.module.js +8 -0
- package/dist/components/Tabs/TabsContext.d.ts +39 -0
- package/dist/components/Tabs/TabsContext.js +4 -0
- package/dist/components/Tabs/index.d.ts +8 -0
- package/dist/components/Tabs/tabIds.d.ts +16 -0
- package/dist/components/Tabs/tabIds.js +9 -0
- package/dist/components/Tabs/useTabsContext.d.ts +9 -0
- package/dist/components/Tabs/useTabsContext.js +10 -0
- package/dist/components/Text/Text.css +1 -0
- package/dist/components/Text/Text.d.ts +40 -0
- package/dist/components/Text/Text.js +16 -0
- package/dist/components/Text/Text.module.js +3 -0
- package/dist/components/Text/index.d.ts +2 -0
- package/dist/components/TextControl/TextControl.css +1 -0
- package/dist/components/TextControl/TextControl.d.ts +22 -0
- package/dist/components/TextControl/TextControl.js +27 -0
- package/dist/components/TextControl/TextControl.module.js +3 -0
- package/dist/components/TextControl/index.d.ts +1 -0
- package/dist/components/TextInput/TextInput.d.ts +31 -0
- package/dist/components/TextInput/TextInput.js +12 -0
- package/dist/components/TextInput/index.d.ts +2 -0
- package/dist/components/Textarea/Textarea.d.ts +24 -0
- package/dist/components/Textarea/Textarea.js +11 -0
- package/dist/components/Textarea/index.d.ts +2 -0
- package/dist/components/Theme/Theme.d.ts +46 -0
- package/dist/components/Theme/Theme.js +17 -0
- package/dist/components/Theme/index.d.ts +2 -0
- package/dist/components/Tooltip/Tooltip.css +1 -0
- package/dist/components/Tooltip/Tooltip.d.ts +49 -0
- package/dist/components/Tooltip/Tooltip.js +21 -0
- package/dist/components/Tooltip/Tooltip.module.js +3 -0
- package/dist/components/Tooltip/index.d.ts +4 -0
- package/dist/components/Tooltip/tooltipCoordinator.d.ts +14 -0
- package/dist/components/Tooltip/tooltipCoordinator.js +16 -0
- package/dist/components/Tooltip/useTooltip.d.ts +119 -0
- package/dist/components/Tooltip/useTooltip.js +73 -0
- package/dist/components/VisuallyHidden/VisuallyHidden.css +1 -0
- package/dist/components/VisuallyHidden/VisuallyHidden.d.ts +14 -0
- package/dist/components/VisuallyHidden/VisuallyHidden.js +19 -0
- package/dist/components/VisuallyHidden/VisuallyHidden.module.js +3 -0
- package/dist/components/VisuallyHidden/index.d.ts +2 -0
- package/dist/errors/MissingContextError.d.ts +11 -0
- package/dist/errors/MissingContextError.js +8 -0
- package/dist/errors/PopoverRefusedError.d.ts +12 -0
- package/dist/errors/PopoverRefusedError.js +8 -0
- package/dist/errors/index.d.ts +2 -0
- package/dist/forms/ControlSize.d.ts +4 -0
- package/dist/forms/FieldContext.d.ts +34 -0
- package/dist/forms/FieldContext.js +4 -0
- package/dist/forms/RadioGroupContext.d.ts +34 -0
- package/dist/forms/RadioGroupContext.js +4 -0
- package/dist/forms/hasContent.d.ts +10 -0
- package/dist/forms/hasContent.js +6 -0
- package/dist/forms/index.d.ts +8 -0
- package/dist/forms/useFieldControl.d.ts +36 -0
- package/dist/forms/useFieldControl.js +28 -0
- package/dist/forms/useRadioGroupItem.d.ts +50 -0
- package/dist/forms/useRadioGroupItem.js +26 -0
- package/dist/index.d.ts +107 -0
- package/dist/index.js +92 -0
- package/dist/layout/Space.d.ts +4 -0
- package/dist/layout/alignment.d.ts +8 -0
- package/dist/layout/index.d.ts +5 -0
- package/dist/layout/listRole.d.ts +11 -0
- package/dist/layout/listRole.js +5 -0
- package/dist/layout/spaceValue.d.ts +8 -0
- package/dist/layout/spaceValue.js +5 -0
- package/dist/layout/withCustomProperties.d.ts +9 -0
- package/dist/layout/withCustomProperties.js +8 -0
- package/dist/links/LinkOrButtonProps.d.ts +17 -0
- package/dist/links/index.d.ts +1 -0
- package/dist/menus/closeWhenFocusLeaves.d.ts +9 -0
- package/dist/menus/closeWhenFocusLeaves.js +11 -0
- package/dist/menus/focusItem.d.ts +6 -0
- package/dist/menus/focusItem.js +9 -0
- package/dist/menus/focusOnOpening.d.ts +11 -0
- package/dist/menus/focusOnOpening.js +11 -0
- package/dist/menus/hasModifier.d.ts +7 -0
- package/dist/menus/hasModifier.js +5 -0
- package/dist/menus/index.d.ts +11 -0
- package/dist/menus/itemText.d.ts +8 -0
- package/dist/menus/itemText.js +6 -0
- package/dist/menus/leaveMenuOnTab.d.ts +9 -0
- package/dist/menus/leaveMenuOnTab.js +6 -0
- package/dist/menus/pointerIntent.d.ts +36 -0
- package/dist/menus/pointerIntent.js +68 -0
- package/dist/menus/renderedItems.d.ts +8 -0
- package/dist/menus/renderedItems.js +4 -0
- package/dist/menus/watchRemovals.d.ts +8 -0
- package/dist/menus/watchRemovals.js +23 -0
- package/dist/overlays/OverlayDelay.d.ts +13 -0
- package/dist/overlays/OverlayPlacement.d.ts +6 -0
- package/dist/overlays/anchorNameFor.d.ts +7 -0
- package/dist/overlays/anchorNameFor.js +5 -0
- package/dist/overlays/index.d.ts +6 -0
- package/dist/overlays/mergeProps.d.ts +13 -0
- package/dist/overlays/mergeProps.js +29 -0
- package/dist/overlays/syncPopover.d.ts +11 -0
- package/dist/overlays/syncPopover.js +24 -0
- package/dist/overlays/useOverlay.d.ts +71 -0
- package/dist/overlays/useOverlay.js +49 -0
- package/dist/styles.css +1 -0
- package/fonts/playful.css +3 -0
- package/package.json +103 -3
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { JSX } from "react";
|
|
2
|
+
import type { ControlSize } from "../../forms";
|
|
3
|
+
import type { BoxProps } from "../Box";
|
|
4
|
+
/**
|
|
5
|
+
* Props for `Select`: its own props plus every native select prop
|
|
6
|
+
*/
|
|
7
|
+
export interface SelectProps extends Omit<BoxProps<"select">, "as" | "multiple" | "size"> {
|
|
8
|
+
/**
|
|
9
|
+
* Height of the select, matching the `Button` sizes. Takes the place of the native `size` attribute. Defaults
|
|
10
|
+
* to `md`. The `sm` text is under 16px, which makes iOS Safari zoom the page when the select takes focus.
|
|
11
|
+
*/
|
|
12
|
+
size?: ControlSize;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Themed native select that chooses one option from a list. Its children are native `option` and `optgroup`
|
|
16
|
+
* elements. Inside a `Field` it takes its label, description, error, and required and disabled state from the
|
|
17
|
+
* field. Outside one, give it an accessible name, for example with `aria-label`.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* <Field label="Country">
|
|
21
|
+
* <Select defaultValue="fr">
|
|
22
|
+
* <option value="fr">France</option>
|
|
23
|
+
* <option value="jp">Japan</option>
|
|
24
|
+
* </Select>
|
|
25
|
+
* </Field>
|
|
26
|
+
*/
|
|
27
|
+
export declare function Select({ size, ...rest }: SelectProps): JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TextControl as e } from "../TextControl/TextControl.js";
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
// src/components/Select/Select.tsx
|
|
4
|
+
function n({ size: n = "md", ...r }) {
|
|
5
|
+
return /* @__PURE__ */ t(e, {
|
|
6
|
+
...r,
|
|
7
|
+
as: "select",
|
|
8
|
+
size: n
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
export { n as Select };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.sui-sidebar-UB1qz{gap:var(--sui-sidebar-gap);flex-wrap:wrap;display:flex}.sui-sidebar-UB1qz[data-align=start]{align-items:start}.sui-sidebar-UB1qz[data-side=end]>:first-child,.sui-sidebar-UB1qz[data-side=start]>:last-child{min-inline-size:var(--sui-sidebar-content-minimum-width);flex-grow:999;flex-basis:0}.sui-sidebar-UB1qz[data-side=end]>:last-child,.sui-sidebar-UB1qz[data-side=start]>:first-child{flex-basis:var(--sui-sidebar-side-width);flex-grow:1}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { JSX } from "react";
|
|
2
|
+
import type { Space } from "../../layout";
|
|
3
|
+
import type { BoxElement, BoxProps } from "../Box";
|
|
4
|
+
interface SidebarOwnProps {
|
|
5
|
+
/**
|
|
6
|
+
* Cross-axis placement of the panes; `start` lets a sticky sidebar work. Defaults to `stretch`.
|
|
7
|
+
*/
|
|
8
|
+
align?: "start" | "stretch";
|
|
9
|
+
/**
|
|
10
|
+
* Minimum width of the main pane before the panes stack, as a CSS length. Defaults to `50%`.
|
|
11
|
+
*/
|
|
12
|
+
contentMinimumWidth?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Space between the panes. Defaults to `4`.
|
|
15
|
+
*/
|
|
16
|
+
gap?: Space;
|
|
17
|
+
/**
|
|
18
|
+
* Which child is the sidebar: the first (`start`) or last (`end`). Defaults to `end`.
|
|
19
|
+
*/
|
|
20
|
+
side?: "start" | "end";
|
|
21
|
+
/**
|
|
22
|
+
* Ideal width of the sidebar, as a CSS length. Defaults to the sidebar's content width.
|
|
23
|
+
*/
|
|
24
|
+
sideWidth?: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Props for `Sidebar`: its own props plus every prop supported by the element given in `as`
|
|
28
|
+
*/
|
|
29
|
+
export type SidebarProps<E extends BoxElement = "div"> = SidebarOwnProps & Omit<BoxProps<E>, keyof SidebarOwnProps>;
|
|
30
|
+
/**
|
|
31
|
+
* Main pane and side pane that sit side by side when there is room and stack when there is not.
|
|
32
|
+
* Expects exactly two children. Wrap a nested Sidebar in an element, because a Sidebar that is itself a
|
|
33
|
+
* pane shadows this one's custom properties.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* <Sidebar sideWidth="18rem">
|
|
37
|
+
* <article>...</article>
|
|
38
|
+
* <aside>...</aside>
|
|
39
|
+
* </Sidebar>
|
|
40
|
+
*/
|
|
41
|
+
export declare function Sidebar<E extends BoxElement = "div">({ align, as, className, contentMinimumWidth, gap, side, sideWidth, ...rest }: SidebarProps<E>): JSX.Element;
|
|
42
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { spaceValue as e } from "../../layout/spaceValue.js";
|
|
2
|
+
import { withCustomProperties as t } from "../../layout/withCustomProperties.js";
|
|
3
|
+
import { Box as n } from "../Box/Box.js";
|
|
4
|
+
import r from "./Sidebar.module.js";
|
|
5
|
+
import { clsx as i } from "clsx";
|
|
6
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
7
|
+
// src/components/Sidebar/Sidebar.tsx
|
|
8
|
+
function o({ align: o = "stretch", as: s, className: c, contentMinimumWidth: l = "50%", gap: u = 4, side: d = "end", sideWidth: f, ...p }) {
|
|
9
|
+
let { style: m, ...h } = p;
|
|
10
|
+
return /* @__PURE__ */ a(n, {
|
|
11
|
+
...h,
|
|
12
|
+
as: s,
|
|
13
|
+
className: i(r.sidebar, c),
|
|
14
|
+
style: t({
|
|
15
|
+
"--sui-sidebar-content-minimum-width": l,
|
|
16
|
+
"--sui-sidebar-gap": e(u),
|
|
17
|
+
"--sui-sidebar-side-width": f ?? "auto"
|
|
18
|
+
}, m),
|
|
19
|
+
"data-align": o,
|
|
20
|
+
"data-side": d
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
export { o as Sidebar };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.sui-skipLink-lRGho{--sui-skip-link-bg:var(--sui-color-primary,#2563eb);--sui-skip-link-fg:var(--sui-color-on-primary,#fff);--sui-skip-link-z-index:1000;clip-path:inset(50%);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.sui-skipLink-lRGho:focus-visible{z-index:var(--sui-skip-link-z-index);width:auto;height:auto;max-inline-size:calc(100% - 2 * var(--sui-space-2,.5rem));padding:var(--sui-space-2,.5rem) var(--sui-space-4,1rem);clip-path:none;border-radius:var(--sui-radius-control,4px);background-color:var(--sui-skip-link-bg);color:var(--sui-skip-link-fg);font-family:var(--sui-font-body,system-ui, sans-serif);font-size:var(--sui-font-size-md,1rem);font-weight:var(--sui-font-weight-control,500);line-height:var(--sui-line-height-tight,1.25);white-space:normal;outline:var(--sui-focus-ring-width,2px) solid var(--sui-color-focus-ring,#3b82f6);outline-offset:2px;margin:0;text-decoration:none;position:fixed;inset-block-start:var(--sui-space-2,.5rem);inset-inline-start:var(--sui-space-2,.5rem);overflow:visible}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { JSX } from "react";
|
|
2
|
+
import type { BoxProps } from "../Box";
|
|
3
|
+
/**
|
|
4
|
+
* Props for `SkipLink`: its own props plus every native anchor prop
|
|
5
|
+
*/
|
|
6
|
+
export interface SkipLinkProps extends Omit<BoxProps<"a">, "as" | "href"> {
|
|
7
|
+
/**
|
|
8
|
+
* Fragment naming the element to skip to, such as `#main`. That element needs the matching `id`.
|
|
9
|
+
*/
|
|
10
|
+
href: `#${string}`;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Link that skips past repeated content to the page's main content. It stays out of sight until it
|
|
14
|
+
* receives keyboard focus, then shows pinned to the top-left of the page. Render it first in the
|
|
15
|
+
* page so it is the first Tab stop.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* <SkipLink href="#main">Skip to main content</SkipLink>
|
|
19
|
+
*/
|
|
20
|
+
export declare function SkipLink({ children, className, ...rest }: SkipLinkProps): JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Box as e } from "../Box/Box.js";
|
|
2
|
+
import t from "./SkipLink.module.js";
|
|
3
|
+
import { clsx as n } from "clsx";
|
|
4
|
+
import { c as r } from "react/compiler-runtime";
|
|
5
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
6
|
+
// src/components/SkipLink/SkipLink.tsx
|
|
7
|
+
function a(a) {
|
|
8
|
+
let o = r(10), s, c, l;
|
|
9
|
+
o[0] === a ? (s = o[1], c = o[2], l = o[3]) : ({children: s, className: c, ...l} = a, o[0] = a, o[1] = s, o[2] = c, o[3] = l);
|
|
10
|
+
let u;
|
|
11
|
+
o[4] === c ? u = o[5] : (u = n(t.skipLink, c), o[4] = c, o[5] = u);
|
|
12
|
+
let d;
|
|
13
|
+
return o[6] !== s || o[7] !== l || o[8] !== u ? (d = /* @__PURE__ */ i(e, {
|
|
14
|
+
...l,
|
|
15
|
+
as: "a",
|
|
16
|
+
className: u,
|
|
17
|
+
children: s
|
|
18
|
+
}), o[6] = s, o[7] = l, o[8] = u, o[9] = d) : d = o[9], d;
|
|
19
|
+
}
|
|
20
|
+
export { a as SkipLink };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.sui-spinner-GpFZS{block-size:1em;inline-size:1em;animation:.8s linear infinite sui-rotate-RRVpi}@keyframes sui-rotate-RRVpi{to{transform:rotate(1turn)}}@keyframes sui-pulse-ZOhFR{50%{opacity:.4}}@media (prefers-reduced-motion:reduce){.sui-spinner-GpFZS{animation:1.6s ease-in-out infinite sui-pulse-ZOhFR}}@media (forced-colors:active){.sui-spinner-GpFZS{color:buttontext}}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { JSX } from "react";
|
|
2
|
+
interface SpinnerProps {
|
|
3
|
+
/**
|
|
4
|
+
* Class names merged with the spinner's own, for positioning it
|
|
5
|
+
*/
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* A rotating arc in `currentColor`, 1em square, hidden from assistive technology. Whatever shows it must also tell
|
|
10
|
+
* screen readers that something is happening, for example with a status message.
|
|
11
|
+
*/
|
|
12
|
+
export declare function Spinner({ className }: SpinnerProps): JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Box as e } from "../Box/Box.js";
|
|
2
|
+
import t from "./Spinner.module.js";
|
|
3
|
+
import { clsx as n } from "clsx";
|
|
4
|
+
import { c as r } from "react/compiler-runtime";
|
|
5
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
6
|
+
// src/components/Spinner/Spinner.tsx
|
|
7
|
+
function a(a) {
|
|
8
|
+
let o = r(5), { className: s } = a, c;
|
|
9
|
+
o[0] === s ? c = o[1] : (c = n(t.spinner, s), o[0] = s, o[1] = c);
|
|
10
|
+
let l;
|
|
11
|
+
o[2] === Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ i(e, {
|
|
12
|
+
as: "circle",
|
|
13
|
+
cx: 8,
|
|
14
|
+
cy: 8,
|
|
15
|
+
r: 6,
|
|
16
|
+
stroke: "currentColor",
|
|
17
|
+
strokeDasharray: "28 10",
|
|
18
|
+
strokeLinecap: "round",
|
|
19
|
+
strokeWidth: 2
|
|
20
|
+
}), o[2] = l) : l = o[2];
|
|
21
|
+
let u;
|
|
22
|
+
return o[3] === c ? u = o[4] : (u = /* @__PURE__ */ i(e, {
|
|
23
|
+
as: "svg",
|
|
24
|
+
className: c,
|
|
25
|
+
fill: "none",
|
|
26
|
+
focusable: "false",
|
|
27
|
+
viewBox: "0 0 16 16",
|
|
28
|
+
"aria-hidden": !0,
|
|
29
|
+
children: l
|
|
30
|
+
}), o[3] = c, o[4] = u), u;
|
|
31
|
+
}
|
|
32
|
+
export { a as Spinner };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Spinner } from "./Spinner";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.sui-stack-yUU-B{gap:var(--sui-stack-gap);flex-direction:column;display:flex}.sui-stack-yUU-B:where(ul,ol){margin:0;padding:0;list-style:none}.sui-stack-yUU-B[data-align=start]{align-items:start}.sui-stack-yUU-B[data-align=center]{align-items:center}.sui-stack-yUU-B[data-align=end]{align-items:end}.sui-stack-yUU-B[data-align=stretch]{align-items:stretch}.sui-stack-yUU-B[data-align=baseline]{align-items:baseline}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { JSX } from "react";
|
|
2
|
+
import type { Alignment, Space } from "../../layout";
|
|
3
|
+
import type { BoxElement, BoxProps } from "../Box";
|
|
4
|
+
interface StackOwnProps {
|
|
5
|
+
/**
|
|
6
|
+
* Cross-axis placement of children. Defaults to `stretch`.
|
|
7
|
+
*/
|
|
8
|
+
align?: Alignment;
|
|
9
|
+
/**
|
|
10
|
+
* Space between children. Defaults to `4`.
|
|
11
|
+
*/
|
|
12
|
+
gap?: Space;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Props for `Stack`: its own props plus every prop supported by the element given in `as`
|
|
16
|
+
*/
|
|
17
|
+
export type StackProps<E extends BoxElement = "div"> = StackOwnProps & Omit<BoxProps<E>, keyof StackOwnProps>;
|
|
18
|
+
/**
|
|
19
|
+
* Vertical flow with a consistent gap between children
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* <Stack as="article" gap={6}>...</Stack>
|
|
23
|
+
*/
|
|
24
|
+
export declare function Stack<E extends BoxElement = "div">({ align, as, className, gap, ...rest }: StackProps<E>): JSX.Element;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { listRole as e } from "../../layout/listRole.js";
|
|
2
|
+
import { spaceValue as t } from "../../layout/spaceValue.js";
|
|
3
|
+
import { withCustomProperties as n } from "../../layout/withCustomProperties.js";
|
|
4
|
+
import { Box as r } from "../Box/Box.js";
|
|
5
|
+
import i from "./Stack.module.js";
|
|
6
|
+
import { clsx as a } from "clsx";
|
|
7
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
8
|
+
// src/components/Stack/Stack.tsx
|
|
9
|
+
function s({ align: s = "stretch", as: c, className: l, gap: u = 4, ...d }) {
|
|
10
|
+
let { role: f, style: p, ...m } = d, h = c ?? "div";
|
|
11
|
+
return /* @__PURE__ */ o(r, {
|
|
12
|
+
...m,
|
|
13
|
+
as: h,
|
|
14
|
+
className: a(i.stack, l),
|
|
15
|
+
role: e(h, f),
|
|
16
|
+
style: n({ "--sui-stack-gap": t(u) }, p),
|
|
17
|
+
"data-align": s
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
export { s as Stack };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.sui-statusDot-xTHkw{--sui-status-dot-size:.5rem;--sui-status-dot-tone-color:var(--sui-color-input-border,#6b7280);inline-size:var(--sui-status-dot-size);block-size:var(--sui-status-dot-size);border:calc(var(--sui-status-dot-size) / 4) solid currentColor;color:var(--sui-status-dot-color,var(--sui-status-dot-tone-color));vertical-align:middle;border-radius:50%;flex:none;display:inline-block}.sui-statusDot-xTHkw[data-size=sm]{--sui-status-dot-size:.375rem}.sui-statusDot-xTHkw[data-variant=solid]{background-color:currentColor}.sui-statusDot-xTHkw[data-tone=danger]{--sui-status-dot-tone-color:var(--sui-color-danger-text,#b91c1c)}.sui-statusDot-xTHkw[data-tone=info]{--sui-status-dot-tone-color:var(--sui-color-info-text,#4338ca)}.sui-statusDot-xTHkw[data-tone=primary]{--sui-status-dot-tone-color:var(--sui-color-primary,#2563eb)}.sui-statusDot-xTHkw[data-tone=success]{--sui-status-dot-tone-color:var(--sui-color-success-text,#166534)}.sui-statusDot-xTHkw[data-tone=warning]{--sui-status-dot-tone-color:var(--sui-color-warning-text,#854d0e)}@media (forced-colors:active){.sui-statusDot-xTHkw{color:inherit}.sui-statusDot-xTHkw[data-variant=solid]{border-width:calc(var(--sui-status-dot-size) / 2)}}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { JSX } from "react";
|
|
2
|
+
import type { BadgeTone } from "../Badge";
|
|
3
|
+
import type { BoxProps } from "../Box";
|
|
4
|
+
/**
|
|
5
|
+
* Dot sizes: `sm` is 0.375rem across and `md` is 0.5rem
|
|
6
|
+
*/
|
|
7
|
+
export type StatusDotSize = "md" | "sm";
|
|
8
|
+
/**
|
|
9
|
+
* Dot styles: a filled circle, or a ring that gives a second cue beside the colour
|
|
10
|
+
*/
|
|
11
|
+
export type StatusDotVariant = "ring" | "solid";
|
|
12
|
+
/**
|
|
13
|
+
* Props for `StatusDot`: its own props plus every `span` prop except `children`, `role` and the ARIA props that name or
|
|
14
|
+
* hide it, which `label` decides
|
|
15
|
+
*/
|
|
16
|
+
export interface StatusDotProps extends Omit<BoxProps<"span">, "aria-hidden" | "aria-label" | "aria-labelledby" | "as" | "children" | "dangerouslySetInnerHTML" | "role"> {
|
|
17
|
+
/**
|
|
18
|
+
* Not accepted: the dot is hidden from assistive technology exactly when it has no `label`
|
|
19
|
+
*/
|
|
20
|
+
"aria-hidden"?: never;
|
|
21
|
+
/**
|
|
22
|
+
* Not accepted: the `label` names the dot
|
|
23
|
+
*/
|
|
24
|
+
"aria-label"?: never;
|
|
25
|
+
/**
|
|
26
|
+
* Not accepted: the `label` names the dot
|
|
27
|
+
*/
|
|
28
|
+
"aria-labelledby"?: never;
|
|
29
|
+
/**
|
|
30
|
+
* What the dot means, read by screen readers. Without it, or with an empty one, the dot is hidden from them, so give
|
|
31
|
+
* it a label, or put text beside it, whenever it carries meaning.
|
|
32
|
+
*/
|
|
33
|
+
label?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Dot size. Defaults to `md`.
|
|
36
|
+
*/
|
|
37
|
+
size?: StatusDotSize;
|
|
38
|
+
/**
|
|
39
|
+
* Colour. Each tone keeps 3:1 against the page and a surface. Defaults to `neutral`.
|
|
40
|
+
*/
|
|
41
|
+
tone?: BadgeTone;
|
|
42
|
+
/**
|
|
43
|
+
* Filled or ring. Defaults to `solid`.
|
|
44
|
+
*/
|
|
45
|
+
variant?: StatusDotVariant;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* A small coloured dot for a status, such as the result of a check. Colour alone must not tell two states apart, so
|
|
49
|
+
* pair states with different variants or with text.
|
|
50
|
+
*
|
|
51
|
+
* A container sets `--sui-status-dot-color` (for example to `currentColor`) to recolour every dot inside it, such as on
|
|
52
|
+
* a selected row filled with the primary colour.
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* <StatusDot label="Checks running" tone="warning" variant="ring" />
|
|
56
|
+
*/
|
|
57
|
+
export declare function StatusDot({ className, label, size, tone, variant, ...rest }: StatusDotProps): JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Box as e } from "../Box/Box.js";
|
|
2
|
+
import t from "./StatusDot.module.js";
|
|
3
|
+
import { clsx as n } from "clsx";
|
|
4
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
+
// src/components/StatusDot/StatusDot.tsx
|
|
6
|
+
function i({ className: i, label: a, size: o = "md", tone: s = "neutral", variant: c = "solid", ...l }) {
|
|
7
|
+
let u = !a;
|
|
8
|
+
return /* @__PURE__ */ r(e, {
|
|
9
|
+
...l,
|
|
10
|
+
as: "span",
|
|
11
|
+
className: n(t.statusDot, i),
|
|
12
|
+
role: u ? void 0 : "img",
|
|
13
|
+
"aria-hidden": u ? !0 : void 0,
|
|
14
|
+
"aria-label": u ? void 0 : a,
|
|
15
|
+
"data-size": o,
|
|
16
|
+
"data-tone": s,
|
|
17
|
+
"data-variant": c
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
export { i as StatusDot };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { JSX, ReactNode } from "react";
|
|
2
|
+
import type { BoxProps } from "../Box";
|
|
3
|
+
/**
|
|
4
|
+
* Props for `Switch`: its own props plus every native input prop. `className` and `style` go to the wrapping
|
|
5
|
+
* label; `ref` and every other prop go to the input.
|
|
6
|
+
*/
|
|
7
|
+
export interface SwitchProps extends Omit<BoxProps<"input">, "as" | "children" | "dangerouslySetInnerHTML" | "role" | "type"> {
|
|
8
|
+
/**
|
|
9
|
+
* Label shown beside the track, which names the switch. Without it, give the switch an accessible name, for
|
|
10
|
+
* example with `aria-label` or the `label` of the `Field` around it. It is inline content, as a `label` holds: a child
|
|
11
|
+
* laid out as a block drops below the track.
|
|
12
|
+
*/
|
|
13
|
+
children?: ReactNode;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Themed on/off switch: a native checkbox with the `switch` role, inside the label that names it. Use it for a
|
|
17
|
+
* setting that takes effect at once, and `Checkbox` for a choice submitted with a form. When it is required it
|
|
18
|
+
* shows an asterisk after its label. Inside a `Field` it takes its description, error, and required and disabled
|
|
19
|
+
* state from the field; give it either children or the field's `label`, not both.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* <Switch defaultChecked={true} name="notifications">Email notifications</Switch>
|
|
23
|
+
*/
|
|
24
|
+
export declare function Switch(props: SwitchProps): JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ChoiceControl as e } from "../ChoiceControl/ChoiceControl.js";
|
|
2
|
+
import { c as t } from "react/compiler-runtime";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
// src/components/Switch/Switch.tsx
|
|
5
|
+
function r(r) {
|
|
6
|
+
let i = t(2), a;
|
|
7
|
+
return i[0] === r ? a = i[1] : (a = /* @__PURE__ */ n(e, {
|
|
8
|
+
...r,
|
|
9
|
+
kind: "switch"
|
|
10
|
+
}), i[0] = r, i[1] = a), a;
|
|
11
|
+
}
|
|
12
|
+
export { r as Switch };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.sui-switcher-zWFpy{gap:var(--sui-switcher-gap);flex-wrap:wrap;display:flex}.sui-switcher-zWFpy:where(ul,ol){margin:0;padding:0;list-style:none}.sui-switcher-zWFpy>*{flex-grow:1;flex-basis:calc((var(--sui-switcher-threshold) - 100%) * 999)}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { JSX } from "react";
|
|
2
|
+
import type { Space } from "../../layout";
|
|
3
|
+
import type { BoxElement, BoxProps } from "../Box";
|
|
4
|
+
interface SwitcherOwnProps {
|
|
5
|
+
/**
|
|
6
|
+
* Space between items. Defaults to `4`.
|
|
7
|
+
*/
|
|
8
|
+
gap?: Space;
|
|
9
|
+
/**
|
|
10
|
+
* Container width below which the items stack, as a CSS length. Defaults to `30rem`.
|
|
11
|
+
*/
|
|
12
|
+
threshold?: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Props for `Switcher`: its own props plus every prop supported by the element given in `as`
|
|
16
|
+
*/
|
|
17
|
+
export type SwitcherProps<E extends BoxElement = "div"> = SwitcherOwnProps & Omit<BoxProps<E>, keyof SwitcherOwnProps>;
|
|
18
|
+
/**
|
|
19
|
+
* Equal-width items in a row that all stack at once when the container is narrower than the
|
|
20
|
+
* threshold. Wrap a nested Switcher in an element, because a Switcher that is itself an item shadows this
|
|
21
|
+
* one's custom properties.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* <Switcher as="nav" threshold="36rem" aria-label="More posts">...</Switcher>
|
|
25
|
+
*/
|
|
26
|
+
export declare function Switcher<E extends BoxElement = "div">({ as, className, gap, threshold, ...rest }: SwitcherProps<E>): JSX.Element;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { listRole as e } from "../../layout/listRole.js";
|
|
2
|
+
import { spaceValue as t } from "../../layout/spaceValue.js";
|
|
3
|
+
import { withCustomProperties as n } from "../../layout/withCustomProperties.js";
|
|
4
|
+
import { Box as r } from "../Box/Box.js";
|
|
5
|
+
import i from "./Switcher.module.js";
|
|
6
|
+
import { clsx as a } from "clsx";
|
|
7
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
8
|
+
// src/components/Switcher/Switcher.tsx
|
|
9
|
+
function s({ as: s, className: c, gap: l = 4, threshold: u = "30rem", ...d }) {
|
|
10
|
+
let { role: f, style: p, ...m } = d, h = s ?? "div";
|
|
11
|
+
return /* @__PURE__ */ o(r, {
|
|
12
|
+
...m,
|
|
13
|
+
as: h,
|
|
14
|
+
className: a(i.switcher, c),
|
|
15
|
+
role: e(h, f),
|
|
16
|
+
style: n({
|
|
17
|
+
"--sui-switcher-gap": t(l),
|
|
18
|
+
"--sui-switcher-threshold": u
|
|
19
|
+
}, p)
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
export { s as Switcher };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { JSX } from "react";
|
|
2
|
+
import type { BoxProps } from "../Box";
|
|
3
|
+
/**
|
|
4
|
+
* Props for `Tab`: its own props plus every native button prop except `hidden`, `inert` and those the tab pattern sets
|
|
5
|
+
*/
|
|
6
|
+
export interface TabProps extends Omit<BoxProps<"button">, "aria-controls" | "aria-disabled" | "aria-selected" | "as" | "disabled" | "hidden" | "id" | "inert" | "role" | "tabIndex" | "type" | "value"> {
|
|
7
|
+
/**
|
|
8
|
+
* Whether the tab cannot be selected. A disabled tab stays reachable with the arrow keys, so its label is read, but
|
|
9
|
+
* focus and clicks never select it. Defaults to `false`.
|
|
10
|
+
*/
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* The value this tab stands for, matching one `TabPanel`'s `value`
|
|
14
|
+
*/
|
|
15
|
+
value: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* One tab in a `TabList`. The arrow keys move between tabs, wrapping at both ends, and Home and End go to the first
|
|
19
|
+
* and last. Your `onBlur`, `onClick`, `onFocus`, `onKeyDown`, `onPointerCancel` and `onPointerDown` run first;
|
|
20
|
+
* preventing a click's or key's default stops the tab handling it. A disabled tab ignores clicks, so your `onClick`
|
|
21
|
+
* does not run for it. To leave a tab out, do not render it: a hidden selected tab would leave the list no tab stop.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* <Tab value="issues">Issues</Tab>
|
|
25
|
+
*/
|
|
26
|
+
export declare function Tab({ className, disabled, onBlur, onClick, onFocus, onKeyDown, onPointerCancel, onPointerDown, value, ...rest }: TabProps): JSX.Element;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { targetIndexForKey as e } from "../../collections/targetIndexForKey.js";
|
|
2
|
+
import { Box as t } from "../Box/Box.js";
|
|
3
|
+
import { panelId as n, tabId as r } from "./tabIds.js";
|
|
4
|
+
import i from "./Tabs.module.js";
|
|
5
|
+
import { useTabsContext as a } from "./useTabsContext.js";
|
|
6
|
+
import { clsx as o } from "clsx";
|
|
7
|
+
import { useRef as s } from "react";
|
|
8
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
9
|
+
// src/components/Tabs/Tab.tsx
|
|
10
|
+
function l({ className: l, disabled: u = !1, onBlur: d, onClick: f, onFocus: p, onKeyDown: m, onPointerCancel: h, onPointerDown: g, value: _, ...v }) {
|
|
11
|
+
let y = a("Tab"), b = y.selectedValue === _, x = s(!1);
|
|
12
|
+
function S(e) {
|
|
13
|
+
d?.(e), x.current = !1;
|
|
14
|
+
}
|
|
15
|
+
function C(e) {
|
|
16
|
+
x.current = !1, u || (f?.(e), e.defaultPrevented || y.select(_));
|
|
17
|
+
}
|
|
18
|
+
function w(e) {
|
|
19
|
+
p?.(e), y.activation === "automatic" && !u && !x.current && y.select(_);
|
|
20
|
+
}
|
|
21
|
+
function T(t) {
|
|
22
|
+
if (m?.(t), t.defaultPrevented || t.altKey || t.ctrlKey || t.metaKey) return;
|
|
23
|
+
let n = Array.from(t.currentTarget.closest("[role=\"tablist\"]")?.querySelectorAll("[role=\"tab\"]") ?? []).filter((e) => e.closest("[hidden], [inert]") === null), r = e({
|
|
24
|
+
count: n.length,
|
|
25
|
+
currentIndex: n.indexOf(t.currentTarget),
|
|
26
|
+
direction: t.currentTarget.matches(":dir(rtl)") ? "rtl" : "ltr",
|
|
27
|
+
key: t.key,
|
|
28
|
+
orientation: y.orientation,
|
|
29
|
+
wraps: !0
|
|
30
|
+
});
|
|
31
|
+
r !== null && (t.preventDefault(), n[r].focus());
|
|
32
|
+
}
|
|
33
|
+
function E(e) {
|
|
34
|
+
h?.(e), x.current = !1;
|
|
35
|
+
}
|
|
36
|
+
function D(e) {
|
|
37
|
+
g?.(e), x.current = !0;
|
|
38
|
+
}
|
|
39
|
+
return /* @__PURE__ */ c(t, {
|
|
40
|
+
...v,
|
|
41
|
+
as: "button",
|
|
42
|
+
className: o(i.tab, l),
|
|
43
|
+
id: r(y.baseId, _),
|
|
44
|
+
onBlur: S,
|
|
45
|
+
onClick: C,
|
|
46
|
+
onFocus: w,
|
|
47
|
+
onKeyDown: T,
|
|
48
|
+
onPointerCancel: E,
|
|
49
|
+
onPointerDown: D,
|
|
50
|
+
role: "tab",
|
|
51
|
+
tabIndex: b ? 0 : -1,
|
|
52
|
+
type: "button",
|
|
53
|
+
"aria-controls": n(y.baseId, _),
|
|
54
|
+
"aria-disabled": u ? !0 : void 0,
|
|
55
|
+
"aria-selected": b,
|
|
56
|
+
"data-size": y.size,
|
|
57
|
+
"data-variant": y.variant
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
export { l as Tab };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { JSX } from "react";
|
|
2
|
+
import type { RequiredAccessibleName } from "../../accessibility";
|
|
3
|
+
import type { BoxProps } from "../Box";
|
|
4
|
+
/**
|
|
5
|
+
* Props for `TabList`: a required `aria-label` or `aria-labelledby` and every other `div` prop except `role`
|
|
6
|
+
*/
|
|
7
|
+
export type TabListProps = RequiredAccessibleName & Omit<BoxProps<"div">, "aria-label" | "aria-labelledby" | "aria-orientation" | "as" | "role">;
|
|
8
|
+
/**
|
|
9
|
+
* The row or column of `Tab`s inside `Tabs`. Name it with `aria-label` or `aria-labelledby`.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* <TabList aria-label="Repository">
|
|
13
|
+
* <Tab value="code">Code</Tab>
|
|
14
|
+
* </TabList>
|
|
15
|
+
*/
|
|
16
|
+
export declare function TabList({ className, ...rest }: TabListProps): JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Box as e } from "../Box/Box.js";
|
|
2
|
+
import t from "./Tabs.module.js";
|
|
3
|
+
import { useTabsContext as n } from "./useTabsContext.js";
|
|
4
|
+
import { clsx as r } from "clsx";
|
|
5
|
+
import { c as i } from "react/compiler-runtime";
|
|
6
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
7
|
+
// src/components/Tabs/TabList.tsx
|
|
8
|
+
function o(o) {
|
|
9
|
+
let s = i(10), c, l;
|
|
10
|
+
s[0] === o ? (c = s[1], l = s[2]) : ({className: c, ...l} = o, s[0] = o, s[1] = c, s[2] = l);
|
|
11
|
+
let u = n("TabList"), d;
|
|
12
|
+
s[3] === c ? d = s[4] : (d = r(t.tabList, c), s[3] = c, s[4] = d);
|
|
13
|
+
let f = u.orientation === "vertical" ? "vertical" : void 0, p;
|
|
14
|
+
return s[5] !== l || s[6] !== d || s[7] !== f || s[8] !== u.variant ? (p = /* @__PURE__ */ a(e, {
|
|
15
|
+
...l,
|
|
16
|
+
className: d,
|
|
17
|
+
role: "tablist",
|
|
18
|
+
"aria-orientation": f,
|
|
19
|
+
"data-variant": u.variant
|
|
20
|
+
}), s[5] = l, s[6] = d, s[7] = f, s[8] = u.variant, s[9] = p) : p = s[9], p;
|
|
21
|
+
}
|
|
22
|
+
export { o as TabList };
|