@umami/react-zen 0.10.0 → 0.11.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/dist/index.css CHANGED
@@ -1358,6 +1358,10 @@
1358
1358
  font-size: 5rem;
1359
1359
  }
1360
1360
 
1361
+ /* src/components/HoverTrigger.module.css */
1362
+ .HoverTrigger_wrapper {
1363
+ }
1364
+
1361
1365
  /* src/components/InlineEditField.module.css */
1362
1366
  .InlineEditField_edit {
1363
1367
  display: flex;
@@ -1479,6 +1483,201 @@
1479
1483
  }
1480
1484
  }
1481
1485
 
1486
+ /* src/components/NavigationMenu.module.css */
1487
+ .NavigationMenu_root {
1488
+ position: relative;
1489
+ display: flex;
1490
+ align-items: center;
1491
+ justify-content: center;
1492
+ width: 100%;
1493
+ z-index: 1;
1494
+ }
1495
+ .NavigationMenu_list {
1496
+ display: flex;
1497
+ align-items: center;
1498
+ justify-content: center;
1499
+ background-color: var(--background-color);
1500
+ gap: var(--gap);
1501
+ list-style: none;
1502
+ margin: 0;
1503
+ }
1504
+ .NavigationMenu_trigger {
1505
+ display: flex;
1506
+ align-items: center;
1507
+ justify-content: space-between;
1508
+ gap: var(--gap);
1509
+ border: 0;
1510
+ background: none;
1511
+ }
1512
+ .NavigationMenu_link {
1513
+ display: block;
1514
+ text-decoration: none;
1515
+ }
1516
+ .NavigationMenu_trigger,
1517
+ .NavigationMenu_link {
1518
+ outline: none;
1519
+ user-select: none;
1520
+ }
1521
+ .NavigationMenu_content {
1522
+ position: absolute;
1523
+ top: 0;
1524
+ left: 0;
1525
+ width: 100%;
1526
+ animation-duration: 250ms;
1527
+ animation-timing-function: ease;
1528
+ }
1529
+ .NavigationMenu_content[data-motion=from-start] {
1530
+ animation-name: NavigationMenu_enterFromLeft;
1531
+ }
1532
+ .NavigationMenu_content[data-motion=from-end] {
1533
+ animation-name: NavigationMenu_enterFromRight;
1534
+ }
1535
+ .NavigationMenu_content[data-motion=to-start] {
1536
+ animation-name: NavigationMenu_exitToLeft;
1537
+ }
1538
+ .NavigationMenu_content[data-motion=to-end] {
1539
+ animation-name: NavigationMenu_exitToRight;
1540
+ }
1541
+ @media only screen and (min-width: 600px) {
1542
+ .NavigationMenu_content {
1543
+ width: auto;
1544
+ }
1545
+ }
1546
+ .NavigationMenu_indicator {
1547
+ display: flex;
1548
+ align-items: flex-end;
1549
+ justify-content: center;
1550
+ height: 10px;
1551
+ top: 100%;
1552
+ overflow: hidden;
1553
+ z-index: 1;
1554
+ transition: width, transform 250ms ease;
1555
+ }
1556
+ .NavigationMenu_indicator[data-state=visible] {
1557
+ animation: NavigationMenu_fadeIn 200ms ease;
1558
+ }
1559
+ .NavigationMenu_indicator[data-state=hidden] {
1560
+ animation: NavigationMenu_fadeOut 200ms ease;
1561
+ }
1562
+ .NavigationMenu_viewport {
1563
+ position: relative;
1564
+ transform-origin: top center;
1565
+ margin-top: 10px;
1566
+ width: 100%;
1567
+ overflow: hidden;
1568
+ box-shadow: var(--box-shadow);
1569
+ height: var(--radix-navigation-menu-viewport-height);
1570
+ transition:
1571
+ width,
1572
+ height,
1573
+ 300ms ease;
1574
+ }
1575
+ .NavigationMenu_viewport[data-state=open] {
1576
+ animation: NavigationMenu_scaleIn 200ms ease;
1577
+ }
1578
+ .NavigationMenu_viewport[data-state=closed] {
1579
+ animation: NavigationMenu_scaleOut 200ms ease;
1580
+ }
1581
+ @media only screen and (min-width: 600px) {
1582
+ .NavigationMenu_viewport {
1583
+ width: var(--radix-navigation-menu-viewport-width);
1584
+ }
1585
+ }
1586
+ .NavigationMenu_wrapper {
1587
+ position: absolute;
1588
+ display: flex;
1589
+ justify-content: center;
1590
+ width: 100%;
1591
+ top: 100%;
1592
+ left: 0;
1593
+ perspective: 2000px;
1594
+ }
1595
+ .NavigationMenu_arrow {
1596
+ position: relative;
1597
+ top: 70%;
1598
+ background-color: white;
1599
+ width: 10px;
1600
+ height: 10px;
1601
+ transform: rotate(45deg);
1602
+ border-top-left-radius: 2px;
1603
+ }
1604
+ @keyframes NavigationMenu_enterFromRight {
1605
+ from {
1606
+ opacity: 0;
1607
+ transform: translateX(200px);
1608
+ }
1609
+ to {
1610
+ opacity: 1;
1611
+ transform: translateX(0);
1612
+ }
1613
+ }
1614
+ @keyframes NavigationMenu_enterFromLeft {
1615
+ from {
1616
+ opacity: 0;
1617
+ transform: translateX(-200px);
1618
+ }
1619
+ to {
1620
+ opacity: 1;
1621
+ transform: translateX(0);
1622
+ }
1623
+ }
1624
+ @keyframes NavigationMenu_exitToRight {
1625
+ from {
1626
+ opacity: 1;
1627
+ transform: translateX(0);
1628
+ }
1629
+ to {
1630
+ opacity: 0;
1631
+ transform: translateX(200px);
1632
+ }
1633
+ }
1634
+ @keyframes NavigationMenu_exitToLeft {
1635
+ from {
1636
+ opacity: 1;
1637
+ transform: translateX(0);
1638
+ }
1639
+ to {
1640
+ opacity: 0;
1641
+ transform: translateX(-200px);
1642
+ }
1643
+ }
1644
+ @keyframes NavigationMenu_scaleIn {
1645
+ from {
1646
+ opacity: 0;
1647
+ transform: rotateX(-30deg) scale(0.9);
1648
+ }
1649
+ to {
1650
+ opacity: 1;
1651
+ transform: rotateX(0deg) scale(1);
1652
+ }
1653
+ }
1654
+ @keyframes NavigationMenu_scaleOut {
1655
+ from {
1656
+ opacity: 1;
1657
+ transform: rotateX(0deg) scale(1);
1658
+ }
1659
+ to {
1660
+ opacity: 0;
1661
+ transform: rotateX(-10deg) scale(0.95);
1662
+ }
1663
+ }
1664
+ @keyframes NavigationMenu_fadeIn {
1665
+ from {
1666
+ opacity: 0;
1667
+ }
1668
+ to {
1669
+ opacity: 1;
1670
+ }
1671
+ }
1672
+ @keyframes NavigationMenu_fadeOut {
1673
+ from {
1674
+ opacity: 1;
1675
+ }
1676
+ to {
1677
+ opacity: 0;
1678
+ }
1679
+ }
1680
+
1482
1681
  /* src/components/PasswordField.module.css */
