diff --git a/.gitattributes b/.gitattributes index 9f60d4df1..fb7ceecb6 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1 @@ -*.snap filter=lfs diff=lfs merge=lfs -text +*.snap filter=lfs diff=lfs merge=lfs -text \ No newline at end of file diff --git a/.husky/post-checkout b/.husky/post-checkout new file mode 100755 index 000000000..c37815e2b --- /dev/null +++ b/.husky/post-checkout @@ -0,0 +1,3 @@ +#!/bin/sh +command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting '.git/hooks/post-checkout'.\n"; exit 2; } +git lfs post-checkout "$@" diff --git a/.husky/post-commit b/.husky/post-commit new file mode 100755 index 000000000..e5230c305 --- /dev/null +++ b/.husky/post-commit @@ -0,0 +1,3 @@ +#!/bin/sh +command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting '.git/hooks/post-commit'.\n"; exit 2; } +git lfs post-commit "$@" diff --git a/.husky/post-merge b/.husky/post-merge new file mode 100755 index 000000000..c99b752a5 --- /dev/null +++ b/.husky/post-merge @@ -0,0 +1,3 @@ +#!/bin/sh +command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting '.git/hooks/post-merge'.\n"; exit 2; } +git lfs post-merge "$@" diff --git a/.husky/pre-push b/.husky/pre-push new file mode 100755 index 000000000..216e91527 --- /dev/null +++ b/.husky/pre-push @@ -0,0 +1,3 @@ +#!/bin/sh +command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting '.git/hooks/pre-push'.\n"; exit 2; } +git lfs pre-push "$@" diff --git a/.storybook/preview-head.html b/.storybook/preview-head.html index 429f9c4a9..95a970841 100644 --- a/.storybook/preview-head.html +++ b/.storybook/preview-head.html @@ -1,7 +1,26 @@ - + diff --git a/global.d.ts b/global.d.ts index 0641b5506..aa0afd4d2 100644 --- a/global.d.ts +++ b/global.d.ts @@ -3,6 +3,8 @@ declare module '*.scss' { export default styles; } +declare module '@ngard/tiny-isequal'; + /** * userLanguage type for IE i18n */ diff --git a/package.json b/package.json index a00986252..832a604c3 100644 --- a/package.json +++ b/package.json @@ -49,9 +49,16 @@ "@floating-ui/react-dom": "0.6.0", "@floating-ui/react-dom-interactions": "0.6.3", "@mdi/react": "1.5.0", + "@ngard/tiny-isequal": "1.1.0", + "@types/lodash": "4.14.182", + "@types/react-is": "17.0.3", + "@types/shallowequal": "1.1.1", "bodymovin": "4.13.0", "lottie-web": "5.8.1", - "react-flip-toolkit": "7.0.13" + "react-flip-toolkit": "7.0.13", + "react-is": "18.1.0", + "resize-observer-polyfill": "1.5.1", + "shallowequal": "1.1.0" }, "peerDependencies": { "@types/react": "17.0.39", @@ -95,6 +102,7 @@ "@types/jest": "24.0.23", "@types/node": "16.11.26", "@types/react-color": "3.0.6", + "@types/react-window": "1.8.2", "@types/webpack": "5.28.0", "@typescript-eslint/eslint-plugin": "5.14.0", "@typescript-eslint/parser": "5.14.0", @@ -138,6 +146,7 @@ "jest-watch-typeahead": "1.0.0", "lint-staged": "12.3.6", "mini-css-extract-plugin": "2.6.0", + "mockdate": "3.0.0", "postcss": "8.4.4", "postcss-flexbugs-fixes": "5.0.2", "postcss-loader": "6.2.1", @@ -149,7 +158,10 @@ "react-dev-utils": "12.0.0", "react-docgen-typescript": "2.2.2", "react-refresh": "0.11.0", + "react-sortable-hoc": "2.0.0", "react-test-renderer": "17.0.2", + "react-window": "1.8.5", + "regenerator-runtime": "0.13.7", "resolve": "1.20.0", "resolve-url-loader": "4.0.0", "sass": "1.47.0", diff --git a/src/__snapshots__/storybook.test.js.snap b/src/__snapshots__/storybook.test.js.snap index 51918595c..a54577b15 100644 --- a/src/__snapshots__/storybook.test.js.snap +++ b/src/__snapshots__/storybook.test.js.snap @@ -1,11882 +1,3 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`Storyshots Accordion List Horizontal 1`] = ` -
-
-

- Header -

-
- -
-

- Footer -

-
-
-`; - -exports[`Storyshots Accordion List Vertical 1`] = ` -
-
-

- Header -

-
- -
-

- Footer -

