@frontify/fondue-components 7.0.0 → 8.0.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/fondue-components10.js +31 -27
- package/dist/fondue-components10.js.map +1 -1
- package/dist/fondue-components11.js +75 -72
- package/dist/fondue-components11.js.map +1 -1
- package/dist/fondue-components12.js +29 -26
- package/dist/fondue-components12.js.map +1 -1
- package/dist/fondue-components14.js +1 -1
- package/dist/fondue-components15.js +1 -1
- package/dist/fondue-components16.js +32 -29
- package/dist/fondue-components16.js.map +1 -1
- package/dist/fondue-components17.js +2 -2
- package/dist/fondue-components18.js +6 -6
- package/dist/fondue-components19.js +1 -1
- package/dist/fondue-components20.js +1 -1
- package/dist/fondue-components21.js +4 -4
- package/dist/fondue-components22.js +3 -3
- package/dist/fondue-components23.js +1 -1
- package/dist/fondue-components24.js +1 -1
- package/dist/fondue-components25.js +8 -8
- package/dist/fondue-components25.js.map +1 -1
- package/dist/fondue-components28.js +1 -1
- package/dist/fondue-components3.js +28 -25
- package/dist/fondue-components3.js.map +1 -1
- package/dist/fondue-components31.js +1 -1
- package/dist/fondue-components33.js +1 -1
- package/dist/fondue-components41.js +18 -19
- package/dist/fondue-components41.js.map +1 -1
- package/dist/fondue-components42.js +16 -4
- package/dist/fondue-components42.js.map +1 -1
- package/dist/fondue-components43.js +3 -11
- package/dist/fondue-components43.js.map +1 -1
- package/dist/fondue-components44.js +13 -3
- package/dist/fondue-components44.js.map +1 -1
- package/dist/fondue-components45.js +5 -35
- package/dist/fondue-components45.js.map +1 -1
- package/dist/fondue-components46.js +35 -13
- package/dist/fondue-components46.js.map +1 -1
- package/dist/fondue-components47.js +12 -4
- package/dist/fondue-components47.js.map +1 -1
- package/dist/fondue-components48.js +4 -24
- package/dist/fondue-components48.js.map +1 -1
- package/dist/fondue-components49.js +24 -16
- package/dist/fondue-components49.js.map +1 -1
- package/dist/fondue-components50.js +16 -139
- package/dist/fondue-components50.js.map +1 -1
- package/dist/fondue-components51.js +140 -16
- package/dist/fondue-components51.js.map +1 -1
- package/dist/fondue-components52.js +16 -72
- package/dist/fondue-components52.js.map +1 -1
- package/dist/fondue-components53.js +72 -8
- package/dist/fondue-components53.js.map +1 -1
- package/dist/fondue-components54.js +8 -33
- package/dist/fondue-components54.js.map +1 -1
- package/dist/fondue-components55.js +32 -48
- package/dist/fondue-components55.js.map +1 -1
- package/dist/fondue-components56.js +48 -10
- package/dist/fondue-components56.js.map +1 -1
- package/dist/fondue-components57.js +8 -10
- package/dist/fondue-components57.js.map +1 -1
- package/dist/fondue-components58.js +12 -7
- package/dist/fondue-components58.js.map +1 -1
- package/dist/fondue-components59.js +7 -12
- package/dist/fondue-components59.js.map +1 -1
- package/dist/fondue-components60.js +12 -18
- package/dist/fondue-components60.js.map +1 -1
- package/dist/fondue-components61.js +19 -15
- package/dist/fondue-components61.js.map +1 -1
- package/dist/fondue-components62.js +14 -52
- package/dist/fondue-components62.js.map +1 -1
- package/dist/fondue-components63.js +52 -14
- package/dist/fondue-components63.js.map +1 -1
- package/dist/fondue-components64.js +12 -15
- package/dist/fondue-components64.js.map +1 -1
- package/dist/fondue-components65.js +17 -6
- package/dist/fondue-components65.js.map +1 -1
- package/dist/fondue-components66.js +7 -2
- package/dist/fondue-components66.js.map +1 -1
- package/dist/fondue-components67.js +2 -15
- package/dist/fondue-components67.js.map +1 -1
- package/dist/fondue-components68.js +14 -38
- package/dist/fondue-components68.js.map +1 -1
- package/dist/fondue-components69.js +42 -0
- package/dist/fondue-components69.js.map +1 -0
- package/dist/fondue-components8.js +28 -28
- package/dist/fondue-components8.js.map +1 -1
- package/dist/fondue-components9.js +102 -92
- package/dist/fondue-components9.js.map +1 -1
- package/dist/index.d.ts +122 -138
- package/dist/style.css +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components9.js","sources":["../src/components/Dropdown/Dropdown.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { IconCaretRight } from '@frontify/fondue-icons';\nimport * as RadixDropdown from '@radix-ui/react-dropdown-menu';\nimport { forwardRef, useRef, type ForwardedRef, type ReactNode } from 'react';\n\nimport { usePreventDropdownOverflow } from '#/hooks/usePreventDropdownOverflow';\nimport { syncRefs } from '#/utilities/domUtilities';\n\nimport styles from './styles/dropdown.module.scss';\n\nexport type DropdownRootProps = {\n children?: ReactNode;\n /**\n * Controls the open state of the dropdown.\n */\n open?: boolean;\n /**\n * Callback that is called when the open state of the dropdown changes.\n */\n onOpenChange?: (open: boolean) => void;\n 'data-test-id'?: string;\n};\n\nexport const DropdownRoot = ({\n children,\n open,\n onOpenChange,\n 'data-test-id': dataTestId = 'fondue-dropdown',\n}: DropdownRootProps) => {\n return (\n <RadixDropdown.Root open={open} onOpenChange={onOpenChange} data-test-id={dataTestId}>\n {children}\n </RadixDropdown.Root>\n );\n};\nDropdownRoot.displayName = 'Dropdown.Root';\n\nexport type DropdownTriggerProps = {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default true\n */\n asChild?: boolean;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport const DropdownTrigger = (\n {\n asChild = true,\n children,\n 'data-test-id': dataTestId = 'fondue-dropdown-trigger',\n ...props\n }: DropdownTriggerProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) => {\n return (\n <RadixDropdown.Trigger asChild={asChild} data-test-id={dataTestId} ref={ref} {...props}>\n {children}\n </RadixDropdown.Trigger>\n );\n};\nDropdownTrigger.displayName = 'Dropdown.Trigger';\n\nexport type DropdownContentProps = {\n children?: ReactNode;\n 'data-test-id'?: string;\n onOpen?: () => void;\n onClose?: () => void;\n /**\n * The vertical padding around each dropdown item.\n * @default \"comfortable\"\n */\n padding?: 'comfortable' | 'compact';\n /**\n * Defines the alignment of the dropdown.\n * @default \"start\"\n */\n align?: 'start' | 'center' | 'end';\n /**\n * Defines the preferred side of the dropdown. It will not be respected if there are collisions with the viewport.\n * @default \"bottom\"\n */\n side?: 'top' | 'right' | 'bottom' | 'left';\n};\n\nexport const DropdownContent = (\n {\n onOpen,\n onClose,\n side = 'bottom',\n padding = 'comfortable',\n align = 'start',\n children,\n 'data-test-id': dataTestId = 'fondue-dropdown-content',\n }: DropdownContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const localRef = useRef(null);\n const dropdownIsOpen = useRef(false);\n\n const { setMaxHeight } = usePreventDropdownOverflow(localRef);\n\n return (\n <RadixDropdown.Portal>\n <RadixDropdown.Content\n align={align}\n collisionPadding={8}\n sideOffset={8}\n side={side}\n className={styles.content}\n data-padding={padding}\n data-test-id={dataTestId}\n ref={localRef}\n onCloseAutoFocus={() => {\n syncRefs(localRef, ref);\n onClose && onClose();\n dropdownIsOpen.current = false;\n }}\n onFocus={() => {\n if (!dropdownIsOpen.current) {\n setMaxHeight();\n syncRefs(localRef, ref);\n onOpen && onOpen();\n dropdownIsOpen.current = true;\n }\n }}\n >\n {children}\n </RadixDropdown.Content>\n </RadixDropdown.Portal>\n );\n};\nDropdownContent.displayName = 'Dropdown.Content';\n\nexport type DropdownGroupProps = { children: ReactNode; 'data-test-id'?: string };\n\nexport const DropdownGroup = (\n { children, 'data-test-id': dataTestId = 'fondue-dropdown-group' }: DropdownGroupProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <RadixDropdown.Group className={styles.group} data-test-id={dataTestId} ref={ref}>\n {children}\n </RadixDropdown.Group>\n );\n};\nDropdownGroup.displayName = 'Dropdown.Group';\n\nexport type DropdownSubMenuProps = { children: ReactNode; 'data-test-id'?: string };\n\nexport const DropdownSubMenu = ({\n children,\n 'data-test-id': dataTestId = 'fondue-dropdown-submenu',\n}: DropdownSubMenuProps) => {\n return <RadixDropdown.Sub data-test-id={dataTestId}>{children}</RadixDropdown.Sub>;\n};\nDropdownSubMenu.displayName = 'Dropdown.SubMenu';\n\nexport type DropdownSubTriggerProps = { children: ReactNode; 'data-test-id'?: string };\n\nexport const DropdownSubTrigger = (\n { children, 'data-test-id': dataTestId = 'fondue-dropdown-subtrigger' }: DropdownSubTriggerProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <RadixDropdown.SubTrigger className={styles.subTrigger} data-test-id={dataTestId} ref={ref}>\n <div className={styles.itemContent}>{children}</div>\n <IconCaretRight className={styles.subMenuIndicator} size={16} />\n </RadixDropdown.SubTrigger>\n );\n};\nDropdownSubTrigger.displayName = 'Dropdown.SubTrigger';\n\nexport type DropdownSubContentProps = {\n /**\n * The vertical padding around each dropdown item.\n * @default \"comfortable\"\n */\n padding?: 'comfortable' | 'compact';\n children: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport const DropdownSubContent = (\n {\n padding = 'comfortable',\n children,\n 'data-test-id': dataTestId = 'fondue-dropdown-subcontent',\n }: DropdownSubContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <RadixDropdown.Portal>\n <RadixDropdown.SubContent\n className={styles.subContent}\n data-padding={padding}\n data-test-id={dataTestId}\n ref={ref}\n >\n {children}\n </RadixDropdown.SubContent>\n </RadixDropdown.Portal>\n );\n};\nDropdownSubContent.displayName = 'Dropdown.SubContent';\n\nexport type DropdownItemProps = {\n children: ReactNode;\n /**\n * Disables the item.\n */\n disabled?: boolean;\n /**\n * The text value of the item that is passed to the onSelect callback.\n */\n textValue?: string;\n /**\n * The style of the item.\n * @default \"default\"\n */\n emphasis?: 'default' | 'danger';\n /**\n * Callback that is called when the item is selected.\n */\n onSelect?: (event: Event) => void;\n 'data-test-id'?: string;\n};\n\nexport const DropdownItem = (\n {\n children,\n disabled,\n textValue,\n onSelect,\n emphasis = 'default',\n 'data-test-id': dataTestId = 'fondue-dropdown-subtrigger',\n ...props\n }: DropdownItemProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <RadixDropdown.Item\n onSelect={onSelect}\n className={styles.item}\n textValue={textValue}\n data-test-id={dataTestId}\n data-emphasis={emphasis}\n ref={ref}\n disabled={disabled}\n {...props}\n >\n <div className={styles.itemContent}>{children}</div>\n </RadixDropdown.Item>\n );\n};\nDropdownItem.displayName = 'Dropdown.Item';\n\nexport type DropdownSlotProps = { children: ReactNode; name?: 'left' | 'right'; 'data-test-id'?: string };\n\nexport const DropdownSlot = (\n { children, name, 'data-test-id': dataTestId = 'fondue-dropdown-slot' }: DropdownSlotProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div data-name={name} className={styles.slot} data-test-id={dataTestId} ref={ref}>\n {children}\n </div>\n );\n};\nDropdownSlot.displayName = 'Dropdown.Slot';\n\nconst ForwardedRefDropdownTrigger = forwardRef<HTMLButtonElement, DropdownTriggerProps>(DropdownTrigger);\nconst ForwardedRefDropdownContent = forwardRef<HTMLDivElement, DropdownContentProps>(DropdownContent);\nconst ForwardedRefDropdownGroup = forwardRef<HTMLDivElement, DropdownGroupProps>(DropdownGroup);\nconst ForwardedRefDropdownSubTrigger = forwardRef<HTMLDivElement, DropdownSubTriggerProps>(DropdownSubTrigger);\nconst ForwardedRefDropdownSubContent = forwardRef<HTMLDivElement, DropdownSubContentProps>(DropdownSubContent);\nconst ForwardedRefDropdownItem = forwardRef<HTMLDivElement, DropdownItemProps>(DropdownItem);\nconst ForwardedRefDropdownSlot = forwardRef<HTMLDivElement, DropdownSlotProps>(DropdownSlot);\n\nexport const Dropdown = {\n Root: DropdownRoot,\n Trigger: ForwardedRefDropdownTrigger,\n Content: ForwardedRefDropdownContent,\n Group: ForwardedRefDropdownGroup,\n SubMenu: DropdownSubMenu,\n SubTrigger: ForwardedRefDropdownSubTrigger,\n SubContent: ForwardedRefDropdownSubContent,\n Item: ForwardedRefDropdownItem,\n Slot: ForwardedRefDropdownSlot,\n};\n"],"names":["DropdownRoot","children","open","onOpenChange","dataTestId","jsx","RadixDropdown","DropdownTrigger","asChild","props","ref","DropdownContent","onOpen","onClose","side","padding","align","localRef","useRef","dropdownIsOpen","setMaxHeight","usePreventDropdownOverflow","styles","syncRefs","DropdownGroup","DropdownSubMenu","DropdownSubTrigger","jsxs","IconCaretRight","DropdownSubContent","DropdownItem","disabled","textValue","onSelect","emphasis","DropdownSlot","name","ForwardedRefDropdownTrigger","forwardRef","ForwardedRefDropdownContent","ForwardedRefDropdownGroup","ForwardedRefDropdownSubTrigger","ForwardedRefDropdownSubContent","ForwardedRefDropdownItem","ForwardedRefDropdownSlot","Dropdown"],"mappings":";;;;;;;AAwBO,MAAMA,IAAe,CAAC;AAAA,EACzB,UAAAC;AAAA,EACA,MAAAC;AAAA,EACA,cAAAC;AAAA,EACA,gBAAgBC,IAAa;AACjC,MAEQ,gBAAAC,EAACC,EAAc,MAAd,EAAmB,MAAAJ,GAAY,cAAAC,GAA4B,gBAAcC,GACrE,UAAAH,GACL;AAGRD,EAAa,cAAc;AAYpB,MAAMO,IAAkB,CAC3B;AAAA,EACI,SAAAC,IAAU;AAAA,EACV,UAAAP;AAAA,EACA,gBAAgBG,IAAa;AAAA,EAC7B,GAAGK;AACP,GACAC,MAGI,gBAAAL,EAACC,EAAc,SAAd,EAAsB,SAAAE,GAAkB,gBAAcJ,GAAY,KAAAM,GAAW,GAAGD,GAC5E,UAAAR,EACL,CAAA;AAGRM,EAAgB,cAAc;AAwBvB,MAAMI,IAAkB,CAC3B;AAAA,EACI,QAAAC;AAAA,EACA,SAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,SAAAC,IAAU;AAAA,EACV,OAAAC,IAAQ;AAAA,EACR,UAAAf;AAAA,EACA,gBAAgBG,IAAa;AACjC,GACAM,MACC;AACK,QAAAO,IAAWC,EAAO,IAAI,GACtBC,IAAiBD,EAAO,EAAK,GAE7B,EAAE,cAAAE,EAAA,IAAiBC,EAA2BJ,CAAQ;AAGxD,SAAA,gBAAAZ,EAACC,EAAc,QAAd,EACG,UAAA,gBAAAD;AAAA,IAACC,EAAc;AAAA,IAAd;AAAA,MACG,OAAAU;AAAA,MACA,kBAAkB;AAAA,MAClB,YAAY;AAAA,MACZ,MA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;AAAA,EACT,SAASE;AAAA,EACT,OAAOC;AAAA,EACP,SAASf;AAAA,EACT,YAAYgB;AAAA,EACZ,YAAYC;AAAA,EACZ,MAAMC;AAAA,EACN,MAAMC;AACV;"}
|
|
1
|
+
{"version":3,"file":"fondue-components9.js","sources":["../src/components/Dropdown/Dropdown.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { IconCaretRight } from '@frontify/fondue-icons';\nimport * as RadixDropdown from '@radix-ui/react-dropdown-menu';\nimport { Slot } from '@radix-ui/react-slot';\nimport { forwardRef, useRef, type ForwardedRef, type ReactNode } from 'react';\n\nimport { usePreventDropdownOverflow } from '#/hooks/usePreventDropdownOverflow';\nimport { syncRefs } from '#/utilities/domUtilities';\n\nimport { useProcessedChildren } from './hooks/useProcessedChildren';\nimport styles from './styles/dropdown.module.scss';\n\nexport type DropdownRootProps = {\n children?: ReactNode;\n /**\n * Controls the open state of the dropdown.\n */\n open?: boolean;\n /**\n * Callback that is called when the open state of the dropdown changes.\n */\n onOpenChange?: (open: boolean) => void;\n\n 'data-test-id'?: string;\n};\n\nexport const DropdownRoot = ({\n children,\n open,\n onOpenChange,\n\n 'data-test-id': dataTestId = 'fondue-dropdown',\n}: DropdownRootProps) => {\n return (\n <RadixDropdown.Root open={open} onOpenChange={onOpenChange} data-test-id={dataTestId}>\n {children}\n </RadixDropdown.Root>\n );\n};\nDropdownRoot.displayName = 'Dropdown.Root';\n\nexport type DropdownTriggerProps = {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default true\n */\n asChild?: boolean;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport const DropdownTrigger = (\n {\n asChild = true,\n children,\n 'data-test-id': dataTestId = 'fondue-dropdown-trigger',\n ...props\n }: DropdownTriggerProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) => {\n return (\n <RadixDropdown.Trigger asChild={asChild} data-test-id={dataTestId} ref={ref} {...props}>\n {children}\n </RadixDropdown.Trigger>\n );\n};\nDropdownTrigger.displayName = 'Dropdown.Trigger';\n\nexport type DropdownContentProps = {\n children?: ReactNode;\n 'data-test-id'?: string;\n onOpen?: () => void;\n onClose?: () => void;\n /**\n * The vertical padding around each dropdown item.\n * @default \"comfortable\"\n */\n padding?: 'comfortable' | 'compact';\n /**\n * Defines the alignment of the dropdown.\n * @default \"start\"\n */\n align?: 'start' | 'center' | 'end';\n /**\n * Defines the preferred side of the dropdown. It will not be respected if there are collisions with the viewport.\n * @default \"bottom\"\n */\n side?: 'top' | 'right' | 'bottom' | 'left';\n /**\n * Prevents the focus from being set on the trigger when the dropdown is closed.\n */\n preventTriggerFocusOnClose?: boolean;\n};\n\nexport const DropdownContent = (\n {\n onOpen,\n onClose,\n side = 'bottom',\n padding = 'comfortable',\n align = 'start',\n children,\n preventTriggerFocusOnClose,\n 'data-test-id': dataTestId = 'fondue-dropdown-content',\n }: DropdownContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const localRef = useRef(null);\n const dropdownIsOpen = useRef(false);\n\n const { setMaxHeight } = usePreventDropdownOverflow(localRef);\n\n return (\n <RadixDropdown.Portal>\n <RadixDropdown.Content\n align={align}\n collisionPadding={8}\n sideOffset={8}\n side={side}\n className={styles.content}\n data-padding={padding}\n data-test-id={dataTestId}\n ref={localRef}\n onCloseAutoFocus={(event) => {\n if (preventTriggerFocusOnClose) {\n event.preventDefault();\n }\n syncRefs(localRef, ref);\n onClose && onClose();\n dropdownIsOpen.current = false;\n }}\n onFocus={() => {\n if (!dropdownIsOpen.current) {\n setMaxHeight();\n syncRefs(localRef, ref);\n onOpen && onOpen();\n dropdownIsOpen.current = true;\n }\n }}\n >\n {children}\n </RadixDropdown.Content>\n </RadixDropdown.Portal>\n );\n};\nDropdownContent.displayName = 'Dropdown.Content';\n\nexport type DropdownGroupProps = { children: ReactNode; 'data-test-id'?: string };\n\nexport const DropdownGroup = (\n { children, 'data-test-id': dataTestId = 'fondue-dropdown-group' }: DropdownGroupProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <RadixDropdown.Group className={styles.group} data-test-id={dataTestId} ref={ref}>\n {children}\n </RadixDropdown.Group>\n );\n};\nDropdownGroup.displayName = 'Dropdown.Group';\n\nexport type DropdownSubMenuProps = { children: ReactNode; 'data-test-id'?: string };\n\nexport const DropdownSubMenu = ({\n children,\n 'data-test-id': dataTestId = 'fondue-dropdown-submenu',\n}: DropdownSubMenuProps) => {\n return <RadixDropdown.Sub data-test-id={dataTestId}>{children}</RadixDropdown.Sub>;\n};\nDropdownSubMenu.displayName = 'Dropdown.SubMenu';\n\nexport type DropdownSubTriggerProps = { children: ReactNode; 'data-test-id'?: string };\n\nexport const DropdownSubTrigger = (\n { children, 'data-test-id': dataTestId = 'fondue-dropdown-subtrigger' }: DropdownSubTriggerProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const { content } = useProcessedChildren(children);\n return (\n <RadixDropdown.SubTrigger className={styles.subTrigger} data-test-id={dataTestId} ref={ref}>\n {content}\n <IconCaretRight className={styles.subMenuIndicator} size={16} />\n </RadixDropdown.SubTrigger>\n );\n};\nDropdownSubTrigger.displayName = 'Dropdown.SubTrigger';\n\nexport type DropdownSubContentProps = {\n /**\n * The vertical padding around each dropdown item.\n * @default \"comfortable\"\n */\n padding?: 'comfortable' | 'compact';\n children: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport const DropdownSubContent = (\n {\n padding = 'comfortable',\n children,\n 'data-test-id': dataTestId = 'fondue-dropdown-subcontent',\n }: DropdownSubContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <RadixDropdown.Portal>\n <RadixDropdown.SubContent\n className={styles.subContent}\n data-padding={padding}\n data-test-id={dataTestId}\n ref={ref}\n >\n {children}\n </RadixDropdown.SubContent>\n </RadixDropdown.Portal>\n );\n};\nDropdownSubContent.displayName = 'Dropdown.SubContent';\n\nexport type DropdownItemProps = {\n children: ReactNode;\n /**\n * Disables the item.\n */\n disabled?: boolean;\n /**\n * The text value of the item that is passed to the onSelect callback.\n */\n textValue?: string;\n /**\n * The style of the item.\n * @default \"default\"\n */\n emphasis?: 'default' | 'danger';\n /**\n * Callback that is called when the item is selected.\n */\n onSelect?: (event: Event) => void;\n 'data-test-id'?: string;\n};\n\nexport const DropdownItem = (\n {\n children,\n disabled,\n textValue,\n onSelect,\n emphasis = 'default',\n 'data-test-id': dataTestId = 'fondue-dropdown-subtrigger',\n ...props\n }: DropdownItemProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const { content, isLink } = useProcessedChildren(children);\n\n const Wrapper = isLink ? Slot : 'div';\n\n return (\n <RadixDropdown.Item\n onSelect={onSelect}\n className={styles.item}\n textValue={textValue}\n data-test-id={dataTestId}\n data-emphasis={emphasis}\n ref={ref}\n disabled={disabled}\n asChild\n {...props}\n >\n <Wrapper>{content}</Wrapper>\n </RadixDropdown.Item>\n );\n};\nDropdownItem.displayName = 'Dropdown.Item';\n\nexport type DropdownSlotProps = { children: ReactNode; name?: 'left' | 'right'; 'data-test-id'?: string };\n\nexport const DropdownSlot = (\n { children, name, 'data-test-id': dataTestId = 'fondue-dropdown-slot' }: DropdownSlotProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div data-name={name} className={styles.slot} data-test-id={dataTestId} ref={ref}>\n {children}\n </div>\n );\n};\nDropdownSlot.displayName = 'Dropdown.Slot';\n\nconst ForwardedRefDropdownTrigger = forwardRef<HTMLButtonElement, DropdownTriggerProps>(DropdownTrigger);\nconst ForwardedRefDropdownContent = forwardRef<HTMLDivElement, DropdownContentProps>(DropdownContent);\nconst ForwardedRefDropdownGroup = forwardRef<HTMLDivElement, DropdownGroupProps>(DropdownGroup);\nconst ForwardedRefDropdownSubTrigger = forwardRef<HTMLDivElement, DropdownSubTriggerProps>(DropdownSubTrigger);\nconst ForwardedRefDropdownSubContent = forwardRef<HTMLDivElement, DropdownSubContentProps>(DropdownSubContent);\nconst ForwardedRefDropdownItem = forwardRef<HTMLDivElement, DropdownItemProps>(DropdownItem);\nconst ForwardedRefDropdownSlot = forwardRef<HTMLDivElement, DropdownSlotProps>(DropdownSlot);\n\nexport const Dropdown = {\n Root: DropdownRoot,\n Trigger: ForwardedRefDropdownTrigger,\n Content: ForwardedRefDropdownContent,\n Group: ForwardedRefDropdownGroup,\n SubMenu: DropdownSubMenu,\n SubTrigger: ForwardedRefDropdownSubTrigger,\n SubContent: ForwardedRefDropdownSubContent,\n Item: ForwardedRefDropdownItem,\n Slot: ForwardedRefDropdownSlot,\n};\n"],"names":["DropdownRoot","children","open","onOpenChange","dataTestId","jsx","RadixDropdown","DropdownTrigger","asChild","props","ref","DropdownContent","onOpen","onClose","side","padding","align","preventTriggerFocusOnClose","localRef","useRef","dropdownIsOpen","setMaxHeight","usePreventDropdownOverflow","styles","event","syncRefs","DropdownGroup","DropdownSubMenu","DropdownSubTrigger","content","useProcessedChildren","jsxs","IconCaretRight","DropdownSubContent","DropdownItem","disabled","textValue","onSelect","emphasis","isLink","Wrapper","Slot","DropdownSlot","name","ForwardedRefDropdownTrigger","forwardRef","ForwardedRefDropdownContent","ForwardedRefDropdownGroup","ForwardedRefDropdownSubTrigger","ForwardedRefDropdownSubContent","ForwardedRefDropdownItem","ForwardedRefDropdownSlot","Dropdown"],"mappings":";;;;;;;;;AA2BO,MAAMA,IAAe,CAAC;AAAA,EACzB,UAAAC;AAAA,EACA,MAAAC;AAAA,EACA,cAAAC;AAAA,EAEA,gBAAgBC,IAAa;AACjC,MAEQ,gBAAAC,EAACC,EAAc,MAAd,EAAmB,MAAAJ,GAAY,cAAAC,GAA4B,gBAAcC,GACrE,UAAAH,GACL;AAGRD,EAAa,cAAc;AAYpB,MAAMO,IAAkB,CAC3B;AAAA,EACI,SAAAC,IAAU;AAAA,EACV,UAAAP;AAAA,EACA,gBAAgBG,IAAa;AAAA,EAC7B,GAAGK;AACP,GACAC,MAGI,gBAAAL,EAACC,EAAc,SAAd,EAAsB,SAAAE,GAAkB,gBAAcJ,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gBAAchC;AAAA,MACd,iBAAekC;AAAA,MACf,KAAA5B;AAAA,MACA,UAAAyB;AAAA,MACA,SAAO;AAAA,MACN,GAAG1B;AAAA,MAEJ,UAAA,gBAAAJ,EAACmC,KAAS,UAAQX,EAAA,CAAA;AAAA,IAAA;AAAA,EACtB;AAER;AACAK,EAAa,cAAc;AAId,MAAAQ,IAAe,CACxB,EAAE,UAAAzC,GAAU,MAAA0C,GAAM,gBAAgBvC,IAAa,uBAAuB,GACtEM,MAGI,gBAAAL,EAAC,OAAI,EAAA,aAAWsC,GAAM,WAAWpB,EAAO,MAAM,gBAAcnB,GAAY,KAAAM,GACnE,UAAAT,EACL,CAAA;AAGRyC,EAAa,cAAc;AAE3B,MAAME,IAA8BC,EAAoDtC,CAAe,GACjGuC,IAA8BD,EAAiDlC,CAAe,GAC9FoC,IAA4BF,EAA+CnB,CAAa,GACxFsB,IAAiCH,EAAoDjB,CAAkB,GACvGqB,IAAiCJ,EAAoDZ,CAAkB,GACvGiB,IAA2BL,EAA8CX,CAAY,GACrFiB,IAA2BN,EAA8CH,CAAY,GAE9EU,IAAW;AAAA,EACpB,MAAMpD;AAAA,EACN,SAAS4C;AAAA,EACT,SAASE;AAAA,EACT,OAAOC;AAAA,EACP,SAASpB;AAAA,EACT,YAAYqB;AAAA,EACZ,YAAYC;AAAA,EACZ,MAAMC;AAAA,EACN,MAAMC;AACV;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -43,25 +43,20 @@ declare type BaseTableRowProps = {
|
|
|
43
43
|
'data-test-id'?: string;
|
|
44
44
|
};
|
|
45
45
|
|
|
46
|
-
export declare const Box: {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
*/
|
|
61
|
-
display?: Responsive<'none' | 'block' | 'inline-block' | 'inline'>;
|
|
62
|
-
children?: ReactNode;
|
|
63
|
-
'data-test-id'?: string;
|
|
64
|
-
} & CommonAriaProps;
|
|
46
|
+
export declare const Box: ForwardRefExoticComponent<LayoutComponentProps & {
|
|
47
|
+
/**
|
|
48
|
+
* The element to render the Box component as.
|
|
49
|
+
* @default 'div'
|
|
50
|
+
*/
|
|
51
|
+
as?: "div" | "span";
|
|
52
|
+
/**
|
|
53
|
+
* The display property.
|
|
54
|
+
* @default 'block'
|
|
55
|
+
*/
|
|
56
|
+
display?: Responsive<"none" | "block" | "inline-block" | "inline">;
|
|
57
|
+
children?: ReactNode;
|
|
58
|
+
'data-test-id'?: string;
|
|
59
|
+
} & CommonAriaProps & RefAttributes<HTMLDivElement>>;
|
|
65
60
|
|
|
66
61
|
declare type Breakpoint = keyof typeof screens;
|
|
67
62
|
|
|
@@ -532,6 +527,10 @@ declare type DropdownContentProps = {
|
|
|
532
527
|
* @default "bottom"
|
|
533
528
|
*/
|
|
534
529
|
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
530
|
+
/**
|
|
531
|
+
* Prevents the focus from being set on the trigger when the dropdown is closed.
|
|
532
|
+
*/
|
|
533
|
+
preventTriggerFocusOnClose?: boolean;
|
|
535
534
|
};
|
|
536
535
|
|
|
537
536
|
declare type DropdownGroupProps = {
|
|
@@ -610,54 +609,49 @@ declare type DropdownTriggerProps = {
|
|
|
610
609
|
'data-test-id'?: string;
|
|
611
610
|
};
|
|
612
611
|
|
|
613
|
-
export declare const Flex: {
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
*/
|
|
657
|
-
gapY?: Responsive<SizeValue>;
|
|
658
|
-
children?: ReactNode;
|
|
659
|
-
'data-test-id'?: string;
|
|
660
|
-
} & CommonAriaProps;
|
|
612
|
+
export declare const Flex: ForwardRefExoticComponent<LayoutComponentProps & {
|
|
613
|
+
/**
|
|
614
|
+
* The element to render the Flex component as.
|
|
615
|
+
* @default 'div'
|
|
616
|
+
*/
|
|
617
|
+
as?: "div" | "span";
|
|
618
|
+
/**
|
|
619
|
+
* The display property.
|
|
620
|
+
* @default 'flex'
|
|
621
|
+
*/
|
|
622
|
+
display?: Responsive<"none" | "flex" | "inline-flex">;
|
|
623
|
+
/**
|
|
624
|
+
* The direction of the children.
|
|
625
|
+
* @default 'row'
|
|
626
|
+
*/
|
|
627
|
+
direction?: Responsive<"row" | "row-reverse" | "column" | "column-reverse">;
|
|
628
|
+
/**
|
|
629
|
+
* The alignment of the children.
|
|
630
|
+
*/
|
|
631
|
+
align?: Responsive<"flex-start" | "center" | "flex-end" | "stretch" | "baseline">;
|
|
632
|
+
/**
|
|
633
|
+
* The justification of the children.
|
|
634
|
+
*/
|
|
635
|
+
justify?: Responsive<"flex-start" | "center" | "flex-end" | "space-between" | "space-around" | "space-evenly">;
|
|
636
|
+
/**
|
|
637
|
+
* The wrap property.
|
|
638
|
+
*/
|
|
639
|
+
wrap?: Responsive<"nowrap" | "wrap" | "wrap-reverse">;
|
|
640
|
+
/**
|
|
641
|
+
* The gap between the children.
|
|
642
|
+
*/
|
|
643
|
+
gap?: Responsive<SizeValue>;
|
|
644
|
+
/**
|
|
645
|
+
* The horizontal gap between the children.
|
|
646
|
+
*/
|
|
647
|
+
gapX?: Responsive<SizeValue>;
|
|
648
|
+
/**
|
|
649
|
+
* The vertical gap between the children.
|
|
650
|
+
*/
|
|
651
|
+
gapY?: Responsive<SizeValue>;
|
|
652
|
+
children?: ReactNode;
|
|
653
|
+
'data-test-id'?: string;
|
|
654
|
+
} & CommonAriaProps & RefAttributes<HTMLDivElement>>;
|
|
661
655
|
|
|
662
656
|
export declare const Flyout: {
|
|
663
657
|
Root: {
|
|
@@ -771,57 +765,52 @@ declare const ForwardedRefTextFieldRoot: ForwardRefExoticComponent<TextInputProp
|
|
|
771
765
|
|
|
772
766
|
declare const ForwardedRefTextFieldSlot: ForwardRefExoticComponent<TextFieldSlotProps & RefAttributes<HTMLDivElement>>;
|
|
773
767
|
|
|
774
|
-
export declare const Grid: {
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
*/
|
|
821
|
-
gapY?: Responsive<SizeValue>;
|
|
822
|
-
children?: ReactNode;
|
|
823
|
-
'data-test-id'?: string;
|
|
824
|
-
} & CommonAriaProps;
|
|
768
|
+
export declare const Grid: ForwardRefExoticComponent<LayoutComponentProps & {
|
|
769
|
+
/**
|
|
770
|
+
* The element to render the Grid component as.
|
|
771
|
+
* @default 'div'
|
|
772
|
+
*/
|
|
773
|
+
as?: "div" | "span";
|
|
774
|
+
/**
|
|
775
|
+
* The display property.
|
|
776
|
+
* @default 'grid'
|
|
777
|
+
*/
|
|
778
|
+
display?: "none" | "grid" | "inline-grid";
|
|
779
|
+
/**
|
|
780
|
+
* The columns property.
|
|
781
|
+
*/
|
|
782
|
+
columns?: Responsive<string | number>;
|
|
783
|
+
/**
|
|
784
|
+
* The rows property.
|
|
785
|
+
*/
|
|
786
|
+
rows?: Responsive<string | number>;
|
|
787
|
+
/**
|
|
788
|
+
* The flow property.
|
|
789
|
+
*/
|
|
790
|
+
flow?: Responsive<"row" | "column" | "dense" | "row-dense" | "column-dense">;
|
|
791
|
+
/**
|
|
792
|
+
* The alignment of the children.
|
|
793
|
+
*/
|
|
794
|
+
align?: Responsive<"start" | "center" | "end" | "baseline" | "stretch">;
|
|
795
|
+
/**
|
|
796
|
+
* The justification of the children.
|
|
797
|
+
*/
|
|
798
|
+
justify?: Responsive<"start" | "center" | "end" | "between">;
|
|
799
|
+
/**
|
|
800
|
+
* The gap between the children.
|
|
801
|
+
*/
|
|
802
|
+
gap?: Responsive<SizeValue>;
|
|
803
|
+
/**
|
|
804
|
+
* The horizontal gap between the children.
|
|
805
|
+
*/
|
|
806
|
+
gapX?: Responsive<SizeValue>;
|
|
807
|
+
/**
|
|
808
|
+
* The vertical gap between the children.
|
|
809
|
+
*/
|
|
810
|
+
gapY?: Responsive<SizeValue>;
|
|
811
|
+
children?: ReactNode;
|
|
812
|
+
'data-test-id'?: string;
|
|
813
|
+
} & CommonAriaProps & RefAttributes<HTMLDivElement>>;
|
|
825
814
|
|
|
826
815
|
declare type HorizontalAlignment = 'left' | 'center' | 'right';
|
|
827
816
|
|
|
@@ -943,19 +932,19 @@ declare type LayoutComponentProps = {
|
|
|
943
932
|
/**
|
|
944
933
|
* The top property of the component.
|
|
945
934
|
*/
|
|
946
|
-
top?: Responsive<
|
|
935
|
+
top?: Responsive<SpacingValue>;
|
|
947
936
|
/**
|
|
948
937
|
* The right property of the component.
|
|
949
938
|
*/
|
|
950
|
-
right?: Responsive<
|
|
939
|
+
right?: Responsive<SpacingValue>;
|
|
951
940
|
/**
|
|
952
941
|
* The bottom property of the component.
|
|
953
942
|
*/
|
|
954
|
-
bottom?: Responsive<
|
|
943
|
+
bottom?: Responsive<SpacingValue>;
|
|
955
944
|
/**
|
|
956
945
|
* The left property of the component.
|
|
957
946
|
*/
|
|
958
|
-
left?: Responsive<
|
|
947
|
+
left?: Responsive<SpacingValue>;
|
|
959
948
|
};
|
|
960
949
|
|
|
961
950
|
export declare const LoadingBar: ForwardRefExoticComponent<LoadingBarProps & RefAttributes<HTMLDivElement>>;
|
|
@@ -1076,20 +1065,15 @@ declare type ScrollAreaProps = {
|
|
|
1076
1065
|
children: ReactNode;
|
|
1077
1066
|
};
|
|
1078
1067
|
|
|
1079
|
-
export declare const Section: {
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
*/
|
|
1089
|
-
display?: Responsive<'none' | 'block' | 'inline-block' | 'inline'>;
|
|
1090
|
-
children?: ReactNode;
|
|
1091
|
-
'data-test-id'?: string;
|
|
1092
|
-
} & CommonAriaProps;
|
|
1068
|
+
export declare const Section: ForwardRefExoticComponent<LayoutComponentProps & {
|
|
1069
|
+
/**
|
|
1070
|
+
* The display property.
|
|
1071
|
+
* @default 'block'
|
|
1072
|
+
*/
|
|
1073
|
+
display?: Responsive<"none" | "block" | "inline-block" | "inline">;
|
|
1074
|
+
children?: ReactNode;
|
|
1075
|
+
'data-test-id'?: string;
|
|
1076
|
+
} & CommonAriaProps & RefAttributes<HTMLDivElement>>;
|
|
1093
1077
|
|
|
1094
1078
|
export declare const SegmentedControl: {
|
|
1095
1079
|
Root: ForwardRefExoticComponent<SegmentedControlRootProps & RefAttributes<HTMLDivElement>>;
|
|
@@ -1234,7 +1218,7 @@ declare type SelectSlotProps = {
|
|
|
1234
1218
|
'data-test-id'?: string;
|
|
1235
1219
|
};
|
|
1236
1220
|
|
|
1237
|
-
declare type SizeValue =
|
|
1221
|
+
declare type SizeValue = SpacingValue | 'auto' | 'fit-content' | 'intrinsic' | 'max-content' | 'min-content';
|
|
1238
1222
|
|
|
1239
1223
|
export declare const Slider: ForwardRefExoticComponent<SliderProps & RefAttributes<HTMLButtonElement>>;
|
|
1240
1224
|
|
|
@@ -1284,7 +1268,7 @@ declare type SliderProps = {
|
|
|
1284
1268
|
|
|
1285
1269
|
declare type SortDirection = 'ascending' | 'descending' | undefined;
|
|
1286
1270
|
|
|
1287
|
-
declare type SpacingValue = (string & {}) | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16 | 20 | 24 | 32 | 40 | 48 | 56 | 64;
|
|
1271
|
+
declare type SpacingValue = (string & {}) | (number & {}) | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16 | 20 | 24 | 32 | 40 | 48 | 56 | 64;
|
|
1288
1272
|
|
|
1289
1273
|
export declare const Switch: ForwardRefExoticComponent<SwitchProps & RefAttributes<HTMLButtonElement>>;
|
|
1290
1274
|
|