1483
1682
  .PasswordField_icon {
1484
1683
  position: absolute;
package/dist/index.d.ts CHANGED
@@ -6,6 +6,7 @@
6
6
  // ../../react-hook-form
7
7
  // ../../@radix-ui/react-accordion
8
8
  // ../../@/lib/types
9
+ // ../../@radix-ui/react-navigation-menu
9
10
  // ../../@radix-ui/react-toast
10
11
  // ../../@radix-ui/react-toggle-group
11
12
 
@@ -35,6 +36,7 @@ declare module '@umami/react-zen' {
35
36
  import { Dots } from '@umami/react-zen/Dots';
36
37
  import { Flexbox } from '@umami/react-zen/Flexbox';
37
38
  import { Heading } from '@umami/react-zen/Heading';
39
+ import { HoverTrigger } from '@umami/react-zen/HoverTrigger';
38
40
  import { Icon } from '@umami/react-zen/Icon';
39
41
  import { Icons } from '@umami/react-zen/Icons';
40
42
  import { InlineEditField } from '@umami/react-zen/InlineEditField';
@@ -46,6 +48,7 @@ declare module '@umami/react-zen' {
46
48
  import { Menu } from '@umami/react-zen/Menu';
47
49
  import { MenuItem } from '@umami/react-zen/MenuItem';
48
50
  import { Modal } from '@umami/react-zen/Modal';
51
+ import { NavigationMenu, NavigationMenuItem, NavigationMenuTrigger, NavigationMenuContent, NavigationMenuLink } from '@umami/react-zen/NavigationMenu';
49
52
  import { PasswordField } from '@umami/react-zen/PasswordField';
50
53
  import { Page } from '@umami/react-zen/Page';
51
54
  import { Popover } from '@umami/react-zen/Popover';
@@ -70,7 +73,7 @@ declare module '@umami/react-zen' {
70
73
  import { ToggleGroup, ToggleGroupItem } from '@umami/react-zen/ToggleGroup';
71
74
  import { Tooltip } from '@umami/react-zen/Tooltip';
72
75
  import { ZenProvider } from '@umami/react-zen/ZenProvider';
73
- export { Form, FormField, FormResetButton, FormSubmitButton, useDebounce, useTheme, useToast, Accordion, AccordionContent, AccordionItem, AccordionHeader, AlertBanner, AlertDialog, Box, Breadcrumb, Breadcrumbs, Button, Calendar, Checkbox, Column, Combobox, ConfirmationDialog, DataTable, DataColumn, Dialog, DialogTrigger, Dots, FileTrigger, Flexbox, Heading, Icon, Icons, InlineEditField, Label, List, ListItem, Loading, LoadingButton, Menu, MenuItem, MenuTrigger, Modal, PasswordField, Page, Popover, ProgressBar, ProgressCircle, Radio, RadioGroup, Row, SearchField, Select, Slider, Slot, Spinner, StatusLight, SubmenuTrigger, Switch, Table, TableHeader, TableBody, TableRow, TableColumn, TableCell, Tab, Tabs, TabList, TabPanel, Text, TextOverflow, TextField, TextArea, Toast, ToastProvider, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipTrigger, ZenProvider, };
76
+ export { Form, FormField, FormResetButton, FormSubmitButton, useDebounce, useTheme, useToast, Accordion, AccordionContent, AccordionItem, AccordionHeader, AlertBanner, AlertDialog, Box, Breadcrumb, Breadcrumbs, Button, Calendar, Checkbox, Column, Combobox, ConfirmationDialog, DataTable, DataColumn, Dialog, DialogTrigger, Dots, FileTrigger, Flexbox, Heading, HoverTrigger, Icon, Icons, InlineEditField, Label, List, ListItem, Loading, LoadingButton, Menu, MenuItem, MenuTrigger, Modal, NavigationMenu, NavigationMenuItem, NavigationMenuTrigger, NavigationMenuContent, NavigationMenuLink, PasswordField, Page, Popover, ProgressBar, ProgressCircle, Radio, RadioGroup, Row, SearchField, Select, Slider, Slot, Spinner, StatusLight, SubmenuTrigger, Switch, Table, TableHeader, TableBody, TableRow, TableColumn, TableCell, Tab, Tabs, TabList, TabPanel, Text, TextOverflow, TextField, TextArea, Toast, ToastProvider, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipTrigger, ZenProvider, };
74
77
  }
75
78
 
76
79
  declare module '@umami/react-zen/form/Form' {
@@ -370,6 +373,15 @@ declare module '@umami/react-zen/Heading' {
370
373
  export type { HeadingProps };
371
374
  }
372
375
 
376
+ declare module '@umami/react-zen/HoverTrigger' {
377
+ import { ReactElement } from 'react';
378
+ export interface HoverButtonProps {
379
+ closeDelay?: number;
380
+ children: ReactElement[];
381
+ }
382
+ export function HoverTrigger({ closeDelay, children }: HoverButtonProps): import("react").JSX.Element;
383
+ }
384
+
373
385
  declare module '@umami/react-zen/Icon' {
374
386
  import { CSSProperties, HTMLAttributes, ReactNode } from 'react';
375
387
  export interface IconProps {
@@ -509,6 +521,19 @@ declare module '@umami/react-zen/Modal' {
509
521
  export type { ModalProps };
510
522
  }
511
523
 
524
+ declare module '@umami/react-zen/NavigationMenu' {
525
+ import React from 'react';
526
+ import { NavigationMenuProps as RadixNavigationMenuProps, NavigationMenuItemProps, NavigationMenuTriggerProps, NavigationMenuContentProps, NavigationMenuLinkProps } from '@radix-ui/react-navigation-menu';
527
+ export interface NavigationMenuProps extends RadixNavigationMenuProps {
528
+ showArrow?: boolean;
529
+ }
530
+ export function NavigationMenu({ showArrow, children, ...props }: NavigationMenuProps): React.JSX.Element;
531
+ export function NavigationMenuItem({ children, className, ...props }: NavigationMenuItemProps): React.JSX.Element;
532
+ export function NavigationMenuTrigger({ children, className, ...props }: NavigationMenuTriggerProps): React.JSX.Element;
533
+ export function NavigationMenuContent({ children, className, ...props }: NavigationMenuContentProps): React.JSX.Element;
534
+ export function NavigationMenuLink({ children, className, ...props }: NavigationMenuLinkProps): React.JSX.Element;
535
+ }
536
+
512
537
  declare module '@umami/react-zen/PasswordField' {
513
538
  import { TextFieldProps } from 'react-aria-components';
514
539
  interface PasswordFieldProps extends TextFieldProps {