@cloudscape-design/components 3.0.524 → 3.0.526
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/defaults.d.ts +2 -2
- package/app-layout/defaults.d.ts.map +1 -1
- package/app-layout/defaults.js.map +1 -1
- package/app-layout/drawer/interfaces.d.ts +2 -3
- package/app-layout/drawer/interfaces.d.ts.map +1 -1
- package/app-layout/drawer/interfaces.js.map +1 -1
- package/app-layout/drawer/resizable-drawer.d.ts +1 -1
- package/app-layout/drawer/resizable-drawer.d.ts.map +1 -1
- package/app-layout/drawer/resizable-drawer.js +9 -18
- package/app-layout/drawer/resizable-drawer.js.map +1 -1
- package/app-layout/index.d.ts.map +1 -1
- package/app-layout/index.js +41 -79
- package/app-layout/index.js.map +1 -1
- package/app-layout/split-panel/constants.d.ts +3 -0
- package/app-layout/split-panel/constants.d.ts.map +1 -0
- package/app-layout/split-panel/constants.js +5 -0
- package/app-layout/split-panel/constants.js.map +1 -0
- package/app-layout/split-panel/index.d.ts +1 -0
- package/app-layout/split-panel/index.d.ts.map +1 -1
- package/app-layout/split-panel/index.js +1 -0
- package/app-layout/split-panel/index.js.map +1 -1
- package/app-layout/split-panel/provider.d.ts +2 -2
- package/app-layout/split-panel/provider.d.ts.map +1 -1
- package/app-layout/split-panel/provider.js +18 -16
- package/app-layout/split-panel/provider.js.map +1 -1
- package/app-layout/utils/use-app-layout-rect.d.ts +8 -0
- package/app-layout/utils/use-app-layout-rect.d.ts.map +1 -0
- package/app-layout/utils/{use-content-width.js → use-app-layout-rect.js} +6 -5
- package/app-layout/utils/use-app-layout-rect.js.map +1 -0
- package/app-layout/visual-refresh/split-panel.js +1 -1
- package/app-layout/visual-refresh/split-panel.js.map +1 -1
- package/button-dropdown/styles.css.js +15 -15
- package/button-dropdown/styles.scoped.css +23 -23
- package/button-dropdown/styles.selectors.js +15 -15
- package/container/index.d.ts +1 -1
- package/container/index.d.ts.map +1 -1
- package/container/index.js +5 -3
- package/container/index.js.map +1 -1
- package/flashbar/common.d.ts +0 -1
- package/flashbar/common.d.ts.map +1 -1
- package/flashbar/common.js +3 -2
- package/flashbar/common.js.map +1 -1
- package/internal/base-component/styles.scoped.css +0 -5
- package/internal/environment.js +1 -1
- package/internal/environment.json +1 -1
- package/internal/generated/theming/index.cjs +0 -31
- package/internal/generated/theming/index.js +0 -31
- package/internal/hooks/use-base-component/index.d.ts +2 -1
- package/internal/hooks/use-base-component/index.d.ts.map +1 -1
- package/internal/hooks/use-base-component/index.js +2 -2
- package/internal/hooks/use-base-component/index.js.map +1 -1
- package/internal/hooks/use-telemetry/index.d.ts +2 -1
- package/internal/hooks/use-telemetry/index.d.ts.map +1 -1
- package/internal/hooks/use-telemetry/index.js +2 -2
- package/internal/hooks/use-telemetry/index.js.map +1 -1
- package/internal/manifest.json +1 -1
- package/package.json +1 -1
- package/table/index.d.ts.map +1 -1
- package/table/index.js +11 -1
- package/table/index.js.map +1 -1
- package/app-layout/utils/use-content-width.d.ts +0 -5
- package/app-layout/utils/use-content-width.d.ts.map +0 -1
- package/app-layout/utils/use-content-width.js.map +0 -1
- package/app-layout/utils/use-window-width.d.ts +0 -2
- package/app-layout/utils/use-window-width.d.ts.map +0 -1
- package/app-layout/utils/use-window-width.js +0 -13
- package/app-layout/utils/use-window-width.js.map +0 -1
package/table/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"lib/default/","sources":["table/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAM/D,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,QAAA,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"lib/default/","sources":["table/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAM/D,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,QAAA,MAAM,KAAK,qBAqCa,CAAC;AAGzB,eAAe,KAAK,CAAC"}
|
package/table/index.js
CHANGED
|
@@ -8,7 +8,17 @@ import useBaseComponent from '../internal/hooks/use-base-component';
|
|
|
8
8
|
import { AnalyticsFunnelSubStep } from '../internal/analytics/components/analytics-funnel';
|
|
9
9
|
const Table = React.forwardRef((_a, ref) => {
|
|
10
10
|
var { items = [], selectedItems = [], variant = 'container', contentDensity = 'comfortable' } = _a, props = __rest(_a, ["items", "selectedItems", "variant", "contentDensity"]);
|
|
11
|
-
const baseComponentProps = useBaseComponent('Table'
|
|
11
|
+
const baseComponentProps = useBaseComponent('Table', {
|
|
12
|
+
props: {
|
|
13
|
+
contentDensity,
|
|
14
|
+
resizableColumns: props.resizableColumns,
|
|
15
|
+
selectionType: props.selectionType,
|
|
16
|
+
stickyHeader: props.stickyHeader,
|
|
17
|
+
stripedRows: props.stripedRows,
|
|
18
|
+
variant,
|
|
19
|
+
wrapLines: props.wrapLines,
|
|
20
|
+
},
|
|
21
|
+
});
|
|
12
22
|
const tableProps = Object.assign(Object.assign(Object.assign({ items,
|
|
13
23
|
selectedItems,
|
|
14
24
|
variant,
|
package/table/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["table/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,aAAa,EAAE,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AACnE,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,mDAAmD,CAAC;AAG3F,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAC5B,CACE,EAAkH,EAClH,GAA8B,EAC9B,EAAE;QA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AAI,OAAO,KAAK,UAAU,EAAE;QACtD,OAAO,oBAAC,aAAa,oBAAK,UAAU,EAAI,CAAC;KAC1C;IAED,OAAO,CACL,oBAAC,sBAAsB;QACrB,oBAAC,sBAAsB,oBAAK,UAAU,EAAI,CACnB,CAC1B,CAAC;AACJ,CAAC,CACqB,CAAC;AAEzB,gBAAgB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;AACjC,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 { TableForwardRefType, TableProps } from './interfaces';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\nimport InternalTable, { InternalTableAsSubstep } from './internal';\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport { AnalyticsFunnelSubStep } from '../internal/analytics/components/analytics-funnel';\n\nexport { TableProps };\nconst Table = React.forwardRef(\n <T,>(\n { items = [], selectedItems = [], variant = 'container', contentDensity = 'comfortable', ...props }: TableProps<T>,\n ref: React.Ref<TableProps.Ref>\n ) => {\n const baseComponentProps = useBaseComponent('Table', {\n props: {\n contentDensity,\n resizableColumns: props.resizableColumns,\n selectionType: props.selectionType,\n stickyHeader: props.stickyHeader,\n stripedRows: props.stripedRows,\n variant,\n wrapLines: props.wrapLines,\n },\n });\n\n const tableProps: Parameters<typeof InternalTable<T>>[0] = {\n items,\n selectedItems,\n variant,\n contentDensity,\n ...props,\n ...baseComponentProps,\n ref,\n };\n\n if (variant === 'borderless' || variant === 'embedded') {\n return <InternalTable {...tableProps} />;\n }\n\n return (\n <AnalyticsFunnelSubStep>\n <InternalTableAsSubstep {...tableProps} />\n </AnalyticsFunnelSubStep>\n );\n }\n) as TableForwardRefType;\n\napplyDisplayName(Table, 'Table');\nexport default Table;\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-content-width.d.ts","sourceRoot":"lib/default/","sources":["app-layout/utils/use-content-width.ts"],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UAAU,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IACzD,iBAAiB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;IAE9C,OAAO,OAAO,CAAC;AACjB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { useResizeObserver } from '@cloudscape-design/component-toolkit/internal';\nimport { useCallback, useEffect, useState } from 'react';\n\nexport default function useAppLayoutOffsets(element: HTMLDivElement | null): { left: number; right: number } {\n const [offsets, setOffsets] = useState({ left: 0, right: 0 });\n\n const updatePosition = useCallback(() => {\n if (!element) {\n return;\n }\n const { left, right } = element.getBoundingClientRect();\n const bodyWidth = document.body.clientWidth;\n\n setOffsets({ left, right: bodyWidth - right });\n }, [element]);\n\n useEffect(() => {\n window.addEventListener('resize', updatePosition);\n return () => window.removeEventListener('resize', updatePosition);\n }, [updatePosition]);\n\n const getElement = useCallback(() => element, [element]);\n useResizeObserver(getElement, updatePosition);\n\n return offsets;\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-window-width.d.ts","sourceRoot":"lib/default/","sources":["app-layout/utils/use-window-width.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,OAAO,UAAU,cAAc,WAQrC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
import { useEffect, useState } from 'react';
|
|
4
|
-
export default function useWindowWidth() {
|
|
5
|
-
const [width, setWidth] = useState(() => (typeof window !== 'undefined' ? window.innerWidth : 0));
|
|
6
|
-
useEffect(() => {
|
|
7
|
-
const handler = () => setWidth(window.innerWidth);
|
|
8
|
-
window.addEventListener('resize', handler);
|
|
9
|
-
return () => window.removeEventListener('resize', handler);
|
|
10
|
-
}, []);
|
|
11
|
-
return width;
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=use-window-width.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-window-width.js","sourceRoot":"lib/default/","sources":["app-layout/utils/use-window-width.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE5C,MAAM,CAAC,OAAO,UAAU,cAAc;IACpC,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,CAAC,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAClG,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,OAAO,GAAG,GAAG,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QAClD,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAC3C,OAAO,GAAG,EAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC7D,CAAC,EAAE,EAAE,CAAC,CAAC;IACP,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { useEffect, useState } from 'react';\n\nexport default function useWindowWidth() {\n const [width, setWidth] = useState(() => (typeof window !== 'undefined' ? window.innerWidth : 0));\n useEffect(() => {\n const handler = () => setWidth(window.innerWidth);\n window.addEventListener('resize', handler);\n return () => window.removeEventListener('resize', handler);\n }, []);\n return width;\n}\n"]}
|