@jobber/components 7.11.0 → 7.11.2
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/Menu/Menu.d.ts +21 -1
- package/dist/Menu-cjs.js +41 -25
- package/dist/Menu-es.js +43 -27
- package/dist/docs/AnimatedPresence/AnimatedPresence.md +1 -1
- package/dist/docs/Autocomplete/AutocompleteV1.md +1 -1
- package/dist/docs/Autocomplete/AutocompleteV2.md +1 -1
- package/dist/docs/Banner/Banner.md +41 -41
- package/dist/docs/Box/Box.md +5 -5
- package/dist/docs/Button/Button.md +13 -13
- package/dist/docs/Checkbox/Checkbox.md +2 -2
- package/dist/docs/Chip/Chip.md +2 -2
- package/dist/docs/Cluster/Cluster.md +3 -3
- package/dist/docs/Combobox/Combobox.md +1 -1
- package/dist/docs/ConfirmationModal/ConfirmationModal.md +3 -3
- package/dist/docs/Content/Content.md +2 -2
- package/dist/docs/Countdown/Countdown.md +1 -1
- package/dist/docs/DataList/DataList.md +24 -24
- package/dist/docs/DataTable/DataTable.md +7 -7
- package/dist/docs/Divider/Divider.md +1 -1
- package/dist/docs/Flex/Flex.md +1 -1
- package/dist/docs/Form/Form.md +1 -1
- package/dist/docs/FormField/FormField.md +6 -6
- package/dist/docs/FormatDate/FormatDate.md +1 -1
- package/dist/docs/FormatFile/FormatFile.md +22 -22
- package/dist/docs/FormatRelativeDateTime/FormatRelativeDateTime.md +1 -1
- package/dist/docs/FormatTime/FormatTime.md +1 -1
- package/dist/docs/Gallery/Gallery.md +1 -1
- package/dist/docs/Glimmer/Glimmer.md +7 -7
- package/dist/docs/Grid/Grid.md +2 -2
- package/dist/docs/Heading/Heading.md +2 -2
- package/dist/docs/Icon/Icon.md +1 -1
- package/dist/docs/InlineLabel/InlineLabel.md +1 -1
- package/dist/docs/InputDate/InputDate.md +4 -4
- package/dist/docs/InputEmail/InputEmail.md +3 -3
- package/dist/docs/InputFile/InputFile.md +7 -7
- package/dist/docs/InputNumber/InputNumber.md +5 -5
- package/dist/docs/InputPassword/InputPassword.md +3 -3
- package/dist/docs/InputPhoneNumber/InputPhoneNumber.md +2 -2
- package/dist/docs/InputText/InputText.md +7 -7
- package/dist/docs/InputTime/InputTime.md +2 -2
- package/dist/docs/LightBox/LightBox.md +17 -17
- package/dist/docs/Menu/Menu.md +122 -0
- package/dist/docs/Modal/Modal.md +1 -1
- package/dist/docs/MultiSelect/MultiSelect.md +1 -1
- package/dist/docs/Page/Page.md +9 -9
- package/dist/docs/Popover/Popover.md +11 -11
- package/dist/docs/ProgressBar/ProgressBar.md +1 -1
- package/dist/docs/RadioGroup/RadioGroup.md +1 -1
- package/dist/docs/SegmentedControl/SegmentedControl.md +2 -2
- package/dist/docs/Select/Select.md +4 -4
- package/dist/docs/SideKick/SideKick.md +1 -1
- package/dist/docs/Spinner/Spinner.md +1 -1
- package/dist/docs/Text/Text.md +3 -3
- package/dist/docs/Toast/Toast.md +1 -1
- package/package.json +2 -2
package/dist/Menu/Menu.d.ts
CHANGED
|
@@ -32,6 +32,27 @@ export interface MenuComponent {
|
|
|
32
32
|
ItemPrefix: typeof MenuItemPrefix;
|
|
33
33
|
ItemSuffix: typeof MenuItemSuffix;
|
|
34
34
|
}
|
|
35
|
+
export declare function Menu(props: MenuProps): ReactElement;
|
|
36
|
+
export declare namespace Menu {
|
|
37
|
+
var Group: typeof MenuGroup;
|
|
38
|
+
var GroupLabel: typeof MenuGroupLabel;
|
|
39
|
+
var Section: typeof MenuSection;
|
|
40
|
+
var Header: typeof MenuHeader;
|
|
41
|
+
var HeaderLabel: typeof MenuHeaderLabel;
|
|
42
|
+
var Item: React.ForwardRefExoticComponent<ComposableMenuItemProps & React.RefAttributes<HTMLElement>>;
|
|
43
|
+
var Trigger: React.ForwardRefExoticComponent<ComposableMenuTriggerProps & React.RefAttributes<HTMLDivElement>>;
|
|
44
|
+
var Content: typeof MenuContent;
|
|
45
|
+
var Separator: typeof MenuSeparator;
|
|
46
|
+
var RadioGroup: typeof MenuRadioGroup;
|
|
47
|
+
var RadioItem: React.ForwardRefExoticComponent<ComposableMenuRadioItemProps & React.RefAttributes<HTMLElement>>;
|
|
48
|
+
var Submenu: typeof MenuSubmenu;
|
|
49
|
+
var SubmenuTrigger: React.ForwardRefExoticComponent<ComposableMenuSubmenuTriggerProps & React.RefAttributes<HTMLElement>>;
|
|
50
|
+
var SubmenuContent: typeof MenuSubmenuContent;
|
|
51
|
+
var ItemIcon: typeof MenuItemIcon;
|
|
52
|
+
var ItemLabel: typeof MenuItemLabel;
|
|
53
|
+
var ItemPrefix: typeof MenuItemPrefix;
|
|
54
|
+
var ItemSuffix: typeof MenuItemSuffix;
|
|
55
|
+
}
|
|
35
56
|
declare const MenuTrigger: React.ForwardRefExoticComponent<ComposableMenuTriggerProps & React.RefAttributes<HTMLDivElement>>;
|
|
36
57
|
declare function MenuContent(props: ComposableMenuContentProps): React.JSX.Element;
|
|
37
58
|
declare function MenuSeparator(props: ComposableMenuSeparatorProps): React.JSX.Element;
|
|
@@ -65,5 +86,4 @@ declare function MenuHeader(props: MenuHeaderComposableProps): React.JSX.Element
|
|
|
65
86
|
* Menu.Header > Menu.HeaderLabel continues to compose onto the new GroupLabel.
|
|
66
87
|
*/
|
|
67
88
|
declare function MenuHeaderLabel(props: MenuHeaderLabelComposableProps): React.JSX.Element;
|
|
68
|
-
export declare const Menu: MenuComponent;
|
|
69
89
|
export {};
|
package/dist/Menu-cjs.js
CHANGED
|
@@ -367,6 +367,17 @@ function getTextContent(node) {
|
|
|
367
367
|
}
|
|
368
368
|
return getTextContent(node.props.children);
|
|
369
369
|
}
|
|
370
|
+
function getBottomSheetContentStyle(style) {
|
|
371
|
+
if (!style) {
|
|
372
|
+
return undefined;
|
|
373
|
+
}
|
|
374
|
+
const safeStyle = Object.assign({}, style);
|
|
375
|
+
delete safeStyle.height;
|
|
376
|
+
delete safeStyle.maxHeight;
|
|
377
|
+
delete safeStyle.minHeight;
|
|
378
|
+
delete safeStyle.width;
|
|
379
|
+
return safeStyle;
|
|
380
|
+
}
|
|
370
381
|
// Bottom sheet menu interaction helpers. These adapt Drawer semantics into the
|
|
371
382
|
// menu-style keyboard and focus behavior we want for the mobile shell.
|
|
372
383
|
function getNavigableMenuItems(target) {
|
|
@@ -514,11 +525,12 @@ function BottomSheetContent({ children, style, className, UNSAFE_style, UNSAFE_c
|
|
|
514
525
|
UNSAFE_className,
|
|
515
526
|
UNSAFE_style,
|
|
516
527
|
});
|
|
528
|
+
const bottomSheetStyle = getBottomSheetContentStyle(resolvedBaseProps.style);
|
|
517
529
|
return (React.createElement(BottomSheet.BottomSheet.Popup, { initialFocus: getInitialBottomSheetFocus(menuRef, focusModalityRef), className: classnames({
|
|
518
530
|
[styles.menuHidden]: submenuOpen,
|
|
519
531
|
}) },
|
|
520
532
|
React.createElement(BottomSheet.BottomSheet.Content, null,
|
|
521
|
-
React.createElement(BottomSheetMenuSurface, { menuRef: menuRef, className: classnames(styles.bottomSheetMenuContent, resolvedBaseProps.className), style:
|
|
533
|
+
React.createElement(BottomSheetMenuSurface, { menuRef: menuRef, className: classnames(styles.bottomSheetMenuContent, resolvedBaseProps.className), style: bottomSheetStyle }, children))));
|
|
522
534
|
}
|
|
523
535
|
function BottomSheetSeparator({ style, className, UNSAFE_style, UNSAFE_className, }) {
|
|
524
536
|
const resolvedBaseProps = resolveComposableBaseProps({
|
|
@@ -666,8 +678,9 @@ function BottomSheetSubmenuContent({ children, className, style, UNSAFE_style, U
|
|
|
666
678
|
UNSAFE_className,
|
|
667
679
|
UNSAFE_style,
|
|
668
680
|
});
|
|
681
|
+
const bottomSheetStyle = getBottomSheetContentStyle(resolvedBaseProps.style);
|
|
669
682
|
return (React.createElement(BottomSheet.BottomSheet.Popup, { initialFocus: getInitialBottomSheetFocus(menuRef, focusModalityRef), className: classnames(styles.menu, styles.bottomSheetSubmenuPopup) },
|
|
670
|
-
React.createElement(BottomSheet.BottomSheet.Content, { style:
|
|
683
|
+
React.createElement(BottomSheet.BottomSheet.Content, { style: bottomSheetStyle },
|
|
671
684
|
title ? (React.createElement(MenuSubmenuTrigger$1.DrawerTitle, { className: styles.screenReaderOnly }, title)) : null,
|
|
672
685
|
React.createElement("div", { className: styles$1.submenuHeader },
|
|
673
686
|
React.createElement(MenuSubmenuTrigger$1.DrawerClose, { "aria-label": title ? `Back to ${title}` : "Back", render: React.createElement(Button.Button, { ariaLabel: title ? `Back to ${title}` : "Back", icon: "arrowLeft", type: "tertiary", variation: "subtle" }) }),
|
|
@@ -721,6 +734,9 @@ function getFloatingLayerStyle(style) {
|
|
|
721
734
|
return undefined;
|
|
722
735
|
return { zIndex: style.zIndex };
|
|
723
736
|
}
|
|
737
|
+
function getMenuPopupStyle(style) {
|
|
738
|
+
return Object.assign({ maxHeight: `min(${MENU_MAX_HEIGHT_PERCENTAGE}vh, max(0px, calc(var(--available-height) - var(--space-base))))` }, style);
|
|
739
|
+
}
|
|
724
740
|
function MenuDropdownRoot({ children, onOpenChange, open, defaultOpen, }) {
|
|
725
741
|
const actionsRef = React.useRef(null);
|
|
726
742
|
return (React.createElement(MenuDropdownContext.Provider, { value: {
|
|
@@ -754,9 +770,10 @@ function MenuDropdownContent({ children, style, className, preferredPlacement, U
|
|
|
754
770
|
});
|
|
755
771
|
const [side = "bottom", align = "start"] = (_a = preferredPlacement === null || preferredPlacement === void 0 ? void 0 : preferredPlacement.split(" ")) !== null && _a !== void 0 ? _a : [];
|
|
756
772
|
const floatingLayerStyle = getFloatingLayerStyle(resolvedBaseProps.style);
|
|
773
|
+
const popupStyle = getMenuPopupStyle(resolvedBaseProps.style);
|
|
757
774
|
return (React.createElement(MenuSubmenuTrigger$1.MenuPortal, null,
|
|
758
775
|
React.createElement(MenuSubmenuTrigger$1.MenuPositioner, { className: styles.floatingContainer, style: floatingLayerStyle, align: align, side: side, sideOffset: MENU_OFFSET },
|
|
759
|
-
React.createElement(MenuSubmenuTrigger$1.MenuPopup, { className: classnames(styles.menu, styles.ariaMenu, resolvedBaseProps.className), style:
|
|
776
|
+
React.createElement(MenuSubmenuTrigger$1.MenuPopup, { className: classnames(styles.menu, styles.ariaMenu, resolvedBaseProps.className), style: popupStyle }, children))));
|
|
760
777
|
}
|
|
761
778
|
function MenuDropdownRadioGroup({ children, value, defaultValue, onValueChange, className, style, UNSAFE_style, UNSAFE_className, }) {
|
|
762
779
|
const resolvedBaseProps = resolveComposableBaseProps({
|
|
@@ -847,9 +864,10 @@ function MenuDropdownSubmenuContent({ children, className, style, UNSAFE_style,
|
|
|
847
864
|
UNSAFE_style,
|
|
848
865
|
});
|
|
849
866
|
const floatingLayerStyle = getFloatingLayerStyle(resolvedBaseProps.style);
|
|
867
|
+
const popupStyle = getMenuPopupStyle(resolvedBaseProps.style);
|
|
850
868
|
return (React.createElement(MenuSubmenuTrigger$1.MenuPortal, null,
|
|
851
869
|
React.createElement(MenuSubmenuTrigger$1.MenuPositioner, { className: styles.floatingContainer, style: floatingLayerStyle, align: "start", side: "right", sideOffset: MENU_OFFSET },
|
|
852
|
-
React.createElement(MenuSubmenuTrigger$1.MenuPopup, { className: classnames(styles.menu, styles.ariaMenu, resolvedBaseProps.className), style:
|
|
870
|
+
React.createElement(MenuSubmenuTrigger$1.MenuPopup, { className: classnames(styles.menu, styles.ariaMenu, resolvedBaseProps.className), style: popupStyle }, children))));
|
|
853
871
|
}
|
|
854
872
|
function MenuDropdownGroupLabel(props) {
|
|
855
873
|
const { className, style } = resolveComposableBaseProps(props);
|
|
@@ -896,7 +914,7 @@ function MenuComposableRoot(props) {
|
|
|
896
914
|
return (React.createElement(MenuContext.Provider, { value: { isMobile } },
|
|
897
915
|
React.createElement(RootComponent, { onOpenChange: props.onOpenChange, open: props.open, defaultOpen: props.defaultOpen }, props.children)));
|
|
898
916
|
}
|
|
899
|
-
function
|
|
917
|
+
function Menu(props) {
|
|
900
918
|
if (isLegacy(props)) {
|
|
901
919
|
return React.createElement(MenuLegacy, Object.assign({}, props));
|
|
902
920
|
}
|
|
@@ -993,25 +1011,23 @@ function MenuHeaderLabel(props) {
|
|
|
993
1011
|
}
|
|
994
1012
|
// Menu now routes the legacy items-based API locally and owns the new
|
|
995
1013
|
// Base UI-backed composable implementation directly.
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
ItemSuffix: MenuItemSuffix,
|
|
1015
|
-
});
|
|
1014
|
+
Menu.Group = MenuGroup;
|
|
1015
|
+
Menu.GroupLabel = MenuGroupLabel;
|
|
1016
|
+
Menu.Section = MenuSection;
|
|
1017
|
+
Menu.Header = MenuHeader;
|
|
1018
|
+
Menu.HeaderLabel = MenuHeaderLabel;
|
|
1019
|
+
Menu.Item = MenuItem;
|
|
1020
|
+
Menu.Trigger = MenuTrigger;
|
|
1021
|
+
Menu.Content = MenuContent;
|
|
1022
|
+
Menu.Separator = MenuSeparator;
|
|
1023
|
+
Menu.RadioGroup = MenuRadioGroup;
|
|
1024
|
+
Menu.RadioItem = MenuRadioItem;
|
|
1025
|
+
Menu.Submenu = MenuSubmenu;
|
|
1026
|
+
Menu.SubmenuTrigger = MenuSubmenuTrigger;
|
|
1027
|
+
Menu.SubmenuContent = MenuSubmenuContent;
|
|
1028
|
+
Menu.ItemIcon = MenuItemIcon;
|
|
1029
|
+
Menu.ItemLabel = MenuItemLabel;
|
|
1030
|
+
Menu.ItemPrefix = MenuItemPrefix;
|
|
1031
|
+
Menu.ItemSuffix = MenuItemSuffix;
|
|
1016
1032
|
|
|
1017
1033
|
exports.Menu = Menu;
|
package/dist/Menu-es.js
CHANGED
|
@@ -13,7 +13,7 @@ import { _ as __rest } from './tslib.es6-es.js';
|
|
|
13
13
|
import { m as mergeProps } from './useRenderElement-es.js';
|
|
14
14
|
import { B as BottomSheet } from './BottomSheet-es.js';
|
|
15
15
|
import { O as OverlaySeparator } from './OverlaySeparator-es.js';
|
|
16
|
-
import { D as DrawerTrigger, a as DrawerTitle, b as DrawerClose, M as MenuTrigger$1, c as MenuLinkItem, d as MenuItem$1, e as MenuRadioItem$1, f as MenuRadioItemIndicator, g as MenuSubmenuTrigger$1, h as MenuRoot
|
|
16
|
+
import { D as DrawerTrigger, a as DrawerTitle, b as DrawerClose, M as MenuTrigger$1, c as MenuLinkItem, d as MenuItem$1, e as MenuRadioItem$1, f as MenuRadioItemIndicator, g as MenuSubmenuTrigger$1, h as MenuRoot, i as MenuPortal$1, j as MenuPositioner, k as MenuPopup, l as MenuRadioGroup$1, m as MenuGroup$1, n as MenuSubmenuRoot, o as MenuGroupLabel$1 } from './MenuSubmenuTrigger-es.js';
|
|
17
17
|
|
|
18
18
|
var styles$2 = {"wrapper":"h-nk89U2n6Q-","floatingContainer":"krpkWzoaVcc-","menu":"_7sU7mp1w0jM-","legacySection":"_4x-vvEmn4gM-","separator":"i0QNcs4S-wk-","triggerWrapper":"_7CsejipGrzM-","ariaMenu":"bO7lGVQC42c-","ariaItem":"u6fDgbWmPck-","ariaSection":"-TSNrZBKZJI-","ariaSectionHeader":"zs7dS2pKjEw-","sectionHeader":"MZJgunQcmdQ-","legacyAction":"_-1GOlrzd098-","action":"NYXV5w4pd0c-","destructive":"baYK2zQ6-GA-","overlay":"A7T14ALVEKg-","fullWidth":"Lgbn9IRPI5Y-","screenReaderOnly":"o-ps580KdWI-","spinning":"f1oTdSTeUOM-"};
|
|
19
19
|
|
|
@@ -365,6 +365,17 @@ function getTextContent(node) {
|
|
|
365
365
|
}
|
|
366
366
|
return getTextContent(node.props.children);
|
|
367
367
|
}
|
|
368
|
+
function getBottomSheetContentStyle(style) {
|
|
369
|
+
if (!style) {
|
|
370
|
+
return undefined;
|
|
371
|
+
}
|
|
372
|
+
const safeStyle = Object.assign({}, style);
|
|
373
|
+
delete safeStyle.height;
|
|
374
|
+
delete safeStyle.maxHeight;
|
|
375
|
+
delete safeStyle.minHeight;
|
|
376
|
+
delete safeStyle.width;
|
|
377
|
+
return safeStyle;
|
|
378
|
+
}
|
|
368
379
|
// Bottom sheet menu interaction helpers. These adapt Drawer semantics into the
|
|
369
380
|
// menu-style keyboard and focus behavior we want for the mobile shell.
|
|
370
381
|
function getNavigableMenuItems(target) {
|
|
@@ -512,11 +523,12 @@ function BottomSheetContent({ children, style, className, UNSAFE_style, UNSAFE_c
|
|
|
512
523
|
UNSAFE_className,
|
|
513
524
|
UNSAFE_style,
|
|
514
525
|
});
|
|
526
|
+
const bottomSheetStyle = getBottomSheetContentStyle(resolvedBaseProps.style);
|
|
515
527
|
return (React__default.createElement(BottomSheet.Popup, { initialFocus: getInitialBottomSheetFocus(menuRef, focusModalityRef), className: classnames({
|
|
516
528
|
[styles.menuHidden]: submenuOpen,
|
|
517
529
|
}) },
|
|
518
530
|
React__default.createElement(BottomSheet.Content, null,
|
|
519
|
-
React__default.createElement(BottomSheetMenuSurface, { menuRef: menuRef, className: classnames(styles.bottomSheetMenuContent, resolvedBaseProps.className), style:
|
|
531
|
+
React__default.createElement(BottomSheetMenuSurface, { menuRef: menuRef, className: classnames(styles.bottomSheetMenuContent, resolvedBaseProps.className), style: bottomSheetStyle }, children))));
|
|
520
532
|
}
|
|
521
533
|
function BottomSheetSeparator({ style, className, UNSAFE_style, UNSAFE_className, }) {
|
|
522
534
|
const resolvedBaseProps = resolveComposableBaseProps({
|
|
@@ -664,8 +676,9 @@ function BottomSheetSubmenuContent({ children, className, style, UNSAFE_style, U
|
|
|
664
676
|
UNSAFE_className,
|
|
665
677
|
UNSAFE_style,
|
|
666
678
|
});
|
|
679
|
+
const bottomSheetStyle = getBottomSheetContentStyle(resolvedBaseProps.style);
|
|
667
680
|
return (React__default.createElement(BottomSheet.Popup, { initialFocus: getInitialBottomSheetFocus(menuRef, focusModalityRef), className: classnames(styles.menu, styles.bottomSheetSubmenuPopup) },
|
|
668
|
-
React__default.createElement(BottomSheet.Content, { style:
|
|
681
|
+
React__default.createElement(BottomSheet.Content, { style: bottomSheetStyle },
|
|
669
682
|
title ? (React__default.createElement(DrawerTitle, { className: styles.screenReaderOnly }, title)) : null,
|
|
670
683
|
React__default.createElement("div", { className: styles$1.submenuHeader },
|
|
671
684
|
React__default.createElement(DrawerClose, { "aria-label": title ? `Back to ${title}` : "Back", render: React__default.createElement(Button, { ariaLabel: title ? `Back to ${title}` : "Back", icon: "arrowLeft", type: "tertiary", variation: "subtle" }) }),
|
|
@@ -719,6 +732,9 @@ function getFloatingLayerStyle(style) {
|
|
|
719
732
|
return undefined;
|
|
720
733
|
return { zIndex: style.zIndex };
|
|
721
734
|
}
|
|
735
|
+
function getMenuPopupStyle(style) {
|
|
736
|
+
return Object.assign({ maxHeight: `min(${MENU_MAX_HEIGHT_PERCENTAGE}vh, max(0px, calc(var(--available-height) - var(--space-base))))` }, style);
|
|
737
|
+
}
|
|
722
738
|
function MenuDropdownRoot({ children, onOpenChange, open, defaultOpen, }) {
|
|
723
739
|
const actionsRef = React__default.useRef(null);
|
|
724
740
|
return (React__default.createElement(MenuDropdownContext.Provider, { value: {
|
|
@@ -727,7 +743,7 @@ function MenuDropdownRoot({ children, onOpenChange, open, defaultOpen, }) {
|
|
|
727
743
|
(_a = actionsRef.current) === null || _a === void 0 ? void 0 : _a.close();
|
|
728
744
|
},
|
|
729
745
|
} },
|
|
730
|
-
React__default.createElement(MenuRoot
|
|
746
|
+
React__default.createElement(MenuRoot, { actionsRef: actionsRef, open: open, defaultOpen: defaultOpen, onOpenChange: isOpen => {
|
|
731
747
|
onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(isOpen);
|
|
732
748
|
} }, children)));
|
|
733
749
|
}
|
|
@@ -752,9 +768,10 @@ function MenuDropdownContent({ children, style, className, preferredPlacement, U
|
|
|
752
768
|
});
|
|
753
769
|
const [side = "bottom", align = "start"] = (_a = preferredPlacement === null || preferredPlacement === void 0 ? void 0 : preferredPlacement.split(" ")) !== null && _a !== void 0 ? _a : [];
|
|
754
770
|
const floatingLayerStyle = getFloatingLayerStyle(resolvedBaseProps.style);
|
|
771
|
+
const popupStyle = getMenuPopupStyle(resolvedBaseProps.style);
|
|
755
772
|
return (React__default.createElement(MenuPortal$1, null,
|
|
756
773
|
React__default.createElement(MenuPositioner, { className: styles.floatingContainer, style: floatingLayerStyle, align: align, side: side, sideOffset: MENU_OFFSET },
|
|
757
|
-
React__default.createElement(MenuPopup, { className: classnames(styles.menu, styles.ariaMenu, resolvedBaseProps.className), style:
|
|
774
|
+
React__default.createElement(MenuPopup, { className: classnames(styles.menu, styles.ariaMenu, resolvedBaseProps.className), style: popupStyle }, children))));
|
|
758
775
|
}
|
|
759
776
|
function MenuDropdownRadioGroup({ children, value, defaultValue, onValueChange, className, style, UNSAFE_style, UNSAFE_className, }) {
|
|
760
777
|
const resolvedBaseProps = resolveComposableBaseProps({
|
|
@@ -845,9 +862,10 @@ function MenuDropdownSubmenuContent({ children, className, style, UNSAFE_style,
|
|
|
845
862
|
UNSAFE_style,
|
|
846
863
|
});
|
|
847
864
|
const floatingLayerStyle = getFloatingLayerStyle(resolvedBaseProps.style);
|
|
865
|
+
const popupStyle = getMenuPopupStyle(resolvedBaseProps.style);
|
|
848
866
|
return (React__default.createElement(MenuPortal$1, null,
|
|
849
867
|
React__default.createElement(MenuPositioner, { className: styles.floatingContainer, style: floatingLayerStyle, align: "start", side: "right", sideOffset: MENU_OFFSET },
|
|
850
|
-
React__default.createElement(MenuPopup, { className: classnames(styles.menu, styles.ariaMenu, resolvedBaseProps.className), style:
|
|
868
|
+
React__default.createElement(MenuPopup, { className: classnames(styles.menu, styles.ariaMenu, resolvedBaseProps.className), style: popupStyle }, children))));
|
|
851
869
|
}
|
|
852
870
|
function MenuDropdownGroupLabel(props) {
|
|
853
871
|
const { className, style } = resolveComposableBaseProps(props);
|
|
@@ -894,7 +912,7 @@ function MenuComposableRoot(props) {
|
|
|
894
912
|
return (React__default.createElement(MenuContext.Provider, { value: { isMobile } },
|
|
895
913
|
React__default.createElement(RootComponent, { onOpenChange: props.onOpenChange, open: props.open, defaultOpen: props.defaultOpen }, props.children)));
|
|
896
914
|
}
|
|
897
|
-
function
|
|
915
|
+
function Menu(props) {
|
|
898
916
|
if (isLegacy(props)) {
|
|
899
917
|
return React__default.createElement(MenuLegacy, Object.assign({}, props));
|
|
900
918
|
}
|
|
@@ -991,25 +1009,23 @@ function MenuHeaderLabel(props) {
|
|
|
991
1009
|
}
|
|
992
1010
|
// Menu now routes the legacy items-based API locally and owns the new
|
|
993
1011
|
// Base UI-backed composable implementation directly.
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
ItemSuffix: MenuItemSuffix,
|
|
1013
|
-
});
|
|
1012
|
+
Menu.Group = MenuGroup;
|
|
1013
|
+
Menu.GroupLabel = MenuGroupLabel;
|
|
1014
|
+
Menu.Section = MenuSection;
|
|
1015
|
+
Menu.Header = MenuHeader;
|
|
1016
|
+
Menu.HeaderLabel = MenuHeaderLabel;
|
|
1017
|
+
Menu.Item = MenuItem;
|
|
1018
|
+
Menu.Trigger = MenuTrigger;
|
|
1019
|
+
Menu.Content = MenuContent;
|
|
1020
|
+
Menu.Separator = MenuSeparator;
|
|
1021
|
+
Menu.RadioGroup = MenuRadioGroup;
|
|
1022
|
+
Menu.RadioItem = MenuRadioItem;
|
|
1023
|
+
Menu.Submenu = MenuSubmenu;
|
|
1024
|
+
Menu.SubmenuTrigger = MenuSubmenuTrigger;
|
|
1025
|
+
Menu.SubmenuContent = MenuSubmenuContent;
|
|
1026
|
+
Menu.ItemIcon = MenuItemIcon;
|
|
1027
|
+
Menu.ItemLabel = MenuItemLabel;
|
|
1028
|
+
Menu.ItemPrefix = MenuItemPrefix;
|
|
1029
|
+
Menu.ItemSuffix = MenuItemSuffix;
|
|
1014
1030
|
|
|
1015
1031
|
export { Menu as M };
|
|
@@ -71,4 +71,4 @@ example.
|
|
|
71
71
|
| Prop | Type | Required | Default | Description |
|
|
72
72
|
|------|------|----------|---------|-------------|
|
|
73
73
|
| `initial` | `boolean` | No | — | Whether or not to animate the children on mount. By default it's set to false. |
|
|
74
|
-
| `transition` | `"
|
|
74
|
+
| `transition` | `"fade" | "fromBottom" | "fromLeft" | "fromLeftToRight" | "fromRight" | "fromRightToLeft" | "fromTop" | "popIn"` | No | — | The type of transition you can use. |
|
|
@@ -1323,7 +1323,7 @@ is, focus the extra element and if not it will focus the input.
|
|
|
1323
1323
|
| `onFocus` | `(event?: FocusEvent<Element, Element>) => void` | No | — | Focus callback. |
|
|
1324
1324
|
| `prefix` | `Affix` | No | — | Adds a prefix label and icon to the field |
|
|
1325
1325
|
| `ref` | `Ref<InputTextRef>` | No | — | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (... |
|
|
1326
|
-
| `size` | `"
|
|
1326
|
+
| `size` | `"large" | "small"` | No | — | Adjusts the interface to either have small or large spacing. |
|
|
1327
1327
|
| `suffix` | `{ onClick: () => void; readonly ariaLabel: string; readonly icon: IconNames; readonly label?: string; } | { onClick?: never; ariaLabel?: never; readonly label?: string; readonly icon?: IconNames; }` | No | — | Adds a suffix label and icon with an optional action to the field |
|
|
1328
1328
|
| `validations` | `RegisterOptions` | No | — | Validations to run on the input. |
|
|
1329
1329
|
| `version` | `1` | No | `1` | Version of the component to use. |
|
|
@@ -811,7 +811,7 @@ This is not yet implemented fully. Avoid using.
|
|
|
811
811
|
| `prefix` | `Affix` | No | — | Adds a prefix label and icon to the field. |
|
|
812
812
|
| `readOnly` | `boolean` | No | — | Whether the input is read-only (HTML standard casing). |
|
|
813
813
|
| `ref` | `Ref<HTMLInputElement | HTMLTextAreaElement>` | No | — | |
|
|
814
|
-
| `size` | `"
|
|
814
|
+
| `size` | `"large" | "small"` | No | — | Adjusts the interface to either have small or large spacing. |
|
|
815
815
|
| `suffix` | `{ onClick: () => void; readonly ariaLabel: string; readonly icon: IconNames; readonly label?: string; } | { onClick?: never; ariaLabel?: never; readonly label?: string; readonly icon?: IconNames; }` | No | — | Adds a suffix label and icon with an optional action to the field. |
|
|
816
816
|
| `UNSAFE_className` | `{ menu?: string; option?: string; section?: string; action?: string; input?: string; header?: string; footer?: string; selection?: string; }` | No | — | **Use at your own risk:** Custom class names for specific elements. This should only be used as a **last resort**. Us... |
|
|
817
817
|
| `UNSAFE_styles` | `{ menu?: CSSProperties; option?: CSSProperties; section?: CSSProperties; action?: CSSProperties; input?: CSSProperties; header?: CSSProperties; footer?: CSSProperties; selection?: CSSProperties; }` | No | — | **Use at your own risk:** Custom style for specific elements. This should only be used as a **last resort**. Using th... |
|
|
@@ -391,47 +391,6 @@ Use `UNSAFE_style` to apply inline custom styles to the Banner.
|
|
|
391
391
|
| `onDismiss` | `() => void` | No | — | Callback to be called when the Banner is dismissed. |
|
|
392
392
|
| `primaryAction` | `{ onClick?: never; external?: never; readonly name?: string; submit: never; readonly type?: ButtonType; readonly value?: string; readonly size?: ButtonSize; readonly ariaLabel?: string; ... 17 more ...; readonly children?: never; } | ... 34 more ... | { ...; }` | No | — | Accepts props for Button. Default action uses a 'subtle' Button |
|
|
393
393
|
|
|
394
|
-
#### Banner.Provider
|
|
395
|
-
|
|
396
|
-
| Prop | Type | Required | Default | Description |
|
|
397
|
-
|------|------|----------|---------|-------------|
|
|
398
|
-
| `type` | `BannerType` | Yes | — | Sets the status-based theme of the Banner. |
|
|
399
|
-
| `dismissButton` | `ReactNode` | No | `<Banner.DismissButton/>` | Dismiss button to be used for the Banner. If you want to remove the dismiss button, set to false. |
|
|
400
|
-
| `icon` | `ReactNode` | No | `<Banner.Icon/>` | Icon to be used for the Banner. If you want to remove the icon, set to false. |
|
|
401
|
-
| `onDismiss` | `() => void` | No | — | Callback to be called when the Banner is dismissed. |
|
|
402
|
-
| `UNSAFE_className` | `{ readonly container?: string; }` | No | — | **Use at your own risk:** Custom class names for specific elements. This should only be used as a **last resort**. Us... |
|
|
403
|
-
| `UNSAFE_style` | `{ readonly container?: CSSProperties; }` | No | — | **Use at your own risk:** Custom style for specific elements. This should only be used as a **last resort**. Using th... |
|
|
404
|
-
| `visible` | `boolean` | No | — | When provided, Banner's visibility is controlled by this value. |
|
|
405
|
-
|
|
406
|
-
#### Banner.Icon
|
|
407
|
-
|
|
408
|
-
| Prop | Type | Required | Default | Description |
|
|
409
|
-
|------|------|----------|---------|-------------|
|
|
410
|
-
| `backgroundColor` | `"event" | "invoice" | "job" | "quote" | "request" | "task" | "text" | "visit" | "warning" | "icon" | "disabled" | "success" | "base-grey--100" | "base-grey--200" | "base-grey--300" | ... 269 more ... | "client--onSurface"` | No | — | Sets the background color of the icon. |
|
|
411
|
-
| `color` | `"task" | "text" | "warning" | "icon" | "disabled" | "success" | "blue" | "green" | "yellow" | "red" | "grey" | "white" | "greyBlue" | "lightBlue" | "orange" | "navy" | "interactive" | ... 32 more ... | "brandHighlight"` | No | — | Determines the color of the icon. Some icons have a default system colour like quotes, jobs, and invoices. Others tha... |
|
|
412
|
-
| `customColor` | `string` | No | — | Sets a custom color for the icon. Can be a rgb() or hex value. |
|
|
413
|
-
| `name` | `IconNames` | No | — | The icon to show. |
|
|
414
|
-
| `size` | `"small" | "large" | "base"` | No | `base` | Changes the size to small or large. |
|
|
415
|
-
| `testID` | `string` | No | — | Used to locate this view in end-to-end tests |
|
|
416
|
-
| `UNSAFE_className` | `{ readonly container?: string; readonly icon?: { svg?: string; path?: string; }; }` | No | — | **Use at your own risk:** Custom class names for specific elements. This should only be used as a **last resort**. Us... |
|
|
417
|
-
| `UNSAFE_style` | `{ readonly container?: CSSProperties; readonly icon?: { svg?: CSSProperties; path?: CSSProperties; }; }` | No | — | **Use at your own risk:** Custom style for specific elements. This should only be used as a **last resort**. Using th... |
|
|
418
|
-
|
|
419
|
-
#### Banner.Content
|
|
420
|
-
|
|
421
|
-
| Prop | Type | Required | Default | Description |
|
|
422
|
-
|------|------|----------|---------|-------------|
|
|
423
|
-
| `UNSAFE_className` | `{ readonly container?: string; }` | No | — | **Use at your own risk:** Custom class names for specific elements. This should only be used as a **last resort**. Us... |
|
|
424
|
-
| `UNSAFE_style` | `{ readonly container?: CSSProperties; }` | No | — | **Use at your own risk:** Custom style for specific elements. This should only be used as a **last resort**. Using th... |
|
|
425
|
-
|
|
426
|
-
#### Banner.DismissButton
|
|
427
|
-
|
|
428
|
-
| Prop | Type | Required | Default | Description |
|
|
429
|
-
|------|------|----------|---------|-------------|
|
|
430
|
-
| `ariaLabel` | `string` | No | — | |
|
|
431
|
-
| `onClick` | `(event: MouseEvent<HTMLAnchorElement | HTMLButtonElement, MouseEvent>) => void` | No | — | |
|
|
432
|
-
| `UNSAFE_className` | `{ readonly container?: string; }` | No | — | **Use at your own risk:** Custom class names for specific elements. This should only be used as a **last resort**. Us... |
|
|
433
|
-
| `UNSAFE_style` | `{ readonly container?: CSSProperties; }` | No | — | **Use at your own risk:** Custom style for specific elements. This should only be used as a **last resort**. Using th... |
|
|
434
|
-
|
|
435
394
|
#### Banner.Action
|
|
436
395
|
|
|
437
396
|
| Prop | Type | Required | Default | Description |
|
|
@@ -461,3 +420,44 @@ Use `UNSAFE_style` to apply inline custom styles to the Banner.
|
|
|
461
420
|
| `url` | `string` | No | — | Used to create an 'href' on an anchor tag. |
|
|
462
421
|
| `value` | `string` | No | — | |
|
|
463
422
|
| `variation` | `ButtonVariation` | No | — | |
|
|
423
|
+
|
|
424
|
+
#### Banner.Content
|
|
425
|
+
|
|
426
|
+
| Prop | Type | Required | Default | Description |
|
|
427
|
+
|------|------|----------|---------|-------------|
|
|
428
|
+
| `UNSAFE_className` | `{ readonly container?: string; }` | No | — | **Use at your own risk:** Custom class names for specific elements. This should only be used as a **last resort**. Us... |
|
|
429
|
+
| `UNSAFE_style` | `{ readonly container?: CSSProperties; }` | No | — | **Use at your own risk:** Custom style for specific elements. This should only be used as a **last resort**. Using th... |
|
|
430
|
+
|
|
431
|
+
#### Banner.DismissButton
|
|
432
|
+
|
|
433
|
+
| Prop | Type | Required | Default | Description |
|
|
434
|
+
|------|------|----------|---------|-------------|
|
|
435
|
+
| `ariaLabel` | `string` | No | — | |
|
|
436
|
+
| `onClick` | `(event: MouseEvent<HTMLAnchorElement | HTMLButtonElement, MouseEvent>) => void` | No | — | |
|
|
437
|
+
| `UNSAFE_className` | `{ readonly container?: string; }` | No | — | **Use at your own risk:** Custom class names for specific elements. This should only be used as a **last resort**. Us... |
|
|
438
|
+
| `UNSAFE_style` | `{ readonly container?: CSSProperties; }` | No | — | **Use at your own risk:** Custom style for specific elements. This should only be used as a **last resort**. Using th... |
|
|
439
|
+
|
|
440
|
+
#### Banner.Icon
|
|
441
|
+
|
|
442
|
+
| Prop | Type | Required | Default | Description |
|
|
443
|
+
|------|------|----------|---------|-------------|
|
|
444
|
+
| `backgroundColor` | `"event" | "invoice" | "job" | "quote" | "request" | "task" | "text" | "visit" | "warning" | "icon" | "disabled" | "success" | "base-grey--100" | "base-grey--200" | "base-grey--300" | ... 269 more ... | "client--onSurface"` | No | — | Sets the background color of the icon. |
|
|
445
|
+
| `color` | `"task" | "text" | "warning" | "icon" | "disabled" | "success" | "blue" | "green" | "yellow" | "red" | "grey" | "white" | "greyBlue" | "lightBlue" | "orange" | "navy" | "interactive" | ... 32 more ... | "brandHighlight"` | No | — | Determines the color of the icon. Some icons have a default system colour like quotes, jobs, and invoices. Others tha... |
|
|
446
|
+
| `customColor` | `string` | No | — | Sets a custom color for the icon. Can be a rgb() or hex value. |
|
|
447
|
+
| `name` | `IconNames` | No | — | The icon to show. |
|
|
448
|
+
| `size` | `"base" | "large" | "small"` | No | `base` | Changes the size to small or large. |
|
|
449
|
+
| `testID` | `string` | No | — | Used to locate this view in end-to-end tests |
|
|
450
|
+
| `UNSAFE_className` | `{ readonly container?: string; readonly icon?: { svg?: string; path?: string; }; }` | No | — | **Use at your own risk:** Custom class names for specific elements. This should only be used as a **last resort**. Us... |
|
|
451
|
+
| `UNSAFE_style` | `{ readonly container?: CSSProperties; readonly icon?: { svg?: CSSProperties; path?: CSSProperties; }; }` | No | — | **Use at your own risk:** Custom style for specific elements. This should only be used as a **last resort**. Using th... |
|
|
452
|
+
|
|
453
|
+
#### Banner.Provider
|
|
454
|
+
|
|
455
|
+
| Prop | Type | Required | Default | Description |
|
|
456
|
+
|------|------|----------|---------|-------------|
|
|
457
|
+
| `type` | `BannerType` | Yes | — | Sets the status-based theme of the Banner. |
|
|
458
|
+
| `dismissButton` | `ReactNode` | No | `<Banner.DismissButton/>` | Dismiss button to be used for the Banner. If you want to remove the dismiss button, set to false. |
|
|
459
|
+
| `icon` | `ReactNode` | No | `<Banner.Icon/>` | Icon to be used for the Banner. If you want to remove the icon, set to false. |
|
|
460
|
+
| `onDismiss` | `() => void` | No | — | Callback to be called when the Banner is dismissed. |
|
|
461
|
+
| `UNSAFE_className` | `{ readonly container?: string; }` | No | — | **Use at your own risk:** Custom class names for specific elements. This should only be used as a **last resort**. Us... |
|
|
462
|
+
| `UNSAFE_style` | `{ readonly container?: CSSProperties; }` | No | — | **Use at your own risk:** Custom style for specific elements. This should only be used as a **last resort**. Using th... |
|
|
463
|
+
| `visible` | `boolean` | No | — | When provided, Banner's visibility is controlled by this value. |
|
package/dist/docs/Box/Box.md
CHANGED
|
@@ -205,19 +205,19 @@ defaults to respecting theme/modes.
|
|
|
205
205
|
|------|------|----------|---------|-------------|
|
|
206
206
|
| `alignItems` | `AlignItems` | No | — | This feature is well established and works across many devices and browser versions. It’s been available across brows... |
|
|
207
207
|
| `alignSelf` | `AlignSelf` | No | — | This feature is well established and works across many devices and browser versions. It’s been available across brows... |
|
|
208
|
-
| `as` | `"
|
|
208
|
+
| `as` | `"article" | "aside" | "div" | "main" | "section" | "span"` | No | `div` | |
|
|
209
209
|
| `background` | `"event" | "invoice" | "job" | "quote" | "request" | "task" | "text" | "visit" | "warning" | "icon" | "disabled" | "success" | "base-grey--100" | "base-grey--200" | "base-grey--300" | ... 269 more ... | "client--onSurface"` | No | — | |
|
|
210
210
|
| `border` | `"base" | "thick" | "thicker" | "thickest" | BoxBorderWidth` | No | — | |
|
|
211
211
|
| `borderColor` | `"event" | "invoice" | "job" | "quote" | "request" | "task" | "text" | "visit" | "warning" | "icon" | "disabled" | "success" | "base-grey--100" | "base-grey--200" | "base-grey--300" | ... 269 more ... | "client--onSurface"` | No | — | |
|
|
212
212
|
| `direction` | `FlexDirection` | No | — | |
|
|
213
|
-
| `gap` | `"
|
|
213
|
+
| `gap` | `"base" | "extravagant" | "large" | "larger" | "largest" | "minuscule" | "slim" | "small" | "smaller" | "smallest"` | No | — | |
|
|
214
214
|
| `height` | `BoxDimension` | No | `auto` | |
|
|
215
215
|
| `justifyContent` | `JustifyContent` | No | — | This feature is well established and works across many devices and browser versions. It’s been available across brows... |
|
|
216
|
-
| `margin` | `"
|
|
216
|
+
| `margin` | `"base" | "extravagant" | "large" | "larger" | "largest" | "minuscule" | "slim" | "small" | "smaller" | "smallest" | BoxSpace` | No | — | |
|
|
217
217
|
| `overflow` | `Overflow` | No | — | This feature is well established and works across many devices and browser versions. It’s been available across brows... |
|
|
218
|
-
| `padding` | `"
|
|
218
|
+
| `padding` | `"base" | "extravagant" | "large" | "larger" | "largest" | "minuscule" | "slim" | "small" | "smaller" | "smallest" | BoxSpace` | No | — | |
|
|
219
219
|
| `position` | `Position` | No | `relative` | This feature is well established and works across many devices and browser versions. It’s been available across brows... |
|
|
220
220
|
| `preserveWhiteSpace` | `boolean` | No | — | |
|
|
221
|
-
| `radius` | `"
|
|
221
|
+
| `radius` | `"base" | "circle" | "large" | "larger" | "small"` | No | — | |
|
|
222
222
|
| `tabIndex` | `number` | No | — | [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/tabIndex) |
|
|
223
223
|
| `width` | `BoxDimension` | No | `auto` | |
|
|
@@ -930,29 +930,29 @@ export const styles = StyleSheet.create({
|
|
|
930
930
|
| `value` | `string` | No | — | |
|
|
931
931
|
| `variation` | `ButtonVariation` | No | — | |
|
|
932
932
|
|
|
933
|
+
#### Button.Icon
|
|
934
|
+
|
|
935
|
+
| Prop | Type | Required | Default | Description |
|
|
936
|
+
|------|------|----------|---------|-------------|
|
|
937
|
+
| `name` | `IconNames` | Yes | — | The icon to show. |
|
|
938
|
+
| `size` | `"base" | "large" | "small"` | No | `base` | Changes the size to small or large. |
|
|
939
|
+
| `testID` | `string` | No | — | Used to locate this view in end-to-end tests |
|
|
940
|
+
| `UNSAFE_className` | `{ svg?: string; path?: string; }` | No | — | **Use at your own risk:** Custom classnames for specific elements. This should only be used as a **last resort**. Usi... |
|
|
941
|
+
| `UNSAFE_style` | `{ svg?: CSSProperties; path?: CSSProperties; }` | No | — | **Use at your own risk:** Custom style for specific elements. This should only be used as a **last resort**. Using th... |
|
|
942
|
+
|
|
933
943
|
#### Button.Label
|
|
934
944
|
|
|
935
945
|
| Prop | Type | Required | Default | Description |
|
|
936
946
|
|------|------|----------|---------|-------------|
|
|
937
947
|
| `align` | `"center" | "end" | "start"` | No | `"start"` | Sets the alignment to start, center, or end. In LTR scripts this equates to left, center, or right. |
|
|
938
|
-
| `element` | `"
|
|
948
|
+
| `element` | `"b" | "dd" | "dt" | "em" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p" | "span" | "strong"` | No | `span` | |
|
|
939
949
|
| `emphasisType` | `"highlight" | "italic"` | No | — | |
|
|
940
950
|
| `fontFamily` | `"base" | "display"` | No | `base` | |
|
|
941
951
|
| `fontWeight` | `"black" | "bold" | "extraBold" | "medium" | "regular" | "semiBold"` | No | `semiBold` | Aside from changing the font weights, this also changes the font family. Source sans for `regular` and `bold`. Poppin... |
|
|
942
952
|
| `id` | `string` | No | — | |
|
|
943
953
|
| `numberOfLines` | `number` | No | — | |
|
|
944
|
-
| `size` | `"
|
|
945
|
-
| `textCase` | `"
|
|
954
|
+
| `size` | `"base" | "extravagant" | "jumbo" | "large" | "larger" | "largest" | "small" | "smaller"` | No | — | |
|
|
955
|
+
| `textCase` | `"capitalize" | "lowercase" | "none" | "uppercase"` | No | — | |
|
|
946
956
|
| `underline` | `UnderlineStyle | "solid color-indigo" | "solid color-indigo--light" | "solid color-indigo--lighter" | "solid color-indigo--lightest" | "solid color-indigo--dark" | ... 646 more ... | "dashed color-client--onSurface"` | No | — | The style (and optionally a color) of underline the text is decorated with. All semantic color tokens (other than the... |
|
|
947
957
|
| `UNSAFE_className` | `{ textStyle?: string; }` | No | — | **Use at your own risk:** Custom classNames for specific elements. This should only be used as a **last resort**. Usi... |
|
|
948
958
|
| `UNSAFE_style` | `{ textStyle?: CSSProperties; }` | No | — | **Use at your own risk:** Custom style for specific elements. This should only be used as a **last resort**. Using th... |
|
|
949
|
-
|
|
950
|
-
#### Button.Icon
|
|
951
|
-
|
|
952
|
-
| Prop | Type | Required | Default | Description |
|
|
953
|
-
|------|------|----------|---------|-------------|
|
|
954
|
-
| `name` | `IconNames` | Yes | — | The icon to show. |
|
|
955
|
-
| `size` | `"small" | "large" | "base"` | No | `base` | Changes the size to small or large. |
|
|
956
|
-
| `testID` | `string` | No | — | Used to locate this view in end-to-end tests |
|
|
957
|
-
| `UNSAFE_className` | `{ svg?: string; path?: string; }` | No | — | **Use at your own risk:** Custom classnames for specific elements. This should only be used as a **last resort**. Usi... |
|
|
958
|
-
| `UNSAFE_style` | `{ svg?: CSSProperties; path?: CSSProperties; }` | No | — | **Use at your own risk:** Custom style for specific elements. This should only be used as a **last resort**. Using th... |
|
|
@@ -59,7 +59,7 @@ able to keep track the state of the child Checkboxes. See
|
|
|
59
59
|
| Prop | Type | Required | Default | Description |
|
|
60
60
|
|------|------|----------|---------|-------------|
|
|
61
61
|
| `aria-activedescendant` | `string` | No | — | ID of the currently active descendant element. Used for composite widgets like combobox or listbox. @see {@link https... |
|
|
62
|
-
| `aria-autocomplete` | `"
|
|
62
|
+
| `aria-autocomplete` | `"both" | "inline" | "list" | "none"` | No | — | Indicates the type of autocomplete interaction. @see {@link https://www.w3.org/TR/wai-aria-1.2/#aria-autocomplete} |
|
|
63
63
|
| `aria-controls` | `string` | No | — | Indicates the element that controls the current element. @see {@link https://www.w3.org/TR/wai-aria-1.2/#aria-controls} |
|
|
64
64
|
| `aria-describedby` | `string` | No | — | Identifies the element (or elements) that describes the object. @see {@link https://www.w3.org/TR/wai-aria-1.2/#aria-... |
|
|
65
65
|
| `aria-details` | `string` | No | — | Identifies the element (or elements) that provide a detailed, extended description. @see {@link https://www.w3.org/TR... |
|
|
@@ -84,5 +84,5 @@ able to keep track the state of the child Checkboxes. See
|
|
|
84
84
|
| `onMouseUp` | `(event: MouseEvent<HTMLInputElement, MouseEvent>) => void` | No | — | Mouse up event handler. |
|
|
85
85
|
| `onPointerDown` | `(event: PointerEvent<HTMLInputElement>) => void` | No | — | Pointer down event handler. |
|
|
86
86
|
| `onPointerUp` | `(event: PointerEvent<HTMLInputElement>) => void` | No | — | Pointer up event handler. |
|
|
87
|
-
| `ref` | `Ref<
|
|
87
|
+
| `ref` | `Ref<HTMLInputElement>` | No | — | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (... |
|
|
88
88
|
| `value` | `string` | No | — | Value of the checkbox. |
|
package/dist/docs/Chip/Chip.md
CHANGED
|
@@ -369,9 +369,9 @@ those more complex selection flows.
|
|
|
369
369
|
| `onClick` | `((ev: MouseEvent<HTMLButtonElement | HTMLDivElement, MouseEvent>) => void) & MouseEventHandler<ChipElement>` | No | — | Chip click callback using a standard event-first signature. |
|
|
370
370
|
| `onClickValue` | `(value: string | number, ev: MouseEvent<HTMLButtonElement | HTMLDivElement, MouseEvent>) => void` | No | — | Value-first click callback retained as an upgrade path for existing consumers. @deprecated Prefer `onClick` with a cl... |
|
|
371
371
|
| `onKeyDown` | `((ev: KeyboardEvent<HTMLButtonElement | HTMLDivElement>) => void) & KeyboardEventHandler<ChipElement>` | No | — | Callback. Called when you keydown on Chip. Ships the event, so you can get the key pushed. |
|
|
372
|
-
| `ref` | `Ref<
|
|
372
|
+
| `ref` | `Ref<HTMLButtonElement | HTMLDivElement>` | No | — | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (... |
|
|
373
373
|
| `role` | `string` | No | `button` | The accessible role the Chip is fulfilling. Defaults to 'button' |
|
|
374
374
|
| `tabIndex` | `number` | No | `0` | Used for accessibility purpopses, specifically using the tab key as navigation. |
|
|
375
375
|
| `testID` | `string` | No | — | The testing id for the chip if necessary. |
|
|
376
|
-
| `value` | `
|
|
376
|
+
| `value` | `number | string` | No | — | Will be passed to onClick, when the user clicks on this Chip. |
|
|
377
377
|
| `variation` | `ChipVariations` | No | `base` | Button style variation. Does not affect functionality. |
|
|
@@ -219,16 +219,16 @@ equal spacing and consistent sizing.
|
|
|
219
219
|
|
|
220
220
|
| Prop | Type | Required | Default | Description |
|
|
221
221
|
|------|------|----------|---------|-------------|
|
|
222
|
-
| `align` | `"
|
|
222
|
+
| `align` | `"center" | "end" | "start" | "stretch"` | No | — | The vertical alignment of the cluster elements. |
|
|
223
223
|
| `ariaAttributes` | `AriaAttributes` | No | — | Standard HTML aria attributes. Accepts all standard HTML aria attributes. |
|
|
224
224
|
| `as` | `CommonAllowedElements` | No | `div` | The HTML tag to render the cluster as. |
|
|
225
225
|
| `autoWidth` | `boolean` | No | `false` | Enabling this prevents the cluster from taking 100% of the width of the parent and instead flows with the content. |
|
|
226
|
-
| `collapseBelow` | `"
|
|
226
|
+
| `collapseBelow` | `"lg" | "md" | "sm" | "xl" | "xs"` | No | — | The breakpoint below which the cluster will collapse. |
|
|
227
227
|
| `collapsed` | `boolean` | No | — | Force the cluster to collapse. Use this when our breakpoints are not enough control. |
|
|
228
228
|
| `dataAttributes` | `{ [key: `data-${string}`]: string; }` | No | — | Standard HTML data attributes. Accepts anything in a {{"data-key":"value"}} format. |
|
|
229
229
|
| `gap` | `GapSpacing` | No | — | The amount of space between the cluster elements. Semantic tokens are available. |
|
|
230
230
|
| `id` | `string` | No | — | Standard HTML id attribute. |
|
|
231
|
-
| `justify` | `"
|
|
231
|
+
| `justify` | `"center" | "end" | "space-around" | "space-between" | "start"` | No | — | The horizontal justification of the cluster elements. |
|
|
232
232
|
| `role` | `AriaRole` | No | — | Standard HTML role attribute. |
|
|
233
233
|
| `UNSAFE_className` | `{ container?: string; }` | No | — | **Use at your own risk:** Custom class names for specific elements. This should only be used as a **last resort**. Us... |
|
|
234
234
|
| `UNSAFE_style` | `{ container?: CSSProperties; }` | No | — | **Use at your own risk:** Custom style for specific elements. This should only be used as a **last resort**. Using th... |
|
|
@@ -275,7 +275,7 @@ window.HTMLElement.prototype.scrollIntoView = scrollIntoViewMock;
|
|
|
275
275
|
|
|
276
276
|
| Prop | Type | Required | Default | Description |
|
|
277
277
|
|------|------|----------|---------|-------------|
|
|
278
|
-
| `id` | `
|
|
278
|
+
| `id` | `number | string` | Yes | — | A unique identifier for the option. |
|
|
279
279
|
| `label` | `string` | Yes | — | The value to be visually displayed in the Combobox options list. |
|
|
280
280
|
| `customRender` | `(option: Pick<ComboboxOptionProps, "prefix" | "label" | "id"> & { isSelected: boolean; defaultContent: ReactElement<unknown, string | JSXElementConstructor<any>>; }) => ReactNode` | No | — | Advanced: A custom render prop to completely control how this option is rendered. The function receives the option's ... |
|
|
281
281
|
| `onClick` | `(option: ComboboxOptionProps) => void` | No | — | Callback function invoked when the option is clicked. |
|
|
@@ -119,7 +119,7 @@ language should be direct and honest about the impact without being alarming.
|
|
|
119
119
|
| `onConfirm` | `() => void` | No | — | Callback for when the confirm button is pressed. |
|
|
120
120
|
| `onRequestClose` | `() => void` | No | — | Callback for whenever a user's action should close the modal. |
|
|
121
121
|
| `open` | `boolean` | No | `false` | Controls if the modal is open or not. |
|
|
122
|
-
| `ref` | `Ref<
|
|
123
|
-
| `size` | `"
|
|
122
|
+
| `ref` | `Ref<ConfirmationModalRef>` | No | — | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (... |
|
|
123
|
+
| `size` | `"large" | "small"` | No | — | Size of the modal (small, large), |
|
|
124
124
|
| `title` | `string` | No | — | Title for the modal. |
|
|
125
|
-
| `variation` | `"
|
|
125
|
+
| `variation` | `"destructive" | "work"` | No | `work` | Type (Work or destructive) for confirm button. |
|
|
@@ -60,5 +60,5 @@ UNSAFE_style: {
|
|
|
60
60
|
|
|
61
61
|
| Prop | Type | Required | Default | Description |
|
|
62
62
|
|------|------|----------|---------|-------------|
|
|
63
|
-
| `spacing` | `"
|
|
64
|
-
| `type` | `"
|
|
63
|
+
| `spacing` | `"base" | "extravagant" | "large" | "larger" | "largest" | "minuscule" | "slim" | "small" | "smaller" | "smallest"` | No | `base` | The amount of vertical spacing between the children |
|
|
64
|
+
| `type` | `"article" | "aside" | "div" | "footer" | "header" | "main" | "section"` | No | `div` | Change the wrapping element to be one of the available semantic tags. |
|