@cloudscape-design/components 3.0.1156 → 3.0.1157
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/alert/index.js +1 -1
- package/alert/interfaces.d.ts +1 -2
- package/app-layout/runtime-drawer/index.d.ts.map +1 -1
- package/app-layout/runtime-drawer/index.js +20 -18
- package/app-layout/runtime-drawer/index.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/drawer/styles.css.js +30 -30
- package/app-layout/visual-refresh-toolbar/drawer/styles.scoped.css +83 -83
- package/app-layout/visual-refresh-toolbar/drawer/styles.selectors.js +30 -30
- package/autosuggest/index.js +28 -11
- package/autosuggest/interfaces.d.ts +2 -1
- package/autosuggest/interfaces.js.map +1 -1
- package/badge/index.d.ts +2 -0
- package/badge/index.js +14 -13
- package/badge/interfaces.d.ts +3 -2
- package/box/index.js +18 -13
- package/box/interfaces.d.ts +2 -1
- package/button/index.js +12 -11
- package/button/interfaces.d.ts +4 -2
- package/button-dropdown/index.js +27 -11
- package/button-dropdown/interfaces.d.ts +6 -2
- package/button-group/index.js +42 -11
- package/button-group/interfaces.d.ts +10 -0
- package/button-group/interfaces.d.ts.map +1 -1
- package/button-group/interfaces.js.map +1 -1
- package/checkbox/index.js +9 -11
- package/checkbox/interfaces.d.ts +3 -2
- package/container/index.js +29 -13
- package/container/interfaces.d.ts +2 -1
- package/date-input/index.js +8 -10
- package/flashbar/index.js +10 -13
- package/flashbar/interfaces.d.ts +1 -0
- package/icon/index.js +8 -13
- package/icon/interfaces.d.ts +2 -1
- package/icon-provider/index.js +12 -2
- package/index.d.ts +4 -1
- package/index.js +4 -0
- package/input/index.js +53 -12
- package/input/interfaces.d.ts +3 -1
- package/internal/base-component/styles.scoped.css +1 -1
- package/internal/components/radio-button/interfaces.d.ts +3 -3
- package/internal/environment.js +3 -3
- package/internal/environment.json +3 -3
- package/internal/manifest.json +1 -1
- package/internal/plugins/controllers/drawers.d.ts +2 -2
- package/internal/plugins/controllers/drawers.d.ts.map +1 -1
- package/internal/plugins/controllers/drawers.js.map +1 -1
- package/internal/plugins/widget/interfaces.d.ts +2 -2
- package/internal/plugins/widget/interfaces.d.ts.map +1 -1
- package/internal/plugins/widget/interfaces.js.map +1 -1
- package/link/index.js +25 -11
- package/link/interfaces.d.ts +3 -2
- package/navigable-group/index.js +19 -4
- package/package.json +4 -1
- package/progress-bar/index.d.ts +1 -0
- package/progress-bar/index.js +52 -14
- package/progress-bar/interfaces.d.ts +1 -0
- package/prompt-input/index.js +19 -11
- package/prompt-input/interfaces.d.ts +4 -3
- package/radio-button/index.js +19 -4
- package/radio-group/index.js +20 -11
- package/radio-group/interfaces.d.ts +1 -1
- package/segmented-control/index.js +14 -13
- package/segmented-control/interfaces.d.ts +1 -0
- package/select/interfaces.d.ts +1 -1
- package/select/interfaces.js.map +1 -1
- package/space-between/index.js +10 -13
- package/space-between/interfaces.d.ts +2 -1
- package/spinner/index.js +10 -13
- package/spinner/interfaces.d.ts +2 -1
- package/status-indicator/index.js +10 -13
- package/status-indicator/interfaces.d.ts +2 -1
- package/steps/index.js +11 -11
- package/steps/interfaces.d.ts +6 -2
- package/table/header-cell/index.d.ts +1 -1
- package/table/header-cell/index.d.ts.map +1 -1
- package/table/header-cell/index.js +1 -1
- package/table/header-cell/index.js.map +1 -1
- package/table/header-cell/th-element.d.ts +1 -1
- package/table/header-cell/th-element.d.ts.map +1 -1
- package/table/header-cell/th-element.js.map +1 -1
- package/table/resizer/index.d.ts +3 -1
- package/table/resizer/index.d.ts.map +1 -1
- package/table/resizer/index.js +8 -5
- package/table/resizer/index.js.map +1 -1
- package/table/resizer/styles.css.js +13 -12
- package/table/resizer/styles.scoped.css +22 -22
- package/table/resizer/styles.selectors.js +13 -12
- package/table/thead.d.ts +1 -1
- package/table/thead.d.ts.map +1 -1
- package/table/thead.js.map +1 -1
- package/text-filter/index.js +17 -10
- package/text-filter/interfaces.d.ts +1 -0
- package/textarea/index.js +65 -12
- package/textarea/interfaces.d.ts +3 -2
- package/time-input/index.js +15 -11
- package/toggle/index.js +6 -10
- package/toggle/interfaces.d.ts +3 -2
- package/toggle-button/index.js +14 -11
- package/wizard/index.js +35 -13
- package/wizard/interfaces.d.ts +1 -1
- package/autosuggest/internal-do-not-use-core.js +0 -35
- package/badge/internal-do-not-use-core.js +0 -19
- package/box/internal-do-not-use-core.js +0 -23
- package/button/internal-do-not-use-core.js +0 -19
- package/button-dropdown/internal-do-not-use-core.js +0 -34
- package/button-group/internal-do-not-use-core.js +0 -49
- package/checkbox/internal-do-not-use-core.js +0 -16
- package/container/internal-do-not-use-core.js +0 -34
- package/date-input/internal-do-not-use-core.js +0 -16
- package/flashbar/internal-do-not-use-core.js +0 -15
- package/icon/internal-do-not-use-core.js +0 -13
- package/input/internal-do-not-use-core.js +0 -59
- package/link/internal-do-not-use-core.js +0 -32
- package/progress-bar/internal-do-not-use-core.js +0 -56
- package/prompt-input/internal-do-not-use-core.js +0 -26
- package/radio-group/internal-do-not-use-core.js +0 -27
- package/segmented-control/internal-do-not-use-core.js +0 -19
- package/space-between/internal-do-not-use-core.js +0 -15
- package/spinner/internal-do-not-use-core.js +0 -15
- package/status-indicator/internal-do-not-use-core.js +0 -15
- package/steps/internal-do-not-use-core.js +0 -18
- package/text-filter/internal-do-not-use-core.js +0 -25
- package/textarea/internal-do-not-use-core.js +0 -71
- package/time-input/internal-do-not-use-core.js +0 -22
- package/toggle/internal-do-not-use-core.js +0 -14
- package/toggle-button/internal-do-not-use-core.js +0 -21
- package/wizard/internal-do-not-use-core.js +0 -40
- /package/autosuggest/{internal-do-not-use-core.js.map → index.js.map} +0 -0
- /package/badge/{internal-do-not-use-core.js.map → index.js.map} +0 -0
- /package/box/{internal-do-not-use-core.js.map → index.js.map} +0 -0
- /package/button/{internal-do-not-use-core.js.map → index.js.map} +0 -0
- /package/button-dropdown/{internal-do-not-use-core.js.map → index.js.map} +0 -0
- /package/button-group/{internal-do-not-use-core.js.map → index.js.map} +0 -0
- /package/checkbox/{internal-do-not-use-core.js.map → index.js.map} +0 -0
- /package/container/{internal-do-not-use-core.js.map → index.js.map} +0 -0
- /package/date-input/{internal-do-not-use-core.js.map → index.js.map} +0 -0
- /package/flashbar/{internal-do-not-use-core.js.map → index.js.map} +0 -0
- /package/icon/{internal-do-not-use-core.js.map → index.js.map} +0 -0
- /package/input/{internal-do-not-use-core.js.map → index.js.map} +0 -0
- /package/link/{internal-do-not-use-core.js.map → index.js.map} +0 -0
- /package/progress-bar/{internal-do-not-use-core.js.map → index.js.map} +0 -0
- /package/prompt-input/{internal-do-not-use-core.js.map → index.js.map} +0 -0
- /package/radio-group/{internal-do-not-use-core.js.map → index.js.map} +0 -0
- /package/segmented-control/{internal-do-not-use-core.js.map → index.js.map} +0 -0
- /package/space-between/{internal-do-not-use-core.js.map → index.js.map} +0 -0
- /package/spinner/{internal-do-not-use-core.js.map → index.js.map} +0 -0
- /package/status-indicator/{internal-do-not-use-core.js.map → index.js.map} +0 -0
- /package/steps/{internal-do-not-use-core.js.map → index.js.map} +0 -0
- /package/text-filter/{internal-do-not-use-core.js.map → index.js.map} +0 -0
- /package/textarea/{internal-do-not-use-core.js.map → index.js.map} +0 -0
- /package/time-input/{internal-do-not-use-core.js.map → index.js.map} +0 -0
- /package/toggle/{internal-do-not-use-core.js.map → index.js.map} +0 -0
- /package/toggle-button/{internal-do-not-use-core.js.map → index.js.map} +0 -0
- /package/wizard/{internal-do-not-use-core.js.map → index.js.map} +0 -0
package/table/thead.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"thead.js","sourceRoot":"","sources":["../../../src/table/thead.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAEvE,OAAO,EAAE,sBAAsB,EAA6B,MAAM,oBAAoB,CAAC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C,CAAC,QAAQ,EACjD,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAE,YAAY,EAC1B,cAAc,EAAE,GAAG,EAAE,CAAC,cAAc,CAAC,YAAY,CAAC,EAClD,gBAAgB,EAAE,gBAAgB,EAClC,cAAc,EAAE,eAAe,CAAC,MAAM,EAAE,QAAQ,CAAC,EACjD,OAAO,EAAE,MAAM,CAAC,EAAE;wBAChB,iBAAiB,CAAC,SAAS,CAAC,CAAC;wBAC7B,sBAAsB,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;oBAClD,CAAC,EACD,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC,UAAU,EAC/B,OAAO,EAAE,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,CAAC,EAChD,SAAS,EAAE,SAAS,EACpB,sBAAsB,EAAE,sBAAsB,EAC9C,kBAAkB,EAAE,kBAAkB;oBACtC,8EAA8E;oBAC9E,uGAAuG;oBACvG,YAAY,EAAE,QAAQ,KAAK,CAAC,IAAI,YAAY,EAC5C,iBAAiB,EAAE,MAAM,IAAI,CAAC,gBAAgB,IAAI,MAAM,CAAC,iBAAiB,GAC1E,CACH,CAAC;YACJ,CAAC,CAAC,CACC,CACC,CACT,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,KAAK,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport { findUpUntil } from '@cloudscape-design/component-toolkit/dom';\n\nimport { fireNonCancelableEvent, NonCancelableEventHandler } from '../internal/events';\nimport { TableHeaderCell } from './header-cell';\nimport { TableProps } from './interfaces';\nimport { focusMarkers, SelectionProps } from './selection';\nimport { TableHeaderSelectionCell } from './selection/selection-cell';\nimport { StickyColumnsModel } from './sticky-columns';\nimport { getTableHeaderRowRoleProps, TableRole } from './table-role';\nimport { useColumnWidths } from './use-column-widths';\nimport { getColumnKey } from './utils';\n\nimport styles from './styles.css.js';\n\nexport interface TheadProps {\n selectionType: TableProps.SelectionType | undefined;\n columnDefinitions: ReadonlyArray<TableProps.ColumnDefinition<any>>;\n sortingColumn: TableProps.SortingColumn<any> | undefined;\n sortingDescending: boolean | undefined;\n sortingDisabled: boolean | undefined;\n variant: TableProps.Variant;\n tableVariant?:
|
|
1
|
+
{"version":3,"file":"thead.js","sourceRoot":"","sources":["../../../src/table/thead.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAEvE,OAAO,EAAE,sBAAsB,EAA6B,MAAM,oBAAoB,CAAC;AACvF,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,OAAO,EAAE,YAAY,EAAkB,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,OAAO,EAAE,0BAA0B,EAAa,MAAM,cAAc,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAgCrC,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAC5B,CACE,EACE,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,OAAO,EACP,YAAY,EACZ,SAAS,EACT,WAAW,EACX,eAAe,EACf,cAAc,EACd,8BAA8B,EAC9B,WAAW,EACX,MAAM,GAAG,KAAK,EACd,MAAM,GAAG,KAAK,EACd,KAAK,GAAG,KAAK,EACb,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,wBAAwB,EACxB,SAA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AAM,CAAC,iBAAiB,GAC1E,CACH,CAAC;YACJ,CAAC,CAAC,CACC,CACC,CACT,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,KAAK,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport { findUpUntil } from '@cloudscape-design/component-toolkit/dom';\n\nimport { fireNonCancelableEvent, NonCancelableEventHandler } from '../internal/events';\nimport { TableHeaderCell } from './header-cell';\nimport { TableProps } from './interfaces';\nimport { focusMarkers, SelectionProps } from './selection';\nimport { TableHeaderSelectionCell } from './selection/selection-cell';\nimport { StickyColumnsModel } from './sticky-columns';\nimport { getTableHeaderRowRoleProps, TableRole } from './table-role';\nimport { useColumnWidths } from './use-column-widths';\nimport { getColumnKey } from './utils';\n\nimport styles from './styles.css.js';\n\nexport interface TheadProps {\n selectionType: TableProps.SelectionType | undefined;\n columnDefinitions: ReadonlyArray<TableProps.ColumnDefinition<any>>;\n sortingColumn: TableProps.SortingColumn<any> | undefined;\n sortingDescending: boolean | undefined;\n sortingDisabled: boolean | undefined;\n variant: TableProps.Variant;\n tableVariant?: TableProps.Variant;\n wrapLines: boolean | undefined;\n resizableColumns: boolean | undefined;\n getSelectAllProps?: () => SelectionProps;\n onFocusMove: ((sourceElement: HTMLElement, fromIndex: number, direction: -1 | 1) => void) | undefined;\n onResizeFinish: (newWidths: Map<PropertyKey, number>) => void;\n onSortingChange: NonCancelableEventHandler<TableProps.SortingState<any>> | undefined;\n sticky?: boolean;\n hidden?: boolean;\n stuck?: boolean;\n singleSelectionHeaderAriaLabel?: string;\n resizerRoleDescription?: string;\n resizerTooltipText?: string;\n stripedRows?: boolean;\n stickyState: StickyColumnsModel;\n selectionColumnId: PropertyKey;\n focusedComponent?: null | string;\n onFocusedComponentChange?: (focusId: null | string) => void;\n tableRole: TableRole;\n isExpandable?: boolean;\n setLastUserAction: (name: string) => void;\n}\n\nconst Thead = React.forwardRef(\n (\n {\n selectionType,\n getSelectAllProps,\n columnDefinitions,\n sortingColumn,\n sortingDisabled,\n sortingDescending,\n resizableColumns,\n variant,\n tableVariant,\n wrapLines,\n onFocusMove,\n onSortingChange,\n onResizeFinish,\n singleSelectionHeaderAriaLabel,\n stripedRows,\n sticky = false,\n hidden = false,\n stuck = false,\n stickyState,\n selectionColumnId,\n focusedComponent,\n onFocusedComponentChange,\n tableRole,\n resizerRoleDescription,\n resizerTooltipText,\n isExpandable,\n setLastUserAction,\n }: TheadProps,\n outerRef: React.Ref<HTMLTableRowElement>\n ) => {\n const { getColumnStyles, columnWidths, updateColumn, setCell } = useColumnWidths();\n\n const commonCellProps = {\n stuck,\n sticky,\n hidden,\n stripedRows,\n tableRole,\n variant,\n tableVariant,\n stickyState,\n };\n\n return (\n <thead className={clsx(!hidden && styles['thead-active'])}>\n <tr\n {...focusMarkers.all}\n ref={outerRef}\n aria-rowindex={1}\n {...getTableHeaderRowRoleProps({ tableRole })}\n onFocus={event => {\n const focusControlElement = findUpUntil(event.target, element => !!element.getAttribute('data-focus-id'));\n const focusId = focusControlElement?.getAttribute('data-focus-id') ?? null;\n onFocusedComponentChange?.(focusId);\n }}\n onBlur={() => onFocusedComponentChange?.(null)}\n >\n {selectionType ? (\n <TableHeaderSelectionCell\n {...commonCellProps}\n focusedComponent={focusedComponent}\n columnId={selectionColumnId}\n getSelectAllProps={getSelectAllProps}\n onFocusMove={onFocusMove}\n singleSelectionHeaderAriaLabel={singleSelectionHeaderAriaLabel}\n />\n ) : null}\n\n {columnDefinitions.map((column, colIndex) => {\n const columnId = getColumnKey(column, colIndex);\n return (\n <TableHeaderCell\n {...commonCellProps}\n key={columnId}\n tabIndex={sticky ? -1 : 0}\n focusedComponent={focusedComponent}\n column={column}\n activeSortingColumn={sortingColumn}\n sortingDescending={sortingDescending}\n sortingDisabled={sortingDisabled}\n wrapLines={wrapLines}\n colIndex={selectionType ? colIndex + 1 : colIndex}\n columnId={columnId}\n updateColumn={updateColumn}\n onResizeFinish={() => onResizeFinish(columnWidths)}\n resizableColumns={resizableColumns}\n resizableStyle={getColumnStyles(sticky, columnId)}\n onClick={detail => {\n setLastUserAction('sorting');\n fireNonCancelableEvent(onSortingChange, detail);\n }}\n isEditable={!!column.editConfig}\n cellRef={node => setCell(sticky, columnId, node)}\n tableRole={tableRole}\n resizerRoleDescription={resizerRoleDescription}\n resizerTooltipText={resizerTooltipText}\n // Expandable option is only applicable to the first data column of the table.\n // When present, the header content receives extra padding to match the first offset in the data cells.\n isExpandable={colIndex === 0 && isExpandable}\n hasDynamicContent={hidden && !resizableColumns && column.hasDynamicContent}\n />\n );\n })}\n </tr>\n </thead>\n );\n }\n);\n\nexport default Thead;\n"]}
|
package/text-filter/index.js
CHANGED
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
'use client';
|
|
3
4
|
import React from 'react';
|
|
4
|
-
|
|
5
|
-
import
|
|
5
|
+
import { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';
|
|
6
|
+
import useBaseComponent from '../internal/hooks/use-base-component';
|
|
6
7
|
import { applyDisplayName } from '../internal/utils/apply-display-name';
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
import InternalTextFilter from './internal';
|
|
11
9
|
const TextFilter = React.forwardRef((props, ref) => {
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
const baseComponentProps = useBaseComponent('TextFilter', {
|
|
11
|
+
props: { disabled: props.disabled, disableBrowserAutocorrect: props.disableBrowserAutocorrect },
|
|
12
|
+
});
|
|
13
|
+
const componentAnalyticsMetadata = {
|
|
14
|
+
name: 'awsui.TextFilter',
|
|
15
|
+
label: 'input',
|
|
16
|
+
properties: {
|
|
17
|
+
disabled: `${!!props.disabled}`,
|
|
18
|
+
filteringText: props.filteringText || '',
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
return (React.createElement(InternalTextFilter, { ...props, ...baseComponentProps, ref: ref, ...getAnalyticsMetadataAttribute({ component: componentAnalyticsMetadata }) }));
|
|
14
22
|
});
|
|
15
|
-
|
|
16
|
-
|
|
17
23
|
applyDisplayName(TextFilter, 'TextFilter');
|
|
18
24
|
export default TextFilter;
|
|
25
|
+
//# sourceMappingURL=index.js.map
|
package/textarea/index.js
CHANGED
|
@@ -1,18 +1,71 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import
|
|
3
|
+
'use client';
|
|
4
|
+
import React, { useRef } from 'react';
|
|
5
|
+
import clsx from 'clsx';
|
|
6
|
+
import { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';
|
|
7
|
+
import { convertAutoComplete } from '../input/utils';
|
|
8
|
+
import { getBaseProps } from '../internal/base-component';
|
|
9
|
+
import { useFormFieldContext } from '../internal/context/form-field-context';
|
|
10
|
+
import { fireKeyboardEvent, fireNonCancelableEvent } from '../internal/events';
|
|
11
|
+
import useForwardFocus from '../internal/hooks/forward-focus';
|
|
12
|
+
import useBaseComponent from '../internal/hooks/use-base-component';
|
|
6
13
|
import { applyDisplayName } from '../internal/utils/apply-display-name';
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
+
import WithNativeAttributes from '../internal/utils/with-native-attributes';
|
|
15
|
+
import { getTextareaStyles } from './styles';
|
|
16
|
+
import styles from './styles.css.js';
|
|
17
|
+
const Textarea = React.forwardRef(({ value, autoComplete = true, disabled, readOnly, disableBrowserAutocorrect, disableBrowserSpellcheck, spellcheck, onKeyDown, onKeyUp, onChange, onBlur, onFocus, ariaRequired, name, rows, placeholder, autoFocus, ariaLabel, nativeTextareaAttributes, style, ...rest }, ref) => {
|
|
18
|
+
const { __internalRootRef } = useBaseComponent('Textarea', {
|
|
19
|
+
props: { autoComplete, autoFocus, disableBrowserAutocorrect, disableBrowserSpellcheck, readOnly, spellcheck },
|
|
20
|
+
});
|
|
21
|
+
const { ariaLabelledby, ariaDescribedby, controlId, invalid, warning } = useFormFieldContext(rest);
|
|
22
|
+
const baseProps = getBaseProps(rest);
|
|
23
|
+
const textareaRef = useRef(null);
|
|
24
|
+
useForwardFocus(ref, textareaRef);
|
|
25
|
+
const attributes = {
|
|
26
|
+
'aria-label': ariaLabel,
|
|
27
|
+
'aria-labelledby': ariaLabelledby,
|
|
28
|
+
'aria-describedby': ariaDescribedby,
|
|
29
|
+
'aria-required': ariaRequired ? 'true' : undefined,
|
|
30
|
+
'aria-invalid': invalid ? 'true' : undefined,
|
|
31
|
+
name,
|
|
32
|
+
placeholder,
|
|
33
|
+
autoFocus,
|
|
34
|
+
className: clsx(styles.textarea, {
|
|
35
|
+
[styles['textarea-readonly']]: readOnly,
|
|
36
|
+
[styles['textarea-invalid']]: invalid,
|
|
37
|
+
[styles['textarea-warning']]: warning && !invalid,
|
|
38
|
+
}),
|
|
39
|
+
autoComplete: convertAutoComplete(autoComplete),
|
|
40
|
+
spellCheck: spellcheck,
|
|
41
|
+
disabled,
|
|
42
|
+
readOnly: readOnly ? true : undefined,
|
|
43
|
+
rows: rows || 3,
|
|
44
|
+
onKeyDown: onKeyDown && (event => fireKeyboardEvent(onKeyDown, event)),
|
|
45
|
+
onKeyUp: onKeyUp && (event => fireKeyboardEvent(onKeyUp, event)),
|
|
46
|
+
// We set a default value on the component in order to force it into the controlled mode.
|
|
47
|
+
value: value || '',
|
|
48
|
+
onChange: onChange && (event => fireNonCancelableEvent(onChange, { value: event.target.value })),
|
|
49
|
+
onBlur: onBlur && (() => fireNonCancelableEvent(onBlur)),
|
|
50
|
+
onFocus: onFocus && (() => fireNonCancelableEvent(onFocus)),
|
|
51
|
+
};
|
|
52
|
+
if (disableBrowserAutocorrect) {
|
|
53
|
+
attributes.autoCorrect = 'off';
|
|
54
|
+
attributes.autoCapitalize = 'off';
|
|
55
|
+
}
|
|
56
|
+
if (disableBrowserSpellcheck) {
|
|
57
|
+
attributes.spellCheck = 'false';
|
|
58
|
+
}
|
|
59
|
+
const componentAnalyticsMetadata = {
|
|
60
|
+
name: 'awsui.Textarea',
|
|
61
|
+
label: 'textarea',
|
|
62
|
+
properties: {
|
|
63
|
+
value: value || '',
|
|
64
|
+
},
|
|
65
|
+
};
|
|
66
|
+
return (React.createElement("span", { ...baseProps, className: clsx(styles.root, baseProps.className), ref: __internalRootRef, ...getAnalyticsMetadataAttribute({ component: componentAnalyticsMetadata }) },
|
|
67
|
+
React.createElement(WithNativeAttributes, { ...attributes, tag: "textarea", componentName: "Textarea", nativeAttributes: nativeTextareaAttributes, ref: textareaRef, id: controlId, style: getTextareaStyles(style) })));
|
|
14
68
|
});
|
|
15
|
-
|
|
16
|
-
|
|
17
69
|
applyDisplayName(Textarea, 'Textarea');
|
|
18
70
|
export default Textarea;
|
|
71
|
+
//# sourceMappingURL=index.js.map
|
package/textarea/interfaces.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { BaseKeyDetail } from '../internal/events';
|
|
|
5
5
|
/**
|
|
6
6
|
* @awsuiSystem core
|
|
7
7
|
*/
|
|
8
|
-
|
|
8
|
+
import { NativeAttributes } from '../internal/utils/with-native-attributes';
|
|
9
9
|
export interface TextareaProps extends Omit<BaseInputProps, 'nativeInputAttributes'>, InputKeyEvents, InputAutoCorrect, InputAutoComplete, InputSpellcheck, BaseComponentProps, FormFieldValidationControlProps {
|
|
10
10
|
/**
|
|
11
11
|
* Specifies the number of lines of text to set the height to.
|
|
@@ -31,10 +31,11 @@ export interface TextareaProps extends Omit<BaseInputProps, 'nativeInputAttribut
|
|
|
31
31
|
*
|
|
32
32
|
* @awsuiSystem core
|
|
33
33
|
*/
|
|
34
|
-
|
|
34
|
+
nativeTextareaAttributes?: NativeAttributes<React.TextareaHTMLAttributes<HTMLTextAreaElement>>;
|
|
35
35
|
/**
|
|
36
36
|
* @awsuiSystem core
|
|
37
37
|
*/
|
|
38
|
+
style?: TextareaProps.Style;
|
|
38
39
|
}
|
|
39
40
|
export declare namespace TextareaProps {
|
|
40
41
|
type KeyDetail = BaseKeyDetail;
|
package/time-input/index.js
CHANGED
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
'use client';
|
|
3
4
|
import React from 'react';
|
|
4
|
-
|
|
5
|
-
import CoreComponent from './internal-do-not-use-core';
|
|
5
|
+
import useBaseComponent from '../internal/hooks/use-base-component';
|
|
6
6
|
import { applyDisplayName } from '../internal/utils/apply-display-name';
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
import InternalTimeInput from './internal';
|
|
8
|
+
const TimeInput = React.forwardRef(({ format = 'hh:mm:ss', use24Hour = true, autoComplete = true, ...props }, ref) => {
|
|
9
|
+
const baseComponentProps = useBaseComponent('TimeInput', {
|
|
10
|
+
props: {
|
|
11
|
+
autoFocus: props.autoFocus,
|
|
12
|
+
disableBrowserAutocorrect: props.disableBrowserAutocorrect,
|
|
13
|
+
format,
|
|
14
|
+
readOnly: props.readOnly,
|
|
15
|
+
use24Hour,
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
return (React.createElement(InternalTimeInput, { format: format, use24Hour: use24Hour, autoComplete: autoComplete, ...props, ...baseComponentProps, ref: ref }));
|
|
14
19
|
});
|
|
15
|
-
|
|
16
|
-
|
|
17
20
|
applyDisplayName(TimeInput, 'TimeInput');
|
|
18
21
|
export default TimeInput;
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
package/toggle/index.js
CHANGED
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
'use client';
|
|
3
4
|
import React from 'react';
|
|
4
|
-
|
|
5
|
-
import CoreComponent from './internal-do-not-use-core';
|
|
5
|
+
import useBaseComponent from '../internal/hooks/use-base-component';
|
|
6
6
|
import { applyDisplayName } from '../internal/utils/apply-display-name';
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
import InternalToggle from './internal';
|
|
11
8
|
const Toggle = React.forwardRef((props, ref) => {
|
|
12
|
-
|
|
13
|
-
return React.createElement(
|
|
9
|
+
const baseComponentProps = useBaseComponent('Toggle', { props: { readOnly: props.readOnly } });
|
|
10
|
+
return React.createElement(InternalToggle, { ...props, ...baseComponentProps, ref: ref, __injectAnalyticsComponentMetadata: true });
|
|
14
11
|
});
|
|
15
|
-
|
|
16
|
-
|
|
17
12
|
applyDisplayName(Toggle, 'Toggle');
|
|
18
13
|
export default Toggle;
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
package/toggle/interfaces.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { NonCancelableEventHandler } from '../internal/events';
|
|
|
4
4
|
/**
|
|
5
5
|
* @awsuiSystem core
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
import { NativeAttributes } from '../internal/utils/with-native-attributes';
|
|
8
8
|
export interface ToggleProps extends BaseCheckboxProps {
|
|
9
9
|
/**
|
|
10
10
|
* The control's label that's displayed next to the toggle. Clicking this will invoke a state change.
|
|
@@ -15,7 +15,7 @@ export interface ToggleProps extends BaseCheckboxProps {
|
|
|
15
15
|
/**
|
|
16
16
|
* @awsuiSystem core
|
|
17
17
|
*/
|
|
18
|
-
|
|
18
|
+
style?: ToggleProps.Style;
|
|
19
19
|
/**
|
|
20
20
|
* Attributes to add to the native `input` element.
|
|
21
21
|
* Some attributes will be automatically combined with internal attribute values:
|
|
@@ -26,6 +26,7 @@ export interface ToggleProps extends BaseCheckboxProps {
|
|
|
26
26
|
*
|
|
27
27
|
* @awsuiSystem core
|
|
28
28
|
*/
|
|
29
|
+
nativeInputAttributes?: NativeAttributes<React.InputHTMLAttributes<HTMLInputElement>>;
|
|
29
30
|
}
|
|
30
31
|
export declare namespace ToggleProps {
|
|
31
32
|
interface Ref {
|
package/toggle-button/index.js
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
'use client';
|
|
3
4
|
import React from 'react';
|
|
4
|
-
|
|
5
|
-
import
|
|
5
|
+
import { getBaseProps } from '../internal/base-component';
|
|
6
|
+
import useBaseComponent from '../internal/hooks/use-base-component';
|
|
6
7
|
import { applyDisplayName } from '../internal/utils/apply-display-name';
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
import { InternalToggleButton } from './internal';
|
|
9
|
+
const ToggleButton = React.forwardRef(({ children, iconName, pressedIconName, iconUrl, pressedIconUrl, iconSvg, pressedIconSvg, variant = 'normal', loading = false, loadingText, disabled = false, disabledReason, wrapText = true, ariaLabel, ariaDescribedby, ariaControls, pressed = false, nativeButtonAttributes, onChange, ...props }, ref) => {
|
|
10
|
+
const baseComponentProps = useBaseComponent('ToggleButton', {
|
|
11
|
+
props: { iconName, pressedIconName, pressed, variant, wrapText },
|
|
12
|
+
metadata: {
|
|
13
|
+
hasDisabledReason: Boolean(disabledReason),
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
const baseProps = getBaseProps(props);
|
|
17
|
+
return (React.createElement(InternalToggleButton, { ...baseProps, ...baseComponentProps, ref: ref, iconName: iconName, iconUrl: iconUrl, iconSvg: iconSvg, variant: variant, loading: loading, loadingText: loadingText, disabled: disabled, disabledReason: disabledReason, wrapText: wrapText, ariaLabel: ariaLabel, ariaDescribedby: ariaDescribedby, ariaControls: ariaControls, pressedIconName: pressedIconName, pressedIconUrl: pressedIconUrl, pressedIconSvg: pressedIconSvg, pressed: pressed, nativeButtonAttributes: nativeButtonAttributes, onChange: onChange }, children));
|
|
14
18
|
});
|
|
15
|
-
|
|
16
|
-
|
|
17
19
|
applyDisplayName(ToggleButton, 'ToggleButton');
|
|
18
20
|
export default ToggleButton;
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
package/wizard/index.js
CHANGED
|
@@ -1,18 +1,40 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import
|
|
3
|
+
'use client';
|
|
4
|
+
import React, { useEffect } from 'react';
|
|
5
|
+
import { AnalyticsFunnel } from '../internal/analytics/components/analytics-funnel';
|
|
6
|
+
import { useFunnel } from '../internal/analytics/hooks/use-funnel';
|
|
7
|
+
import { getAnalyticsMetadataProps } from '../internal/base-component';
|
|
8
|
+
import useBaseComponent from '../internal/hooks/use-base-component';
|
|
6
9
|
import { applyDisplayName } from '../internal/utils/apply-display-name';
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
import { getExternalProps } from '../internal/utils/external-props';
|
|
11
|
+
import { getStepConfiguration } from './analytics';
|
|
12
|
+
import InternalWizard from './internal';
|
|
13
|
+
import analyticsSelectors from './analytics-metadata/styles.css.js';
|
|
14
|
+
function Wizard({ isLoadingNextStep = false, allowSkipTo = false, ...props }) {
|
|
15
|
+
const analyticsMetadata = getAnalyticsMetadataProps(props);
|
|
16
|
+
const baseComponentProps = useBaseComponent('Wizard', {
|
|
17
|
+
props: {
|
|
18
|
+
allowSkipTo,
|
|
19
|
+
flowType: analyticsMetadata.flowType,
|
|
20
|
+
},
|
|
21
|
+
metadata: {
|
|
22
|
+
hasInstanceIdentifier: Boolean(analyticsMetadata === null || analyticsMetadata === void 0 ? void 0 : analyticsMetadata.instanceIdentifier),
|
|
23
|
+
hasResourceType: Boolean(analyticsMetadata === null || analyticsMetadata === void 0 ? void 0 : analyticsMetadata.resourceType),
|
|
24
|
+
},
|
|
25
|
+
}, analyticsMetadata);
|
|
26
|
+
const { wizardCount } = useFunnel();
|
|
27
|
+
const externalProps = getExternalProps(props);
|
|
28
|
+
useEffect(() => {
|
|
29
|
+
wizardCount.current++;
|
|
30
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
31
|
+
return () => void wizardCount.current--;
|
|
32
|
+
}, [wizardCount]);
|
|
33
|
+
return (React.createElement(AnalyticsFunnel, { funnelIdentifier: analyticsMetadata === null || analyticsMetadata === void 0 ? void 0 : analyticsMetadata.instanceIdentifier, funnelFlowType: analyticsMetadata === null || analyticsMetadata === void 0 ? void 0 : analyticsMetadata.flowType, funnelErrorContext: analyticsMetadata === null || analyticsMetadata === void 0 ? void 0 : analyticsMetadata.errorContext, funnelResourceType: analyticsMetadata === null || analyticsMetadata === void 0 ? void 0 : analyticsMetadata.resourceType, funnelType: "multi-page", optionalStepNumbers: props.steps
|
|
34
|
+
.map((step, index) => (step.isOptional ? index + 1 : -1))
|
|
35
|
+
.filter(step => step !== -1), totalFunnelSteps: props.steps.length, stepConfiguration: getStepConfiguration(props.steps), componentSelectors: () => [`.${analyticsSelectors.root}`] },
|
|
36
|
+
React.createElement(InternalWizard, { isLoadingNextStep: isLoadingNextStep, allowSkipTo: allowSkipTo, ...externalProps, ...baseComponentProps, __injectAnalyticsComponentMetadata: true })));
|
|
37
|
+
}
|
|
17
38
|
applyDisplayName(Wizard, 'Wizard');
|
|
18
39
|
export default Wizard;
|
|
40
|
+
//# sourceMappingURL=index.js.map
|
package/wizard/interfaces.d.ts
CHANGED
|
@@ -96,7 +96,7 @@ export interface WizardProps extends BaseComponentProps {
|
|
|
96
96
|
*
|
|
97
97
|
* @awsuiSystem core
|
|
98
98
|
*/
|
|
99
|
-
|
|
99
|
+
customPrimaryActions?: React.ReactNode;
|
|
100
100
|
/**
|
|
101
101
|
* Specifies left-aligned secondary actions for the wizard. Use a button dropdown if multiple actions are required.
|
|
102
102
|
*/
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
'use client';
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';
|
|
6
|
-
import useBaseComponent from '../internal/hooks/use-base-component';
|
|
7
|
-
import { applyDisplayName } from '../internal/utils/apply-display-name';
|
|
8
|
-
import { getExternalProps } from '../internal/utils/external-props';
|
|
9
|
-
import InternalAutosuggest from './internal';
|
|
10
|
-
const Autosuggest = React.forwardRef(({ filteringType = 'auto', statusType = 'finished', disableBrowserAutocorrect = false, hideEnteredTextOption = false, ...props }, ref) => {
|
|
11
|
-
const baseComponentProps = useBaseComponent('Autosuggest', {
|
|
12
|
-
props: {
|
|
13
|
-
autoFocus: props.autoFocus,
|
|
14
|
-
disableBrowserAutocorrect,
|
|
15
|
-
expandToViewport: props.expandToViewport,
|
|
16
|
-
filteringType,
|
|
17
|
-
readOnly: props.readOnly,
|
|
18
|
-
virtualScroll: props.virtualScroll,
|
|
19
|
-
hideEnteredTextOption,
|
|
20
|
-
},
|
|
21
|
-
});
|
|
22
|
-
const componentAnalyticsMetadata = {
|
|
23
|
-
name: 'awsui.Autosuggest',
|
|
24
|
-
label: 'input',
|
|
25
|
-
properties: {
|
|
26
|
-
disabled: `${!!props.disabled}`,
|
|
27
|
-
value: props.value || '',
|
|
28
|
-
},
|
|
29
|
-
};
|
|
30
|
-
const externalProps = getExternalProps(props);
|
|
31
|
-
return (React.createElement(InternalAutosuggest, { filteringType: filteringType, statusType: statusType, disableBrowserAutocorrect: disableBrowserAutocorrect, hideEnteredTextOption: hideEnteredTextOption, ...externalProps, ...baseComponentProps, ref: ref, ...getAnalyticsMetadataAttribute({ component: componentAnalyticsMetadata }) }));
|
|
32
|
-
});
|
|
33
|
-
applyDisplayName(Autosuggest, 'Autosuggest');
|
|
34
|
-
export default Autosuggest;
|
|
35
|
-
//# sourceMappingURL=internal-do-not-use-core.js.map
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
'use client';
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import clsx from 'clsx';
|
|
6
|
-
import { getBaseProps } from '../internal/base-component';
|
|
7
|
-
import useBaseComponent from '../internal/hooks/use-base-component';
|
|
8
|
-
import { applyDisplayName } from '../internal/utils/apply-display-name';
|
|
9
|
-
import WithNativeAttributes from '../internal/utils/with-native-attributes';
|
|
10
|
-
import { getBadgeStyles } from './style';
|
|
11
|
-
import styles from './styles.css.js';
|
|
12
|
-
export default function Badge({ color = 'grey', children, style, nativeAttributes, ...rest }) {
|
|
13
|
-
const { __internalRootRef } = useBaseComponent('Badge', { props: { color } });
|
|
14
|
-
const baseProps = getBaseProps(rest);
|
|
15
|
-
const className = clsx(baseProps.className, styles.badge, styles[`badge-color-${color}`]);
|
|
16
|
-
return (React.createElement(WithNativeAttributes, { ...baseProps, tag: "span", componentName: "Badge", nativeAttributes: nativeAttributes, className: className, ref: __internalRootRef, style: getBadgeStyles(style) }, children));
|
|
17
|
-
}
|
|
18
|
-
applyDisplayName(Badge, 'Badge');
|
|
19
|
-
//# sourceMappingURL=internal-do-not-use-core.js.map
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
'use client';
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import useBaseComponent from '../internal/hooks/use-base-component';
|
|
6
|
-
import { applyDisplayName } from '../internal/utils/apply-display-name';
|
|
7
|
-
import InternalBox from './internal';
|
|
8
|
-
export default function Box({ variant = 'div', margin = {}, padding = {}, ...props }) {
|
|
9
|
-
const baseComponentProps = useBaseComponent('Box', {
|
|
10
|
-
props: {
|
|
11
|
-
color: props.color,
|
|
12
|
-
display: props.display,
|
|
13
|
-
float: props.float,
|
|
14
|
-
fontSize: props.fontSize,
|
|
15
|
-
fontWeight: props.fontWeight,
|
|
16
|
-
textAlign: props.textAlign,
|
|
17
|
-
variant,
|
|
18
|
-
},
|
|
19
|
-
});
|
|
20
|
-
return React.createElement(InternalBox, { variant: variant, margin: margin, padding: padding, ...props, ...baseComponentProps });
|
|
21
|
-
}
|
|
22
|
-
applyDisplayName(Box, 'Box');
|
|
23
|
-
//# sourceMappingURL=internal-do-not-use-core.js.map
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
'use client';
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import { getBaseProps } from '../internal/base-component';
|
|
6
|
-
import useBaseComponent from '../internal/hooks/use-base-component';
|
|
7
|
-
import { applyDisplayName } from '../internal/utils/apply-display-name';
|
|
8
|
-
import { InternalButton } from './internal';
|
|
9
|
-
const Button = React.forwardRef(({ children, iconName, iconAlign = 'left', iconUrl, iconSvg, iconAlt, variant = 'normal', loading = false, loadingText, disabled = false, disabledReason, wrapText = true, href, target, rel, external = false, download, formAction = 'submit', ariaLabel, ariaDescribedby, onClick, onFollow, ariaExpanded, ariaControls, fullWidth, form, i18nStrings, style, nativeButtonAttributes, nativeAnchorAttributes, ...props }, ref) => {
|
|
10
|
-
const baseComponentProps = useBaseComponent('Button', {
|
|
11
|
-
props: { formAction, fullWidth, iconAlign, iconName, rel, target, external, variant, wrapText },
|
|
12
|
-
metadata: { hasDisabledReason: Boolean(disabledReason) },
|
|
13
|
-
});
|
|
14
|
-
const baseProps = getBaseProps(props);
|
|
15
|
-
return (React.createElement(InternalButton, { ...baseProps, ...baseComponentProps, ref: ref, iconName: iconName, iconAlign: iconAlign, iconUrl: iconUrl, iconSvg: iconSvg, iconAlt: iconAlt, variant: variant, loading: loading, loadingText: loadingText, disabled: disabled, disabledReason: disabledReason, wrapText: wrapText, href: href, target: target, rel: rel, external: external, download: download, formAction: formAction, ariaLabel: ariaLabel, ariaDescribedby: ariaDescribedby, onClick: onClick, onFollow: onFollow, ariaExpanded: ariaExpanded, ariaControls: ariaControls, fullWidth: fullWidth, form: form, i18nStrings: i18nStrings, style: style, nativeButtonAttributes: nativeButtonAttributes, nativeAnchorAttributes: nativeAnchorAttributes, __injectAnalyticsComponentMetadata: true }, children));
|
|
16
|
-
});
|
|
17
|
-
applyDisplayName(Button, 'Button');
|
|
18
|
-
export default Button;
|
|
19
|
-
//# sourceMappingURL=internal-do-not-use-core.js.map
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
'use client';
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';
|
|
6
|
-
import { getBaseProps } from '../internal/base-component';
|
|
7
|
-
import useBaseComponent from '../internal/hooks/use-base-component';
|
|
8
|
-
import { applyDisplayName } from '../internal/utils/apply-display-name';
|
|
9
|
-
import InternalButtonDropdown from './internal';
|
|
10
|
-
import { hasCheckboxItems, hasDisabledReasonItems } from './utils/utils';
|
|
11
|
-
import analyticsSelectors from './analytics-metadata/styles.css.js';
|
|
12
|
-
const ButtonDropdown = React.forwardRef(({ items, variant = 'normal', loading = false, loadingText, disabled = false, disabledReason, expandableGroups = false, expandToViewport = false, ariaLabel, children, onItemClick, onItemFollow, mainAction, fullWidth, nativeMainActionAttributes, nativeTriggerAttributes, ...props }, ref) => {
|
|
13
|
-
const baseComponentProps = useBaseComponent('ButtonDropdown', {
|
|
14
|
-
props: { expandToViewport, expandableGroups, variant },
|
|
15
|
-
metadata: {
|
|
16
|
-
mainAction: !!mainAction,
|
|
17
|
-
checkboxItems: hasCheckboxItems(items),
|
|
18
|
-
hasDisabledReason: Boolean(disabledReason),
|
|
19
|
-
hasDisabledReasons: hasDisabledReasonItems(items),
|
|
20
|
-
},
|
|
21
|
-
});
|
|
22
|
-
const baseProps = getBaseProps(props);
|
|
23
|
-
const analyticsComponentMetadata = {
|
|
24
|
-
name: 'awsui.ButtonDropdown',
|
|
25
|
-
label: `.${analyticsSelectors['trigger-label']}`,
|
|
26
|
-
properties: { variant, disabled: `${disabled}` },
|
|
27
|
-
};
|
|
28
|
-
return (React.createElement(InternalButtonDropdown, { ...baseProps, ...baseComponentProps, ref: ref, items: items, variant: variant, loading: loading, loadingText: loadingText, disabled: disabled, disabledReason: disabledReason, expandableGroups: expandableGroups, expandToViewport: expandToViewport, ariaLabel: ariaLabel, onItemClick: onItemClick, onItemFollow: onItemFollow, mainAction: mainAction, fullWidth: fullWidth, nativeMainActionAttributes: nativeMainActionAttributes, nativeTriggerAttributes: nativeTriggerAttributes, ...getAnalyticsMetadataAttribute({
|
|
29
|
-
component: analyticsComponentMetadata,
|
|
30
|
-
}) }, children));
|
|
31
|
-
});
|
|
32
|
-
applyDisplayName(ButtonDropdown, 'ButtonDropdown');
|
|
33
|
-
export default ButtonDropdown;
|
|
34
|
-
//# sourceMappingURL=internal-do-not-use-core.js.map
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
'use client';
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';
|
|
6
|
-
import { getBaseProps } from '../internal/base-component';
|
|
7
|
-
import useBaseComponent from '../internal/hooks/use-base-component';
|
|
8
|
-
import { applyDisplayName } from '../internal/utils/apply-display-name';
|
|
9
|
-
import { getExternalProps } from '../internal/utils/external-props';
|
|
10
|
-
import InternalButtonGroup from './internal';
|
|
11
|
-
const ButtonGroup = React.forwardRef(({ variant, dropdownExpandToViewport = false, style, ...rest }, ref) => {
|
|
12
|
-
const baseProps = getBaseProps(rest);
|
|
13
|
-
const itemCounts = getItemCounts(rest.items);
|
|
14
|
-
const baseComponentProps = useBaseComponent('ButtonGroup', {
|
|
15
|
-
props: {
|
|
16
|
-
variant,
|
|
17
|
-
dropdownExpandToViewport,
|
|
18
|
-
},
|
|
19
|
-
metadata: {
|
|
20
|
-
iconButtonsCount: itemCounts['icon-button'],
|
|
21
|
-
iconToggleButtonsCount: itemCounts['icon-toggle-button'],
|
|
22
|
-
iconFileInputsCount: itemCounts['icon-file-input'],
|
|
23
|
-
menuDropdownsCount: itemCounts['menu-dropdown'],
|
|
24
|
-
groupsCount: itemCounts.group,
|
|
25
|
-
},
|
|
26
|
-
});
|
|
27
|
-
const externalProps = getExternalProps(rest);
|
|
28
|
-
const componentMetadata = {
|
|
29
|
-
name: 'awsui.ButtonGroup',
|
|
30
|
-
label: { root: 'self' },
|
|
31
|
-
};
|
|
32
|
-
return (React.createElement(InternalButtonGroup, { ...baseProps, ...baseComponentProps, ...externalProps, ref: ref, variant: variant, dropdownExpandToViewport: dropdownExpandToViewport, style: style, ...getAnalyticsMetadataAttribute({ component: componentMetadata }) }));
|
|
33
|
-
});
|
|
34
|
-
function getItemCounts(allItems = []) {
|
|
35
|
-
const counters = { 'icon-button': 0, 'icon-toggle-button': 0, 'icon-file-input': 0, 'menu-dropdown': 0, group: 0 };
|
|
36
|
-
function count(items) {
|
|
37
|
-
for (const item of items) {
|
|
38
|
-
counters[item.type] += 1;
|
|
39
|
-
if (item.type === 'group') {
|
|
40
|
-
count(item.items);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
count(allItems);
|
|
45
|
-
return counters;
|
|
46
|
-
}
|
|
47
|
-
applyDisplayName(ButtonGroup, 'ButtonGroup');
|
|
48
|
-
export default ButtonGroup;
|
|
49
|
-
//# sourceMappingURL=internal-do-not-use-core.js.map
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
'use client';
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import useBaseComponent from '../internal/hooks/use-base-component';
|
|
6
|
-
import { applyDisplayName } from '../internal/utils/apply-display-name';
|
|
7
|
-
import InternalCheckbox from './internal';
|
|
8
|
-
const Checkbox = React.forwardRef(({ ...props }, ref) => {
|
|
9
|
-
const baseComponentProps = useBaseComponent('Checkbox', {
|
|
10
|
-
props: { readOnly: props.readOnly },
|
|
11
|
-
});
|
|
12
|
-
return React.createElement(InternalCheckbox, { ...props, ...baseComponentProps, ref: ref, __injectAnalyticsComponentMetadata: true });
|
|
13
|
-
});
|
|
14
|
-
applyDisplayName(Checkbox, 'Checkbox');
|
|
15
|
-
export default Checkbox;
|
|
16
|
-
//# sourceMappingURL=internal-do-not-use-core.js.map
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
'use client';
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';
|
|
6
|
-
import { AnalyticsFunnelSubStep } from '../internal/analytics/components/analytics-funnel';
|
|
7
|
-
import { getAnalyticsMetadataProps } from '../internal/base-component';
|
|
8
|
-
import useBaseComponent from '../internal/hooks/use-base-component';
|
|
9
|
-
import { applyDisplayName } from '../internal/utils/apply-display-name';
|
|
10
|
-
import { getExternalProps } from '../internal/utils/external-props';
|
|
11
|
-
import { InternalContainerAsSubstep } from './internal';
|
|
12
|
-
export default function Container({ variant = 'default', disableHeaderPaddings = false, disableContentPaddings = false, fitHeight = false, ...props }) {
|
|
13
|
-
const analyticsMetadata = getAnalyticsMetadataProps(props);
|
|
14
|
-
const baseComponentProps = useBaseComponent('Container', {
|
|
15
|
-
props: {
|
|
16
|
-
disableContentPaddings,
|
|
17
|
-
disableHeaderPaddings,
|
|
18
|
-
fitHeight,
|
|
19
|
-
variant,
|
|
20
|
-
},
|
|
21
|
-
metadata: {
|
|
22
|
-
hasInstanceIdentifier: Boolean(analyticsMetadata === null || analyticsMetadata === void 0 ? void 0 : analyticsMetadata.instanceIdentifier),
|
|
23
|
-
},
|
|
24
|
-
}, analyticsMetadata);
|
|
25
|
-
const externalProps = getExternalProps(props);
|
|
26
|
-
const analyticsComponentMetadata = {
|
|
27
|
-
name: 'awsui.Container',
|
|
28
|
-
label: { root: 'self' },
|
|
29
|
-
};
|
|
30
|
-
return (React.createElement(AnalyticsFunnelSubStep, { subStepIdentifier: analyticsMetadata === null || analyticsMetadata === void 0 ? void 0 : analyticsMetadata.instanceIdentifier, subStepErrorContext: analyticsMetadata === null || analyticsMetadata === void 0 ? void 0 : analyticsMetadata.errorContext },
|
|
31
|
-
React.createElement(InternalContainerAsSubstep, { variant: variant, disableContentPaddings: disableContentPaddings, disableHeaderPaddings: disableHeaderPaddings, fitHeight: fitHeight, ...props, ...externalProps, ...baseComponentProps, ...getAnalyticsMetadataAttribute({ component: analyticsComponentMetadata }) })));
|
|
32
|
-
}
|
|
33
|
-
applyDisplayName(Container, 'Container');
|
|
34
|
-
//# sourceMappingURL=internal-do-not-use-core.js.map
|