@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,38 @@
|
|
|
1
|
+
function e(e, n, { onEnd: r, onLongPress: i }) {
|
|
2
|
+
let a = setTimeout(() => {
|
|
3
|
+
a = void 0, t(n), i();
|
|
4
|
+
}, 500);
|
|
5
|
+
function o() {
|
|
6
|
+
clearTimeout(a), a = void 0;
|
|
7
|
+
}
|
|
8
|
+
function s(t) {
|
|
9
|
+
t.pointerId !== e.pointerId && o();
|
|
10
|
+
}
|
|
11
|
+
function c(t) {
|
|
12
|
+
let n = Math.hypot(t.clientX - e.clientX, t.clientY - e.clientY);
|
|
13
|
+
t.pointerId === e.pointerId && n > 10 && o();
|
|
14
|
+
}
|
|
15
|
+
function l(t) {
|
|
16
|
+
t.pointerId === e.pointerId && (d(), r());
|
|
17
|
+
}
|
|
18
|
+
function u(e) {
|
|
19
|
+
e.preventDefault();
|
|
20
|
+
}
|
|
21
|
+
function d() {
|
|
22
|
+
o(), n.removeEventListener("pointerdown", s, !0), n.removeEventListener("pointermove", c, !0), n.removeEventListener("pointerup", l, !0), n.removeEventListener("pointercancel", l, !0), n.removeEventListener("selectstart", u, !0);
|
|
23
|
+
}
|
|
24
|
+
return n.addEventListener("pointerdown", s, !0), n.addEventListener("pointermove", c, !0), n.addEventListener("pointerup", l, !0), n.addEventListener("pointercancel", l, !0), n.addEventListener("selectstart", u, !0), d;
|
|
25
|
+
}
|
|
26
|
+
function t(e) {
|
|
27
|
+
let t = new AbortController(), n = {
|
|
28
|
+
capture: !0,
|
|
29
|
+
signal: t.signal
|
|
30
|
+
};
|
|
31
|
+
e.addEventListener("touchend", (e) => {
|
|
32
|
+
e.preventDefault(), t.abort();
|
|
33
|
+
}, {
|
|
34
|
+
...n,
|
|
35
|
+
passive: !1
|
|
36
|
+
}), e.addEventListener("touchcancel", () => t.abort(), n);
|
|
37
|
+
}
|
|
38
|
+
export { e as watchLongPress };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.sui-counter-ESMMm[data-variant]{min-block-size:1.25rem;min-inline-size:1.25rem;padding:0 var(--sui-space-1,.25rem);border-radius:var(--sui-radius-full,9999px);font-variant-numeric:tabular-nums;white-space:nowrap;justify-content:center;line-height:1}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { JSX } from "react";
|
|
2
|
+
import type { BadgeTone, BadgeVariant } from "../Badge";
|
|
3
|
+
import type { BoxProps } from "../Box";
|
|
4
|
+
/**
|
|
5
|
+
* Props for `Counter`: its own props plus every `span` prop except `children`
|
|
6
|
+
*/
|
|
7
|
+
export interface CounterProps extends Omit<BoxProps<"span">, "as" | "children" | "dangerouslySetInnerHTML"> {
|
|
8
|
+
/**
|
|
9
|
+
* Whether the count is only a lower bound, which adds "+" after it, as in "30+". Defaults to `false`.
|
|
10
|
+
*/
|
|
11
|
+
capped?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* The number shown. Below 1 the counter renders nothing.
|
|
14
|
+
*/
|
|
15
|
+
count: number;
|
|
16
|
+
/**
|
|
17
|
+
* Words screen readers read after the count, hidden on screen, so that "3" reads as "3 new"
|
|
18
|
+
*/
|
|
19
|
+
hiddenSuffix?: string;
|
|
20
|
+
/**
|
|
21
|
+
* The largest count shown, at least 1. A count above it shows as the maximum followed by "+", as in "99+".
|
|
22
|
+
*/
|
|
23
|
+
max?: number;
|
|
24
|
+
/**
|
|
25
|
+
* Colour, from Badge's tones. Defaults to `neutral`.
|
|
26
|
+
*/
|
|
27
|
+
tone?: BadgeTone;
|
|
28
|
+
/**
|
|
29
|
+
* Style, from Badge's variants. Defaults to `subtle`.
|
|
30
|
+
*/
|
|
31
|
+
variant?: BadgeVariant;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* A small pill showing a count, such as the unread items in a list. It renders nothing for a count below 1.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* <Counter count={unread} hiddenSuffix="unread" max={99} tone="primary" variant="solid" />
|
|
38
|
+
*/
|
|
39
|
+
export declare function Counter({ capped, className, count, hiddenSuffix, max, tone, variant, ...rest }: CounterProps): JSX.Element | null;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Badge as e } from "../Badge/Badge.js";
|
|
2
|
+
import { VisuallyHidden as t } from "../VisuallyHidden/VisuallyHidden.js";
|
|
3
|
+
import n from "./Counter.module.js";
|
|
4
|
+
import { clsx as r } from "clsx";
|
|
5
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
6
|
+
// src/components/Counter/Counter.tsx
|
|
7
|
+
function o({ capped: o = !1, className: s, count: c, hiddenSuffix: l, max: u, tone: d = "neutral", variant: f = "subtle", ...p }) {
|
|
8
|
+
if (!(c >= 1)) return null;
|
|
9
|
+
let m = u !== void 0 && c > u, h = m ? u : c;
|
|
10
|
+
return /* @__PURE__ */ a(e, {
|
|
11
|
+
...p,
|
|
12
|
+
className: r(n.counter, s),
|
|
13
|
+
tone: d,
|
|
14
|
+
variant: f,
|
|
15
|
+
children: [m || o ? `${h}+` : h, l !== void 0 && /* @__PURE__ */ i(t, { children: ` ${l}` })]
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
export { o as Counter };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.sui-cover-qYwGB{gap:var(--sui-cover-gap);min-block-size:var(--sui-cover-minimum-height);padding:var(--sui-cover-padding);flex-direction:column;display:flex}.sui-principal-tixG4{margin-block:auto}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { JSX, ReactNode } from "react";
|
|
2
|
+
import type { Space } from "../../layout";
|
|
3
|
+
import type { BoxElement, BoxProps } from "../Box";
|
|
4
|
+
interface CoverOwnProps {
|
|
5
|
+
/**
|
|
6
|
+
* Content pinned to the bottom of the cover
|
|
7
|
+
*/
|
|
8
|
+
bottom?: ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* Minimum space between the top, centred and bottom content. Defaults to `4`.
|
|
11
|
+
*/
|
|
12
|
+
gap?: Space;
|
|
13
|
+
/**
|
|
14
|
+
* Minimum height of the cover, as a CSS length. Defaults to `100dvh`.
|
|
15
|
+
*/
|
|
16
|
+
minimumHeight?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Space inside the cover's edges. Defaults to `4`.
|
|
19
|
+
*/
|
|
20
|
+
padding?: Space;
|
|
21
|
+
/**
|
|
22
|
+
* Content pinned to the top of the cover
|
|
23
|
+
*/
|
|
24
|
+
top?: ReactNode;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Props for `Cover`: its own props plus every prop supported by the element given in `as`
|
|
28
|
+
*/
|
|
29
|
+
export type CoverProps<E extends BoxElement = "div"> = CoverOwnProps & Omit<BoxProps<E>, keyof CoverOwnProps>;
|
|
30
|
+
/**
|
|
31
|
+
* Minimum-height area that vertically centres its children, with optional content pinned above
|
|
32
|
+
* and below. The children render inside a `div`.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* <Cover as="section" minimumHeight="60vh" top={<Text>Featured</Text>} aria-label="Welcome">
|
|
36
|
+
* <Heading level={1}>Notes on layout</Heading>
|
|
37
|
+
* </Cover>
|
|
38
|
+
*/
|
|
39
|
+
export declare function Cover<E extends BoxElement = "div">({ as, bottom, className, gap, minimumHeight, padding, top, ...rest }: CoverProps<E>): JSX.Element;
|
|
40
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
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 "./Cover.module.js";
|
|
5
|
+
import { clsx as i } from "clsx";
|
|
6
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
7
|
+
// src/components/Cover/Cover.tsx
|
|
8
|
+
function s({ as: s, bottom: c, className: l, gap: u = 4, minimumHeight: d = "100dvh", padding: f = 4, top: p, ...m }) {
|
|
9
|
+
let { children: h, style: g, ..._ } = m;
|
|
10
|
+
return /* @__PURE__ */ o(n, {
|
|
11
|
+
..._,
|
|
12
|
+
as: s,
|
|
13
|
+
className: i(r.cover, l),
|
|
14
|
+
style: t({
|
|
15
|
+
"--sui-cover-gap": e(u),
|
|
16
|
+
"--sui-cover-minimum-height": d,
|
|
17
|
+
"--sui-cover-padding": e(f)
|
|
18
|
+
}, g),
|
|
19
|
+
children: [
|
|
20
|
+
p,
|
|
21
|
+
/* @__PURE__ */ a("div", {
|
|
22
|
+
className: r.principal,
|
|
23
|
+
children: h
|
|
24
|
+
}),
|
|
25
|
+
c
|
|
26
|
+
]
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
export { s as Cover };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.sui-divider-KSGsi{--sui-divider-color:var(--sui-color-border,#d1d5db);--sui-divider-width:var(--sui-border-width,1px);border:0;margin:0}.sui-divider-KSGsi[data-orientation=horizontal]{border-block-start:var(--sui-divider-width) solid var(--sui-divider-color);inline-size:100%}.sui-divider-KSGsi[data-orientation=vertical]{border-inline-start:var(--sui-divider-width) solid var(--sui-divider-color);align-self:stretch;inline-size:0}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { JSX } from "react";
|
|
2
|
+
import type { BoxProps } from "../Box";
|
|
3
|
+
/**
|
|
4
|
+
* Direction a divider runs: `horizontal` between stacked content, `vertical` between items in a row
|
|
5
|
+
*/
|
|
6
|
+
export type DividerOrientation = "horizontal" | "vertical";
|
|
7
|
+
/**
|
|
8
|
+
* Props for `Divider`: its own props plus every native hr prop
|
|
9
|
+
*/
|
|
10
|
+
export interface DividerProps extends Omit<BoxProps<"hr">, "as" | "children" | "dangerouslySetInnerHTML"> {
|
|
11
|
+
/**
|
|
12
|
+
* Direction the divider runs. A vertical divider needs a flex row to stretch. Defaults to `horizontal`.
|
|
13
|
+
*/
|
|
14
|
+
orientation?: DividerOrientation;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Thin rule that separates content, exposed to assistive technology as a separator
|
|
18
|
+
*
|
|
19
|
+
* The rule is decorative and its colour is not held to 3:1 contrast. Where it is the only visible sign of a break,
|
|
20
|
+
* set `--sui-divider-color: var(--sui-color-input-border)`.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* <Divider />
|
|
24
|
+
*/
|
|
25
|
+
export declare function Divider({ className, orientation, ...rest }: DividerProps): JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Box as e } from "../Box/Box.js";
|
|
2
|
+
import t from "./Divider.module.js";
|
|
3
|
+
import { clsx as n } from "clsx";
|
|
4
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
+
// src/components/Divider/Divider.tsx
|
|
6
|
+
function i({ className: i, orientation: a = "horizontal", ...o }) {
|
|
7
|
+
return /* @__PURE__ */ r(e, {
|
|
8
|
+
...o,
|
|
9
|
+
as: "hr",
|
|
10
|
+
className: n(t.divider, i),
|
|
11
|
+
"aria-orientation": a === "vertical" ? "vertical" : void 0,
|
|
12
|
+
"data-orientation": a
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
export { i as Divider };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.sui-field-m7I4B{--sui-field-gap:var(--sui-space-1,.25rem);gap:var(--sui-field-gap);font-family:var(--sui-font-body,system-ui, sans-serif);line-height:var(--sui-line-height-normal,1.5);flex-direction:column;display:flex}.sui-label-LAQio{font-weight:var(--sui-font-weight-control,500)}.sui-field-m7I4B[data-disabled] .sui-label-LAQio,fieldset:disabled .sui-label-LAQio{opacity:.5}.sui-description-yqljW{color:var(--sui-color-text-muted,#4b5563);font-size:var(--sui-font-size-sm,.875rem)}.sui-error-m0uol{color:var(--sui-color-danger-text,#b91c1c);font-size:var(--sui-font-size-sm,.875rem)}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { JSX, ReactNode } from "react";
|
|
2
|
+
import type { BoxProps } from "../Box";
|
|
3
|
+
/**
|
|
4
|
+
* Elements a `Field` can render: block containers that can hold its label, description, control and error
|
|
5
|
+
*/
|
|
6
|
+
export type FieldElement = "div" | "li" | "section";
|
|
7
|
+
interface FieldOwnProps {
|
|
8
|
+
/**
|
|
9
|
+
* `id` of the control, which the label points at. Wins over an `id` set on the control. Defaults to a
|
|
10
|
+
* generated id.
|
|
11
|
+
*/
|
|
12
|
+
controlId?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Supporting text shown between the label and the control, linked to the control with `aria-describedby`
|
|
15
|
+
*/
|
|
16
|
+
description?: ReactNode;
|
|
17
|
+
/**
|
|
18
|
+
* Disables the control and dims the label. Defaults to `false`.
|
|
19
|
+
*/
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Error message shown below the control. Marks the control `aria-invalid` and is linked to it with
|
|
23
|
+
* `aria-describedby`. It is not a live region.
|
|
24
|
+
*/
|
|
25
|
+
error?: ReactNode;
|
|
26
|
+
/**
|
|
27
|
+
* Label for the control. Omit only for a control that labels itself.
|
|
28
|
+
*/
|
|
29
|
+
label?: ReactNode;
|
|
30
|
+
/**
|
|
31
|
+
* Sets `required` on the control and adds an `aria-hidden` asterisk to the label. Defaults to `false`.
|
|
32
|
+
*/
|
|
33
|
+
required?: boolean;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Props for `Field`: its own props plus every prop supported by the element given in `as`
|
|
37
|
+
*/
|
|
38
|
+
export type FieldProps<E extends FieldElement = "div"> = FieldOwnProps & Omit<BoxProps<E>, keyof FieldOwnProps>;
|
|
39
|
+
/**
|
|
40
|
+
* Wraps one form control with a label, a description and an error message, and links them to the control so the
|
|
41
|
+
* label and error association is written once. Renders the label, description, control and error in that order.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* <Field description="We only use it to send receipts" label="Email" required={true}>
|
|
45
|
+
* <TextInput />
|
|
46
|
+
* </Field>
|
|
47
|
+
*/
|
|
48
|
+
export declare function Field<E extends FieldElement = "div">({ as, className, controlId, description, disabled, error, label, required, ...rest }: FieldProps<E>): JSX.Element;
|
|
49
|
+
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { FieldContext as e } from "../../forms/FieldContext.js";
|
|
2
|
+
import { hasContent as t } from "../../forms/hasContent.js";
|
|
3
|
+
import { Box as n } from "../Box/Box.js";
|
|
4
|
+
import { RequiredIndicator as r } from "../RequiredIndicator/RequiredIndicator.js";
|
|
5
|
+
import i from "./Field.module.js";
|
|
6
|
+
import { clsx as a } from "clsx";
|
|
7
|
+
import { useId as o } from "react";
|
|
8
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
9
|
+
// src/components/Field/Field.tsx
|
|
10
|
+
function l({ as: l, className: u, controlId: d, description: f, disabled: p = !1, error: m, label: h, required: g = !1, ..._ }) {
|
|
11
|
+
let { children: v, ...y } = _, b = o(), x = `${b}-description`, S = `${b}-error`, C = `${b}-label`, w = t(f), T = t(m), E = t(h), D = [w && x, T && S].filter(Boolean).join(" "), O = {
|
|
12
|
+
controlId: d ?? b,
|
|
13
|
+
describedBy: D === "" ? void 0 : D,
|
|
14
|
+
disabled: p,
|
|
15
|
+
invalid: T,
|
|
16
|
+
labelId: E ? C : void 0,
|
|
17
|
+
required: g
|
|
18
|
+
};
|
|
19
|
+
return /* @__PURE__ */ c(n, {
|
|
20
|
+
...y,
|
|
21
|
+
as: l,
|
|
22
|
+
className: a(i.field, u),
|
|
23
|
+
"data-disabled": p ? "" : void 0,
|
|
24
|
+
children: [
|
|
25
|
+
E && /* @__PURE__ */ c(n, {
|
|
26
|
+
as: "label",
|
|
27
|
+
className: i.label,
|
|
28
|
+
htmlFor: O.controlId,
|
|
29
|
+
id: C,
|
|
30
|
+
children: [h, g && /* @__PURE__ */ s(r, {})]
|
|
31
|
+
}),
|
|
32
|
+
w && /* @__PURE__ */ s(n, {
|
|
33
|
+
className: i.description,
|
|
34
|
+
id: x,
|
|
35
|
+
children: f
|
|
36
|
+
}),
|
|
37
|
+
/* @__PURE__ */ s(e.Provider, {
|
|
38
|
+
value: O,
|
|
39
|
+
children: v
|
|
40
|
+
}),
|
|
41
|
+
T && /* @__PURE__ */ s(n, {
|
|
42
|
+
className: i.error,
|
|
43
|
+
id: S,
|
|
44
|
+
children: m
|
|
45
|
+
})
|
|
46
|
+
]
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
export { l as Field };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import './Field.css';// src/components/Field/Field.module.css
|
|
2
|
+
var e = "sui-field-m7I4B", t = "sui-label-LAQio", n = "sui-description-yqljW", r = "sui-error-m0uol", i = {
|
|
3
|
+
field: e,
|
|
4
|
+
label: t,
|
|
5
|
+
description: n,
|
|
6
|
+
error: r
|
|
7
|
+
};
|
|
8
|
+
export { i as default, n as description, r as error, e as field, t as label };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.sui-fieldset-XI428{--sui-fieldset-gap:var(--sui-space-1,.25rem);gap:var(--sui-fieldset-gap);min-inline-size:0;font-family:var(--sui-font-body,system-ui, sans-serif);line-height:var(--sui-line-height-normal,1.5);border:0;flex-direction:column;padding:0;display:flex}.sui-legend-u9wBt{font-weight:var(--sui-font-weight-control,500);margin-block-end:var(--sui-fieldset-gap);padding:0}.sui-fieldset-XI428:disabled .sui-legend-u9wBt{opacity:.5}.sui-description-KGes-{color:var(--sui-color-text-muted,#4b5563);font-size:var(--sui-font-size-sm,.875rem)}.sui-error-Dionz{color:var(--sui-color-danger-text,#b91c1c);font-size:var(--sui-font-size-sm,.875rem)}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { JSX, ReactNode } from "react";
|
|
2
|
+
import type { BoxProps } from "../Box";
|
|
3
|
+
/**
|
|
4
|
+
* Props for `Fieldset`: its own props plus every native fieldset prop
|
|
5
|
+
*/
|
|
6
|
+
export interface FieldsetProps extends Omit<BoxProps<"fieldset">, "aria-labelledby" | "as"> {
|
|
7
|
+
/**
|
|
8
|
+
* Not accepted: the `label` always names the group
|
|
9
|
+
*/
|
|
10
|
+
"aria-labelledby"?: never;
|
|
11
|
+
/**
|
|
12
|
+
* Supporting text shown below the label, linked to the group with `aria-describedby`
|
|
13
|
+
*/
|
|
14
|
+
description?: ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* Error message shown below the controls, linked to the group with `aria-describedby`. It is not a live region.
|
|
17
|
+
*/
|
|
18
|
+
error?: ReactNode;
|
|
19
|
+
/**
|
|
20
|
+
* Label for the group, rendered as its `legend`, which names the group
|
|
21
|
+
*/
|
|
22
|
+
label: ReactNode;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Groups related form controls under a legend, with an optional description and error for the group. The
|
|
26
|
+
* native `disabled` prop disables every control inside and dims the legend. Controls inside do not take the
|
|
27
|
+
* state of a surrounding `Field`.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* <Fieldset description="Choose how we reach you" label="Notifications">
|
|
31
|
+
* <Checkbox>Email</Checkbox>
|
|
32
|
+
* <Checkbox>Text message</Checkbox>
|
|
33
|
+
* </Fieldset>
|
|
34
|
+
*/
|
|
35
|
+
export declare function Fieldset({ "aria-describedby": consumerDescribedBy, children, className, description, error, label, ...rest }: FieldsetProps): JSX.Element;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { FieldContext as e } from "../../forms/FieldContext.js";
|
|
2
|
+
import { hasContent as t } from "../../forms/hasContent.js";
|
|
3
|
+
import { Box as n } from "../Box/Box.js";
|
|
4
|
+
import r from "./Fieldset.module.js";
|
|
5
|
+
import { clsx as i } from "clsx";
|
|
6
|
+
import { useId as a } from "react";
|
|
7
|
+
import { c as o } from "react/compiler-runtime";
|
|
8
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
9
|
+
// src/components/Fieldset/Fieldset.tsx
|
|
10
|
+
function l(l) {
|
|
11
|
+
let u = o(40), d, f, p, m, h, g, _;
|
|
12
|
+
u[0] === l ? (d = u[1], f = u[2], p = u[3], m = u[4], h = u[5], g = u[6], _ = u[7]) : ({"aria-describedby": p, children: d, className: f, description: m, error: h, label: g, ..._} = l, u[0] = l, u[1] = d, u[2] = f, u[3] = p, u[4] = m, u[5] = h, u[6] = g, u[7] = _);
|
|
13
|
+
let v = a(), y = `${v}-legend`, b = `${v}-description`, x = `${v}-error`, S;
|
|
14
|
+
u[8] === m ? S = u[9] : (S = t(m), u[8] = m, u[9] = S);
|
|
15
|
+
let C = S, w;
|
|
16
|
+
u[10] === h ? w = u[11] : (w = t(h), u[10] = h, u[11] = w);
|
|
17
|
+
let T = w, E = C && b, D = T && x, O;
|
|
18
|
+
u[12] !== p || u[13] !== E || u[14] !== D ? (O = [
|
|
19
|
+
E,
|
|
20
|
+
D,
|
|
21
|
+
p
|
|
22
|
+
].filter(Boolean), u[12] = p, u[13] = E, u[14] = D, u[15] = O) : O = u[15];
|
|
23
|
+
let k = O.join(" "), A;
|
|
24
|
+
u[16] === f ? A = u[17] : (A = i(r.fieldset, f), u[16] = f, u[17] = A);
|
|
25
|
+
let j = k === "" ? void 0 : k, M;
|
|
26
|
+
u[18] !== g || u[19] !== y ? (M = /* @__PURE__ */ s(n, {
|
|
27
|
+
as: "legend",
|
|
28
|
+
className: r.legend,
|
|
29
|
+
id: y,
|
|
30
|
+
children: g
|
|
31
|
+
}), u[18] = g, u[19] = y, u[20] = M) : M = u[20];
|
|
32
|
+
let N;
|
|
33
|
+
u[21] !== m || u[22] !== b || u[23] !== C ? (N = C && /* @__PURE__ */ s(n, {
|
|
34
|
+
className: r.description,
|
|
35
|
+
id: b,
|
|
36
|
+
children: m
|
|
37
|
+
}), u[21] = m, u[22] = b, u[23] = C, u[24] = N) : N = u[24];
|
|
38
|
+
let P;
|
|
39
|
+
u[25] === d ? P = u[26] : (P = /* @__PURE__ */ s(e.Provider, {
|
|
40
|
+
value: null,
|
|
41
|
+
children: d
|
|
42
|
+
}), u[25] = d, u[26] = P);
|
|
43
|
+
let F;
|
|
44
|
+
u[27] !== h || u[28] !== x || u[29] !== T ? (F = T && /* @__PURE__ */ s(n, {
|
|
45
|
+
className: r.error,
|
|
46
|
+
id: x,
|
|
47
|
+
children: h
|
|
48
|
+
}), u[27] = h, u[28] = x, u[29] = T, u[30] = F) : F = u[30];
|
|
49
|
+
let I;
|
|
50
|
+
return u[31] !== y || u[32] !== _ || u[33] !== P || u[34] !== F || u[35] !== A || u[36] !== j || u[37] !== M || u[38] !== N ? (I = /* @__PURE__ */ c(n, {
|
|
51
|
+
..._,
|
|
52
|
+
as: "fieldset",
|
|
53
|
+
className: A,
|
|
54
|
+
"aria-describedby": j,
|
|
55
|
+
"aria-labelledby": y,
|
|
56
|
+
children: [
|
|
57
|
+
M,
|
|
58
|
+
N,
|
|
59
|
+
P,
|
|
60
|
+
F
|
|
61
|
+
]
|
|
62
|
+
}), u[31] = y, u[32] = _, u[33] = P, u[34] = F, u[35] = A, u[36] = j, u[37] = M, u[38] = N, u[39] = I) : I = u[39], I;
|
|
63
|
+
}
|
|
64
|
+
export { l as Fieldset };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import './Fieldset.css';// src/components/Fieldset/Fieldset.module.css
|
|
2
|
+
var e = "sui-fieldset-XI428", t = "sui-legend-u9wBt", n = "sui-description-KGes-", r = "sui-error-Dionz", i = {
|
|
3
|
+
fieldset: e,
|
|
4
|
+
legend: t,
|
|
5
|
+
description: n,
|
|
6
|
+
error: r
|
|
7
|
+
};
|
|
8
|
+
export { i as default, n as description, r as error, e as fieldset, t as legend };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.sui-frame-S3Ved{aspect-ratio:var(--sui-frame-ratio);overflow:hidden}.sui-frame-S3Ved>:is(img,video,iframe){object-fit:cover;block-size:100%;inline-size:100%}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { JSX } from "react";
|
|
2
|
+
import type { BoxElement, BoxProps } from "../Box";
|
|
3
|
+
interface FrameOwnProps {
|
|
4
|
+
/**
|
|
5
|
+
* Width-to-height ratio, for example `"4 / 3"`. Defaults to `"16 / 9"`.
|
|
6
|
+
*/
|
|
7
|
+
ratio?: `${number} / ${number}`;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Props for `Frame`: its own props plus every prop supported by the element given in `as`
|
|
11
|
+
*/
|
|
12
|
+
export type FrameProps<E extends BoxElement = "div"> = FrameOwnProps & Omit<BoxProps<E>, keyof FrameOwnProps>;
|
|
13
|
+
/**
|
|
14
|
+
* Fixed aspect-ratio box that crops a single `img`, `video` or `iframe` child to fill it. For a
|
|
15
|
+
* captioned image, put the frame inside a `figure` beside the `figcaption`.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* <Frame ratio="4 / 3">
|
|
19
|
+
* <img alt="Mountain lake at dawn" src="lake.jpg" />
|
|
20
|
+
* </Frame>
|
|
21
|
+
*/
|
|
22
|
+
export declare function Frame<E extends BoxElement = "div">({ as, className, ratio, ...rest }: FrameProps<E>): JSX.Element;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { withCustomProperties as e } from "../../layout/withCustomProperties.js";
|
|
2
|
+
import { Box as t } from "../Box/Box.js";
|
|
3
|
+
import n from "./Frame.module.js";
|
|
4
|
+
import { clsx as r } from "clsx";
|
|
5
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
6
|
+
// src/components/Frame/Frame.tsx
|
|
7
|
+
function a({ as: a, className: o, ratio: s = "16 / 9", ...c }) {
|
|
8
|
+
let { style: l, ...u } = c;
|
|
9
|
+
return /* @__PURE__ */ i(t, {
|
|
10
|
+
...u,
|
|
11
|
+
as: a,
|
|
12
|
+
className: r(n.frame, o),
|
|
13
|
+
style: e({ "--sui-frame-ratio": s }, l)
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
export { a as Frame };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.sui-grid-h49fk{grid-template-columns:repeat(auto-fit, minmax(min(var(--sui-grid-minimum-item-width), 100%), 1fr));gap:var(--sui-grid-gap);display:grid}.sui-grid-h49fk:where(ul,ol){margin:0;padding:0;list-style:none}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { JSX } from "react";
|
|
2
|
+
import type { Space } from "../../layout";
|
|
3
|
+
import type { BoxElement, BoxProps } from "../Box";
|
|
4
|
+
interface GridOwnProps {
|
|
5
|
+
/**
|
|
6
|
+
* Space between items in both directions. Defaults to `4`.
|
|
7
|
+
*/
|
|
8
|
+
gap?: Space;
|
|
9
|
+
/**
|
|
10
|
+
* Narrowest an item may get before the grid drops a column, as a CSS length. Defaults to `16rem`.
|
|
11
|
+
*/
|
|
12
|
+
minimumItemWidth?: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Props for `Grid`: its own props plus every prop supported by the element given in `as`
|
|
16
|
+
*/
|
|
17
|
+
export type GridProps<E extends BoxElement = "div"> = GridOwnProps & Omit<BoxProps<E>, keyof GridOwnProps>;
|
|
18
|
+
/**
|
|
19
|
+
* Responsive grid that fits as many equal columns as its width allows, without breakpoints
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* <Grid as="ul" minimumItemWidth="18rem">...</Grid>
|
|
23
|
+
*/
|
|
24
|
+
export declare function Grid<E extends BoxElement = "div">({ as, className, gap, minimumItemWidth, ...rest }: GridProps<E>): JSX.Element;
|
|
25
|
+
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 "./Grid.module.js";
|
|
6
|
+
import { clsx as a } from "clsx";
|
|
7
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
8
|
+
// src/components/Grid/Grid.tsx
|
|
9
|
+
function s({ as: s, className: c, gap: l = 4, minimumItemWidth: u = "16rem", ...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.grid, c),
|
|
15
|
+
role: e(h, f),
|
|
16
|
+
style: n({
|
|
17
|
+
"--sui-grid-gap": t(l),
|
|
18
|
+
"--sui-grid-minimum-item-width": u
|
|
19
|
+
}, p)
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
export { s as Grid };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.sui-heading-2pnHW{font-family:var(--sui-font-heading,system-ui, sans-serif);font-weight:var(--sui-font-weight-bold,700);line-height:var(--sui-line-height-tight,1.25);margin:0}.sui-heading-2pnHW[data-size=xs]{font-size:var(--sui-font-size-xs,.75rem)}.sui-heading-2pnHW[data-size=sm]{font-size:var(--sui-font-size-sm,.875rem)}.sui-heading-2pnHW[data-size=md]{font-size:var(--sui-font-size-md,1rem)}.sui-heading-2pnHW[data-size=lg]{font-size:var(--sui-font-size-lg,1.125rem)}.sui-heading-2pnHW[data-size=xl]{font-size:var(--sui-font-size-xl,1.25rem)}.sui-heading-2pnHW[data-size="2xl"]{font-size:var(--sui-font-size-2xl,1.5rem)}.sui-heading-2pnHW[data-size="3xl"]{font-size:var(--sui-font-size-3xl,1.875rem)}.sui-heading-2pnHW[data-tone=muted]{color:var(--sui-color-text-muted,#4b5563)}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { JSX } from "react";
|
|
2
|
+
import type { BoxProps } from "../Box";
|
|
3
|
+
import type { TextTone } from "../Text";
|
|
4
|
+
/**
|
|
5
|
+
* Heading level, rendered as the matching `h1`–`h6` element
|
|
6
|
+
*/
|
|
7
|
+
export type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
8
|
+
/**
|
|
9
|
+
* Heading sizes, mapped to the `--sui-font-size-*` tokens
|
|
10
|
+
*/
|
|
11
|
+
export type HeadingSize = "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl";
|
|
12
|
+
/**
|
|
13
|
+
* Props for `Heading`: its own props plus every heading element prop
|
|
14
|
+
*/
|
|
15
|
+
export interface HeadingProps extends Omit<BoxProps<"h1">, "as"> {
|
|
16
|
+
/**
|
|
17
|
+
* Heading level; decides the rendered element
|
|
18
|
+
*/
|
|
19
|
+
level: HeadingLevel;
|
|
20
|
+
/**
|
|
21
|
+
* Font size. Defaults to a size matching the level (1 is `3xl`, 6 is `sm`).
|
|
22
|
+
*/
|
|
23
|
+
size?: HeadingSize;
|
|
24
|
+
/**
|
|
25
|
+
* Text colour. `muted` is for a quiet heading that labels a group, such as a sidebar section. Defaults to
|
|
26
|
+
* `default`, which inherits the surrounding text colour.
|
|
27
|
+
*/
|
|
28
|
+
tone?: TextTone;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Section heading in the theme's heading font
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* <Heading level={2}>Settings</Heading>
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* <Heading level={2} size="xs" tone="muted">For review</Heading>
|
|
38
|
+
*/
|
|
39
|
+
export declare function Heading({ className, level, size, tone, ...rest }: HeadingProps): JSX.Element;
|