@umami/react-zen 0.10.0 → 0.12.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 +210 -0
- package/dist/index.d.ts +28 -2
- package/dist/index.js +1398 -264
- package/dist/index.mjs +1321 -187
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -620,6 +620,15 @@
|
|
|
620
620
|
.Text_wider {
|
|
621
621
|
letter-spacing: 0.05em;
|
|
622
622
|
}
|
|
623
|
+
.Text_left {
|
|
624
|
+
text-align: left;
|
|
625
|
+
}
|
|
626
|
+
.Text_center {
|
|
627
|
+
text-align: center;
|
|
628
|
+
}
|
|
629
|
+
.Text_right {
|
|
630
|
+
text-align: right;
|
|
631
|
+
}
|
|
623
632
|
|
|
624
633
|
/* src/components/form/FormField.module.css */
|
|
625
634
|
.FormField_field {
|
|
@@ -1358,6 +1367,12 @@
|
|
|
1358
1367
|
font-size: 5rem;
|
|
1359
1368
|
}
|
|
1360
1369
|
|
|
1370
|
+
/* src/components/HoverTrigger.module.css */
|
|
1371
|
+
.HoverTrigger_wrapper {
|
|
1372
|
+
transform: translateY(-10px);
|
|
1373
|
+
border-top: 10px solid transparent;
|
|
1374
|
+
}
|
|
1375
|
+
|
|
1361
1376
|
/* src/components/InlineEditField.module.css */
|
|
1362
1377
|
.InlineEditField_edit {
|
|
1363
1378
|
display: flex;
|
|
@@ -1479,6 +1494,201 @@
|
|
|
1479
1494
|
}
|
|
1480
1495
|
}
|
|
1481
1496
|
|
|
1497
|
+
/* src/components/NavigationMenu.module.css */
|
|
1498
|
+
.NavigationMenu_root {
|
|
1499
|
+
position: relative;
|
|
1500
|
+
display: flex;
|
|
1501
|
+
align-items: center;
|
|
1502
|
+
justify-content: center;
|
|
1503
|
+
width: 100%;
|
|
1504
|
+
z-index: 1;
|
|
1505
|
+
}
|
|
1506
|
+
.NavigationMenu_list {
|
|
1507
|
+
display: flex;
|
|
1508
|
+
align-items: center;
|
|
1509
|
+
justify-content: center;
|
|
1510
|
+
background-color: var(--background-color);
|
|
1511
|
+
gap: var(--gap);
|
|
1512
|
+
list-style: none;
|
|
1513
|
+
margin: 0;
|
|
1514
|
+
}
|
|
1515
|
+
.NavigationMenu_trigger {
|
|
1516
|
+
display: flex;
|
|
1517
|
+
align-items: center;
|
|
1518
|
+
justify-content: space-between;
|
|
1519
|
+
gap: var(--gap);
|
|
1520
|
+
border: 0;
|
|
1521
|
+
background: none;
|
|
1522
|
+
}
|
|
1523
|
+
.NavigationMenu_link {
|
|
1524
|
+
display: block;
|
|
1525
|
+
text-decoration: none;
|
|
1526
|
+
}
|
|
1527
|
+
.NavigationMenu_trigger,
|
|
1528
|
+
.NavigationMenu_link {
|
|
1529
|
+
outline: none;
|
|
1530
|
+
user-select: none;
|
|
1531
|
+
}
|
|
1532
|
+
.NavigationMenu_content {
|
|
1533
|
+
position: absolute;
|
|
1534
|
+
top: 0;
|
|
1535
|
+
left: 0;
|
|
1536
|
+
width: 100%;
|
|
1537
|
+
animation-duration: 250ms;
|
|
1538
|
+
animation-timing-function: ease;
|
|
1539
|
+
}
|
|
1540
|
+
.NavigationMenu_content[data-motion=from-start] {
|
|
1541
|
+
animation-name: NavigationMenu_enterFromLeft;
|
|
1542
|
+
}
|
|
1543
|
+
.NavigationMenu_content[data-motion=from-end] {
|
|
1544
|
+
animation-name: NavigationMenu_enterFromRight;
|
|
1545
|
+
}
|
|
1546
|
+
.NavigationMenu_content[data-motion=to-start] {
|
|
1547
|
+
animation-name: NavigationMenu_exitToLeft;
|
|
1548
|
+
}
|
|
1549
|
+
.NavigationMenu_content[data-motion=to-end] {
|
|
1550
|
+
animation-name: NavigationMenu_exitToRight;
|
|
1551
|
+
}
|
|
1552
|
+
@media only screen and (min-width: 600px) {
|
|
1553
|
+
.NavigationMenu_content {
|
|
1554
|
+
width: auto;
|
|
1555
|
+
}
|
|
1556
|
+
}
|
|
1557
|
+
.NavigationMenu_indicator {
|
|
1558
|
+
display: flex;
|
|
1559
|
+
align-items: flex-end;
|
|
1560
|
+
justify-content: center;
|
|
1561
|
+
height: 10px;
|
|
1562
|
+
top: 100%;
|
|
1563
|
+
overflow: hidden;
|
|
1564
|
+
z-index: 1;
|
|
1565
|
+
transition: width, transform 250ms ease;
|
|
1566
|
+
}
|
|
1567
|
+
.NavigationMenu_indicator[data-state=visible] {
|
|
1568
|
+
animation: NavigationMenu_fadeIn 200ms ease;
|
|
1569
|
+
}
|
|
1570
|
+
.NavigationMenu_indicator[data-state=hidden] {
|
|
1571
|
+
animation: NavigationMenu_fadeOut 200ms ease;
|
|
1572
|
+
}
|
|
1573
|
+
.NavigationMenu_viewport {
|
|
1574
|
+
position: relative;
|
|
1575
|
+
transform-origin: top center;
|
|
1576
|
+
margin-top: 10px;
|
|
1577
|
+
width: 100%;
|
|
1578
|
+
overflow: hidden;
|
|
1579
|
+
box-shadow: var(--box-shadow);
|
|
1580
|
+
height: var(--radix-navigation-menu-viewport-height);
|
|
1581
|
+
transition:
|
|
1582
|
+
width,
|
|
1583
|
+
height,
|
|
1584
|
+
300ms ease;
|
|
1585
|
+
}
|
|
1586
|
+
.NavigationMenu_viewport[data-state=open] {
|
|
1587
|
+
animation: NavigationMenu_scaleIn 200ms ease;
|
|
1588
|
+
}
|
|
1589
|
+
.NavigationMenu_viewport[data-state=closed] {
|
|
1590
|
+
animation: NavigationMenu_scaleOut 200ms ease;
|
|
1591
|
+
}
|
|
1592
|
+
@media only screen and (min-width: 600px) {
|
|
1593
|
+
.NavigationMenu_viewport {
|
|
1594
|
+
width: var(--radix-navigation-menu-viewport-width);
|
|
1595
|
+
}
|
|
1596
|
+
}
|
|
1597
|
+
.NavigationMenu_wrapper {
|
|
1598
|
+
position: absolute;
|
|
1599
|
+
display: flex;
|
|
1600
|
+
justify-content: center;
|
|
1601
|
+
width: 100%;
|
|
1602
|
+
top: 100%;
|
|
1603
|
+
left: 0;
|
|
1604
|
+
perspective: 2000px;
|
|
1605
|
+
}
|
|
1606
|
+
.NavigationMenu_arrow {
|
|
1607
|
+
position: relative;
|
|
1608
|
+
top: 70%;
|
|
1609
|
+
background-color: white;
|
|
1610
|
+
width: 10px;
|
|
1611
|
+
height: 10px;
|
|
1612
|
+
transform: rotate(45deg);
|
|
1613
|
+
border-top-left-radius: 2px;
|
|
1614
|
+
}
|
|
1615
|
+
@keyframes NavigationMenu_enterFromRight {
|
|
1616
|
+
from {
|
|
1617
|
+
opacity: 0;
|
|
1618
|
+
transform: translateX(200px);
|
|
1619
|
+
}
|
|
1620
|
+
to {
|
|
1621
|
+
opacity: 1;
|
|
1622
|
+
transform: translateX(0);
|
|
1623
|
+
}
|
|
1624
|
+
}
|
|
1625
|
+
@keyframes NavigationMenu_enterFromLeft {
|
|
1626
|
+
from {
|
|
1627
|
+
opacity: 0;
|
|
1628
|
+
transform: translateX(-200px);
|
|
1629
|
+
}
|
|
1630
|
+
to {
|
|
1631
|
+
opacity: 1;
|
|
1632
|
+
transform: translateX(0);
|
|
1633
|
+
}
|
|
1634
|
+
}
|
|
1635
|
+
@keyframes NavigationMenu_exitToRight {
|
|
1636
|
+
from {
|
|
1637
|
+
opacity: 1;
|
|
1638
|
+
transform: translateX(0);
|
|
1639
|
+
}
|
|
1640
|
+
to {
|
|
1641
|
+
opacity: 0;
|
|
1642
|
+
transform: translateX(200px);
|
|
1643
|
+
}
|
|
1644
|
+
}
|
|
1645
|
+
@keyframes NavigationMenu_exitToLeft {
|
|
1646
|
+
from {
|
|
1647
|
+
opacity: 1;
|
|
1648
|
+
transform: translateX(0);
|
|
1649
|
+
}
|
|
1650
|
+
to {
|
|
1651
|
+
opacity: 0;
|
|
1652
|
+
transform: translateX(-200px);
|
|
1653
|
+
}
|
|
1654
|
+
}
|
|
1655
|
+
@keyframes NavigationMenu_scaleIn {
|
|
1656
|
+
from {
|
|
1657
|
+
opacity: 0;
|
|
1658
|
+
transform: rotateX(-30deg) scale(0.9);
|
|
1659
|
+
}
|
|
1660
|
+
to {
|
|
1661
|
+
opacity: 1;
|
|
1662
|
+
transform: rotateX(0deg) scale(1);
|
|
1663
|
+
}
|
|
1664
|
+
}
|
|
1665
|
+
@keyframes NavigationMenu_scaleOut {
|
|
1666
|
+
from {
|
|
1667
|
+
opacity: 1;
|
|
1668
|
+
transform: rotateX(0deg) scale(1);
|
|
1669
|
+
}
|
|
1670
|
+
to {
|
|
1671
|
+
opacity: 0;
|
|
1672
|
+
transform: rotateX(-10deg) scale(0.95);
|
|
1673
|
+
}
|
|
1674
|
+
}
|
|
1675
|
+
@keyframes NavigationMenu_fadeIn {
|
|
1676
|
+
from {
|
|
1677
|
+
opacity: 0;
|
|
1678
|
+
}
|
|
1679
|
+
to {
|
|
1680
|
+
opacity: 1;
|
|
1681
|
+
}
|
|
1682
|
+
}
|
|
1683
|
+
@keyframes NavigationMenu_fadeOut {
|
|
1684
|
+
from {
|
|
1685
|
+
opacity: 1;
|
|
1686
|
+
}
|
|
1687
|
+
to {
|
|
1688
|
+
opacity: 0;
|
|
1689
|
+
}
|
|
1690
|
+
}
|
|
1691
|
+
|
|
1482
1692
|
/* src/components/PasswordField.module.css */
|
|
1483
1693
|
.PasswordField_icon {
|
|
1484
1694
|
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 {
|
|
@@ -679,11 +704,12 @@ declare module '@umami/react-zen/Text' {
|
|
|
679
704
|
spacing?: 'tighter' | 'tight' | 'wide' | 'wider';
|
|
680
705
|
type?: 'muted' | 'faded';
|
|
681
706
|
weight?: 'lighter' | 'light' | 'bold' | 'bolder';
|
|
707
|
+
align?: 'left' | 'center' | 'right';
|
|
682
708
|
asChild?: boolean;
|
|
683
709
|
className?: string;
|
|
684
710
|
children?: ReactNode;
|
|
685
711
|
}
|
|
686
|
-
function Text({ children, type, size, spacing, weight, asChild, className, ...props }: TextProps): import("react").JSX.Element;
|
|
712
|
+
function Text({ children, type, size, spacing, weight, align, asChild, className, ...props }: TextProps): import("react").JSX.Element;
|
|
687
713
|
export { Text };
|
|
688
714
|
export type { TextProps };
|
|
689
715
|
}
|