@cloudscape-design/components 3.0.750 → 3.0.752
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/alert/actions-wrapper/index.d.ts +1 -1
- package/alert/actions-wrapper/index.d.ts.map +1 -1
- package/alert/actions-wrapper/index.js +2 -2
- package/alert/actions-wrapper/index.js.map +1 -1
- package/alert/internal.d.ts.map +1 -1
- package/alert/internal.js +15 -5
- package/alert/internal.js.map +1 -1
- package/alert/styles.css.js +27 -25
- package/alert/styles.scoped.css +45 -39
- package/alert/styles.selectors.js +27 -25
- package/app-layout/drawer/styles.css.js +13 -13
- package/app-layout/drawer/styles.scoped.css +22 -22
- package/app-layout/drawer/styles.selectors.js +13 -13
- package/app-layout/mobile-toolbar/styles.css.js +8 -8
- package/app-layout/mobile-toolbar/styles.scoped.css +10 -10
- package/app-layout/mobile-toolbar/styles.selectors.js +8 -8
- package/app-layout/visual-refresh-toolbar/skeleton/styles.css.js +16 -16
- package/app-layout/visual-refresh-toolbar/skeleton/styles.scoped.css +34 -34
- package/app-layout/visual-refresh-toolbar/skeleton/styles.selectors.js +16 -16
- package/app-layout/visual-refresh-toolbar/toolbar/styles.css.js +12 -12
- package/app-layout/visual-refresh-toolbar/toolbar/styles.scoped.css +17 -17
- package/app-layout/visual-refresh-toolbar/toolbar/styles.selectors.js +12 -12
- package/app-layout/visual-refresh-toolbar/toolbar/trigger-button/styles.css.js +6 -6
- package/app-layout/visual-refresh-toolbar/toolbar/trigger-button/styles.scoped.css +24 -24
- package/app-layout/visual-refresh-toolbar/toolbar/trigger-button/styles.selectors.js +6 -6
- package/breadcrumb-group/implementation.d.ts.map +1 -1
- package/breadcrumb-group/implementation.js +1 -1
- package/breadcrumb-group/implementation.js.map +1 -1
- package/breadcrumb-group/interfaces.d.ts +1 -1
- package/breadcrumb-group/interfaces.js.map +1 -1
- package/button-dropdown/interfaces.d.ts +7 -0
- package/button-dropdown/interfaces.d.ts.map +1 -1
- package/button-dropdown/interfaces.js.map +1 -1
- package/button-dropdown/internal.d.ts.map +1 -1
- package/button-dropdown/internal.js +2 -2
- package/button-dropdown/internal.js.map +1 -1
- package/button-dropdown/item-element/index.d.ts +1 -1
- package/button-dropdown/item-element/index.d.ts.map +1 -1
- package/button-dropdown/item-element/index.js +4 -4
- package/button-dropdown/item-element/index.js.map +1 -1
- package/button-dropdown/item-element/styles.css.js +13 -12
- package/button-dropdown/item-element/styles.scoped.css +52 -14
- package/button-dropdown/item-element/styles.selectors.js +13 -12
- package/button-dropdown/items-list.d.ts +1 -1
- package/button-dropdown/items-list.d.ts.map +1 -1
- package/button-dropdown/items-list.js +2 -2
- package/button-dropdown/items-list.js.map +1 -1
- package/flashbar/analytics-metadata/interfaces.d.ts +36 -0
- package/flashbar/analytics-metadata/interfaces.d.ts.map +1 -0
- package/flashbar/analytics-metadata/interfaces.js +4 -0
- package/flashbar/analytics-metadata/interfaces.js.map +1 -0
- package/flashbar/analytics-metadata/styles.css.js +6 -0
- package/flashbar/analytics-metadata/styles.scoped.css +7 -0
- package/flashbar/analytics-metadata/styles.selectors.js +7 -0
- package/flashbar/analytics-metadata/utils.d.ts +7 -0
- package/flashbar/analytics-metadata/utils.d.ts.map +1 -0
- package/flashbar/analytics-metadata/utils.js +33 -0
- package/flashbar/analytics-metadata/utils.js.map +1 -0
- package/flashbar/collapsible-flashbar.d.ts.map +1 -1
- package/flashbar/collapsible-flashbar.js +13 -5
- package/flashbar/collapsible-flashbar.js.map +1 -1
- package/flashbar/flash.d.ts.map +1 -1
- package/flashbar/flash.js +19 -7
- package/flashbar/flash.js.map +1 -1
- package/flashbar/non-collapsible-flashbar.d.ts.map +1 -1
- package/flashbar/non-collapsible-flashbar.js +4 -2
- package/flashbar/non-collapsible-flashbar.js.map +1 -1
- package/flashbar/styles.css.js +50 -47
- package/flashbar/styles.scoped.css +152 -146
- package/flashbar/styles.selectors.js +50 -47
- package/internal/base-component/styles.scoped.css +5 -10
- package/internal/components/tooltip/index.d.ts +3 -1
- package/internal/components/tooltip/index.d.ts.map +1 -1
- package/internal/components/tooltip/index.js +2 -2
- package/internal/components/tooltip/index.js.map +1 -1
- package/internal/components/tooltip/registry.d.ts +4 -0
- package/internal/components/tooltip/registry.d.ts.map +1 -0
- package/internal/components/tooltip/registry.js +28 -0
- package/internal/components/tooltip/registry.js.map +1 -0
- package/internal/environment.js +1 -1
- package/internal/environment.json +1 -1
- package/internal/generated/styles/tokens.js +1 -1
- package/internal/generated/theming/index.cjs +15 -15
- package/internal/generated/theming/index.js +15 -15
- package/internal/manifest.json +1 -1
- package/internal/plugins/api.d.ts +9 -0
- package/internal/plugins/api.d.ts.map +1 -1
- package/internal/plugins/api.js +7 -0
- package/internal/plugins/api.js.map +1 -1
- package/internal/plugins/controllers/alert-flash-content.d.ts +46 -0
- package/internal/plugins/controllers/alert-flash-content.d.ts.map +1 -0
- package/internal/plugins/controllers/alert-flash-content.js +59 -0
- package/internal/plugins/controllers/alert-flash-content.js.map +1 -0
- package/internal/plugins/helpers/index.d.ts +1 -0
- package/internal/plugins/helpers/index.d.ts.map +1 -1
- package/internal/plugins/helpers/index.js +1 -0
- package/internal/plugins/helpers/index.js.map +1 -1
- package/internal/plugins/helpers/use-discovered-action.d.ts +2 -2
- package/internal/plugins/helpers/use-discovered-action.d.ts.map +1 -1
- package/internal/plugins/helpers/use-discovered-action.js.map +1 -1
- package/internal/plugins/helpers/use-discovered-content.d.ts +15 -0
- package/internal/plugins/helpers/use-discovered-content.d.ts.map +1 -0
- package/internal/plugins/helpers/use-discovered-content.js +82 -0
- package/internal/plugins/helpers/use-discovered-content.js.map +1 -0
- package/package.json +1 -1
- package/popover/styles.css.js +52 -52
- package/popover/styles.scoped.css +72 -72
- package/popover/styles.selectors.js +52 -52
- package/property-filter/styles.css.js +38 -38
- package/property-filter/styles.scoped.css +40 -44
- package/property-filter/styles.selectors.js +38 -38
- package/side-navigation/implementation.d.ts +1 -1
- package/side-navigation/implementation.d.ts.map +1 -1
- package/side-navigation/implementation.js +2 -1
- package/side-navigation/implementation.js.map +1 -1
- package/side-navigation/interfaces.d.ts +4 -0
- package/side-navigation/interfaces.d.ts.map +1 -1
- package/side-navigation/interfaces.js.map +1 -1
- package/side-navigation/styles.css.js +30 -29
- package/side-navigation/styles.scoped.css +46 -41
- package/side-navigation/styles.selectors.js +30 -29
- package/test-utils/dom/side-navigation/index.d.ts +1 -0
- package/test-utils/dom/side-navigation/index.js +3 -0
- package/test-utils/dom/side-navigation/index.js.map +1 -1
- package/test-utils/selectors/side-navigation/index.d.ts +1 -0
- package/test-utils/selectors/side-navigation/index.js +3 -0
- package/test-utils/selectors/side-navigation/index.js.map +1 -1
- package/test-utils/tsconfig.tsbuildinfo +1 -1
- package/wizard/styles.css.js +30 -30
- package/wizard/styles.scoped.css +59 -59
- package/wizard/styles.selectors.js +30 -30
|
@@ -2,52 +2,55 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"flash-with-motion": "awsui_flash-with-
|
|
6
|
-
"enter": "
|
|
7
|
-
"flash-body": "awsui_flash-
|
|
8
|
-
"flash-message": "awsui_flash-
|
|
9
|
-
"flash-header": "awsui_flash-
|
|
10
|
-
"flash-content": "awsui_flash-
|
|
11
|
-
"action-button-wrapper": "awsui_action-button-
|
|
12
|
-
"dismiss-button-wrapper": "awsui_dismiss-button-
|
|
13
|
-
"flash-icon": "awsui_flash-
|
|
14
|
-
"entering": "
|
|
15
|
-
"entered": "
|
|
16
|
-
"exiting": "
|
|
17
|
-
"stack": "
|
|
18
|
-
"animation-running": "awsui_animation-
|
|
19
|
-
"item": "
|
|
20
|
-
"flash-list-item": "awsui_flash-list-
|
|
21
|
-
"notification-bar": "awsui_notification-
|
|
22
|
-
"collapsed": "
|
|
23
|
-
"animation-ready": "awsui_animation-
|
|
24
|
-
"expanded-only": "awsui_expanded-
|
|
25
|
-
"expanded": "
|
|
26
|
-
"flash": "
|
|
27
|
-
"collapsible": "
|
|
28
|
-
"short-list": "awsui_short-
|
|
29
|
-
"visual-refresh": "awsui_visual-
|
|
30
|
-
"status": "
|
|
31
|
-
"header": "
|
|
32
|
-
"item-count": "awsui_item-
|
|
33
|
-
"button": "
|
|
34
|
-
"type-count": "awsui_type-
|
|
35
|
-
"count-number": "awsui_count-
|
|
36
|
-
"icon": "
|
|
37
|
-
"floating": "
|
|
38
|
-
"flashbar": "
|
|
39
|
-
"flash-refresh": "awsui_flash-
|
|
40
|
-
"flash-list": "awsui_flash-
|
|
41
|
-
"flash-focus-container": "awsui_flash-focus-
|
|
42
|
-
"flash-text": "awsui_flash-
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"flash-type-
|
|
51
|
-
"flash-type-
|
|
5
|
+
"flash-with-motion": "awsui_flash-with-motion_1q84n_iol8n_153",
|
|
6
|
+
"enter": "awsui_enter_1q84n_iol8n_153",
|
|
7
|
+
"flash-body": "awsui_flash-body_1q84n_iol8n_167",
|
|
8
|
+
"flash-message": "awsui_flash-message_1q84n_iol8n_167",
|
|
9
|
+
"flash-header": "awsui_flash-header_1q84n_iol8n_167",
|
|
10
|
+
"flash-content": "awsui_flash-content_1q84n_iol8n_168",
|
|
11
|
+
"action-button-wrapper": "awsui_action-button-wrapper_1q84n_iol8n_169",
|
|
12
|
+
"dismiss-button-wrapper": "awsui_dismiss-button-wrapper_1q84n_iol8n_170",
|
|
13
|
+
"flash-icon": "awsui_flash-icon_1q84n_iol8n_193",
|
|
14
|
+
"entering": "awsui_entering_1q84n_iol8n_206",
|
|
15
|
+
"entered": "awsui_entered_1q84n_iol8n_227",
|
|
16
|
+
"exiting": "awsui_exiting_1q84n_iol8n_332",
|
|
17
|
+
"stack": "awsui_stack_1q84n_iol8n_366",
|
|
18
|
+
"animation-running": "awsui_animation-running_1q84n_iol8n_366",
|
|
19
|
+
"item": "awsui_item_1q84n_iol8n_366",
|
|
20
|
+
"flash-list-item": "awsui_flash-list-item_1q84n_iol8n_367",
|
|
21
|
+
"notification-bar": "awsui_notification-bar_1q84n_iol8n_368",
|
|
22
|
+
"collapsed": "awsui_collapsed_1q84n_iol8n_388",
|
|
23
|
+
"animation-ready": "awsui_animation-ready_1q84n_iol8n_388",
|
|
24
|
+
"expanded-only": "awsui_expanded-only_1q84n_iol8n_388",
|
|
25
|
+
"expanded": "awsui_expanded_1q84n_iol8n_388",
|
|
26
|
+
"flash": "awsui_flash_1q84n_iol8n_153",
|
|
27
|
+
"collapsible": "awsui_collapsible_1q84n_iol8n_444",
|
|
28
|
+
"short-list": "awsui_short-list_1q84n_iol8n_450",
|
|
29
|
+
"visual-refresh": "awsui_visual-refresh_1q84n_iol8n_450",
|
|
30
|
+
"status": "awsui_status_1q84n_iol8n_597",
|
|
31
|
+
"header": "awsui_header_1q84n_iol8n_597",
|
|
32
|
+
"item-count": "awsui_item-count_1q84n_iol8n_598",
|
|
33
|
+
"button": "awsui_button_1q84n_iol8n_599",
|
|
34
|
+
"type-count": "awsui_type-count_1q84n_iol8n_632",
|
|
35
|
+
"count-number": "awsui_count-number_1q84n_iol8n_632",
|
|
36
|
+
"icon": "awsui_icon_1q84n_iol8n_666",
|
|
37
|
+
"floating": "awsui_floating_1q84n_iol8n_707",
|
|
38
|
+
"flashbar": "awsui_flashbar_1q84n_iol8n_711",
|
|
39
|
+
"flash-refresh": "awsui_flash-refresh_1q84n_iol8n_786",
|
|
40
|
+
"flash-list": "awsui_flash-list_1q84n_iol8n_367",
|
|
41
|
+
"flash-focus-container": "awsui_flash-focus-container_1q84n_iol8n_807",
|
|
42
|
+
"flash-text": "awsui_flash-text_1q84n_iol8n_837",
|
|
43
|
+
"hidden": "awsui_hidden_1q84n_iol8n_856",
|
|
44
|
+
"header-replacement": "awsui_header-replacement_1q84n_iol8n_861",
|
|
45
|
+
"content-replacement": "awsui_content-replacement_1q84n_iol8n_866",
|
|
46
|
+
"dismiss-button": "awsui_dismiss-button_1q84n_iol8n_170",
|
|
47
|
+
"breakpoint-default": "awsui_breakpoint-default_1q84n_iol8n_885",
|
|
48
|
+
"action-button": "awsui_action-button_1q84n_iol8n_169",
|
|
49
|
+
"action-slot": "awsui_action-slot_1q84n_iol8n_895",
|
|
50
|
+
"flash-type-success": "awsui_flash-type-success_1q84n_iol8n_899",
|
|
51
|
+
"flash-type-error": "awsui_flash-type-error_1q84n_iol8n_903",
|
|
52
|
+
"flash-type-info": "awsui_flash-type-info_1q84n_iol8n_907",
|
|
53
|
+
"flash-type-in-progress": "awsui_flash-type-in-progress_1q84n_iol8n_908",
|
|
54
|
+
"flash-type-warning": "awsui_flash-type-warning_1q84n_iol8n_912"
|
|
52
55
|
};
|
|
53
56
|
|
|
@@ -281,7 +281,7 @@
|
|
|
281
281
|
--color-border-dropdown-item-focused-5hbaf3:#414d5c;
|
|
282
282
|
--color-border-item-placeholder-h8j85e:#0972d3;
|
|
283
283
|
--color-border-item-selected-k00wlz:#0972d3;
|
|
284
|
-
--color-border-layout-
|
|
284
|
+
--color-border-layout-4mzh97:#9ba7b6;
|
|
285
285
|
--color-border-notification-stack-bar-t3aws2:#232f3e;
|
|
286
286
|
--color-border-panel-header-lf0q4c:#b6bec9;
|
|
287
287
|
--color-border-popover-umqvld:#9ba7b6;
|
|
@@ -898,7 +898,7 @@
|
|
|
898
898
|
--color-border-dropdown-item-focused-5hbaf3:#d1d5db;
|
|
899
899
|
--color-border-item-placeholder-h8j85e:#539fe5;
|
|
900
900
|
--color-border-item-selected-k00wlz:#539fe5;
|
|
901
|
-
--color-border-layout-
|
|
901
|
+
--color-border-layout-4mzh97:#414d5c;
|
|
902
902
|
--color-border-panel-header-lf0q4c:#414d5c;
|
|
903
903
|
--color-border-popover-umqvld:#5f6b7a;
|
|
904
904
|
--color-border-segment-active-9ah16u:#d1d5db;
|
|
@@ -1207,7 +1207,7 @@
|
|
|
1207
1207
|
--color-border-dropdown-item-focused-5hbaf3:#d1d5db;
|
|
1208
1208
|
--color-border-item-placeholder-h8j85e:#539fe5;
|
|
1209
1209
|
--color-border-item-selected-k00wlz:#539fe5;
|
|
1210
|
-
--color-border-layout-
|
|
1210
|
+
--color-border-layout-4mzh97:#414d5c;
|
|
1211
1211
|
--color-border-panel-header-lf0q4c:#414d5c;
|
|
1212
1212
|
--color-border-popover-umqvld:#5f6b7a;
|
|
1213
1213
|
--color-border-segment-active-9ah16u:#d1d5db;
|
|
@@ -1410,7 +1410,7 @@
|
|
|
1410
1410
|
--color-border-dropdown-item-focused-5hbaf3:#d1d5db;
|
|
1411
1411
|
--color-border-item-placeholder-h8j85e:#539fe5;
|
|
1412
1412
|
--color-border-item-selected-k00wlz:#539fe5;
|
|
1413
|
-
--color-border-layout-
|
|
1413
|
+
--color-border-layout-4mzh97:#414d5c;
|
|
1414
1414
|
--color-border-panel-header-lf0q4c:#414d5c;
|
|
1415
1415
|
--color-border-popover-umqvld:#5f6b7a;
|
|
1416
1416
|
--color-border-segment-active-9ah16u:#d1d5db;
|
|
@@ -1551,7 +1551,6 @@
|
|
|
1551
1551
|
--color-border-dropdown-group-yakmix:#fbfbfb;
|
|
1552
1552
|
--color-border-dropdown-item-default-k36ra7:#fbfbfb;
|
|
1553
1553
|
--color-border-item-focused-b2ntyl:#fbfbfb;
|
|
1554
|
-
--color-border-layout-1zovx9:#fbfbfb;
|
|
1555
1554
|
--color-border-panel-header-lf0q4c:#fbfbfb;
|
|
1556
1555
|
--color-text-body-default-at06ol:#fbfbfb;
|
|
1557
1556
|
--color-text-button-normal-active-4it2mv:#ffffff;
|
|
@@ -1584,7 +1583,6 @@
|
|
|
1584
1583
|
--color-border-dropdown-group-yakmix:#000716;
|
|
1585
1584
|
--color-border-dropdown-item-default-k36ra7:#000716;
|
|
1586
1585
|
--color-border-item-focused-b2ntyl:#000716;
|
|
1587
|
-
--color-border-layout-1zovx9:#000716;
|
|
1588
1586
|
--color-border-panel-header-lf0q4c:#000716;
|
|
1589
1587
|
--color-text-button-normal-active-4it2mv:#000716;
|
|
1590
1588
|
--color-text-button-normal-default-mo7k6u:#414d5c;
|
|
@@ -1614,7 +1612,6 @@
|
|
|
1614
1612
|
--color-border-divider-panel-side-93n0qu:#414d5c;
|
|
1615
1613
|
--color-border-dropdown-group-yakmix:#414d5c;
|
|
1616
1614
|
--color-border-dropdown-item-default-k36ra7:#414d5c;
|
|
1617
|
-
--color-border-layout-1zovx9:#414d5c;
|
|
1618
1615
|
--color-border-panel-header-lf0q4c:#414d5c;
|
|
1619
1616
|
--color-text-button-normal-active-4it2mv:#000716;
|
|
1620
1617
|
--color-text-button-normal-default-mo7k6u:#414d5c;
|
|
@@ -1716,7 +1713,7 @@
|
|
|
1716
1713
|
--color-border-dropdown-item-focused-5hbaf3:#d1d5db;
|
|
1717
1714
|
--color-border-item-placeholder-h8j85e:#539fe5;
|
|
1718
1715
|
--color-border-item-selected-k00wlz:#539fe5;
|
|
1719
|
-
--color-border-layout-
|
|
1716
|
+
--color-border-layout-4mzh97:#414d5c;
|
|
1720
1717
|
--color-border-panel-header-lf0q4c:#d1d5db;
|
|
1721
1718
|
--color-border-popover-umqvld:#5f6b7a;
|
|
1722
1719
|
--color-border-segment-active-9ah16u:#d1d5db;
|
|
@@ -1855,7 +1852,6 @@
|
|
|
1855
1852
|
--color-border-dropdown-group-yakmix:#d1d5db;
|
|
1856
1853
|
--color-border-dropdown-item-default-k36ra7:#d1d5db;
|
|
1857
1854
|
--color-border-item-focused-b2ntyl:#fbfbfb;
|
|
1858
|
-
--color-border-layout-1zovx9:#d1d5db;
|
|
1859
1855
|
--color-border-panel-header-lf0q4c:#d1d5db;
|
|
1860
1856
|
--color-text-button-normal-active-4it2mv:#ffffff;
|
|
1861
1857
|
--color-text-button-normal-default-mo7k6u:#d1d5db;
|
|
@@ -1880,7 +1876,6 @@
|
|
|
1880
1876
|
--color-border-dropdown-group-yakmix:#d1d5db;
|
|
1881
1877
|
--color-border-dropdown-item-default-k36ra7:#d1d5db;
|
|
1882
1878
|
--color-border-item-focused-b2ntyl:#fbfbfb;
|
|
1883
|
-
--color-border-layout-1zovx9:#d1d5db;
|
|
1884
1879
|
--color-border-panel-header-lf0q4c:#d1d5db;
|
|
1885
1880
|
--color-text-button-normal-active-4it2mv:#ffffff;
|
|
1886
1881
|
--color-text-button-normal-default-mo7k6u:#d1d5db;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { PopoverProps } from '../../../popover/interfaces';
|
|
2
3
|
export interface TooltipProps {
|
|
3
4
|
value: React.ReactNode;
|
|
4
5
|
trackRef: React.RefObject<HTMLElement | SVGElement>;
|
|
@@ -6,6 +7,7 @@ export interface TooltipProps {
|
|
|
6
7
|
position?: 'top' | 'right' | 'bottom' | 'left';
|
|
7
8
|
className?: string;
|
|
8
9
|
contentAttributes?: React.HTMLAttributes<HTMLDivElement>;
|
|
10
|
+
size?: PopoverProps['size'];
|
|
9
11
|
}
|
|
10
|
-
export default function Tooltip({ value, trackRef, trackKey, className, contentAttributes, position, }: TooltipProps): JSX.Element;
|
|
12
|
+
export default function Tooltip({ value, trackRef, trackKey, className, contentAttributes, position, size, }: TooltipProps): JSX.Element;
|
|
11
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/tooltip/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/tooltip/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAM3D,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,UAAU,CAAC,CAAC;IACpD,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,QAAQ,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iBAAiB,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;IACzD,IAAI,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;CAC7B;AAED,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,EAC9B,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,iBAAsB,EACtB,QAAgB,EAChB,IAAc,GACf,EAAE,YAAY,eA4Bd"}
|
|
@@ -8,13 +8,13 @@ import PopoverContainer from '../../../popover/container';
|
|
|
8
8
|
import Portal from '../portal';
|
|
9
9
|
import { Transition } from '../transition';
|
|
10
10
|
import styles from './styles.css.js';
|
|
11
|
-
export default function Tooltip({ value, trackRef, trackKey, className, contentAttributes = {}, position = 'top', }) {
|
|
11
|
+
export default function Tooltip({ value, trackRef, trackKey, className, contentAttributes = {}, position = 'top', size = 'small', }) {
|
|
12
12
|
if (!trackKey && (typeof value === 'string' || typeof value === 'number')) {
|
|
13
13
|
trackKey = value;
|
|
14
14
|
}
|
|
15
15
|
return (React.createElement(Portal, null,
|
|
16
16
|
React.createElement("div", Object.assign({ className: clsx(styles.root, className) }, contentAttributes, { "data-testid": trackKey }),
|
|
17
|
-
React.createElement(Transition, { in: true }, () => (React.createElement(PopoverContainer, { trackRef: trackRef, trackKey: trackKey, size:
|
|
17
|
+
React.createElement(Transition, { in: true }, () => (React.createElement(PopoverContainer, { trackRef: trackRef, trackKey: trackKey, size: size, fixedWidth: false, position: position, zIndex: 7000, arrow: position => React.createElement(PopoverArrow, { position: position }) },
|
|
18
18
|
React.createElement(PopoverBody, { dismissButton: false, dismissAriaLabel: undefined, onDismiss: undefined, header: undefined }, value)))))));
|
|
19
19
|
}
|
|
20
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/tooltip/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAChD,OAAO,gBAAgB,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/tooltip/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAChD,OAAO,gBAAgB,MAAM,4BAA4B,CAAC;AAE1D,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAYrC,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,EAC9B,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,iBAAiB,GAAG,EAAE,EACtB,QAAQ,GAAG,KAAK,EAChB,IAAI,GAAG,OAAO,GACD;IACb,IAAI,CAAC,QAAQ,IAAI,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,QAAQ,CAAC,EAAE;QACzE,QAAQ,GAAG,KAAK,CAAC;KAClB;IAED,OAAO,CACL,oBAAC,MAAM;QACL,2CAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC,IAAM,iBAAiB,mBAAe,QAAQ;YACxF,oBAAC,UAAU,IAAC,EAAE,EAAE,IAAI,IACjB,GAAG,EAAE,CAAC,CACL,oBAAC,gBAAgB,IACf,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,KAAK,EACjB,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,IAAI,EACZ,KAAK,EAAE,QAAQ,CAAC,EAAE,CAAC,oBAAC,YAAY,IAAC,QAAQ,EAAE,QAAQ,GAAI;gBAEvD,oBAAC,WAAW,IAAC,aAAa,EAAE,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,IACpG,KAAK,CACM,CACG,CACpB,CACU,CACT,CACC,CACV,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport PopoverArrow from '../../../popover/arrow';\nimport PopoverBody from '../../../popover/body';\nimport PopoverContainer from '../../../popover/container';\nimport { PopoverProps } from '../../../popover/interfaces';\nimport Portal from '../portal';\nimport { Transition } from '../transition';\n\nimport styles from './styles.css.js';\n\nexport interface TooltipProps {\n value: React.ReactNode;\n trackRef: React.RefObject<HTMLElement | SVGElement>;\n trackKey?: string | number;\n position?: 'top' | 'right' | 'bottom' | 'left';\n className?: string;\n contentAttributes?: React.HTMLAttributes<HTMLDivElement>;\n size?: PopoverProps['size'];\n}\n\nexport default function Tooltip({\n value,\n trackRef,\n trackKey,\n className,\n contentAttributes = {},\n position = 'top',\n size = 'small',\n}: TooltipProps) {\n if (!trackKey && (typeof value === 'string' || typeof value === 'number')) {\n trackKey = value;\n }\n\n return (\n <Portal>\n <div className={clsx(styles.root, className)} {...contentAttributes} data-testid={trackKey}>\n <Transition in={true}>\n {() => (\n <PopoverContainer\n trackRef={trackRef}\n trackKey={trackKey}\n size={size}\n fixedWidth={false}\n position={position}\n zIndex={7000}\n arrow={position => <PopoverArrow position={position} />}\n >\n <PopoverBody dismissButton={false} dismissAriaLabel={undefined} onDismiss={undefined} header={undefined}>\n {value}\n </PopoverBody>\n </PopoverContainer>\n )}\n </Transition>\n </div>\n </Portal>\n );\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/tooltip/registry.ts"],"names":[],"mappings":"AAGA,KAAK,OAAO,GAAG,MAAM,IAAI,CAAC;AAW1B,eAAO,MAAM,eAAe,YAAa,OAAO,eAU/C,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
let callbacks = [];
|
|
4
|
+
let listenerRegistered = false;
|
|
5
|
+
const onKeyDown = (event) => {
|
|
6
|
+
if (event.key === 'Escape') {
|
|
7
|
+
callbacks.forEach(callback => callback());
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
export const registerTooltip = (onClose) => {
|
|
11
|
+
callbacks.forEach(callback => callback());
|
|
12
|
+
callbacks.push(onClose);
|
|
13
|
+
if (!listenerRegistered) {
|
|
14
|
+
listenerRegistered = true;
|
|
15
|
+
document.addEventListener('keydown', onKeyDown);
|
|
16
|
+
}
|
|
17
|
+
return () => {
|
|
18
|
+
deregisterTooltip(onClose);
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
const deregisterTooltip = (onClose) => {
|
|
22
|
+
callbacks = callbacks.filter(callback => callback !== onClose);
|
|
23
|
+
if (listenerRegistered && callbacks.length === 0) {
|
|
24
|
+
listenerRegistered = false;
|
|
25
|
+
document.removeEventListener('keydown', onKeyDown);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../../../src/internal/components/tooltip/registry.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAItC,IAAI,SAAS,GAAmB,EAAE,CAAC;AACnC,IAAI,kBAAkB,GAAG,KAAK,CAAC;AAE/B,MAAM,SAAS,GAAG,CAAC,KAAoB,EAAE,EAAE;IACzC,IAAI,KAAK,CAAC,GAAG,KAAK,QAAQ,EAAE;QAC1B,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC;KAC3C;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,OAAgB,EAAE,EAAE;IAClD,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC1C,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACxB,IAAI,CAAC,kBAAkB,EAAE;QACvB,kBAAkB,GAAG,IAAI,CAAC;QAC1B,QAAQ,CAAC,gBAAgB,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;KACjD;IACD,OAAO,GAAG,EAAE;QACV,iBAAiB,CAAC,OAAO,CAAC,CAAC;IAC7B,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,iBAAiB,GAAG,CAAC,OAAgB,EAAE,EAAE;IAC7C,SAAS,GAAG,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC;IAC/D,IAAI,kBAAkB,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE;QAChD,kBAAkB,GAAG,KAAK,CAAC;QAC3B,QAAQ,CAAC,mBAAmB,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;KACpD;AACH,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\ntype OnClose = () => void;\n\nlet callbacks: Array<OnClose> = [];\nlet listenerRegistered = false;\n\nconst onKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n callbacks.forEach(callback => callback());\n }\n};\n\nexport const registerTooltip = (onClose: OnClose) => {\n callbacks.forEach(callback => callback());\n callbacks.push(onClose);\n if (!listenerRegistered) {\n listenerRegistered = true;\n document.addEventListener('keydown', onKeyDown);\n }\n return () => {\n deregisterTooltip(onClose);\n };\n};\n\nconst deregisterTooltip = (onClose: OnClose) => {\n callbacks = callbacks.filter(callback => callback !== onClose);\n if (listenerRegistered && callbacks.length === 0) {\n listenerRegistered = false;\n document.removeEventListener('keydown', onKeyDown);\n }\n};\n"]}
|
package/internal/environment.js
CHANGED
|
@@ -335,7 +335,7 @@ export var colorBorderItemFocused = "var(--color-border-item-focused-b2ntyl, #09
|
|
|
335
335
|
export var colorBorderDropdownItemFocused = "var(--color-border-dropdown-item-focused-5hbaf3, #414d5c)";
|
|
336
336
|
export var colorBorderItemPlaceholder = "var(--color-border-item-placeholder-h8j85e, #0972d3)";
|
|
337
337
|
export var colorBorderItemSelected = "var(--color-border-item-selected-k00wlz, #0972d3)";
|
|
338
|
-
export var colorBorderLayout = "var(--color-border-layout-
|
|
338
|
+
export var colorBorderLayout = "var(--color-border-layout-4mzh97, #9ba7b6)";
|
|
339
339
|
export var colorBorderNotificationStackBar = "var(--color-border-notification-stack-bar-t3aws2, #232f3e)";
|
|
340
340
|
export var colorBorderPanelHeader = "var(--color-border-panel-header-lf0q4c, #b6bec9)";
|
|
341
341
|
export var colorBorderPopover = "var(--color-border-popover-umqvld, #9ba7b6)";
|
|
@@ -1226,8 +1226,8 @@ module.exports.preset = {
|
|
|
1226
1226
|
"dark": "{colorBlue500}"
|
|
1227
1227
|
},
|
|
1228
1228
|
"colorBorderLayout": {
|
|
1229
|
-
"light": "{
|
|
1230
|
-
"dark": "{
|
|
1229
|
+
"light": "{colorGrey400}",
|
|
1230
|
+
"dark": "{colorGrey600}"
|
|
1231
1231
|
},
|
|
1232
1232
|
"colorBorderNotificationStackBar": {
|
|
1233
1233
|
"light": "{colorGrey700}",
|
|
@@ -3444,8 +3444,8 @@ module.exports.preset = {
|
|
|
3444
3444
|
"dark": "{colorBlue500}"
|
|
3445
3445
|
},
|
|
3446
3446
|
"colorBorderLayout": {
|
|
3447
|
-
"light": "{
|
|
3448
|
-
"dark": "{
|
|
3447
|
+
"light": "{colorGrey600}",
|
|
3448
|
+
"dark": "{colorGrey600}"
|
|
3449
3449
|
},
|
|
3450
3450
|
"colorBorderNotificationStackBar": {
|
|
3451
3451
|
"light": "{colorGrey700}",
|
|
@@ -4582,8 +4582,8 @@ module.exports.preset = {
|
|
|
4582
4582
|
"dark": "{colorBlue500}"
|
|
4583
4583
|
},
|
|
4584
4584
|
"colorBorderLayout": {
|
|
4585
|
-
"light": "{
|
|
4586
|
-
"dark": "{
|
|
4585
|
+
"light": "{colorGrey600}",
|
|
4586
|
+
"dark": "{colorGrey600}"
|
|
4587
4587
|
},
|
|
4588
4588
|
"colorBorderNotificationStackBar": {
|
|
4589
4589
|
"light": "{colorGrey700}",
|
|
@@ -5652,8 +5652,8 @@ module.exports.preset = {
|
|
|
5652
5652
|
"dark": "{colorBlue500}"
|
|
5653
5653
|
},
|
|
5654
5654
|
"colorBorderLayout": {
|
|
5655
|
-
"light": "{
|
|
5656
|
-
"dark": "{
|
|
5655
|
+
"light": "{colorGrey400}",
|
|
5656
|
+
"dark": "{colorGrey600}"
|
|
5657
5657
|
},
|
|
5658
5658
|
"colorBorderNotificationStackBar": {
|
|
5659
5659
|
"light": "{colorGrey700}",
|
|
@@ -6722,8 +6722,8 @@ module.exports.preset = {
|
|
|
6722
6722
|
"dark": "{colorBlue500}"
|
|
6723
6723
|
},
|
|
6724
6724
|
"colorBorderLayout": {
|
|
6725
|
-
"light": "{
|
|
6726
|
-
"dark": "{
|
|
6725
|
+
"light": "{colorGrey400}",
|
|
6726
|
+
"dark": "{colorGrey600}"
|
|
6727
6727
|
},
|
|
6728
6728
|
"colorBorderNotificationStackBar": {
|
|
6729
6729
|
"light": "{colorGrey700}",
|
|
@@ -7792,8 +7792,8 @@ module.exports.preset = {
|
|
|
7792
7792
|
"dark": "{colorBlue500}"
|
|
7793
7793
|
},
|
|
7794
7794
|
"colorBorderLayout": {
|
|
7795
|
-
"light": "{
|
|
7796
|
-
"dark": "{
|
|
7795
|
+
"light": "{colorGrey400}",
|
|
7796
|
+
"dark": "{colorGrey600}"
|
|
7797
7797
|
},
|
|
7798
7798
|
"colorBorderNotificationStackBar": {
|
|
7799
7799
|
"light": "{colorGrey700}",
|
|
@@ -8864,8 +8864,8 @@ module.exports.preset = {
|
|
|
8864
8864
|
"dark": "{colorBlue500}"
|
|
8865
8865
|
},
|
|
8866
8866
|
"colorBorderLayout": {
|
|
8867
|
-
"light": "{
|
|
8868
|
-
"dark": "{
|
|
8867
|
+
"light": "{colorGrey600}",
|
|
8868
|
+
"dark": "{colorGrey600}"
|
|
8869
8869
|
},
|
|
8870
8870
|
"colorBorderNotificationStackBar": {
|
|
8871
8871
|
"light": "{colorGrey700}",
|
|
@@ -11659,7 +11659,7 @@ module.exports.preset = {
|
|
|
11659
11659
|
"colorBorderDropdownItemFocused": "--color-border-dropdown-item-focused-5hbaf3",
|
|
11660
11660
|
"colorBorderItemPlaceholder": "--color-border-item-placeholder-h8j85e",
|
|
11661
11661
|
"colorBorderItemSelected": "--color-border-item-selected-k00wlz",
|
|
11662
|
-
"colorBorderLayout": "--color-border-layout-
|
|
11662
|
+
"colorBorderLayout": "--color-border-layout-4mzh97",
|
|
11663
11663
|
"colorBorderNotificationStackBar": "--color-border-notification-stack-bar-t3aws2",
|
|
11664
11664
|
"colorBorderPanelHeader": "--color-border-panel-header-lf0q4c",
|
|
11665
11665
|
"colorBorderPopover": "--color-border-popover-umqvld",
|
|
@@ -1226,8 +1226,8 @@ export var preset = {
|
|
|
1226
1226
|
"dark": "{colorBlue500}"
|
|
1227
1227
|
},
|
|
1228
1228
|
"colorBorderLayout": {
|
|
1229
|
-
"light": "{
|
|
1230
|
-
"dark": "{
|
|
1229
|
+
"light": "{colorGrey400}",
|
|
1230
|
+
"dark": "{colorGrey600}"
|
|
1231
1231
|
},
|
|
1232
1232
|
"colorBorderNotificationStackBar": {
|
|
1233
1233
|
"light": "{colorGrey700}",
|
|
@@ -3444,8 +3444,8 @@ export var preset = {
|
|
|
3444
3444
|
"dark": "{colorBlue500}"
|
|
3445
3445
|
},
|
|
3446
3446
|
"colorBorderLayout": {
|
|
3447
|
-
"light": "{
|
|
3448
|
-
"dark": "{
|
|
3447
|
+
"light": "{colorGrey600}",
|
|
3448
|
+
"dark": "{colorGrey600}"
|
|
3449
3449
|
},
|
|
3450
3450
|
"colorBorderNotificationStackBar": {
|
|
3451
3451
|
"light": "{colorGrey700}",
|
|
@@ -4582,8 +4582,8 @@ export var preset = {
|
|
|
4582
4582
|
"dark": "{colorBlue500}"
|
|
4583
4583
|
},
|
|
4584
4584
|
"colorBorderLayout": {
|
|
4585
|
-
"light": "{
|
|
4586
|
-
"dark": "{
|
|
4585
|
+
"light": "{colorGrey600}",
|
|
4586
|
+
"dark": "{colorGrey600}"
|
|
4587
4587
|
},
|
|
4588
4588
|
"colorBorderNotificationStackBar": {
|
|
4589
4589
|
"light": "{colorGrey700}",
|
|
@@ -5652,8 +5652,8 @@ export var preset = {
|
|
|
5652
5652
|
"dark": "{colorBlue500}"
|
|
5653
5653
|
},
|
|
5654
5654
|
"colorBorderLayout": {
|
|
5655
|
-
"light": "{
|
|
5656
|
-
"dark": "{
|
|
5655
|
+
"light": "{colorGrey400}",
|
|
5656
|
+
"dark": "{colorGrey600}"
|
|
5657
5657
|
},
|
|
5658
5658
|
"colorBorderNotificationStackBar": {
|
|
5659
5659
|
"light": "{colorGrey700}",
|
|
@@ -6722,8 +6722,8 @@ export var preset = {
|
|
|
6722
6722
|
"dark": "{colorBlue500}"
|
|
6723
6723
|
},
|
|
6724
6724
|
"colorBorderLayout": {
|
|
6725
|
-
"light": "{
|
|
6726
|
-
"dark": "{
|
|
6725
|
+
"light": "{colorGrey400}",
|
|
6726
|
+
"dark": "{colorGrey600}"
|
|
6727
6727
|
},
|
|
6728
6728
|
"colorBorderNotificationStackBar": {
|
|
6729
6729
|
"light": "{colorGrey700}",
|
|
@@ -7792,8 +7792,8 @@ export var preset = {
|
|
|
7792
7792
|
"dark": "{colorBlue500}"
|
|
7793
7793
|
},
|
|
7794
7794
|
"colorBorderLayout": {
|
|
7795
|
-
"light": "{
|
|
7796
|
-
"dark": "{
|
|
7795
|
+
"light": "{colorGrey400}",
|
|
7796
|
+
"dark": "{colorGrey600}"
|
|
7797
7797
|
},
|
|
7798
7798
|
"colorBorderNotificationStackBar": {
|
|
7799
7799
|
"light": "{colorGrey700}",
|
|
@@ -8864,8 +8864,8 @@ export var preset = {
|
|
|
8864
8864
|
"dark": "{colorBlue500}"
|
|
8865
8865
|
},
|
|
8866
8866
|
"colorBorderLayout": {
|
|
8867
|
-
"light": "{
|
|
8868
|
-
"dark": "{
|
|
8867
|
+
"light": "{colorGrey600}",
|
|
8868
|
+
"dark": "{colorGrey600}"
|
|
8869
8869
|
},
|
|
8870
8870
|
"colorBorderNotificationStackBar": {
|
|
8871
8871
|
"light": "{colorGrey700}",
|
|
@@ -11659,7 +11659,7 @@ export var preset = {
|
|
|
11659
11659
|
"colorBorderDropdownItemFocused": "--color-border-dropdown-item-focused-5hbaf3",
|
|
11660
11660
|
"colorBorderItemPlaceholder": "--color-border-item-placeholder-h8j85e",
|
|
11661
11661
|
"colorBorderItemSelected": "--color-border-item-selected-k00wlz",
|
|
11662
|
-
"colorBorderLayout": "--color-border-layout-
|
|
11662
|
+
"colorBorderLayout": "--color-border-layout-4mzh97",
|
|
11663
11663
|
"colorBorderNotificationStackBar": "--color-border-notification-stack-bar-t3aws2",
|
|
11664
11664
|
"colorBorderPanelHeader": "--color-border-panel-header-lf0q4c",
|
|
11665
11665
|
"colorBorderPopover": "--color-border-popover-umqvld",
|
package/internal/manifest.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BreadcrumbGroupProps } from '../../breadcrumb-group/interfaces';
|
|
2
2
|
import { ActionsApiInternal, ActionsApiPublic } from './controllers/action-buttons';
|
|
3
|
+
import { AlertFlashContentApiInternal, AlertFlashContentApiPublic } from './controllers/alert-flash-content';
|
|
3
4
|
import { AppLayoutWidgetApiInternal } from './controllers/app-layout-widget';
|
|
4
5
|
import { BreadcrumbsApiInternal } from './controllers/breadcrumbs';
|
|
5
6
|
import { DrawersApiInternal, DrawersApiPublic } from './controllers/drawers';
|
|
@@ -7,13 +8,17 @@ interface AwsuiApi {
|
|
|
7
8
|
awsuiPlugins: {
|
|
8
9
|
appLayout: DrawersApiPublic;
|
|
9
10
|
alert: ActionsApiPublic;
|
|
11
|
+
alertContent: AlertFlashContentApiPublic;
|
|
10
12
|
flashbar: ActionsApiPublic;
|
|
13
|
+
flashContent: AlertFlashContentApiPublic;
|
|
11
14
|
};
|
|
12
15
|
awsuiPluginsInternal: {
|
|
13
16
|
appLayout: DrawersApiInternal;
|
|
14
17
|
appLayoutWidget: AppLayoutWidgetApiInternal;
|
|
15
18
|
alert: ActionsApiInternal;
|
|
19
|
+
alertContent: AlertFlashContentApiInternal;
|
|
16
20
|
flashbar: ActionsApiInternal;
|
|
21
|
+
flashContent: AlertFlashContentApiInternal;
|
|
17
22
|
breadcrumbs: BreadcrumbsApiInternal<BreadcrumbGroupProps>;
|
|
18
23
|
};
|
|
19
24
|
}
|
|
@@ -21,12 +26,16 @@ export declare function loadApi(): AwsuiApi;
|
|
|
21
26
|
export declare const awsuiPlugins: {
|
|
22
27
|
appLayout: DrawersApiPublic;
|
|
23
28
|
alert: ActionsApiPublic;
|
|
29
|
+
alertContent: AlertFlashContentApiPublic;
|
|
24
30
|
flashbar: ActionsApiPublic;
|
|
31
|
+
flashContent: AlertFlashContentApiPublic;
|
|
25
32
|
}, awsuiPluginsInternal: {
|
|
26
33
|
appLayout: DrawersApiInternal;
|
|
27
34
|
appLayoutWidget: AppLayoutWidgetApiInternal;
|
|
28
35
|
alert: ActionsApiInternal;
|
|
36
|
+
alertContent: AlertFlashContentApiInternal;
|
|
29
37
|
flashbar: ActionsApiInternal;
|
|
38
|
+
flashContent: AlertFlashContentApiInternal;
|
|
30
39
|
breadcrumbs: BreadcrumbsApiInternal<BreadcrumbGroupProps>;
|
|
31
40
|
};
|
|
32
41
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../src/internal/plugins/api.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAA2B,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAC7G,OAAO,EAAE,0BAA0B,EAA6B,MAAM,iCAAiC,CAAC;AACxG,OAAO,EAAE,sBAAsB,EAAyB,MAAM,2BAA2B,CAAC;AAC1F,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAqB,MAAM,uBAAuB,CAAC;AAIhG,UAAU,QAAQ;IAChB,YAAY,EAAE;QACZ,SAAS,EAAE,gBAAgB,CAAC;QAC5B,KAAK,EAAE,gBAAgB,CAAC;QACxB,QAAQ,EAAE,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../src/internal/plugins/api.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAA2B,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAC7G,OAAO,EACL,4BAA4B,EAC5B,0BAA0B,EAE3B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,0BAA0B,EAA6B,MAAM,iCAAiC,CAAC;AACxG,OAAO,EAAE,sBAAsB,EAAyB,MAAM,2BAA2B,CAAC;AAC1F,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAqB,MAAM,uBAAuB,CAAC;AAIhG,UAAU,QAAQ;IAChB,YAAY,EAAE;QACZ,SAAS,EAAE,gBAAgB,CAAC;QAC5B,KAAK,EAAE,gBAAgB,CAAC;QACxB,YAAY,EAAE,0BAA0B,CAAC;QACzC,QAAQ,EAAE,gBAAgB,CAAC;QAC3B,YAAY,EAAE,0BAA0B,CAAC;KAC1C,CAAC;IACF,oBAAoB,EAAE;QACpB,SAAS,EAAE,kBAAkB,CAAC;QAC9B,eAAe,EAAE,0BAA0B,CAAC;QAC5C,KAAK,EAAE,kBAAkB,CAAC;QAC1B,YAAY,EAAE,4BAA4B,CAAC;QAC3C,QAAQ,EAAE,kBAAkB,CAAC;QAC7B,YAAY,EAAE,4BAA4B,CAAC;QAC3C,WAAW,EAAE,sBAAsB,CAAC,oBAAoB,CAAC,CAAC;KAC3D,CAAC;CACH;AAwBD,wBAAgB,OAAO,aAQtB;AAED,eAAO,MAAQ,YAAY;eAjDZ,gBAAgB;WACpB,gBAAgB;kBACT,0BAA0B;cAC9B,gBAAgB;kBACZ,0BAA0B;GA6Cf,oBAAoB;eA1ClC,kBAAkB;qBACZ,0BAA0B;WACpC,kBAAkB;kBACX,4BAA4B;cAChC,kBAAkB;kBACd,4BAA4B;iBAC7B,uBAAuB,oBAAoB,CAAC;CAoCE,CAAC"}
|
package/internal/plugins/api.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ActionButtonsController } from './controllers/action-buttons';
|
|
2
|
+
import { AlertFlashContentController, } from './controllers/alert-flash-content';
|
|
2
3
|
import { AppLayoutWidgetController } from './controllers/app-layout-widget';
|
|
3
4
|
import { BreadcrumbsController } from './controllers/breadcrumbs';
|
|
4
5
|
import { DrawersController } from './controllers/drawers';
|
|
@@ -41,6 +42,12 @@ function installApi(api) {
|
|
|
41
42
|
const alertActions = new ActionButtonsController();
|
|
42
43
|
api.awsuiPlugins.alert = alertActions.installPublic(api.awsuiPlugins.alert);
|
|
43
44
|
api.awsuiPluginsInternal.alert = alertActions.installInternal(api.awsuiPluginsInternal.alert);
|
|
45
|
+
const alertContent = new AlertFlashContentController();
|
|
46
|
+
api.awsuiPlugins.alertContent = alertContent.installPublic(api.awsuiPlugins.alertContent);
|
|
47
|
+
api.awsuiPluginsInternal.alertContent = alertContent.installInternal(api.awsuiPluginsInternal.alertContent);
|
|
48
|
+
const flashContent = new AlertFlashContentController();
|
|
49
|
+
api.awsuiPlugins.flashContent = flashContent.installPublic(api.awsuiPlugins.flashContent);
|
|
50
|
+
api.awsuiPluginsInternal.flashContent = flashContent.installInternal(api.awsuiPluginsInternal.flashContent);
|
|
44
51
|
const flashbarActions = new ActionButtonsController();
|
|
45
52
|
api.awsuiPlugins.flashbar = flashbarActions.installPublic(api.awsuiPlugins.flashbar);
|
|
46
53
|
api.awsuiPluginsInternal.flashbar = flashbarActions.installInternal(api.awsuiPluginsInternal.flashbar);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../../../src/internal/plugins/api.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,uBAAuB,EAAwC,MAAM,8BAA8B,CAAC;AAC7G,OAAO,EAA8B,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AACxG,OAAO,EAA0B,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAC1F,OAAO,EAAwC,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAEhG,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../../../src/internal/plugins/api.ts"],"names":[],"mappings":"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","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { BreadcrumbGroupProps } from '../../breadcrumb-group/interfaces';\nimport { ActionButtonsController, ActionsApiInternal, ActionsApiPublic } from './controllers/action-buttons';\nimport {\n AlertFlashContentApiInternal,\n AlertFlashContentApiPublic,\n AlertFlashContentController,\n} from './controllers/alert-flash-content';\nimport { AppLayoutWidgetApiInternal, AppLayoutWidgetController } from './controllers/app-layout-widget';\nimport { BreadcrumbsApiInternal, BreadcrumbsController } from './controllers/breadcrumbs';\nimport { DrawersApiInternal, DrawersApiPublic, DrawersController } from './controllers/drawers';\n\nconst storageKey = Symbol.for('awsui-plugin-api');\n\ninterface AwsuiApi {\n awsuiPlugins: {\n appLayout: DrawersApiPublic;\n alert: ActionsApiPublic;\n alertContent: AlertFlashContentApiPublic;\n flashbar: ActionsApiPublic;\n flashContent: AlertFlashContentApiPublic;\n };\n awsuiPluginsInternal: {\n appLayout: DrawersApiInternal;\n appLayoutWidget: AppLayoutWidgetApiInternal;\n alert: ActionsApiInternal;\n alertContent: AlertFlashContentApiInternal;\n flashbar: ActionsApiInternal;\n flashContent: AlertFlashContentApiInternal;\n breadcrumbs: BreadcrumbsApiInternal<BreadcrumbGroupProps>;\n };\n}\n\ninterface WindowWithApi extends Window {\n [storageKey]: AwsuiApi;\n}\n\nfunction findUpApi(currentWindow: WindowWithApi): AwsuiApi | undefined {\n try {\n if (currentWindow?.[storageKey]) {\n return currentWindow[storageKey];\n }\n\n if (!currentWindow || currentWindow.parent === currentWindow) {\n // When the window has no more parents, it references itself\n return undefined;\n }\n\n return findUpApi(currentWindow.parent as WindowWithApi);\n } catch (ex) {\n // Most likely a cross-origin access error\n return undefined;\n }\n}\n\nexport function loadApi() {\n if (typeof window === 'undefined') {\n return installApi({});\n }\n const win = window as unknown as WindowWithApi;\n const existingApi = findUpApi(win);\n win[storageKey] = installApi(existingApi ?? {});\n return win[storageKey];\n}\n\nexport const { awsuiPlugins, awsuiPluginsInternal } = loadApi();\n\ntype DeepPartial<T> = T extends (...args: any) => any ? T : { [P in keyof T]?: DeepPartial<T[P]> };\n\nfunction installApi(api: DeepPartial<AwsuiApi>): AwsuiApi {\n api.awsuiPlugins ??= {};\n api.awsuiPluginsInternal ??= {};\n\n const appLayoutDrawers = new DrawersController();\n api.awsuiPlugins.appLayout = appLayoutDrawers.installPublic(api.awsuiPlugins.appLayout);\n api.awsuiPluginsInternal.appLayout = appLayoutDrawers.installInternal(api.awsuiPluginsInternal.appLayout);\n\n const appLayoutController = new AppLayoutWidgetController();\n api.awsuiPluginsInternal.appLayoutWidget = appLayoutController.installInternal(\n api.awsuiPluginsInternal.appLayoutWidget\n );\n\n const alertActions = new ActionButtonsController();\n api.awsuiPlugins.alert = alertActions.installPublic(api.awsuiPlugins.alert);\n api.awsuiPluginsInternal.alert = alertActions.installInternal(api.awsuiPluginsInternal.alert);\n\n const alertContent = new AlertFlashContentController();\n api.awsuiPlugins.alertContent = alertContent.installPublic(api.awsuiPlugins.alertContent);\n api.awsuiPluginsInternal.alertContent = alertContent.installInternal(api.awsuiPluginsInternal.alertContent);\n\n const flashContent = new AlertFlashContentController();\n api.awsuiPlugins.flashContent = flashContent.installPublic(api.awsuiPlugins.flashContent);\n api.awsuiPluginsInternal.flashContent = flashContent.installInternal(api.awsuiPluginsInternal.flashContent);\n\n const flashbarActions = new ActionButtonsController();\n api.awsuiPlugins.flashbar = flashbarActions.installPublic(api.awsuiPlugins.flashbar);\n api.awsuiPluginsInternal.flashbar = flashbarActions.installInternal(api.awsuiPluginsInternal.flashbar);\n\n const breadcrumbs = new BreadcrumbsController<BreadcrumbGroupProps>();\n api.awsuiPluginsInternal.breadcrumbs = breadcrumbs.installInternal(api.awsuiPluginsInternal.breadcrumbs);\n\n return api as AwsuiApi;\n}\n"]}
|