@vygruppen/spor-react 12.24.15 → 12.24.16
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/.turbo/turbo-build.log +10 -10
- package/.turbo/turbo-postinstall.log +1 -1
- package/CHANGELOG.md +7 -0
- package/dist/index.cjs +248 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +65 -2
- package/dist/index.d.ts +65 -2
- package/dist/index.mjs +239 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/input/Menu.tsx +234 -0
- package/src/input/index.ts +1 -0
- package/src/theme/slot-recipes/anatomy.ts +14 -0
- package/src/theme/slot-recipes/index.ts +2 -0
- package/src/theme/slot-recipes/menu.ts +111 -0
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
2
|
import React__default, { ReactNode, PropsWithChildren, ComponentProps } from 'react';
|
|
3
3
|
import * as _chakra_ui_react from '@chakra-ui/react';
|
|
4
|
-
import { Accordion as Accordion$1, Alert as Alert$1, ConditionalValue, Breadcrumb as Breadcrumb$1, ButtonProps as ButtonProps$1, RecipeVariantProps, GroupProps, Clipboard as Clipboard$1, IconButtonProps as IconButtonProps$1, BoxProps, SystemStyleObject, RadioCard as RadioCard$1, SeparatorProps, Field as Field$1, PopoverRootProps, Dialog, Drawer as Drawer$1, Combobox as Combobox$1, Checkbox as Checkbox$1, CheckboxGroup as CheckboxGroup$1, CheckboxCard, CheckboxCardRootProps, Fieldset as Fieldset$1, Input as Input$1, ListRootProps, NativeSelect as NativeSelect$1, NativeSelectFieldProps, RadioGroup as RadioGroup$1, SelectRootProps, Select as Select$1, SelectLabelProps, CollectionItem, Switch as Switch$1, TextareaProps as TextareaProps$1, LinkProps as LinkProps$1, List as List$1, UseProgressProps, SkeletonProps as SkeletonProps$1, CircleProps, Popover as Popover$1, Pagination as Pagination$1, ChakraProviderProps, SystemContext, Tabs as Tabs$1, TabsRootProps, Table as Table$1, TableBodyProps as TableBodyProps$1, TableColumnHeaderProps as TableColumnHeaderProps$1, TableRootProps, Tooltip as Tooltip$1, BadgeProps as BadgeProps$1, CodeProps, HeadingProps as HeadingProps$1, TextProps as TextProps$1 } from '@chakra-ui/react';
|
|
4
|
+
import { Accordion as Accordion$1, Alert as Alert$1, ConditionalValue, Breadcrumb as Breadcrumb$1, ButtonProps as ButtonProps$1, RecipeVariantProps, GroupProps, Clipboard as Clipboard$1, IconButtonProps as IconButtonProps$1, BoxProps, SystemStyleObject, RadioCard as RadioCard$1, SeparatorProps, Field as Field$1, PopoverRootProps, Dialog, Drawer as Drawer$1, Combobox as Combobox$1, Checkbox as Checkbox$1, CheckboxGroup as CheckboxGroup$1, CheckboxCard, CheckboxCardRootProps, Fieldset as Fieldset$1, Input as Input$1, ListRootProps, MenuRootProps, Menu as Menu$1, MenuItemGroupProps as MenuItemGroupProps$1, MenuItemProps as MenuItemProps$1, MenuTriggerItemProps as MenuTriggerItemProps$1, NativeSelect as NativeSelect$1, NativeSelectFieldProps, RadioGroup as RadioGroup$1, SelectRootProps, Select as Select$1, SelectLabelProps, CollectionItem, Switch as Switch$1, TextareaProps as TextareaProps$1, LinkProps as LinkProps$1, List as List$1, UseProgressProps, SkeletonProps as SkeletonProps$1, CircleProps, Popover as Popover$1, Pagination as Pagination$1, ChakraProviderProps, SystemContext, Tabs as Tabs$1, TabsRootProps, Table as Table$1, TableBodyProps as TableBodyProps$1, TableColumnHeaderProps as TableColumnHeaderProps$1, TableRootProps, Tooltip as Tooltip$1, BadgeProps as BadgeProps$1, CodeProps, HeadingProps as HeadingProps$1, TextProps as TextProps$1 } from '@chakra-ui/react';
|
|
5
5
|
export { AspectRatio, Box, BoxProps, BreadcrumbCurrentLink, BreadcrumbEllipsis, BreadcrumbLink, Center, CenterProps, ClientOnly, Collapsible, CollapsibleRootProps, Container, ContainerProps, Em, Flex, FlexProps, For, FormatByte, FormatNumber, Grid, GridItem, GridItemProps, GridProps, HStack, Icon, Image, ImageProps, Kbd, LocaleProvider, Portal, PortalProps, Show, SimpleGrid, SimpleGridProps, Spacer, SpacerProps, Span, Stack, SystemConfig, TableCaption, TableCaptionProps, TableCell, TableCellProps, TableColumn, TableColumnGroup, TableColumnProps, TableFooter, TableFooterProps, TableHeader, TableHeaderProps, TableRoot, TableRootProps, TableRow, TableRowProps, UseDisclosureProps, VStack, VisuallyHidden, Wrap, createIcon, createListCollection, createSystem, defineConfig, defineRecipe, defineSlotRecipe, defineStyle, mergeConfigs, chakra as spor, useBreakpointValue, useCheckbox, useClipboard, useControllableProp, useDisclosure, useMediaQuery, useRecipe, useSlotRecipe, useToken } from '@chakra-ui/react';
|
|
6
6
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
7
7
|
import { IconComponent } from '@vygruppen/spor-icon-react';
|
|
@@ -1596,6 +1596,69 @@ declare function ItemDescription({ children }: {
|
|
|
1596
1596
|
children: React__default.ReactNode;
|
|
1597
1597
|
}): react_jsx_runtime.JSX.Element;
|
|
1598
1598
|
|
|
1599
|
+
type Variant$2 = Pick<MenuRootProps, "variant">;
|
|
1600
|
+
declare const useMenuContext: () => Variant$2;
|
|
1601
|
+
/**
|
|
1602
|
+
* Menu component.
|
|
1603
|
+
*
|
|
1604
|
+
* Used to create an accessible dropdown menu.
|
|
1605
|
+
*
|
|
1606
|
+
* @example
|
|
1607
|
+
* ```tsx
|
|
1608
|
+
<Menu>
|
|
1609
|
+
<MenuTrigger> Menu </MenuTrigger>
|
|
1610
|
+
<MenuContent>
|
|
1611
|
+
<MenuItem value="1"> Item 1 </MenuItem>
|
|
1612
|
+
<MenuItem value="2"> Item 2 </MenuItem>
|
|
1613
|
+
<MenuItem value="3"> Item 3 </MenuItem>
|
|
1614
|
+
</MenuContent>
|
|
1615
|
+
</Menu>
|
|
1616
|
+
* ```
|
|
1617
|
+
*
|
|
1618
|
+
*/
|
|
1619
|
+
declare const Menu: ({ children, ...props }: MenuRootProps) => react_jsx_runtime.JSX.Element;
|
|
1620
|
+
declare const MenuContent: React$1.ForwardRefExoticComponent<Menu$1.ContentProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1621
|
+
type MenuTriggerProps = {
|
|
1622
|
+
/** An optional trigger button icon, rendered to the left of the label */
|
|
1623
|
+
icon?: ReactNode;
|
|
1624
|
+
} & Omit<ButtonProps, "variant" | "rightIcon" | "leftIcon">;
|
|
1625
|
+
declare const MenuTrigger: React$1.ForwardRefExoticComponent<{
|
|
1626
|
+
/** An optional trigger button icon, rendered to the left of the label */
|
|
1627
|
+
icon?: ReactNode;
|
|
1628
|
+
} & Omit<ButtonProps, "variant" | "leftIcon" | "rightIcon"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1629
|
+
type MenuItemProps = {
|
|
1630
|
+
/** Display a command in the menu */
|
|
1631
|
+
itemCommand?: string;
|
|
1632
|
+
leftIcon?: React.ReactNode;
|
|
1633
|
+
rightIcon?: React.ReactNode;
|
|
1634
|
+
} & MenuItemProps$1;
|
|
1635
|
+
declare const MenuItem: React$1.ForwardRefExoticComponent<{
|
|
1636
|
+
/** Display a command in the menu */
|
|
1637
|
+
itemCommand?: string;
|
|
1638
|
+
leftIcon?: React.ReactNode;
|
|
1639
|
+
rightIcon?: React.ReactNode;
|
|
1640
|
+
} & Menu$1.ItemProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1641
|
+
type MenuTriggerItemProps = {
|
|
1642
|
+
leftIcon?: React.ReactNode;
|
|
1643
|
+
rightIcon?: React.ReactNode;
|
|
1644
|
+
} & MenuTriggerItemProps$1;
|
|
1645
|
+
declare const MenuTriggerItem: React$1.ForwardRefExoticComponent<{
|
|
1646
|
+
leftIcon?: React.ReactNode;
|
|
1647
|
+
rightIcon?: React.ReactNode;
|
|
1648
|
+
} & Menu$1.TriggerItemProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1649
|
+
declare const MenuRadioItemGroup: React$1.ForwardRefExoticComponent<Menu$1.RadioItemGroupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1650
|
+
declare const MenuRadioItem: React$1.ForwardRefExoticComponent<Menu$1.RadioItemProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1651
|
+
type MenuItemGroupProps = {
|
|
1652
|
+
/** Display group label */
|
|
1653
|
+
label?: string;
|
|
1654
|
+
} & MenuItemGroupProps$1;
|
|
1655
|
+
declare const MenuItemGroup: React$1.ForwardRefExoticComponent<{
|
|
1656
|
+
/** Display group label */
|
|
1657
|
+
label?: string;
|
|
1658
|
+
} & Menu$1.ItemGroupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1659
|
+
declare const MenuCheckboxItem: React$1.ForwardRefExoticComponent<Menu$1.CheckboxItemProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1660
|
+
declare const MenuSeparator: React$1.ForwardRefExoticComponent<React$1.RefAttributes<Menu$1.SeparatorProps>>;
|
|
1661
|
+
|
|
1599
1662
|
declare const nativeSelectSlotRecipe: _chakra_ui_react.SlotRecipeDefinition<"icon" | "root" | "field", {
|
|
1600
1663
|
variant: {
|
|
1601
1664
|
core: {
|
|
@@ -3753,4 +3816,4 @@ declare const Text: React$1.ForwardRefExoticComponent<Omit<TextProps$1, "textSty
|
|
|
3753
3816
|
**/
|
|
3754
3817
|
declare function slugify(text: string | string[], maxLength?: number): string;
|
|
3755
3818
|
|
|
3756
|
-
export { Accordion, AccordionItem, AccordionItemContent, AccordionItemTrigger, Alert, type AlertProps, AttachedInputs, type AttachedInputsProps, Autocomplete, AutocompleteItem, AutocompleteItemGroup, AutocompleteItemGroupLabel, Badge, type BadgeProps, Brand, Breadcrumb, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, type ButtonVariantProps, Calendar, CalendarCell, CalendarGrid, CalendarHeader, type CalendarMode, CalendarProvider, type CalendarValue, CardSelect, CardSelectContent, CardSelectTrigger, type CardSelectTriggerProps, CargonetLogo, type CargonetLogoProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, ChoiceChip, type ChoiceChipProps, Clipboard, ClipboardButton, CloseButton, type CloseButtonProps, CloseDrawerLine, Code, ColorInlineLoader, type ColorInlineLoaderProps, type ColorMode, ColorModeButton, ColorModeIcon, ColorModeProvider, type ColorModeProviderProps, ColorSpinner, type ColorSpinnerProps, Combobox, type ComboboxProps, ContentLoader, type ContentLoaderProps, type CountryCodeAndPhoneNumber, DarkFullScreenLoader, DarkInlineLoader, type DarkInlineLoaderProps, DarkSpinner, type DarkSpinnerProps, DatePicker, type DatePickerVariantProps, DateRangePicker, DialogActionTrigger, DialogBackdrop, DialogBody, DialogCloseTrigger, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogRoot, DialogTitle, DialogTrigger, Drawer, DrawerActionTrigger, DrawerBackTrigger, DrawerBackdrop, DrawerBody, DrawerCloseTrigger, DrawerContent, DrawerFooter, DrawerFullScreenHeader, DrawerHeader, DrawerTitle, DrawerTrigger, Expandable, ExpandableAlert, ExpandableItem, Field, type FieldBaseProps, FieldErrorText, FieldLabel, type FieldProps, Fieldset, FieldsetContent, FieldsetErrorText, FieldsetHelperText, FieldsetLegend, FloatingActionButton, type GroupVariantProps, Heading, type HeadingProps, IconButton, type IconButtonProps, InfoTag, type InfoTagProps, Input, type InputProps, ItemDescription, ItemLabel, JumpButton, Language, LanguageProvider, LightFullScreenLoader, LightInlineLoader, type LightInlineLoaderProps, LightSpinner, type LightSpinnerProps, LineIcon, type LineIconProps, type LinkProps, List, ListBox, ListIndicator, ListItem, type MediaControllerVariantProps, NativeSelect, type NativeSelectdProps, Nudge, NudgeActions, NudgeCloseTrigger, NudgeContent, type NudgeProps, NudgeTrigger, NudgeWizardStep, NumericStepper, type NumericStepperProps, Pagination, PaginationEllipsis, PaginationItem, PaginationItems, PaginationNextTrigger, PaginationPrevTrigger, PasswordInput, type PasswordInputProps, type PasswordVisibilityProps, PhoneNumberInput, PlayPauseButton, Popover, PopoverContent, type PopoverProps, PopoverTrigger, PressableCard, ProgressBar, type ProgressBarProps, ProgressIndicator, type ProgressIndicatorProps, type ProgressIndicatorVariantProps, ProgressLoader, type ProgressLoaderProps, type ProgressLoaderVariantProps, Radio, RadioCard, RadioCardGroup, RadioCardLabel, RadioGroup, type RadioProps, RangeCalendar, ScrollCalendar, SearchInput, type SearchInputProps, Select, SelectContent, SelectItem, SelectItemGroup, SelectItemText, SelectLabel, type SelectProps, SelectRoot, SelectTrigger, SelectValueText, Separator, ServiceAlert, Skeleton, SkeletonCircle, type SkeletonCircleProps, type SkeletonProps, SkeletonText, type SkeletonTextProps, SkipButton, type SpinnerProps, SporProvider, StaticCard, type StaticCardProps, Stepper, StepperStep, type StepperVariantProps, SvgBox, Switch, type SwitchProps, Table, TableBody, type TableBodyProps, TableColumnHeader, type TableColumnHeaderProps, type TableProps, Tabs, TabsContent, TabsIndicator, TabsList, type TabsProps, TabsTrigger, Text, TextLink, type TextProps, Textarea, type TextareaProps, TimePicker, Tooltip, TooltipContent, type TooltipProps, TooltipTrigger, type TranslationObject, type Translations, TravelTag, type TravelTagProps, type UseColorModeReturn, VyLogo, VyLogoPride, createTexts, createToast, fontFaces, slugify, system, themes, useCalendar, useColorMode, useColorModeValue, useTableSort, useTranslation };
|
|
3819
|
+
export { Accordion, AccordionItem, AccordionItemContent, AccordionItemTrigger, Alert, type AlertProps, AttachedInputs, type AttachedInputsProps, Autocomplete, AutocompleteItem, AutocompleteItemGroup, AutocompleteItemGroupLabel, Badge, type BadgeProps, Brand, Breadcrumb, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, type ButtonVariantProps, Calendar, CalendarCell, CalendarGrid, CalendarHeader, type CalendarMode, CalendarProvider, type CalendarValue, CardSelect, CardSelectContent, CardSelectTrigger, type CardSelectTriggerProps, CargonetLogo, type CargonetLogoProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, ChoiceChip, type ChoiceChipProps, Clipboard, ClipboardButton, CloseButton, type CloseButtonProps, CloseDrawerLine, Code, ColorInlineLoader, type ColorInlineLoaderProps, type ColorMode, ColorModeButton, ColorModeIcon, ColorModeProvider, type ColorModeProviderProps, ColorSpinner, type ColorSpinnerProps, Combobox, type ComboboxProps, ContentLoader, type ContentLoaderProps, type CountryCodeAndPhoneNumber, DarkFullScreenLoader, DarkInlineLoader, type DarkInlineLoaderProps, DarkSpinner, type DarkSpinnerProps, DatePicker, type DatePickerVariantProps, DateRangePicker, DialogActionTrigger, DialogBackdrop, DialogBody, DialogCloseTrigger, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogRoot, DialogTitle, DialogTrigger, Drawer, DrawerActionTrigger, DrawerBackTrigger, DrawerBackdrop, DrawerBody, DrawerCloseTrigger, DrawerContent, DrawerFooter, DrawerFullScreenHeader, DrawerHeader, DrawerTitle, DrawerTrigger, Expandable, ExpandableAlert, ExpandableItem, Field, type FieldBaseProps, FieldErrorText, FieldLabel, type FieldProps, Fieldset, FieldsetContent, FieldsetErrorText, FieldsetHelperText, FieldsetLegend, FloatingActionButton, type GroupVariantProps, Heading, type HeadingProps, IconButton, type IconButtonProps, InfoTag, type InfoTagProps, Input, type InputProps, ItemDescription, ItemLabel, JumpButton, Language, LanguageProvider, LightFullScreenLoader, LightInlineLoader, type LightInlineLoaderProps, LightSpinner, type LightSpinnerProps, LineIcon, type LineIconProps, type LinkProps, List, ListBox, ListIndicator, ListItem, type MediaControllerVariantProps, Menu, MenuCheckboxItem, MenuContent, MenuItem, MenuItemGroup, type MenuItemGroupProps, type MenuItemProps, MenuRadioItem, MenuRadioItemGroup, MenuSeparator, MenuTrigger, MenuTriggerItem, type MenuTriggerItemProps, type MenuTriggerProps, NativeSelect, type NativeSelectdProps, Nudge, NudgeActions, NudgeCloseTrigger, NudgeContent, type NudgeProps, NudgeTrigger, NudgeWizardStep, NumericStepper, type NumericStepperProps, Pagination, PaginationEllipsis, PaginationItem, PaginationItems, PaginationNextTrigger, PaginationPrevTrigger, PasswordInput, type PasswordInputProps, type PasswordVisibilityProps, PhoneNumberInput, PlayPauseButton, Popover, PopoverContent, type PopoverProps, PopoverTrigger, PressableCard, ProgressBar, type ProgressBarProps, ProgressIndicator, type ProgressIndicatorProps, type ProgressIndicatorVariantProps, ProgressLoader, type ProgressLoaderProps, type ProgressLoaderVariantProps, Radio, RadioCard, RadioCardGroup, RadioCardLabel, RadioGroup, type RadioProps, RangeCalendar, ScrollCalendar, SearchInput, type SearchInputProps, Select, SelectContent, SelectItem, SelectItemGroup, SelectItemText, SelectLabel, type SelectProps, SelectRoot, SelectTrigger, SelectValueText, Separator, ServiceAlert, Skeleton, SkeletonCircle, type SkeletonCircleProps, type SkeletonProps, SkeletonText, type SkeletonTextProps, SkipButton, type SpinnerProps, SporProvider, StaticCard, type StaticCardProps, Stepper, StepperStep, type StepperVariantProps, SvgBox, Switch, type SwitchProps, Table, TableBody, type TableBodyProps, TableColumnHeader, type TableColumnHeaderProps, type TableProps, Tabs, TabsContent, TabsIndicator, TabsList, type TabsProps, TabsTrigger, Text, TextLink, type TextProps, Textarea, type TextareaProps, TimePicker, Tooltip, TooltipContent, type TooltipProps, TooltipTrigger, type TranslationObject, type Translations, TravelTag, type TravelTagProps, type UseColorModeReturn, VyLogo, VyLogoPride, createTexts, createToast, fontFaces, slugify, system, themes, useCalendar, useColorMode, useColorModeValue, useMenuContext, useTableSort, useTranslation };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
2
|
import React__default, { ReactNode, PropsWithChildren, ComponentProps } from 'react';
|
|
3
3
|
import * as _chakra_ui_react from '@chakra-ui/react';
|
|
4
|
-
import { Accordion as Accordion$1, Alert as Alert$1, ConditionalValue, Breadcrumb as Breadcrumb$1, ButtonProps as ButtonProps$1, RecipeVariantProps, GroupProps, Clipboard as Clipboard$1, IconButtonProps as IconButtonProps$1, BoxProps, SystemStyleObject, RadioCard as RadioCard$1, SeparatorProps, Field as Field$1, PopoverRootProps, Dialog, Drawer as Drawer$1, Combobox as Combobox$1, Checkbox as Checkbox$1, CheckboxGroup as CheckboxGroup$1, CheckboxCard, CheckboxCardRootProps, Fieldset as Fieldset$1, Input as Input$1, ListRootProps, NativeSelect as NativeSelect$1, NativeSelectFieldProps, RadioGroup as RadioGroup$1, SelectRootProps, Select as Select$1, SelectLabelProps, CollectionItem, Switch as Switch$1, TextareaProps as TextareaProps$1, LinkProps as LinkProps$1, List as List$1, UseProgressProps, SkeletonProps as SkeletonProps$1, CircleProps, Popover as Popover$1, Pagination as Pagination$1, ChakraProviderProps, SystemContext, Tabs as Tabs$1, TabsRootProps, Table as Table$1, TableBodyProps as TableBodyProps$1, TableColumnHeaderProps as TableColumnHeaderProps$1, TableRootProps, Tooltip as Tooltip$1, BadgeProps as BadgeProps$1, CodeProps, HeadingProps as HeadingProps$1, TextProps as TextProps$1 } from '@chakra-ui/react';
|
|
4
|
+
import { Accordion as Accordion$1, Alert as Alert$1, ConditionalValue, Breadcrumb as Breadcrumb$1, ButtonProps as ButtonProps$1, RecipeVariantProps, GroupProps, Clipboard as Clipboard$1, IconButtonProps as IconButtonProps$1, BoxProps, SystemStyleObject, RadioCard as RadioCard$1, SeparatorProps, Field as Field$1, PopoverRootProps, Dialog, Drawer as Drawer$1, Combobox as Combobox$1, Checkbox as Checkbox$1, CheckboxGroup as CheckboxGroup$1, CheckboxCard, CheckboxCardRootProps, Fieldset as Fieldset$1, Input as Input$1, ListRootProps, MenuRootProps, Menu as Menu$1, MenuItemGroupProps as MenuItemGroupProps$1, MenuItemProps as MenuItemProps$1, MenuTriggerItemProps as MenuTriggerItemProps$1, NativeSelect as NativeSelect$1, NativeSelectFieldProps, RadioGroup as RadioGroup$1, SelectRootProps, Select as Select$1, SelectLabelProps, CollectionItem, Switch as Switch$1, TextareaProps as TextareaProps$1, LinkProps as LinkProps$1, List as List$1, UseProgressProps, SkeletonProps as SkeletonProps$1, CircleProps, Popover as Popover$1, Pagination as Pagination$1, ChakraProviderProps, SystemContext, Tabs as Tabs$1, TabsRootProps, Table as Table$1, TableBodyProps as TableBodyProps$1, TableColumnHeaderProps as TableColumnHeaderProps$1, TableRootProps, Tooltip as Tooltip$1, BadgeProps as BadgeProps$1, CodeProps, HeadingProps as HeadingProps$1, TextProps as TextProps$1 } from '@chakra-ui/react';
|
|
5
5
|
export { AspectRatio, Box, BoxProps, BreadcrumbCurrentLink, BreadcrumbEllipsis, BreadcrumbLink, Center, CenterProps, ClientOnly, Collapsible, CollapsibleRootProps, Container, ContainerProps, Em, Flex, FlexProps, For, FormatByte, FormatNumber, Grid, GridItem, GridItemProps, GridProps, HStack, Icon, Image, ImageProps, Kbd, LocaleProvider, Portal, PortalProps, Show, SimpleGrid, SimpleGridProps, Spacer, SpacerProps, Span, Stack, SystemConfig, TableCaption, TableCaptionProps, TableCell, TableCellProps, TableColumn, TableColumnGroup, TableColumnProps, TableFooter, TableFooterProps, TableHeader, TableHeaderProps, TableRoot, TableRootProps, TableRow, TableRowProps, UseDisclosureProps, VStack, VisuallyHidden, Wrap, createIcon, createListCollection, createSystem, defineConfig, defineRecipe, defineSlotRecipe, defineStyle, mergeConfigs, chakra as spor, useBreakpointValue, useCheckbox, useClipboard, useControllableProp, useDisclosure, useMediaQuery, useRecipe, useSlotRecipe, useToken } from '@chakra-ui/react';
|
|
6
6
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
7
7
|
import { IconComponent } from '@vygruppen/spor-icon-react';
|
|
@@ -1596,6 +1596,69 @@ declare function ItemDescription({ children }: {
|
|
|
1596
1596
|
children: React__default.ReactNode;
|
|
1597
1597
|
}): react_jsx_runtime.JSX.Element;
|
|
1598
1598
|
|
|
1599
|
+
type Variant$2 = Pick<MenuRootProps, "variant">;
|
|
1600
|
+
declare const useMenuContext: () => Variant$2;
|
|
1601
|
+
/**
|
|
1602
|
+
* Menu component.
|
|
1603
|
+
*
|
|
1604
|
+
* Used to create an accessible dropdown menu.
|
|
1605
|
+
*
|
|
1606
|
+
* @example
|
|
1607
|
+
* ```tsx
|
|
1608
|
+
<Menu>
|
|
1609
|
+
<MenuTrigger> Menu </MenuTrigger>
|
|
1610
|
+
<MenuContent>
|
|
1611
|
+
<MenuItem value="1"> Item 1 </MenuItem>
|
|
1612
|
+
<MenuItem value="2"> Item 2 </MenuItem>
|
|
1613
|
+
<MenuItem value="3"> Item 3 </MenuItem>
|
|
1614
|
+
</MenuContent>
|
|
1615
|
+
</Menu>
|
|
1616
|
+
* ```
|
|
1617
|
+
*
|
|
1618
|
+
*/
|
|
1619
|
+
declare const Menu: ({ children, ...props }: MenuRootProps) => react_jsx_runtime.JSX.Element;
|
|
1620
|
+
declare const MenuContent: React$1.ForwardRefExoticComponent<Menu$1.ContentProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1621
|
+
type MenuTriggerProps = {
|
|
1622
|
+
/** An optional trigger button icon, rendered to the left of the label */
|
|
1623
|
+
icon?: ReactNode;
|
|
1624
|
+
} & Omit<ButtonProps, "variant" | "rightIcon" | "leftIcon">;
|
|
1625
|
+
declare const MenuTrigger: React$1.ForwardRefExoticComponent<{
|
|
1626
|
+
/** An optional trigger button icon, rendered to the left of the label */
|
|
1627
|
+
icon?: ReactNode;
|
|
1628
|
+
} & Omit<ButtonProps, "variant" | "leftIcon" | "rightIcon"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1629
|
+
type MenuItemProps = {
|
|
1630
|
+
/** Display a command in the menu */
|
|
1631
|
+
itemCommand?: string;
|
|
1632
|
+
leftIcon?: React.ReactNode;
|
|
1633
|
+
rightIcon?: React.ReactNode;
|
|
1634
|
+
} & MenuItemProps$1;
|
|
1635
|
+
declare const MenuItem: React$1.ForwardRefExoticComponent<{
|
|
1636
|
+
/** Display a command in the menu */
|
|
1637
|
+
itemCommand?: string;
|
|
1638
|
+
leftIcon?: React.ReactNode;
|
|
1639
|
+
rightIcon?: React.ReactNode;
|
|
1640
|
+
} & Menu$1.ItemProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1641
|
+
type MenuTriggerItemProps = {
|
|
1642
|
+
leftIcon?: React.ReactNode;
|
|
1643
|
+
rightIcon?: React.ReactNode;
|
|
1644
|
+
} & MenuTriggerItemProps$1;
|
|
1645
|
+
declare const MenuTriggerItem: React$1.ForwardRefExoticComponent<{
|
|
1646
|
+
leftIcon?: React.ReactNode;
|
|
1647
|
+
rightIcon?: React.ReactNode;
|
|
1648
|
+
} & Menu$1.TriggerItemProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1649
|
+
declare const MenuRadioItemGroup: React$1.ForwardRefExoticComponent<Menu$1.RadioItemGroupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1650
|
+
declare const MenuRadioItem: React$1.ForwardRefExoticComponent<Menu$1.RadioItemProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1651
|
+
type MenuItemGroupProps = {
|
|
1652
|
+
/** Display group label */
|
|
1653
|
+
label?: string;
|
|
1654
|
+
} & MenuItemGroupProps$1;
|
|
1655
|
+
declare const MenuItemGroup: React$1.ForwardRefExoticComponent<{
|
|
1656
|
+
/** Display group label */
|
|
1657
|
+
label?: string;
|
|
1658
|
+
} & Menu$1.ItemGroupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1659
|
+
declare const MenuCheckboxItem: React$1.ForwardRefExoticComponent<Menu$1.CheckboxItemProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1660
|
+
declare const MenuSeparator: React$1.ForwardRefExoticComponent<React$1.RefAttributes<Menu$1.SeparatorProps>>;
|
|
1661
|
+
|
|
1599
1662
|
declare const nativeSelectSlotRecipe: _chakra_ui_react.SlotRecipeDefinition<"icon" | "root" | "field", {
|
|
1600
1663
|
variant: {
|
|
1601
1664
|
core: {
|
|
@@ -3753,4 +3816,4 @@ declare const Text: React$1.ForwardRefExoticComponent<Omit<TextProps$1, "textSty
|
|
|
3753
3816
|
**/
|
|
3754
3817
|
declare function slugify(text: string | string[], maxLength?: number): string;
|
|
3755
3818
|
|
|
3756
|
-
export { Accordion, AccordionItem, AccordionItemContent, AccordionItemTrigger, Alert, type AlertProps, AttachedInputs, type AttachedInputsProps, Autocomplete, AutocompleteItem, AutocompleteItemGroup, AutocompleteItemGroupLabel, Badge, type BadgeProps, Brand, Breadcrumb, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, type ButtonVariantProps, Calendar, CalendarCell, CalendarGrid, CalendarHeader, type CalendarMode, CalendarProvider, type CalendarValue, CardSelect, CardSelectContent, CardSelectTrigger, type CardSelectTriggerProps, CargonetLogo, type CargonetLogoProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, ChoiceChip, type ChoiceChipProps, Clipboard, ClipboardButton, CloseButton, type CloseButtonProps, CloseDrawerLine, Code, ColorInlineLoader, type ColorInlineLoaderProps, type ColorMode, ColorModeButton, ColorModeIcon, ColorModeProvider, type ColorModeProviderProps, ColorSpinner, type ColorSpinnerProps, Combobox, type ComboboxProps, ContentLoader, type ContentLoaderProps, type CountryCodeAndPhoneNumber, DarkFullScreenLoader, DarkInlineLoader, type DarkInlineLoaderProps, DarkSpinner, type DarkSpinnerProps, DatePicker, type DatePickerVariantProps, DateRangePicker, DialogActionTrigger, DialogBackdrop, DialogBody, DialogCloseTrigger, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogRoot, DialogTitle, DialogTrigger, Drawer, DrawerActionTrigger, DrawerBackTrigger, DrawerBackdrop, DrawerBody, DrawerCloseTrigger, DrawerContent, DrawerFooter, DrawerFullScreenHeader, DrawerHeader, DrawerTitle, DrawerTrigger, Expandable, ExpandableAlert, ExpandableItem, Field, type FieldBaseProps, FieldErrorText, FieldLabel, type FieldProps, Fieldset, FieldsetContent, FieldsetErrorText, FieldsetHelperText, FieldsetLegend, FloatingActionButton, type GroupVariantProps, Heading, type HeadingProps, IconButton, type IconButtonProps, InfoTag, type InfoTagProps, Input, type InputProps, ItemDescription, ItemLabel, JumpButton, Language, LanguageProvider, LightFullScreenLoader, LightInlineLoader, type LightInlineLoaderProps, LightSpinner, type LightSpinnerProps, LineIcon, type LineIconProps, type LinkProps, List, ListBox, ListIndicator, ListItem, type MediaControllerVariantProps, NativeSelect, type NativeSelectdProps, Nudge, NudgeActions, NudgeCloseTrigger, NudgeContent, type NudgeProps, NudgeTrigger, NudgeWizardStep, NumericStepper, type NumericStepperProps, Pagination, PaginationEllipsis, PaginationItem, PaginationItems, PaginationNextTrigger, PaginationPrevTrigger, PasswordInput, type PasswordInputProps, type PasswordVisibilityProps, PhoneNumberInput, PlayPauseButton, Popover, PopoverContent, type PopoverProps, PopoverTrigger, PressableCard, ProgressBar, type ProgressBarProps, ProgressIndicator, type ProgressIndicatorProps, type ProgressIndicatorVariantProps, ProgressLoader, type ProgressLoaderProps, type ProgressLoaderVariantProps, Radio, RadioCard, RadioCardGroup, RadioCardLabel, RadioGroup, type RadioProps, RangeCalendar, ScrollCalendar, SearchInput, type SearchInputProps, Select, SelectContent, SelectItem, SelectItemGroup, SelectItemText, SelectLabel, type SelectProps, SelectRoot, SelectTrigger, SelectValueText, Separator, ServiceAlert, Skeleton, SkeletonCircle, type SkeletonCircleProps, type SkeletonProps, SkeletonText, type SkeletonTextProps, SkipButton, type SpinnerProps, SporProvider, StaticCard, type StaticCardProps, Stepper, StepperStep, type StepperVariantProps, SvgBox, Switch, type SwitchProps, Table, TableBody, type TableBodyProps, TableColumnHeader, type TableColumnHeaderProps, type TableProps, Tabs, TabsContent, TabsIndicator, TabsList, type TabsProps, TabsTrigger, Text, TextLink, type TextProps, Textarea, type TextareaProps, TimePicker, Tooltip, TooltipContent, type TooltipProps, TooltipTrigger, type TranslationObject, type Translations, TravelTag, type TravelTagProps, type UseColorModeReturn, VyLogo, VyLogoPride, createTexts, createToast, fontFaces, slugify, system, themes, useCalendar, useColorMode, useColorModeValue, useTableSort, useTranslation };
|
|
3819
|
+
export { Accordion, AccordionItem, AccordionItemContent, AccordionItemTrigger, Alert, type AlertProps, AttachedInputs, type AttachedInputsProps, Autocomplete, AutocompleteItem, AutocompleteItemGroup, AutocompleteItemGroupLabel, Badge, type BadgeProps, Brand, Breadcrumb, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, type ButtonVariantProps, Calendar, CalendarCell, CalendarGrid, CalendarHeader, type CalendarMode, CalendarProvider, type CalendarValue, CardSelect, CardSelectContent, CardSelectTrigger, type CardSelectTriggerProps, CargonetLogo, type CargonetLogoProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, ChoiceChip, type ChoiceChipProps, Clipboard, ClipboardButton, CloseButton, type CloseButtonProps, CloseDrawerLine, Code, ColorInlineLoader, type ColorInlineLoaderProps, type ColorMode, ColorModeButton, ColorModeIcon, ColorModeProvider, type ColorModeProviderProps, ColorSpinner, type ColorSpinnerProps, Combobox, type ComboboxProps, ContentLoader, type ContentLoaderProps, type CountryCodeAndPhoneNumber, DarkFullScreenLoader, DarkInlineLoader, type DarkInlineLoaderProps, DarkSpinner, type DarkSpinnerProps, DatePicker, type DatePickerVariantProps, DateRangePicker, DialogActionTrigger, DialogBackdrop, DialogBody, DialogCloseTrigger, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogRoot, DialogTitle, DialogTrigger, Drawer, DrawerActionTrigger, DrawerBackTrigger, DrawerBackdrop, DrawerBody, DrawerCloseTrigger, DrawerContent, DrawerFooter, DrawerFullScreenHeader, DrawerHeader, DrawerTitle, DrawerTrigger, Expandable, ExpandableAlert, ExpandableItem, Field, type FieldBaseProps, FieldErrorText, FieldLabel, type FieldProps, Fieldset, FieldsetContent, FieldsetErrorText, FieldsetHelperText, FieldsetLegend, FloatingActionButton, type GroupVariantProps, Heading, type HeadingProps, IconButton, type IconButtonProps, InfoTag, type InfoTagProps, Input, type InputProps, ItemDescription, ItemLabel, JumpButton, Language, LanguageProvider, LightFullScreenLoader, LightInlineLoader, type LightInlineLoaderProps, LightSpinner, type LightSpinnerProps, LineIcon, type LineIconProps, type LinkProps, List, ListBox, ListIndicator, ListItem, type MediaControllerVariantProps, Menu, MenuCheckboxItem, MenuContent, MenuItem, MenuItemGroup, type MenuItemGroupProps, type MenuItemProps, MenuRadioItem, MenuRadioItemGroup, MenuSeparator, MenuTrigger, MenuTriggerItem, type MenuTriggerItemProps, type MenuTriggerProps, NativeSelect, type NativeSelectdProps, Nudge, NudgeActions, NudgeCloseTrigger, NudgeContent, type NudgeProps, NudgeTrigger, NudgeWizardStep, NumericStepper, type NumericStepperProps, Pagination, PaginationEllipsis, PaginationItem, PaginationItems, PaginationNextTrigger, PaginationPrevTrigger, PasswordInput, type PasswordInputProps, type PasswordVisibilityProps, PhoneNumberInput, PlayPauseButton, Popover, PopoverContent, type PopoverProps, PopoverTrigger, PressableCard, ProgressBar, type ProgressBarProps, ProgressIndicator, type ProgressIndicatorProps, type ProgressIndicatorVariantProps, ProgressLoader, type ProgressLoaderProps, type ProgressLoaderVariantProps, Radio, RadioCard, RadioCardGroup, RadioCardLabel, RadioGroup, type RadioProps, RangeCalendar, ScrollCalendar, SearchInput, type SearchInputProps, Select, SelectContent, SelectItem, SelectItemGroup, SelectItemText, SelectLabel, type SelectProps, SelectRoot, SelectTrigger, SelectValueText, Separator, ServiceAlert, Skeleton, SkeletonCircle, type SkeletonCircleProps, type SkeletonProps, SkeletonText, type SkeletonTextProps, SkipButton, type SpinnerProps, SporProvider, StaticCard, type StaticCardProps, Stepper, StepperStep, type StepperVariantProps, SvgBox, Switch, type SwitchProps, Table, TableBody, type TableBodyProps, TableColumnHeader, type TableColumnHeaderProps, type TableProps, Tabs, TabsContent, TabsIndicator, TabsList, type TabsProps, TabsTrigger, Text, TextLink, type TextProps, Textarea, type TextareaProps, TimePicker, Tooltip, TooltipContent, type TooltipProps, TooltipTrigger, type TranslationObject, type Translations, TravelTag, type TravelTagProps, type UseColorModeReturn, VyLogo, VyLogoPride, createTexts, createToast, fontFaces, slugify, system, themes, useCalendar, useColorMode, useColorModeValue, useMenuContext, useTableSort, useTranslation };
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useSlotRecipe, Accordion as Accordion$1, Stack, Box, HStack, Progress, defineRecipe, chakra, Text, useRecipe, Circle, Skeleton as Skeleton$1, Button as Button$1, Group, Badge as Badge$1, Code as Code$1, Clipboard as Clipboard$1, IconButton as IconButton$1, useDisclosure, Alert as Alert$1, Span, Flex, Breadcrumb as Breadcrumb$1, RadioCard as RadioCard$1, Separator as Separator$1, ClientOnly, Field, defineStyle, PopoverAnchor, useFieldContext, Popover as Popover$1, Portal, Dialog, createContext as createContext$1, useDialogContext, Drawer as Drawer$1, InputElement, Input as Input$1, useFilter, useListCollection, useCombobox, Combobox, useComboboxContext, usePopoverContext, Checkbox as Checkbox$1, CheckboxCard, Fieldset as Fieldset$1, NativeSelect as NativeSelect$1, useControllableState, createListCollection, RadioGroup as RadioGroup$1, Select as Select$1, useSelectContext, Switch as Switch$1, Textarea as Textarea$1, Link, List as List$1, Center, PopoverCloseTrigger, Pagination as Pagination$1, usePaginationContext, createToaster, Tabs as Tabs$1, Table as Table$1, defineSemanticTokens, defineSlotRecipe, defineTokens, defineAnimationStyles, defineGlobalStyles, defineTextStyles, createSystem, defaultBaseConfig, Tooltip as Tooltip$1, VisuallyHidden as VisuallyHidden$1, defineConfig, CheckboxGroup as CheckboxGroup$1, ListItem, ChakraProvider, Toaster as Toaster$1, Toast } from '@chakra-ui/react';
|
|
1
|
+
import { useSlotRecipe, Accordion as Accordion$1, Stack, Box, HStack, Progress, defineRecipe, chakra, Text, useRecipe, Circle, Skeleton as Skeleton$1, Button as Button$1, Group, Badge as Badge$1, Code as Code$1, Clipboard as Clipboard$1, IconButton as IconButton$1, useDisclosure, Alert as Alert$1, Span, Flex, Breadcrumb as Breadcrumb$1, RadioCard as RadioCard$1, Separator as Separator$1, ClientOnly, Field, defineStyle, PopoverAnchor, useFieldContext, Popover as Popover$1, Portal, Dialog, createContext as createContext$1, useDialogContext, Drawer as Drawer$1, InputElement, Input as Input$1, useFilter, useListCollection, useCombobox, Combobox, useComboboxContext, usePopoverContext, Checkbox as Checkbox$1, CheckboxCard, Fieldset as Fieldset$1, Menu as Menu$1, useMenuContext as useMenuContext$1, NativeSelect as NativeSelect$1, useControllableState, createListCollection, RadioGroup as RadioGroup$1, Select as Select$1, useSelectContext, Switch as Switch$1, Textarea as Textarea$1, Link, List as List$1, Center, PopoverCloseTrigger, Pagination as Pagination$1, usePaginationContext, createToaster, Tabs as Tabs$1, Table as Table$1, defineSemanticTokens, defineSlotRecipe, defineTokens, defineAnimationStyles, defineGlobalStyles, defineTextStyles, createSystem, defaultBaseConfig, Tooltip as Tooltip$1, VisuallyHidden as VisuallyHidden$1, defineConfig, CheckboxGroup as CheckboxGroup$1, ListItem, ChakraProvider, Toaster as Toaster$1, Toast } from '@chakra-ui/react';
|
|
2
2
|
export { AspectRatio, Box, BreadcrumbCurrentLink, BreadcrumbEllipsis, BreadcrumbLink, Center, ClientOnly, Collapsible, Container, Em, Flex, For, FormatByte, FormatNumber, Grid, GridItem, HStack, Icon, Image, Kbd, LocaleProvider, Portal, Show, SimpleGrid, Spacer, Span, Stack, TableCaption, TableCell, TableColumn, TableColumnGroup, TableFooter, TableHeader, TableRoot, TableRow, VStack, VisuallyHidden, Wrap, createIcon, createListCollection, createSystem, defineConfig, defineRecipe, defineSlotRecipe, defineStyle, mergeConfigs, chakra as spor, useBreakpointValue, useCheckbox, useClipboard, useControllableProp, useDisclosure, useMediaQuery, useRecipe, useSlotRecipe, useToken } from '@chakra-ui/react';
|
|
3
3
|
import * as spor_icon_react_star from '@vygruppen/spor-icon-react';
|
|
4
4
|
import { DropdownDownFill24Icon, CopyOutline18Icon, CheckmarkFill18Icon, CloseFill18Icon, CloseFill30Icon, CloseFill24Icon, InformationFill24Icon, ServiceFill24Icon, QuestionFill24Icon, ErrorOutline24Icon, ErrorFill24Icon, AltTransportFill24Icon, WarningFill24Icon, SuccessFill24Icon, DropdownDownFill18Icon, DropdownRightFill18Icon, CalendarOutline24Icon, ArrowLeftFill24Icon, ChangeDirectionOutline24Icon, CloseOutline24Icon, SearchOutline24Icon, Forward15MediaControllerFill30Icon, Backward15MediaControllerFill30Icon, PauseMediaControllerFill24Icon, PlayMediaControllerFill24Icon, NextMediaControllerFill30Icon, PreviousMediaControllerFill30Icon, ArrowRightFill18Icon, DropdownLeftOutline18Icon, DropdownRightOutline18Icon, ArrowUpFill18Icon, ArrowDownFill18Icon, ChangeDirectionFill18Icon, WalkFill30Icon, WalkFill24Icon, WalkFill18Icon, AltTransportFill30Icon, AltTransportFill18Icon, TramFill30Icon, TramFill24Icon, TramFill18Icon, SubwayFill30Icon, SubwayFill24Icon, SubwayFill18Icon, FerryFill30Icon, FerryFill24Icon, FerryFill18Icon, BusFill30Icon, BusFill24Icon, BusFill18Icon, ExpressBusFill30Icon, ExpressBusFill24Icon, ExpressBusFill18Icon, TrainFill30Icon, TrainFill24Icon, TrainFill18Icon, InformationFill18Icon, WarningFill18Icon, ErrorFill18Icon, LinkOutOutline24Icon, LinkOutOutline18Icon, ArrowLeftOutline24Icon, ArrowRightOutline24Icon, DropdownLeftFill18Icon } from '@vygruppen/spor-icon-react';
|
|
@@ -4075,6 +4075,127 @@ function ListBoxSection({ section, state }) {
|
|
|
4075
4075
|
) })
|
|
4076
4076
|
] }) });
|
|
4077
4077
|
}
|
|
4078
|
+
var CustomMenuContext = createContext({
|
|
4079
|
+
variant: "core"
|
|
4080
|
+
});
|
|
4081
|
+
var useMenuContext = () => useContext(CustomMenuContext);
|
|
4082
|
+
var Menu = ({ children, ...props }) => {
|
|
4083
|
+
return /* @__PURE__ */ jsx(
|
|
4084
|
+
CustomMenuContext.Provider,
|
|
4085
|
+
{
|
|
4086
|
+
value: {
|
|
4087
|
+
variant: props.variant
|
|
4088
|
+
},
|
|
4089
|
+
children: /* @__PURE__ */ jsx(Menu$1.Root, { ...props, children })
|
|
4090
|
+
}
|
|
4091
|
+
);
|
|
4092
|
+
};
|
|
4093
|
+
var MenuContent = forwardRef(
|
|
4094
|
+
({ children, ...props }, ref) => {
|
|
4095
|
+
return /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(Menu$1.Positioner, { children: /* @__PURE__ */ jsx(Menu$1.Content, { ref, ...props, children }) }) });
|
|
4096
|
+
}
|
|
4097
|
+
);
|
|
4098
|
+
MenuContent.displayName = "MenuContent";
|
|
4099
|
+
var MenuTrigger = forwardRef(
|
|
4100
|
+
({ icon, size, children, ...props }, ref) => {
|
|
4101
|
+
const { variant } = useMenuContext();
|
|
4102
|
+
const { open } = useMenuContext$1();
|
|
4103
|
+
const ChevronIcon = size === "sm" ? DropdownDownFill18Icon : DropdownDownFill24Icon;
|
|
4104
|
+
const getButtonVariant = () => {
|
|
4105
|
+
if (variant === "floating")
|
|
4106
|
+
return "floating";
|
|
4107
|
+
if (variant === "accent")
|
|
4108
|
+
return "secondary";
|
|
4109
|
+
return "tertiary";
|
|
4110
|
+
};
|
|
4111
|
+
return /* @__PURE__ */ jsx(Menu$1.Trigger, { asChild: true, ref, children: /* @__PURE__ */ jsx(
|
|
4112
|
+
Button,
|
|
4113
|
+
{
|
|
4114
|
+
leftIcon: icon,
|
|
4115
|
+
variant: getButtonVariant(),
|
|
4116
|
+
size,
|
|
4117
|
+
...props,
|
|
4118
|
+
rightIcon: /* @__PURE__ */ jsx(
|
|
4119
|
+
ChevronIcon,
|
|
4120
|
+
{
|
|
4121
|
+
transform: open ? "rotate(180deg)" : void 0,
|
|
4122
|
+
transition: "transform 0.3s"
|
|
4123
|
+
}
|
|
4124
|
+
),
|
|
4125
|
+
children
|
|
4126
|
+
}
|
|
4127
|
+
) });
|
|
4128
|
+
}
|
|
4129
|
+
);
|
|
4130
|
+
MenuTrigger.displayName = "MenuTrigger";
|
|
4131
|
+
var MenuItem = forwardRef(
|
|
4132
|
+
({ itemCommand, children, value, leftIcon, rightIcon, ...props }, ref) => {
|
|
4133
|
+
return /* @__PURE__ */ jsxs(Menu$1.Item, { value, ...props, ref, children: [
|
|
4134
|
+
leftIcon,
|
|
4135
|
+
children,
|
|
4136
|
+
itemCommand && /* @__PURE__ */ jsx(Menu$1.ItemCommand, { children: itemCommand }),
|
|
4137
|
+
rightIcon
|
|
4138
|
+
] });
|
|
4139
|
+
}
|
|
4140
|
+
);
|
|
4141
|
+
MenuItem.displayName = "MenuItem";
|
|
4142
|
+
var MenuTriggerItem = forwardRef(
|
|
4143
|
+
({ children, leftIcon, rightIcon, ...props }, ref) => {
|
|
4144
|
+
return /* @__PURE__ */ jsxs(Menu$1.TriggerItem, { ...props, ref, children: [
|
|
4145
|
+
leftIcon,
|
|
4146
|
+
children,
|
|
4147
|
+
rightIcon
|
|
4148
|
+
] });
|
|
4149
|
+
}
|
|
4150
|
+
);
|
|
4151
|
+
MenuTriggerItem.displayName = "MenuTriggerItem";
|
|
4152
|
+
var MenuRadioItemGroup = forwardRef(({ children, ...props }) => {
|
|
4153
|
+
return /* @__PURE__ */ jsx(Menu$1.RadioItemGroup, { ...props, children });
|
|
4154
|
+
});
|
|
4155
|
+
MenuRadioItemGroup.displayName = "MenuRadioItemGroup";
|
|
4156
|
+
var MenuRadioItem = forwardRef(
|
|
4157
|
+
({ children, ...props }, ref) => {
|
|
4158
|
+
return /* @__PURE__ */ jsxs(Menu$1.RadioItem, { ...props, ref, children: [
|
|
4159
|
+
children,
|
|
4160
|
+
/* @__PURE__ */ jsx(Flex, { w: "1.25rem", justify: "center", align: "center", children: /* @__PURE__ */ jsx(Menu$1.ItemIndicator, {}) })
|
|
4161
|
+
] });
|
|
4162
|
+
}
|
|
4163
|
+
);
|
|
4164
|
+
MenuRadioItem.displayName = "MenuRadioItem";
|
|
4165
|
+
var MenuItemGroup = forwardRef(
|
|
4166
|
+
({ children, label, ...props }, ref) => {
|
|
4167
|
+
return /* @__PURE__ */ jsxs(Menu$1.ItemGroup, { ...props, ref, children: [
|
|
4168
|
+
label && /* @__PURE__ */ jsx(Menu$1.ItemGroupLabel, { children: label }),
|
|
4169
|
+
children
|
|
4170
|
+
] });
|
|
4171
|
+
}
|
|
4172
|
+
);
|
|
4173
|
+
MenuItemGroup.displayName = "MenuItemGroup";
|
|
4174
|
+
var MenuCheckboxItem = forwardRef(({ children, closeOnSelect = false, ...props }, ref) => {
|
|
4175
|
+
return /* @__PURE__ */ jsx(
|
|
4176
|
+
Menu$1.CheckboxItem,
|
|
4177
|
+
{
|
|
4178
|
+
...props,
|
|
4179
|
+
ref,
|
|
4180
|
+
closeOnSelect,
|
|
4181
|
+
checked: props.checked,
|
|
4182
|
+
onCheckedChange: props.onCheckedChange,
|
|
4183
|
+
children: /* @__PURE__ */ jsx(
|
|
4184
|
+
Checkbox,
|
|
4185
|
+
{
|
|
4186
|
+
checked: props.checked,
|
|
4187
|
+
onCheckedChange: () => props.onCheckedChange,
|
|
4188
|
+
children
|
|
4189
|
+
}
|
|
4190
|
+
)
|
|
4191
|
+
}
|
|
4192
|
+
);
|
|
4193
|
+
});
|
|
4194
|
+
MenuCheckboxItem.displayName = "MenuCheckboxItem";
|
|
4195
|
+
var MenuSeparator = forwardRef(({ ...props }) => {
|
|
4196
|
+
return /* @__PURE__ */ jsx(Menu$1.Separator, { ...props });
|
|
4197
|
+
});
|
|
4198
|
+
MenuSeparator.displayName = "MenuSeparator";
|
|
4078
4199
|
var NativeSelect = React20.forwardRef(function NativeSelect2(props, ref) {
|
|
4079
4200
|
const {
|
|
4080
4201
|
children,
|
|
@@ -7582,6 +7703,19 @@ var comboboxAnatomy = comboboxAnatomy$1.extendWith(
|
|
|
7582
7703
|
"indicatorGroup",
|
|
7583
7704
|
"empty"
|
|
7584
7705
|
);
|
|
7706
|
+
var menuAnatomy = createAnatomy("menu").parts(
|
|
7707
|
+
"trigger",
|
|
7708
|
+
"content",
|
|
7709
|
+
"item",
|
|
7710
|
+
"itemGroup",
|
|
7711
|
+
"triggerItem",
|
|
7712
|
+
"itemCommand",
|
|
7713
|
+
"itemGroupLabel",
|
|
7714
|
+
"separator",
|
|
7715
|
+
"radioItem",
|
|
7716
|
+
"triggerItem",
|
|
7717
|
+
"checkboxItem"
|
|
7718
|
+
);
|
|
7585
7719
|
|
|
7586
7720
|
// src/theme/slot-recipes/accordion.ts
|
|
7587
7721
|
var accordionSlotRecipe = defineSlotRecipe({
|
|
@@ -9870,6 +10004,107 @@ var mediaControllerSlotRecipe = defineSlotRecipe({
|
|
|
9870
10004
|
}
|
|
9871
10005
|
]
|
|
9872
10006
|
});
|
|
10007
|
+
var menuSlotRecipe = defineSlotRecipe({
|
|
10008
|
+
className: "menu",
|
|
10009
|
+
slots: menuAnatomy.keys(),
|
|
10010
|
+
base: {
|
|
10011
|
+
content: {
|
|
10012
|
+
bg: "bg",
|
|
10013
|
+
borderRadius: "sm",
|
|
10014
|
+
boxShadow: "sm",
|
|
10015
|
+
width: "fit-content",
|
|
10016
|
+
padding: "1",
|
|
10017
|
+
display: "flex",
|
|
10018
|
+
flexDirection: "column",
|
|
10019
|
+
gap: "0.5",
|
|
10020
|
+
zIndex: "dropdown",
|
|
10021
|
+
_open: {
|
|
10022
|
+
animationStyle: "slide-fade-in",
|
|
10023
|
+
animationDuration: "fast",
|
|
10024
|
+
zIndex: "popover",
|
|
10025
|
+
outline: "none"
|
|
10026
|
+
}
|
|
10027
|
+
},
|
|
10028
|
+
itemGroup: {
|
|
10029
|
+
display: "flex",
|
|
10030
|
+
flexDirection: "column",
|
|
10031
|
+
gap: "0.5"
|
|
10032
|
+
},
|
|
10033
|
+
item: {
|
|
10034
|
+
borderRadius: "9px",
|
|
10035
|
+
padding: "2",
|
|
10036
|
+
display: "flex",
|
|
10037
|
+
justifyContent: "space-between",
|
|
10038
|
+
gap: 1.5,
|
|
10039
|
+
_hover: {
|
|
10040
|
+
backgroundColor: "accent.surface.hover"
|
|
10041
|
+
},
|
|
10042
|
+
"&:active": {
|
|
10043
|
+
backgroundColor: "accent.surface.active"
|
|
10044
|
+
},
|
|
10045
|
+
_checked: {
|
|
10046
|
+
backgroundColor: "accent.surface"
|
|
10047
|
+
},
|
|
10048
|
+
_highlighted: {
|
|
10049
|
+
backgroundColor: "ghost.surface.hover"
|
|
10050
|
+
}
|
|
10051
|
+
},
|
|
10052
|
+
itemGroupLabel: {
|
|
10053
|
+
paddingY: "1",
|
|
10054
|
+
fontWeight: "bold",
|
|
10055
|
+
fontSize: "xs"
|
|
10056
|
+
},
|
|
10057
|
+
itemCommand: {
|
|
10058
|
+
fontSize: "2xs"
|
|
10059
|
+
},
|
|
10060
|
+
separator: {
|
|
10061
|
+
color: "outline"
|
|
10062
|
+
},
|
|
10063
|
+
radioItem: {
|
|
10064
|
+
display: "flex",
|
|
10065
|
+
justifyContent: "space-between",
|
|
10066
|
+
gap: 2
|
|
10067
|
+
},
|
|
10068
|
+
triggerItem: {
|
|
10069
|
+
display: "flex",
|
|
10070
|
+
justifyContent: "space-between",
|
|
10071
|
+
gap: 1.5,
|
|
10072
|
+
alignItems: "center"
|
|
10073
|
+
},
|
|
10074
|
+
checkboxItem: {
|
|
10075
|
+
display: "flex",
|
|
10076
|
+
gap: 2,
|
|
10077
|
+
alignItems: "center",
|
|
10078
|
+
width: "full"
|
|
10079
|
+
}
|
|
10080
|
+
},
|
|
10081
|
+
variants: {
|
|
10082
|
+
variant: {
|
|
10083
|
+
core: {
|
|
10084
|
+
content: {
|
|
10085
|
+
border: "1px solid",
|
|
10086
|
+
borderColor: "core.outline"
|
|
10087
|
+
}
|
|
10088
|
+
},
|
|
10089
|
+
accent: {
|
|
10090
|
+
content: {
|
|
10091
|
+
border: "1px solid",
|
|
10092
|
+
borderColor: "core.outline"
|
|
10093
|
+
}
|
|
10094
|
+
},
|
|
10095
|
+
floating: {
|
|
10096
|
+
content: {
|
|
10097
|
+
border: "sm",
|
|
10098
|
+
borderColor: "floating.outline",
|
|
10099
|
+
boxShadow: "lg"
|
|
10100
|
+
}
|
|
10101
|
+
}
|
|
10102
|
+
}
|
|
10103
|
+
},
|
|
10104
|
+
defaultVariants: {
|
|
10105
|
+
variant: "core"
|
|
10106
|
+
}
|
|
10107
|
+
});
|
|
9873
10108
|
var _a5, _b4;
|
|
9874
10109
|
var nativeSelectSlotRecipe = defineSlotRecipe({
|
|
9875
10110
|
slots: NativeSelectAnatomy.keys(),
|
|
@@ -11233,7 +11468,8 @@ var slotRecipes = {
|
|
|
11233
11468
|
toast: toastSlotRecipe,
|
|
11234
11469
|
checkboxCard: choiceChipSlotRecipe,
|
|
11235
11470
|
collapsible: collapsibleSlotRecipe,
|
|
11236
|
-
tooltip: popoverSlotRecipe
|
|
11471
|
+
tooltip: popoverSlotRecipe,
|
|
11472
|
+
menu: menuSlotRecipe
|
|
11237
11473
|
};
|
|
11238
11474
|
var animations = defineTokens.animations({
|
|
11239
11475
|
spin: {
|
|
@@ -12076,6 +12312,6 @@ var TooltipContent = forwardRef(
|
|
|
12076
12312
|
);
|
|
12077
12313
|
TooltipContent.displayName = "TooltipContent";
|
|
12078
12314
|
|
|
12079
|
-
export { Accordion, AccordionItem, AccordionItemContent, AccordionItemTrigger, Alert, AttachedInputs, Autocomplete, AutocompleteItem, AutocompleteItemGroup, AutocompleteItemGroupLabel, Badge, Brand, Breadcrumb, Button, ButtonGroup, Calendar, CalendarCell, CalendarGrid, CalendarHeader, CalendarProvider, CardSelect, CardSelectContent, CardSelectTrigger, CargonetLogo, Checkbox, CheckboxGroup, ChoiceChip, Clipboard, ClipboardButton, CloseButton, CloseDrawerLine, Code, ColorInlineLoader, ColorModeButton, ColorModeIcon, ColorModeProvider, ColorSpinner, Combobox2 as Combobox, ContentLoader, DarkFullScreenLoader, DarkInlineLoader, DarkSpinner, DatePicker, DateRangePicker, DialogActionTrigger, DialogBackdrop, DialogBody, DialogCloseTrigger, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogRoot, DialogTitle, DialogTrigger, Drawer, DrawerActionTrigger, DrawerBackTrigger, DrawerBackdrop, DrawerBody, DrawerCloseTrigger, DrawerContent, DrawerFooter, DrawerFullScreenHeader, DrawerHeader, DrawerTitle, DrawerTrigger, Expandable, ExpandableAlert, ExpandableItem, Field3 as Field, FieldErrorText, FieldLabel, Fieldset, FieldsetContent, FieldsetErrorText, FieldsetHelperText, FieldsetLegend, FloatingActionButton, Heading, IconButton, InfoTag, Input, ItemDescription, ItemLabel, JumpButton, Language, LanguageProvider, LightFullScreenLoader, LightInlineLoader, LightSpinner, LineIcon, List, ListBox, ListIndicator, ListItem2 as ListItem, NativeSelect, Nudge, NudgeActions, NudgeCloseTrigger, NudgeContent, NudgeTrigger, NudgeWizardStep, NumericStepper, Pagination, PaginationEllipsis, PaginationItem, PaginationItems, PaginationNextTrigger, PaginationPrevTrigger, PasswordInput, PhoneNumberInput, PlayPauseButton, Popover2 as Popover, PopoverContent, PopoverTrigger, PressableCard, ProgressBar, ProgressIndicator, ProgressLoader, Radio, RadioCard, RadioCardGroup, RadioCardLabel, RadioGroup, RangeCalendar, ScrollCalendar, SearchInput, Select, SelectContent, SelectItem, SelectItemGroup, SelectItemText, SelectLabel, SelectRoot, SelectTrigger, SelectValueText, Separator, ServiceAlert, Skeleton, SkeletonCircle, SkeletonText, SkipButton, SporProvider, StaticCard, Stepper, StepperStep, SvgBox, Switch, Table, TableBody, TableColumnHeader, Tabs, TabsContent, TabsIndicator, TabsList, TabsTrigger, Text3 as Text, TextLink, Textarea, TimePicker, Tooltip, TooltipContent, TooltipTrigger, TravelTag, VyLogo, VyLogoPride, createTexts, createToast, fontFaces, slugify, system, themes, useCalendar, useColorMode, useColorModeValue, useTableSort, useTranslation };
|
|
12315
|
+
export { Accordion, AccordionItem, AccordionItemContent, AccordionItemTrigger, Alert, AttachedInputs, Autocomplete, AutocompleteItem, AutocompleteItemGroup, AutocompleteItemGroupLabel, Badge, Brand, Breadcrumb, Button, ButtonGroup, Calendar, CalendarCell, CalendarGrid, CalendarHeader, CalendarProvider, CardSelect, CardSelectContent, CardSelectTrigger, CargonetLogo, Checkbox, CheckboxGroup, ChoiceChip, Clipboard, ClipboardButton, CloseButton, CloseDrawerLine, Code, ColorInlineLoader, ColorModeButton, ColorModeIcon, ColorModeProvider, ColorSpinner, Combobox2 as Combobox, ContentLoader, DarkFullScreenLoader, DarkInlineLoader, DarkSpinner, DatePicker, DateRangePicker, DialogActionTrigger, DialogBackdrop, DialogBody, DialogCloseTrigger, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogRoot, DialogTitle, DialogTrigger, Drawer, DrawerActionTrigger, DrawerBackTrigger, DrawerBackdrop, DrawerBody, DrawerCloseTrigger, DrawerContent, DrawerFooter, DrawerFullScreenHeader, DrawerHeader, DrawerTitle, DrawerTrigger, Expandable, ExpandableAlert, ExpandableItem, Field3 as Field, FieldErrorText, FieldLabel, Fieldset, FieldsetContent, FieldsetErrorText, FieldsetHelperText, FieldsetLegend, FloatingActionButton, Heading, IconButton, InfoTag, Input, ItemDescription, ItemLabel, JumpButton, Language, LanguageProvider, LightFullScreenLoader, LightInlineLoader, LightSpinner, LineIcon, List, ListBox, ListIndicator, ListItem2 as ListItem, Menu, MenuCheckboxItem, MenuContent, MenuItem, MenuItemGroup, MenuRadioItem, MenuRadioItemGroup, MenuSeparator, MenuTrigger, MenuTriggerItem, NativeSelect, Nudge, NudgeActions, NudgeCloseTrigger, NudgeContent, NudgeTrigger, NudgeWizardStep, NumericStepper, Pagination, PaginationEllipsis, PaginationItem, PaginationItems, PaginationNextTrigger, PaginationPrevTrigger, PasswordInput, PhoneNumberInput, PlayPauseButton, Popover2 as Popover, PopoverContent, PopoverTrigger, PressableCard, ProgressBar, ProgressIndicator, ProgressLoader, Radio, RadioCard, RadioCardGroup, RadioCardLabel, RadioGroup, RangeCalendar, ScrollCalendar, SearchInput, Select, SelectContent, SelectItem, SelectItemGroup, SelectItemText, SelectLabel, SelectRoot, SelectTrigger, SelectValueText, Separator, ServiceAlert, Skeleton, SkeletonCircle, SkeletonText, SkipButton, SporProvider, StaticCard, Stepper, StepperStep, SvgBox, Switch, Table, TableBody, TableColumnHeader, Tabs, TabsContent, TabsIndicator, TabsList, TabsTrigger, Text3 as Text, TextLink, Textarea, TimePicker, Tooltip, TooltipContent, TooltipTrigger, TravelTag, VyLogo, VyLogoPride, createTexts, createToast, fontFaces, slugify, system, themes, useCalendar, useColorMode, useColorModeValue, useMenuContext, useTableSort, useTranslation };
|
|
12080
12316
|
//# sourceMappingURL=out.js.map
|
|
12081
12317
|
//# sourceMappingURL=index.mjs.map
|