@cloudscape-design/components-themeable 3.0.127 → 3.0.129
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/lib/internal/manifest.json +1 -1
- package/lib/internal/scss/app-layout/visual-refresh/main.scss +23 -12
- package/lib/internal/scss/app-layout/visual-refresh/split-panel.scss +15 -6
- package/lib/internal/scss/attribute-editor/styles.scss +5 -1
- package/lib/internal/scss/breadcrumb-group/item/styles.scss +7 -1
- package/lib/internal/scss/date-range-picker/styles.scss +0 -4
- package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +27 -26
- package/lib/internal/scss/table/styles.scss +4 -2
- package/lib/internal/scss/tabs/styles.scss +15 -11
- package/lib/internal/scss/tabs/tab-header-bar.scss +1 -0
- package/lib/internal/template/annotation-context/annotation/annotation-popover.d.ts.map +1 -1
- package/lib/internal/template/annotation-context/annotation/annotation-popover.js +8 -2
- package/lib/internal/template/annotation-context/annotation/annotation-popover.js.map +1 -1
- package/lib/internal/template/annotation-context/annotation/annotation-trigger.d.ts +2 -0
- package/lib/internal/template/annotation-context/annotation/annotation-trigger.d.ts.map +1 -1
- package/lib/internal/template/annotation-context/annotation/annotation-trigger.js +2 -2
- package/lib/internal/template/annotation-context/annotation/annotation-trigger.js.map +1 -1
- package/lib/internal/template/annotation-context/annotation/closed-annotation.d.ts +3 -1
- package/lib/internal/template/annotation-context/annotation/closed-annotation.d.ts.map +1 -1
- package/lib/internal/template/annotation-context/annotation/closed-annotation.js +2 -2
- package/lib/internal/template/annotation-context/annotation/closed-annotation.js.map +1 -1
- package/lib/internal/template/annotation-context/annotation/open-annotation.d.ts.map +1 -1
- package/lib/internal/template/annotation-context/annotation/open-annotation.js +1 -1
- package/lib/internal/template/annotation-context/annotation/open-annotation.js.map +1 -1
- package/lib/internal/template/annotation-context/annotation/styles.css.js +24 -24
- package/lib/internal/template/annotation-context/annotation/styles.scoped.css +30 -30
- package/lib/internal/template/annotation-context/annotation/styles.selectors.js +24 -24
- package/lib/internal/template/annotation-context/index.d.ts.map +1 -1
- package/lib/internal/template/annotation-context/index.js +3 -1
- package/lib/internal/template/annotation-context/index.js.map +1 -1
- package/lib/internal/template/annotation-context/interfaces.d.ts +1 -1
- package/lib/internal/template/annotation-context/interfaces.d.ts.map +1 -1
- package/lib/internal/template/annotation-context/interfaces.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh/main.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh/main.js +8 -3
- package/lib/internal/template/app-layout/visual-refresh/main.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh/styles.css.js +60 -60
- package/lib/internal/template/app-layout/visual-refresh/styles.scoped.css +255 -237
- package/lib/internal/template/app-layout/visual-refresh/styles.selectors.js +60 -60
- package/lib/internal/template/area-chart/internal.d.ts.map +1 -1
- package/lib/internal/template/area-chart/internal.js +5 -0
- package/lib/internal/template/area-chart/internal.js.map +1 -1
- package/lib/internal/template/area-chart/model/index.d.ts +1 -0
- package/lib/internal/template/area-chart/model/index.d.ts.map +1 -1
- package/lib/internal/template/area-chart/model/index.js.map +1 -1
- package/lib/internal/template/area-chart/model/use-chart-model.d.ts.map +1 -1
- package/lib/internal/template/area-chart/model/use-chart-model.js +8 -1
- package/lib/internal/template/area-chart/model/use-chart-model.js.map +1 -1
- package/lib/internal/template/attribute-editor/row.d.ts.map +1 -1
- package/lib/internal/template/attribute-editor/row.js +4 -3
- package/lib/internal/template/attribute-editor/row.js.map +1 -1
- package/lib/internal/template/attribute-editor/styles.css.js +13 -12
- package/lib/internal/template/attribute-editor/styles.scoped.css +27 -23
- package/lib/internal/template/attribute-editor/styles.selectors.js +13 -12
- package/lib/internal/template/breadcrumb-group/interfaces.d.ts +1 -0
- package/lib/internal/template/breadcrumb-group/interfaces.d.ts.map +1 -1
- package/lib/internal/template/breadcrumb-group/interfaces.js.map +1 -1
- package/lib/internal/template/breadcrumb-group/internal.d.ts.map +1 -1
- package/lib/internal/template/breadcrumb-group/internal.js +1 -1
- package/lib/internal/template/breadcrumb-group/internal.js.map +1 -1
- package/lib/internal/template/breadcrumb-group/item/item.d.ts +1 -1
- package/lib/internal/template/breadcrumb-group/item/item.d.ts.map +1 -1
- package/lib/internal/template/breadcrumb-group/item/item.js +68 -8
- package/lib/internal/template/breadcrumb-group/item/item.js.map +1 -1
- package/lib/internal/template/breadcrumb-group/item/styles.css.js +9 -7
- package/lib/internal/template/breadcrumb-group/item/styles.scoped.css +26 -16
- package/lib/internal/template/breadcrumb-group/item/styles.selectors.js +9 -7
- package/lib/internal/template/code-editor/index.d.ts.map +1 -1
- package/lib/internal/template/code-editor/index.js +11 -16
- package/lib/internal/template/code-editor/index.js.map +1 -1
- package/lib/internal/template/code-editor/interfaces.d.ts +12 -1
- package/lib/internal/template/code-editor/interfaces.d.ts.map +1 -1
- package/lib/internal/template/code-editor/interfaces.js.map +1 -1
- package/lib/internal/template/code-editor/status-bar.d.ts.map +1 -1
- package/lib/internal/template/code-editor/status-bar.js +7 -1
- package/lib/internal/template/code-editor/status-bar.js.map +1 -1
- package/lib/internal/template/code-editor/util.js +1 -1
- package/lib/internal/template/code-editor/util.js.map +1 -1
- package/lib/internal/template/container/internal.d.ts.map +1 -1
- package/lib/internal/template/container/internal.js +7 -4
- package/lib/internal/template/container/internal.js.map +1 -1
- package/lib/internal/template/date-range-picker/calendar/grids/index.d.ts +0 -1
- package/lib/internal/template/date-range-picker/calendar/grids/index.d.ts.map +1 -1
- package/lib/internal/template/date-range-picker/calendar/grids/index.js +2 -14
- package/lib/internal/template/date-range-picker/calendar/grids/index.js.map +1 -1
- package/lib/internal/template/date-range-picker/calendar/index.d.ts +6 -4
- package/lib/internal/template/date-range-picker/calendar/index.d.ts.map +1 -1
- package/lib/internal/template/date-range-picker/calendar/index.js +111 -123
- package/lib/internal/template/date-range-picker/calendar/index.js.map +1 -1
- package/lib/internal/template/date-range-picker/calendar/utils.d.ts +4 -0
- package/lib/internal/template/date-range-picker/calendar/utils.d.ts.map +1 -0
- package/lib/internal/template/date-range-picker/calendar/utils.js +31 -0
- package/lib/internal/template/date-range-picker/calendar/utils.js.map +1 -0
- package/lib/internal/template/date-range-picker/dropdown.d.ts +2 -1
- package/lib/internal/template/date-range-picker/dropdown.d.ts.map +1 -1
- package/lib/internal/template/date-range-picker/dropdown.js +8 -6
- package/lib/internal/template/date-range-picker/dropdown.js.map +1 -1
- package/lib/internal/template/date-range-picker/index.d.ts.map +1 -1
- package/lib/internal/template/date-range-picker/index.js +2 -2
- package/lib/internal/template/date-range-picker/index.js.map +1 -1
- package/lib/internal/template/date-range-picker/interfaces.d.ts +14 -4
- package/lib/internal/template/date-range-picker/interfaces.d.ts.map +1 -1
- package/lib/internal/template/date-range-picker/interfaces.js.map +1 -1
- package/lib/internal/template/date-range-picker/styles.css.js +38 -38
- package/lib/internal/template/date-range-picker/styles.scoped.css +45 -50
- package/lib/internal/template/date-range-picker/styles.selectors.js +38 -38
- package/lib/internal/template/date-range-picker/utils.d.ts +2 -8
- package/lib/internal/template/date-range-picker/utils.d.ts.map +1 -1
- package/lib/internal/template/date-range-picker/utils.js +17 -12
- package/lib/internal/template/date-range-picker/utils.js.map +1 -1
- package/lib/internal/template/flashbar/styles.css.js +33 -33
- package/lib/internal/template/flashbar/styles.scoped.css +121 -121
- package/lib/internal/template/flashbar/styles.selectors.js +33 -33
- package/lib/internal/template/internal/base-component/styles.scoped.css +4 -3
- package/lib/internal/template/internal/components/dropdown/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/dropdown/index.js +2 -9
- package/lib/internal/template/internal/components/dropdown/index.js.map +1 -1
- package/lib/internal/template/internal/components/dropdown-status/index.d.ts +1 -4
- package/lib/internal/template/internal/components/dropdown-status/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/dropdown-status/index.js +3 -5
- package/lib/internal/template/internal/components/dropdown-status/index.js.map +1 -1
- package/lib/internal/template/internal/components/filtering-token/index.d.ts +2 -1
- package/lib/internal/template/internal/components/filtering-token/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/filtering-token/index.js +2 -2
- package/lib/internal/template/internal/components/filtering-token/index.js.map +1 -1
- package/lib/internal/template/internal/components/option/index.js +4 -4
- package/lib/internal/template/internal/components/option/index.js.map +1 -1
- package/lib/internal/template/internal/environment.js +1 -1
- package/lib/internal/template/internal/generated/custom-css-properties/index.d.ts.map +1 -1
- package/lib/internal/template/internal/generated/custom-css-properties/index.js +27 -26
- package/lib/internal/template/internal/generated/custom-css-properties/index.js.map +1 -1
- package/lib/internal/template/internal/hooks/use-analytics/index.d.ts +2 -0
- package/lib/internal/template/internal/hooks/use-analytics/index.d.ts.map +1 -0
- package/lib/internal/template/internal/hooks/use-analytics/index.js +16 -0
- package/lib/internal/template/internal/hooks/use-analytics/index.js.map +1 -0
- package/lib/internal/template/internal/utils/date-time/format-date-time.d.ts +2 -0
- package/lib/internal/template/internal/utils/date-time/format-date-time.d.ts.map +1 -0
- package/lib/internal/template/internal/utils/date-time/format-date-time.js +8 -0
- package/lib/internal/template/internal/utils/date-time/format-date-time.js.map +1 -0
- package/lib/internal/template/internal/utils/date-time/index.d.ts +2 -1
- package/lib/internal/template/internal/utils/date-time/index.d.ts.map +1 -1
- package/lib/internal/template/internal/utils/date-time/index.js +2 -1
- package/lib/internal/template/internal/utils/date-time/index.js.map +1 -1
- package/lib/internal/template/internal/utils/date-time/join-date-time.d.ts +4 -0
- package/lib/internal/template/internal/utils/date-time/join-date-time.d.ts.map +1 -1
- package/lib/internal/template/internal/utils/date-time/join-date-time.js +4 -0
- package/lib/internal/template/internal/utils/date-time/join-date-time.js.map +1 -1
- package/lib/internal/template/mixed-line-bar-chart/chart-container.d.ts.map +1 -1
- package/lib/internal/template/mixed-line-bar-chart/chart-container.js +14 -5
- package/lib/internal/template/mixed-line-bar-chart/chart-container.js.map +1 -1
- package/lib/internal/template/package-lock.json +144 -433
- package/lib/internal/template/pie-chart/pie-chart.d.ts.map +1 -1
- package/lib/internal/template/pie-chart/pie-chart.js +10 -1
- package/lib/internal/template/pie-chart/pie-chart.js.map +1 -1
- package/lib/internal/template/popover/body.d.ts +2 -1
- package/lib/internal/template/popover/body.d.ts.map +1 -1
- package/lib/internal/template/popover/body.js +2 -2
- package/lib/internal/template/popover/body.js.map +1 -1
- package/lib/internal/template/property-filter/interfaces.d.ts +1 -0
- package/lib/internal/template/property-filter/interfaces.d.ts.map +1 -1
- package/lib/internal/template/property-filter/interfaces.js.map +1 -1
- package/lib/internal/template/property-filter/token.d.ts.map +1 -1
- package/lib/internal/template/property-filter/token.js +1 -1
- package/lib/internal/template/property-filter/token.js.map +1 -1
- package/lib/internal/template/select/parts/filter.d.ts +1 -1
- package/lib/internal/template/select/utils/use-select.d.ts +1 -7
- package/lib/internal/template/select/utils/use-select.d.ts.map +1 -1
- package/lib/internal/template/select/utils/use-select.js +1 -1
- package/lib/internal/template/select/utils/use-select.js.map +1 -1
- package/lib/internal/template/split-panel/index.d.ts.map +1 -1
- package/lib/internal/template/split-panel/index.js +11 -9
- package/lib/internal/template/split-panel/index.js.map +1 -1
- package/lib/internal/template/table/styles.css.js +34 -34
- package/lib/internal/template/table/styles.scoped.css +42 -40
- package/lib/internal/template/table/styles.selectors.js +34 -34
- package/lib/internal/template/tabs/index.d.ts.map +1 -1
- package/lib/internal/template/tabs/index.js +9 -11
- package/lib/internal/template/tabs/index.js.map +1 -1
- package/lib/internal/template/tabs/styles.css.js +21 -21
- package/lib/internal/template/tabs/styles.scoped.css +48 -41
- package/lib/internal/template/tabs/styles.selectors.js +21 -21
- package/lib/internal/template/tabs/tab-header-bar.d.ts +4 -0
- package/lib/internal/template/tabs/tab-header-bar.d.ts.map +1 -1
- package/lib/internal/template/tabs/tab-header-bar.js +5 -1
- package/lib/internal/template/tabs/tab-header-bar.js.map +1 -1
- package/lib/internal/template/tag-editor/internal.d.ts.map +1 -1
- package/lib/internal/template/tag-editor/internal.js +6 -7
- package/lib/internal/template/tag-editor/internal.js.map +1 -1
- package/lib/internal/template/test-utils/tsconfig.tsbuildinfo +1 -1
- package/lib/internal/template/tutorial-panel/components/tutorial-detail-view/index.d.ts.map +1 -1
- package/lib/internal/template/tutorial-panel/components/tutorial-detail-view/index.js +3 -1
- package/lib/internal/template/tutorial-panel/components/tutorial-detail-view/index.js.map +1 -1
- package/lib/internal/template/tutorial-panel/components/tutorial-detail-view/task.d.ts.map +1 -1
- package/lib/internal/template/tutorial-panel/components/tutorial-detail-view/task.js +2 -1
- package/lib/internal/template/tutorial-panel/components/tutorial-detail-view/task.js.map +1 -1
- package/lib/internal/template/tutorial-panel/components/tutorial-list/index.d.ts.map +1 -1
- package/lib/internal/template/tutorial-panel/components/tutorial-list/index.js +2 -2
- package/lib/internal/template/tutorial-panel/components/tutorial-list/index.js.map +1 -1
- package/lib/internal/template/tutorial-panel/interfaces.d.ts +2 -0
- package/lib/internal/template/tutorial-panel/interfaces.d.ts.map +1 -1
- package/lib/internal/template/tutorial-panel/interfaces.js.map +1 -1
- package/lib/internal/template/wizard/index.d.ts.map +1 -1
- package/lib/internal/template/wizard/index.js +9 -5
- package/lib/internal/template/wizard/index.js.map +1 -1
- package/lib/internal/template/wizard/wizard-form.d.ts.map +1 -1
- package/lib/internal/template/wizard/wizard-form.js +7 -2
- package/lib/internal/template/wizard/wizard-form.js.map +1 -1
- package/package.json +1 -1
- package/lib/internal/template/date-range-picker/calendar/use-date-time.d.ts +0 -9
- package/lib/internal/template/date-range-picker/calendar/use-date-time.d.ts.map +0 -1
- package/lib/internal/template/date-range-picker/calendar/use-date-time.js +0 -16
- package/lib/internal/template/date-range-picker/calendar/use-date-time.js.map +0 -1
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
@use '../../internal/styles/' as styles;
|
|
7
7
|
@use '../../internal/styles/tokens' as awsui;
|
|
8
|
+
@use '../../internal/generated/custom-css-properties/index.scss' as custom-props;
|
|
8
9
|
|
|
9
10
|
.container {
|
|
10
11
|
grid-column: 3;
|
|
@@ -12,10 +13,20 @@
|
|
|
12
13
|
padding-bottom: awsui.$space-layout-content-bottom;
|
|
13
14
|
|
|
14
15
|
/*
|
|
15
|
-
If
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
If the split panel is in the bottom position additional padding will need to be
|
|
17
|
+
added to the content area. This is to ensure that the user is able to scroll
|
|
18
|
+
far enough to see all of the content that would otherwise be obscured by the
|
|
19
|
+
sticky position of the split panel.
|
|
20
|
+
*/
|
|
21
|
+
&.has-split-panel.split-panel-position-bottom {
|
|
22
|
+
padding-bottom: calc(var(#{custom-props.$splitPanelHeight}) + #{awsui.$space-layout-content-bottom});
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/*
|
|
26
|
+
If disableContentPaddings is enabled then the Main content has a different
|
|
27
|
+
behavior inside the Layout grid. By default it will render across the entire
|
|
28
|
+
grid column span. If the Navigation is open on the left, we increment the
|
|
29
|
+
start column by one. If the Tools or Split Panel (in side position) is open
|
|
19
30
|
on the right, we decrement the column end by one.
|
|
20
31
|
*/
|
|
21
32
|
&.disable-content-paddings {
|
|
@@ -35,14 +46,14 @@
|
|
|
35
46
|
}
|
|
36
47
|
|
|
37
48
|
/*
|
|
38
|
-
If disableContentPaddings is not enabled (the majority of use cases) then
|
|
39
|
-
the following code block will compute the padding behavior for the Main
|
|
49
|
+
If disableContentPaddings is not enabled (the majority of use cases) then
|
|
50
|
+
the following code block will compute the padding behavior for the Main
|
|
40
51
|
under various circumstances.
|
|
41
52
|
*/
|
|
42
53
|
&:not(.disable-content-paddings) {
|
|
43
54
|
@include styles.media-breakpoint-up(styles.$breakpoint-x-small) {
|
|
44
55
|
/*
|
|
45
|
-
Notifications is the previous adjacent sibling to the Main in
|
|
56
|
+
Notifications is the previous adjacent sibling to the Main in
|
|
46
57
|
desktop viewports if there are no Breadcrumbs or Header. Use additional
|
|
47
58
|
to padding on the Main.
|
|
48
59
|
*/
|
|
@@ -52,7 +63,7 @@
|
|
|
52
63
|
}
|
|
53
64
|
|
|
54
65
|
/*
|
|
55
|
-
Main is the only rendered center content if there are no Notifications,
|
|
66
|
+
Main is the only rendered center content if there are no Notifications,
|
|
56
67
|
Breadcrumbs, or Header. Use minimal top padding.
|
|
57
68
|
*/
|
|
58
69
|
&.content-type-default:not(.has-notifications-content):not(.has-breadcrumbs):not(.has-header):not(.has-dynamic-overlap-height),
|
|
@@ -61,7 +72,7 @@
|
|
|
61
72
|
}
|
|
62
73
|
|
|
63
74
|
/*
|
|
64
|
-
If the Header exists then it is necessarily the previous adjacent
|
|
75
|
+
If the Header exists then it is necessarily the previous adjacent
|
|
65
76
|
sibling to the Main which requires no top padding.
|
|
66
77
|
*/
|
|
67
78
|
&.has-header,
|
|
@@ -72,8 +83,8 @@
|
|
|
72
83
|
|
|
73
84
|
@include styles.media-breakpoint-down(styles.$breakpoint-x-small) {
|
|
74
85
|
/*
|
|
75
|
-
If the Notifications exist but the Header does not then the
|
|
76
|
-
Notifications is the previous adjacent sibling to the Main
|
|
86
|
+
If the Notifications exist but the Header does not then the
|
|
87
|
+
Notifications is the previous adjacent sibling to the Main
|
|
77
88
|
requiring additional top padding. This is because the Breadcrumbs
|
|
78
89
|
are now rendered first and positioned sticky.
|
|
79
90
|
*/
|
|
@@ -91,7 +102,7 @@
|
|
|
91
102
|
}
|
|
92
103
|
|
|
93
104
|
/*
|
|
94
|
-
If the Header exists then it is necessarily the previous adjacent
|
|
105
|
+
If the Header exists then it is necessarily the previous adjacent
|
|
95
106
|
sibling to the Main which requires no top padding.
|
|
96
107
|
*/
|
|
97
108
|
&.has-header,
|
|
@@ -8,18 +8,27 @@
|
|
|
8
8
|
@use '../../internal/generated/custom-css-properties/index.scss' as custom-props;
|
|
9
9
|
|
|
10
10
|
/*
|
|
11
|
-
When the Split Panel is in the bottom position it
|
|
12
|
-
|
|
13
|
-
the
|
|
14
|
-
|
|
15
|
-
of the Tools component flex container and should consume 100% of the
|
|
16
|
-
parent height.
|
|
11
|
+
When the Split Panel is in the bottom position it was share the same row
|
|
12
|
+
as the content area. This row is defined as 1 fractional unit which will
|
|
13
|
+
consume the remaining vertical space in the grid after the notifications
|
|
14
|
+
and breadcrumbs.
|
|
17
15
|
*/
|
|
18
16
|
section.split-panel-bottom {
|
|
17
|
+
/*
|
|
18
|
+
The align self property will position the split panel at the bottom of the grid row.
|
|
19
|
+
This could be off the viewport if the content area has enough content to be scrollable.
|
|
20
|
+
*/
|
|
21
|
+
align-self: end;
|
|
19
22
|
bottom: var(#{custom-props.$footerHeight});
|
|
20
23
|
display: none;
|
|
21
24
|
grid-column: 1 / 6;
|
|
25
|
+
grid-row: 5;
|
|
22
26
|
height: auto;
|
|
27
|
+
/*
|
|
28
|
+
The position sticky will work in conjunction with the align self: end; property.
|
|
29
|
+
If the grid row scrolls beyond the viewport, the sticky bottom position
|
|
30
|
+
will lift it up above the footer so it is always visible.
|
|
31
|
+
*/
|
|
23
32
|
position: sticky;
|
|
24
33
|
z-index: 851;
|
|
25
34
|
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
/* used in test-utils */
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
.button-container {
|
|
40
|
+
.button-container-haslabel {
|
|
41
41
|
// We only support vertical alignment of the remove button for labels with exactly one line.
|
|
42
42
|
// The value is calculated as follows:
|
|
43
43
|
// padding-top = awsui-form-field-controls: 4px +
|
|
@@ -45,6 +45,10 @@
|
|
|
45
45
|
padding-top: calc(#{awsui.$space-xxs} + #{awsui.$font-body-m-line-height});
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
.button-container-nolabel {
|
|
49
|
+
padding-top: #{awsui.$space-xxs};
|
|
50
|
+
}
|
|
51
|
+
|
|
48
52
|
.divider {
|
|
49
53
|
border-bottom: awsui.$border-divider-section-width solid awsui.$color-border-divider-default;
|
|
50
54
|
}
|
|
@@ -36,7 +36,6 @@
|
|
|
36
36
|
font-weight: styles.$font-weight-bold;
|
|
37
37
|
text-decoration: none;
|
|
38
38
|
cursor: default;
|
|
39
|
-
pointer-events: none;
|
|
40
39
|
}
|
|
41
40
|
}
|
|
42
41
|
}
|
|
@@ -50,3 +49,10 @@
|
|
|
50
49
|
display: block;
|
|
51
50
|
}
|
|
52
51
|
}
|
|
52
|
+
.virtual-item {
|
|
53
|
+
@include styles.awsui-util-hide;
|
|
54
|
+
visibility: hidden;
|
|
55
|
+
}
|
|
56
|
+
.item-popover {
|
|
57
|
+
/* used in tests */
|
|
58
|
+
}
|
|
@@ -1,28 +1,29 @@
|
|
|
1
1
|
|
|
2
|
-
$offsetTop: --awsui-offset-top-
|
|
3
|
-
$offsetTopWithNotifications: --awsui-offset-top-with-notifications-
|
|
4
|
-
$contentGapLeft: --awsui-content-gap-left-
|
|
5
|
-
$contentGapRight: --awsui-content-gap-right-
|
|
6
|
-
$contentHeight: --awsui-content-height-
|
|
7
|
-
$defaultMaxContentWidth: --awsui-default-max-content-width-
|
|
8
|
-
$defaultMinContentWidth: --awsui-default-min-content-width-
|
|
9
|
-
$footerHeight: --awsui-footer-height-
|
|
10
|
-
$headerHeight: --awsui-header-height-
|
|
11
|
-
$layoutWidth: --awsui-layout-width-
|
|
12
|
-
$mainOffsetLeft: --awsui-main-offset-left-
|
|
13
|
-
$maxContentWidth: --awsui-max-content-width-
|
|
14
|
-
$minContentWidth: --awsui-min-content-width-
|
|
15
|
-
$notificationsHeight: --awsui-notifications-height-
|
|
16
|
-
$overlapHeight: --awsui-overlap-height-
|
|
17
|
-
$navigationWidth: --awsui-navigation-width-
|
|
18
|
-
$splitPanelReportedHeaderSize: --awsui-split-panel-reported-header-size-
|
|
19
|
-
$splitPanelReportedSize: --awsui-split-panel-reported-size-
|
|
20
|
-
$
|
|
21
|
-
$
|
|
22
|
-
$
|
|
23
|
-
$
|
|
24
|
-
$
|
|
25
|
-
$
|
|
26
|
-
$
|
|
27
|
-
$
|
|
2
|
+
$offsetTop: --awsui-offset-top-5mks97;
|
|
3
|
+
$offsetTopWithNotifications: --awsui-offset-top-with-notifications-5mks97;
|
|
4
|
+
$contentGapLeft: --awsui-content-gap-left-5mks97;
|
|
5
|
+
$contentGapRight: --awsui-content-gap-right-5mks97;
|
|
6
|
+
$contentHeight: --awsui-content-height-5mks97;
|
|
7
|
+
$defaultMaxContentWidth: --awsui-default-max-content-width-5mks97;
|
|
8
|
+
$defaultMinContentWidth: --awsui-default-min-content-width-5mks97;
|
|
9
|
+
$footerHeight: --awsui-footer-height-5mks97;
|
|
10
|
+
$headerHeight: --awsui-header-height-5mks97;
|
|
11
|
+
$layoutWidth: --awsui-layout-width-5mks97;
|
|
12
|
+
$mainOffsetLeft: --awsui-main-offset-left-5mks97;
|
|
13
|
+
$maxContentWidth: --awsui-max-content-width-5mks97;
|
|
14
|
+
$minContentWidth: --awsui-min-content-width-5mks97;
|
|
15
|
+
$notificationsHeight: --awsui-notifications-height-5mks97;
|
|
16
|
+
$overlapHeight: --awsui-overlap-height-5mks97;
|
|
17
|
+
$navigationWidth: --awsui-navigation-width-5mks97;
|
|
18
|
+
$splitPanelReportedHeaderSize: --awsui-split-panel-reported-header-size-5mks97;
|
|
19
|
+
$splitPanelReportedSize: --awsui-split-panel-reported-size-5mks97;
|
|
20
|
+
$splitPanelHeight: --awsui-split-panel-height-5mks97;
|
|
21
|
+
$splitPanelMinWidth: --awsui-split-panel-min-width-5mks97;
|
|
22
|
+
$splitPanelMaxWidth: --awsui-split-panel-max-width-5mks97;
|
|
23
|
+
$toolsMaxWidth: --awsui-tools-max-width-5mks97;
|
|
24
|
+
$toolsWidth: --awsui-tools-width-5mks97;
|
|
25
|
+
$toolsAnimationStartingOpacity: --awsui-tools-animation-starting-opacity-5mks97;
|
|
26
|
+
$contentScrollMargin: --awsui-content-scroll-margin-5mks97;
|
|
27
|
+
$flashbarStackDepth: --awsui-flashbar-stack-depth-5mks97;
|
|
28
|
+
$flashbarStackIndex: --awsui-flashbar-stack-index-5mks97;
|
|
28
29
|
|
|
@@ -61,8 +61,6 @@
|
|
|
61
61
|
padding-top: awsui.$space-table-content-top;
|
|
62
62
|
padding-bottom: awsui.$space-table-content-bottom;
|
|
63
63
|
overflow-x: auto;
|
|
64
|
-
border-top-right-radius: awsui.$border-radius-container;
|
|
65
|
-
border-top-left-radius: awsui.$border-radius-container;
|
|
66
64
|
&.variant-stacked,
|
|
67
65
|
&.variant-container {
|
|
68
66
|
& > .table {
|
|
@@ -79,6 +77,10 @@
|
|
|
79
77
|
&.has-footer {
|
|
80
78
|
padding-bottom: 0px;
|
|
81
79
|
}
|
|
80
|
+
&:not(.has-header) {
|
|
81
|
+
border-top-right-radius: awsui.$border-radius-container;
|
|
82
|
+
border-top-left-radius: awsui.$border-radius-container;
|
|
83
|
+
}
|
|
82
84
|
|
|
83
85
|
@include focus-visible.when-visible {
|
|
84
86
|
@include styles.container-focus();
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
@use '../internal/styles' as styles;
|
|
7
7
|
@use '../internal/styles/tokens' as awsui;
|
|
8
|
+
@use '../internal/hooks/focus-visible' as focus-visible;
|
|
8
9
|
|
|
9
10
|
@import './tab-header-bar';
|
|
10
11
|
|
|
@@ -18,22 +19,25 @@
|
|
|
18
19
|
width: 100%;
|
|
19
20
|
}
|
|
20
21
|
|
|
21
|
-
.tabs-content
|
|
22
|
-
|
|
23
|
-
padding: awsui.$space-scaled-m 0;
|
|
24
|
-
}
|
|
22
|
+
.tabs-content {
|
|
23
|
+
display: none;
|
|
25
24
|
}
|
|
26
25
|
|
|
27
|
-
.tabs-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
.tabs-content-active {
|
|
27
|
+
display: block;
|
|
28
|
+
@include focus-visible.when-visible {
|
|
29
|
+
@include styles.container-focus();
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
.tabs-content {
|
|
34
|
-
|
|
33
|
+
.tabs-content-wrapper {
|
|
34
|
+
&.with-paddings > .tabs-content {
|
|
35
|
+
padding: awsui.$space-scaled-m 0;
|
|
36
|
+
}
|
|
35
37
|
}
|
|
36
38
|
|
|
37
|
-
.tabs-content-
|
|
38
|
-
|
|
39
|
+
.tabs-container-content-wrapper {
|
|
40
|
+
&.with-paddings > .tabs-content {
|
|
41
|
+
padding: awsui.$space-tabs-content-top awsui.$space-container-horizontal awsui.$space-scaled-l;
|
|
42
|
+
}
|
|
39
43
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"annotation-popover.d.ts","sourceRoot":"","sources":["../../../../src/annotation-context/annotation/annotation-popover.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAQzC,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"annotation-popover.d.ts","sourceRoot":"","sources":["../../../../src/annotation-context/annotation/annotation-popover.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAQzC,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAOvD,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IAEvB,SAAS,EAAE,YAAY,CAAC,WAAW,CAAC,CAAC;IAErC,iBAAiB,EAAE,OAAO,CAAC;IAC3B,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAE9B,QAAQ,EAAE,MAAM,IAAI,CAAC;IAErB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,qBAAqB,EAAE,OAAO,CAAC;IAC/B,qBAAqB,EAAE,MAAM,IAAI,CAAC;IAElC,kBAAkB,EAAE,MAAM,CAAC;IAE3B,eAAe,EAAE,MAAM,CAAC;IAExB,gBAAgB,EAAE,OAAO,CAAC;IAE1B,SAAS,EAAE,MAAM,IAAI,CAAC;IAEtB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IAEvC,WAAW,EAAE,sBAAsB,CAAC,aAAa,CAAC,CAAC;CACpD;AASD,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,OAAO,EACP,KAAK,EAEL,SAAiB,EAEjB,kBAAkB,EAElB,eAAe,EAEf,kBAAkB,EAClB,gBAAgB,EAEhB,SAAS,EAET,iBAAiB,EACjB,iBAAiB,EAEjB,QAAQ,EAER,QAAQ,EAER,qBAAqB,EACrB,qBAAqB,EACrB,WAAW,GACZ,EAAE,sBAAsB,eAuGxB"}
|
|
@@ -10,6 +10,8 @@ import PopoverContainer from '../../popover/container';
|
|
|
10
10
|
import PopoverBody from '../../popover/body';
|
|
11
11
|
import InternalAlert from '../../alert/internal';
|
|
12
12
|
import { scrollElementIntoView } from '../../internal/utils/scrollable-containers';
|
|
13
|
+
import { useUniqueId } from '../../internal/hooks/use-unique-id/index.js';
|
|
14
|
+
import { joinStrings } from '../../internal/utils/strings/join-strings.js';
|
|
13
15
|
var arrow = function (position) { return (React.createElement("div", { className: clsx(styles.arrow, styles["arrow-position-".concat(position)]) },
|
|
14
16
|
React.createElement("div", { className: styles['arrow-outer'] }),
|
|
15
17
|
React.createElement("div", { className: styles['arrow-inner'] }))); };
|
|
@@ -19,8 +21,12 @@ export function AnnotationPopover(_a) {
|
|
|
19
21
|
var _a;
|
|
20
22
|
scrollElementIntoView((_a = trackRef.current) !== null && _a !== void 0 ? _a : undefined);
|
|
21
23
|
}, [trackRef]);
|
|
24
|
+
var popoverHeaderId = useUniqueId('poppver-header-');
|
|
25
|
+
var stepCounterId = useUniqueId('step-counter-');
|
|
22
26
|
return (React.createElement(PopoverContainer, { size: "medium", fixedWidth: false, position: direction, trackRef: trackRef, trackKey: taskLocalStepIndex, variant: "annotation", arrow: arrow, zIndex: 1000 },
|
|
23
|
-
React.createElement(PopoverBody, { dismissButton: true, dismissAriaLabel: i18nStrings.labelDismissAnnotation, header: React.createElement(InternalBox, { color: "text-body-secondary", fontSize: "body-s", margin: { top: 'xxxs' }, className: styles.header }, title), onDismiss: onDismiss, className: styles.annotation, variant: "annotation", overflowVisible: "content"
|
|
27
|
+
React.createElement(PopoverBody, { dismissButton: true, dismissAriaLabel: i18nStrings.labelDismissAnnotation, header: React.createElement(InternalBox, { id: popoverHeaderId, color: "text-body-secondary", fontSize: "body-s", margin: { top: 'xxxs' }, className: styles.header }, title), onDismiss: onDismiss, className: styles.annotation, variant: "annotation", overflowVisible: "content",
|
|
28
|
+
// create new dialog to have the native dialog behavior of the screen readers
|
|
29
|
+
key: taskLocalStepIndex, ariaLabelledby: joinStrings(popoverHeaderId, stepCounterId) },
|
|
24
30
|
React.createElement(InternalSpaceBetween, { size: "s" },
|
|
25
31
|
React.createElement("div", { className: styles.description },
|
|
26
32
|
React.createElement(InternalBox, { className: styles.content }, content)),
|
|
@@ -29,7 +35,7 @@ export function AnnotationPopover(_a) {
|
|
|
29
35
|
React.createElement("div", { className: styles.divider }),
|
|
30
36
|
React.createElement("div", { className: styles.actionBar },
|
|
31
37
|
React.createElement("div", { className: styles.stepCounter },
|
|
32
|
-
React.createElement(InternalBox, { className: styles['step-counter-content'], color: "text-body-secondary", fontSize: "body-s" }, i18nStrings.stepCounterText(taskLocalStepIndex !== null && taskLocalStepIndex !== void 0 ? taskLocalStepIndex : 0, totalLocalSteps !== null && totalLocalSteps !== void 0 ? totalLocalSteps : 0))),
|
|
38
|
+
React.createElement(InternalBox, { id: stepCounterId, className: styles['step-counter-content'], color: "text-body-secondary", fontSize: "body-s" }, i18nStrings.stepCounterText(taskLocalStepIndex !== null && taskLocalStepIndex !== void 0 ? taskLocalStepIndex : 0, totalLocalSteps !== null && totalLocalSteps !== void 0 ? totalLocalSteps : 0))),
|
|
33
39
|
React.createElement(InternalSpaceBetween, { size: "xs", direction: "horizontal" },
|
|
34
40
|
showPreviousButton && (React.createElement(InternalButton, { variant: "link", onClick: onPreviousButtonClick, disabled: !previousButtonEnabled, formAction: "none", ariaLabel: i18nStrings.previousButtonText, className: styles['previous-button'] }, i18nStrings.previousButtonText)),
|
|
35
41
|
showFinishButton ? (React.createElement(InternalButton, { onClick: onFinish, formAction: "none", ariaLabel: i18nStrings.finishButtonText, className: styles['finish-button'] }, i18nStrings.finishButtonText)) : (React.createElement(InternalButton, { onClick: onNextButtonClick, disabled: !nextButtonEnabled, formAction: "none", ariaLabel: i18nStrings.nextButtonText, className: styles['next-button'] }, i18nStrings.nextButtonText)))))))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"annotation-popover.js","sourceRoot":"","sources":["../../../../src/annotation-context/annotation/annotation-popover.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,WAAW,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,oBAAoB,MAAM,8BAA8B,CAAC;AAChE,OAAO,gBAAgB,MAAM,yBAAyB,CAAC;AACvD,OAAO,WAAW,MAAM,oBAAoB,CAAC;AAG7C,OAAO,aAAa,MAAM,sBAAsB,CAAC;AAEjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AA+
|
|
1
|
+
{"version":3,"file":"annotation-popover.js","sourceRoot":"","sources":["../../../../src/annotation-context/annotation/annotation-popover.tsx"],"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 React, { useEffect } from 'react';\nimport clsx from 'clsx';\nimport styles from './styles.css.js';\nimport InternalBox from '../../box/internal';\nimport { InternalButton } from '../../button/internal';\nimport InternalSpaceBetween from '../../space-between/internal';\nimport PopoverContainer from '../../popover/container';\nimport PopoverBody from '../../popover/body';\nimport { HotspotProps } from '../../hotspot/interfaces';\nimport { AnnotationContextProps } from '../interfaces';\nimport InternalAlert from '../../alert/internal';\nimport { InternalPosition } from '../../popover/interfaces';\nimport { scrollElementIntoView } from '../../internal/utils/scrollable-containers';\nimport { useUniqueId } from '../../internal/hooks/use-unique-id/index.js';\nimport { joinStrings } from '../../internal/utils/strings/join-strings.js';\n\nexport interface AnnotationPopoverProps {\n title: string;\n content: React.ReactNode;\n alert: React.ReactNode;\n\n direction: HotspotProps['direction'];\n\n nextButtonEnabled: boolean;\n onNextButtonClick: () => void;\n\n onFinish: () => void;\n\n showPreviousButton: boolean;\n previousButtonEnabled: boolean;\n onPreviousButtonClick: () => void;\n\n taskLocalStepIndex: number;\n\n totalLocalSteps: number;\n\n showFinishButton: boolean;\n\n onDismiss: () => void;\n\n trackRef: React.RefObject<HTMLElement>;\n\n i18nStrings: AnnotationContextProps['i18nStrings'];\n}\n\nconst arrow = (position: InternalPosition | null) => (\n <div className={clsx(styles.arrow, styles[`arrow-position-${position}`])}>\n <div className={styles['arrow-outer']} />\n <div className={styles['arrow-inner']} />\n </div>\n);\n\nexport function AnnotationPopover({\n title,\n content,\n alert,\n\n direction = 'top',\n\n taskLocalStepIndex,\n\n totalLocalSteps,\n\n showPreviousButton,\n showFinishButton,\n\n onDismiss,\n\n nextButtonEnabled,\n onNextButtonClick,\n\n onFinish,\n\n trackRef,\n\n previousButtonEnabled,\n onPreviousButtonClick,\n i18nStrings,\n}: AnnotationPopoverProps) {\n useEffect(() => {\n scrollElementIntoView(trackRef.current ?? undefined);\n }, [trackRef]);\n\n const popoverHeaderId = useUniqueId('poppver-header-');\n const stepCounterId = useUniqueId('step-counter-');\n\n return (\n <PopoverContainer\n size=\"medium\"\n fixedWidth={false}\n position={direction}\n trackRef={trackRef}\n trackKey={taskLocalStepIndex}\n variant=\"annotation\"\n arrow={arrow}\n zIndex={1000}\n >\n <PopoverBody\n dismissButton={true}\n dismissAriaLabel={i18nStrings.labelDismissAnnotation}\n header={\n <InternalBox\n id={popoverHeaderId}\n color=\"text-body-secondary\"\n fontSize=\"body-s\"\n margin={{ top: 'xxxs' }}\n className={styles.header}\n >\n {title}\n </InternalBox>\n }\n onDismiss={onDismiss}\n className={styles.annotation}\n variant=\"annotation\"\n overflowVisible=\"content\"\n // create new dialog to have the native dialog behavior of the screen readers\n key={taskLocalStepIndex}\n ariaLabelledby={joinStrings(popoverHeaderId, stepCounterId)}\n >\n <InternalSpaceBetween size=\"s\">\n <div className={styles.description}>\n <InternalBox className={styles.content}>{content}</InternalBox>\n </div>\n\n {alert && <InternalAlert type=\"warning\">{alert}</InternalAlert>}\n\n <InternalSpaceBetween size=\"s\">\n <div className={styles.divider} />\n\n <div className={styles.actionBar}>\n <div className={styles.stepCounter}>\n <InternalBox\n id={stepCounterId}\n className={styles['step-counter-content']}\n color=\"text-body-secondary\"\n fontSize=\"body-s\"\n >\n {i18nStrings.stepCounterText(taskLocalStepIndex ?? 0, totalLocalSteps ?? 0)}\n </InternalBox>\n </div>\n <InternalSpaceBetween size=\"xs\" direction=\"horizontal\">\n {showPreviousButton && (\n <InternalButton\n variant=\"link\"\n onClick={onPreviousButtonClick}\n disabled={!previousButtonEnabled}\n formAction=\"none\"\n ariaLabel={i18nStrings.previousButtonText}\n className={styles['previous-button']}\n >\n {i18nStrings.previousButtonText}\n </InternalButton>\n )}\n\n {showFinishButton ? (\n <InternalButton\n onClick={onFinish}\n formAction=\"none\"\n ariaLabel={i18nStrings.finishButtonText}\n className={styles['finish-button']}\n >\n {i18nStrings.finishButtonText}\n </InternalButton>\n ) : (\n <InternalButton\n onClick={onNextButtonClick}\n disabled={!nextButtonEnabled}\n formAction=\"none\"\n ariaLabel={i18nStrings.nextButtonText}\n className={styles['next-button']}\n >\n {i18nStrings.nextButtonText}\n </InternalButton>\n )}\n </InternalSpaceBetween>\n </div>\n </InternalSpaceBetween>\n </InternalSpaceBetween>\n </PopoverBody>\n </PopoverContainer>\n );\n}\n"]}
|
|
@@ -4,6 +4,8 @@ export interface AnnotationTriggerProps {
|
|
|
4
4
|
open: boolean;
|
|
5
5
|
onClick: () => void;
|
|
6
6
|
i18nStrings: AnnotationContextProps['i18nStrings'];
|
|
7
|
+
taskLocalStepIndex: number;
|
|
8
|
+
totalLocalSteps: number;
|
|
7
9
|
}
|
|
8
10
|
declare const _default: React.ForwardRefExoticComponent<AnnotationTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
9
11
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"annotation-trigger.d.ts","sourceRoot":"","sources":["../../../../src/annotation-context/annotation/annotation-trigger.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAI3C,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAEvD,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,OAAO,CAAC;IAEd,OAAO,EAAE,MAAM,IAAI,CAAC;IAEpB,WAAW,EAAE,sBAAsB,CAAC,aAAa,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"annotation-trigger.d.ts","sourceRoot":"","sources":["../../../../src/annotation-context/annotation/annotation-trigger.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAI3C,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAEvD,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,OAAO,CAAC;IAEd,OAAO,EAAE,MAAM,IAAI,CAAC;IAEpB,WAAW,EAAE,sBAAsB,CAAC,aAAa,CAAC,CAAC;IACnD,kBAAkB,EAAE,MAAM,CAAC;IAC3B,eAAe,EAAE,MAAM,CAAC;CACzB;;AAED,wBA0BG"}
|
|
@@ -6,13 +6,13 @@ import styles from './styles.css.js';
|
|
|
6
6
|
import { AnnotationIcon } from './annotation-icon';
|
|
7
7
|
import useFocusVisible from '../../internal/hooks/focus-visible/index.js';
|
|
8
8
|
export default React.forwardRef(function AnnotationTrigger(_a, ref) {
|
|
9
|
-
var open = _a.open, onClickHandler = _a.onClick, i18nStrings = _a.i18nStrings;
|
|
9
|
+
var open = _a.open, onClickHandler = _a.onClick, i18nStrings = _a.i18nStrings, taskLocalStepIndex = _a.taskLocalStepIndex, totalLocalSteps = _a.totalLocalSteps;
|
|
10
10
|
var focusVisible = useFocusVisible();
|
|
11
11
|
var onClick = useCallback(function (event) {
|
|
12
12
|
event.preventDefault();
|
|
13
13
|
onClickHandler();
|
|
14
14
|
}, [onClickHandler]);
|
|
15
|
-
return (React.createElement("button", __assign({ ref: ref, className: styles.hotspot, "aria-haspopup": "dialog", "aria-label": i18nStrings.labelHotspot(open), onClick: onClick }, focusVisible),
|
|
15
|
+
return (React.createElement("button", __assign({ ref: ref, className: styles.hotspot, "aria-haspopup": "dialog", "aria-label": i18nStrings.labelHotspot(open, taskLocalStepIndex !== null && taskLocalStepIndex !== void 0 ? taskLocalStepIndex : 0, totalLocalSteps !== null && totalLocalSteps !== void 0 ? totalLocalSteps : 0), onClick: onClick }, focusVisible),
|
|
16
16
|
React.createElement(AnnotationIcon, { open: open })));
|
|
17
17
|
});
|
|
18
18
|
//# sourceMappingURL=annotation-trigger.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"annotation-trigger.js","sourceRoot":"","sources":["../../../../src/annotation-context/annotation/annotation-trigger.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,eAAe,MAAM,6CAA6C,CAAC;
|
|
1
|
+
{"version":3,"file":"annotation-trigger.js","sourceRoot":"","sources":["../../../../src/annotation-context/annotation/annotation-trigger.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,eAAe,MAAM,6CAA6C,CAAC;AAa1E,eAAe,KAAK,CAAC,UAAU,CAA4C,SAAS,iBAAiB,CACnG,EAA2G,EAC3G,GAAG;QADD,IAAI,UAAA,EAAW,cAAc,aAAA,EAAE,WAAW,iBAAA,EAAE,kBAAkB,wBAAA,EAAE,eAAe,qBAAA;IAGjF,IAAM,YAAY,GAAG,eAAe,EAAE,CAAC;IAEvC,IAAM,OAAO,GAAG,WAAW,CACzB,UAAC,KAAuB;QACtB,KAAK,CAAC,cAAc,EAAE,CAAC;QACvB,cAAc,EAAE,CAAC;IACnB,CAAC,EACD,CAAC,cAAc,CAAC,CACjB,CAAC;IAEF,OAAO,CACL,yCACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,MAAM,CAAC,OAAO,mBACX,QAAQ,gBACV,WAAW,CAAC,YAAY,CAAC,IAAI,EAAE,kBAAkB,aAAlB,kBAAkB,cAAlB,kBAAkB,GAAI,CAAC,EAAE,eAAe,aAAf,eAAe,cAAf,eAAe,GAAI,CAAC,CAAC,EACzF,OAAO,EAAE,OAAO,IACZ,YAAY;QAEhB,oBAAC,cAAc,IAAC,IAAI,EAAE,IAAI,GAAI,CACvB,CACV,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useCallback } from 'react';\nimport styles from './styles.css.js';\nimport { AnnotationIcon } from './annotation-icon';\nimport useFocusVisible from '../../internal/hooks/focus-visible/index.js';\nimport { AnnotationContextProps } from '../interfaces';\n\nexport interface AnnotationTriggerProps {\n open: boolean;\n\n onClick: () => void;\n\n i18nStrings: AnnotationContextProps['i18nStrings'];\n taskLocalStepIndex: number;\n totalLocalSteps: number;\n}\n\nexport default React.forwardRef<HTMLButtonElement, AnnotationTriggerProps>(function AnnotationTrigger(\n { open, onClick: onClickHandler, i18nStrings, taskLocalStepIndex, totalLocalSteps }: AnnotationTriggerProps,\n ref\n) {\n const focusVisible = useFocusVisible();\n\n const onClick = useCallback(\n (event: React.MouseEvent) => {\n event.preventDefault();\n onClickHandler();\n },\n [onClickHandler]\n );\n\n return (\n <button\n ref={ref}\n className={styles.hotspot}\n aria-haspopup=\"dialog\"\n aria-label={i18nStrings.labelHotspot(open, taskLocalStepIndex ?? 0, totalLocalSteps ?? 0)}\n onClick={onClick}\n {...focusVisible}\n >\n <AnnotationIcon open={open} />\n </button>\n );\n});\n"]}
|
|
@@ -4,6 +4,8 @@ export interface AnnotationProps {
|
|
|
4
4
|
onOpen: (stepId: number) => void;
|
|
5
5
|
i18nStrings: AnnotationContextProps['i18nStrings'];
|
|
6
6
|
focusOnRender: boolean;
|
|
7
|
+
totalLocalSteps: number;
|
|
8
|
+
taskLocalStepIndex: number;
|
|
7
9
|
}
|
|
8
|
-
export declare function ClosedAnnotation({ globalStepIndex, onOpen, i18nStrings, focusOnRender }: AnnotationProps): JSX.Element;
|
|
10
|
+
export declare function ClosedAnnotation({ globalStepIndex, onOpen, i18nStrings, focusOnRender, totalLocalSteps, taskLocalStepIndex, }: AnnotationProps): JSX.Element;
|
|
9
11
|
//# sourceMappingURL=closed-annotation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"closed-annotation.d.ts","sourceRoot":"","sources":["../../../../src/annotation-context/annotation/closed-annotation.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAGvD,MAAM,WAAW,eAAe;IAC9B,eAAe,EAAE,MAAM,CAAC;IAExB,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAEjC,WAAW,EAAE,sBAAsB,CAAC,aAAa,CAAC,CAAC;IAEnD,aAAa,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"closed-annotation.d.ts","sourceRoot":"","sources":["../../../../src/annotation-context/annotation/closed-annotation.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAGvD,MAAM,WAAW,eAAe;IAC9B,eAAe,EAAE,MAAM,CAAC;IAExB,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAEjC,WAAW,EAAE,sBAAsB,CAAC,aAAa,CAAC,CAAC;IAEnD,aAAa,EAAE,OAAO,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,eAAe,EACf,MAAM,EACN,WAAW,EACX,aAAa,EACb,eAAe,EACf,kBAAkB,GACnB,EAAE,eAAe,eAsBjB"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import React, { useCallback, useEffect, useState } from 'react';
|
|
4
4
|
import AnnotationTrigger from './annotation-trigger';
|
|
5
5
|
export function ClosedAnnotation(_a) {
|
|
6
|
-
var globalStepIndex = _a.globalStepIndex, onOpen = _a.onOpen, i18nStrings = _a.i18nStrings, focusOnRender = _a.focusOnRender;
|
|
6
|
+
var globalStepIndex = _a.globalStepIndex, onOpen = _a.onOpen, i18nStrings = _a.i18nStrings, focusOnRender = _a.focusOnRender, totalLocalSteps = _a.totalLocalSteps, taskLocalStepIndex = _a.taskLocalStepIndex;
|
|
7
7
|
var _b = useState(null), hotspotRef = _b[0], setHotspotRef = _b[1];
|
|
8
8
|
var onClick = useCallback(function () {
|
|
9
9
|
onOpen(globalStepIndex);
|
|
@@ -13,6 +13,6 @@ export function ClosedAnnotation(_a) {
|
|
|
13
13
|
hotspotRef.focus();
|
|
14
14
|
}
|
|
15
15
|
}, [focusOnRender, hotspotRef]);
|
|
16
|
-
return React.createElement(AnnotationTrigger, { open: false, onClick: onClick, i18nStrings: i18nStrings, ref: setHotspotRef });
|
|
16
|
+
return (React.createElement(AnnotationTrigger, { open: false, onClick: onClick, i18nStrings: i18nStrings, ref: setHotspotRef, totalLocalSteps: totalLocalSteps, taskLocalStepIndex: taskLocalStepIndex }));
|
|
17
17
|
}
|
|
18
18
|
//# sourceMappingURL=closed-annotation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"closed-annotation.js","sourceRoot":"","sources":["../../../../src/annotation-context/annotation/closed-annotation.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEhE,OAAO,iBAAiB,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"closed-annotation.js","sourceRoot":"","sources":["../../../../src/annotation-context/annotation/closed-annotation.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEhE,OAAO,iBAAiB,MAAM,sBAAsB,CAAC;AAcrD,MAAM,UAAU,gBAAgB,CAAC,EAOf;QANhB,eAAe,qBAAA,EACf,MAAM,YAAA,EACN,WAAW,iBAAA,EACX,aAAa,mBAAA,EACb,eAAe,qBAAA,EACf,kBAAkB,wBAAA;IAEZ,IAAA,KAA8B,QAAQ,CAA2B,IAAI,CAAC,EAArE,UAAU,QAAA,EAAE,aAAa,QAA4C,CAAC;IAC7E,IAAM,OAAO,GAAG,WAAW,CAAC;QAC1B,MAAM,CAAC,eAAe,CAAC,CAAC;IAC1B,CAAC,EAAE,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC,CAAC;IAE9B,SAAS,CAAC;QACR,IAAI,aAAa,IAAI,UAAU,EAAE;YAC/B,UAAU,CAAC,KAAK,EAAE,CAAC;SACpB;IACH,CAAC,EAAE,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC,CAAC;IAEhC,OAAO,CACL,oBAAC,iBAAiB,IAChB,IAAI,EAAE,KAAK,EACX,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,WAAW,EACxB,GAAG,EAAE,aAAa,EAClB,eAAe,EAAE,eAAe,EAChC,kBAAkB,EAAE,kBAAkB,GACtC,CACH,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useCallback, useEffect, useState } from 'react';\nimport { AnnotationContextProps } from '../interfaces';\nimport AnnotationTrigger from './annotation-trigger';\n\nexport interface AnnotationProps {\n globalStepIndex: number;\n\n onOpen: (stepId: number) => void;\n\n i18nStrings: AnnotationContextProps['i18nStrings'];\n\n focusOnRender: boolean;\n totalLocalSteps: number;\n taskLocalStepIndex: number;\n}\n\nexport function ClosedAnnotation({\n globalStepIndex,\n onOpen,\n i18nStrings,\n focusOnRender,\n totalLocalSteps,\n taskLocalStepIndex,\n}: AnnotationProps) {\n const [hotspotRef, setHotspotRef] = useState<HTMLButtonElement | null>(null);\n const onClick = useCallback(() => {\n onOpen(globalStepIndex);\n }, [globalStepIndex, onOpen]);\n\n useEffect(() => {\n if (focusOnRender && hotspotRef) {\n hotspotRef.focus();\n }\n }, [focusOnRender, hotspotRef]);\n\n return (\n <AnnotationTrigger\n open={false}\n onClick={onClick}\n i18nStrings={i18nStrings}\n ref={setHotspotRef}\n totalLocalSteps={totalLocalSteps}\n taskLocalStepIndex={taskLocalStepIndex}\n />\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"open-annotation.d.ts","sourceRoot":"","sources":["../../../../src/annotation-context/annotation/open-annotation.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAiB,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAIvD,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAExB,SAAS,EAAE,YAAY,CAAC,WAAW,CAAC,CAAC;IAErC,iBAAiB,EAAE,OAAO,CAAC;IAC3B,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAE9B,QAAQ,EAAE,MAAM,IAAI,CAAC;IAErB,qBAAqB,EAAE,OAAO,CAAC;IAC/B,qBAAqB,EAAE,MAAM,IAAI,CAAC;IAElC,kBAAkB,EAAE,OAAO,CAAC;IAC5B,gBAAgB,EAAE,OAAO,CAAC;IAE1B,kBAAkB,EAAE,MAAM,CAAC;IAE3B,eAAe,EAAE,MAAM,CAAC;IAExB,SAAS,EAAE,MAAM,IAAI,CAAC;IAEtB,WAAW,EAAE,sBAAsB,CAAC,aAAa,CAAC,CAAC;CACpD;AAED,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,OAAO,EACP,KAAK,EAEL,SAAS,EAET,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAElB,eAAe,EAEf,SAAS,EAET,iBAAiB,EACjB,iBAAiB,EAEjB,QAAQ,EAER,qBAAqB,EACrB,qBAAqB,EACrB,WAAW,GACZ,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"open-annotation.d.ts","sourceRoot":"","sources":["../../../../src/annotation-context/annotation/open-annotation.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAiB,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAIvD,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAExB,SAAS,EAAE,YAAY,CAAC,WAAW,CAAC,CAAC;IAErC,iBAAiB,EAAE,OAAO,CAAC;IAC3B,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAE9B,QAAQ,EAAE,MAAM,IAAI,CAAC;IAErB,qBAAqB,EAAE,OAAO,CAAC;IAC/B,qBAAqB,EAAE,MAAM,IAAI,CAAC;IAElC,kBAAkB,EAAE,OAAO,CAAC;IAC5B,gBAAgB,EAAE,OAAO,CAAC;IAE1B,kBAAkB,EAAE,MAAM,CAAC;IAE3B,eAAe,EAAE,MAAM,CAAC;IAExB,SAAS,EAAE,MAAM,IAAI,CAAC;IAEtB,WAAW,EAAE,sBAAsB,CAAC,aAAa,CAAC,CAAC;CACpD;AAED,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,OAAO,EACP,KAAK,EAEL,SAAS,EAET,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAElB,eAAe,EAEf,SAAS,EAET,iBAAiB,EACjB,iBAAiB,EAEjB,QAAQ,EAER,qBAAqB,EACrB,qBAAqB,EACrB,WAAW,GACZ,EAAE,eAAe,eAkCjB"}
|
|
@@ -7,7 +7,7 @@ export function OpenAnnotation(_a) {
|
|
|
7
7
|
var title = _a.title, content = _a.content, alert = _a.alert, direction = _a.direction, showPreviousButton = _a.showPreviousButton, showFinishButton = _a.showFinishButton, taskLocalStepIndex = _a.taskLocalStepIndex, totalLocalSteps = _a.totalLocalSteps, onDismiss = _a.onDismiss, nextButtonEnabled = _a.nextButtonEnabled, onNextButtonClick = _a.onNextButtonClick, onFinish = _a.onFinish, previousButtonEnabled = _a.previousButtonEnabled, onPreviousButtonClick = _a.onPreviousButtonClick, i18nStrings = _a.i18nStrings;
|
|
8
8
|
var trackRef = useRef(null);
|
|
9
9
|
return (React.createElement(React.Fragment, null,
|
|
10
|
-
React.createElement(AnnotationTrigger, { open: true, onClick: onDismiss, i18nStrings: i18nStrings, ref: trackRef }),
|
|
10
|
+
React.createElement(AnnotationTrigger, { open: true, onClick: onDismiss, i18nStrings: i18nStrings, ref: trackRef, totalLocalSteps: totalLocalSteps, taskLocalStepIndex: taskLocalStepIndex }),
|
|
11
11
|
React.createElement(AnnotationPopover, { trackRef: trackRef, previousButtonEnabled: previousButtonEnabled, showPreviousButton: showPreviousButton, showFinishButton: showFinishButton, totalLocalSteps: totalLocalSteps, i18nStrings: i18nStrings, nextButtonEnabled: nextButtonEnabled, onDismiss: onDismiss, onFinish: onFinish, onNextButtonClick: onNextButtonClick, onPreviousButtonClick: onPreviousButtonClick, taskLocalStepIndex: taskLocalStepIndex, direction: direction, title: title, content: content, alert: alert })));
|
|
12
12
|
}
|
|
13
13
|
//# sourceMappingURL=open-annotation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"open-annotation.js","sourceRoot":"","sources":["../../../../src/annotation-context/annotation/open-annotation.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAGtC,OAAO,iBAAiB,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AA6BzD,MAAM,UAAU,cAAc,CAAC,EAuBb;QAtBhB,KAAK,WAAA,EACL,OAAO,aAAA,EACP,KAAK,WAAA,EAEL,SAAS,eAAA,EAET,kBAAkB,wBAAA,EAClB,gBAAgB,sBAAA,EAChB,kBAAkB,wBAAA,EAElB,eAAe,qBAAA,EAEf,SAAS,eAAA,EAET,iBAAiB,uBAAA,EACjB,iBAAiB,uBAAA,EAEjB,QAAQ,cAAA,EAER,qBAAqB,2BAAA,EACrB,qBAAqB,2BAAA,EACrB,WAAW,iBAAA;IAEX,IAAM,QAAQ,GAAG,MAAM,CAAoB,IAAI,CAAC,CAAC;IAEjD,OAAO,CACL;QACE,oBAAC,iBAAiB,
|
|
1
|
+
{"version":3,"file":"open-annotation.js","sourceRoot":"","sources":["../../../../src/annotation-context/annotation/open-annotation.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAGtC,OAAO,iBAAiB,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AA6BzD,MAAM,UAAU,cAAc,CAAC,EAuBb;QAtBhB,KAAK,WAAA,EACL,OAAO,aAAA,EACP,KAAK,WAAA,EAEL,SAAS,eAAA,EAET,kBAAkB,wBAAA,EAClB,gBAAgB,sBAAA,EAChB,kBAAkB,wBAAA,EAElB,eAAe,qBAAA,EAEf,SAAS,eAAA,EAET,iBAAiB,uBAAA,EACjB,iBAAiB,uBAAA,EAEjB,QAAQ,cAAA,EAER,qBAAqB,2BAAA,EACrB,qBAAqB,2BAAA,EACrB,WAAW,iBAAA;IAEX,IAAM,QAAQ,GAAG,MAAM,CAAoB,IAAI,CAAC,CAAC;IAEjD,OAAO,CACL;QACE,oBAAC,iBAAiB,IAChB,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,SAAS,EAClB,WAAW,EAAE,WAAW,EACxB,GAAG,EAAE,QAAQ,EACb,eAAe,EAAE,eAAe,EAChC,kBAAkB,EAAE,kBAAkB,GACtC;QAEF,oBAAC,iBAAiB,IAChB,QAAQ,EAAE,QAAQ,EAClB,qBAAqB,EAAE,qBAAqB,EAC5C,kBAAkB,EAAE,kBAAkB,EACtC,gBAAgB,EAAE,gBAAgB,EAClC,eAAe,EAAE,eAAe,EAChC,WAAW,EAAE,WAAW,EACxB,iBAAiB,EAAE,iBAAiB,EACpC,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ,EAClB,iBAAiB,EAAE,iBAAiB,EACpC,qBAAqB,EAAE,qBAAqB,EAC5C,kBAAkB,EAAE,kBAAkB,EACtC,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,GACZ,CACD,CACJ,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useRef } from 'react';\nimport { HotspotProps } from '../../hotspot/interfaces';\nimport { AnnotationContextProps } from '../interfaces';\nimport AnnotationTrigger from './annotation-trigger';\nimport { AnnotationPopover } from './annotation-popover';\n\nexport interface AnnotationProps {\n title: string;\n content: React.ReactNode;\n alert?: React.ReactNode;\n\n direction: HotspotProps['direction'];\n\n nextButtonEnabled: boolean;\n onNextButtonClick: () => void;\n\n onFinish: () => void;\n\n previousButtonEnabled: boolean;\n onPreviousButtonClick: () => void;\n\n showPreviousButton: boolean;\n showFinishButton: boolean;\n\n taskLocalStepIndex: number;\n\n totalLocalSteps: number;\n\n onDismiss: () => void;\n\n i18nStrings: AnnotationContextProps['i18nStrings'];\n}\n\nexport function OpenAnnotation({\n title,\n content,\n alert,\n\n direction,\n\n showPreviousButton,\n showFinishButton,\n taskLocalStepIndex,\n\n totalLocalSteps,\n\n onDismiss,\n\n nextButtonEnabled,\n onNextButtonClick,\n\n onFinish,\n\n previousButtonEnabled,\n onPreviousButtonClick,\n i18nStrings,\n}: AnnotationProps) {\n const trackRef = useRef<HTMLButtonElement>(null);\n\n return (\n <>\n <AnnotationTrigger\n open={true}\n onClick={onDismiss}\n i18nStrings={i18nStrings}\n ref={trackRef}\n totalLocalSteps={totalLocalSteps}\n taskLocalStepIndex={taskLocalStepIndex}\n />\n\n <AnnotationPopover\n trackRef={trackRef}\n previousButtonEnabled={previousButtonEnabled}\n showPreviousButton={showPreviousButton}\n showFinishButton={showFinishButton}\n totalLocalSteps={totalLocalSteps}\n i18nStrings={i18nStrings}\n nextButtonEnabled={nextButtonEnabled}\n onDismiss={onDismiss}\n onFinish={onFinish}\n onNextButtonClick={onNextButtonClick}\n onPreviousButtonClick={onPreviousButtonClick}\n taskLocalStepIndex={taskLocalStepIndex}\n direction={direction}\n title={title}\n content={content}\n alert={alert}\n />\n </>\n );\n}\n"]}
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"arrow": "
|
|
5
|
-
"arrow-outer": "awsui_arrow-
|
|
6
|
-
"arrow-inner": "awsui_arrow-
|
|
7
|
-
"arrow-position-right-top": "awsui_arrow-position-right-
|
|
8
|
-
"arrow-position-right-bottom": "awsui_arrow-position-right-
|
|
9
|
-
"arrow-position-left-top": "awsui_arrow-position-left-
|
|
10
|
-
"arrow-position-left-bottom": "awsui_arrow-position-left-
|
|
11
|
-
"arrow-position-top-center": "awsui_arrow-position-top-
|
|
12
|
-
"arrow-position-top-responsive": "awsui_arrow-position-top-
|
|
13
|
-
"arrow-position-bottom-center": "awsui_arrow-position-bottom-
|
|
14
|
-
"arrow-position-bottom-responsive": "awsui_arrow-position-bottom-
|
|
15
|
-
"annotation": "
|
|
16
|
-
"next-button": "awsui_next-
|
|
17
|
-
"previous-button": "awsui_previous-
|
|
18
|
-
"finish-button": "awsui_finish-
|
|
19
|
-
"header": "
|
|
20
|
-
"step-counter-content": "awsui_step-counter-
|
|
21
|
-
"content": "
|
|
22
|
-
"description": "
|
|
23
|
-
"actionBar": "
|
|
24
|
-
"stepCounter": "
|
|
25
|
-
"divider": "
|
|
26
|
-
"hotspot": "
|
|
27
|
-
"icon": "
|
|
4
|
+
"arrow": "awsui_arrow_1hpp3_1s9s9_93",
|
|
5
|
+
"arrow-outer": "awsui_arrow-outer_1hpp3_1s9s9_97",
|
|
6
|
+
"arrow-inner": "awsui_arrow-inner_1hpp3_1s9s9_97",
|
|
7
|
+
"arrow-position-right-top": "awsui_arrow-position-right-top_1hpp3_1s9s9_128",
|
|
8
|
+
"arrow-position-right-bottom": "awsui_arrow-position-right-bottom_1hpp3_1s9s9_128",
|
|
9
|
+
"arrow-position-left-top": "awsui_arrow-position-left-top_1hpp3_1s9s9_131",
|
|
10
|
+
"arrow-position-left-bottom": "awsui_arrow-position-left-bottom_1hpp3_1s9s9_131",
|
|
11
|
+
"arrow-position-top-center": "awsui_arrow-position-top-center_1hpp3_1s9s9_134",
|
|
12
|
+
"arrow-position-top-responsive": "awsui_arrow-position-top-responsive_1hpp3_1s9s9_134",
|
|
13
|
+
"arrow-position-bottom-center": "awsui_arrow-position-bottom-center_1hpp3_1s9s9_137",
|
|
14
|
+
"arrow-position-bottom-responsive": "awsui_arrow-position-bottom-responsive_1hpp3_1s9s9_137",
|
|
15
|
+
"annotation": "awsui_annotation_1hpp3_1s9s9_145",
|
|
16
|
+
"next-button": "awsui_next-button_1hpp3_1s9s9_146",
|
|
17
|
+
"previous-button": "awsui_previous-button_1hpp3_1s9s9_147",
|
|
18
|
+
"finish-button": "awsui_finish-button_1hpp3_1s9s9_148",
|
|
19
|
+
"header": "awsui_header_1hpp3_1s9s9_149",
|
|
20
|
+
"step-counter-content": "awsui_step-counter-content_1hpp3_1s9s9_150",
|
|
21
|
+
"content": "awsui_content_1hpp3_1s9s9_151",
|
|
22
|
+
"description": "awsui_description_1hpp3_1s9s9_155",
|
|
23
|
+
"actionBar": "awsui_actionBar_1hpp3_1s9s9_160",
|
|
24
|
+
"stepCounter": "awsui_stepCounter_1hpp3_1s9s9_167",
|
|
25
|
+
"divider": "awsui_divider_1hpp3_1s9s9_171",
|
|
26
|
+
"hotspot": "awsui_hotspot_1hpp3_1s9s9_175",
|
|
27
|
+
"icon": "awsui_icon_1hpp3_1s9s9_213"
|
|
28
28
|
};
|
|
29
29
|
|