@papillonarts/components 0.48.0 → 0.49.1
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/LICENSE +1 -1
- package/build/Legacy/Alert/Alert.const.d.ts +4 -0
- package/build/Legacy/Alert/Alert.const.d.ts.map +1 -0
- package/build/Legacy/Alert/Alert.const.js +26 -0
- package/build/Legacy/Alert/Alert.d.ts +3 -2
- package/build/Legacy/Alert/Alert.d.ts.map +1 -1
- package/build/Legacy/Alert/Alert.js +47 -49
- package/build/Legacy/Alert/Alert.type.d.ts +7 -8
- package/build/Legacy/Alert/Alert.type.d.ts.map +1 -1
- package/build/Legacy/Alert/Alert.type.js +1 -24
- package/build/Legacy/Alert/__tests__/Alert.doc.md +2 -2
- package/build/Legacy/Alert/index.d.ts +2 -2
- package/build/Legacy/Alert/index.d.ts.map +1 -1
- package/build/Legacy/Alert/index.js +3 -3
- package/build/Legacy/Blankslate/Blankslate.const.d.ts +4 -0
- package/build/Legacy/Blankslate/Blankslate.const.d.ts.map +1 -0
- package/build/Legacy/Blankslate/Blankslate.const.js +18 -0
- package/build/Legacy/Blankslate/Blankslate.d.ts +3 -2
- package/build/Legacy/Blankslate/Blankslate.d.ts.map +1 -1
- package/build/Legacy/Blankslate/Blankslate.js +17 -14
- package/build/Legacy/Blankslate/Blankslate.type.d.ts +2 -4
- package/build/Legacy/Blankslate/Blankslate.type.d.ts.map +1 -1
- package/build/Legacy/Blankslate/Blankslate.type.js +1 -14
- package/build/Legacy/Blankslate/__tests__/Blankslate.doc.md +1 -1
- package/build/Legacy/Blankslate/index.d.ts +1 -1
- package/build/Legacy/Blankslate/index.d.ts.map +1 -1
- package/build/Legacy/Blankslate/index.js +3 -3
- package/build/Legacy/Breadcrumb/Breadcrumb.const.d.ts +4 -0
- package/build/Legacy/Breadcrumb/Breadcrumb.const.d.ts.map +1 -0
- package/build/Legacy/Breadcrumb/Breadcrumb.const.js +14 -0
- package/build/Legacy/Breadcrumb/Breadcrumb.d.ts +3 -2
- package/build/Legacy/Breadcrumb/Breadcrumb.d.ts.map +1 -1
- package/build/Legacy/Breadcrumb/Breadcrumb.js +50 -46
- package/build/Legacy/Breadcrumb/Breadcrumb.type.d.ts +9 -6
- package/build/Legacy/Breadcrumb/Breadcrumb.type.d.ts.map +1 -1
- package/build/Legacy/Breadcrumb/Breadcrumb.type.js +1 -10
- package/build/Legacy/Breadcrumb/__tests__/Breadcrumb.doc.md +2 -2
- package/build/Legacy/Breadcrumb/index.d.ts +1 -1
- package/build/Legacy/Breadcrumb/index.d.ts.map +1 -1
- package/build/Legacy/Breadcrumb/index.js +3 -3
- package/build/Legacy/Button/Button.const.d.ts +9 -0
- package/build/Legacy/Button/Button.const.d.ts.map +1 -0
- package/build/Legacy/Button/Button.const.js +48 -0
- package/build/Legacy/Button/Button.d.ts +3 -2
- package/build/Legacy/Button/Button.d.ts.map +1 -1
- package/build/Legacy/Button/Button.js +84 -94
- package/build/Legacy/Button/Button.type.d.ts +12 -19
- package/build/Legacy/Button/Button.type.d.ts.map +1 -1
- package/build/Legacy/Button/Button.type.js +1 -44
- package/build/Legacy/Button/__tests__/Button.doc.md +6 -6
- package/build/Legacy/Button/index.d.ts +2 -1
- package/build/Legacy/Button/index.d.ts.map +1 -1
- package/build/Legacy/Button/index.js +8 -8
- package/build/Legacy/Dropdown/Dropdown.const.d.ts +4 -0
- package/build/Legacy/Dropdown/Dropdown.const.d.ts.map +1 -0
- package/build/Legacy/Dropdown/Dropdown.const.js +18 -0
- package/build/Legacy/Dropdown/Dropdown.d.ts +3 -2
- package/build/Legacy/Dropdown/Dropdown.d.ts.map +1 -1
- package/build/Legacy/Dropdown/Dropdown.js +49 -50
- package/build/Legacy/Dropdown/Dropdown.type.d.ts +10 -7
- package/build/Legacy/Dropdown/Dropdown.type.d.ts.map +1 -1
- package/build/Legacy/Dropdown/Dropdown.type.js +1 -14
- package/build/Legacy/Dropdown/__tests__/Dropdown.doc.md +1 -1
- package/build/Legacy/Dropdown/index.d.ts +2 -1
- package/build/Legacy/Dropdown/index.d.ts.map +1 -1
- package/build/Legacy/Dropdown/index.js +3 -3
- package/build/Legacy/ErrorBoundary/ErrorBoundary.d.ts +7 -8
- package/build/Legacy/ErrorBoundary/ErrorBoundary.d.ts.map +1 -1
- package/build/Legacy/ErrorBoundary/ErrorBoundary.js +32 -48
- package/build/Legacy/ErrorBoundary/ErrorBoundary.type.d.ts +5 -1
- package/build/Legacy/ErrorBoundary/ErrorBoundary.type.d.ts.map +1 -1
- package/build/Legacy/ErrorBoundary/__tests__/ErrorBoundary.doc.md +5 -1
- package/build/Legacy/ErrorBoundary/index.d.ts +1 -0
- package/build/Legacy/ErrorBoundary/index.d.ts.map +1 -1
- package/build/Legacy/ErrorBoundary/index.js +1 -1
- package/build/Legacy/Form/Checkbox/Checkbox.const.d.ts +5 -0
- package/build/Legacy/Form/Checkbox/Checkbox.const.d.ts.map +1 -0
- package/build/Legacy/Form/Checkbox/Checkbox.const.js +22 -0
- package/build/Legacy/Form/Checkbox/Checkbox.d.ts +3 -2
- package/build/Legacy/Form/Checkbox/Checkbox.d.ts.map +1 -1
- package/build/Legacy/Form/Checkbox/Checkbox.js +22 -25
- package/build/Legacy/Form/Checkbox/Checkbox.type.d.ts +2 -4
- package/build/Legacy/Form/Checkbox/Checkbox.type.d.ts.map +1 -1
- package/build/Legacy/Form/Checkbox/Checkbox.type.js +1 -18
- package/build/Legacy/Form/Checkbox/__tests__/Checkbox.doc.md +1 -1
- package/build/Legacy/Form/Checkbox/index.d.ts +1 -1
- package/build/Legacy/Form/Checkbox/index.d.ts.map +1 -1
- package/build/Legacy/Form/Checkbox/index.js +3 -3
- package/build/Legacy/Form/Input/Input.const.d.ts +5 -0
- package/build/Legacy/Form/Input/Input.const.d.ts.map +1 -0
- package/build/Legacy/Form/Input/Input.const.js +30 -0
- package/build/Legacy/Form/Input/Input.d.ts +3 -2
- package/build/Legacy/Form/Input/Input.d.ts.map +1 -1
- package/build/Legacy/Form/Input/Input.js +25 -32
- package/build/Legacy/Form/Input/Input.type.d.ts +5 -7
- package/build/Legacy/Form/Input/Input.type.d.ts.map +1 -1
- package/build/Legacy/Form/Input/Input.type.js +1 -26
- package/build/Legacy/Form/Input/__tests__/Input.doc.md +4 -4
- package/build/Legacy/Form/Input/index.d.ts +1 -1
- package/build/Legacy/Form/Input/index.d.ts.map +1 -1
- package/build/Legacy/Form/Input/index.js +4 -4
- package/build/Legacy/Form/Radio/Radio.const.d.ts +5 -0
- package/build/Legacy/Form/Radio/Radio.const.d.ts.map +1 -0
- package/build/Legacy/Form/Radio/Radio.const.js +22 -0
- package/build/Legacy/Form/Radio/Radio.d.ts +3 -2
- package/build/Legacy/Form/Radio/Radio.d.ts.map +1 -1
- package/build/Legacy/Form/Radio/Radio.js +19 -24
- package/build/Legacy/Form/Radio/Radio.type.d.ts +2 -4
- package/build/Legacy/Form/Radio/Radio.type.d.ts.map +1 -1
- package/build/Legacy/Form/Radio/Radio.type.js +1 -18
- package/build/Legacy/Form/Radio/__tests__/Radio.doc.md +1 -1
- package/build/Legacy/Form/Radio/index.d.ts +1 -1
- package/build/Legacy/Form/Radio/index.d.ts.map +1 -1
- package/build/Legacy/Form/Radio/index.js +3 -3
- package/build/Legacy/Form/index.js +1 -1
- package/build/Legacy/Grid/DisplayTable/DisplayTable.const.d.ts +3 -0
- package/build/Legacy/Grid/DisplayTable/DisplayTable.const.d.ts.map +1 -0
- package/build/Legacy/Grid/DisplayTable/DisplayTable.const.js +11 -0
- package/build/Legacy/Grid/DisplayTable/DisplayTable.d.ts +3 -2
- package/build/Legacy/Grid/DisplayTable/DisplayTable.d.ts.map +1 -1
- package/build/Legacy/Grid/DisplayTable/DisplayTable.js +26 -31
- package/build/Legacy/Grid/DisplayTable/DisplayTable.type.d.ts +7 -7
- package/build/Legacy/Grid/DisplayTable/DisplayTable.type.d.ts.map +1 -1
- package/build/Legacy/Grid/DisplayTable/DisplayTable.type.js +1 -7
- package/build/Legacy/Grid/DisplayTable/__tests__/DisplayTable.doc.md +3 -3
- package/build/Legacy/Grid/DisplayTable/index.js +1 -1
- package/build/Legacy/Grid/FlexGrid/FlexGrid.const.d.ts +5 -0
- package/build/Legacy/Grid/FlexGrid/FlexGrid.const.d.ts.map +1 -0
- package/build/Legacy/Grid/FlexGrid/FlexGrid.const.js +28 -0
- package/build/Legacy/Grid/FlexGrid/FlexGrid.d.ts +3 -2
- package/build/Legacy/Grid/FlexGrid/FlexGrid.d.ts.map +1 -1
- package/build/Legacy/Grid/FlexGrid/FlexGrid.js +148 -167
- package/build/Legacy/Grid/FlexGrid/FlexGrid.type.d.ts +16 -11
- package/build/Legacy/Grid/FlexGrid/FlexGrid.type.d.ts.map +1 -1
- package/build/Legacy/Grid/FlexGrid/FlexGrid.type.js +1 -24
- package/build/Legacy/Grid/FlexGrid/__tests__/FlexGrid.doc.md +3 -3
- package/build/Legacy/Grid/FlexGrid/index.d.ts +1 -1
- package/build/Legacy/Grid/FlexGrid/index.d.ts.map +1 -1
- package/build/Legacy/Grid/FlexGrid/index.js +4 -4
- package/build/Legacy/Grid/index.js +1 -1
- package/build/Legacy/Icon/Icon.const.d.ts +656 -0
- package/build/Legacy/Icon/Icon.const.d.ts.map +1 -0
- package/build/Legacy/Icon/Icon.const.js +678 -0
- package/build/Legacy/Icon/Icon.d.ts +3 -2
- package/build/Legacy/Icon/Icon.d.ts.map +1 -1
- package/build/Legacy/Icon/Icon.js +33 -44
- package/build/Legacy/Icon/Icon.part.js +645 -645
- package/build/Legacy/Icon/Icon.type.d.ts +0 -654
- package/build/Legacy/Icon/Icon.type.d.ts.map +1 -1
- package/build/Legacy/Icon/Icon.type.js +1 -674
- package/build/Legacy/Icon/index.d.ts +1 -1
- package/build/Legacy/Icon/index.d.ts.map +1 -1
- package/build/Legacy/Icon/index.js +4 -4
- package/build/Legacy/Label/Label.const.d.ts +6 -0
- package/build/Legacy/Label/Label.const.d.ts.map +1 -0
- package/build/Legacy/Label/Label.const.js +26 -0
- package/build/Legacy/Label/Label.d.ts +3 -2
- package/build/Legacy/Label/Label.d.ts.map +1 -1
- package/build/Legacy/Label/Label.js +16 -15
- package/build/Legacy/Label/Label.type.d.ts +0 -4
- package/build/Legacy/Label/Label.type.d.ts.map +1 -1
- package/build/Legacy/Label/Label.type.js +1 -22
- package/build/Legacy/Label/index.js +1 -1
- package/build/Legacy/Loader/Loader.const.d.ts +4 -0
- package/build/Legacy/Loader/Loader.const.d.ts.map +1 -0
- package/build/Legacy/Loader/Loader.const.js +15 -0
- package/build/Legacy/Loader/Loader.d.ts +3 -2
- package/build/Legacy/Loader/Loader.d.ts.map +1 -1
- package/build/Legacy/Loader/Loader.js +19 -19
- package/build/Legacy/Loader/Loader.type.d.ts +0 -2
- package/build/Legacy/Loader/Loader.type.d.ts.map +1 -1
- package/build/Legacy/Loader/Loader.type.js +1 -11
- package/build/Legacy/Loader/index.d.ts +1 -1
- package/build/Legacy/Loader/index.d.ts.map +1 -1
- package/build/Legacy/Loader/index.js +3 -3
- package/build/Legacy/Markdown/Markdown.const.d.ts +4 -0
- package/build/Legacy/Markdown/Markdown.const.d.ts.map +1 -0
- package/build/Legacy/Markdown/Markdown.const.js +14 -0
- package/build/Legacy/Markdown/Markdown.d.ts +3 -2
- package/build/Legacy/Markdown/Markdown.d.ts.map +1 -1
- package/build/Legacy/Markdown/Markdown.js +22 -14
- package/build/Legacy/Markdown/Markdown.type.d.ts +0 -2
- package/build/Legacy/Markdown/Markdown.type.d.ts.map +1 -1
- package/build/Legacy/Markdown/Markdown.type.js +1 -10
- package/build/Legacy/Markdown/index.js +1 -1
- package/build/Legacy/Navigation/Menu/Menu.const.d.ts +3 -0
- package/build/Legacy/Navigation/Menu/Menu.const.d.ts.map +1 -0
- package/build/Legacy/Navigation/Menu/Menu.const.js +10 -0
- package/build/Legacy/Navigation/Menu/Menu.d.ts +3 -2
- package/build/Legacy/Navigation/Menu/Menu.d.ts.map +1 -1
- package/build/Legacy/Navigation/Menu/Menu.js +40 -42
- package/build/Legacy/Navigation/Menu/Menu.type.d.ts +2 -2
- package/build/Legacy/Navigation/Menu/Menu.type.d.ts.map +1 -1
- package/build/Legacy/Navigation/Menu/Menu.type.js +1 -6
- package/build/Legacy/Navigation/Menu/index.js +1 -1
- package/build/Legacy/Navigation/TabNav/TabNav.const.d.ts +4 -0
- package/build/Legacy/Navigation/TabNav/TabNav.const.d.ts.map +1 -0
- package/build/Legacy/Navigation/TabNav/TabNav.const.js +16 -0
- package/build/Legacy/Navigation/TabNav/TabNav.d.ts +3 -2
- package/build/Legacy/Navigation/TabNav/TabNav.d.ts.map +1 -1
- package/build/Legacy/Navigation/TabNav/TabNav.js +79 -79
- package/build/Legacy/Navigation/TabNav/TabNav.type.d.ts +6 -7
- package/build/Legacy/Navigation/TabNav/TabNav.type.d.ts.map +1 -1
- package/build/Legacy/Navigation/TabNav/TabNav.type.js +1 -12
- package/build/Legacy/Navigation/TabNav/__tests__/TabNav.doc.md +2 -2
- package/build/Legacy/Navigation/TabNav/index.d.ts +1 -1
- package/build/Legacy/Navigation/TabNav/index.d.ts.map +1 -1
- package/build/Legacy/Navigation/TabNav/index.js +3 -3
- package/build/Legacy/Navigation/UnderlineNav/UnderlineNav.const.d.ts +5 -0
- package/build/Legacy/Navigation/UnderlineNav/UnderlineNav.const.d.ts.map +1 -0
- package/build/Legacy/Navigation/UnderlineNav/UnderlineNav.const.js +20 -0
- package/build/Legacy/Navigation/UnderlineNav/UnderlineNav.d.ts +3 -2
- package/build/Legacy/Navigation/UnderlineNav/UnderlineNav.d.ts.map +1 -1
- package/build/Legacy/Navigation/UnderlineNav/UnderlineNav.js +64 -63
- package/build/Legacy/Navigation/UnderlineNav/UnderlineNav.type.d.ts +4 -6
- package/build/Legacy/Navigation/UnderlineNav/UnderlineNav.type.d.ts.map +1 -1
- package/build/Legacy/Navigation/UnderlineNav/UnderlineNav.type.js +1 -16
- package/build/Legacy/Navigation/UnderlineNav/__tests__/UnderlineNav.doc.md +1 -1
- package/build/Legacy/Navigation/UnderlineNav/index.d.ts +1 -1
- package/build/Legacy/Navigation/UnderlineNav/index.d.ts.map +1 -1
- package/build/Legacy/Navigation/UnderlineNav/index.js +4 -4
- package/build/Legacy/Navigation/index.js +1 -1
- package/build/Legacy/Pagination/PreviousNext/PreviousNext.const.d.ts +4 -0
- package/build/Legacy/Pagination/PreviousNext/PreviousNext.const.d.ts.map +1 -0
- package/build/Legacy/Pagination/PreviousNext/PreviousNext.const.js +30 -0
- package/build/Legacy/Pagination/PreviousNext/PreviousNext.d.ts +3 -2
- package/build/Legacy/Pagination/PreviousNext/PreviousNext.d.ts.map +1 -1
- package/build/Legacy/Pagination/PreviousNext/PreviousNext.js +46 -40
- package/build/Legacy/Pagination/PreviousNext/PreviousNext.type.d.ts +0 -2
- package/build/Legacy/Pagination/PreviousNext/PreviousNext.type.d.ts.map +1 -1
- package/build/Legacy/Pagination/PreviousNext/PreviousNext.type.js +1 -26
- package/build/Legacy/Pagination/PreviousNext/index.d.ts +1 -1
- package/build/Legacy/Pagination/PreviousNext/index.d.ts.map +1 -1
- package/build/Legacy/Pagination/PreviousNext/index.js +3 -3
- package/build/Legacy/Pagination/index.js +1 -1
- package/build/Legacy/Popover/Popover.const.d.ts +5 -0
- package/build/Legacy/Popover/Popover.const.d.ts.map +1 -0
- package/build/Legacy/Popover/Popover.const.js +29 -0
- package/build/Legacy/Popover/Popover.d.ts +3 -2
- package/build/Legacy/Popover/Popover.d.ts.map +1 -1
- package/build/Legacy/Popover/Popover.js +41 -25
- package/build/Legacy/Popover/Popover.type.d.ts +0 -3
- package/build/Legacy/Popover/Popover.type.d.ts.map +1 -1
- package/build/Legacy/Popover/Popover.type.js +1 -25
- package/build/Legacy/Popover/index.d.ts +1 -1
- package/build/Legacy/Popover/index.d.ts.map +1 -1
- package/build/Legacy/Popover/index.js +4 -4
- package/build/Legacy/Progress/Progress.const.d.ts +4 -0
- package/build/Legacy/Progress/Progress.const.d.ts.map +1 -0
- package/build/Legacy/Progress/Progress.const.js +15 -0
- package/build/Legacy/Progress/Progress.d.ts +3 -2
- package/build/Legacy/Progress/Progress.d.ts.map +1 -1
- package/build/Legacy/Progress/Progress.js +15 -14
- package/build/Legacy/Progress/Progress.type.d.ts +0 -2
- package/build/Legacy/Progress/Progress.type.d.ts.map +1 -1
- package/build/Legacy/Progress/Progress.type.js +1 -11
- package/build/Legacy/Progress/index.d.ts +1 -1
- package/build/Legacy/Progress/index.d.ts.map +1 -1
- package/build/Legacy/Progress/index.js +3 -3
- package/build/Legacy/Select/Select.const.d.ts +4 -0
- package/build/Legacy/Select/Select.const.d.ts.map +1 -0
- package/build/Legacy/Select/Select.const.js +15 -0
- package/build/Legacy/Select/Select.d.ts +3 -2
- package/build/Legacy/Select/Select.d.ts.map +1 -1
- package/build/Legacy/Select/Select.js +31 -35
- package/build/Legacy/Select/Select.type.d.ts +0 -2
- package/build/Legacy/Select/Select.type.d.ts.map +1 -1
- package/build/Legacy/Select/Select.type.js +1 -11
- package/build/Legacy/Select/index.d.ts +1 -1
- package/build/Legacy/Select/index.d.ts.map +1 -1
- package/build/Legacy/Select/index.js +3 -3
- package/build/Legacy/SelectMenu/SelectMenu.const.d.ts +3 -0
- package/build/Legacy/SelectMenu/SelectMenu.const.d.ts.map +1 -0
- package/build/Legacy/SelectMenu/SelectMenu.const.js +10 -0
- package/build/Legacy/SelectMenu/SelectMenu.d.ts +3 -2
- package/build/Legacy/SelectMenu/SelectMenu.d.ts.map +1 -1
- package/build/Legacy/SelectMenu/SelectMenu.js +42 -46
- package/build/Legacy/SelectMenu/SelectMenu.type.d.ts +0 -1
- package/build/Legacy/SelectMenu/SelectMenu.type.d.ts.map +1 -1
- package/build/Legacy/SelectMenu/SelectMenu.type.js +1 -6
- package/build/Legacy/SelectMenu/index.js +1 -1
- package/build/Legacy/Subhead/Subhead.const.d.ts +3 -0
- package/build/Legacy/Subhead/Subhead.const.d.ts.map +1 -0
- package/build/Legacy/Subhead/Subhead.const.js +10 -0
- package/build/Legacy/Subhead/Subhead.d.ts +3 -2
- package/build/Legacy/Subhead/Subhead.d.ts.map +1 -1
- package/build/Legacy/Subhead/Subhead.js +12 -12
- package/build/Legacy/Subhead/Subhead.type.d.ts +0 -1
- package/build/Legacy/Subhead/Subhead.type.d.ts.map +1 -1
- package/build/Legacy/Subhead/Subhead.type.js +1 -6
- package/build/Legacy/Subhead/index.js +1 -1
- package/build/Legacy/SyntaxHighlighter/SyntaxHighlighter.const.d.ts +6 -0
- package/build/Legacy/SyntaxHighlighter/SyntaxHighlighter.const.d.ts.map +1 -0
- package/build/Legacy/SyntaxHighlighter/SyntaxHighlighter.const.js +25 -0
- package/build/Legacy/SyntaxHighlighter/SyntaxHighlighter.d.ts +3 -2
- package/build/Legacy/SyntaxHighlighter/SyntaxHighlighter.d.ts.map +1 -1
- package/build/Legacy/SyntaxHighlighter/SyntaxHighlighter.js +12 -9
- package/build/Legacy/SyntaxHighlighter/SyntaxHighlighter.type.d.ts +0 -4
- package/build/Legacy/SyntaxHighlighter/SyntaxHighlighter.type.d.ts.map +1 -1
- package/build/Legacy/SyntaxHighlighter/SyntaxHighlighter.type.js +1 -21
- package/build/Legacy/SyntaxHighlighter/SyntaxHighlighterHLJS.d.ts +3 -2
- package/build/Legacy/SyntaxHighlighter/SyntaxHighlighterHLJS.d.ts.map +1 -1
- package/build/Legacy/SyntaxHighlighter/SyntaxHighlighterHLJS.js +9 -10
- package/build/Legacy/SyntaxHighlighter/SyntaxHighlighterPrism.d.ts +3 -2
- package/build/Legacy/SyntaxHighlighter/SyntaxHighlighterPrism.d.ts.map +1 -1
- package/build/Legacy/SyntaxHighlighter/SyntaxHighlighterPrism.js +10 -11
- package/build/Legacy/SyntaxHighlighter/index.d.ts +1 -1
- package/build/Legacy/SyntaxHighlighter/index.d.ts.map +1 -1
- package/build/Legacy/SyntaxHighlighter/index.js +5 -5
- package/build/Legacy/Toast/Toast.const.d.ts +4 -0
- package/build/Legacy/Toast/Toast.const.d.ts.map +1 -0
- package/build/Legacy/Toast/Toast.const.js +18 -0
- package/build/Legacy/Toast/Toast.d.ts +3 -2
- package/build/Legacy/Toast/Toast.d.ts.map +1 -1
- package/build/Legacy/Toast/Toast.js +23 -23
- package/build/Legacy/Toast/Toast.type.d.ts +0 -2
- package/build/Legacy/Toast/Toast.type.d.ts.map +1 -1
- package/build/Legacy/Toast/Toast.type.js +1 -14
- package/build/Legacy/Toast/index.d.ts +1 -1
- package/build/Legacy/Toast/index.d.ts.map +1 -1
- package/build/Legacy/Toast/index.js +3 -3
- package/build/Legacy/index.js +1 -1
- package/build/Legacy/type.d.ts +25 -2
- package/build/Legacy/type.d.ts.map +1 -1
- package/build/Modern/Avatar/Avatar.d.ts +1 -1
- package/build/Modern/Avatar/Avatar.d.ts.map +1 -1
- package/build/Modern/Avatar/Avatar.js +23 -30
- package/build/Modern/Avatar/index.js +1 -1
- package/build/Modern/AvatarStack/AvatarStack.d.ts +2 -2
- package/build/Modern/AvatarStack/AvatarStack.d.ts.map +1 -1
- package/build/Modern/AvatarStack/AvatarStack.js +53 -57
- package/build/Modern/AvatarStack/index.js +1 -1
- package/build/Modern/Flash/Flash.d.ts +1 -1
- package/build/Modern/Flash/Flash.d.ts.map +1 -1
- package/build/Modern/Flash/Flash.js +13 -17
- package/build/Modern/Flash/index.js +1 -1
- package/build/Modern/Link/Link.d.ts +5 -5
- package/build/Modern/Link/Link.d.ts.map +1 -1
- package/build/Modern/Link/Link.js +21 -25
- package/build/Modern/Link/index.js +1 -1
- package/build/Modern/Pagination/Pagination.d.ts +6 -6
- package/build/Modern/Pagination/Pagination.d.ts.map +1 -1
- package/build/Modern/Pagination/Pagination.js +69 -82
- package/build/Modern/Pagination/Pagination.model.d.ts +3 -2
- package/build/Modern/Pagination/Pagination.model.d.ts.map +1 -1
- package/build/Modern/Pagination/Pagination.model.js +31 -34
- package/build/Modern/Pagination/__tests__/Pagination.doc.md +2 -2
- package/build/Modern/Pagination/index.js +1 -1
- package/build/Modern/hooks/index.js +2 -2
- package/build/Modern/hooks/useMedia.d.ts +3 -3
- package/build/Modern/hooks/useMedia.d.ts.map +1 -1
- package/build/Modern/hooks/useMedia.js +30 -41
- package/build/Modern/hooks/useRefObjectAsForwardedRef.js +1 -3
- package/build/Modern/hooks/useResponsiveValue.js +6 -10
- package/build/Modern/index.d.ts +2 -2
- package/build/Modern/index.js +1 -1
- package/build/Modern/type.d.ts +1 -0
- package/build/Modern/type.d.ts.map +1 -1
- package/build/Modern/utils/environment.js +1 -2
- package/build/Modern/utils/hasInteractiveNodes.js +11 -15
- package/build/Modern/utils/modern-polymorphic.d.ts +2 -2
- package/build/Modern/utils/modern-polymorphic.d.ts.map +1 -1
- package/build/Modern/utils/modern-polymorphic.js +1 -1
- package/build/Modern/utils/polymorphic.d.ts +1 -1
- package/build/Modern/utils/polymorphic.d.ts.map +1 -1
- package/build/Modern/utils/testing.d.ts +2 -1
- package/build/Modern/utils/testing.d.ts.map +1 -1
- package/build/Modern/utils/testing.js +2 -2
- package/build/Modern/utils/types/ComponentProps.d.ts +2 -1
- package/build/Modern/utils/types/ComponentProps.d.ts.map +1 -1
- package/build/Modern/utils/types/Slots.d.ts +2 -1
- package/build/Modern/utils/types/Slots.d.ts.map +1 -1
- package/build/Modern/utils/types/index.js +3 -3
- package/build/Modern/utils/warning.js +4 -7
- package/build/index.d.ts +2 -2
- package/build/index.d.ts.map +1 -1
- package/build/index.js +2 -2
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMedia.d.ts","sourceRoot":"","sources":["../../../src/Modern/hooks/useMedia.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"useMedia.d.ts","sourceRoot":"","sources":["../../../src/Modern/hooks/useMedia.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAKtC;;;;;;;;;;;;GAYG;AACH,wBAAgB,QAAQ,CAAC,gBAAgB,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,OAAO,WAgExE;AAED,KAAK,kBAAkB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,GAAG,SAAS,CAAC,CAAA;AAO7D,UAAU,eAAe;IACvB,QAAQ,EAAE,SAAS,CAAA;IACnB,QAAQ,CAAC,EAAE,kBAAkB,CAAA;CAC9B;AAID;;;;;;;;;;;;;GAaG;AACH,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,QAA0B,EAAE,EAAE,eAAe,+BAGnF"}
|
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
6
|
exports.MatchMedia = MatchMedia;
|
|
9
7
|
exports.useMedia = useMedia;
|
|
10
|
-
var
|
|
11
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _react = require("react");
|
|
12
9
|
var _environment = require("../utils/environment");
|
|
13
10
|
var _warning = require("../utils/warning");
|
|
14
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
-
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
16
12
|
/**
|
|
17
13
|
* `useMedia` will use the given `mediaQueryString` with `matchMedia` to
|
|
18
14
|
* determine if the document matches the media query string.
|
|
@@ -25,33 +21,29 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
25
21
|
* const coarsePointer = useMedia('(pointer: coarse)');
|
|
26
22
|
* // ...
|
|
27
23
|
* }
|
|
28
|
-
*/
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
24
|
+
*/function useMedia(mediaQueryString, defaultState) {
|
|
25
|
+
const features = (0, _react.useContext)(MatchMediaContext);
|
|
26
|
+
const [matches, setMatches] = (0, _react.useState)(() => {
|
|
27
|
+
if (features[mediaQueryString] !== undefined) {
|
|
28
|
+
return features[mediaQueryString];
|
|
29
|
+
}
|
|
35
30
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
31
|
+
// Prevent a React hydration mismatch when a default value is provided by not defaulting to window.matchMedia(query).matches.
|
|
32
|
+
if (defaultState !== undefined) {
|
|
33
|
+
return defaultState;
|
|
34
|
+
}
|
|
35
|
+
if (_environment.canUseDOM) {
|
|
36
|
+
return window.matchMedia(mediaQueryString).matches;
|
|
37
|
+
}
|
|
43
38
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
49
|
-
matches = _useState2[0],
|
|
50
|
-
setMatches = _useState2[1];
|
|
39
|
+
// A default value has not been provided, and you are rendering on the server, warn of a possible hydration mismatch when defaulting to false.
|
|
40
|
+
(0, _warning.warning)(true, '`useMedia` When server side rendering, defaultState should be defined to prevent a hydration mismatches.');
|
|
41
|
+
return false;
|
|
42
|
+
});
|
|
51
43
|
if (features[mediaQueryString] !== undefined && matches !== features[mediaQueryString]) {
|
|
52
44
|
setMatches(features[mediaQueryString]);
|
|
53
45
|
}
|
|
54
|
-
(0, _react.useEffect)(
|
|
46
|
+
(0, _react.useEffect)(() => {
|
|
55
47
|
// If `mediaQueryString` is present in features through `context` defer to
|
|
56
48
|
// the value present instead of checking with matchMedia
|
|
57
49
|
if (features[mediaQueryString] !== undefined) {
|
|
@@ -60,7 +52,7 @@ function useMedia(mediaQueryString, defaultState) {
|
|
|
60
52
|
function listener(event) {
|
|
61
53
|
setMatches(event.matches);
|
|
62
54
|
}
|
|
63
|
-
|
|
55
|
+
const mediaQueryList = window.matchMedia(mediaQueryString);
|
|
64
56
|
|
|
65
57
|
// Support fallback to `addListener` for broader browser support
|
|
66
58
|
// @ts-ignore this is not present in Safari <14
|
|
@@ -74,7 +66,7 @@ function useMedia(mediaQueryString, defaultState) {
|
|
|
74
66
|
// Make sure the media query list is in sync with the matches state
|
|
75
67
|
|
|
76
68
|
setMatches(mediaQueryList.matches);
|
|
77
|
-
return
|
|
69
|
+
return () => {
|
|
78
70
|
// @ts-ignore this is not present in Safari <14
|
|
79
71
|
|
|
80
72
|
if (mediaQueryList.addEventListener) {
|
|
@@ -89,8 +81,8 @@ function useMedia(mediaQueryString, defaultState) {
|
|
|
89
81
|
// Used to keep track of overrides to specific media query features, this should
|
|
90
82
|
// be used for development and demo purposes to emulate specific features if
|
|
91
83
|
// unavailable through devtools
|
|
92
|
-
|
|
93
|
-
|
|
84
|
+
const MatchMediaContext = /*#__PURE__*/(0, _react.createContext)({});
|
|
85
|
+
const defaultFeatures = {};
|
|
94
86
|
|
|
95
87
|
/**
|
|
96
88
|
* Use `MatchMedia` to emulate media conditions by passing in feature
|
|
@@ -106,11 +98,11 @@ var defaultFeatures = {};
|
|
|
106
98
|
* <Children />
|
|
107
99
|
* </MatchMedia>
|
|
108
100
|
*/
|
|
109
|
-
function MatchMedia(
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
101
|
+
function MatchMedia({
|
|
102
|
+
children,
|
|
103
|
+
features = defaultFeatures
|
|
104
|
+
}) {
|
|
105
|
+
const value = useShallowObject(features);
|
|
114
106
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(MatchMediaContext.Provider, {
|
|
115
107
|
value: value,
|
|
116
108
|
children: children
|
|
@@ -125,12 +117,9 @@ function MatchMedia(_ref) {
|
|
|
125
117
|
* shallow equality check is false each time the hook is called
|
|
126
118
|
*/
|
|
127
119
|
function useShallowObject(object) {
|
|
128
|
-
|
|
129
|
-
_useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
|
|
130
|
-
value = _useState4[0],
|
|
131
|
-
setValue = _useState4[1];
|
|
120
|
+
const [value, setValue] = (0, _react.useState)(object);
|
|
132
121
|
if (value !== object) {
|
|
133
|
-
|
|
122
|
+
const match = Object.keys(object).every(key => {
|
|
134
123
|
return object[key] === value[key];
|
|
135
124
|
});
|
|
136
125
|
if (!match) {
|
|
@@ -13,7 +13,5 @@ var _react = require("react");
|
|
|
13
13
|
* **NOTE**: The `refObject` should be passed to the underlying element, NOT the `forwardedRef`.
|
|
14
14
|
*/
|
|
15
15
|
function useRefObjectAsForwardedRef(forwardedRef, refObject) {
|
|
16
|
-
(0, _react.useImperativeHandle)(forwardedRef,
|
|
17
|
-
return refObject.current;
|
|
18
|
-
});
|
|
16
|
+
(0, _react.useImperativeHandle)(forwardedRef, () => refObject.current);
|
|
19
17
|
}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.isResponsiveValue = isResponsiveValue;
|
|
8
7
|
exports.useResponsiveValue = useResponsiveValue;
|
|
9
8
|
exports.viewportRanges = void 0;
|
|
10
|
-
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
11
9
|
var _useMedia = require("./useMedia");
|
|
12
10
|
// This file contains utilities for working with responsive values.
|
|
13
11
|
|
|
@@ -15,7 +13,7 @@ var _useMedia = require("./useMedia");
|
|
|
15
13
|
// because they use `em` units inside `calc()` (e.g., calc(48em - 0.02px)).
|
|
16
14
|
// As a temporary workaround, we're hardcoding the viewport ranges in `px` units.
|
|
17
15
|
// TODO: Use viewport range tokens from @primer/primitives
|
|
18
|
-
|
|
16
|
+
const viewportRanges = exports.viewportRanges = {
|
|
19
17
|
narrow: '(max-width: calc(768px - 0.02px))',
|
|
20
18
|
// < 768px
|
|
21
19
|
regular: '(min-width: 768px)',
|
|
@@ -34,9 +32,7 @@ var viewportRanges = exports.viewportRanges = {
|
|
|
34
32
|
* In other words, is it an object with viewport range keys?
|
|
35
33
|
*/
|
|
36
34
|
function isResponsiveValue(value) {
|
|
37
|
-
return
|
|
38
|
-
return ['narrow', 'regular', 'wide'].includes(key);
|
|
39
|
-
});
|
|
35
|
+
return typeof value === 'object' && Object.keys(value).some(key => ['narrow', 'regular', 'wide'].includes(key));
|
|
40
36
|
}
|
|
41
37
|
|
|
42
38
|
/**
|
|
@@ -51,12 +47,12 @@ function isResponsiveValue(value) {
|
|
|
51
47
|
function useResponsiveValue(value, fallback) {
|
|
52
48
|
// Check viewport size
|
|
53
49
|
// TODO: What is the performance cost of creating media query listeners in this hook?
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
50
|
+
const isNarrowViewport = (0, _useMedia.useMedia)(viewportRanges.narrow, false);
|
|
51
|
+
const isRegularViewport = (0, _useMedia.useMedia)(viewportRanges.regular, false);
|
|
52
|
+
const isWideViewport = (0, _useMedia.useMedia)(viewportRanges.wide, false);
|
|
57
53
|
if (isResponsiveValue(value)) {
|
|
58
54
|
// If we've reached this line, we know that value is a responsive value
|
|
59
|
-
|
|
55
|
+
const responsiveValue = value;
|
|
60
56
|
if (isNarrowViewport && 'narrow' in Object(responsiveValue)) {
|
|
61
57
|
return Object(responsiveValue).narrow;
|
|
62
58
|
} else if (isWideViewport && 'wide' in Object(responsiveValue)) {
|
package/build/Modern/index.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export declare const Modern: {
|
|
|
16
16
|
} & Omit<import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "ref"> & import("react").RefAttributes<HTMLImageElement>>;
|
|
17
17
|
};
|
|
18
18
|
AvatarStack: {
|
|
19
|
-
AvatarStack: ({ children, variant, shape, alignRight, disableExpand, size, className, style, "data-testid": dataTestId, }: import("./AvatarStack").AvatarStackProps) => import("react
|
|
19
|
+
AvatarStack: ({ children, variant, shape, alignRight, disableExpand, size, className, style, "data-testid": dataTestId, }: import("./AvatarStack").AvatarStackProps) => import("react").JSX.Element;
|
|
20
20
|
};
|
|
21
21
|
Flash: {
|
|
22
22
|
Flash: import("./utils/polymorphic").ForwardRefComponent<"div", import("./Flash").FlashProps>;
|
|
@@ -34,7 +34,7 @@ export declare const Modern: {
|
|
|
34
34
|
inline?: boolean;
|
|
35
35
|
} ? T extends unknown ? Omit<T, "as"> : never : never : never) & {
|
|
36
36
|
as?: As;
|
|
37
|
-
} & import("react").RefAttributes<unknown>) =>
|
|
37
|
+
} & import("react").RefAttributes<unknown>) => import("react").ReactNode) & {
|
|
38
38
|
displayName: string;
|
|
39
39
|
};
|
|
40
40
|
};
|
package/build/Modern/index.js
CHANGED
|
@@ -10,7 +10,7 @@ var _AvatarStack = require("./AvatarStack");
|
|
|
10
10
|
var _Flash = require("./Flash");
|
|
11
11
|
var _Link = require("./Link");
|
|
12
12
|
var _Pagination = require("./Pagination");
|
|
13
|
-
|
|
13
|
+
const Modern = exports.Modern = {
|
|
14
14
|
Avatar: {
|
|
15
15
|
Avatar: _Avatar.Avatar
|
|
16
16
|
},
|
package/build/Modern/type.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../src/Modern/type.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAC3C,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACzC,YAAY,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AACvC,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA"}
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../src/Modern/type.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAC3C,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AACrD,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACzC,YAAY,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AACvC,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA"}
|
|
@@ -4,10 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.canUseDOM = void 0;
|
|
7
|
-
var _window$document$crea, _window;
|
|
8
7
|
/**
|
|
9
8
|
* Indicate whether current execution environment can access the DOM.
|
|
10
9
|
*
|
|
11
10
|
* @see https://github.com/facebook/fbjs/blob/4d1751311d3f67af2dcce2e40df8512a23c7b9c6/packages/fbjs/src/core/ExecutionEnvironment.js#L12
|
|
12
11
|
*/
|
|
13
|
-
|
|
12
|
+
const canUseDOM = exports.canUseDOM = window?.document?.createElement ?? false;
|
|
@@ -1,24 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.hasInteractiveNodes = hasInteractiveNodes;
|
|
8
|
-
|
|
9
|
-
var nonValidSelectors = {
|
|
7
|
+
const nonValidSelectors = {
|
|
10
8
|
disabled: '[disabled]',
|
|
11
9
|
hidden: '[hidden]',
|
|
12
10
|
inert: '[inert]',
|
|
13
11
|
negativeTabIndex: '[tabindex="-1"]'
|
|
14
12
|
};
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
return "".concat(selector, ":not(").concat(Object.values(nonValidSelectors).join('):not('), ")");
|
|
18
|
-
});
|
|
13
|
+
const interactiveElementsSelectors = [`a[href]`, `button`, 'summary', 'select', 'input:not([type=hidden])', 'textarea', '[tabindex="0"]', `audio[controls]`, `video[controls]`, `[contenteditable]`];
|
|
14
|
+
const interactiveElements = interactiveElementsSelectors.map(selector => `${selector}:not(${Object.values(nonValidSelectors).join('):not(')})`);
|
|
19
15
|
|
|
20
16
|
// Combined selector for fast querySelector check
|
|
21
|
-
|
|
17
|
+
const interactiveSelector = interactiveElements.join(', ');
|
|
22
18
|
|
|
23
19
|
/**
|
|
24
20
|
* Finds interactive nodes within the passed node.
|
|
@@ -35,14 +31,14 @@ function hasInteractiveNodes(node, ignoreNodes) {
|
|
|
35
31
|
// We only need to confirm if at least one interactive node exists.
|
|
36
32
|
// If one does exist, we can abort early.
|
|
37
33
|
|
|
38
|
-
|
|
34
|
+
const nodesToIgnore = ignoreNodes ? [node, ...ignoreNodes] : [node];
|
|
39
35
|
|
|
40
36
|
// Performance optimization: Use querySelectorAll with combined selector first
|
|
41
37
|
// This avoids recursive getComputedStyle calls for each node
|
|
42
|
-
|
|
38
|
+
const candidates = node.querySelectorAll(interactiveSelector);
|
|
43
39
|
// eslint-disable-next-line @typescript-eslint/prefer-for-of
|
|
44
|
-
for (
|
|
45
|
-
|
|
40
|
+
for (let i = 0; i < candidates.length; i++) {
|
|
41
|
+
const candidate = candidates[i];
|
|
46
42
|
if (!nodesToIgnore.includes(candidate) && !isNonValidInteractiveNode(candidate)) {
|
|
47
43
|
return true;
|
|
48
44
|
}
|
|
@@ -53,12 +49,12 @@ function hasInteractiveNodes(node, ignoreNodes) {
|
|
|
53
49
|
// Note: Only call getComputedStyle when CSS-based checks are insufficient
|
|
54
50
|
function isNonValidInteractiveNode(node) {
|
|
55
51
|
// Fast path: Check attribute-based states first (no style recalc needed)
|
|
56
|
-
|
|
52
|
+
const isNonInteractive = node.matches('[disabled], [hidden], [inert]');
|
|
57
53
|
if (isNonInteractive) return true;
|
|
58
54
|
|
|
59
55
|
// Only call getComputedStyle if attribute checks passed
|
|
60
56
|
// This is necessary for display:none and visibility:hidden which aren't detectable via attributes
|
|
61
|
-
|
|
62
|
-
|
|
57
|
+
const nodeStyle = getComputedStyle(node);
|
|
58
|
+
const isHiddenVisually = nodeStyle.display === 'none' || nodeStyle.visibility === 'hidden';
|
|
63
59
|
return isHiddenVisually;
|
|
64
60
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ComponentPropsWithRef, ElementType } from 'react';
|
|
1
|
+
import type { ComponentPropsWithRef, ElementType, ReactNode, Ref, RefAttributes } from 'react';
|
|
2
2
|
/**
|
|
3
3
|
* Distributive Omit utility type that works correctly with union types
|
|
4
4
|
*/
|
|
@@ -6,7 +6,7 @@ type DistributiveOmit<T, TOmitted extends PropertyKey> = T extends unknown ? Omi
|
|
|
6
6
|
/**
|
|
7
7
|
* Fixed version of forwardRef that provides better type inference for polymorphic components
|
|
8
8
|
*/
|
|
9
|
-
type FixedForwardRef = <T, P = object>(render: (props: P, ref:
|
|
9
|
+
type FixedForwardRef = <T, P = object>(render: (props: P, ref: Ref<T>) => ReactNode) => (props: P & RefAttributes<T>) => ReactNode;
|
|
10
10
|
/**
|
|
11
11
|
* Cast forwardRef to the fixed version with better type inference
|
|
12
12
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modern-polymorphic.d.ts","sourceRoot":"","sources":["../../../src/Modern/utils/modern-polymorphic.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"modern-polymorphic.d.ts","sourceRoot":"","sources":["../../../src/Modern/utils/modern-polymorphic.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,WAAW,EAAE,SAAS,EAAE,GAAG,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAE9F;;GAEG;AACH,KAAK,gBAAgB,CAAC,CAAC,EAAE,QAAQ,SAAS,WAAW,IAAI,CAAC,SAAS,OAAO,GAAG,IAAI,CAAC,CAAC,EAAE,QAAQ,CAAC,GAAG,KAAK,CAAA;AAEtG;;GAEG;AAGH,KAAK,eAAe,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,KAAK,SAAS,KAAK,CAAC,KAAK,EAAE,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,KAAK,SAAS,CAAA;AAElI;;GAEG;AACH,eAAO,MAAM,eAAe,EAAiB,eAAe,CAAA;AAE5D;;;GAGG;AACH,MAAM,MAAM,gBAAgB,CAAC,GAAG,SAAS,WAAW,EAAE,eAAe,SAAS,WAAW,GAAG,KAAK,EAAE,KAAK,GAAG,MAAM,IAAI,gBAAgB,CACnI,qBAAqB,CAAC,WAAW,SAAS,GAAG,GAAG,eAAe,GAAG,GAAG,CAAC,GAAG,KAAK,EAC9E,IAAI,CACL,GAAG;IACF,EAAE,CAAC,EAAE,GAAG,CAAA;CACT,CAAA"}
|
|
@@ -20,7 +20,7 @@ var _react = require("react");
|
|
|
20
20
|
/**
|
|
21
21
|
* Cast forwardRef to the fixed version with better type inference
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
const fixedForwardRef = exports.fixedForwardRef = _react.forwardRef;
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
26
|
* Simplified polymorphic props type that handles the common pattern of
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*
|
|
5
5
|
* @see https://github.com/radix-ui/primitives/blob/17ffcb7aaa42cbd36b3c210ba86d7d73d218e5be/packages/react/polymorphic/src/polymorphic.ts
|
|
6
6
|
*/
|
|
7
|
-
import * as React from 'react';
|
|
7
|
+
import type * as React from 'react';
|
|
8
8
|
import type { JSX } from 'react';
|
|
9
9
|
import type { SlotMarker } from './types/Slots';
|
|
10
10
|
type Merge<P1 = {}, P2 = {}> = Omit<P1, keyof P2> & P2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"polymorphic.d.ts","sourceRoot":"","sources":["../../../src/Modern/utils/polymorphic.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"polymorphic.d.ts","sourceRoot":"","sources":["../../../src/Modern/utils/polymorphic.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAA;AACnC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAChC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAK/C,KAAK,KAAK,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,GAAG,EAAE,CAAA;AAEtD;;GAEG;AACH,KAAK,QAAQ,CAAC,CAAC,IAAI,CAAC,SAAS,mBAAmB,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,EAAE,CAAA;AAEvE;;GAEG;AACH,KAAK,gBAAgB,CAAC,CAAC,IAAI,CAAC,SAAS,mBAAmB,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;AAElF,KAAK,yBAAyB,CAAC,CAAC,EAAE,QAAQ,IAAI,KAAK,CAAC,yBAAyB,CAC3E,KAAK,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,KAAK,CAAC,qBAAqB,CAAC,CAAC,CAAC,GAAG,KAAK,EAAE,QAAQ,GAAG;IAAE,EAAE,CAAC,EAAE,CAAC,CAAA;CAAE,CAAC,CACnG,CAAA;AAMD,UAAU,mBAAmB,CAC3B,sBAAsB,EACtB,QAAQ,GAAG,EAAE,CAMb,SAAQ,yBAAyB,CAAC,sBAAsB,EAAE,QAAQ,CAAC,EAAE,UAAU;IAC/E;;;;;;;OAOG;IACH,CAAC,EAAE,GAAG,sBAAsB,EAC1B,KAAK,EAAE,EAAE,SAAS,EAAE,GAChB;QAAE,EAAE,EAAE,MAAM,GAAG,CAAC,iBAAiB,CAAA;KAAE,GACnC,EAAE,SAAS,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,GACrC,KAAK,CAAC,CAAC,EAAE,QAAQ,GAAG;QAAE,EAAE,EAAE,EAAE,CAAA;KAAE,CAAC,GAC/B,EAAE,SAAS,MAAM,GAAG,CAAC,iBAAiB,GACpC,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,EAAE,CAAC,EAAE,QAAQ,GAAG;QAAE,EAAE,EAAE,EAAE,CAAA;KAAE,CAAC,GACvD,KAAK,GACZ,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,IAAI,CAAA;CAClC;AAED,YAAY,EAAE,mBAAmB,EAAE,QAAQ,EAAE,gBAAgB,EAAE,KAAK,EAAE,CAAA"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import '@testing-library/jest-dom';
|
|
2
|
-
|
|
2
|
+
import type { ElementType } from 'react';
|
|
3
|
+
export declare function implementsClassName(Component: ElementType, baseClassName?: string): void;
|
|
3
4
|
//# sourceMappingURL=testing.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../../src/Modern/utils/testing.tsx"],"names":[],"mappings":"AACA,OAAO,2BAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../../src/Modern/utils/testing.tsx"],"names":[],"mappings":"AACA,OAAO,2BAA2B,CAAA;AAElC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AAExC,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,WAAW,EAAE,aAAa,CAAC,EAAE,MAAM,QAajF"}
|
|
@@ -10,12 +10,12 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
10
10
|
/* eslint-disable jest/no-export, jest/no-conditional-expect */
|
|
11
11
|
|
|
12
12
|
function implementsClassName(Component, baseClassName) {
|
|
13
|
-
test('renders with the custom className',
|
|
13
|
+
test('renders with the custom className', () => {
|
|
14
14
|
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
|
|
15
15
|
className: "test-class",
|
|
16
16
|
"data-testid": "className-test"
|
|
17
17
|
}));
|
|
18
|
-
|
|
18
|
+
const element = _react.screen.getByTestId('className-test');
|
|
19
19
|
expect(element).toBeInTheDocument();
|
|
20
20
|
if (baseClassName) {
|
|
21
21
|
expect(element).toHaveClass(baseClassName);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ComponentType, PropsWithChildren } from 'react';
|
|
1
2
|
/**
|
|
2
3
|
* Extract a component's props
|
|
3
4
|
*
|
|
@@ -5,5 +6,5 @@
|
|
|
5
6
|
*
|
|
6
7
|
* @example ComponentProps<typeof MyComponent>
|
|
7
8
|
*/
|
|
8
|
-
export type ComponentProps<T> = T extends
|
|
9
|
+
export type ComponentProps<T> = T extends ComponentType<PropsWithChildren<infer Props>> ? (Props extends object ? Props : never) : never;
|
|
9
10
|
//# sourceMappingURL=ComponentProps.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComponentProps.d.ts","sourceRoot":"","sources":["../../../../src/Modern/utils/types/ComponentProps.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"ComponentProps.d.ts","sourceRoot":"","sources":["../../../../src/Modern/utils/types/ComponentProps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAE7D;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI,CAAC,SAAS,aAAa,CAAC,iBAAiB,CAAC,MAAM,KAAK,CAAC,CAAC,GAAG,CAAC,KAAK,SAAS,MAAM,GAAG,KAAK,GAAG,KAAK,CAAC,GAAG,KAAK,CAAA"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
1
2
|
export interface SlotMarker {
|
|
2
3
|
/** Marker to denote the custom child slot for a component */
|
|
3
4
|
__SLOT__?: symbol;
|
|
4
5
|
}
|
|
5
6
|
export type WithSlotMarker<T> = T & SlotMarker;
|
|
6
|
-
export type FCWithSlotMarker<P> = WithSlotMarker<
|
|
7
|
+
export type FCWithSlotMarker<P> = WithSlotMarker<FC<P>>;
|
|
7
8
|
//# sourceMappingURL=Slots.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slots.d.ts","sourceRoot":"","sources":["../../../../src/Modern/utils/types/Slots.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,UAAU;IACzB,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI,CAAC,GAAG,UAAU,CAAA;AAE9C,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI,cAAc,CAAC,
|
|
1
|
+
{"version":3,"file":"Slots.d.ts","sourceRoot":"","sources":["../../../../src/Modern/utils/types/Slots.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAE/B,MAAM,WAAW,UAAU;IACzB,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI,CAAC,GAAG,UAAU,CAAA;AAE9C,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI,cAAc,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA"}
|
|
@@ -9,7 +9,7 @@ Object.keys(_ComponentProps).forEach(function (key) {
|
|
|
9
9
|
if (key in exports && exports[key] === _ComponentProps[key]) return;
|
|
10
10
|
Object.defineProperty(exports, key, {
|
|
11
11
|
enumerable: true,
|
|
12
|
-
get: function
|
|
12
|
+
get: function () {
|
|
13
13
|
return _ComponentProps[key];
|
|
14
14
|
}
|
|
15
15
|
});
|
|
@@ -20,7 +20,7 @@ Object.keys(_Slots).forEach(function (key) {
|
|
|
20
20
|
if (key in exports && exports[key] === _Slots[key]) return;
|
|
21
21
|
Object.defineProperty(exports, key, {
|
|
22
22
|
enumerable: true,
|
|
23
|
-
get: function
|
|
23
|
+
get: function () {
|
|
24
24
|
return _Slots[key];
|
|
25
25
|
}
|
|
26
26
|
});
|
|
@@ -31,7 +31,7 @@ Object.keys(_ViewportRangeKeys).forEach(function (key) {
|
|
|
31
31
|
if (key in exports && exports[key] === _ViewportRangeKeys[key]) return;
|
|
32
32
|
Object.defineProperty(exports, key, {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function
|
|
34
|
+
get: function () {
|
|
35
35
|
return _ViewportRangeKeys[key];
|
|
36
36
|
}
|
|
37
37
|
});
|
|
@@ -5,19 +5,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.warning = exports.warn = void 0;
|
|
7
7
|
function emptyFunction() {}
|
|
8
|
-
|
|
8
|
+
const warn = exports.warn = process.env.NODE_ENV !== 'production' ? function warn(message) {
|
|
9
9
|
console.warn('Warning:', message);
|
|
10
10
|
} : emptyFunction;
|
|
11
11
|
|
|
12
12
|
// Inspired by warning by fbjs
|
|
13
13
|
// @see https://github.com/facebook/fbjs/blob/main/packages/fbjs/src/__forks__/warning.js
|
|
14
|
-
|
|
15
|
-
for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
16
|
-
args[_key - 2] = arguments[_key];
|
|
17
|
-
}
|
|
14
|
+
const warning = exports.warning = process.env.NODE_ENV !== 'production' ? function warning(condition, format, ...args) {
|
|
18
15
|
if (condition) {
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
let index = 0;
|
|
17
|
+
const message = format.replace(/%s/g, () => {
|
|
21
18
|
return args[index++];
|
|
22
19
|
});
|
|
23
20
|
warn(message);
|
package/build/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { Legacy } from './Legacy';
|
|
2
|
-
export type { IAlertConsent, IFlexGridItem } from './Legacy/type';
|
|
2
|
+
export type { IAlert, IAlertConsent, IButton, IBlankslate, IBreadcrumb, ICheckbox, IDropdown, IFlexGrid, IFlexGridItem, IDisplayTable, IIcon, IInput, ILabel, ILoader, IMarkdown, IMenu, ITabNav, IUnderlineNav, IPreviousNext, IPopover, IProgress, IRadio, ISelect, ISelectMenu, ISubhead, ISyntaxHighlighter, IToast, } from './Legacy/type';
|
|
3
3
|
export { Modern } from './Modern';
|
|
4
|
-
export type { AvatarProps, FlashProps, LinkProps, PaginationProps } from './Modern/type';
|
|
4
|
+
export type { AvatarProps, AvatarStackProps, FlashProps, LinkProps, PaginationProps } from './Modern/type';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,YAAY,EACV,MAAM,EACN,aAAa,EACb,OAAO,EACP,WAAW,EACX,WAAW,EACX,SAAS,EACT,SAAS,EACT,SAAS,EACT,aAAa,EACb,aAAa,EACb,KAAK,EACL,MAAM,EACN,MAAM,EACN,OAAO,EACP,SAAS,EACT,KAAK,EACL,OAAO,EACP,aAAa,EACb,aAAa,EACb,QAAQ,EACR,SAAS,EACT,MAAM,EACN,OAAO,EACP,WAAW,EACX,QAAQ,EACR,kBAAkB,EAClB,MAAM,GACP,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,YAAY,EAAE,WAAW,EAAE,gBAAgB,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA"}
|
package/build/index.js
CHANGED
|
@@ -5,13 +5,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
Object.defineProperty(exports, "Legacy", {
|
|
7
7
|
enumerable: true,
|
|
8
|
-
get: function
|
|
8
|
+
get: function () {
|
|
9
9
|
return _Legacy.Legacy;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "Modern", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function
|
|
14
|
+
get: function () {
|
|
15
15
|
return _Modern.Modern;
|
|
16
16
|
}
|
|
17
17
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@papillonarts/components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.49.1",
|
|
4
4
|
"description": "Papillon Arts Components",
|
|
5
5
|
"homepage": "https://github.com/papillonarts/papillonarts/tree/master/packages/components",
|
|
6
6
|
"repository": {
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"build-release": "npm run build"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@papillonarts/css": "^0.
|
|
30
|
-
"@papillonarts/library": "^0.
|
|
29
|
+
"@papillonarts/css": "^0.49.1",
|
|
30
|
+
"@papillonarts/library": "^0.49.1"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "99aeb0ec52f96fcd66e8c4c6639e5e1265de6873"
|
|
33
33
|
}
|