@vector-im/compound-web 9.0.1 → 9.1.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/components/Badge/Badge.cjs +8 -4
- package/dist/components/Badge/Badge.cjs.map +1 -1
- package/dist/components/Badge/Badge.d.ts +5 -1
- package/dist/components/Badge/Badge.d.ts.map +1 -1
- package/dist/components/Badge/Badge.js +9 -5
- package/dist/components/Badge/Badge.js.map +1 -1
- package/dist/components/Badge/Badge.module.cjs +4 -1
- package/dist/components/Badge/Badge.module.cjs.map +1 -1
- package/dist/components/Badge/Badge.module.js +4 -1
- package/dist/components/Badge/Badge.module.js.map +1 -1
- package/dist/components/Button/IconButton/IconButton.cjs +2 -1
- package/dist/components/Button/IconButton/IconButton.cjs.map +1 -1
- package/dist/components/Button/IconButton/IconButton.d.ts +5 -0
- package/dist/components/Button/IconButton/IconButton.d.ts.map +1 -1
- package/dist/components/Button/IconButton/IconButton.js +2 -1
- package/dist/components/Button/IconButton/IconButton.js.map +1 -1
- package/dist/components/Menu/ContextMenu.cjs +17 -0
- package/dist/components/Menu/ContextMenu.cjs.map +1 -1
- package/dist/components/Menu/ContextMenu.d.ts.map +1 -1
- package/dist/components/Menu/ContextMenu.js +18 -1
- package/dist/components/Menu/ContextMenu.js.map +1 -1
- package/dist/components/Menu/Menu.cjs +28 -0
- package/dist/components/Menu/Menu.cjs.map +1 -1
- package/dist/components/Menu/Menu.d.ts.map +1 -1
- package/dist/components/Menu/Menu.js +30 -2
- package/dist/components/Menu/Menu.js.map +1 -1
- package/dist/components/Menu/MenuContext.cjs.map +1 -1
- package/dist/components/Menu/MenuContext.d.ts +22 -0
- package/dist/components/Menu/MenuContext.d.ts.map +1 -1
- package/dist/components/Menu/MenuContext.js.map +1 -1
- package/dist/components/Menu/MenuItem.module.cjs +8 -8
- package/dist/components/Menu/MenuItem.module.cjs.map +1 -1
- package/dist/components/Menu/MenuItem.module.js +8 -8
- package/dist/components/Menu/MenuItem.module.js.map +1 -1
- package/dist/components/Menu/SubMenu.cjs +24 -0
- package/dist/components/Menu/SubMenu.cjs.map +1 -0
- package/dist/components/Menu/SubMenu.d.ts +26 -0
- package/dist/components/Menu/SubMenu.d.ts.map +1 -0
- package/dist/components/Menu/SubMenu.js +22 -0
- package/dist/components/Menu/SubMenu.js.map +1 -0
- package/dist/components/Toast/Toast.cjs +29 -4
- package/dist/components/Toast/Toast.cjs.map +1 -1
- package/dist/components/Toast/Toast.d.ts +13 -1
- package/dist/components/Toast/Toast.d.ts.map +1 -1
- package/dist/components/Toast/Toast.js +29 -5
- package/dist/components/Toast/Toast.js.map +1 -1
- package/dist/components/Toast/Toast.module.cjs +10 -1
- package/dist/components/Toast/Toast.module.cjs.map +1 -1
- package/dist/components/Toast/Toast.module.js +10 -1
- package/dist/components/Toast/Toast.module.js.map +1 -1
- package/dist/index.cjs +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/style.css +134 -49
- package/package.json +2 -2
- package/src/components/Badge/Badge.module.css +44 -11
- package/src/components/Badge/Badge.tsx +10 -2
- package/src/components/Button/IconButton/IconButton.tsx +12 -1
- package/src/components/Menu/ContextMenu.tsx +24 -0
- package/src/components/Menu/Menu.tsx +56 -1
- package/src/components/Menu/MenuContext.tsx +23 -0
- package/src/components/Menu/MenuItem.module.css +27 -5
- package/src/components/Menu/SubMenu.tsx +62 -0
- package/src/components/Toast/Toast.module.css +32 -2
- package/src/components/Toast/Toast.tsx +68 -6
- package/src/index.ts +1 -0
|
@@ -8,11 +8,33 @@ export interface MenuItemWrapperProps {
|
|
|
8
8
|
onSelect: (e: Event) => void;
|
|
9
9
|
children: ReactNode;
|
|
10
10
|
}
|
|
11
|
+
export interface SubMenuWrapperProps {
|
|
12
|
+
/**
|
|
13
|
+
* The trigger element that opens the submenu (typically a MenuItem).
|
|
14
|
+
*/
|
|
15
|
+
trigger: ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* The submenu contents.
|
|
18
|
+
*/
|
|
19
|
+
children: ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* Whether the submenu is open (controlled).
|
|
22
|
+
*/
|
|
23
|
+
open?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Event handler called when the open state of the submenu changes.
|
|
26
|
+
*/
|
|
27
|
+
onOpenChange?: (open: boolean) => void;
|
|
28
|
+
}
|
|
11
29
|
export interface MenuData {
|
|
12
30
|
/**
|
|
13
31
|
* A component that wraps interactive menu items.
|
|
14
32
|
*/
|
|
15
33
|
MenuItemWrapper: ComponentType<MenuItemWrapperProps> | null;
|
|
34
|
+
/**
|
|
35
|
+
* A component that wraps submenus.
|
|
36
|
+
*/
|
|
37
|
+
SubMenuWrapper: ComponentType<SubMenuWrapperProps> | null;
|
|
16
38
|
/**
|
|
17
39
|
* Event handler called when the open state of the menu changes.
|
|
18
40
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuContext.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/MenuContext.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,SAAS,EAAiB,MAAM,OAAO,CAAC;AAE1E,MAAM,WAAW,oBAAoB;IACnC;;;;OAIG;IACH,QAAQ,EAAE,CAAC,CAAC,EAAE,KAAK,KAAK,IAAI,CAAC;IAC7B,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,MAAM,WAAW,QAAQ;IACvB;;OAEG;IACH,eAAe,EAAE,aAAa,CAAC,oBAAoB,CAAC,GAAG,IAAI,CAAC;IAC5D;;OAEG;IACH,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACvC;AAED;;;GAGG;AACH,eAAO,MAAM,WAAW,0CAAuC,CAAC"}
|
|
1
|
+
{"version":3,"file":"MenuContext.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/MenuContext.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,SAAS,EAAiB,MAAM,OAAO,CAAC;AAE1E,MAAM,WAAW,oBAAoB;IACnC;;;;OAIG;IACH,QAAQ,EAAE,CAAC,CAAC,EAAE,KAAK,KAAK,IAAI,CAAC;IAC7B,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,OAAO,EAAE,SAAS,CAAC;IACnB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACxC;AAED,MAAM,WAAW,QAAQ;IACvB;;OAEG;IACH,eAAe,EAAE,aAAa,CAAC,oBAAoB,CAAC,GAAG,IAAI,CAAC;IAC5D;;OAEG;IACH,cAAc,EAAE,aAAa,CAAC,mBAAmB,CAAC,GAAG,IAAI,CAAC;IAC1D;;OAEG;IACH,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACvC;AAED;;;GAGG;AACH,eAAO,MAAM,WAAW,0CAAuC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuContext.js","names":[],"sources":["../../../src/components/Menu/MenuContext.tsx"],"sourcesContent":["/*\nCopyright 2023 New Vector Ltd.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\nimport { type ComponentType, type ReactNode, createContext } from \"react\";\n\nexport interface MenuItemWrapperProps {\n /**\n * Event callback for when the item is selected via mouse, touch, or keyboard.\n * Calling event.preventDefault in this handler will prevent the menu from\n * being dismissed.\n */\n onSelect: (e: Event) => void;\n children: ReactNode;\n}\n\nexport interface MenuData {\n /**\n * A component that wraps interactive menu items.\n */\n MenuItemWrapper: ComponentType<MenuItemWrapperProps> | null;\n /**\n * Event handler called when the open state of the menu changes.\n */\n onOpenChange: (open: boolean) => void;\n}\n\n/**\n * A React context providing information about the menu in which a given\n * component resides.\n */\nexport const MenuContext = createContext<MenuData | null>(null);\n"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"MenuContext.js","names":[],"sources":["../../../src/components/Menu/MenuContext.tsx"],"sourcesContent":["/*\nCopyright 2023 New Vector Ltd.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\nimport { type ComponentType, type ReactNode, createContext } from \"react\";\n\nexport interface MenuItemWrapperProps {\n /**\n * Event callback for when the item is selected via mouse, touch, or keyboard.\n * Calling event.preventDefault in this handler will prevent the menu from\n * being dismissed.\n */\n onSelect: (e: Event) => void;\n children: ReactNode;\n}\n\nexport interface SubMenuWrapperProps {\n /**\n * The trigger element that opens the submenu (typically a MenuItem).\n */\n trigger: ReactNode;\n /**\n * The submenu contents.\n */\n children: ReactNode;\n /**\n * Whether the submenu is open (controlled).\n */\n open?: boolean;\n /**\n * Event handler called when the open state of the submenu changes.\n */\n onOpenChange?: (open: boolean) => void;\n}\n\nexport interface MenuData {\n /**\n * A component that wraps interactive menu items.\n */\n MenuItemWrapper: ComponentType<MenuItemWrapperProps> | null;\n /**\n * A component that wraps submenus.\n */\n SubMenuWrapper: ComponentType<SubMenuWrapperProps> | null;\n /**\n * Event handler called when the open state of the menu changes.\n */\n onOpenChange: (open: boolean) => void;\n}\n\n/**\n * A React context providing information about the menu in which a given\n * component resides.\n */\nexport const MenuContext = createContext<MenuData | null>(null);\n"],"mappings":";;;;;;AAyDA,IAAa,cAAc,cAA+B,KAAK"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
//#region src/components/Menu/MenuItem.module.css
|
|
2
|
-
var item = "
|
|
3
|
-
var interactive = "
|
|
4
|
-
var label = "
|
|
5
|
-
var icon = "
|
|
6
|
-
var disabled = "
|
|
2
|
+
var item = "_item_bym9p_8";
|
|
3
|
+
var interactive = "_interactive_bym9p_26";
|
|
4
|
+
var label = "_label_bym9p_35";
|
|
5
|
+
var icon = "_icon_bym9p_51";
|
|
6
|
+
var disabled = "_disabled_bym9p_140";
|
|
7
7
|
var MenuItem_module_default = {
|
|
8
8
|
item,
|
|
9
9
|
interactive,
|
|
10
|
-
"no-label": "_no-
|
|
10
|
+
"no-label": "_no-label_bym9p_31",
|
|
11
11
|
label,
|
|
12
|
-
"no-icon": "_no-
|
|
12
|
+
"no-icon": "_no-icon_bym9p_42",
|
|
13
13
|
icon,
|
|
14
|
-
"nav-hint": "_nav-
|
|
14
|
+
"nav-hint": "_nav-hint_bym9p_60",
|
|
15
15
|
disabled
|
|
16
16
|
};
|
|
17
17
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuItem.module.cjs","names":[],"sources":["../../../src/components/Menu/MenuItem.module.css"],"sourcesContent":["/*\nCopyright 2023 New Vector Ltd.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\n.item {\n display: grid;\n grid-template: \"icon label .\" auto \"empty1 label empty2\" auto / auto auto minmax(\n /* Reserve space for the chevron so that the layout doesn't shift on\n hover */\n var(--cpd-space-2x),\n 1fr\n );\n place-items: center end;\n padding-block: var(--cpd-space-2x);\n padding-inline: var(--cpd-space-4x);\n box-sizing: border-box;\n inline-size: 100%;\n min-inline-size: 200px;\n color: var(--cpd-color-text-secondary);\n background: var(--cpd-color-bg-action-secondary-rest);\n}\n\n.item.interactive {\n cursor: pointer;\n}\n\n.item.no-label {\n grid-template: \"icon .\" auto / auto 1fr;\n}\n\n.label {\n grid-area: label;\n margin-inline-end: var(--cpd-space-4x);\n text-align: start;\n word-break: break-word; /* stylelint-disable-line declaration-property-value-keyword-no-deprecated */\n}\n\n.item.no-icon {\n grid-template: \"label .\" auto / auto 1fr;\n\n .label {\n /* Without icon, the height changes when hovered */\n min-block-size: 24px;\n }\n}\n\n.icon {\n grid-area: icon;\n margin-inline-end: var(--cpd-space-3x);\n}\n\n.item.no-label .icon {\n margin-inline-end: var(--cpd-space-4x);\n}\n\n.nav-hint {\n /* Hidden until the item is hovered over */\n display: none;\n flex-shrink: 0;\n}\n\nbutton.item {\n appearance: none;\n border: none;\n}\n\n.item[data-kind=\"primary\"] > .label {\n color: var(--cpd-color-text-primary);\n}\n\n.item[data-kind=\"primary\"] > .icon {\n color: var(--cpd-color-icon-primary);\n}\n\n.item[data-kind=\"primary\"] > .nav-hint {\n color: var(--cpd-color-icon-tertiary);\n}\n\n.item[data-kind=\"critical\"] > .label {\n color: var(--cpd-color-text-critical-primary);\n}\n\n.item[data-kind=\"critical\"] > .icon,\n.item[data-kind=\"critical\"] > .nav-hint {\n color: var(--cpd-color-icon-critical-primary);\n}\n\n@media (hover) {\n .item.interactive[data-kind=\"primary\"]:hover {\n background: var(--cpd-color-bg-action-secondary-hovered);\n }\n\n .item.interactive[data-kind=\"critical\"]:hover {\n background: var(--cpd-color-bg-critical-subtle);\n }\n\n /* Replace the children with the navigation hint on hover */\n .item.interactive:hover > .nav-hint {\n display: initial;\n }\n\n .item.interactive:hover > .nav-hint ~ * {\n display: none;\n }\n}\n\n.item.interactive[data-kind=\"primary\"]:active {\n background: var(--cpd-color-bg-action-secondary-pressed);\n}\n\n.item.interactive[data-kind=\"critical\"]:active {\n background: var(--cpd-color-bg-critical-subtle-hovered);\n}\n\n.item[data-kind].disabled {\n pointer-events: none;\n}\n\n.item[data-kind].disabled > .label,\n.item[data-kind].disabled > .icon,\n.item[data-kind].disabled > .nav-hint {\n color: var(--cpd-color-text-disabled);\n}\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"MenuItem.module.cjs","names":[],"sources":["../../../src/components/Menu/MenuItem.module.css"],"sourcesContent":["/*\nCopyright 2023 New Vector Ltd.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\n.item {\n display: grid;\n grid-template: \"icon label .\" auto \"empty1 label empty2\" auto / auto auto minmax(\n /* Reserve space for the chevron so that the layout doesn't shift on\n hover */\n var(--cpd-space-2x),\n 1fr\n );\n place-items: center end;\n padding-block: var(--cpd-space-2x);\n padding-inline: var(--cpd-space-4x);\n box-sizing: border-box;\n inline-size: 100%;\n min-inline-size: 200px;\n color: var(--cpd-color-text-secondary);\n background: var(--cpd-color-bg-action-secondary-rest);\n}\n\n.item.interactive,\n.item[data-state] {\n cursor: pointer;\n}\n\n.item.no-label {\n grid-template: \"icon .\" auto / auto 1fr;\n}\n\n.label {\n grid-area: label;\n margin-inline-end: var(--cpd-space-4x);\n text-align: start;\n word-break: break-word; /* stylelint-disable-line declaration-property-value-keyword-no-deprecated */\n}\n\n.item.no-icon {\n grid-template: \"label .\" auto / auto 1fr;\n\n .label {\n /* Without icon, the height changes when hovered */\n min-block-size: 24px;\n }\n}\n\n.icon {\n grid-area: icon;\n margin-inline-end: var(--cpd-space-3x);\n}\n\n.item.no-label .icon {\n margin-inline-end: var(--cpd-space-4x);\n}\n\n.nav-hint {\n /* Hidden until the item is hovered over */\n display: none;\n flex-shrink: 0;\n}\n\nbutton.item {\n appearance: none;\n border: none;\n}\n\n.item[data-kind=\"primary\"] > .label {\n color: var(--cpd-color-text-primary);\n}\n\n.item[data-kind=\"primary\"] > .icon {\n color: var(--cpd-color-icon-primary);\n}\n\n.item[data-kind=\"primary\"] > .nav-hint {\n color: var(--cpd-color-icon-tertiary);\n}\n\n.item[data-kind=\"critical\"] > .label {\n color: var(--cpd-color-text-critical-primary);\n}\n\n.item[data-kind=\"critical\"] > .icon,\n.item[data-kind=\"critical\"] > .nav-hint {\n color: var(--cpd-color-icon-critical-primary);\n}\n\n/* Submenu triggers: always show the chevron and apply hover style when open */\n.item[data-state] > .nav-hint {\n display: initial;\n}\n\n.item[data-state] > .nav-hint ~ * {\n display: none;\n}\n\n.item[data-state=\"open\"][data-kind=\"primary\"] {\n background: var(--cpd-color-bg-action-secondary-hovered);\n}\n\n.item[data-state=\"open\"][data-kind=\"critical\"] {\n background: var(--cpd-color-bg-critical-subtle);\n}\n\n@media (hover) {\n .item.interactive[data-kind=\"primary\"]:hover,\n .item[data-state][data-kind=\"primary\"]:hover {\n background: var(--cpd-color-bg-action-secondary-hovered);\n }\n\n .item.interactive[data-kind=\"critical\"]:hover,\n .item[data-state][data-kind=\"critical\"]:hover {\n background: var(--cpd-color-bg-critical-subtle);\n }\n\n /* Replace the children with the navigation hint on hover */\n .item.interactive:hover > .nav-hint {\n display: initial;\n }\n\n .item.interactive:hover > .nav-hint ~ * {\n display: none;\n }\n}\n\n.item.interactive[data-kind=\"primary\"]:active,\n.item[data-state][data-kind=\"primary\"]:active {\n background: var(--cpd-color-bg-action-secondary-pressed);\n}\n\n.item.interactive[data-kind=\"critical\"]:active,\n.item[data-state][data-kind=\"critical\"]:active {\n background: var(--cpd-color-bg-critical-subtle-hovered);\n}\n\n.item[data-kind].disabled {\n pointer-events: none;\n}\n\n.item[data-kind].disabled > .label,\n.item[data-kind].disabled > .icon,\n.item[data-kind].disabled > .nav-hint {\n color: var(--cpd-color-text-disabled);\n}\n"],"mappings":""}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
//#region src/components/Menu/MenuItem.module.css
|
|
2
|
-
var item = "
|
|
3
|
-
var interactive = "
|
|
4
|
-
var label = "
|
|
5
|
-
var icon = "
|
|
6
|
-
var disabled = "
|
|
2
|
+
var item = "_item_bym9p_8";
|
|
3
|
+
var interactive = "_interactive_bym9p_26";
|
|
4
|
+
var label = "_label_bym9p_35";
|
|
5
|
+
var icon = "_icon_bym9p_51";
|
|
6
|
+
var disabled = "_disabled_bym9p_140";
|
|
7
7
|
var MenuItem_module_default = {
|
|
8
8
|
item,
|
|
9
9
|
interactive,
|
|
10
|
-
"no-label": "_no-
|
|
10
|
+
"no-label": "_no-label_bym9p_31",
|
|
11
11
|
label,
|
|
12
|
-
"no-icon": "_no-
|
|
12
|
+
"no-icon": "_no-icon_bym9p_42",
|
|
13
13
|
icon,
|
|
14
|
-
"nav-hint": "_nav-
|
|
14
|
+
"nav-hint": "_nav-hint_bym9p_60",
|
|
15
15
|
disabled
|
|
16
16
|
};
|
|
17
17
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuItem.module.js","names":[],"sources":["../../../src/components/Menu/MenuItem.module.css"],"sourcesContent":["/*\nCopyright 2023 New Vector Ltd.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\n.item {\n display: grid;\n grid-template: \"icon label .\" auto \"empty1 label empty2\" auto / auto auto minmax(\n /* Reserve space for the chevron so that the layout doesn't shift on\n hover */\n var(--cpd-space-2x),\n 1fr\n );\n place-items: center end;\n padding-block: var(--cpd-space-2x);\n padding-inline: var(--cpd-space-4x);\n box-sizing: border-box;\n inline-size: 100%;\n min-inline-size: 200px;\n color: var(--cpd-color-text-secondary);\n background: var(--cpd-color-bg-action-secondary-rest);\n}\n\n.item.interactive {\n cursor: pointer;\n}\n\n.item.no-label {\n grid-template: \"icon .\" auto / auto 1fr;\n}\n\n.label {\n grid-area: label;\n margin-inline-end: var(--cpd-space-4x);\n text-align: start;\n word-break: break-word; /* stylelint-disable-line declaration-property-value-keyword-no-deprecated */\n}\n\n.item.no-icon {\n grid-template: \"label .\" auto / auto 1fr;\n\n .label {\n /* Without icon, the height changes when hovered */\n min-block-size: 24px;\n }\n}\n\n.icon {\n grid-area: icon;\n margin-inline-end: var(--cpd-space-3x);\n}\n\n.item.no-label .icon {\n margin-inline-end: var(--cpd-space-4x);\n}\n\n.nav-hint {\n /* Hidden until the item is hovered over */\n display: none;\n flex-shrink: 0;\n}\n\nbutton.item {\n appearance: none;\n border: none;\n}\n\n.item[data-kind=\"primary\"] > .label {\n color: var(--cpd-color-text-primary);\n}\n\n.item[data-kind=\"primary\"] > .icon {\n color: var(--cpd-color-icon-primary);\n}\n\n.item[data-kind=\"primary\"] > .nav-hint {\n color: var(--cpd-color-icon-tertiary);\n}\n\n.item[data-kind=\"critical\"] > .label {\n color: var(--cpd-color-text-critical-primary);\n}\n\n.item[data-kind=\"critical\"] > .icon,\n.item[data-kind=\"critical\"] > .nav-hint {\n color: var(--cpd-color-icon-critical-primary);\n}\n\n@media (hover) {\n .item.interactive[data-kind=\"primary\"]:hover {\n background: var(--cpd-color-bg-action-secondary-hovered);\n }\n\n .item.interactive[data-kind=\"critical\"]:hover {\n background: var(--cpd-color-bg-critical-subtle);\n }\n\n /* Replace the children with the navigation hint on hover */\n .item.interactive:hover > .nav-hint {\n display: initial;\n }\n\n .item.interactive:hover > .nav-hint ~ * {\n display: none;\n }\n}\n\n.item.interactive[data-kind=\"primary\"]:active {\n background: var(--cpd-color-bg-action-secondary-pressed);\n}\n\n.item.interactive[data-kind=\"critical\"]:active {\n background: var(--cpd-color-bg-critical-subtle-hovered);\n}\n\n.item[data-kind].disabled {\n pointer-events: none;\n}\n\n.item[data-kind].disabled > .label,\n.item[data-kind].disabled > .icon,\n.item[data-kind].disabled > .nav-hint {\n color: var(--cpd-color-text-disabled);\n}\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"MenuItem.module.js","names":[],"sources":["../../../src/components/Menu/MenuItem.module.css"],"sourcesContent":["/*\nCopyright 2023 New Vector Ltd.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\n.item {\n display: grid;\n grid-template: \"icon label .\" auto \"empty1 label empty2\" auto / auto auto minmax(\n /* Reserve space for the chevron so that the layout doesn't shift on\n hover */\n var(--cpd-space-2x),\n 1fr\n );\n place-items: center end;\n padding-block: var(--cpd-space-2x);\n padding-inline: var(--cpd-space-4x);\n box-sizing: border-box;\n inline-size: 100%;\n min-inline-size: 200px;\n color: var(--cpd-color-text-secondary);\n background: var(--cpd-color-bg-action-secondary-rest);\n}\n\n.item.interactive,\n.item[data-state] {\n cursor: pointer;\n}\n\n.item.no-label {\n grid-template: \"icon .\" auto / auto 1fr;\n}\n\n.label {\n grid-area: label;\n margin-inline-end: var(--cpd-space-4x);\n text-align: start;\n word-break: break-word; /* stylelint-disable-line declaration-property-value-keyword-no-deprecated */\n}\n\n.item.no-icon {\n grid-template: \"label .\" auto / auto 1fr;\n\n .label {\n /* Without icon, the height changes when hovered */\n min-block-size: 24px;\n }\n}\n\n.icon {\n grid-area: icon;\n margin-inline-end: var(--cpd-space-3x);\n}\n\n.item.no-label .icon {\n margin-inline-end: var(--cpd-space-4x);\n}\n\n.nav-hint {\n /* Hidden until the item is hovered over */\n display: none;\n flex-shrink: 0;\n}\n\nbutton.item {\n appearance: none;\n border: none;\n}\n\n.item[data-kind=\"primary\"] > .label {\n color: var(--cpd-color-text-primary);\n}\n\n.item[data-kind=\"primary\"] > .icon {\n color: var(--cpd-color-icon-primary);\n}\n\n.item[data-kind=\"primary\"] > .nav-hint {\n color: var(--cpd-color-icon-tertiary);\n}\n\n.item[data-kind=\"critical\"] > .label {\n color: var(--cpd-color-text-critical-primary);\n}\n\n.item[data-kind=\"critical\"] > .icon,\n.item[data-kind=\"critical\"] > .nav-hint {\n color: var(--cpd-color-icon-critical-primary);\n}\n\n/* Submenu triggers: always show the chevron and apply hover style when open */\n.item[data-state] > .nav-hint {\n display: initial;\n}\n\n.item[data-state] > .nav-hint ~ * {\n display: none;\n}\n\n.item[data-state=\"open\"][data-kind=\"primary\"] {\n background: var(--cpd-color-bg-action-secondary-hovered);\n}\n\n.item[data-state=\"open\"][data-kind=\"critical\"] {\n background: var(--cpd-color-bg-critical-subtle);\n}\n\n@media (hover) {\n .item.interactive[data-kind=\"primary\"]:hover,\n .item[data-state][data-kind=\"primary\"]:hover {\n background: var(--cpd-color-bg-action-secondary-hovered);\n }\n\n .item.interactive[data-kind=\"critical\"]:hover,\n .item[data-state][data-kind=\"critical\"]:hover {\n background: var(--cpd-color-bg-critical-subtle);\n }\n\n /* Replace the children with the navigation hint on hover */\n .item.interactive:hover > .nav-hint {\n display: initial;\n }\n\n .item.interactive:hover > .nav-hint ~ * {\n display: none;\n }\n}\n\n.item.interactive[data-kind=\"primary\"]:active,\n.item[data-state][data-kind=\"primary\"]:active {\n background: var(--cpd-color-bg-action-secondary-pressed);\n}\n\n.item.interactive[data-kind=\"critical\"]:active,\n.item[data-state][data-kind=\"critical\"]:active {\n background: var(--cpd-color-bg-critical-subtle-hovered);\n}\n\n.item[data-kind].disabled {\n pointer-events: none;\n}\n\n.item[data-kind].disabled > .label,\n.item[data-kind].disabled > .icon,\n.item[data-kind].disabled > .nav-hint {\n color: var(--cpd-color-text-disabled);\n}\n"],"mappings":""}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
const require_MenuContext = require("./MenuContext.cjs");
|
|
3
|
+
let react = require("react");
|
|
4
|
+
react = require_runtime.__toESM(react);
|
|
5
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
6
|
+
//#region src/components/Menu/SubMenu.tsx
|
|
7
|
+
/**
|
|
8
|
+
* A submenu within a Menu or ContextMenu. The trigger should be a MenuItem
|
|
9
|
+
* component and the children are the submenu items.
|
|
10
|
+
*/
|
|
11
|
+
var SubMenu = ({ trigger, open, onOpenChange, children }) => {
|
|
12
|
+
const context = (0, react.useContext)(require_MenuContext.MenuContext);
|
|
13
|
+
if (context?.SubMenuWrapper == null) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [trigger, children] });
|
|
14
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(context.SubMenuWrapper, {
|
|
15
|
+
trigger,
|
|
16
|
+
open,
|
|
17
|
+
onOpenChange,
|
|
18
|
+
children
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
//#endregion
|
|
22
|
+
exports.SubMenu = SubMenu;
|
|
23
|
+
|
|
24
|
+
//# sourceMappingURL=SubMenu.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SubMenu.cjs","names":[],"sources":["../../../src/components/Menu/SubMenu.tsx"],"sourcesContent":["/*\nCopyright 2026 Element Creations Ltd.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\nimport React, { type FC, type ReactNode, useContext } from \"react\";\nimport { MenuContext } from \"./MenuContext\";\n\ninterface Props {\n /**\n * The trigger element that opens the submenu. This should be a MenuItem.\n */\n trigger: ReactNode;\n /**\n * Whether the submenu is open (controlled).\n */\n open?: boolean;\n /**\n * Event handler called when the open state of the submenu changes.\n */\n onOpenChange?: (open: boolean) => void;\n /**\n * The submenu contents (typically MenuItem elements).\n */\n children: ReactNode;\n}\n\n/**\n * A submenu within a Menu or ContextMenu. The trigger should be a MenuItem\n * component and the children are the submenu items.\n */\nexport const SubMenu: FC<Props> = ({\n trigger,\n open,\n onOpenChange,\n children,\n}) => {\n const context = useContext(MenuContext);\n\n // When there's no SubMenuWrapper (e.g. drawer on mobile), flatten the\n // submenu items inline — nested flyouts don't work well in drawers.\n if (context?.SubMenuWrapper == null) {\n return (\n <>\n {trigger}\n {children}\n </>\n );\n }\n\n return (\n <context.SubMenuWrapper\n trigger={trigger}\n open={open}\n onOpenChange={onOpenChange}\n >\n {children}\n </context.SubMenuWrapper>\n );\n};\n"],"mappings":";;;;;;;;;;AAiCA,IAAa,WAAsB,EACjC,SACA,MACA,cACA,eACI;CACJ,MAAM,WAAA,GAAA,MAAA,YAAqB,oBAAA,YAAY;AAIvC,KAAI,SAAS,kBAAkB,KAC7B,QACE,iBAAA,GAAA,kBAAA,MAAA,kBAAA,UAAA,EAAA,UAAA,CACG,SACA,SACA,EAAA,CAAA;AAIP,QACE,iBAAA,GAAA,kBAAA,KAAC,QAAQ,gBAAT;EACW;EACH;EACQ;EAEb;EACsB,CAAA"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
interface Props {
|
|
3
|
+
/**
|
|
4
|
+
* The trigger element that opens the submenu. This should be a MenuItem.
|
|
5
|
+
*/
|
|
6
|
+
trigger: ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* Whether the submenu is open (controlled).
|
|
9
|
+
*/
|
|
10
|
+
open?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Event handler called when the open state of the submenu changes.
|
|
13
|
+
*/
|
|
14
|
+
onOpenChange?: (open: boolean) => void;
|
|
15
|
+
/**
|
|
16
|
+
* The submenu contents (typically MenuItem elements).
|
|
17
|
+
*/
|
|
18
|
+
children: ReactNode;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* A submenu within a Menu or ContextMenu. The trigger should be a MenuItem
|
|
22
|
+
* component and the children are the submenu items.
|
|
23
|
+
*/
|
|
24
|
+
export declare const SubMenu: FC<Props>;
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=SubMenu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SubMenu.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/SubMenu.tsx"],"names":[],"mappings":"AAOA,OAAc,EAAE,KAAK,EAAE,EAAE,KAAK,SAAS,EAAc,MAAM,OAAO,CAAC;AAGnE,UAAU,KAAK;IACb;;OAEG;IACH,OAAO,EAAE,SAAS,CAAC;IACnB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;GAGG;AACH,eAAO,MAAM,OAAO,EAAE,EAAE,CAAC,KAAK,CA4B7B,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { MenuContext } from "./MenuContext.js";
|
|
2
|
+
import { useContext } from "react";
|
|
3
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/Menu/SubMenu.tsx
|
|
5
|
+
/**
|
|
6
|
+
* A submenu within a Menu or ContextMenu. The trigger should be a MenuItem
|
|
7
|
+
* component and the children are the submenu items.
|
|
8
|
+
*/
|
|
9
|
+
var SubMenu = ({ trigger, open, onOpenChange, children }) => {
|
|
10
|
+
const context = useContext(MenuContext);
|
|
11
|
+
if (context?.SubMenuWrapper == null) return /* @__PURE__ */ jsxs(Fragment, { children: [trigger, children] });
|
|
12
|
+
return /* @__PURE__ */ jsx(context.SubMenuWrapper, {
|
|
13
|
+
trigger,
|
|
14
|
+
open,
|
|
15
|
+
onOpenChange,
|
|
16
|
+
children
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
//#endregion
|
|
20
|
+
export { SubMenu };
|
|
21
|
+
|
|
22
|
+
//# sourceMappingURL=SubMenu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SubMenu.js","names":[],"sources":["../../../src/components/Menu/SubMenu.tsx"],"sourcesContent":["/*\nCopyright 2026 Element Creations Ltd.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\nimport React, { type FC, type ReactNode, useContext } from \"react\";\nimport { MenuContext } from \"./MenuContext\";\n\ninterface Props {\n /**\n * The trigger element that opens the submenu. This should be a MenuItem.\n */\n trigger: ReactNode;\n /**\n * Whether the submenu is open (controlled).\n */\n open?: boolean;\n /**\n * Event handler called when the open state of the submenu changes.\n */\n onOpenChange?: (open: boolean) => void;\n /**\n * The submenu contents (typically MenuItem elements).\n */\n children: ReactNode;\n}\n\n/**\n * A submenu within a Menu or ContextMenu. The trigger should be a MenuItem\n * component and the children are the submenu items.\n */\nexport const SubMenu: FC<Props> = ({\n trigger,\n open,\n onOpenChange,\n children,\n}) => {\n const context = useContext(MenuContext);\n\n // When there's no SubMenuWrapper (e.g. drawer on mobile), flatten the\n // submenu items inline — nested flyouts don't work well in drawers.\n if (context?.SubMenuWrapper == null) {\n return (\n <>\n {trigger}\n {children}\n </>\n );\n }\n\n return (\n <context.SubMenuWrapper\n trigger={trigger}\n open={open}\n onOpenChange={onOpenChange}\n >\n {children}\n </context.SubMenuWrapper>\n );\n};\n"],"mappings":";;;;;;;;AAiCA,IAAa,WAAsB,EACjC,SACA,MACA,cACA,eACI;CACJ,MAAM,UAAU,WAAW,YAAY;AAIvC,KAAI,SAAS,kBAAkB,KAC7B,QACE,qBAAA,UAAA,EAAA,UAAA,CACG,SACA,SACA,EAAA,CAAA;AAIP,QACE,oBAAC,QAAQ,gBAAT;EACW;EACH;EACQ;EAEb;EACsB,CAAA"}
|
|
@@ -1,18 +1,43 @@
|
|
|
1
1
|
const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
const require_Text = require("../Typography/Text.cjs");
|
|
3
|
+
const require_IconButton = require("../Button/IconButton/IconButton.cjs");
|
|
2
4
|
const require_Toast_module = require("./Toast.module.cjs");
|
|
3
5
|
let classnames = require("classnames");
|
|
4
6
|
classnames = require_runtime.__toESM(classnames);
|
|
5
7
|
let react = require("react");
|
|
6
8
|
react = require_runtime.__toESM(react);
|
|
9
|
+
let _vector_im_compound_design_tokens_assets_web_icons_close = require("@vector-im/compound-design-tokens/assets/web/icons/close");
|
|
10
|
+
_vector_im_compound_design_tokens_assets_web_icons_close = require_runtime.__toESM(_vector_im_compound_design_tokens_assets_web_icons_close);
|
|
7
11
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
12
|
//#region src/components/Toast/Toast.tsx
|
|
9
|
-
var Toast = (0, react.forwardRef)(function Toast({ children, className, ...props }, ref) {
|
|
10
|
-
const
|
|
11
|
-
|
|
13
|
+
var Toast = (0, react.forwardRef)(function Toast({ children, className, Icon, onClose, tooltip, ...props }, ref) {
|
|
14
|
+
const hasCloseButton = Boolean(onClose);
|
|
15
|
+
const classes = (0, classnames.default)(require_Toast_module.default["toast-container"], className, { [require_Toast_module.default["has-close"]]: hasCloseButton });
|
|
16
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_Text.Text, {
|
|
12
17
|
...props,
|
|
18
|
+
as: "div",
|
|
19
|
+
size: "sm",
|
|
20
|
+
weight: "medium",
|
|
13
21
|
className: classes,
|
|
14
22
|
ref,
|
|
15
|
-
children
|
|
23
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
24
|
+
className: require_Toast_module.default.content,
|
|
25
|
+
children: [Icon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
26
|
+
className: require_Toast_module.default.icon,
|
|
27
|
+
width: 20,
|
|
28
|
+
height: 20,
|
|
29
|
+
"aria-hidden": true
|
|
30
|
+
}), children]
|
|
31
|
+
}), hasCloseButton && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_IconButton.IconButton, {
|
|
32
|
+
size: "24px",
|
|
33
|
+
kind: "secondary",
|
|
34
|
+
noBackground: true,
|
|
35
|
+
tooltip,
|
|
36
|
+
tooltipPlacement: "right",
|
|
37
|
+
className: require_Toast_module.default.close,
|
|
38
|
+
onClick: onClose,
|
|
39
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_vector_im_compound_design_tokens_assets_web_icons_close.default, {})
|
|
40
|
+
})]
|
|
16
41
|
});
|
|
17
42
|
});
|
|
18
43
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.cjs","names":[],"sources":["../../../src/components/Toast/Toast.tsx"],"sourcesContent":["/*\nCopyright 2024 New Vector Ltd.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\nimport classnames from \"classnames\";\nimport React, {
|
|
1
|
+
{"version":3,"file":"Toast.cjs","names":[],"sources":["../../../src/components/Toast/Toast.tsx"],"sourcesContent":["/*\nCopyright 2024 New Vector Ltd.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\nimport classnames from \"classnames\";\nimport React, {\n forwardRef,\n type ComponentType,\n type MouseEventHandler,\n type PropsWithChildren,\n} from \"react\";\nimport styles from \"./Toast.module.css\";\nimport { Text } from \"../Typography/Text\";\nimport { IconButton } from \"../Button\";\nimport CloseIcon from \"@vector-im/compound-design-tokens/assets/web/icons/close\";\n\ntype ToastProps = {\n className?: string;\n /**\n * An icon to display within the button.\n */\n Icon?: ComponentType<React.SVGAttributes<SVGElement>>;\n /**\n * Whether to show the action button. If true, an action button will be shown on the right side of the toast.\n */\n onClose?: MouseEventHandler<HTMLButtonElement>;\n /**\n * The tooltip to show on the close button. This is only used if `onClose` is provided.\n */\n tooltip?: string;\n} & React.HTMLAttributes<HTMLDivElement>;\n\nexport const Toast = forwardRef<HTMLDivElement, ToastProps>(function Toast(\n {\n children,\n className,\n Icon,\n onClose,\n tooltip,\n ...props\n }: PropsWithChildren<ToastProps>,\n ref,\n) {\n const hasCloseButton = Boolean(onClose);\n\n const classes = classnames(styles[\"toast-container\"], className, {\n [styles[\"has-close\"]]: hasCloseButton,\n });\n\n return (\n <Text\n {...props}\n as=\"div\"\n size=\"sm\"\n weight=\"medium\"\n className={classes}\n ref={ref}\n >\n <div className={styles.content}>\n {Icon && (\n <Icon\n className={styles.icon}\n width={20}\n height={20}\n aria-hidden={true}\n />\n )}\n {children}\n </div>\n {hasCloseButton && (\n <IconButton\n size=\"24px\"\n kind=\"secondary\"\n noBackground={true}\n tooltip={tooltip}\n tooltipPlacement=\"right\"\n className={styles.close}\n onClick={onClose}\n >\n <CloseIcon />\n </IconButton>\n )}\n </Text>\n );\n});\n"],"mappings":";;;;;;;;;;;;AAmCA,IAAa,SAAA,GAAA,MAAA,YAA+C,SAAS,MACnE,EACE,UACA,WACA,MACA,SACA,SACA,GAAG,SAEL,KACA;CACA,MAAM,iBAAiB,QAAQ,QAAQ;CAEvC,MAAM,WAAA,GAAA,WAAA,SAAqB,qBAAA,QAAO,oBAAoB,WAAW,GAC9D,qBAAA,QAAO,eAAe,gBACxB,CAAC;AAEF,QACE,iBAAA,GAAA,kBAAA,MAAC,aAAA,MAAD;EACE,GAAI;EACJ,IAAG;EACH,MAAK;EACL,QAAO;EACP,WAAW;EACN;YANP,CAQE,iBAAA,GAAA,kBAAA,MAAC,OAAD;GAAK,WAAW,qBAAA,QAAO;aAAvB,CACG,QACC,iBAAA,GAAA,kBAAA,KAAC,MAAD;IACE,WAAW,qBAAA,QAAO;IAClB,OAAO;IACP,QAAQ;IACR,eAAa;IACb,CAAA,EAEH,SACG;MACL,kBACC,iBAAA,GAAA,kBAAA,KAAC,mBAAA,YAAD;GACE,MAAK;GACL,MAAK;GACL,cAAc;GACL;GACT,kBAAiB;GACjB,WAAW,qBAAA,QAAO;GAClB,SAAS;aAET,iBAAA,GAAA,kBAAA,KAAC,yDAAA,SAAD,EAAa,CAAA;GACF,CAAA,CAEV;;EAET"}
|
|
@@ -1,5 +1,17 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
1
|
+
import { default as React, ComponentType, MouseEventHandler } from 'react';
|
|
2
2
|
export declare const Toast: React.ForwardRefExoticComponent<{
|
|
3
3
|
className?: string;
|
|
4
|
+
/**
|
|
5
|
+
* An icon to display within the button.
|
|
6
|
+
*/
|
|
7
|
+
Icon?: ComponentType<React.SVGAttributes<SVGElement>>;
|
|
8
|
+
/**
|
|
9
|
+
* Whether to show the action button. If true, an action button will be shown on the right side of the toast.
|
|
10
|
+
*/
|
|
11
|
+
onClose?: MouseEventHandler<HTMLButtonElement>;
|
|
12
|
+
/**
|
|
13
|
+
* The tooltip to show on the close button. This is only used if `onClose` is provided.
|
|
14
|
+
*/
|
|
15
|
+
tooltip?: string;
|
|
4
16
|
} & React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
5
17
|
//# sourceMappingURL=Toast.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../../src/components/Toast/Toast.tsx"],"names":[],"mappings":"AAQA,OAAO,
|
|
1
|
+
{"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../../src/components/Toast/Toast.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,EAEZ,KAAK,aAAa,EAClB,KAAK,iBAAiB,EAEvB,MAAM,OAAO,CAAC;AAsBf,eAAO,MAAM,KAAK;gBAfJ,MAAM;IAClB;;OAEG;WACI,aAAa,CAAC,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;IACrD;;OAEG;cACO,iBAAiB,CAAC,iBAAiB,CAAC;IAC9C;;OAEG;cACO,MAAM;+EAuDhB,CAAC"}
|
|
@@ -1,15 +1,39 @@
|
|
|
1
|
+
import { Text } from "../Typography/Text.js";
|
|
2
|
+
import { IconButton } from "../Button/IconButton/IconButton.js";
|
|
1
3
|
import Toast_module_default from "./Toast.module.js";
|
|
2
4
|
import classNames from "classnames";
|
|
3
5
|
import { forwardRef } from "react";
|
|
4
|
-
import
|
|
6
|
+
import CloseIcon from "@vector-im/compound-design-tokens/assets/web/icons/close";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
8
|
//#region src/components/Toast/Toast.tsx
|
|
6
|
-
var Toast = forwardRef(function Toast({ children, className, ...props }, ref) {
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
+
var Toast = forwardRef(function Toast({ children, className, Icon, onClose, tooltip, ...props }, ref) {
|
|
10
|
+
const hasCloseButton = Boolean(onClose);
|
|
11
|
+
const classes = classNames(Toast_module_default["toast-container"], className, { [Toast_module_default["has-close"]]: hasCloseButton });
|
|
12
|
+
return /* @__PURE__ */ jsxs(Text, {
|
|
9
13
|
...props,
|
|
14
|
+
as: "div",
|
|
15
|
+
size: "sm",
|
|
16
|
+
weight: "medium",
|
|
10
17
|
className: classes,
|
|
11
18
|
ref,
|
|
12
|
-
children
|
|
19
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
20
|
+
className: Toast_module_default.content,
|
|
21
|
+
children: [Icon && /* @__PURE__ */ jsx(Icon, {
|
|
22
|
+
className: Toast_module_default.icon,
|
|
23
|
+
width: 20,
|
|
24
|
+
height: 20,
|
|
25
|
+
"aria-hidden": true
|
|
26
|
+
}), children]
|
|
27
|
+
}), hasCloseButton && /* @__PURE__ */ jsx(IconButton, {
|
|
28
|
+
size: "24px",
|
|
29
|
+
kind: "secondary",
|
|
30
|
+
noBackground: true,
|
|
31
|
+
tooltip,
|
|
32
|
+
tooltipPlacement: "right",
|
|
33
|
+
className: Toast_module_default.close,
|
|
34
|
+
onClick: onClose,
|
|
35
|
+
children: /* @__PURE__ */ jsx(CloseIcon, {})
|
|
36
|
+
})]
|
|
13
37
|
});
|
|
14
38
|
});
|
|
15
39
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.js","names":[],"sources":["../../../src/components/Toast/Toast.tsx"],"sourcesContent":["/*\nCopyright 2024 New Vector Ltd.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\nimport classnames from \"classnames\";\nimport React, {
|
|
1
|
+
{"version":3,"file":"Toast.js","names":[],"sources":["../../../src/components/Toast/Toast.tsx"],"sourcesContent":["/*\nCopyright 2024 New Vector Ltd.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\nimport classnames from \"classnames\";\nimport React, {\n forwardRef,\n type ComponentType,\n type MouseEventHandler,\n type PropsWithChildren,\n} from \"react\";\nimport styles from \"./Toast.module.css\";\nimport { Text } from \"../Typography/Text\";\nimport { IconButton } from \"../Button\";\nimport CloseIcon from \"@vector-im/compound-design-tokens/assets/web/icons/close\";\n\ntype ToastProps = {\n className?: string;\n /**\n * An icon to display within the button.\n */\n Icon?: ComponentType<React.SVGAttributes<SVGElement>>;\n /**\n * Whether to show the action button. If true, an action button will be shown on the right side of the toast.\n */\n onClose?: MouseEventHandler<HTMLButtonElement>;\n /**\n * The tooltip to show on the close button. This is only used if `onClose` is provided.\n */\n tooltip?: string;\n} & React.HTMLAttributes<HTMLDivElement>;\n\nexport const Toast = forwardRef<HTMLDivElement, ToastProps>(function Toast(\n {\n children,\n className,\n Icon,\n onClose,\n tooltip,\n ...props\n }: PropsWithChildren<ToastProps>,\n ref,\n) {\n const hasCloseButton = Boolean(onClose);\n\n const classes = classnames(styles[\"toast-container\"], className, {\n [styles[\"has-close\"]]: hasCloseButton,\n });\n\n return (\n <Text\n {...props}\n as=\"div\"\n size=\"sm\"\n weight=\"medium\"\n className={classes}\n ref={ref}\n >\n <div className={styles.content}>\n {Icon && (\n <Icon\n className={styles.icon}\n width={20}\n height={20}\n aria-hidden={true}\n />\n )}\n {children}\n </div>\n {hasCloseButton && (\n <IconButton\n size=\"24px\"\n kind=\"secondary\"\n noBackground={true}\n tooltip={tooltip}\n tooltipPlacement=\"right\"\n className={styles.close}\n onClick={onClose}\n >\n <CloseIcon />\n </IconButton>\n )}\n </Text>\n );\n});\n"],"mappings":";;;;;;;;AAmCA,IAAa,QAAQ,WAAuC,SAAS,MACnE,EACE,UACA,WACA,MACA,SACA,SACA,GAAG,SAEL,KACA;CACA,MAAM,iBAAiB,QAAQ,QAAQ;CAEvC,MAAM,UAAU,WAAW,qBAAO,oBAAoB,WAAW,GAC9D,qBAAO,eAAe,gBACxB,CAAC;AAEF,QACE,qBAAC,MAAD;EACE,GAAI;EACJ,IAAG;EACH,MAAK;EACL,QAAO;EACP,WAAW;EACN;YANP,CAQE,qBAAC,OAAD;GAAK,WAAW,qBAAO;aAAvB,CACG,QACC,oBAAC,MAAD;IACE,WAAW,qBAAO;IAClB,OAAO;IACP,QAAQ;IACR,eAAa;IACb,CAAA,EAEH,SACG;MACL,kBACC,oBAAC,YAAD;GACE,MAAK;GACL,MAAK;GACL,cAAc;GACL;GACT,kBAAiB;GACjB,WAAW,qBAAO;GAClB,SAAS;aAET,oBAAC,WAAD,EAAa,CAAA;GACF,CAAA,CAEV;;EAET"}
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
//#region src/components/Toast/Toast.module.css
|
|
2
|
-
var
|
|
2
|
+
var icon = "_icon_1ysb3_26";
|
|
3
|
+
var content = "_content_1ysb3_34";
|
|
4
|
+
var close = "_close_1ysb3_41";
|
|
5
|
+
var Toast_module_default = {
|
|
6
|
+
"toast-container": "_toast-container_1ysb3_8",
|
|
7
|
+
icon,
|
|
8
|
+
"has-close": "_has-close_1ysb3_30",
|
|
9
|
+
content,
|
|
10
|
+
close
|
|
11
|
+
};
|
|
3
12
|
//#endregion
|
|
4
13
|
exports.default = Toast_module_default;
|
|
5
14
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.module.cjs","names":[],"sources":["../../../src/components/Toast/Toast.module.css"],"sourcesContent":["/*\nCopyright 2024 New Vector Ltd.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\n.toast-container {\n inline-size: fit-content;\n background-color: var(--cpd-color-
|
|
1
|
+
{"version":3,"file":"Toast.module.cjs","names":[],"sources":["../../../src/components/Toast/Toast.module.css"],"sourcesContent":["/*\nCopyright 2024 New Vector Ltd.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\n.toast-container {\n inline-size: fit-content;\n background-color: var(--cpd-color-bg-action-primary-rest);\n color: var(--cpd-color-text-on-solid-primary);\n border-radius: 99px;\n padding: var(--cpd-space-2x) var(--cpd-space-4x);\n display: flex;\n flex-wrap: nowrap;\n align-items: center;\n gap: var(--cpd-space-2x);\n}\n\n@media (forced-colors: active) {\n .toast-container {\n outline: 1px solid transparent;\n }\n}\n\n.icon {\n flex-shrink: 0;\n}\n\n.has-close {\n gap: var(--cpd-space-3x);\n}\n\n.content {\n display: flex;\n flex-wrap: nowrap;\n align-items: flex-start;\n gap: var(--cpd-space-2x);\n}\n\n.close {\n align-self: flex-start;\n padding: var(--cpd-space-0-5x) !important;\n\n &:not(:hover, :focus-visible) {\n * {\n /* Override default color of icon button. The container background is different than the default canvas color */\n color: var(--cpd-color-icon-on-solid-primary) !important;\n }\n }\n}\n"],"mappings":""}
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
//#region src/components/Toast/Toast.module.css
|
|
2
|
-
var
|
|
2
|
+
var icon = "_icon_1ysb3_26";
|
|
3
|
+
var content = "_content_1ysb3_34";
|
|
4
|
+
var close = "_close_1ysb3_41";
|
|
5
|
+
var Toast_module_default = {
|
|
6
|
+
"toast-container": "_toast-container_1ysb3_8",
|
|
7
|
+
icon,
|
|
8
|
+
"has-close": "_has-close_1ysb3_30",
|
|
9
|
+
content,
|
|
10
|
+
close
|
|
11
|
+
};
|
|
3
12
|
//#endregion
|
|
4
13
|
export { Toast_module_default as default };
|
|
5
14
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.module.js","names":[],"sources":["../../../src/components/Toast/Toast.module.css"],"sourcesContent":["/*\nCopyright 2024 New Vector Ltd.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\n.toast-container {\n inline-size: fit-content;\n background-color: var(--cpd-color-
|
|
1
|
+
{"version":3,"file":"Toast.module.js","names":[],"sources":["../../../src/components/Toast/Toast.module.css"],"sourcesContent":["/*\nCopyright 2024 New Vector Ltd.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\n.toast-container {\n inline-size: fit-content;\n background-color: var(--cpd-color-bg-action-primary-rest);\n color: var(--cpd-color-text-on-solid-primary);\n border-radius: 99px;\n padding: var(--cpd-space-2x) var(--cpd-space-4x);\n display: flex;\n flex-wrap: nowrap;\n align-items: center;\n gap: var(--cpd-space-2x);\n}\n\n@media (forced-colors: active) {\n .toast-container {\n outline: 1px solid transparent;\n }\n}\n\n.icon {\n flex-shrink: 0;\n}\n\n.has-close {\n gap: var(--cpd-space-3x);\n}\n\n.content {\n display: flex;\n flex-wrap: nowrap;\n align-items: flex-start;\n gap: var(--cpd-space-2x);\n}\n\n.close {\n align-self: flex-start;\n padding: var(--cpd-space-0-5x) !important;\n\n &:not(:hover, :focus-visible) {\n * {\n /* Override default color of icon button. The container background is different than the default canvas color */\n color: var(--cpd-color-icon-on-solid-primary) !important;\n }\n }\n}\n"],"mappings":""}
|
package/dist/index.cjs
CHANGED
|
@@ -23,6 +23,7 @@ const require_NavBar = require("./components/Nav/NavBar.cjs");
|
|
|
23
23
|
const require_NavItem = require("./components/Nav/NavItem.cjs");
|
|
24
24
|
const require_Menu = require("./components/Menu/Menu.cjs");
|
|
25
25
|
const require_MenuItem = require("./components/Menu/MenuItem.cjs");
|
|
26
|
+
const require_SubMenu = require("./components/Menu/SubMenu.cjs");
|
|
26
27
|
const require_Text$1 = require("./components/Form/Controls/Text/Text.cjs");
|
|
27
28
|
const require_Action = require("./components/Form/Controls/Action/Action.cjs");
|
|
28
29
|
const require_Password = require("./components/Form/Controls/Password/Password.cjs");
|
|
@@ -127,6 +128,7 @@ exports.Search = require_Search.Search;
|
|
|
127
128
|
exports.Separator = require_Separator.Separator;
|
|
128
129
|
exports.SettingsToggleControl = require_SettingsToggle.SettingsToggleControl;
|
|
129
130
|
exports.SettingsToggleInput = require_SettingsToggle.SettingsToggleInput;
|
|
131
|
+
exports.SubMenu = require_SubMenu.SubMenu;
|
|
130
132
|
exports.Submit = require_Submit.Submit;
|
|
131
133
|
exports.Text = require_Text.Text;
|
|
132
134
|
exports.TextControl = require_Text$1.TextControl;
|
package/dist/index.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export { NavBar, NavItem } from './components/Nav';
|
|
|
18
18
|
export { Menu } from './components/Menu/Menu';
|
|
19
19
|
export { MenuItem } from './components/Menu/MenuItem';
|
|
20
20
|
export { MenuTitle } from './components/Menu/MenuTitle';
|
|
21
|
+
export { SubMenu } from './components/Menu/SubMenu';
|
|
21
22
|
export { RadioMenuItem } from './components/Menu/RadioMenuItem';
|
|
22
23
|
export { Progress } from './components/Progress/Progress';
|
|
23
24
|
export { Search } from './components/Search/Search';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAQA;;GAEG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AACjD,OAAO,EACL,OAAO,EACP,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,GACH,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,+CAA+C,CAAC;AAC9E,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAE1E,OAAO,EACL,WAAW,EAEX,WAAW,IAAI,OAAO,EACtB,SAAS,EACT,aAAa,EACb,WAAW,EACX,eAAe,EACf,aAAa,EACb,UAAU,EACV,QAAQ,EACR,eAAe,EACf,aAAa,EAEb,aAAa,IAAI,QAAQ,EACzB,YAAY,EACZ,UAAU,EAEV,UAAU,IAAI,KAAK,EACnB,aAAa,EACb,WAAW,EAEX,WAAW,IAAI,MAAM,EACrB,IAAI,EACJ,MAAM,EACN,OAAO,EACP,YAAY,EACZ,WAAW,EACX,aAAa,EACb,KAAK,EACL,WAAW,EACX,KAAK,EACL,WAAW,EACX,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,IAAI,MAAM,mBAAmB,CAAC;AAE1C;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"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"}
|
package/dist/index.js
CHANGED
|
@@ -21,6 +21,7 @@ import { NavBar } from "./components/Nav/NavBar.js";
|
|
|
21
21
|
import { NavItem } from "./components/Nav/NavItem.js";
|
|
22
22
|
import { Menu } from "./components/Menu/Menu.js";
|
|
23
23
|
import { MenuItem } from "./components/Menu/MenuItem.js";
|
|
24
|
+
import { SubMenu } from "./components/Menu/SubMenu.js";
|
|
24
25
|
import { TextControl, TextInput } from "./components/Form/Controls/Text/Text.js";
|
|
25
26
|
import { ActionControl, ActionInput } from "./components/Form/Controls/Action/Action.js";
|
|
26
27
|
import { PasswordControl, PasswordInput } from "./components/Form/Controls/Password/Password.js";
|
|
@@ -55,4 +56,4 @@ import { UnreadCounter } from "./components/ActivityMarker/UnreadCounter.js";
|
|
|
55
56
|
import { Pill } from "./components/ActivityMarker/Pill.js";
|
|
56
57
|
import { Unread } from "./components/ActivityMarker/Unread.js";
|
|
57
58
|
/* empty css */
|
|
58
|
-
export { ActionControl, ActionInput, Alert, Avatar, AvatarStack, Badge, BigIcon, Body, Breadcrumb, Button, ChatFilter, CheckboxInput as Checkbox, CheckboxControl, CheckboxInput, CheckboxMenuItem, ContextMenu, TextControl as Control, Dropdown, EditInPlace, ErrorMessage, Field, Form_exports as Form, Glass, H1, H2, H3, H4, H5, H6, Heading, HelpMessage, IconButton, IndicatorIcon, InlineField, InlineSpinner, Label, Link, MFAControl, MFAInput, Menu, MenuItem, MenuTitle, Message, NavBar, NavItem, PasswordControl, PasswordInput, Pill, Progress, RadioInput as Radio, RadioControl, RadioInput, RadioMenuItem, ReleaseAnnouncement, Root, Search, Separator, SettingsToggleControl, SettingsToggleInput, Submit, Text, TextControl, TextInput, Toast, ToggleInput as Toggle, ToggleControl, ToggleInput, ToggleMenuItem, Tooltip, TooltipProvider, Unread, UnreadCounter, ValidityState, VisualList, VisualListItem, getInitialLetter, useIdColorHash };
|
|
59
|
+
export { ActionControl, ActionInput, Alert, Avatar, AvatarStack, Badge, BigIcon, Body, Breadcrumb, Button, ChatFilter, CheckboxInput as Checkbox, CheckboxControl, CheckboxInput, CheckboxMenuItem, ContextMenu, TextControl as Control, Dropdown, EditInPlace, ErrorMessage, Field, Form_exports as Form, Glass, H1, H2, H3, H4, H5, H6, Heading, HelpMessage, IconButton, IndicatorIcon, InlineField, InlineSpinner, Label, Link, MFAControl, MFAInput, Menu, MenuItem, MenuTitle, Message, NavBar, NavItem, PasswordControl, PasswordInput, Pill, Progress, RadioInput as Radio, RadioControl, RadioInput, RadioMenuItem, ReleaseAnnouncement, Root, Search, Separator, SettingsToggleControl, SettingsToggleInput, SubMenu, Submit, Text, TextControl, TextInput, Toast, ToggleInput as Toggle, ToggleControl, ToggleInput, ToggleMenuItem, Tooltip, TooltipProvider, Unread, UnreadCounter, ValidityState, VisualList, VisualListItem, getInitialLetter, useIdColorHash };
|