-
-
-`; - -exports[`Storyshots Accordion Single 1`] = ` -
-
- Accordion Header - - - - - -
-
-
-
- Body 2 text used here. Bottom bars are sticky sections that can be used to highlight a few actions that are out of the view to be displayed inside the view. For example, if there's a very long form with Save and Cancel buttons at the bottom, we can use the bottom bar to show those two buttons in the view. We are making these bars to be flexible in height and also allowing any component to be added inside for now, to understand use cases from the team. -
-
-
-
-`; - -exports[`Storyshots Avatar Avatar Default 1`] = ` -
- random profile image -
-`; - -exports[`Storyshots Avatar Avatar Fallback Hashing 1`] = ` -
- HF -
-`; - -exports[`Storyshots Avatar Avatar Fallback Theme 1`] = ` -
- AB -
-`; - -exports[`Storyshots Avatar Avatar Icon 1`] = ` -
- - - - - -
-`; - -exports[`Storyshots Avatar Avatar Round 1`] = ` -
- random profile image -
-`; - -exports[`Storyshots Avatar Avatar Round Icon 1`] = ` -
- - - - - -
-`; - -exports[`Storyshots Badge Badge Active 1`] = ` - - 8 - -`; - -exports[`Storyshots Badge Badge Default 1`] = ` - - 8 - -`; - -exports[`Storyshots Badge Badge Disruptive 1`] = ` - - 8 - -`; - -exports[`Storyshots Button Counter 1`] = ` - -`; - -exports[`Storyshots Button Default 1`] = ` - -`; - -exports[`Storyshots Button Neutral 1`] = ` - -`; - -exports[`Storyshots Button Primary 1`] = ` - -`; - -exports[`Storyshots Button Secondary 1`] = ` - -`; - -exports[`Storyshots Button Split 1`] = ` -Array [ - , - , -] -`; - -exports[`Storyshots Button Split With Counter 1`] = ` -Array [ - , - , -] -`; - -exports[`Storyshots Button Toggle 1`] = ` - -`; - -exports[`Storyshots Button Toggle With Counter 1`] = ` - -`; - -exports[`Storyshots Button Two State Button 1`] = ` - -`; - -exports[`Storyshots Check Box Check Box 1`] = ` -
- - -
-`; - -exports[`Storyshots Check Box Check Box Group 1`] = ` -
-
- - -
-
- - -
-
- - -
-
-`; - -exports[`Storyshots Config Provider Theming 1`] = ` -
-

- Selected Theme: - - blue - -

-
-
-

- Predefined -

- -
-
-

- Custom -

-
-
-
-
-
- -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- -
-
-
-
-
- - -
-
- - -
-
- - -
-
- - -
-
-
-
-
-
-
-
- - - -
-
- - - -
-
- - - -
-
-
- - - - -
-
-
-
- - - - -
-
-
-
- - - - -
-
-
-
- - - - -
-
- -
-
-
-
-
-
-

- 3 - / - 5 -

-
- - - - - - - - - -
-
- - -
-
- - -
-
- - -
-
-
-
- - -
-
- - -
-
- - -
-
-
-`; - -exports[`Storyshots Dialog Medium 1`] = ` - -`; - -exports[`Storyshots Dialog Small 1`] = ` - -`; - -exports[`Storyshots Dropdown Dropdown Button 1`] = ` -
- -
-`; - -exports[`Storyshots Dropdown Dropdown Div 1`] = ` -
-
- - HTMLDivElement - - - - - - -
-
-`; - -exports[`Storyshots Empty Custom Image 1`] = ` -
-
- - - - - -
-
- Short Message Here -
-
- More detail on how might the user be able to get around this -
-
-`; - -exports[`Storyshots Empty Empty Messages 1`] = ` -
-
- - - - - - - -
-
- Short Message Here -
-
- More detail on how might the user be able to get around this -
-
-`; - -exports[`Storyshots Empty Error State 1`] = ` -
-
- - - - - - - - - - - - - - - -
-
- Short Message Here -
-
- More detail on how might the user be able to get around this -
-
-`; - -exports[`Storyshots Empty No Data 1`] = ` -
-
- - - - - - - - - -
-
- Short Message Here -
-
- More detail on how might the user be able to get around this -
-
-`; - -exports[`Storyshots Empty No Search Results 1`] = ` -
-
- - - - - - - - - - - -
-
- Short Message Here -
-
- More detail on how might the user be able to get around this -
-
-`; - -exports[`Storyshots Empty Tasks Complete 1`] = ` -
-
- - - - - - - - - - - - - - - -
-
- Short Message Here -
-
- More detail on how might the user be able to get around this -
-
-`; - -exports[`Storyshots Icon Basic 1`] = ` - - - - My icon title. - - - My icon description. - - - - -`; - -exports[`Storyshots Icon Icomoon 1`] = ` - - - - - -`; - -exports[`Storyshots Icon Icomoon Multicolor 1`] = ` - - - - - - -`; - -exports[`Storyshots Info Bar Disruptive 1`] = ` -
- - - - - -
- Body2 is used inside here. -
- - -
-`; - -exports[`Storyshots Info Bar Neutral 1`] = ` -
- - - - - -
- Body2 is used inside here. -
- - -
-`; - -exports[`Storyshots Info Bar Positive 1`] = ` -
- - - - - -
- Body2 is used inside here. -
- - -
-`; - -exports[`Storyshots Info Bar Warning 1`] = ` -
- - - - - -
- Body2 is used inside here. -
- - -
-`; - -exports[`Storyshots Input Search Box 1`] = ` -
-
-
- - -
- -
-
-
- -
- - - - - -
- -
-
-`; - -exports[`Storyshots Input Text Area 1`] = ` -
-
- - -
- -
-
-
-