@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,48 @@
|
|
|
1
|
+
import { Box as e } from "../Box/Box.js";
|
|
2
|
+
import { Icon as t } from "./Icon.js";
|
|
3
|
+
import { c as n } from "react/compiler-runtime";
|
|
4
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
// src/components/Icon/PaletteIcon.tsx
|
|
6
|
+
function a(a) {
|
|
7
|
+
let o = n(7), s, c, l, u, d;
|
|
8
|
+
o[0] === Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ r(e, {
|
|
9
|
+
as: "path",
|
|
10
|
+
d: "M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z"
|
|
11
|
+
}), c = /* @__PURE__ */ r(e, {
|
|
12
|
+
as: "circle",
|
|
13
|
+
cx: "13.5",
|
|
14
|
+
cy: "6.5",
|
|
15
|
+
fill: "currentColor",
|
|
16
|
+
r: ".5"
|
|
17
|
+
}), l = /* @__PURE__ */ r(e, {
|
|
18
|
+
as: "circle",
|
|
19
|
+
cx: "17.5",
|
|
20
|
+
cy: "10.5",
|
|
21
|
+
fill: "currentColor",
|
|
22
|
+
r: ".5"
|
|
23
|
+
}), u = /* @__PURE__ */ r(e, {
|
|
24
|
+
as: "circle",
|
|
25
|
+
cx: "6.5",
|
|
26
|
+
cy: "12.5",
|
|
27
|
+
fill: "currentColor",
|
|
28
|
+
r: ".5"
|
|
29
|
+
}), d = /* @__PURE__ */ r(e, {
|
|
30
|
+
as: "circle",
|
|
31
|
+
cx: "8.5",
|
|
32
|
+
cy: "7.5",
|
|
33
|
+
fill: "currentColor",
|
|
34
|
+
r: ".5"
|
|
35
|
+
}), o[0] = s, o[1] = c, o[2] = l, o[3] = u, o[4] = d) : (s = o[0], c = o[1], l = o[2], u = o[3], d = o[4]);
|
|
36
|
+
let f;
|
|
37
|
+
return o[5] === a ? f = o[6] : (f = /* @__PURE__ */ i(t, {
|
|
38
|
+
...a,
|
|
39
|
+
children: [
|
|
40
|
+
s,
|
|
41
|
+
c,
|
|
42
|
+
l,
|
|
43
|
+
u,
|
|
44
|
+
d
|
|
45
|
+
]
|
|
46
|
+
}), o[5] = a, o[6] = f), f;
|
|
47
|
+
}
|
|
48
|
+
export { a as PaletteIcon };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { JSX } from "react";
|
|
2
|
+
import type { IconProps } from "./Icon";
|
|
3
|
+
/**
|
|
4
|
+
* Two arrows chasing round a circle, for reloading or syncing. To show that a refresh is running, make the
|
|
5
|
+
* `IconButton` holding it `busy`, which shows a spinner in its place. It is hidden from assistive technology unless it
|
|
6
|
+
* has a `label`, so inside a button, name the button instead.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* <IconButton busy={isRefreshing} label="Refresh" onClick={refresh}>
|
|
10
|
+
* <RefreshIcon />
|
|
11
|
+
* </IconButton>
|
|
12
|
+
*/
|
|
13
|
+
export declare function RefreshIcon(props: IconProps): JSX.Element;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Box as e } from "../Box/Box.js";
|
|
2
|
+
import { Icon as t } from "./Icon.js";
|
|
3
|
+
import { c as n } from "react/compiler-runtime";
|
|
4
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
// src/components/Icon/RefreshIcon.tsx
|
|
6
|
+
function a(a) {
|
|
7
|
+
let o = n(6), s, c, l, u;
|
|
8
|
+
o[0] === Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ r(e, {
|
|
9
|
+
as: "path",
|
|
10
|
+
d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"
|
|
11
|
+
}), c = /* @__PURE__ */ r(e, {
|
|
12
|
+
as: "path",
|
|
13
|
+
d: "M21 3v5h-5"
|
|
14
|
+
}), l = /* @__PURE__ */ r(e, {
|
|
15
|
+
as: "path",
|
|
16
|
+
d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"
|
|
17
|
+
}), u = /* @__PURE__ */ r(e, {
|
|
18
|
+
as: "path",
|
|
19
|
+
d: "M8 16H3v5"
|
|
20
|
+
}), o[0] = s, o[1] = c, o[2] = l, o[3] = u) : (s = o[0], c = o[1], l = o[2], u = o[3]);
|
|
21
|
+
let d;
|
|
22
|
+
return o[4] === a ? d = o[5] : (d = /* @__PURE__ */ i(t, {
|
|
23
|
+
...a,
|
|
24
|
+
children: [
|
|
25
|
+
s,
|
|
26
|
+
c,
|
|
27
|
+
l,
|
|
28
|
+
u
|
|
29
|
+
]
|
|
30
|
+
}), o[4] = a, o[5] = d), d;
|
|
31
|
+
}
|
|
32
|
+
export { a as RefreshIcon };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { JSX } from "react";
|
|
2
|
+
import type { IconProps } from "./Icon";
|
|
3
|
+
/**
|
|
4
|
+
* A minus sign, for removing something, such as an item from a list, or taking one away from a count. It is hidden from assistive technology unless it has a `label`, so inside a button, name the button instead.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* <IconButton label="Remove item" onClick={removeItem}>
|
|
8
|
+
* <RemoveIcon />
|
|
9
|
+
* </IconButton>
|
|
10
|
+
*/
|
|
11
|
+
export declare function RemoveIcon(props: IconProps): JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Box as e } from "../Box/Box.js";
|
|
2
|
+
import { Icon as t } from "./Icon.js";
|
|
3
|
+
import { c as n } from "react/compiler-runtime";
|
|
4
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
+
// src/components/Icon/RemoveIcon.tsx
|
|
6
|
+
function i(i) {
|
|
7
|
+
let a = n(3), o;
|
|
8
|
+
a[0] === Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ r(e, {
|
|
9
|
+
as: "path",
|
|
10
|
+
d: "M5 12h14"
|
|
11
|
+
}), a[0] = o) : o = a[0];
|
|
12
|
+
let s;
|
|
13
|
+
return a[1] === i ? s = a[2] : (s = /* @__PURE__ */ r(t, {
|
|
14
|
+
...i,
|
|
15
|
+
children: o
|
|
16
|
+
}), a[1] = i, a[2] = s), s;
|
|
17
|
+
}
|
|
18
|
+
export { i as RemoveIcon };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { JSX } from "react";
|
|
2
|
+
import type { IconProps } from "./Icon";
|
|
3
|
+
/**
|
|
4
|
+
* A paper plane pointing along the line, for sending a message. It points the way the text runs, so it is mirrored in right-to-left text. It is hidden from assistive technology unless it has a `label`, so inside a button, name the button instead.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* <IconButton label="Send" type="submit">
|
|
8
|
+
* <SendIcon />
|
|
9
|
+
* </IconButton>
|
|
10
|
+
*/
|
|
11
|
+
export declare function SendIcon(props: IconProps): JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Box as e } from "../Box/Box.js";
|
|
2
|
+
import { Icon as t } from "./Icon.js";
|
|
3
|
+
import { c as n } from "react/compiler-runtime";
|
|
4
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
// src/components/Icon/SendIcon.tsx
|
|
6
|
+
function a(a) {
|
|
7
|
+
let o = n(4), s, c;
|
|
8
|
+
o[0] === Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ r(e, {
|
|
9
|
+
as: "path",
|
|
10
|
+
d: "M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z"
|
|
11
|
+
}), c = /* @__PURE__ */ r(e, {
|
|
12
|
+
as: "path",
|
|
13
|
+
d: "M6 12h16"
|
|
14
|
+
}), o[0] = s, o[1] = c) : (s = o[0], c = o[1]);
|
|
15
|
+
let l;
|
|
16
|
+
return o[2] === a ? l = o[3] : (l = /* @__PURE__ */ i(t, {
|
|
17
|
+
...a,
|
|
18
|
+
mirrored: !0,
|
|
19
|
+
children: [s, c]
|
|
20
|
+
}), o[2] = a, o[3] = l), l;
|
|
21
|
+
}
|
|
22
|
+
export { a as SendIcon };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export { AddIcon } from "./AddIcon";
|
|
2
|
+
export { CheckIcon } from "./CheckIcon";
|
|
3
|
+
export { ChevronDownIcon } from "./ChevronDownIcon";
|
|
4
|
+
export { ChevronRightIcon } from "./ChevronRightIcon";
|
|
5
|
+
export { CloseIcon } from "./CloseIcon";
|
|
6
|
+
export { ColorModeIcon } from "./ColorModeIcon";
|
|
7
|
+
export { DeleteIcon } from "./DeleteIcon";
|
|
8
|
+
export type { IconProps } from "./Icon";
|
|
9
|
+
export { InfoIcon } from "./InfoIcon";
|
|
10
|
+
export { MenuIcon } from "./MenuIcon";
|
|
11
|
+
export { MoreHorizontalIcon } from "./MoreHorizontalIcon";
|
|
12
|
+
export { MoreVerticalIcon } from "./MoreVerticalIcon";
|
|
13
|
+
export { PaletteIcon } from "./PaletteIcon";
|
|
14
|
+
export { RefreshIcon } from "./RefreshIcon";
|
|
15
|
+
export { RemoveIcon } from "./RemoveIcon";
|
|
16
|
+
export { SendIcon } from "./SendIcon";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.sui-iconButton-JAF-a[data-size]{padding:var(--sui-button-padding-y)}.sui-icon-2DDWy{block-size:1.25em;inline-size:1.25em;display:inline-flex}.sui-icon-2DDWy>svg{block-size:100%;inline-size:100%}.sui-shortcut-LCwpq{margin-inline-start:var(--sui-space-2,.5rem)}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { JSX, ReactNode } from "react";
|
|
2
|
+
import type { OverlayPlacement } from "../../overlays";
|
|
3
|
+
import type { ButtonProps } from "../Button";
|
|
4
|
+
/**
|
|
5
|
+
* Props for `IconButton`: its own props plus `Button`'s, except the name and children a label replaces
|
|
6
|
+
*/
|
|
7
|
+
export interface IconButtonProps extends Omit<ButtonProps, "aria-label" | "aria-labelledby" | "children"> {
|
|
8
|
+
/**
|
|
9
|
+
* Not accepted: `label` names the button
|
|
10
|
+
*/
|
|
11
|
+
"aria-label"?: never;
|
|
12
|
+
/**
|
|
13
|
+
* Not accepted: the tooltip names the button
|
|
14
|
+
*/
|
|
15
|
+
"aria-labelledby"?: never;
|
|
16
|
+
/**
|
|
17
|
+
* The icon, hidden from assistive technology and sized to 1.25em
|
|
18
|
+
*/
|
|
19
|
+
children: ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* What the button does. It is the tooltip's text and the button's accessible name.
|
|
22
|
+
*/
|
|
23
|
+
label: string;
|
|
24
|
+
/**
|
|
25
|
+
* Side of the button the tooltip opens on. Defaults to `top`.
|
|
26
|
+
*/
|
|
27
|
+
placement?: OverlayPlacement;
|
|
28
|
+
/**
|
|
29
|
+
* Keyboard shortcut shown after the label in the tooltip, such as "⌘R". It is not part of the name: add
|
|
30
|
+
* `aria-keyshortcuts` (for example `"Meta+R"`) so screen readers announce it.
|
|
31
|
+
*/
|
|
32
|
+
shortcut?: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* A square button showing only an icon, named by a tooltip that shows on hover and keyboard focus. Use a `Button` with
|
|
36
|
+
* text when the label fits. A native `disabled` button cannot take focus, so keyboard users never see its tooltip:
|
|
37
|
+
* prefer `aria-disabled` when they need it. With `aria-disabled` the button still calls `onClick`, so ignore presses
|
|
38
|
+
* there and show the state yourself.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* <IconButton busy={isSyncing} label="Refresh" onClick={refresh} shortcut="⌘R" aria-keyshortcuts="Meta+R">
|
|
42
|
+
* <RefreshIcon />
|
|
43
|
+
* </IconButton>
|
|
44
|
+
*/
|
|
45
|
+
export declare function IconButton({ children, className, label, placement, shortcut, variant, ...rest }: IconButtonProps): JSX.Element;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Box as e } from "../Box/Box.js";
|
|
2
|
+
import { Button as t } from "../Button/Button.js";
|
|
3
|
+
import { Kbd as n } from "../Kbd/Kbd.js";
|
|
4
|
+
import { Tooltip as r } from "../Tooltip/Tooltip.js";
|
|
5
|
+
import { useTooltip as i } from "../Tooltip/useTooltip.js";
|
|
6
|
+
import a from "./IconButton.module.js";
|
|
7
|
+
import { clsx as o } from "clsx";
|
|
8
|
+
import { useId as s } from "react";
|
|
9
|
+
import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
10
|
+
// src/components/IconButton/IconButton.tsx
|
|
11
|
+
function d({ children: d, className: f, label: p, placement: m = "top", shortcut: h, variant: g = "ghost", ..._ }) {
|
|
12
|
+
let v = i({
|
|
13
|
+
placement: m,
|
|
14
|
+
relationship: "label"
|
|
15
|
+
}), y = s(), b = h !== void 0 && h !== "";
|
|
16
|
+
return /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l(t, {
|
|
17
|
+
...v.getTriggerProps(_),
|
|
18
|
+
className: o(a.iconButton, f),
|
|
19
|
+
variant: g,
|
|
20
|
+
"aria-labelledby": y,
|
|
21
|
+
children: /* @__PURE__ */ l(e, {
|
|
22
|
+
as: "span",
|
|
23
|
+
className: a.icon,
|
|
24
|
+
"aria-hidden": !0,
|
|
25
|
+
children: d
|
|
26
|
+
})
|
|
27
|
+
}), /* @__PURE__ */ u(r, {
|
|
28
|
+
...v.getOverlayProps(),
|
|
29
|
+
children: [/* @__PURE__ */ l(e, {
|
|
30
|
+
as: "span",
|
|
31
|
+
id: y,
|
|
32
|
+
children: p
|
|
33
|
+
}), b && /* @__PURE__ */ l(n, {
|
|
34
|
+
className: a.shortcut,
|
|
35
|
+
"aria-hidden": !0,
|
|
36
|
+
children: h
|
|
37
|
+
})]
|
|
38
|
+
})] });
|
|
39
|
+
}
|
|
40
|
+
export { d as IconButton };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import './IconButton.css';// src/components/IconButton/IconButton.module.css
|
|
2
|
+
var e = "sui-iconButton-JAF-a", t = "sui-icon-2DDWy", n = "sui-shortcut-LCwpq", r = {
|
|
3
|
+
iconButton: e,
|
|
4
|
+
icon: t,
|
|
5
|
+
shortcut: n
|
|
6
|
+
};
|
|
7
|
+
export { r as default, t as icon, e as iconButton, n as shortcut };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.sui-kbd-jgbYx{padding:0 var(--sui-space-1,.25rem);border:var(--sui-border-width,1px) solid var(--sui-color-border,#d1d5db);border-block-end-width:calc(var(--sui-border-width,1px) * 2);border-radius:var(--sui-radius-sm,2px);background-color:var(--sui-color-sunken,#f3f4f6);color:var(--sui-color-text,#111827);font-family:var(--sui-font-mono,ui-monospace, SFMono-Regular, Menlo, monospace);white-space:nowrap;font-size:.875em}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { JSX } from "react";
|
|
2
|
+
import type { BoxProps } from "../Box";
|
|
3
|
+
/**
|
|
4
|
+
* Props for `Kbd`: every native `kbd` prop
|
|
5
|
+
*/
|
|
6
|
+
export type KbdProps = Omit<BoxProps<"kbd">, "as">;
|
|
7
|
+
/**
|
|
8
|
+
* A key on the keyboard, drawn as a small keycap. Write a combination as one `Kbd` per key.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* <Text as="p">Press <Kbd>⌘</Kbd> <Kbd>K</Kbd> to search.</Text>
|
|
12
|
+
*/
|
|
13
|
+
export declare function Kbd({ className, ...rest }: KbdProps): JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Box as e } from "../Box/Box.js";
|
|
2
|
+
import t from "./Kbd.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/Kbd/Kbd.tsx
|
|
7
|
+
function a(a) {
|
|
8
|
+
let o = r(8), s, c;
|
|
9
|
+
o[0] === a ? (s = o[1], c = o[2]) : ({className: s, ...c} = a, o[0] = a, o[1] = s, o[2] = c);
|
|
10
|
+
let l;
|
|
11
|
+
o[3] === s ? l = o[4] : (l = n(t.kbd, s), o[3] = s, o[4] = l);
|
|
12
|
+
let u;
|
|
13
|
+
return o[5] !== c || o[6] !== l ? (u = /* @__PURE__ */ i(e, {
|
|
14
|
+
...c,
|
|
15
|
+
as: "kbd",
|
|
16
|
+
className: l
|
|
17
|
+
}), o[5] = c, o[6] = l, o[7] = u) : u = o[7], u;
|
|
18
|
+
}
|
|
19
|
+
export { a as Kbd };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.sui-link-Ly-e3{box-sizing:border-box;color:var(--sui-link-color,var(--sui-color-primary,#2563eb));font:inherit;text-decoration-line:underline;text-decoration-thickness:var(--sui-border-width,1px);text-underline-offset:.2em}.sui-link-Ly-e3[data-tone=inherit]{color:inherit}.sui-link-Ly-e3[data-underline=always]:hover{text-decoration-thickness:calc(var(--sui-border-width,1px) * 2)}.sui-link-Ly-e3[data-underline=hover]{text-decoration-line:none}.sui-link-Ly-e3[data-underline=hover]:hover,.sui-link-Ly-e3[data-underline=hover]:focus-visible{text-decoration-line:underline}.sui-link-Ly-e3[aria-current]:not([aria-current=false]){font-weight:var(--sui-font-weight-bold,700)}.sui-link-Ly-e3:focus-visible{outline:var(--sui-focus-ring-width,2px) solid var(--sui-color-focus-ring,#3b82f6);outline-offset:2px}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef, JSX, JSXElementConstructor } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* What `Link` can render: an anchor, or a component that renders one, such as a router's link
|
|
4
|
+
*/
|
|
5
|
+
export type LinkElement = "a" | JSXElementConstructor<never>;
|
|
6
|
+
/**
|
|
7
|
+
* Link colours: the theme's link colour, or `inherit` to take the surrounding text colour
|
|
8
|
+
*/
|
|
9
|
+
export type LinkTone = "inherit" | "primary";
|
|
10
|
+
/**
|
|
11
|
+
* When a link's underline shows. `hover` also shows it on keyboard focus, and is for navigation:
|
|
12
|
+
* in running text a link needs its underline to be told apart from the text around it.
|
|
13
|
+
*/
|
|
14
|
+
export type LinkUnderline = "always" | "hover";
|
|
15
|
+
interface LinkOwnProps {
|
|
16
|
+
/**
|
|
17
|
+
* Link colour. Defaults to `primary`.
|
|
18
|
+
*/
|
|
19
|
+
tone?: LinkTone;
|
|
20
|
+
/**
|
|
21
|
+
* When the underline shows. Defaults to `always`.
|
|
22
|
+
*/
|
|
23
|
+
underline?: LinkUnderline;
|
|
24
|
+
}
|
|
25
|
+
interface LinkElementOwnProps<E extends LinkElement> {
|
|
26
|
+
/**
|
|
27
|
+
* What to render: `a`, or a component that renders an anchor. Defaults to `a`.
|
|
28
|
+
*/
|
|
29
|
+
as?: E;
|
|
30
|
+
/**
|
|
31
|
+
* Class names merged with the component's base class.
|
|
32
|
+
*/
|
|
33
|
+
className?: string;
|
|
34
|
+
}
|
|
35
|
+
type LinkElementProps<E extends LinkElement> = E extends JSXElementConstructor<infer Props> ? Props : ComponentPropsWithRef<"a">;
|
|
36
|
+
type OmitFromEach<Props, Name extends PropertyKey> = Props extends unknown ? Omit<Props, Name> : never;
|
|
37
|
+
/**
|
|
38
|
+
* Props for `Link`: its own props plus every prop of the anchor or component given in `as`
|
|
39
|
+
*/
|
|
40
|
+
export type LinkProps<E extends LinkElement = "a"> = LinkOwnProps & LinkElementOwnProps<E> & OmitFromEach<LinkElementProps<E>, keyof LinkOwnProps | keyof LinkElementOwnProps<E>>;
|
|
41
|
+
/**
|
|
42
|
+
* Themed link. Renders an anchor, or the component given in `as`, such as a router's link. That
|
|
43
|
+
* component must pass `className` and the `data-*` attributes it is given on to its anchor.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* <Link href="/docs">Documentation</Link>
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* <Link as={RouterLink} to="/settings" underline="hover">Settings</Link>
|
|
50
|
+
*/
|
|
51
|
+
export declare function Link<E extends LinkElement = "a">({ as, className, tone, underline, ...rest }: LinkProps<E>): JSX.Element;
|
|
52
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Box as e } from "../Box/Box.js";
|
|
2
|
+
import t from "./Link.module.js";
|
|
3
|
+
import { clsx as n } from "clsx";
|
|
4
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
+
// src/components/Link/Link.tsx
|
|
6
|
+
function i({ as: i, className: a, tone: o = "primary", underline: s = "always", ...c }) {
|
|
7
|
+
let l = {
|
|
8
|
+
className: n(t.link, a),
|
|
9
|
+
"data-tone": o,
|
|
10
|
+
"data-underline": s
|
|
11
|
+
};
|
|
12
|
+
if (i === void 0 || i === "a") {
|
|
13
|
+
let { children: t, ...n } = c;
|
|
14
|
+
return /* @__PURE__ */ r(e, {
|
|
15
|
+
...n,
|
|
16
|
+
...l,
|
|
17
|
+
as: "a",
|
|
18
|
+
children: t
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
return /* @__PURE__ */ r(i, {
|
|
22
|
+
...c,
|
|
23
|
+
...l
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
export { i as Link };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.sui-listbox-lSHQo{padding:calc(var(--sui-focus-ring-width,2px) + 2px);border-radius:var(--sui-radius-md,4px);font-family:var(--sui-font-body,system-ui, sans-serif);flex-direction:column;gap:2px;display:flex}.sui-listbox-lSHQo:focus-visible{outline:var(--sui-focus-ring-width,2px) solid var(--sui-color-focus-ring,#3b82f6);outline-offset:calc(var(--sui-focus-ring-width,2px) * -1)}.sui-option-sCJLx{padding:var(--sui-space-2,.5rem);border-radius:var(--sui-radius-md,4px);color:var(--sui-color-text,#111827);cursor:default;scroll-margin-block:calc(var(--sui-focus-ring-width,2px) + 2px);-webkit-user-select:none;user-select:none;padding-inline-start:calc(var(--sui-space-2,.5rem) + var(--sui-border-width,1px) * 2);transition:background-color .12s,color .12s;position:relative}.sui-option-sCJLx:before{inset-block:var(--sui-space-1,.25rem);inline-size:calc(var(--sui-border-width,1px) * 2);border-radius:var(--sui-radius-full,9999px);content:"";background-color:#0000;position:absolute;inset-inline-start:0}.sui-option-sCJLx:hover:not([aria-selected=true],[aria-disabled=true]){background-color:var(--sui-color-secondary-subtle,#f3f4f6)}.sui-option-sCJLx[aria-selected=true]{--sui-color-text-muted:currentColor;--sui-status-dot-color:currentColor;background-color:var(--sui-listbox-inactive-selection,var(--sui-color-primary-subtle,#edf5ff));color:var(--sui-listbox-on-inactive-selection,var(--sui-color-primary,#2563eb))}.sui-option-sCJLx[aria-selected=true]:before{background-color:var(--sui-listbox-inactive-selection-bar,var(--sui-color-primary,#2563eb))}.sui-listbox-lSHQo:focus .sui-option-sCJLx[aria-selected=true]{background-color:var(--sui-listbox-selection,var(--sui-color-primary,#2563eb));color:var(--sui-listbox-on-selection,var(--sui-color-on-primary,#fff))}.sui-listbox-lSHQo:focus-visible .sui-option-sCJLx[data-active]:not([aria-selected=true]){outline:var(--sui-focus-ring-width,2px) solid var(--sui-color-focus-ring,#3b82f6);outline-offset:calc(var(--sui-focus-ring-width,2px) * -1)}.sui-option-sCJLx[aria-disabled=true]{cursor:not-allowed}.sui-option-sCJLx[aria-disabled=true]:not([aria-selected=true]){color:color-mix(in srgb, var(--sui-color-text,#111827) 50%, transparent)}:where(.sui-option-sCJLx[aria-disabled=true]:not([aria-selected=true]))>*{color:var(--sui-color-text,#111827);opacity:.5}@media (forced-colors:active){.sui-option-sCJLx[aria-selected=true],.sui-listbox-lSHQo:focus .sui-option-sCJLx[aria-selected=true]{color:highlighttext;forced-color-adjust:none;background-color:highlight}.sui-option-sCJLx[aria-selected=true]:before{background-color:highlight}.sui-option-sCJLx[aria-disabled=true]:not([aria-selected=true]),.sui-option-sCJLx[aria-disabled=true]:not([aria-selected=true]) *{color:graytext}:where(.sui-option-sCJLx[aria-disabled=true]:not([aria-selected=true]))>*{opacity:1}}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { JSX, ReactNode } from "react";
|
|
2
|
+
import type { RequiredAccessibleName } from "../../accessibility";
|
|
3
|
+
import type { BoxProps } from "../Box";
|
|
4
|
+
interface ListboxOwnProps {
|
|
5
|
+
/**
|
|
6
|
+
* The `ListboxOption`s
|
|
7
|
+
*/
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* The option selected at first, which leaves the listbox uncontrolled. Defaults to none.
|
|
11
|
+
*/
|
|
12
|
+
defaultValue?: string | null;
|
|
13
|
+
/**
|
|
14
|
+
* Called with an option's value when Enter or a double-click acts on it, such as to open it
|
|
15
|
+
*/
|
|
16
|
+
onAction?: (value: string) => void;
|
|
17
|
+
/**
|
|
18
|
+
* Called with the value of the option the user selects
|
|
19
|
+
*/
|
|
20
|
+
onValueChange?: (value: string) => void;
|
|
21
|
+
/**
|
|
22
|
+
* The selected option, or null for none, which makes the listbox controlled: update it from `onValueChange`
|
|
23
|
+
*/
|
|
24
|
+
value?: string | null;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Props for `Listbox`: its own props, a required `aria-label` or `aria-labelledby`, and every other `div` prop except
|
|
28
|
+
* those the listbox pattern sets
|
|
29
|
+
*/
|
|
30
|
+
export type ListboxProps = ListboxOwnProps & RequiredAccessibleName & Omit<BoxProps<"div">, "aria-activedescendant" | "aria-label" | "aria-labelledby" | "as" | "defaultValue" | "role" | "tabIndex" | keyof ListboxOwnProps>;
|
|
31
|
+
/**
|
|
32
|
+
* A list of options with one selected, following the WAI-ARIA listbox pattern, for a list whose selection shows
|
|
33
|
+
* details. It is one tab stop. The arrow keys, Home, End and type-ahead move the selection; Space selects the active
|
|
34
|
+
* option, or joins type-ahead text typed within the last 500ms; Enter or a double-click calls `onAction`. Name it with
|
|
35
|
+
* `aria-label` or `aria-labelledby`. Options hold no interactive content. Your `onKeyDown` runs first; preventing its
|
|
36
|
+
* default stops the listbox handling the key.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* <Listbox aria-label="Needs you" onAction={open} onValueChange={select} value={selectedId}>
|
|
40
|
+
* {pullRequests.map((pullRequest) => (
|
|
41
|
+
* <ListboxOption key={pullRequest.id} value={pullRequest.id}>{pullRequest.title}</ListboxOption>
|
|
42
|
+
* ))}
|
|
43
|
+
* </Listbox>
|
|
44
|
+
*/
|
|
45
|
+
export declare function Listbox({ className, defaultValue, onAction, onBlur, onFocus, onKeyDown, onPointerCancel, onPointerDown, onValueChange, value, ...rest }: ListboxProps): JSX.Element;
|
|
46
|
+
export {};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { optionId as e } from "../../collections/optionId.js";
|
|
2
|
+
import { Box as t } from "../Box/Box.js";
|
|
3
|
+
import n from "./Listbox.module.js";
|
|
4
|
+
import { ListboxContext as r } from "./ListboxContext.js";
|
|
5
|
+
import { useListbox as i } from "./useListbox.js";
|
|
6
|
+
import { clsx as a } from "clsx";
|
|
7
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
8
|
+
// src/components/Listbox/Listbox.tsx
|
|
9
|
+
function s({ className: s, defaultValue: c = null, onAction: l, onBlur: u, onFocus: d, onKeyDown: f, onPointerCancel: p, onPointerDown: m, onValueChange: h, value: g, ..._ }) {
|
|
10
|
+
let v = i({
|
|
11
|
+
defaultValue: c,
|
|
12
|
+
onAction: l,
|
|
13
|
+
onValueChange: h,
|
|
14
|
+
value: g
|
|
15
|
+
}), { act: y, activeValue: b, baseId: x, choose: S, claim: C, selectedValue: w, setActiveValue: T } = v;
|
|
16
|
+
function E(e) {
|
|
17
|
+
u?.(e), v.handleBlur();
|
|
18
|
+
}
|
|
19
|
+
function D(e) {
|
|
20
|
+
d?.(e), v.handleFocus(e);
|
|
21
|
+
}
|
|
22
|
+
function O(e) {
|
|
23
|
+
f?.(e), e.defaultPrevented || v.handleKeyDown(e);
|
|
24
|
+
}
|
|
25
|
+
function k(e) {
|
|
26
|
+
p?.(e), v.handlePointerCancel();
|
|
27
|
+
}
|
|
28
|
+
function A(e) {
|
|
29
|
+
m?.(e), v.handlePointerDown();
|
|
30
|
+
}
|
|
31
|
+
return /* @__PURE__ */ o(r.Provider, {
|
|
32
|
+
value: {
|
|
33
|
+
act: y,
|
|
34
|
+
activeValue: b,
|
|
35
|
+
baseId: x,
|
|
36
|
+
choose: S,
|
|
37
|
+
claim: C,
|
|
38
|
+
selectedValue: w,
|
|
39
|
+
setActiveValue: T
|
|
40
|
+
},
|
|
41
|
+
children: /* @__PURE__ */ o(t, {
|
|
42
|
+
..._,
|
|
43
|
+
className: a(n.listbox, s),
|
|
44
|
+
onBlur: E,
|
|
45
|
+
onFocus: D,
|
|
46
|
+
onKeyDown: O,
|
|
47
|
+
onPointerCancel: k,
|
|
48
|
+
onPointerDown: A,
|
|
49
|
+
role: "listbox",
|
|
50
|
+
tabIndex: 0,
|
|
51
|
+
"aria-activedescendant": b === null ? void 0 : e(x, b)
|
|
52
|
+
})
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
export { s as Listbox };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { Dispatch, SetStateAction } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* State a `Listbox` shares with its options
|
|
4
|
+
*/
|
|
5
|
+
export interface ListboxContextValue {
|
|
6
|
+
/**
|
|
7
|
+
* Acts on an option, as Enter does
|
|
8
|
+
*/
|
|
9
|
+
act: (value: string) => void;
|
|
10
|
+
/**
|
|
11
|
+
* The value of the option keyboard focus is on, or null for none
|
|
12
|
+
*/
|
|
13
|
+
activeValue: string | null;
|
|
14
|
+
/**
|
|
15
|
+
* The generated id every option id starts with
|
|
16
|
+
*/
|
|
17
|
+
baseId: string;
|
|
18
|
+
/**
|
|
19
|
+
* Handles a click on an option: focuses the listbox, makes the option active and selects it unless it is disabled
|
|
20
|
+
*/
|
|
21
|
+
choose: (option: HTMLElement, value: string, disabled: boolean) => void;
|
|
22
|
+
/**
|
|
23
|
+
* Makes the option with this value active while the listbox has focus, as a newly selected option does
|
|
24
|
+
*/
|
|
25
|
+
claim: (value: string) => void;
|
|
26
|
+
/**
|
|
27
|
+
* The selected option's value, or null for none
|
|
28
|
+
*/
|
|
29
|
+
selectedValue: string | null;
|
|
30
|
+
/**
|
|
31
|
+
* Sets the value of the option keyboard focus is on, or null for none
|
|
32
|
+
*/
|
|
33
|
+
setActiveValue: Dispatch<SetStateAction<string | null>>;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Carries a `Listbox`'s state to its options; null outside a `Listbox`
|
|
37
|
+
*/
|
|
38
|
+
export declare const ListboxContext: import("react").Context<ListboxContextValue | null>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { JSX } from "react";
|
|
2
|
+
import type { BoxProps } from "../Box";
|
|
3
|
+
/**
|
|
4
|
+
* Props for `ListboxOption`: its own props plus every `div` prop except those the listbox pattern sets
|
|
5
|
+
*/
|
|
6
|
+
export interface ListboxOptionProps extends Omit<BoxProps<"div">, "aria-disabled" | "aria-selected" | "as" | "id" | "role" | "tabIndex"> {
|
|
7
|
+
/**
|
|
8
|
+
* Whether the option cannot be selected. A disabled option is still reached with the arrow keys, so it is read.
|
|
9
|
+
* Defaults to `false`.
|
|
10
|
+
*/
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* The text type-ahead matches. Defaults to the text of the elements the option's `aria-labelledby` names, or to the
|
|
14
|
+
* option's own text when it has none.
|
|
15
|
+
*/
|
|
16
|
+
textValue?: string;
|
|
17
|
+
/**
|
|
18
|
+
* The value this option stands for
|
|
19
|
+
*/
|
|
20
|
+
value: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* One option in a `Listbox`. For a rich option, name it with `aria-labelledby` pointing at its title and describe it
|
|
24
|
+
* with `aria-describedby`. Your `onClick` and `onDoubleClick` run first; preventing their default stops the option
|
|
25
|
+
* handling them. To leave an option out, do not render it or give it `hidden`: an option hidden only by CSS can still
|
|
26
|
+
* be reached with the keyboard.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* <ListboxOption aria-describedby={metaId} aria-labelledby={titleId} value={pullRequest.id}>…</ListboxOption>
|
|
30
|
+
*/
|
|
31
|
+
export declare function ListboxOption({ className, disabled, onClick, onDoubleClick, textValue, value, ...rest }: ListboxOptionProps): JSX.Element;
|