@cloudscape-design/components 3.0.161 → 3.0.163
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/app-layout/visual-refresh/styles.css.js +60 -60
- package/app-layout/visual-refresh/styles.scoped.css +147 -147
- package/app-layout/visual-refresh/styles.selectors.js +60 -60
- package/button/internal.d.ts +1 -0
- package/button/internal.d.ts.map +1 -1
- package/button/internal.js +2 -2
- package/button/internal.js.map +1 -1
- package/code-editor/index.d.ts.map +1 -1
- package/code-editor/index.js +5 -8
- package/code-editor/index.js.map +1 -1
- package/code-editor/pane.d.ts.map +1 -1
- package/code-editor/pane.js +4 -4
- package/code-editor/pane.js.map +1 -1
- package/code-editor/resizable-box/index.d.ts +9 -0
- package/code-editor/resizable-box/index.d.ts.map +1 -0
- package/code-editor/resizable-box/index.js +44 -0
- package/code-editor/resizable-box/index.js.map +1 -0
- package/code-editor/resizable-box/styles.css.js +8 -0
- package/code-editor/resizable-box/styles.scoped.css +50 -0
- package/code-editor/resizable-box/styles.selectors.js +9 -0
- package/code-editor/styles.css.js +32 -33
- package/code-editor/styles.scoped.css +109 -139
- package/code-editor/styles.selectors.js +32 -33
- package/flashbar/styles.css.js +33 -33
- package/flashbar/styles.scoped.css +115 -115
- package/flashbar/styles.selectors.js +33 -33
- package/form-field/interfaces.d.ts +10 -0
- package/form-field/interfaces.d.ts.map +1 -1
- package/form-field/interfaces.js.map +1 -1
- package/form-field/internal.d.ts +1 -1
- package/form-field/internal.d.ts.map +1 -1
- package/form-field/internal.js +5 -4
- package/form-field/internal.js.map +1 -1
- package/input/internal.d.ts.map +1 -1
- package/input/internal.js +16 -4
- package/input/internal.js.map +1 -1
- package/internal/components/live-region/index.d.ts +1 -1
- package/internal/components/live-region/index.d.ts.map +1 -1
- package/internal/components/live-region/index.js +29 -6
- package/internal/components/live-region/index.js.map +1 -1
- package/internal/context/form-field-context.d.ts +6 -2
- package/internal/context/form-field-context.d.ts.map +1 -1
- package/internal/context/form-field-context.js +7 -1
- package/internal/context/form-field-context.js.map +1 -1
- package/internal/environment.js +1 -1
- package/internal/hooks/use-telemetry/index.d.ts.map +1 -1
- package/internal/hooks/use-telemetry/index.js +4 -0
- package/internal/hooks/use-telemetry/index.js.map +1 -1
- package/internal/manifest.json +1 -1
- package/internal/metrics.d.ts +2 -2
- package/internal/metrics.d.ts.map +1 -1
- package/internal/metrics.js +20 -17
- package/internal/metrics.js.map +1 -1
- package/internal/types.d.ts +9 -0
- package/internal/types.d.ts.map +1 -1
- package/internal/types.js +0 -2
- package/internal/types.js.map +1 -1
- package/internal/vendor/d3-scale.js +8 -8
- package/mixed-line-bar-chart/styles.css.js +19 -19
- package/mixed-line-bar-chart/styles.scoped.css +26 -26
- package/mixed-line-bar-chart/styles.selectors.js +19 -19
- package/package.json +30 -34
- package/progress-bar/index.d.ts.map +1 -1
- package/progress-bar/index.js +14 -3
- package/progress-bar/index.js.map +1 -1
- package/select/parts/styles.css.js +9 -9
- package/select/parts/styles.scoped.css +27 -9
- package/select/parts/styles.selectors.js +9 -9
- package/side-navigation/internal.d.ts.map +1 -1
- package/side-navigation/internal.js +2 -2
- package/side-navigation/internal.js.map +1 -1
- package/table/body-cell/click-away.d.ts +9 -0
- package/table/body-cell/click-away.d.ts.map +1 -0
- package/table/body-cell/click-away.js +38 -0
- package/table/body-cell/click-away.js.map +1 -0
- package/table/body-cell/index.d.ts +10 -19
- package/table/body-cell/index.d.ts.map +1 -1
- package/table/body-cell/index.js +49 -9
- package/table/body-cell/index.js.map +1 -1
- package/table/body-cell/inline-editor.d.ts +12 -0
- package/table/body-cell/inline-editor.d.ts.map +1 -0
- package/table/body-cell/inline-editor.js +88 -0
- package/table/body-cell/inline-editor.js.map +1 -0
- package/table/body-cell/styles.css.js +18 -12
- package/table/body-cell/styles.scoped.css +229 -46
- package/table/body-cell/styles.selectors.js +18 -12
- package/table/body-cell/td-element.d.ts +21 -0
- package/table/body-cell/td-element.d.ts.map +1 -0
- package/table/body-cell/td-element.js +11 -0
- package/table/body-cell/td-element.js.map +1 -0
- package/table/body-cell/use-stable-scroll-position.d.ts +17 -0
- package/table/body-cell/use-stable-scroll-position.d.ts.map +1 -0
- package/table/body-cell/use-stable-scroll-position.js +48 -0
- package/table/body-cell/use-stable-scroll-position.js.map +1 -0
- package/table/header-cell/index.d.ts +8 -7
- package/table/header-cell/index.d.ts.map +1 -1
- package/table/header-cell/index.js +6 -2
- package/table/header-cell/index.js.map +1 -1
- package/table/header-cell/styles.css.js +19 -18
- package/table/header-cell/styles.scoped.css +40 -35
- package/table/header-cell/styles.selectors.js +19 -18
- package/table/interfaces.d.ts +73 -6
- package/table/interfaces.d.ts.map +1 -1
- package/table/interfaces.js.map +1 -1
- package/table/internal.d.ts.map +1 -1
- package/table/internal.js +68 -18
- package/table/internal.js.map +1 -1
- package/table/thead.d.ts.map +1 -1
- package/table/thead.js +1 -1
- package/table/thead.js.map +1 -1
- package/table/use-table-focus-navigation.d.ts +16 -0
- package/table/use-table-focus-navigation.d.ts.map +1 -0
- package/table/use-table-focus-navigation.js +131 -0
- package/table/use-table-focus-navigation.js.map +1 -0
- package/tabs/index.d.ts +1 -1
- package/tabs/index.d.ts.map +1 -1
- package/tabs/index.js +2 -2
- package/tabs/index.js.map +1 -1
- package/tabs/interfaces.d.ts +14 -0
- package/tabs/interfaces.d.ts.map +1 -1
- package/tabs/interfaces.js.map +1 -1
- package/tabs/tab-header-bar.d.ts +2 -1
- package/tabs/tab-header-bar.d.ts.map +1 -1
- package/tabs/tab-header-bar.js +3 -7
- package/tabs/tab-header-bar.js.map +1 -1
- package/test-utils/dom/table/index.d.ts +4 -0
- package/test-utils/dom/table/index.js +21 -5
- package/test-utils/dom/table/index.js.map +1 -1
- package/test-utils/selectors/table/index.d.ts +4 -0
- package/test-utils/selectors/table/index.js +21 -5
- package/test-utils/selectors/table/index.js.map +1 -1
- package/test-utils/tsconfig.tsbuildinfo +1 -1
- package/wizard/internal/analytics.js +3 -3
- package/wizard/internal/analytics.js.map +1 -1
- package/code-editor/resize-handler.d.ts +0 -3
- package/code-editor/resize-handler.d.ts.map +0 -1
- package/code-editor/resize-handler.js +0 -7
- package/code-editor/resize-handler.js.map +0 -1
- package/internal/components/dynamic-aria-live/index.d.ts +0 -28
- package/internal/components/dynamic-aria-live/index.d.ts.map +0 -1
- package/internal/components/dynamic-aria-live/index.js +0 -38
- package/internal/components/dynamic-aria-live/index.js.map +0 -1
- package/internal/components/live-region/aria-liva-tag.d.ts +0 -13
- package/internal/components/live-region/aria-liva-tag.d.ts.map +0 -1
- package/internal/components/live-region/aria-liva-tag.js +0 -18
- package/internal/components/live-region/aria-liva-tag.js.map +0 -1
- package/internal/components/live-region/utils.d.ts +0 -8
- package/internal/components/live-region/utils.d.ts.map +0 -1
- package/internal/components/live-region/utils.js +0 -24
- package/internal/components/live-region/utils.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inline-editor.js","sourceRoot":"","sources":["../../../../src/table/body-cell/inline-editor.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, useState } from 'react';\nimport Button from '../../button/internal';\nimport FormField from '../../form-field/internal';\nimport SpaceBetween from '../../space-between/internal';\nimport { useClickAway } from './click-away';\nimport { TableProps } from '../interfaces';\nimport styles from './styles.css.js';\nimport { Optional } from '../../internal/types';\n\n// A function that does nothing\nconst noop = () => undefined;\n\ninterface InlineEditorProps<ItemType> {\n ariaLabels: TableProps['ariaLabels'];\n column: TableProps.ColumnDefinition<ItemType>;\n item: ItemType;\n onEditEnd: () => void;\n submitEdit: TableProps.SubmitEditFunction<ItemType>;\n __onRender?: () => void;\n}\n\nexport function InlineEditor<ItemType>({\n ariaLabels,\n item,\n column,\n onEditEnd,\n submitEdit,\n __onRender,\n}: InlineEditorProps<ItemType>) {\n const [currentEditLoading, setCurrentEditLoading] = useState(false);\n const [currentEditValue, setCurrentEditValue] = useState<Optional<any>>();\n\n const cellContext = {\n isEditing: true,\n currentValue: currentEditValue,\n setValue: setCurrentEditValue,\n };\n\n function finishEdit(cancel = false) {\n if (!cancel) {\n setCurrentEditValue(undefined);\n }\n onEditEnd();\n }\n\n async function onSubmitClick(evt: React.FormEvent) {\n evt.preventDefault();\n if (currentEditValue === undefined) {\n finishEdit();\n return;\n }\n\n setCurrentEditLoading(true);\n try {\n await submitEdit(item, column, currentEditValue);\n setCurrentEditLoading(false);\n finishEdit();\n } catch (e) {\n setCurrentEditLoading(false);\n }\n }\n\n function onCancel() {\n if (currentEditLoading) {\n return;\n }\n finishEdit(true);\n }\n\n function handleEscape(event: React.KeyboardEvent): void {\n if (event.key === 'Escape') {\n onCancel();\n }\n }\n\n const clickAwayRef = useClickAway(onCancel);\n\n useEffect(() => {\n if (__onRender) {\n const timer = setTimeout(__onRender, 1);\n return () => clearTimeout(timer);\n }\n }, [__onRender]);\n\n // asserting non-undefined editConfig here because this component is unreachable otherwise\n const { ariaLabel = undefined, validation = noop, errorIconAriaLabel } = column.editConfig!;\n\n return (\n <form\n ref={clickAwayRef}\n onSubmit={onSubmitClick}\n onKeyDown={handleEscape}\n className={styles['body-cell-editor-form']}\n >\n <FormField\n stretch={true}\n label={ariaLabel}\n __hideLabel={true}\n __disableGutters={true}\n __useReactAutofocus={true}\n i18nStrings={{ errorIconAriaLabel }}\n errorText={validation(item, currentEditValue)}\n >\n <div className={styles['body-cell-editor-row']}>\n {column.cell(item, cellContext)}\n <span className={styles['body-cell-editor-controls']}>\n <SpaceBetween direction=\"horizontal\" size=\"xxs\">\n {!currentEditLoading ? (\n <Button\n ariaLabel={ariaLabels?.cancelEditLabel?.(column)}\n formAction=\"none\"\n iconName=\"close\"\n variant=\"inline-icon\"\n onClick={onCancel}\n />\n ) : null}\n <Button\n ariaLabel={ariaLabels?.submitEditLabel?.(column)}\n formAction=\"submit\"\n iconName=\"check\"\n variant=\"inline-icon\"\n loading={currentEditLoading}\n />\n </SpaceBetween>\n </span>\n </div>\n </FormField>\n </form>\n );\n}\n"]}
|
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"body-cell": "awsui_body-
|
|
5
|
-
"body-cell-wrap": "awsui_body-cell-
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"body-cell-
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"body-cell-
|
|
12
|
-
"body-cell-
|
|
13
|
-
"
|
|
14
|
-
"has-
|
|
15
|
-
"
|
|
4
|
+
"body-cell": "awsui_body-cell_c6tup_17cg6_93",
|
|
5
|
+
"body-cell-wrap": "awsui_body-cell-wrap_c6tup_17cg6_102",
|
|
6
|
+
"is-visual-refresh": "awsui_is-visual-refresh_c6tup_17cg6_114",
|
|
7
|
+
"has-striped-rows": "awsui_has-striped-rows_c6tup_17cg6_126",
|
|
8
|
+
"body-cell-edit-active": "awsui_body-cell-edit-active_c6tup_17cg6_129",
|
|
9
|
+
"body-cell-editable": "awsui_body-cell-editable_c6tup_17cg6_129",
|
|
10
|
+
"has-selection": "awsui_has-selection_c6tup_17cg6_135",
|
|
11
|
+
"body-cell-first-row": "awsui_body-cell-first-row_c6tup_17cg6_141",
|
|
12
|
+
"body-cell-last-row": "awsui_body-cell-last-row_c6tup_17cg6_144",
|
|
13
|
+
"body-cell-selected": "awsui_body-cell-selected_c6tup_17cg6_144",
|
|
14
|
+
"has-footer": "awsui_has-footer_c6tup_17cg6_144",
|
|
15
|
+
"body-cell-shaded": "awsui_body-cell-shaded_c6tup_17cg6_154",
|
|
16
|
+
"body-cell-next-selected": "awsui_body-cell-next-selected_c6tup_17cg6_176",
|
|
17
|
+
"body-cell-prev-selected": "awsui_body-cell-prev-selected_c6tup_17cg6_180",
|
|
18
|
+
"body-cell-editor": "awsui_body-cell-editor_c6tup_17cg6_204",
|
|
19
|
+
"body-cell-editor-form": "awsui_body-cell-editor-form_c6tup_17cg6_214",
|
|
20
|
+
"body-cell-editor-row": "awsui_body-cell-editor-row_c6tup_17cg6_223",
|
|
21
|
+
"body-cell-editor-controls": "awsui_body-cell-editor-controls_c6tup_17cg6_233"
|
|
16
22
|
};
|
|
17
23
|
|
|
@@ -6,7 +6,91 @@
|
|
|
6
6
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
7
7
|
SPDX-License-Identifier: Apache-2.0
|
|
8
8
|
*/
|
|
9
|
-
|
|
9
|
+
/*
|
|
10
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
11
|
+
SPDX-License-Identifier: Apache-2.0
|
|
12
|
+
*/
|
|
13
|
+
/*
|
|
14
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
15
|
+
SPDX-License-Identifier: Apache-2.0
|
|
16
|
+
*/
|
|
17
|
+
/*
|
|
18
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
19
|
+
SPDX-License-Identifier: Apache-2.0
|
|
20
|
+
*/
|
|
21
|
+
/*
|
|
22
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
23
|
+
SPDX-License-Identifier: Apache-2.0
|
|
24
|
+
*/
|
|
25
|
+
/*
|
|
26
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
27
|
+
SPDX-License-Identifier: Apache-2.0
|
|
28
|
+
*/
|
|
29
|
+
/*
|
|
30
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
31
|
+
SPDX-License-Identifier: Apache-2.0
|
|
32
|
+
*/
|
|
33
|
+
/*
|
|
34
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
35
|
+
SPDX-License-Identifier: Apache-2.0
|
|
36
|
+
*/
|
|
37
|
+
/*
|
|
38
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
39
|
+
SPDX-License-Identifier: Apache-2.0
|
|
40
|
+
*/
|
|
41
|
+
/*
|
|
42
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
43
|
+
SPDX-License-Identifier: Apache-2.0
|
|
44
|
+
*/
|
|
45
|
+
/*
|
|
46
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
47
|
+
SPDX-License-Identifier: Apache-2.0
|
|
48
|
+
*/
|
|
49
|
+
/*
|
|
50
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
51
|
+
SPDX-License-Identifier: Apache-2.0
|
|
52
|
+
*/
|
|
53
|
+
/* stylelint-disable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
|
|
54
|
+
/* stylelint-enable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
|
|
55
|
+
/*
|
|
56
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
57
|
+
SPDX-License-Identifier: Apache-2.0
|
|
58
|
+
*/
|
|
59
|
+
/*
|
|
60
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
61
|
+
SPDX-License-Identifier: Apache-2.0
|
|
62
|
+
*/
|
|
63
|
+
/*
|
|
64
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
65
|
+
SPDX-License-Identifier: Apache-2.0
|
|
66
|
+
*/
|
|
67
|
+
/*
|
|
68
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
69
|
+
SPDX-License-Identifier: Apache-2.0
|
|
70
|
+
*/
|
|
71
|
+
/*
|
|
72
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
73
|
+
SPDX-License-Identifier: Apache-2.0
|
|
74
|
+
*/
|
|
75
|
+
/*
|
|
76
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
77
|
+
SPDX-License-Identifier: Apache-2.0
|
|
78
|
+
*/
|
|
79
|
+
/*
|
|
80
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
81
|
+
SPDX-License-Identifier: Apache-2.0
|
|
82
|
+
*/
|
|
83
|
+
/* Style used for links in slots/components that are text heavy, to help links stand out among
|
|
84
|
+
surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F73#description */
|
|
85
|
+
/*
|
|
86
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
87
|
+
SPDX-License-Identifier: Apache-2.0
|
|
88
|
+
*/
|
|
89
|
+
/*
|
|
90
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
91
|
+
SPDX-License-Identifier: Apache-2.0
|
|
92
|
+
*/
|
|
93
|
+
.awsui_body-cell_c6tup_17cg6_93:not(#\9) {
|
|
10
94
|
box-sizing: border-box;
|
|
11
95
|
padding: var(--space-scaled-xs-6859qs, 8px) var(--space-scaled-l-t03y3z, 20px) calc(
|
|
12
96
|
var(--space-scaled-xs-6859qs, 8px) + (var(--border-item-width-qbbbsa, 2px) - var(--border-divider-list-width-hacikr, 1px))
|
|
@@ -15,108 +99,207 @@
|
|
|
15
99
|
word-wrap: break-word;
|
|
16
100
|
border-bottom: var(--border-divider-list-width-hacikr, 1px) solid var(--color-border-divider-default-7s2wjw, #e9ebed);
|
|
17
101
|
}
|
|
18
|
-
.awsui_body-
|
|
102
|
+
.awsui_body-cell_c6tup_17cg6_93:not(#\9):not(.awsui_body-cell-wrap_c6tup_17cg6_102) {
|
|
19
103
|
white-space: nowrap;
|
|
20
104
|
overflow: hidden;
|
|
21
105
|
text-overflow: ellipsis;
|
|
22
106
|
}
|
|
23
|
-
.awsui_body-
|
|
107
|
+
.awsui_body-cell_c6tup_17cg6_93:not(#\9):first-child {
|
|
24
108
|
border-left: var(--border-item-width-qbbbsa, 2px) solid transparent;
|
|
25
109
|
}
|
|
26
|
-
.awsui_body-
|
|
110
|
+
.awsui_body-cell_c6tup_17cg6_93:not(#\9):last-child {
|
|
27
111
|
border-right: var(--border-item-width-qbbbsa, 2px) solid transparent;
|
|
28
112
|
padding-right: calc(var(--space-l-4vl6xu, 20px) - var(--border-item-width-qbbbsa, 2px));
|
|
29
113
|
}
|
|
30
|
-
.awsui_body-
|
|
114
|
+
.awsui_body-cell_c6tup_17cg6_93.awsui_is-visual-refresh_c6tup_17cg6_114:not(#\9):first-child {
|
|
115
|
+
/*
|
|
116
|
+
Striped rows requires additional left padding because the
|
|
117
|
+
shaded background makes the child content appear too close
|
|
118
|
+
to the table edge.
|
|
119
|
+
*/
|
|
120
|
+
/*
|
|
121
|
+
Remove the placeholder border if the row is not selectable.
|
|
122
|
+
Rows that are not selectable will reserve the horizontal space
|
|
123
|
+
that the placeholder border would consume.
|
|
124
|
+
*/
|
|
125
|
+
}
|
|
126
|
+
.awsui_body-cell_c6tup_17cg6_93.awsui_is-visual-refresh_c6tup_17cg6_114:not(#\9):first-child:not(.awsui_has-striped-rows_c6tup_17cg6_126) {
|
|
127
|
+
padding-left: var(--space-xxxs-k2w98v, 2px);
|
|
128
|
+
}
|
|
129
|
+
.awsui_body-cell_c6tup_17cg6_93.awsui_is-visual-refresh_c6tup_17cg6_114:not(#\9):first-child:not(.awsui_has-striped-rows_c6tup_17cg6_126):not(.awsui_body-cell-edit-active_c6tup_17cg6_129).awsui_body-cell-editable_c6tup_17cg6_129:hover {
|
|
130
|
+
padding-left: calc(var(--space-xxxs-k2w98v, 2px) + var(--border-divider-list-width-hacikr, 1px));
|
|
131
|
+
}
|
|
132
|
+
.awsui_body-cell_c6tup_17cg6_93.awsui_is-visual-refresh_c6tup_17cg6_114:not(#\9):first-child:first-child.awsui_has-striped-rows_c6tup_17cg6_126 {
|
|
133
|
+
padding-left: var(--space-xxs-ynfts5, 4px);
|
|
134
|
+
}
|
|
135
|
+
.awsui_body-cell_c6tup_17cg6_93.awsui_is-visual-refresh_c6tup_17cg6_114:not(#\9):first-child:not(.awsui_has-selection_c6tup_17cg6_135):not(.awsui_body-cell-editable_c6tup_17cg6_129) {
|
|
136
|
+
border-left: none;
|
|
137
|
+
}
|
|
138
|
+
.awsui_body-cell_c6tup_17cg6_93:not(#\9):first-child:not(.awsui_is-visual-refresh_c6tup_17cg6_114) {
|
|
139
|
+
padding-left: calc(var(--space-l-4vl6xu, 20px) - var(--border-item-width-qbbbsa, 2px));
|
|
140
|
+
}
|
|
141
|
+
.awsui_body-cell-first-row_c6tup_17cg6_141:not(#\9) {
|
|
31
142
|
border-top: var(--border-item-width-qbbbsa, 2px) solid transparent;
|
|
32
143
|
}
|
|
33
|
-
.awsui_body-cell-last-
|
|
144
|
+
.awsui_body-cell-last-row_c6tup_17cg6_144:not(#\9):not(.awsui_body-cell-selected_c6tup_17cg6_144):not(.awsui_has-footer_c6tup_17cg6_144) {
|
|
34
145
|
border-bottom: var(--border-item-width-qbbbsa, 2px) solid transparent;
|
|
35
146
|
}
|
|
36
|
-
.awsui_body-cell-last-
|
|
147
|
+
.awsui_body-cell-last-row_c6tup_17cg6_144:not(#\9):not(.awsui_body-cell-selected_c6tup_17cg6_144).awsui_has-footer_c6tup_17cg6_144 {
|
|
37
148
|
/*
|
|
38
|
-
Add a bottom border to the body cells of the last row as a separator between the
|
|
149
|
+
Add a bottom border to the body cells of the last row as a separator between the
|
|
39
150
|
table and the footer
|
|
40
151
|
*/
|
|
41
152
|
border-bottom: var(--border-divider-section-width-4wm2it, 2px) solid var(--color-border-divider-default-7s2wjw, #e9ebed);
|
|
42
153
|
}
|
|
43
|
-
.awsui_body-cell-
|
|
154
|
+
.awsui_body-cell-shaded_c6tup_17cg6_154:not(#\9) {
|
|
44
155
|
background: var(--color-background-cell-shaded-26ubfj, #f8f8f8);
|
|
45
156
|
}
|
|
46
|
-
.awsui_body-cell-
|
|
157
|
+
.awsui_body-cell-selected_c6tup_17cg6_144:not(#\9) {
|
|
47
158
|
background-color: var(--color-background-item-selected-ebt4bi, #f2f8fd);
|
|
48
159
|
border-top: var(--border-item-width-qbbbsa, 2px) solid var(--color-border-item-selected-ppkssz, #0972d3);
|
|
49
160
|
border-bottom: var(--border-item-width-qbbbsa, 2px) solid var(--color-border-item-selected-ppkssz, #0972d3);
|
|
50
161
|
padding-bottom: var(--space-scaled-xs-6859qs, 8px);
|
|
51
162
|
}
|
|
52
|
-
.awsui_body-cell-
|
|
163
|
+
.awsui_body-cell-selected_c6tup_17cg6_144:not(#\9):first-child {
|
|
53
164
|
border-left: var(--border-item-width-qbbbsa, 2px) solid var(--color-border-item-selected-ppkssz, #0972d3);
|
|
54
165
|
border-radius: var(--border-radius-item-u2ibpi, 8px) 0 0 var(--border-radius-item-u2ibpi, 8px);
|
|
55
166
|
}
|
|
56
|
-
.awsui_body-cell-
|
|
167
|
+
.awsui_body-cell-selected_c6tup_17cg6_144:not(#\9):last-child {
|
|
57
168
|
border-right: var(--border-item-width-qbbbsa, 2px) solid var(--color-border-item-selected-ppkssz, #0972d3);
|
|
58
169
|
border-radius: 0 var(--border-radius-item-u2ibpi, 8px) var(--border-radius-item-u2ibpi, 8px) 0;
|
|
59
170
|
}
|
|
60
|
-
.awsui_body-cell-
|
|
171
|
+
.awsui_body-cell-selected_c6tup_17cg6_144:not(#\9):not(:first-child) {
|
|
61
172
|
padding-top: calc(
|
|
62
173
|
var(--space-scaled-xs-6859qs, 8px) + (var(--border-item-width-qbbbsa, 2px) - var(--border-divider-list-width-hacikr, 1px))
|
|
63
174
|
);
|
|
64
175
|
}
|
|
65
|
-
.awsui_body-
|
|
176
|
+
.awsui_body-cell_c6tup_17cg6_93:not(#\9):not(.awsui_body-cell-selected_c6tup_17cg6_144).awsui_body-cell-next-selected_c6tup_17cg6_176 {
|
|
66
177
|
border-bottom: 0;
|
|
67
178
|
padding-bottom: calc(var(--space-scaled-xs-6859qs, 8px) + var(--border-divider-list-width-hacikr, 1px));
|
|
68
179
|
}
|
|
69
|
-
.awsui_body-cell-
|
|
180
|
+
.awsui_body-cell-selected_c6tup_17cg6_144.awsui_body-cell-prev-selected_c6tup_17cg6_180:not(#\9) {
|
|
70
181
|
padding-top: calc(
|
|
71
182
|
var(--space-scaled-xs-6859qs, 8px) + (var(--border-item-width-qbbbsa, 2px) - var(--border-divider-list-width-hacikr, 1px))
|
|
72
183
|
);
|
|
73
184
|
border-top: var(--border-divider-list-width-hacikr, 1px) solid var(--color-border-item-placeholder-jgzhnb, #0972d3);
|
|
74
185
|
}
|
|
75
|
-
.awsui_body-cell-
|
|
186
|
+
.awsui_body-cell-selected_c6tup_17cg6_144.awsui_body-cell-next-selected_c6tup_17cg6_176:not(#\9) {
|
|
76
187
|
border-bottom-width: var(--border-divider-list-width-hacikr, 1px);
|
|
77
188
|
}
|
|
78
|
-
.awsui_body-cell-
|
|
189
|
+
.awsui_body-cell-selected_c6tup_17cg6_144.awsui_body-cell-next-selected_c6tup_17cg6_176:not(#\9):first-child {
|
|
79
190
|
border-bottom-left-radius: 0;
|
|
80
191
|
}
|
|
81
|
-
.awsui_body-cell-
|
|
192
|
+
.awsui_body-cell-selected_c6tup_17cg6_144.awsui_body-cell-next-selected_c6tup_17cg6_176:not(#\9):last-child {
|
|
82
193
|
border-bottom-right-radius: 0;
|
|
83
194
|
}
|
|
84
|
-
.awsui_body-cell-
|
|
195
|
+
.awsui_body-cell-selected_c6tup_17cg6_144.awsui_body-cell-prev-selected_c6tup_17cg6_180:not(#\9):first-child {
|
|
85
196
|
border-top-left-radius: 0;
|
|
86
197
|
}
|
|
87
|
-
.awsui_body-cell-
|
|
198
|
+
.awsui_body-cell-selected_c6tup_17cg6_144.awsui_body-cell-prev-selected_c6tup_17cg6_180:not(#\9):last-child {
|
|
88
199
|
border-top-right-radius: 0;
|
|
89
200
|
}
|
|
90
|
-
.awsui_body-cell-
|
|
201
|
+
.awsui_body-cell-selected_c6tup_17cg6_144:not(#\9):not(.awsui_body-cell-prev-selected_c6tup_17cg6_180) {
|
|
91
202
|
padding-top: var(--space-scaled-xs-6859qs, 8px);
|
|
92
203
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
204
|
+
.awsui_body-cell-editor_c6tup_17cg6_204:not(#\9) {
|
|
205
|
+
top: 0;
|
|
206
|
+
right: 0;
|
|
207
|
+
bottom: 0;
|
|
208
|
+
position: absolute;
|
|
209
|
+
display: flex;
|
|
210
|
+
align-items: center;
|
|
211
|
+
justify-content: flex-end;
|
|
212
|
+
padding-right: var(--space-xs-rsr2qu, 8px);
|
|
100
213
|
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
/*
|
|
104
|
-
Remove the placeholder border if the row is not selectable.
|
|
105
|
-
Rows that are not selectable will reserve the horizontal space
|
|
106
|
-
that the placeholder border would consume.
|
|
107
|
-
*/
|
|
108
|
-
/*
|
|
109
|
-
Striped rows requires additional left padding because the
|
|
110
|
-
shaded background makes the child content appear too close
|
|
111
|
-
to the table edge.
|
|
112
|
-
*/
|
|
214
|
+
.awsui_body-cell-editor-form_c6tup_17cg6_214:not(#\9) {
|
|
215
|
+
margin: calc(-1 * var(--space-xs-rsr2qu, 8px)) calc(-1.5 * var(--space-xs-rsr2qu, 8px));
|
|
113
216
|
}
|
|
114
|
-
.
|
|
115
|
-
|
|
217
|
+
.awsui_is-visual-refresh_c6tup_17cg6_114.awsui_body-cell_c6tup_17cg6_93:not(#\9):first-child.awsui_has-striped-rows_c6tup_17cg6_126 > .awsui_body-cell-editor-form_c6tup_17cg6_214 {
|
|
218
|
+
margin-left: calc(-1 * var(--space-xxs-ynfts5, 4px));
|
|
116
219
|
}
|
|
117
|
-
.
|
|
118
|
-
|
|
220
|
+
.awsui_is-visual-refresh_c6tup_17cg6_114.awsui_body-cell_c6tup_17cg6_93:not(#\9):first-child:not(.awsui_has-striped-rows_c6tup_17cg6_126) > .awsui_body-cell-editor-form_c6tup_17cg6_214 {
|
|
221
|
+
margin-left: calc(-1 * var(--space-xxxs-k2w98v, 2px));
|
|
119
222
|
}
|
|
120
|
-
.awsui_body-
|
|
121
|
-
|
|
223
|
+
.awsui_body-cell-editor-row_c6tup_17cg6_223:not(#\9) {
|
|
224
|
+
display: flex;
|
|
225
|
+
flex-flow: row nowrap;
|
|
226
|
+
align-items: center;
|
|
227
|
+
justify-content: space-between;
|
|
228
|
+
column-gap: var(--space-xxs-ynfts5, 4px);
|
|
229
|
+
}
|
|
230
|
+
.awsui_body-cell-editor-row_c6tup_17cg6_223 > :not(#\9):not(:last-child) {
|
|
231
|
+
flex-grow: 1;
|
|
232
|
+
}
|
|
233
|
+
.awsui_body-cell-editor-controls_c6tup_17cg6_233:not(#\9) {
|
|
234
|
+
flex-shrink: 0;
|
|
235
|
+
}
|
|
236
|
+
.awsui_body-cell_c6tup_17cg6_93.awsui_body-cell-editable_c6tup_17cg6_129:not(#\9) {
|
|
237
|
+
position: relative;
|
|
238
|
+
cursor: pointer;
|
|
239
|
+
}
|
|
240
|
+
.awsui_body-cell_c6tup_17cg6_93.awsui_body-cell-editable_c6tup_17cg6_129.awsui_body-cell-edit-active_c6tup_17cg6_129:not(#\9) {
|
|
241
|
+
overflow: visible;
|
|
242
|
+
}
|
|
243
|
+
.awsui_body-cell_c6tup_17cg6_93.awsui_body-cell-editable_c6tup_17cg6_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_17cg6_129) > .awsui_body-cell-editor_c6tup_17cg6_204 {
|
|
244
|
+
opacity: 0;
|
|
245
|
+
}
|
|
246
|
+
.awsui_body-cell_c6tup_17cg6_93.awsui_body-cell-editable_c6tup_17cg6_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_17cg6_129):hover {
|
|
247
|
+
position: relative;
|
|
248
|
+
background-color: var(--color-background-dropdown-item-hover-mqsxkv, #f4f4f4);
|
|
249
|
+
border: var(--border-divider-list-width-hacikr, 1px) solid var(--color-border-control-default-m3lmsh, #7d8998);
|
|
250
|
+
left: calc(-1 * var(--border-divider-list-width-hacikr, 1px));
|
|
251
|
+
right: calc(-1 * var(--border-divider-list-width-hacikr, 1px));
|
|
252
|
+
}
|
|
253
|
+
.awsui_body-cell_c6tup_17cg6_93.awsui_body-cell-editable_c6tup_17cg6_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_17cg6_129):hover > .awsui_body-cell-editor_c6tup_17cg6_204 {
|
|
254
|
+
padding-right: calc(var(--space-xs-rsr2qu, 8px) - (2 * var(--border-divider-list-width-hacikr, 1px)));
|
|
255
|
+
}
|
|
256
|
+
.awsui_body-cell_c6tup_17cg6_93.awsui_body-cell-editable_c6tup_17cg6_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_17cg6_129):hover.awsui_body-cell-last-row_c6tup_17cg6_144.awsui_body-cell-selected_c6tup_17cg6_144, .awsui_body-cell_c6tup_17cg6_93.awsui_body-cell-editable_c6tup_17cg6_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_17cg6_129):hover.awsui_body-cell-next-selected_c6tup_17cg6_176 {
|
|
257
|
+
padding-top: calc(var(--space-scaled-xs-6859qs, 8px) - calc(var(--border-divider-list-width-hacikr, 1px) / 2));
|
|
258
|
+
padding-bottom: calc(var(--space-scaled-xs-6859qs, 8px) - calc(var(--border-divider-list-width-hacikr, 1px) / 2));
|
|
259
|
+
}
|
|
260
|
+
.awsui_body-cell_c6tup_17cg6_93.awsui_body-cell-editable_c6tup_17cg6_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_17cg6_129):hover.awsui_body-cell-last-row_c6tup_17cg6_144:not(.awsui_body-cell-selected_c6tup_17cg6_144) {
|
|
261
|
+
padding-top: calc(var(--space-scaled-xs-6859qs, 8px) - calc(var(--border-divider-list-width-hacikr, 1px)));
|
|
262
|
+
}
|
|
263
|
+
.awsui_body-cell_c6tup_17cg6_93.awsui_body-cell-editable_c6tup_17cg6_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_17cg6_129):hover.awsui_body-cell-first-row_c6tup_17cg6_141:not(.awsui_body-cell-selected_c6tup_17cg6_144) {
|
|
264
|
+
padding-top: calc(var(--space-scaled-xs-6859qs, 8px) - calc(var(--border-divider-list-width-hacikr, 1px)));
|
|
265
|
+
padding-bottom: calc(var(--space-scaled-xs-6859qs, 8px) - calc(var(--border-divider-list-width-hacikr, 1px)));
|
|
266
|
+
}
|
|
267
|
+
.awsui_body-cell_c6tup_17cg6_93.awsui_body-cell-editable_c6tup_17cg6_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_17cg6_129):hover, .awsui_body-cell_c6tup_17cg6_93.awsui_body-cell-editable_c6tup_17cg6_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_17cg6_129)[data-awsui-focus-visible=true]:focus-within {
|
|
268
|
+
padding-right: calc(var(--space-scaled-l-t03y3z, 20px) + var(--space-l-4vl6xu, 20px));
|
|
269
|
+
}
|
|
270
|
+
.awsui_body-cell_c6tup_17cg6_93.awsui_body-cell-editable_c6tup_17cg6_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_17cg6_129):hover > .awsui_body-cell-editor_c6tup_17cg6_204, .awsui_body-cell_c6tup_17cg6_93.awsui_body-cell-editable_c6tup_17cg6_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_17cg6_129)[data-awsui-focus-visible=true]:focus-within > .awsui_body-cell-editor_c6tup_17cg6_204 {
|
|
271
|
+
opacity: 1;
|
|
272
|
+
}
|
|
273
|
+
.awsui_body-cell_c6tup_17cg6_93.awsui_body-cell-editable_c6tup_17cg6_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_17cg6_129):hover:first-child {
|
|
274
|
+
left: 0;
|
|
275
|
+
right: 0;
|
|
276
|
+
}
|
|
277
|
+
.awsui_body-cell_c6tup_17cg6_93.awsui_body-cell-editable_c6tup_17cg6_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_17cg6_129)[data-awsui-focus-visible=true]:not(:hover):focus-within {
|
|
278
|
+
position: relative;
|
|
279
|
+
}
|
|
280
|
+
.awsui_body-cell_c6tup_17cg6_93.awsui_body-cell-editable_c6tup_17cg6_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_17cg6_129)[data-awsui-focus-visible=true]:not(:hover):focus-within {
|
|
281
|
+
outline: 2px dotted transparent;
|
|
282
|
+
outline-offset: calc(calc(-1 * var(--space-scaled-xxs-95dhkm, 4px)) - 1px);
|
|
283
|
+
}
|
|
284
|
+
.awsui_body-cell_c6tup_17cg6_93.awsui_body-cell-editable_c6tup_17cg6_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_17cg6_129)[data-awsui-focus-visible=true]:not(:hover):focus-within::before {
|
|
285
|
+
content: " ";
|
|
286
|
+
display: block;
|
|
287
|
+
position: absolute;
|
|
288
|
+
left: calc(-1 * calc(-1 * var(--space-scaled-xxs-95dhkm, 4px)));
|
|
289
|
+
top: calc(-1 * calc(-1 * var(--space-scaled-xxs-95dhkm, 4px)));
|
|
290
|
+
width: calc(100% + 2 * calc(-1 * var(--space-scaled-xxs-95dhkm, 4px)));
|
|
291
|
+
height: calc(100% + 2 * calc(-1 * var(--space-scaled-xxs-95dhkm, 4px)));
|
|
292
|
+
border-radius: var(--border-radius-control-default-focus-ring-7661kz, 4px);
|
|
293
|
+
box-shadow: 0 0 0 2px var(--color-border-item-focused-ap3b6s, #0972d3);
|
|
294
|
+
}
|
|
295
|
+
.awsui_body-cell-editable_c6tup_17cg6_129.awsui_is-visual-refresh_c6tup_17cg6_114:not(#\9):not(.awsui_body-cell-edit-active_c6tup_17cg6_129):hover:first-child {
|
|
296
|
+
border-top-left-radius: var(--border-radius-control-default-focus-ring-7661kz, 4px);
|
|
297
|
+
border-bottom-left-radius: var(--border-radius-control-default-focus-ring-7661kz, 4px);
|
|
298
|
+
}
|
|
299
|
+
.awsui_body-cell-editable_c6tup_17cg6_129.awsui_is-visual-refresh_c6tup_17cg6_114:not(#\9):not(.awsui_body-cell-edit-active_c6tup_17cg6_129):hover:last-child {
|
|
300
|
+
border-top-right-radius: var(--border-radius-control-default-focus-ring-7661kz, 4px);
|
|
301
|
+
border-bottom-right-radius: var(--border-radius-control-default-focus-ring-7661kz, 4px);
|
|
302
|
+
}
|
|
303
|
+
.awsui_body-cell-editable_c6tup_17cg6_129.awsui_is-visual-refresh_c6tup_17cg6_114:not(#\9):not(.awsui_body-cell-edit-active_c6tup_17cg6_129):hover.awsui_body-cell-first-row_c6tup_17cg6_141 > .awsui_body-cell-editor_c6tup_17cg6_204 {
|
|
304
|
+
padding-top: var(--border-divider-list-width-hacikr, 1px);
|
|
122
305
|
}
|
|
@@ -2,17 +2,23 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"body-cell": "awsui_body-
|
|
6
|
-
"body-cell-wrap": "awsui_body-cell-
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"body-cell-
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"body-cell-
|
|
13
|
-
"body-cell-
|
|
14
|
-
"
|
|
15
|
-
"has-
|
|
16
|
-
"
|
|
5
|
+
"body-cell": "awsui_body-cell_c6tup_17cg6_93",
|
|
6
|
+
"body-cell-wrap": "awsui_body-cell-wrap_c6tup_17cg6_102",
|
|
7
|
+
"is-visual-refresh": "awsui_is-visual-refresh_c6tup_17cg6_114",
|
|
8
|
+
"has-striped-rows": "awsui_has-striped-rows_c6tup_17cg6_126",
|
|
9
|
+
"body-cell-edit-active": "awsui_body-cell-edit-active_c6tup_17cg6_129",
|
|
10
|
+
"body-cell-editable": "awsui_body-cell-editable_c6tup_17cg6_129",
|
|
11
|
+
"has-selection": "awsui_has-selection_c6tup_17cg6_135",
|
|
12
|
+
"body-cell-first-row": "awsui_body-cell-first-row_c6tup_17cg6_141",
|
|
13
|
+
"body-cell-last-row": "awsui_body-cell-last-row_c6tup_17cg6_144",
|
|
14
|
+
"body-cell-selected": "awsui_body-cell-selected_c6tup_17cg6_144",
|
|
15
|
+
"has-footer": "awsui_has-footer_c6tup_17cg6_144",
|
|
16
|
+
"body-cell-shaded": "awsui_body-cell-shaded_c6tup_17cg6_154",
|
|
17
|
+
"body-cell-next-selected": "awsui_body-cell-next-selected_c6tup_17cg6_176",
|
|
18
|
+
"body-cell-prev-selected": "awsui_body-cell-prev-selected_c6tup_17cg6_180",
|
|
19
|
+
"body-cell-editor": "awsui_body-cell-editor_c6tup_17cg6_204",
|
|
20
|
+
"body-cell-editor-form": "awsui_body-cell-editor-form_c6tup_17cg6_214",
|
|
21
|
+
"body-cell-editor-row": "awsui_body-cell-editor-row_c6tup_17cg6_223",
|
|
22
|
+
"body-cell-editor-controls": "awsui_body-cell-editor-controls_c6tup_17cg6_233"
|
|
17
23
|
};
|
|
18
24
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface TableTdElementProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
style?: React.CSSProperties;
|
|
5
|
+
wrapLines: boolean | undefined;
|
|
6
|
+
isFirstRow: boolean;
|
|
7
|
+
isLastRow: boolean;
|
|
8
|
+
isSelected: boolean;
|
|
9
|
+
isNextSelected: boolean;
|
|
10
|
+
isPrevSelected: boolean;
|
|
11
|
+
nativeAttributes?: Omit<React.HTMLAttributes<HTMLTableCellElement>, 'style' | 'className' | 'onClick'>;
|
|
12
|
+
onClick?: () => void;
|
|
13
|
+
children?: React.ReactNode;
|
|
14
|
+
isEvenRow?: boolean;
|
|
15
|
+
stripedRows?: boolean;
|
|
16
|
+
hasSelection?: boolean;
|
|
17
|
+
hasFooter?: boolean;
|
|
18
|
+
isVisualRefresh?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export declare const TableTdElement: React.ForwardRefExoticComponent<TableTdElementProps & React.RefAttributes<HTMLTableCellElement>>;
|
|
21
|
+
//# sourceMappingURL=td-element.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"td-element.d.ts","sourceRoot":"","sources":["../../../../src/table/body-cell/td-element.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,mBAAmB;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,SAAS,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/B,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,cAAc,EAAE,OAAO,CAAC;IACxB,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,oBAAoB,CAAC,EAAE,OAAO,GAAG,WAAW,GAAG,SAAS,CAAC,CAAC;IACvG,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,eAAO,MAAM,cAAc,kGAgD1B,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { __assign } from "tslib";
|
|
2
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
import clsx from 'clsx';
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import styles from './styles.css.js';
|
|
7
|
+
export var TableTdElement = React.forwardRef(function (_a, ref) {
|
|
8
|
+
var className = _a.className, style = _a.style, children = _a.children, wrapLines = _a.wrapLines, isFirstRow = _a.isFirstRow, isLastRow = _a.isLastRow, isSelected = _a.isSelected, isNextSelected = _a.isNextSelected, isPrevSelected = _a.isPrevSelected, nativeAttributes = _a.nativeAttributes, onClick = _a.onClick, isEvenRow = _a.isEvenRow, stripedRows = _a.stripedRows, isVisualRefresh = _a.isVisualRefresh, hasSelection = _a.hasSelection, hasFooter = _a.hasFooter;
|
|
9
|
+
return (React.createElement("td", __assign({ style: style, className: clsx(className, styles['body-cell'], wrapLines && styles['body-cell-wrap'], isFirstRow && styles['body-cell-first-row'], isLastRow && styles['body-cell-last-row'], isSelected && styles['body-cell-selected'], isNextSelected && styles['body-cell-next-selected'], isPrevSelected && styles['body-cell-prev-selected'], !isEvenRow && stripedRows && styles['body-cell-shaded'], stripedRows && styles['has-striped-rows'], isVisualRefresh && styles['is-visual-refresh'], hasSelection && styles['has-selection'], hasFooter && styles['has-footer']), onClick: onClick, ref: ref }, nativeAttributes), children));
|
|
10
|
+
});
|
|
11
|
+
//# sourceMappingURL=td-element.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"td-element.js","sourceRoot":"","sources":["../../../../src/table/body-cell/td-element.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAqBrC,MAAM,CAAC,IAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CAC5C,UACE,EAiBC,EACD,GAAG;QAjBD,SAAS,eAAA,EACT,KAAK,WAAA,EACL,QAAQ,cAAA,EACR,SAAS,eAAA,EACT,UAAU,gBAAA,EACV,SAAS,eAAA,EACT,UAAU,gBAAA,EACV,cAAc,oBAAA,EACd,cAAc,oBAAA,EACd,gBAAgB,sBAAA,EAChB,OAAO,aAAA,EACP,SAAS,eAAA,EACT,WAAW,iBAAA,EACX,eAAe,qBAAA,EACf,YAAY,kBAAA,EACZ,SAAS,eAAA;IAIX,OAAO,CACL,qCACE,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,IAAI,CACb,SAAS,EACT,MAAM,CAAC,WAAW,CAAC,EACnB,SAAS,IAAI,MAAM,CAAC,gBAAgB,CAAC,EACrC,UAAU,IAAI,MAAM,CAAC,qBAAqB,CAAC,EAC3C,SAAS,IAAI,MAAM,CAAC,oBAAoB,CAAC,EACzC,UAAU,IAAI,MAAM,CAAC,oBAAoB,CAAC,EAC1C,cAAc,IAAI,MAAM,CAAC,yBAAyB,CAAC,EACnD,cAAc,IAAI,MAAM,CAAC,yBAAyB,CAAC,EACnD,CAAC,SAAS,IAAI,WAAW,IAAI,MAAM,CAAC,kBAAkB,CAAC,EACvD,WAAW,IAAI,MAAM,CAAC,kBAAkB,CAAC,EACzC,eAAe,IAAI,MAAM,CAAC,mBAAmB,CAAC,EAC9C,YAAY,IAAI,MAAM,CAAC,eAAe,CAAC,EACvC,SAAS,IAAI,MAAM,CAAC,YAAY,CAAC,CAClC,EACD,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,GAAG,IACJ,gBAAgB,GAEnB,QAAQ,CACN,CACN,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport clsx from 'clsx';\nimport React from 'react';\nimport styles from './styles.css.js';\n\nexport interface TableTdElementProps {\n className?: string;\n style?: React.CSSProperties;\n wrapLines: boolean | undefined;\n isFirstRow: boolean;\n isLastRow: boolean;\n isSelected: boolean;\n isNextSelected: boolean;\n isPrevSelected: boolean;\n nativeAttributes?: Omit<React.HTMLAttributes<HTMLTableCellElement>, 'style' | 'className' | 'onClick'>;\n onClick?: () => void;\n children?: React.ReactNode;\n isEvenRow?: boolean;\n stripedRows?: boolean;\n hasSelection?: boolean;\n hasFooter?: boolean;\n isVisualRefresh?: boolean;\n}\n\nexport const TableTdElement = React.forwardRef<HTMLTableCellElement, TableTdElementProps>(\n (\n {\n className,\n style,\n children,\n wrapLines,\n isFirstRow,\n isLastRow,\n isSelected,\n isNextSelected,\n isPrevSelected,\n nativeAttributes,\n onClick,\n isEvenRow,\n stripedRows,\n isVisualRefresh,\n hasSelection,\n hasFooter,\n },\n ref\n ) => {\n return (\n <td\n style={style}\n className={clsx(\n className,\n styles['body-cell'],\n wrapLines && styles['body-cell-wrap'],\n isFirstRow && styles['body-cell-first-row'],\n isLastRow && styles['body-cell-last-row'],\n isSelected && styles['body-cell-selected'],\n isNextSelected && styles['body-cell-next-selected'],\n isPrevSelected && styles['body-cell-prev-selected'],\n !isEvenRow && stripedRows && styles['body-cell-shaded'],\n stripedRows && styles['has-striped-rows'],\n isVisualRefresh && styles['is-visual-refresh'],\n hasSelection && styles['has-selection'],\n hasFooter && styles['has-footer']\n )}\n onClick={onClick}\n ref={ref}\n {...nativeAttributes}\n >\n {children}\n </td>\n );\n }\n);\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare function isScrollable(ele: HTMLElement): boolean;
|
|
3
|
+
export declare function getScrollableParent(ele: HTMLElement | null): HTMLElement;
|
|
4
|
+
export interface UseStableScrollPositionResult {
|
|
5
|
+
/** Stores the current scroll position of the nearest scrollable container. */
|
|
6
|
+
storeScrollPosition: () => void;
|
|
7
|
+
/** Restores the scroll position of the nearest scrollable container to the last stored position. */
|
|
8
|
+
restoreScrollPosition: () => void;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* This hook stores the scroll position of the nearest scrollable parent of the
|
|
12
|
+
* `activeElementRef` when `storeScrollPosition` is called, and restores it when
|
|
13
|
+
* `restoreScrollPosition` is called.
|
|
14
|
+
* @param activeElementRef Ref to an active element in the table. This is used to find the nearest scrollable parent.
|
|
15
|
+
*/
|
|
16
|
+
export declare function useStableScrollPosition<T extends HTMLElement>(activeElementRef: React.RefObject<T>): UseStableScrollPositionResult;
|
|
17
|
+
//# sourceMappingURL=use-stable-scroll-position.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-stable-scroll-position.d.ts","sourceRoot":"","sources":["../../../../src/table/body-cell/use-stable-scroll-position.tsx"],"names":[],"mappings":"AAGA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,wBAAgB,YAAY,CAAC,GAAG,EAAE,WAAW,WAK5C;AAED,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,GAAG,WAAW,CAMxE;AAED,MAAM,WAAW,6BAA6B;IAC5C,8EAA8E;IAC9E,mBAAmB,EAAE,MAAM,IAAI,CAAC;IAChC,oGAAoG;IACpG,qBAAqB,EAAE,MAAM,IAAI,CAAC;CACnC;AAMD;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,WAAW,EAC3D,gBAAgB,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,GACnC,6BAA6B,CAsB/B"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
import { useCallback, useRef } from 'react';
|
|
4
|
+
export function isScrollable(ele) {
|
|
5
|
+
var overflowXStyle = window.getComputedStyle(ele).overflowX;
|
|
6
|
+
var isOverflowHidden = overflowXStyle.indexOf('hidden') !== -1;
|
|
7
|
+
return ele.scrollWidth > ele.clientWidth && !isOverflowHidden;
|
|
8
|
+
}
|
|
9
|
+
export function getScrollableParent(ele) {
|
|
10
|
+
return !ele || ele === document.body
|
|
11
|
+
? document.body
|
|
12
|
+
: isScrollable(ele)
|
|
13
|
+
? ele
|
|
14
|
+
: getScrollableParent(ele.parentElement);
|
|
15
|
+
}
|
|
16
|
+
var shouldScroll = function (_a, _b) {
|
|
17
|
+
var cx = _a[0], cy = _a[1];
|
|
18
|
+
var px = _b[0], py = _b[1];
|
|
19
|
+
return cx - px > 5 || cy - py > 5;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* This hook stores the scroll position of the nearest scrollable parent of the
|
|
23
|
+
* `activeElementRef` when `storeScrollPosition` is called, and restores it when
|
|
24
|
+
* `restoreScrollPosition` is called.
|
|
25
|
+
* @param activeElementRef Ref to an active element in the table. This is used to find the nearest scrollable parent.
|
|
26
|
+
*/
|
|
27
|
+
export function useStableScrollPosition(activeElementRef) {
|
|
28
|
+
var scrollRef = useRef();
|
|
29
|
+
var storeScrollPosition = useCallback(function () {
|
|
30
|
+
var _a;
|
|
31
|
+
var scrollableParent = getScrollableParent((_a = activeElementRef.current) !== null && _a !== void 0 ? _a : document.body);
|
|
32
|
+
if (scrollableParent) {
|
|
33
|
+
scrollRef.current = [scrollableParent.scrollLeft, scrollableParent.scrollTop];
|
|
34
|
+
}
|
|
35
|
+
}, [activeElementRef]);
|
|
36
|
+
var restoreScrollPosition = useCallback(function () {
|
|
37
|
+
var _a;
|
|
38
|
+
var _b;
|
|
39
|
+
var scrollableParent = getScrollableParent((_b = activeElementRef.current) !== null && _b !== void 0 ? _b : document.body);
|
|
40
|
+
if (scrollRef.current &&
|
|
41
|
+
scrollRef.current.toString() !== '0,0' &&
|
|
42
|
+
shouldScroll(scrollRef.current, [scrollableParent.scrollLeft, scrollableParent.scrollTop])) {
|
|
43
|
+
_a = scrollRef.current, scrollableParent.scrollLeft = _a[0], scrollableParent.scrollTop = _a[1];
|
|
44
|
+
}
|
|
45
|
+
}, [activeElementRef]);
|
|
46
|
+
return { storeScrollPosition: storeScrollPosition, restoreScrollPosition: restoreScrollPosition };
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=use-stable-scroll-position.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-stable-scroll-position.js","sourceRoot":"","sources":["../../../../src/table/body-cell/use-stable-scroll-position.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAc,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAEnD,MAAM,UAAU,YAAY,CAAC,GAAgB;IAC3C,IAAM,cAAc,GAAG,MAAM,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC;IAC9D,IAAM,gBAAgB,GAAG,cAAc,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;IAEjE,OAAO,GAAG,CAAC,WAAW,GAAG,GAAG,CAAC,WAAW,IAAI,CAAC,gBAAgB,CAAC;AAChE,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,GAAuB;IACzD,OAAO,CAAC,GAAG,IAAI,GAAG,KAAK,QAAQ,CAAC,IAAI;QAClC,CAAC,CAAC,QAAQ,CAAC,IAAI;QACf,CAAC,CAAC,YAAY,CAAC,GAAG,CAAC;YACnB,CAAC,CAAC,GAAG;YACL,CAAC,CAAC,mBAAmB,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;AAC7C,CAAC;AASD,IAAM,YAAY,GAAG,UAAC,EAA0B,EAAE,EAA0B;QAArD,EAAE,QAAA,EAAE,EAAE,QAAA;QAAsB,EAAE,QAAA,EAAE,EAAE,QAAA;IACvD,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AACpC,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,UAAU,uBAAuB,CACrC,gBAAoC;IAEpC,IAAM,SAAS,GAAG,MAAM,EAAyC,CAAC;IAElE,IAAM,mBAAmB,GAAG,WAAW,CAAC;;QACtC,IAAM,gBAAgB,GAAG,mBAAmB,CAAC,MAAA,gBAAgB,CAAC,OAAO,mCAAI,QAAQ,CAAC,IAAI,CAAC,CAAC;QACxF,IAAI,gBAAgB,EAAE;YACpB,SAAS,CAAC,OAAO,GAAG,CAAC,gBAAgB,CAAC,UAAU,EAAE,gBAAgB,CAAC,SAAS,CAAC,CAAC;SAC/E;IACH,CAAC,EAAE,CAAC,gBAAgB,CAAC,CAAC,CAAC;IAEvB,IAAM,qBAAqB,GAAG,WAAW,CAAC;;;QACxC,IAAM,gBAAgB,GAAG,mBAAmB,CAAC,MAAA,gBAAgB,CAAC,OAAO,mCAAI,QAAQ,CAAC,IAAI,CAAC,CAAC;QACxF,IACE,SAAS,CAAC,OAAO;YACjB,SAAS,CAAC,OAAO,CAAC,QAAQ,EAAE,KAAK,KAAK;YACtC,YAAY,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC,gBAAgB,CAAC,UAAU,EAAE,gBAAgB,CAAC,SAAS,CAAC,CAAC,EAC1F;YACA,KAA4D,SAAS,CAAC,OAAO,EAA5E,gBAAgB,CAAC,UAAU,QAAA,EAAE,gBAAgB,CAAC,SAAS,QAAA,CAAsB;SAC/E;IACH,CAAC,EAAE,CAAC,gBAAgB,CAAC,CAAC,CAAC;IAEvB,OAAO,EAAE,mBAAmB,qBAAA,EAAE,qBAAqB,uBAAA,EAAE,CAAC;AACxD,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport React, { useCallback, useRef } from 'react';\n\nexport function isScrollable(ele: HTMLElement) {\n const overflowXStyle = window.getComputedStyle(ele).overflowX;\n const isOverflowHidden = overflowXStyle.indexOf('hidden') !== -1;\n\n return ele.scrollWidth > ele.clientWidth && !isOverflowHidden;\n}\n\nexport function getScrollableParent(ele: HTMLElement | null): HTMLElement {\n return !ele || ele === document.body\n ? document.body\n : isScrollable(ele)\n ? ele\n : getScrollableParent(ele.parentElement);\n}\n\nexport interface UseStableScrollPositionResult {\n /** Stores the current scroll position of the nearest scrollable container. */\n storeScrollPosition: () => void;\n /** Restores the scroll position of the nearest scrollable container to the last stored position. */\n restoreScrollPosition: () => void;\n}\n\nconst shouldScroll = ([cx, cy]: [number, number], [px, py]: [number, number]) => {\n return cx - px > 5 || cy - py > 5;\n};\n\n/**\n * This hook stores the scroll position of the nearest scrollable parent of the\n * `activeElementRef` when `storeScrollPosition` is called, and restores it when\n * `restoreScrollPosition` is called.\n * @param activeElementRef Ref to an active element in the table. This is used to find the nearest scrollable parent.\n */\nexport function useStableScrollPosition<T extends HTMLElement>(\n activeElementRef: React.RefObject<T>\n): UseStableScrollPositionResult {\n const scrollRef = useRef<Parameters<HTMLBodyElement['scroll']>>();\n\n const storeScrollPosition = useCallback(() => {\n const scrollableParent = getScrollableParent(activeElementRef.current ?? document.body);\n if (scrollableParent) {\n scrollRef.current = [scrollableParent.scrollLeft, scrollableParent.scrollTop];\n }\n }, [activeElementRef]);\n\n const restoreScrollPosition = useCallback(() => {\n const scrollableParent = getScrollableParent(activeElementRef.current ?? document.body);\n if (\n scrollRef.current &&\n scrollRef.current.toString() !== '0,0' &&\n shouldScroll(scrollRef.current, [scrollableParent.scrollLeft, scrollableParent.scrollTop])\n ) {\n [scrollableParent.scrollLeft, scrollableParent.scrollTop] = scrollRef.current;\n }\n }, [activeElementRef]);\n\n return { storeScrollPosition, restoreScrollPosition };\n}\n"]}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TableProps } from '../interfaces';
|
|
3
|
-
interface TableHeaderCellProps {
|
|
3
|
+
interface TableHeaderCellProps<ItemType> {
|
|
4
4
|
className?: string;
|
|
5
5
|
style?: React.CSSProperties;
|
|
6
6
|
tabIndex: number;
|
|
7
|
-
column: TableProps.ColumnDefinition<
|
|
8
|
-
activeSortingColumn
|
|
9
|
-
sortingDescending
|
|
10
|
-
sortingDisabled
|
|
11
|
-
wrapLines
|
|
7
|
+
column: TableProps.ColumnDefinition<ItemType>;
|
|
8
|
+
activeSortingColumn?: TableProps.SortingColumn<ItemType>;
|
|
9
|
+
sortingDescending?: boolean;
|
|
10
|
+
sortingDisabled?: boolean;
|
|
11
|
+
wrapLines?: boolean;
|
|
12
12
|
showFocusRing: boolean;
|
|
13
13
|
hidden?: boolean;
|
|
14
14
|
onClick(detail: TableProps.SortingState<any>): void;
|
|
@@ -18,7 +18,8 @@ interface TableHeaderCellProps {
|
|
|
18
18
|
onFocus?: () => void;
|
|
19
19
|
onBlur?: () => void;
|
|
20
20
|
resizableColumns?: boolean;
|
|
21
|
+
isEditable?: boolean;
|
|
21
22
|
}
|
|
22
|
-
export declare function TableHeaderCell({ className, style, tabIndex, column, activeSortingColumn, sortingDescending, sortingDisabled, wrapLines, showFocusRing, hidden, onClick, colIndex, onFocus, onBlur, updateColumn, resizableColumns, onResizeFinish, }: TableHeaderCellProps): JSX.Element;
|
|
23
|
+
export declare function TableHeaderCell<ItemType>({ className, style, tabIndex, column, activeSortingColumn, sortingDescending, sortingDisabled, wrapLines, showFocusRing, hidden, onClick, colIndex, onFocus, onBlur, updateColumn, resizableColumns, onResizeFinish, isEditable, }: TableHeaderCellProps<ItemType>): JSX.Element;
|
|
23
24
|
export {};
|
|
24
25
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/table/header-cell/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAM3C,UAAU,oBAAoB;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/table/header-cell/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAM3C,UAAU,oBAAoB,CAAC,QAAQ;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,UAAU,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IAC9C,mBAAmB,CAAC,EAAE,UAAU,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IACzD,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,OAAO,CAAC;IACvB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,MAAM,EAAE,UAAU,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;IACpD,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3D,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,wBAAgB,eAAe,CAAC,QAAQ,EAAE,EACxC,SAAS,EACT,KAAK,EACL,QAAQ,EACR,MAAM,EACN,mBAAmB,EACnB,iBAAiB,EACjB,eAAe,EACf,SAAS,EACT,aAAa,EACb,MAAM,EACN,OAAO,EACP,QAAQ,EACR,OAAO,EACP,MAAM,EACN,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACd,UAAU,GACX,EAAE,oBAAoB,CAAC,QAAQ,CAAC,eA0FhC"}
|