@cloudscape-design/components-themeable 3.0.1080 → 3.0.1082
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/internal/manifest.json +1 -1
- package/lib/internal/scss/button/styles.scss +4 -0
- package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +84 -80
- package/lib/internal/template/alert/interfaces.d.ts +0 -16
- package/lib/internal/template/alert/interfaces.d.ts.map +1 -1
- package/lib/internal/template/alert/interfaces.js.map +1 -1
- package/lib/internal/template/alert/styles.css.js +27 -27
- package/lib/internal/template/alert/styles.scoped.css +46 -46
- package/lib/internal/template/alert/styles.selectors.js +27 -27
- package/lib/internal/template/annotation-context/annotation/styles.css.js +24 -24
- package/lib/internal/template/annotation-context/annotation/styles.scoped.css +32 -32
- package/lib/internal/template/annotation-context/annotation/styles.selectors.js +24 -24
- package/lib/internal/template/app-layout/notifications/styles.css.js +3 -3
- package/lib/internal/template/app-layout/notifications/styles.scoped.css +7 -7
- package/lib/internal/template/app-layout/notifications/styles.selectors.js +3 -3
- package/lib/internal/template/app-layout/visual-refresh/styles.css.js +86 -86
- package/lib/internal/template/app-layout/visual-refresh/styles.scoped.css +258 -258
- package/lib/internal/template/app-layout/visual-refresh/styles.selectors.js +86 -86
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.css.js +17 -17
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.scoped.css +39 -39
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.selectors.js +17 -17
- package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/styles.css.js +4 -4
- package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/styles.scoped.css +7 -7
- package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/styles.selectors.js +4 -4
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.css.js +23 -23
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.scoped.css +46 -46
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.selectors.js +23 -23
- package/lib/internal/template/attribute-editor/styles.css.js +15 -15
- package/lib/internal/template/attribute-editor/styles.scoped.css +28 -28
- package/lib/internal/template/attribute-editor/styles.selectors.js +15 -15
- package/lib/internal/template/badge/interfaces.d.ts +0 -9
- package/lib/internal/template/badge/interfaces.d.ts.map +1 -1
- package/lib/internal/template/badge/interfaces.js.map +1 -1
- package/lib/internal/template/breadcrumb-group/item/styles.css.js +7 -7
- package/lib/internal/template/breadcrumb-group/item/styles.scoped.css +28 -28
- package/lib/internal/template/breadcrumb-group/item/styles.selectors.js +7 -7
- package/lib/internal/template/button/interfaces.d.ts +6 -12
- package/lib/internal/template/button/interfaces.d.ts.map +1 -1
- package/lib/internal/template/button/interfaces.js.map +1 -1
- package/lib/internal/template/button/style.d.ts.map +1 -1
- package/lib/internal/template/button/style.js +17 -12
- package/lib/internal/template/button/style.js.map +1 -1
- package/lib/internal/template/button/styles.css.js +22 -22
- package/lib/internal/template/button/styles.scoped.css +256 -212
- package/lib/internal/template/button/styles.selectors.js +22 -22
- package/lib/internal/template/button-dropdown/item-element/styles.css.js +16 -16
- package/lib/internal/template/button-dropdown/item-element/styles.scoped.css +27 -27
- package/lib/internal/template/button-dropdown/item-element/styles.selectors.js +16 -16
- package/lib/internal/template/button-group/index.d.ts.map +1 -1
- package/lib/internal/template/button-group/index.js +2 -2
- package/lib/internal/template/button-group/index.js.map +1 -1
- package/lib/internal/template/button-group/interfaces.d.ts +40 -0
- package/lib/internal/template/button-group/interfaces.d.ts.map +1 -1
- package/lib/internal/template/button-group/interfaces.js.map +1 -1
- package/lib/internal/template/button-group/internal.d.ts.map +1 -1
- package/lib/internal/template/button-group/internal.js +5 -3
- package/lib/internal/template/button-group/internal.js.map +1 -1
- package/lib/internal/template/button-group/item-element.d.ts +1 -0
- package/lib/internal/template/button-group/item-element.d.ts.map +1 -1
- package/lib/internal/template/button-group/item-element.js +4 -2
- package/lib/internal/template/button-group/item-element.js.map +1 -1
- package/lib/internal/template/button-group/style.d.ts +13 -0
- package/lib/internal/template/button-group/style.d.ts.map +1 -0
- package/lib/internal/template/button-group/style.js +37 -0
- package/lib/internal/template/button-group/style.js.map +1 -0
- package/lib/internal/template/checkbox/interfaces.d.ts +0 -1
- package/lib/internal/template/checkbox/interfaces.d.ts.map +1 -1
- package/lib/internal/template/checkbox/interfaces.js.map +1 -1
- package/lib/internal/template/checkbox/styles.css.js +3 -3
- package/lib/internal/template/checkbox/styles.scoped.css +11 -11
- package/lib/internal/template/checkbox/styles.selectors.js +3 -3
- package/lib/internal/template/container/interfaces.d.ts +0 -15
- package/lib/internal/template/container/interfaces.d.ts.map +1 -1
- package/lib/internal/template/container/interfaces.js.map +1 -1
- package/lib/internal/template/content-layout/styles.css.js +14 -14
- package/lib/internal/template/content-layout/styles.scoped.css +27 -27
- package/lib/internal/template/content-layout/styles.selectors.js +14 -14
- package/lib/internal/template/date-range-picker/time-offset.js +3 -3
- package/lib/internal/template/date-range-picker/time-offset.js.map +1 -1
- package/lib/internal/template/flashbar/collapsible-flashbar.d.ts.map +1 -1
- package/lib/internal/template/flashbar/collapsible-flashbar.js +3 -5
- package/lib/internal/template/flashbar/collapsible-flashbar.js.map +1 -1
- package/lib/internal/template/flashbar/common.d.ts.map +1 -1
- package/lib/internal/template/flashbar/common.js +2 -5
- package/lib/internal/template/flashbar/common.js.map +1 -1
- package/lib/internal/template/flashbar/flash.d.ts +1 -1
- package/lib/internal/template/flashbar/flash.d.ts.map +1 -1
- package/lib/internal/template/flashbar/flash.js +4 -2
- package/lib/internal/template/flashbar/flash.js.map +1 -1
- package/lib/internal/template/flashbar/interfaces.d.ts +0 -24
- package/lib/internal/template/flashbar/interfaces.d.ts.map +1 -1
- package/lib/internal/template/flashbar/interfaces.js.map +1 -1
- package/lib/internal/template/flashbar/styles.css.js +50 -50
- package/lib/internal/template/flashbar/styles.scoped.css +187 -187
- package/lib/internal/template/flashbar/styles.selectors.js +50 -50
- package/lib/internal/template/flashbar/utils.d.ts +1 -1
- package/lib/internal/template/flashbar/utils.d.ts.map +1 -1
- package/lib/internal/template/flashbar/utils.js +1 -1
- package/lib/internal/template/flashbar/utils.js.map +1 -1
- package/lib/internal/template/help-panel/styles.css.js +6 -6
- package/lib/internal/template/help-panel/styles.scoped.css +73 -73
- package/lib/internal/template/help-panel/styles.selectors.js +6 -6
- package/lib/internal/template/internal/base-component/styles.scoped.css +1 -1
- package/lib/internal/template/internal/components/drag-handle-wrapper/styles.css.js +21 -21
- package/lib/internal/template/internal/components/drag-handle-wrapper/styles.scoped.css +44 -44
- package/lib/internal/template/internal/components/drag-handle-wrapper/styles.selectors.js +21 -21
- package/lib/internal/template/internal/components/dropdown/styles.css.js +20 -20
- package/lib/internal/template/internal/components/dropdown/styles.scoped.css +38 -38
- package/lib/internal/template/internal/components/dropdown/styles.selectors.js +20 -20
- package/lib/internal/template/internal/components/token-list/styles.css.js +10 -10
- package/lib/internal/template/internal/components/token-list/styles.scoped.css +25 -25
- package/lib/internal/template/internal/components/token-list/styles.selectors.js +10 -10
- package/lib/internal/template/internal/environment.js +2 -2
- package/lib/internal/template/internal/environment.json +2 -2
- package/lib/internal/template/internal/generated/custom-css-properties/index.d.ts +4 -0
- package/lib/internal/template/internal/generated/custom-css-properties/index.d.ts.map +1 -1
- package/lib/internal/template/internal/generated/custom-css-properties/index.js +83 -79
- package/lib/internal/template/internal/generated/custom-css-properties/index.js.map +1 -1
- package/lib/internal/template/internal/utils/date-time/format-time-offset.d.ts +11 -0
- package/lib/internal/template/internal/utils/date-time/format-time-offset.d.ts.map +1 -1
- package/lib/internal/template/internal/utils/date-time/format-time-offset.js +17 -0
- package/lib/internal/template/internal/utils/date-time/format-time-offset.js.map +1 -1
- package/lib/internal/template/internal/utils/date-time/index.d.ts +1 -1
- package/lib/internal/template/internal/utils/date-time/index.d.ts.map +1 -1
- package/lib/internal/template/internal/utils/date-time/index.js +1 -1
- package/lib/internal/template/internal/utils/date-time/index.js.map +1 -1
- package/lib/internal/template/link/interfaces.d.ts +0 -6
- package/lib/internal/template/link/interfaces.d.ts.map +1 -1
- package/lib/internal/template/link/interfaces.js.map +1 -1
- package/lib/internal/template/link/styles.css.js +20 -20
- package/lib/internal/template/link/styles.scoped.css +103 -103
- package/lib/internal/template/link/styles.selectors.js +20 -20
- package/lib/internal/template/radio-group/interfaces.d.ts +0 -1
- package/lib/internal/template/radio-group/interfaces.d.ts.map +1 -1
- package/lib/internal/template/radio-group/interfaces.js.map +1 -1
- package/lib/internal/template/radio-group/styles.css.js +10 -10
- package/lib/internal/template/radio-group/styles.scoped.css +22 -22
- package/lib/internal/template/radio-group/styles.selectors.js +10 -10
- package/lib/internal/template/slider/styles.css.js +26 -26
- package/lib/internal/template/slider/styles.scoped.css +86 -86
- package/lib/internal/template/slider/styles.selectors.js +26 -26
- package/lib/internal/template/spinner/styles.css.js +13 -13
- package/lib/internal/template/spinner/styles.scoped.css +39 -39
- package/lib/internal/template/spinner/styles.selectors.js +13 -13
- package/lib/internal/template/tag-editor/styles.css.js +3 -3
- package/lib/internal/template/tag-editor/styles.scoped.css +13 -13
- package/lib/internal/template/tag-editor/styles.selectors.js +3 -3
- package/lib/internal/template/text-content/styles.css.js +1 -1
- package/lib/internal/template/text-content/styles.scoped.css +66 -66
- package/lib/internal/template/text-content/styles.selectors.js +1 -1
- package/lib/internal/template/toggle/interfaces.d.ts +0 -1
- package/lib/internal/template/toggle/interfaces.d.ts.map +1 -1
- package/lib/internal/template/toggle/interfaces.js.map +1 -1
- package/lib/internal/template/toggle/styles.css.js +10 -10
- package/lib/internal/template/toggle/styles.scoped.css +23 -23
- package/lib/internal/template/toggle/styles.selectors.js +10 -10
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"item-element.js","sourceRoot":"","sources":["../../../src/button-group/item-element.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,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,oBAAC,aAAa,IACZ,GAAG,EAAE,YAAY,EACjB,IAAI,EAAE,IAAI,EACV,aAAa,EAAE,oBAAoB,EACnC,WAAW,EAAE,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,MAAK,IAAI,CAAC,EAAE,EACtC,gBAAgB,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,GACxC,CACH;QACA,IAAI,CAAC,IAAI,KAAK,eAAe,IAAI,CAChC,oBAAC,gBAAgB,IACf,GAAG,EAAE,iBAAiB,EACtB,IAAI,EAAE,IAAI,EACV,WAAW,EAAE,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,MAAK,IAAI,CAAC,EAAE,EACtC,WAAW,EAAE,cAAc,EAC3B,gBAAgB,EAAE,wBAAwB,EAC1C,gBAAgB,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,EACxC,QAAQ,EAAE,QAAQ,GAClB,CACH,CACG,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { forwardRef, useEffect, useImperativeHandle, useRef } from 'react';\n\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { ButtonProps } from '../button/interfaces.js';\nimport { ButtonDropdownProps } from '../button-dropdown/interfaces.js';\nimport { FileInputProps } from '../file-input/interfaces';\nimport { fireCancelableEvent, NonCancelableEventHandler } from '../internal/events';\nimport { nodeBelongs } from '../internal/utils/node-belongs';\nimport FileInputItem from './file-input-item';\nimport IconButtonItem from './icon-button-item';\nimport IconToggleButtonItem from './icon-toggle-button-item.js';\nimport { ButtonGroupProps } from './interfaces';\nimport MenuDropdownItem from './menu-dropdown-item';\n\nimport styles from './styles.css.js';\n\ninterface ItemElementProps {\n item: ButtonGroupProps.Item;\n dropdownExpandToViewport?: boolean;\n tooltip: null | { item: string; feedback: boolean };\n setTooltip: (tooltip: null | { item: string; feedback: boolean }) => void;\n onItemClick?: NonCancelableEventHandler<ButtonGroupProps.ItemClickDetails> | undefined;\n onFilesChange?: NonCancelableEventHandler<ButtonGroupProps.FilesChangeDetails> | undefined;\n position: string;\n}\n\nconst ItemElement = forwardRef(\n (\n { item, dropdownExpandToViewport, tooltip, setTooltip, onItemClick, onFilesChange, position }: ItemElementProps,\n ref: React.Ref<ButtonProps.Ref>\n ) => {\n const containerRef = useRef<HTMLDivElement>(null);\n const buttonRef = useRef<ButtonProps.Ref>(null);\n const fileInputRef = useRef<FileInputProps.Ref>(null);\n const buttonDropdownRef = useRef<ButtonDropdownProps.Ref>(null);\n\n useImperativeHandle(ref, () => ({\n focus: () => {\n buttonRef.current?.focus();\n fileInputRef.current?.focus();\n buttonDropdownRef.current?.focus();\n },\n }));\n\n useEffect(() => {\n if (tooltip?.item !== item.id) {\n return;\n }\n\n const close = () => {\n setTooltip(null);\n };\n\n const handlePointerDownEvent = (event: PointerEvent) => {\n if (event.target && containerRef.current?.contains(event.target as HTMLElement)) {\n return;\n }\n\n close();\n };\n\n const handleKeyDownEvent = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n close();\n }\n };\n\n const controller = new AbortController();\n window.addEventListener('pointerdown', handlePointerDownEvent, { signal: controller.signal });\n window.addEventListener('keydown', handleKeyDownEvent, { signal: controller.signal });\n\n return () => {\n controller.abort();\n };\n }, [item.id, tooltip, setTooltip]);\n\n const onShowTooltipSoft = (show: boolean) => {\n if (!tooltip?.feedback) {\n setTooltip(show ? { item: item.id, feedback: false } : null);\n }\n };\n\n const onShowTooltipHard = (show: boolean) => {\n if (!show && item.id !== tooltip?.item) {\n return;\n }\n\n setTooltip(show ? { item: item.id, feedback: false } : null);\n };\n\n const onClickHandler = (event: CustomEvent<ButtonGroupProps.ItemClickDetails>) => {\n const hasPopoverFeedback = 'popoverFeedback' in item && item.popoverFeedback;\n\n if (hasPopoverFeedback) {\n setTooltip({ item: item.id, feedback: true });\n }\n\n fireCancelableEvent(onItemClick, event.detail, event);\n };\n\n const onFilesChangeHandler = (event: CustomEvent<ButtonGroupProps.FilesChangeDetails>) => {\n fireCancelableEvent(onFilesChange, event.detail, event);\n\n setTooltip(null);\n };\n\n return (\n <div\n key={item.id}\n className={styles['item-wrapper']}\n ref={containerRef}\n onPointerEnter={() => onShowTooltipSoft(true)}\n onPointerLeave={() => onShowTooltipSoft(false)}\n onFocus={event => {\n // Showing no tooltip when the focus comes from inside the container.\n // This is needed to prevent the tooltip after a menu closes with item selection or Escape.\n if (event && event.relatedTarget && nodeBelongs(containerRef.current, event.relatedTarget)) {\n return;\n }\n onShowTooltipHard(true);\n }}\n onBlur={() => onShowTooltipHard(false)}\n {...(item.type === 'menu-dropdown' || (item as ButtonGroupProps.IconButton).disabled\n ? {}\n : getAnalyticsMetadataAttribute({ detail: { position, id: item.id } }))}\n >\n {item.type === 'icon-button' && (\n <IconButtonItem\n ref={buttonRef}\n item={item}\n onItemClick={onClickHandler}\n showTooltip={tooltip?.item === item.id}\n showFeedback={!!tooltip?.feedback}\n onTooltipDismiss={() => setTooltip(null)}\n />\n )}\n {item.type === 'icon-toggle-button' && (\n <IconToggleButtonItem\n ref={buttonRef}\n item={item}\n onItemClick={onClickHandler}\n showTooltip={tooltip?.item === item.id}\n showFeedback={!!tooltip?.feedback}\n onTooltipDismiss={() => setTooltip(null)}\n />\n )}\n {item.type === 'icon-file-input' && (\n <FileInputItem\n ref={fileInputRef}\n item={item}\n onFilesChange={onFilesChangeHandler}\n showTooltip={tooltip?.item === item.id}\n onTooltipDismiss={() => setTooltip(null)}\n />\n )}\n {item.type === 'menu-dropdown' && (\n <MenuDropdownItem\n ref={buttonDropdownRef}\n item={item}\n showTooltip={tooltip?.item === item.id}\n onItemClick={onClickHandler}\n expandToViewport={dropdownExpandToViewport}\n onTooltipDismiss={() => setTooltip(null)}\n position={position}\n />\n )}\n </div>\n );\n }\n);\n\nexport default ItemElement;\n"]}
|
|
1
|
+
{"version":3,"file":"item-element.js","sourceRoot":"","sources":["../../../src/button-group/item-element.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAElF,OAAO,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AAKjH,OAAO,EAAE,mBAAmB,EAA6B,MAAM,oBAAoB,CAAC;AACpF,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,aAAa,MAAM,mBAAmB,CAAC;AAC9C,OAAO,cAAc,MAAM,oBAAoB,CAAC;AAChD,OAAO,oBAAoB,MAAM,8BAA8B,CAAC;AAEhE,OAAO,gBAAgB,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAEnD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAarC,MAAM,WAAW,GAAG,UAAU,CAC5B,CACE,EACE,IAAI,EACJ,wBAAwB,EACxB,OAAO,EACP,UAAU,EACV,WAAW,EACX,aAAa,EACb,QAAQ,EACR,KAAK,GACY,EACnB,GAA+B,EAC/B,EAAE;IACF,MAAM,YAAY,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAClD,MAAM,SAAS,GAAG,MAAM,CAAkB,IAAI,CAAC,CAAC;IAChD,MAAM,YAAY,GAAG,MAAM,CAAqB,IAAI,CAAC,CAAC;IACtD,MAAM,iBAAiB,GAAG,MAAM,CAA0B,IAAI,CAAC,CAAC;IAEhE,mBAAmB,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC;QAC9B,KAAK,EAAE,GAAG,EAAE;;YACV,MAAA,SAAS,CAAC,OAAO,0CAAE,KAAK,EAAE,CAAC;YAC3B,MAAA,YAAY,CAAC,OAAO,0CAAE,KAAK,EAAE,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Ac,EAC3B,WAAW,EAAE,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,MAAK,IAAI,CAAC,EAAE,EACtC,YAAY,EAAE,CAAC,CAAC,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,CAAA,EACjC,gBAAgB,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,GACxC,CACH;QACA,IAAI,CAAC,IAAI,KAAK,iBAAiB,IAAI,CAClC,oBAAC,aAAa,IACZ,GAAG,EAAE,YAAY,EACjB,IAAI,EAAE,IAAI,EACV,aAAa,EAAE,oBAAoB,EACnC,WAAW,EAAE,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,MAAK,IAAI,CAAC,EAAE,EACtC,gBAAgB,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,GACxC,CACH;QACA,IAAI,CAAC,IAAI,KAAK,eAAe,IAAI,CAChC,oBAAC,gBAAgB,IACf,GAAG,EAAE,iBAAiB,EACtB,IAAI,EAAE,IAAI,EACV,WAAW,EAAE,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,MAAK,IAAI,CAAC,EAAE,EACtC,WAAW,EAAE,cAAc,EAC3B,gBAAgB,EAAE,wBAAwB,EAC1C,gBAAgB,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,EACxC,QAAQ,EAAE,QAAQ,GAClB,CACH,CACG,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { forwardRef, useEffect, useImperativeHandle, useRef } from 'react';\n\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { ButtonProps } from '../button/interfaces.js';\nimport { ButtonDropdownProps } from '../button-dropdown/interfaces.js';\nimport { FileInputProps } from '../file-input/interfaces';\nimport { fireCancelableEvent, NonCancelableEventHandler } from '../internal/events';\nimport { nodeBelongs } from '../internal/utils/node-belongs';\nimport FileInputItem from './file-input-item';\nimport IconButtonItem from './icon-button-item';\nimport IconToggleButtonItem from './icon-toggle-button-item.js';\nimport { ButtonGroupProps } from './interfaces';\nimport MenuDropdownItem from './menu-dropdown-item';\nimport { getButtonGroupItemStyles } from './style';\n\nimport styles from './styles.css.js';\n\ninterface ItemElementProps {\n item: ButtonGroupProps.Item;\n dropdownExpandToViewport?: boolean;\n tooltip: null | { item: string; feedback: boolean };\n setTooltip: (tooltip: null | { item: string; feedback: boolean }) => void;\n onItemClick?: NonCancelableEventHandler<ButtonGroupProps.ItemClickDetails> | undefined;\n onFilesChange?: NonCancelableEventHandler<ButtonGroupProps.FilesChangeDetails> | undefined;\n position: string;\n style?: ButtonGroupProps.Style;\n}\n\nconst ItemElement = forwardRef(\n (\n {\n item,\n dropdownExpandToViewport,\n tooltip,\n setTooltip,\n onItemClick,\n onFilesChange,\n position,\n style,\n }: ItemElementProps,\n ref: React.Ref<ButtonProps.Ref>\n ) => {\n const containerRef = useRef<HTMLDivElement>(null);\n const buttonRef = useRef<ButtonProps.Ref>(null);\n const fileInputRef = useRef<FileInputProps.Ref>(null);\n const buttonDropdownRef = useRef<ButtonDropdownProps.Ref>(null);\n\n useImperativeHandle(ref, () => ({\n focus: () => {\n buttonRef.current?.focus();\n fileInputRef.current?.focus();\n buttonDropdownRef.current?.focus();\n },\n }));\n\n useEffect(() => {\n if (tooltip?.item !== item.id) {\n return;\n }\n\n const close = () => {\n setTooltip(null);\n };\n\n const handlePointerDownEvent = (event: PointerEvent) => {\n if (event.target && containerRef.current?.contains(event.target as HTMLElement)) {\n return;\n }\n\n close();\n };\n\n const handleKeyDownEvent = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n close();\n }\n };\n\n const controller = new AbortController();\n window.addEventListener('pointerdown', handlePointerDownEvent, { signal: controller.signal });\n window.addEventListener('keydown', handleKeyDownEvent, { signal: controller.signal });\n\n return () => {\n controller.abort();\n };\n }, [item.id, tooltip, setTooltip]);\n\n const onShowTooltipSoft = (show: boolean) => {\n if (!tooltip?.feedback) {\n setTooltip(show ? { item: item.id, feedback: false } : null);\n }\n };\n\n const onShowTooltipHard = (show: boolean) => {\n if (!show && item.id !== tooltip?.item) {\n return;\n }\n\n setTooltip(show ? { item: item.id, feedback: false } : null);\n };\n\n const onClickHandler = (event: CustomEvent<ButtonGroupProps.ItemClickDetails>) => {\n const hasPopoverFeedback = 'popoverFeedback' in item && item.popoverFeedback;\n\n if (hasPopoverFeedback) {\n setTooltip({ item: item.id, feedback: true });\n }\n\n fireCancelableEvent(onItemClick, event.detail, event);\n };\n\n const onFilesChangeHandler = (event: CustomEvent<ButtonGroupProps.FilesChangeDetails>) => {\n fireCancelableEvent(onFilesChange, event.detail, event);\n\n setTooltip(null);\n };\n\n const itemStylePropertiesAndVariables = getButtonGroupItemStyles(style);\n\n return (\n <div\n key={item.id}\n className={styles['item-wrapper']}\n ref={containerRef}\n onPointerEnter={() => onShowTooltipSoft(true)}\n onPointerLeave={() => onShowTooltipSoft(false)}\n onFocus={event => {\n // Showing no tooltip when the focus comes from inside the container.\n // This is needed to prevent the tooltip after a menu closes with item selection or Escape.\n if (event && event.relatedTarget && nodeBelongs(containerRef.current, event.relatedTarget)) {\n return;\n }\n onShowTooltipHard(true);\n }}\n onBlur={() => onShowTooltipHard(false)}\n style={itemStylePropertiesAndVariables}\n {...(item.type === 'menu-dropdown' || (item as ButtonGroupProps.IconButton).disabled\n ? {}\n : getAnalyticsMetadataAttribute({ detail: { position, id: item.id } }))}\n >\n {item.type === 'icon-button' && (\n <IconButtonItem\n ref={buttonRef}\n item={item}\n onItemClick={onClickHandler}\n showTooltip={tooltip?.item === item.id}\n showFeedback={!!tooltip?.feedback}\n onTooltipDismiss={() => setTooltip(null)}\n />\n )}\n {item.type === 'icon-toggle-button' && (\n <IconToggleButtonItem\n ref={buttonRef}\n item={item}\n onItemClick={onClickHandler}\n showTooltip={tooltip?.item === item.id}\n showFeedback={!!tooltip?.feedback}\n onTooltipDismiss={() => setTooltip(null)}\n />\n )}\n {item.type === 'icon-file-input' && (\n <FileInputItem\n ref={fileInputRef}\n item={item}\n onFilesChange={onFilesChangeHandler}\n showTooltip={tooltip?.item === item.id}\n onTooltipDismiss={() => setTooltip(null)}\n />\n )}\n {item.type === 'menu-dropdown' && (\n <MenuDropdownItem\n ref={buttonDropdownRef}\n item={item}\n showTooltip={tooltip?.item === item.id}\n onItemClick={onClickHandler}\n expandToViewport={dropdownExpandToViewport}\n onTooltipDismiss={() => setTooltip(null)}\n position={position}\n />\n )}\n </div>\n );\n }\n);\n\nexport default ItemElement;\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ButtonGroupProps } from './interfaces';
|
|
2
|
+
export declare function getButtonGroupStyles(style: ButtonGroupProps['style']): {
|
|
3
|
+
borderRadius: string | undefined;
|
|
4
|
+
borderWidth: string | undefined;
|
|
5
|
+
borderStyle: string | undefined;
|
|
6
|
+
boxShadow: string | undefined;
|
|
7
|
+
paddingBlock: string | undefined;
|
|
8
|
+
paddingInline: string | undefined;
|
|
9
|
+
background: string | undefined;
|
|
10
|
+
borderColor: string | undefined;
|
|
11
|
+
} | undefined;
|
|
12
|
+
export declare function getButtonGroupItemStyles(style: ButtonGroupProps['style']): React.CSSProperties | undefined;
|
|
13
|
+
//# sourceMappingURL=style.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../src/button-group/style.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEhD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,gBAAgB,CAAC,OAAO,CAAC;;;;;;;;;cAoBpE;AAED,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,gBAAgB,CAAC,OAAO,CAAC,GAAG,KAAK,CAAC,aAAa,GAAG,SAAS,CAwB1G"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
import { SYSTEM } from '../internal/environment';
|
|
4
|
+
import customCssProps from '../internal/generated/custom-css-properties';
|
|
5
|
+
export function getButtonGroupStyles(style) {
|
|
6
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
7
|
+
if (SYSTEM !== 'core' || !(style === null || style === void 0 ? void 0 : style.root)) {
|
|
8
|
+
return undefined;
|
|
9
|
+
}
|
|
10
|
+
return Object.assign({ borderRadius: (_a = style === null || style === void 0 ? void 0 : style.root) === null || _a === void 0 ? void 0 : _a.borderRadius, borderWidth: (_b = style === null || style === void 0 ? void 0 : style.root) === null || _b === void 0 ? void 0 : _b.borderWidth, borderStyle: ((_c = style === null || style === void 0 ? void 0 : style.root) === null || _c === void 0 ? void 0 : _c.borderWidth) ? 'solid' : undefined, boxShadow: (_d = style === null || style === void 0 ? void 0 : style.root) === null || _d === void 0 ? void 0 : _d.boxShadow, paddingBlock: (_e = style === null || style === void 0 ? void 0 : style.root) === null || _e === void 0 ? void 0 : _e.paddingBlock, paddingInline: (_f = style === null || style === void 0 ? void 0 : style.root) === null || _f === void 0 ? void 0 : _f.paddingInline, background: (_g = style === null || style === void 0 ? void 0 : style.root) === null || _g === void 0 ? void 0 : _g.background, borderColor: (_h = style === null || style === void 0 ? void 0 : style.root) === null || _h === void 0 ? void 0 : _h.borderColor }, (((_j = style === null || style === void 0 ? void 0 : style.root) === null || _j === void 0 ? void 0 : _j.focusRing) && {
|
|
11
|
+
[customCssProps.styleFocusRingBorderColor]: (_k = style.root.focusRing) === null || _k === void 0 ? void 0 : _k.borderColor,
|
|
12
|
+
[customCssProps.styleFocusRingBorderRadius]: (_l = style.root.focusRing) === null || _l === void 0 ? void 0 : _l.borderRadius,
|
|
13
|
+
[customCssProps.styleFocusRingBorderWidth]: (_m = style.root.focusRing) === null || _m === void 0 ? void 0 : _m.borderWidth,
|
|
14
|
+
}));
|
|
15
|
+
}
|
|
16
|
+
export function getButtonGroupItemStyles(style) {
|
|
17
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
18
|
+
if (SYSTEM !== 'core' || !(style === null || style === void 0 ? void 0 : style.item)) {
|
|
19
|
+
return undefined;
|
|
20
|
+
}
|
|
21
|
+
return Object.assign(Object.assign(Object.assign({}, (((_a = style === null || style === void 0 ? void 0 : style.item) === null || _a === void 0 ? void 0 : _a.color) && {
|
|
22
|
+
[customCssProps.styleColorActive]: (_b = style.item.color) === null || _b === void 0 ? void 0 : _b.active,
|
|
23
|
+
[customCssProps.styleColorDefault]: (_c = style.item.color) === null || _c === void 0 ? void 0 : _c.default,
|
|
24
|
+
[customCssProps.styleColorDisabled]: (_d = style.item.color) === null || _d === void 0 ? void 0 : _d.disabled,
|
|
25
|
+
[customCssProps.styleColorHover]: (_e = style.item.color) === null || _e === void 0 ? void 0 : _e.hover,
|
|
26
|
+
})), (((_f = style === null || style === void 0 ? void 0 : style.item) === null || _f === void 0 ? void 0 : _f.boxShadow) && {
|
|
27
|
+
[customCssProps.styleBoxShadowActive]: (_g = style.item.boxShadow) === null || _g === void 0 ? void 0 : _g.active,
|
|
28
|
+
[customCssProps.styleBoxShadowDefault]: (_h = style.item.boxShadow) === null || _h === void 0 ? void 0 : _h.default,
|
|
29
|
+
[customCssProps.styleBoxShadowDisabled]: (_j = style.item.boxShadow) === null || _j === void 0 ? void 0 : _j.disabled,
|
|
30
|
+
[customCssProps.styleBoxShadowHover]: (_k = style.item.boxShadow) === null || _k === void 0 ? void 0 : _k.hover,
|
|
31
|
+
})), (((_l = style === null || style === void 0 ? void 0 : style.item) === null || _l === void 0 ? void 0 : _l.focusRing) && {
|
|
32
|
+
[customCssProps.styleFocusRingBorderColor]: (_m = style.item.focusRing) === null || _m === void 0 ? void 0 : _m.borderColor,
|
|
33
|
+
[customCssProps.styleFocusRingBorderRadius]: (_o = style.item.focusRing) === null || _o === void 0 ? void 0 : _o.borderRadius,
|
|
34
|
+
[customCssProps.styleFocusRingBorderWidth]: (_p = style.item.focusRing) === null || _p === void 0 ? void 0 : _p.borderWidth,
|
|
35
|
+
}));
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=style.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.js","sourceRoot":"","sources":["../../../src/button-group/style.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,cAAc,MAAM,6CAA6C,CAAC;AAGzE,MAAM,UAAU,oBAAoB,CAAC,KAAgC;;IACnE,IAAI,MAAM,KAAK,MAAM,IAAI,CAAC,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,CAAA,EAAE;QACrC,OAAO,SAAS,CAAC;KAClB;IAED,uBACE,YAAY,EAAE,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,0CAAE,YAAY,EACvC,WAAW,EAAE,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,0CAAE,WAAW,EACrC,WAAW,EAAE,CAAA,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,0CAAE,WAAW,EAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,EAC3D,SAAS,EAAE,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,0CAAE,SAAS,EACjC,YAAY,EAAE,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,0CAAE,YAAY,EACvC,aAAa,EAAE,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,0CAAE,aAAa,EACzC,UAAU,EAAE,M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L,KAAK,uBAAL,KAAK,CAAE,IAAI,0CAAE,SAAS,KAAI;QAC5B,CAAC,cAAc,CAAC,oBAAoB,CAAC,EAAE,MAAA,KAAK,CAAC,IAAI,CAAC,SAAS,0CAAE,MAAM;QACnE,CAAC,cAAc,CAAC,qBAAqB,CAAC,EAAE,MAAA,KAAK,CAAC,IAAI,CAAC,SAAS,0CAAE,OAAO;QACrE,CAAC,cAAc,CAAC,sBAAsB,CAAC,EAAE,MAAA,KAAK,CAAC,IAAI,CAAC,SAAS,0CAAE,QAAQ;QACvE,CAAC,cAAc,CAAC,mBAAmB,CAAC,EAAE,MAAA,KAAK,CAAC,IAAI,CAAC,SAAS,0CAAE,KAAK;KAClE,CAAC,GACC,CAAC,CAAA,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,0CAAE,SAAS,KAAI;QAC5B,CAAC,cAAc,CAAC,yBAAyB,CAAC,EAAE,MAAA,KAAK,CAAC,IAAI,CAAC,SAAS,0CAAE,WAAW;QAC7E,CAAC,cAAc,CAAC,0BAA0B,CAAC,EAAE,MAAA,KAAK,CAAC,IAAI,CAAC,SAAS,0CAAE,YAAY;QAC/E,CAAC,cAAc,CAAC,yBAAyB,CAAC,EAAE,MAAA,KAAK,CAAC,IAAI,CAAC,SAAS,0CAAE,WAAW;KAC9E,CAAC,EACF;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { SYSTEM } from '../internal/environment';\nimport customCssProps from '../internal/generated/custom-css-properties';\nimport { ButtonGroupProps } from './interfaces';\n\nexport function getButtonGroupStyles(style: ButtonGroupProps['style']) {\n if (SYSTEM !== 'core' || !style?.root) {\n return undefined;\n }\n\n return {\n borderRadius: style?.root?.borderRadius,\n borderWidth: style?.root?.borderWidth,\n borderStyle: style?.root?.borderWidth ? 'solid' : undefined,\n boxShadow: style?.root?.boxShadow,\n paddingBlock: style?.root?.paddingBlock,\n paddingInline: style?.root?.paddingInline,\n background: style?.root?.background,\n borderColor: style?.root?.borderColor,\n ...(style?.root?.focusRing && {\n [customCssProps.styleFocusRingBorderColor]: style.root.focusRing?.borderColor,\n [customCssProps.styleFocusRingBorderRadius]: style.root.focusRing?.borderRadius,\n [customCssProps.styleFocusRingBorderWidth]: style.root.focusRing?.borderWidth,\n }),\n };\n}\n\nexport function getButtonGroupItemStyles(style: ButtonGroupProps['style']): React.CSSProperties | undefined {\n if (SYSTEM !== 'core' || !style?.item) {\n return undefined;\n }\n\n return {\n ...(style?.item?.color && {\n [customCssProps.styleColorActive]: style.item.color?.active,\n [customCssProps.styleColorDefault]: style.item.color?.default,\n [customCssProps.styleColorDisabled]: style.item.color?.disabled,\n [customCssProps.styleColorHover]: style.item.color?.hover,\n }),\n ...(style?.item?.boxShadow && {\n [customCssProps.styleBoxShadowActive]: style.item.boxShadow?.active,\n [customCssProps.styleBoxShadowDefault]: style.item.boxShadow?.default,\n [customCssProps.styleBoxShadowDisabled]: style.item.boxShadow?.disabled,\n [customCssProps.styleBoxShadowHover]: style.item.boxShadow?.hover,\n }),\n ...(style?.item?.focusRing && {\n [customCssProps.styleFocusRingBorderColor]: style.item.focusRing?.borderColor,\n [customCssProps.styleFocusRingBorderRadius]: style.item.focusRing?.borderRadius,\n [customCssProps.styleFocusRingBorderWidth]: style.item.focusRing?.borderWidth,\n }),\n };\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/checkbox/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEpD,MAAM,WAAW,aAAc,SAAQ,iBAAiB;IACtD;;;OAGG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B;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AE;gBACP,OAAO,CAAC,EAAE,MAAM,CAAC;gBACjB,OAAO,CAAC,EAAE,MAAM,CAAC;gBACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;gBAClB,aAAa,CAAC,EAAE,MAAM,CAAC;gBACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;aACnB,CAAC;YACF,KAAK,CAAC,EAAE;gBACN,MAAM,CAAC,EAAE;oBACP,OAAO,CAAC,EAAE,MAAM,CAAC;oBACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;oBAClB,aAAa,CAAC,EAAE,MAAM,CAAC;oBACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;iBACnB,CAAC;aACH,CAAC;YACF,SAAS,CAAC,EAAE;gBACV,WAAW,CAAC,EAAE,MAAM,CAAC;gBACrB,YAAY,CAAC,EAAE,MAAM,CAAC;gBACtB,WAAW,CAAC,EAAE,MAAM,CAAC;aACtB,CAAC;SACH,CAAC;QACF,KAAK,CAAC,EAAE;YACN,KAAK,CAAC,EAAE;gBACN,OAAO,CAAC,EAAE,MAAM,CAAC;gBACjB,OAAO,CAAC,EAAE,MAAM,CAAC;gBACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;gBAClB,aAAa,CAAC,EAAE,MAAM,CAAC;gBACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;aACnB,CAAC;SACH,CAAC;KACH;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/checkbox/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { NonCancelableEventHandler } from '../internal/events';\nimport { BaseCheckboxProps } from './base-checkbox';\n\nexport interface CheckboxProps extends BaseCheckboxProps {\n /**\n * The control's label that's displayed next to the checkbox. A state change occurs when a user clicks on it.\n * @displayname label\n */\n children?: React.ReactNode;\n\n /**\n * Specifies that the component is in an indeterminate state. The behavior of this property replicates\n * the behavior of [the respective property](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#Indeterminate_state_checkboxes)\n * in the native control.\n */\n indeterminate?: boolean;\n\n /**\n * Called when the user changes the component state. The event `detail` contains the current value for the `checked` property.\n */\n onChange?: NonCancelableEventHandler<CheckboxProps.ChangeDetail>;\n\n /**\n * Specifies whether to add `aria-required` to the native control.\n */\n ariaRequired?: boolean;\n\n /**\n *
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/checkbox/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { NonCancelableEventHandler } from '../internal/events';\nimport { BaseCheckboxProps } from './base-checkbox';\n\nexport interface CheckboxProps extends BaseCheckboxProps {\n /**\n * The control's label that's displayed next to the checkbox. A state change occurs when a user clicks on it.\n * @displayname label\n */\n children?: React.ReactNode;\n\n /**\n * Specifies that the component is in an indeterminate state. The behavior of this property replicates\n * the behavior of [the respective property](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#Indeterminate_state_checkboxes)\n * in the native control.\n */\n indeterminate?: boolean;\n\n /**\n * Called when the user changes the component state. The event `detail` contains the current value for the `checked` property.\n */\n onChange?: NonCancelableEventHandler<CheckboxProps.ChangeDetail>;\n\n /**\n * Specifies whether to add `aria-required` to the native control.\n */\n ariaRequired?: boolean;\n\n /**\n * @awsuiSystem core\n */\n style?: CheckboxProps.Style;\n}\n\nexport namespace CheckboxProps {\n export interface Ref {\n /**\n * Sets input focus onto the UI control.\n */\n focus(): void;\n }\n\n export interface ChangeDetail {\n checked: boolean;\n indeterminate: false;\n }\n\n export interface Style {\n input?: {\n fill?: {\n checked?: string;\n default?: string;\n disabled?: string;\n indeterminate?: string;\n readOnly?: string;\n };\n stroke?: {\n checked?: string;\n default?: string;\n disabled?: string;\n indeterminate?: string;\n readOnly?: string;\n };\n check?: {\n stroke?: {\n checked?: string;\n disabled?: string;\n indeterminate?: string;\n readOnly?: string;\n };\n };\n focusRing?: {\n borderColor?: string;\n borderRadius?: string;\n borderWidth?: string;\n };\n };\n label?: {\n color?: {\n checked?: string;\n default?: string;\n disabled?: string;\n indeterminate?: string;\n readOnly?: string;\n };\n };\n }\n}\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"root": "
|
|
5
|
-
"checkbox-control": "awsui_checkbox-
|
|
6
|
-
"outline": "
|
|
4
|
+
"root": "awsui_root_k2y2q_1hv8m_145",
|
|
5
|
+
"checkbox-control": "awsui_checkbox-control_k2y2q_1hv8m_178",
|
|
6
|
+
"outline": "awsui_outline_k2y2q_1hv8m_186"
|
|
7
7
|
};
|
|
8
8
|
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
*/
|
|
143
143
|
/* Style used for links in slots/components that are text heavy, to help links stand out among
|
|
144
144
|
surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F73#description */
|
|
145
|
-
.
|
|
145
|
+
.awsui_root_k2y2q_1hv8m_145.awsui_root_k2y2q_1hv8m_145:not(#\9) {
|
|
146
146
|
border-collapse: separate;
|
|
147
147
|
border-spacing: 0;
|
|
148
148
|
box-sizing: border-box;
|
|
@@ -175,7 +175,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
175
175
|
display: flex;
|
|
176
176
|
}
|
|
177
177
|
|
|
178
|
-
.awsui_checkbox-
|
|
178
|
+
.awsui_checkbox-control_k2y2q_1hv8m_178:not(#\9) {
|
|
179
179
|
margin-block-start: calc((var(--line-height-body-m-bedeoh, 22px) - var(--size-control-lkpwjy, 14px)) / 2);
|
|
180
180
|
min-block-size: var(--size-control-lkpwjy, 14px);
|
|
181
181
|
min-inline-size: var(--size-control-lkpwjy, 14px);
|
|
@@ -183,15 +183,15 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
183
183
|
inline-size: var(--size-control-lkpwjy, 14px);
|
|
184
184
|
}
|
|
185
185
|
|
|
186
|
-
.
|
|
187
|
-
--awsui-style-focus-ring-box-shadow-
|
|
186
|
+
.awsui_outline_k2y2q_1hv8m_186:not(#\9) {
|
|
187
|
+
--awsui-style-focus-ring-box-shadow-kiajpc: 0 0 0 var(--awsui-style-focus-ring-border-width-kiajpc, 2px) var(--awsui-style-focus-ring-border-color-kiajpc, var(--color-border-item-focused-r5f6xl, #0073bb));
|
|
188
188
|
position: relative;
|
|
189
189
|
}
|
|
190
|
-
.
|
|
190
|
+
.awsui_outline_k2y2q_1hv8m_186:not(#\9) {
|
|
191
191
|
outline: 2px dotted transparent;
|
|
192
192
|
outline-offset: calc(2px - 1px);
|
|
193
193
|
}
|
|
194
|
-
.
|
|
194
|
+
.awsui_outline_k2y2q_1hv8m_186:not(#\9)::before {
|
|
195
195
|
content: " ";
|
|
196
196
|
display: block;
|
|
197
197
|
position: absolute;
|
|
@@ -199,9 +199,9 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
199
199
|
inset-block-start: calc(-1 * 2px);
|
|
200
200
|
inline-size: calc(100% + 2px + 2px);
|
|
201
201
|
block-size: calc(100% + 2px + 2px);
|
|
202
|
-
border-start-start-radius: var(--awsui-style-focus-ring-border-radius-
|
|
203
|
-
border-start-end-radius: var(--awsui-style-focus-ring-border-radius-
|
|
204
|
-
border-end-start-radius: var(--awsui-style-focus-ring-border-radius-
|
|
205
|
-
border-end-end-radius: var(--awsui-style-focus-ring-border-radius-
|
|
206
|
-
box-shadow: var(--awsui-style-focus-ring-box-shadow-
|
|
202
|
+
border-start-start-radius: var(--awsui-style-focus-ring-border-radius-kiajpc, var(--border-radius-control-default-focus-ring-9xsko1, 2px));
|
|
203
|
+
border-start-end-radius: var(--awsui-style-focus-ring-border-radius-kiajpc, var(--border-radius-control-default-focus-ring-9xsko1, 2px));
|
|
204
|
+
border-end-start-radius: var(--awsui-style-focus-ring-border-radius-kiajpc, var(--border-radius-control-default-focus-ring-9xsko1, 2px));
|
|
205
|
+
border-end-end-radius: var(--awsui-style-focus-ring-border-radius-kiajpc, var(--border-radius-control-default-focus-ring-9xsko1, 2px));
|
|
206
|
+
box-shadow: var(--awsui-style-focus-ring-box-shadow-kiajpc);
|
|
207
207
|
}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"root": "
|
|
6
|
-
"checkbox-control": "awsui_checkbox-
|
|
7
|
-
"outline": "
|
|
5
|
+
"root": "awsui_root_k2y2q_1hv8m_145",
|
|
6
|
+
"checkbox-control": "awsui_checkbox-control_k2y2q_1hv8m_178",
|
|
7
|
+
"outline": "awsui_outline_k2y2q_1hv8m_186"
|
|
8
8
|
};
|
|
9
9
|
|
|
@@ -69,21 +69,6 @@ export interface ContainerProps extends BaseComponentProps {
|
|
|
69
69
|
*/
|
|
70
70
|
variant?: 'default' | 'stacked';
|
|
71
71
|
/**
|
|
72
|
-
* Specifies an object of selectors and properties that are used to apply custom styles.
|
|
73
|
-
*
|
|
74
|
-
* - `root.background` (string) - (Optional) Background of the container.
|
|
75
|
-
* - `root.borderColor` (string) - (Optional) Border color of the container.
|
|
76
|
-
* - `root.borderRadius` (string) - (Optional) Border radius of the container.
|
|
77
|
-
* - `root.borderWidth` (string) - (Optional) Border width of the container.
|
|
78
|
-
* - `root.boxShadow` (string) - (Optional) Box shadow of the container.
|
|
79
|
-
* - `content.paddingBlock` (string) - (Optional) Block dimension padding of the content slot.
|
|
80
|
-
* - `content.paddingInline` (string) - (Optional) Inline dimension padding of the content slot.
|
|
81
|
-
* - `header.paddingBlock` (string) - (Optional) Block dimension padding of the header slot.
|
|
82
|
-
* - `header.paddingInline` (string) - (Optional) Inline dimension padding of the header slot.
|
|
83
|
-
* - `footer.root.paddingBlock` (string) - (Optional) Block dimension padding of the footer slot.
|
|
84
|
-
* - `footer.root.paddingInline` (string) - (Optional) Inline dimension padding of the footer slot.
|
|
85
|
-
* - `footer.divider.borderColor` (string) - (Optional) Border color of the footer divider.
|
|
86
|
-
* - `footer.divider.borderWidth` (string) - (Optional) Border width of the footer divider.
|
|
87
72
|
* @awsuiSystem core
|
|
88
73
|
*/
|
|
89
74
|
style?: ContainerProps.Style;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/container/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEhE,MAAM,WAAW,cAAe,SAAQ,kBAAkB;IACxD;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,cAAc,CAAC,iBAAiB,CAAC;IAErD;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEzB;;OAEG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEhC;;;;;;;;;;;;;;;;;;OAkBG;IACH,KAAK,CAAC,EAAE,cAAc,CAAC,KAAK,CAAC;IAE7B;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B;;OAEG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAEjC;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEzB;;;OAGG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEhC;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAEhC
|
|
1
|
+
{"version":3,"file":"interfaces.d.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,UAAiB,KAAK;QACpB,IAAI,CAAC,EAAE;YACL,UAAU,CAAC,EAAE,MAAM,CAAC;YACpB,WAAW,CAAC,EAAE,MAAM,CAAC;YACrB,YAAY,CAAC,EAAE,MAAM,CAAC;YACtB,WAAW,CAAC,EAAE,MAAM,CAAC;YACrB,SAAS,CAAC,EAAE,MAAM,CAAC;SACpB,CAAC;QACF,OAAO,CAAC,EAAE;YACR,YAAY,CAAC,EAAE,MAAM,CAAC;YACtB,aAAa,CAAC,EAAE,MAAM,CAAC;SACxB,CAAC;QACF,MAAM,CAAC,EAAE;YACP,YAAY,CAAC,EAAE,MAAM,CAAC;YACtB,aAAa,CAAC,EAAE,MAAM,CAAC;SACxB,CAAC;QACF,MAAM,CAAC,EAAE;YACP,IAAI,EAAE;gBACJ,YAAY,CAAC,EAAE,MAAM,CAAC;gBACtB,aAAa,CAAC,EAAE,MAAM,CAAC;aACxB,CAAC;YACF,OAAO,EAAE;gBACP,WAAW,CAAC,EAAE,MAAM,CAAC;gBACrB,WAAW,CAAC,EAAE,MAAM,CAAC;aACtB,CAAC;SACH,CAAC;KACH;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/container/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { BaseComponentProps } from '../internal/base-component';\n\nexport interface ContainerProps extends BaseComponentProps {\n /**\n * Specifies additional analytics-related metadata.\n * * `instanceIdentifier` - A unique string that identifies this component instance in your application.\n * @analytics\n */\n analyticsMetadata?: ContainerProps.AnalyticsMetadata;\n\n /**\n * Heading element of the container. Use the [header component](/components/header/).\n */\n header?: React.ReactNode;\n\n /**\n * Determines whether the container header has padding. If `true`, removes the default padding from the header.\n */\n disableHeaderPaddings?: boolean;\n\n /**\n *\n * Use this slot to render a media element. Supported element types are 'img', 'video', and 'picture'.\n * You can define different positions and sizes for the media element within the container.\n *\n * * `content` - Use this slot to render your media element. We support `img`, `video`, `picture`, and `iframe` elements.\n *\n * * `position` - Defines the media slot's position within the container. Defaults to `top`.\n *\n * * `width` - Defines the width of the media slot when positioned on the side. Corresponds to the `width` CSS-property.\n * When this value is set, media elements larger than the defined width may be cropped, with 'object-fit: cover' centering it.\n * Note: This value is considered only when `position` is set to `side`.\n * If no width is provided, the media slot will take a maximum of 66% of the container's width.\n *\n * * `height` - Defines the height of the media slot when position on the top. Corresponds to the `height` CSS-property.\n * When this value is set, media elements larger than the defined width may be cropped, with 'object-fit: cover' centering it. * Note: This value is only considered if `position` is set to `top`.\n * If no height is provided, the media slot will be displayed at its full height.\n *\n */\n media?: ContainerProps.Media;\n\n /**\n * Main content of the container.\n */\n children?: React.ReactNode;\n\n /**\n * Determines whether the container content has padding. If `true`, removes the default padding from the content area.\n */\n disableContentPaddings?: boolean;\n\n /**\n * Enabling this property will make the container to fit into available height. If content is too short, the container\n * will stretch, if too long, the container will shrink and show vertical scrollbar.\n *\n * Use this property to align heights of multiple containers displayed in a single row. It is recommended to stretch\n * all containers to the height of the longest one, to avoid extra vertical scroll areas.\n */\n fitHeight?: boolean;\n\n /**\n * Footer of the container.\n */\n footer?: React.ReactNode;\n\n /**\n * Determines whether the container footer has padding. If `true`, removes the default padding from the footer.\n * @awsuiSystem core\n */\n disableFooterPaddings?: boolean;\n\n /**\n * Specify a container variant with one of the following:\n * * `default` - Use this variant in standalone context.\n * * `stacked` - Use this variant adjacent to other stacked containers (such as a container,\n * table).\n * @visualrefresh `stacked` variant\n */\n variant?: 'default' | 'stacked';\n\n /**\n *
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/container/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { BaseComponentProps } from '../internal/base-component';\n\nexport interface ContainerProps extends BaseComponentProps {\n /**\n * Specifies additional analytics-related metadata.\n * * `instanceIdentifier` - A unique string that identifies this component instance in your application.\n * @analytics\n */\n analyticsMetadata?: ContainerProps.AnalyticsMetadata;\n\n /**\n * Heading element of the container. Use the [header component](/components/header/).\n */\n header?: React.ReactNode;\n\n /**\n * Determines whether the container header has padding. If `true`, removes the default padding from the header.\n */\n disableHeaderPaddings?: boolean;\n\n /**\n *\n * Use this slot to render a media element. Supported element types are 'img', 'video', and 'picture'.\n * You can define different positions and sizes for the media element within the container.\n *\n * * `content` - Use this slot to render your media element. We support `img`, `video`, `picture`, and `iframe` elements.\n *\n * * `position` - Defines the media slot's position within the container. Defaults to `top`.\n *\n * * `width` - Defines the width of the media slot when positioned on the side. Corresponds to the `width` CSS-property.\n * When this value is set, media elements larger than the defined width may be cropped, with 'object-fit: cover' centering it.\n * Note: This value is considered only when `position` is set to `side`.\n * If no width is provided, the media slot will take a maximum of 66% of the container's width.\n *\n * * `height` - Defines the height of the media slot when position on the top. Corresponds to the `height` CSS-property.\n * When this value is set, media elements larger than the defined width may be cropped, with 'object-fit: cover' centering it. * Note: This value is only considered if `position` is set to `top`.\n * If no height is provided, the media slot will be displayed at its full height.\n *\n */\n media?: ContainerProps.Media;\n\n /**\n * Main content of the container.\n */\n children?: React.ReactNode;\n\n /**\n * Determines whether the container content has padding. If `true`, removes the default padding from the content area.\n */\n disableContentPaddings?: boolean;\n\n /**\n * Enabling this property will make the container to fit into available height. If content is too short, the container\n * will stretch, if too long, the container will shrink and show vertical scrollbar.\n *\n * Use this property to align heights of multiple containers displayed in a single row. It is recommended to stretch\n * all containers to the height of the longest one, to avoid extra vertical scroll areas.\n */\n fitHeight?: boolean;\n\n /**\n * Footer of the container.\n */\n footer?: React.ReactNode;\n\n /**\n * Determines whether the container footer has padding. If `true`, removes the default padding from the footer.\n * @awsuiSystem core\n */\n disableFooterPaddings?: boolean;\n\n /**\n * Specify a container variant with one of the following:\n * * `default` - Use this variant in standalone context.\n * * `stacked` - Use this variant adjacent to other stacked containers (such as a container,\n * table).\n * @visualrefresh `stacked` variant\n */\n variant?: 'default' | 'stacked';\n\n /**\n * @awsuiSystem core\n */\n style?: ContainerProps.Style;\n}\n\nexport namespace ContainerProps {\n export interface AnalyticsMetadata {\n instanceIdentifier?: string;\n }\n export interface Media {\n /**\n * Use this slot to render your media element. We support `img`, `video`, `picture`, and `iframe` elements.\n */\n content: React.ReactNode;\n\n /**\n * Defines the media slot's position within the container. Defaults to `top`.\n */\n position?: 'top' | 'side';\n\n /**\n * Defines the width of the media slot when positioned on the side. Corresponds to the `width` CSS-property.\n * When this value is set, the media element may be cropped, with `object-fit: cover` centering it.\n *\n * Note: This value is considered only when `position` is set to `side`.\n * If no width is provided, the media slot will take a maximum of 66% of the container's width.\n */\n width?: string | number;\n\n /**\n * Defines the height of the media slot when position on the top. Corresponds to the `height` CSS-property.\n * When this value is set, the media element may be cropped, with `object-fit: cover` centering it.\n *\n * Note: This value is only considered if `position` is set to `top`.\n * If no height is provided, the media slot will be displayed at its full height.\n */\n height?: string | number;\n }\n\n export interface Style {\n root?: {\n background?: string;\n borderColor?: string;\n borderRadius?: string;\n borderWidth?: string;\n boxShadow?: string;\n };\n content?: {\n paddingBlock?: string;\n paddingInline?: string;\n };\n header?: {\n paddingBlock?: string;\n paddingInline?: string;\n };\n footer?: {\n root: {\n paddingBlock?: string;\n paddingInline?: string;\n };\n divider: {\n borderColor?: string;\n borderWidth?: string;\n };\n };\n }\n}\n"]}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"layout": "
|
|
5
|
-
"background": "
|
|
6
|
-
"is-overlap-disabled": "awsui_is-overlap-
|
|
7
|
-
"header-background": "awsui_header-
|
|
8
|
-
"notifications": "
|
|
9
|
-
"breadcrumbs": "
|
|
10
|
-
"default-padding": "awsui_default-
|
|
11
|
-
"header-wrapper": "awsui_header-
|
|
12
|
-
"with-divider": "awsui_with-
|
|
13
|
-
"content": "
|
|
14
|
-
"has-header": "awsui_has-
|
|
15
|
-
"is-visual-refresh": "awsui_is-visual-
|
|
16
|
-
"has-default-background": "awsui_has-default-
|
|
17
|
-
"has-notifications": "awsui_has-
|
|
4
|
+
"layout": "awsui_layout_5gtk3_ou4gf_145",
|
|
5
|
+
"background": "awsui_background_5gtk3_ou4gf_159",
|
|
6
|
+
"is-overlap-disabled": "awsui_is-overlap-disabled_5gtk3_ou4gf_164",
|
|
7
|
+
"header-background": "awsui_header-background_5gtk3_ou4gf_167",
|
|
8
|
+
"notifications": "awsui_notifications_5gtk3_ou4gf_171",
|
|
9
|
+
"breadcrumbs": "awsui_breadcrumbs_5gtk3_ou4gf_176",
|
|
10
|
+
"default-padding": "awsui_default-padding_5gtk3_ou4gf_181",
|
|
11
|
+
"header-wrapper": "awsui_header-wrapper_5gtk3_ou4gf_185",
|
|
12
|
+
"with-divider": "awsui_with-divider_5gtk3_ou4gf_190",
|
|
13
|
+
"content": "awsui_content_5gtk3_ou4gf_193",
|
|
14
|
+
"has-header": "awsui_has-header_5gtk3_ou4gf_197",
|
|
15
|
+
"is-visual-refresh": "awsui_is-visual-refresh_5gtk3_ou4gf_204",
|
|
16
|
+
"has-default-background": "awsui_has-default-background_5gtk3_ou4gf_204",
|
|
17
|
+
"has-notifications": "awsui_has-notifications_5gtk3_ou4gf_208"
|
|
18
18
|
};
|
|
19
19
|
|
|
@@ -142,72 +142,72 @@
|
|
|
142
142
|
*/
|
|
143
143
|
/* Style used for links in slots/components that are text heavy, to help links stand out among
|
|
144
144
|
surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F73#description */
|
|
145
|
-
.
|
|
146
|
-
--awsui-content-layout-default-horizontal-padding-
|
|
147
|
-
--awsui-content-layout-max-content-width-
|
|
148
|
-
--awsui-content-layout-main-gap-
|
|
145
|
+
.awsui_layout_5gtk3_ou4gf_145:not(#\9) {
|
|
146
|
+
--awsui-content-layout-default-horizontal-padding-kiajpc: var(--space-layout-content-horizontal-q3zhej, 40px);
|
|
147
|
+
--awsui-content-layout-max-content-width-kiajpc: 0px;
|
|
148
|
+
--awsui-content-layout-main-gap-kiajpc: 0px;
|
|
149
149
|
display: grid;
|
|
150
|
-
grid-template-columns: 0 0 1fr minmax(0, var(--awsui-content-layout-max-content-width-
|
|
151
|
-
grid-template-rows: var(--awsui-content-layout-main-gap-
|
|
150
|
+
grid-template-columns: 0 0 1fr minmax(0, var(--awsui-content-layout-max-content-width-kiajpc)) 1fr 0 0;
|
|
151
|
+
grid-template-rows: var(--awsui-content-layout-main-gap-kiajpc) min-content min-content auto var(--space-dark-header-overlap-distance-45h6a9, 0px) 1fr;
|
|
152
152
|
min-block-size: 100%;
|
|
153
153
|
}
|
|
154
154
|
@media (max-width: 688px) {
|
|
155
|
-
.
|
|
156
|
-
--awsui-content-layout-default-horizontal-padding-
|
|
155
|
+
.awsui_layout_5gtk3_ou4gf_145:not(#\9) {
|
|
156
|
+
--awsui-content-layout-default-horizontal-padding-kiajpc: var(--space-l-3cws6j, 20px);
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
|
-
.
|
|
159
|
+
.awsui_layout_5gtk3_ou4gf_145 > .awsui_background_5gtk3_ou4gf_159:not(#\9) {
|
|
160
160
|
grid-column: 1/8;
|
|
161
161
|
grid-row: 1/6;
|
|
162
162
|
color: var(--color-text-body-default-5qid0u, #16191f);
|
|
163
163
|
}
|
|
164
|
-
.
|
|
164
|
+
.awsui_layout_5gtk3_ou4gf_145 > .awsui_background_5gtk3_ou4gf_159.awsui_is-overlap-disabled_5gtk3_ou4gf_164:not(#\9) {
|
|
165
165
|
grid-row: 1/5;
|
|
166
166
|
}
|
|
167
|
-
.
|
|
167
|
+
.awsui_layout_5gtk3_ou4gf_145 > .awsui_background_5gtk3_ou4gf_159 > .awsui_header-background_5gtk3_ou4gf_167:not(#\9) {
|
|
168
168
|
inline-size: 100%;
|
|
169
169
|
block-size: 100%;
|
|
170
170
|
}
|
|
171
|
-
.
|
|
171
|
+
.awsui_layout_5gtk3_ou4gf_145 > .awsui_notifications_5gtk3_ou4gf_171:not(#\9) {
|
|
172
172
|
grid-column: 4;
|
|
173
173
|
grid-row: 2;
|
|
174
174
|
padding-block-end: var(--space-xs-kw7k3v, 8px);
|
|
175
175
|
}
|
|
176
|
-
.
|
|
176
|
+
.awsui_layout_5gtk3_ou4gf_145 > .awsui_breadcrumbs_5gtk3_ou4gf_176:not(#\9) {
|
|
177
177
|
grid-column: 4;
|
|
178
178
|
grid-row: 3;
|
|
179
179
|
padding-block-end: var(--space-xs-kw7k3v, 8px);
|
|
180
180
|
}
|
|
181
|
-
.
|
|
182
|
-
--awsui-content-layout-main-gap-
|
|
183
|
-
grid-template-columns: var(--awsui-toggles-left-width-
|
|
181
|
+
.awsui_layout_5gtk3_ou4gf_145.awsui_default-padding_5gtk3_ou4gf_181:not(#\9) {
|
|
182
|
+
--awsui-content-layout-main-gap-kiajpc: var(--space-scaled-m-sw9kcx, 16px);
|
|
183
|
+
grid-template-columns: var(--awsui-toggles-left-width-kiajpc, 0) var(--awsui-content-layout-default-horizontal-padding-kiajpc, 0) 1fr minmax(0, var(--awsui-content-layout-max-content-width-kiajpc)) 1fr var(--awsui-content-layout-default-horizontal-padding-kiajpc, 0) var(--awsui-toggles-right-width-kiajpc, 0);
|
|
184
184
|
}
|
|
185
|
-
.
|
|
185
|
+
.awsui_layout_5gtk3_ou4gf_145 > .awsui_header-wrapper_5gtk3_ou4gf_185:not(#\9) {
|
|
186
186
|
grid-column: 4;
|
|
187
187
|
grid-row: 4;
|
|
188
188
|
padding-block-end: var(--space-content-header-padding-bottom-hjkugf, 16px);
|
|
189
189
|
}
|
|
190
|
-
.
|
|
190
|
+
.awsui_layout_5gtk3_ou4gf_145 > .awsui_header-wrapper_5gtk3_ou4gf_185.awsui_with-divider_5gtk3_ou4gf_190:not(#\9) {
|
|
191
191
|
border-block-end: 1px solid var(--color-border-divider-default-ipvpev, #eaeded);
|
|
192
192
|
}
|
|
193
|
-
.
|
|
193
|
+
.awsui_layout_5gtk3_ou4gf_145 > .awsui_content_5gtk3_ou4gf_193:not(#\9) {
|
|
194
194
|
grid-column: 4;
|
|
195
195
|
grid-row: 5/8;
|
|
196
196
|
}
|
|
197
|
-
.
|
|
198
|
-
grid-template-rows: var(--awsui-content-layout-main-gap-
|
|
197
|
+
.awsui_layout_5gtk3_ou4gf_145:not(#\9):not(.awsui_has-header_5gtk3_ou4gf_197) {
|
|
198
|
+
grid-template-rows: var(--awsui-content-layout-main-gap-kiajpc) min-content min-content 0 calc(var(--space-dark-header-overlap-distance-45h6a9, 0px)) 1fr;
|
|
199
199
|
}
|
|
200
|
-
.
|
|
201
|
-
grid-template-rows: var(--awsui-content-layout-main-gap-
|
|
200
|
+
.awsui_layout_5gtk3_ou4gf_145.awsui_is-overlap-disabled_5gtk3_ou4gf_164:not(#\9) {
|
|
201
|
+
grid-template-rows: var(--awsui-content-layout-main-gap-kiajpc) min-content min-content auto 0 1fr;
|
|
202
202
|
}
|
|
203
203
|
|
|
204
|
-
.
|
|
204
|
+
.awsui_layout_5gtk3_ou4gf_145.awsui_is-visual-refresh_5gtk3_ou4gf_204 > .awsui_background_5gtk3_ou4gf_159.awsui_has-default-background_5gtk3_ou4gf_204:not(#\9) {
|
|
205
205
|
background-color: var(--color-background-layout-main-05m5y6, #f2f3f3);
|
|
206
206
|
}
|
|
207
207
|
|
|
208
|
-
.
|
|
209
|
-
--awsui-content-layout-main-gap-
|
|
208
|
+
.awsui_layout_5gtk3_ou4gf_145:not(#\9):not(.awsui_is-visual-refresh_5gtk3_ou4gf_204).awsui_has-notifications_5gtk3_ou4gf_208 {
|
|
209
|
+
--awsui-content-layout-main-gap-kiajpc: 0px;
|
|
210
210
|
}
|
|
211
|
-
.
|
|
211
|
+
.awsui_layout_5gtk3_ou4gf_145:not(#\9):not(.awsui_is-visual-refresh_5gtk3_ou4gf_204) > .awsui_notifications_5gtk3_ou4gf_171 {
|
|
212
212
|
grid-column: 1/8;
|
|
213
213
|
}
|
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"layout": "
|
|
6
|
-
"background": "
|
|
7
|
-
"is-overlap-disabled": "awsui_is-overlap-
|
|
8
|
-
"header-background": "awsui_header-
|
|
9
|
-
"notifications": "
|
|
10
|
-
"breadcrumbs": "
|
|
11
|
-
"default-padding": "awsui_default-
|
|
12
|
-
"header-wrapper": "awsui_header-
|
|
13
|
-
"with-divider": "awsui_with-
|
|
14
|
-
"content": "
|
|
15
|
-
"has-header": "awsui_has-
|
|
16
|
-
"is-visual-refresh": "awsui_is-visual-
|
|
17
|
-
"has-default-background": "awsui_has-default-
|
|
18
|
-
"has-notifications": "awsui_has-
|
|
5
|
+
"layout": "awsui_layout_5gtk3_ou4gf_145",
|
|
6
|
+
"background": "awsui_background_5gtk3_ou4gf_159",
|
|
7
|
+
"is-overlap-disabled": "awsui_is-overlap-disabled_5gtk3_ou4gf_164",
|
|
8
|
+
"header-background": "awsui_header-background_5gtk3_ou4gf_167",
|
|
9
|
+
"notifications": "awsui_notifications_5gtk3_ou4gf_171",
|
|
10
|
+
"breadcrumbs": "awsui_breadcrumbs_5gtk3_ou4gf_176",
|
|
11
|
+
"default-padding": "awsui_default-padding_5gtk3_ou4gf_181",
|
|
12
|
+
"header-wrapper": "awsui_header-wrapper_5gtk3_ou4gf_185",
|
|
13
|
+
"with-divider": "awsui_with-divider_5gtk3_ou4gf_190",
|
|
14
|
+
"content": "awsui_content_5gtk3_ou4gf_193",
|
|
15
|
+
"has-header": "awsui_has-header_5gtk3_ou4gf_197",
|
|
16
|
+
"is-visual-refresh": "awsui_is-visual-refresh_5gtk3_ou4gf_204",
|
|
17
|
+
"has-default-background": "awsui_has-default-background_5gtk3_ou4gf_204",
|
|
18
|
+
"has-notifications": "awsui_has-notifications_5gtk3_ou4gf_208"
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
import { addMinutes } from 'date-fns';
|
|
4
4
|
import { warnOnce } from '@cloudscape-design/component-toolkit/internal';
|
|
5
|
-
import {
|
|
5
|
+
import { formatTimeOffsetISOInternal, parseTimezoneOffset, shiftTimezoneOffset } from '../internal/utils/date-time';
|
|
6
6
|
/**
|
|
7
7
|
* Appends a time zone offset to a date string, replacing any existing timezone information.
|
|
8
8
|
*/
|
|
@@ -16,8 +16,8 @@ export function setTimeOffset(value, timeOffset) {
|
|
|
16
16
|
};
|
|
17
17
|
return {
|
|
18
18
|
type: 'absolute',
|
|
19
|
-
startDate: stripTimezone(value.startDate) +
|
|
20
|
-
endDate: stripTimezone(value.endDate) +
|
|
19
|
+
startDate: stripTimezone(value.startDate) + formatTimeOffsetISOInternal(value.startDate, timeOffset.startDate),
|
|
20
|
+
endDate: stripTimezone(value.endDate) + formatTimeOffsetISOInternal(value.endDate, timeOffset.endDate),
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"time-offset.js","sourceRoot":"","sources":["../../../src/date-range-picker/time-offset.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,OAAO,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AAEzE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"time-offset.js","sourceRoot":"","sources":["../../../src/date-range-picker/time-offset.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,OAAO,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AAEzE,OAAO,EAAE,2BAA2B,EAAE,mBAAm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CAAC,SAAS,CAAC;QACrE,OAAO,EAAE,mBAAmB,CAAC,KAAK,CAAC,OAAO,EAAE,UAAU,CAAC,OAAO,CAAC;KAChE,CAAC;AACJ,CAAC;AAYD,MAAM,UAAU,mBAAmB,CACjC,KAAwC,EACxC,aAA0D,EAC1D,UAAmB;IAEnB,IAAI,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,UAAU,EAAE;QACtC,IAAI,aAAa,EAAE;YACjB,OAAO;gBACL,SAAS,EAAE,aAAa,CAAC,YAAY,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;gBACvD,OAAO,EAAE,aAAa,CAAC,YAAY,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;aACpD,CAAC;SACH;aAAM,IAAI,UAAU,KAAK,SAAS,EAAE;YACnC,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;SACvD;KACF;IACD,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;AACtD,CAAC;AAED;;;;;;;;;;;;;;;EAeE;AACF,SAAS,YAAY,CAAC,aAAqB;IACzC,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,aAAa,CAAC,CAAC;IACrC,OAAO,UAAU,CAAC,IAAI,EAAE,mBAAmB,CAAC,aAAa,CAAC,CAAC,CAAC;AAC9D,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { addMinutes } from 'date-fns';\n\nimport { warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\nimport { formatTimeOffsetISOInternal, parseTimezoneOffset, shiftTimezoneOffset } from '../internal/utils/date-time';\nimport { DateRangePickerProps } from './interfaces';\n\n/**\n * Appends a time zone offset to a date string, replacing any existing timezone information.\n */\nexport function setTimeOffset(\n value: DateRangePickerProps.Value | null,\n timeOffset: { startDate?: number; endDate?: number }\n): DateRangePickerProps.Value | null {\n if (!(value?.type === 'absolute')) {\n return value;\n }\n\n const stripTimezone = (dateString: string): string => {\n // Remove existing timezone info: Z, +HH:MM, -HH:MM, +HHMM, -HHMM\n return dateString.replace(/[Z]$|[+-]\\d{2}:?\\d{2}$/, '');\n };\n\n return {\n type: 'absolute',\n startDate: stripTimezone(value.startDate) + formatTimeOffsetISOInternal(value.startDate, timeOffset.startDate),\n endDate: stripTimezone(value.endDate) + formatTimeOffsetISOInternal(value.endDate, timeOffset.endDate),\n };\n}\n\n/**\n * Re-formats an absolute date range so that it is expressed using the\n * target time offset. The returned value still represents the same range\n * in time, but contains no visible offset.\n */\nexport function shiftTimeOffset(\n value: null | DateRangePickerProps.Value,\n timeOffset: { startDate?: number; endDate?: number }\n): DateRangePickerProps.Value | null {\n if (!value || value.type !== 'absolute') {\n return value;\n }\n\n /*\n This regex matches an ISO date-time (non date-only or month-only) with\n - optional seconds;\n - optional milliseconds;\n - optional time offset or 'Z'.\n */\n const dateTimeRegex = /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2})?(\\.\\d{1,3})?(((\\+|-)\\d{2}(:\\d{2})?)|Z)?$/;\n\n if (!dateTimeRegex.test(value.startDate) || !dateTimeRegex.test(value.endDate)) {\n warnOnce(\n 'DateRangePicker',\n 'You have provided a misformatted start or end date. The component will fall back to an empty value. ' +\n 'Dates have to be ISO8601-formatted with an optional time zone offset.'\n );\n return null;\n }\n\n return {\n type: 'absolute',\n startDate: shiftTimezoneOffset(value.startDate, timeOffset.startDate),\n endDate: shiftTimezoneOffset(value.endDate, timeOffset.endDate),\n };\n}\n\nexport type NormalizedTimeOffset =\n | {\n startDate: number;\n endDate: number;\n }\n | {\n startDate: undefined;\n endDate: undefined;\n };\n\nexport function normalizeTimeOffset(\n value: null | DateRangePickerProps.Value,\n getTimeOffset?: DateRangePickerProps.GetTimeOffsetFunction,\n timeOffset?: number\n): NormalizedTimeOffset {\n if (value && value.type === 'absolute') {\n if (getTimeOffset) {\n return {\n startDate: getTimeOffset(parseDateUTC(value.startDate)),\n endDate: getTimeOffset(parseDateUTC(value.endDate)),\n };\n } else if (timeOffset !== undefined) {\n return { startDate: timeOffset, endDate: timeOffset };\n }\n }\n return { startDate: undefined, endDate: undefined };\n}\n\n/*\n Before the getTimeOffset function is used there is no information on the preferred time offset.\n \n Besides, the ISO date string might or might not contain the offset:\n - 2021-02-03T01:02:03\n - 2021-02-03T01:02:03Z\n - 2021-02-03T01:02:03+01:00\n \n For every value above the date is converted to UTC and the following is true:\n date.getUTCFullYear() === 2021\n date.getUTCMonth() === 1\n date.getUTCDate() === 3\n date.getUTCHours() === 1\n date.getUTCMinutes() === 2\n date.getUTCSeconds() === 3\n*/\nfunction parseDateUTC(isoDateString: string): Date {\n const date = new Date(isoDateString);\n return addMinutes(date, parseTimezoneOffset(isoDateString));\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collapsible-flashbar.d.ts","sourceRoot":"","sources":["../../../src/flashbar/collapsible-flashbar.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"collapsible-flashbar.d.ts","sourceRoot":"","sources":["../../../src/flashbar/collapsible-flashbar.tsx"],"names":[],"mappings":";AA2BA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAY7C,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,SAAS,EAAE,EAAE,aAAa,eAoVxF"}
|
|
@@ -13,7 +13,6 @@ import { animate, getDOMRects } from '../internal/animate';
|
|
|
13
13
|
import { Transition } from '../internal/components/transition';
|
|
14
14
|
import { getVisualContextClassname } from '../internal/components/visual-context';
|
|
15
15
|
import customCssProps from '../internal/generated/custom-css-properties';
|
|
16
|
-
import { useDebounceCallback } from '../internal/hooks/use-debounce-callback';
|
|
17
16
|
import { useEffectOnUpdate } from '../internal/hooks/use-effect-on-update';
|
|
18
17
|
import { scrollElementIntoView } from '../internal/utils/scrollable-containers';
|
|
19
18
|
import { throttle } from '../internal/utils/throttle';
|
|
@@ -21,7 +20,7 @@ import { getComponentsAnalyticsMetadata, getItemAnalyticsMetadata } from './anal
|
|
|
21
20
|
import { useFlashbar } from './common';
|
|
22
21
|
import { Flash, focusFlashById } from './flash';
|
|
23
22
|
import { getCollapsibleFlashStyles, getNotificationBarStyles } from './style';
|
|
24
|
-
import { counterTypes,
|
|
23
|
+
import { counterTypes, getFlashTypeCount, getItemColor, getVisibleCollapsedItems } from './utils';
|
|
25
24
|
import styles from './styles.css.js';
|
|
26
25
|
// If the number of items is equal or less than this value,
|
|
27
26
|
// the toggle element will not be displayed and the Flashbar will look like a regular single-item Flashbar.
|
|
@@ -70,17 +69,16 @@ export default function CollapsibleFlashbar(_a) {
|
|
|
70
69
|
}
|
|
71
70
|
setIsFlashbarStackExpanded(prev => !prev);
|
|
72
71
|
}
|
|
73
|
-
const debouncedFocus = useDebounceCallback(focusFlashById, FOCUS_DEBOUNCE_DELAY);
|
|
74
72
|
useLayoutEffect(() => {
|
|
75
73
|
if (isFlashbarStackExpanded && (items === null || items === void 0 ? void 0 : items.length)) {
|
|
76
74
|
const mostRecentItem = items[0];
|
|
77
75
|
if (mostRecentItem.id !== undefined) {
|
|
78
|
-
|
|
76
|
+
focusFlashById(ref.current, mostRecentItem.id);
|
|
79
77
|
}
|
|
80
78
|
}
|
|
81
79
|
// Run this after expanding, but not every time the items change.
|
|
82
80
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
83
|
-
}, [
|
|
81
|
+
}, [isFlashbarStackExpanded]);
|
|
84
82
|
// When collapsing, scroll up if necessary to avoid losing track of the focused button
|
|
85
83
|
useEffectOnUpdate(() => {
|
|
86
84
|
if (!isFlashbarStackExpanded && notificationBarRef.current) {
|