@spaced-out/ui-design-system 0.5.9 → 0.5.11
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/.github/workflows/publish_to_npm.yml +21 -27
- package/.storybook/main.ts +1 -1
- package/.storybook/public/component-parent-levels.json +77 -77
- package/CHANGELOG.md +25 -0
- package/eslint.config.mjs +41 -25
- package/lib/components/Card/Card.d.ts +7 -5
- package/lib/components/Card/Card.d.ts.map +1 -1
- package/lib/components/Card/Card.js +33 -1
- package/lib/components/CircularLoader/CircularLoader.d.ts +1 -0
- package/lib/components/CircularLoader/CircularLoader.d.ts.map +1 -1
- package/lib/components/CircularLoader/CircularLoader.js +7 -1
- package/lib/components/EmptyState/EmptyState.d.ts +1 -0
- package/lib/components/EmptyState/EmptyState.d.ts.map +1 -1
- package/lib/components/EmptyState/EmptyState.js +26 -1
- package/lib/components/ErrorMessage/ErrorMessage.d.ts +1 -0
- package/lib/components/ErrorMessage/ErrorMessage.d.ts.map +1 -1
- package/lib/components/ErrorMessage/ErrorMessage.js +30 -1
- package/lib/components/FocusManager/FocusManager.d.ts +1 -0
- package/lib/components/FocusManager/FocusManager.d.ts.map +1 -1
- package/lib/components/FocusManager/FocusManager.js +6 -1
- package/lib/components/Grid/Grid.d.ts +4 -2
- package/lib/components/Grid/Grid.d.ts.map +1 -1
- package/lib/components/Grid/Grid.js +13 -3
- package/lib/components/Icon/Icon.d.ts +1 -0
- package/lib/components/Icon/Icon.d.ts.map +1 -1
- package/lib/components/Icon/Icon.js +7 -1
- package/lib/components/Input/Input.d.ts +1 -0
- package/lib/components/Input/Input.d.ts.map +1 -1
- package/lib/components/Input/Input.js +64 -0
- package/lib/components/LinearLoader/LinearLoader.d.ts +1 -0
- package/lib/components/LinearLoader/LinearLoader.d.ts.map +1 -1
- package/lib/components/LinearLoader/LinearLoader.js +7 -1
- package/lib/components/PromptChip/PromptChip.d.ts +2 -0
- package/lib/components/PromptChip/PromptChip.d.ts.map +1 -1
- package/lib/components/PromptChip/PromptChip.js +2 -2
- package/lib/components/Separator/Separator.d.ts +1 -0
- package/lib/components/Separator/Separator.d.ts.map +1 -1
- package/lib/components/Separator/Separator.js +7 -2
- package/lib/components/Shimmer/Shimmer.d.ts +5 -2
- package/lib/components/Shimmer/Shimmer.d.ts.map +1 -1
- package/lib/components/Shimmer/Shimmer.js +39 -8
- package/lib/components/StatusIndicator/StatusIndicator.d.ts +1 -0
- package/lib/components/StatusIndicator/StatusIndicator.d.ts.map +1 -1
- package/lib/components/StatusIndicator/StatusIndicator.js +6 -1
- package/lib/components/StickyBar/StickyBar.d.ts +4 -2
- package/lib/components/StickyBar/StickyBar.d.ts.map +1 -1
- package/lib/components/StickyBar/StickyBar.js +16 -1
- package/lib/components/Text/Text.d.ts +2 -0
- package/lib/components/Text/Text.d.ts.map +1 -1
- package/lib/components/Text/Text.js +189 -27
- package/lib/components/Toggle/Toggle.d.ts +1 -0
- package/lib/components/Toggle/Toggle.d.ts.map +1 -1
- package/lib/components/Toggle/Toggle.js +18 -0
- package/lib/components/Truncate/Truncate.d.ts +1 -0
- package/lib/components/Truncate/Truncate.d.ts.map +1 -1
- package/lib/components/Truncate/Truncate.js +12 -3
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.d.ts.map +1 -1
- package/lib/utils/index.js +11 -0
- package/lib/utils/qa/index.d.ts +2 -0
- package/lib/utils/qa/index.d.ts.map +1 -0
- package/lib/utils/qa/index.js +16 -0
- package/lib/utils/qa/qa.d.ts +30 -0
- package/lib/utils/qa/qa.d.ts.map +1 -0
- package/lib/utils/qa/qa.js +52 -0
- package/package.json +2 -1
|
@@ -2,14 +2,10 @@
|
|
|
2
2
|
# Note: Do not change
|
|
3
3
|
|
|
4
4
|
name: Release Genesis to NPM
|
|
5
|
+
|
|
5
6
|
on:
|
|
6
7
|
workflow_dispatch:
|
|
7
8
|
inputs:
|
|
8
|
-
branch:
|
|
9
|
-
# Note(Nishant): New input added to dynamically select release branch from UI
|
|
10
|
-
description: 'Branch to release from'
|
|
11
|
-
required: true
|
|
12
|
-
default: master
|
|
13
9
|
release-type:
|
|
14
10
|
description: 'Select Release type (prerelease appends beta in build number)'
|
|
15
11
|
type: choice
|
|
@@ -19,6 +15,7 @@ on:
|
|
|
19
15
|
- major
|
|
20
16
|
- prerelease
|
|
21
17
|
required: true
|
|
18
|
+
|
|
22
19
|
jobs:
|
|
23
20
|
release:
|
|
24
21
|
runs-on: ubuntu-latest
|
|
@@ -40,8 +37,8 @@ jobs:
|
|
|
40
37
|
uses: actions/checkout@v4
|
|
41
38
|
with:
|
|
42
39
|
token: ${{ secrets.NPM_PUBLISH_USER_ACCESS_TOKEN }}
|
|
43
|
-
fetch-depth:
|
|
44
|
-
ref: ${{ github.
|
|
40
|
+
fetch-depth: 0
|
|
41
|
+
ref: ${{ github.ref }} # e.g. refs/heads/master (from the UI selector)
|
|
45
42
|
|
|
46
43
|
- name: Setup Node.js
|
|
47
44
|
uses: actions/setup-node@v4
|
|
@@ -49,25 +46,20 @@ jobs:
|
|
|
49
46
|
registry-url: https://registry.npmjs.org/
|
|
50
47
|
node-version: '22.18.0'
|
|
51
48
|
|
|
52
|
-
# -------------------------------------------------------------------------------------
|
|
53
|
-
# Note(Nishant): Install isolated dependencies
|
|
54
|
-
# -------------------------------------------------------------------------------------
|
|
55
49
|
- name: Install dependencies
|
|
56
|
-
run:
|
|
57
|
-
yarn install
|
|
50
|
+
run: yarn install
|
|
58
51
|
|
|
59
52
|
# ToDo(Nishant): Activate this once we have chromatic tests ready.
|
|
60
|
-
|
|
61
|
-
#
|
|
53
|
+
# - name: Run tests
|
|
54
|
+
# run: yarn test
|
|
62
55
|
|
|
63
|
-
# Configure Git. TODO(Nishant): update with a org bot instead of personal detail
|
|
64
56
|
- name: Git configuration
|
|
65
57
|
run: |
|
|
66
58
|
git config --global user.email "86281150+superrover@users.noreply.github.com"
|
|
67
59
|
git config --global user.name "Nishant Gaurav"
|
|
68
|
-
git fetch --all
|
|
69
|
-
git checkout ${
|
|
70
|
-
git pull origin ${
|
|
60
|
+
git fetch --all --tags
|
|
61
|
+
git checkout "${GITHUB_REF_NAME}"
|
|
62
|
+
git pull --ff-only origin "${GITHUB_REF_NAME}"
|
|
71
63
|
|
|
72
64
|
# Bump package version
|
|
73
65
|
# Use tag latest
|
|
@@ -76,7 +68,7 @@ jobs:
|
|
|
76
68
|
- name: Validate release type against selected branch
|
|
77
69
|
id: validate-release
|
|
78
70
|
run: |
|
|
79
|
-
BRANCH="${
|
|
71
|
+
BRANCH="${GITHUB_REF_NAME}"
|
|
80
72
|
RELEASE_TYPE="${{ github.event.inputs.release-type }}"
|
|
81
73
|
|
|
82
74
|
if [[ "$BRANCH" != "master" && "$RELEASE_TYPE" != "prerelease" ]]; then
|
|
@@ -85,11 +77,11 @@ jobs:
|
|
|
85
77
|
fi
|
|
86
78
|
|
|
87
79
|
if [[ "$RELEASE_TYPE" == "prerelease" ]]; then
|
|
88
|
-
echo "RELEASE_TAG=beta" >> $GITHUB_ENV
|
|
89
|
-
echo "IS_PRERELEASE=true" >> $GITHUB_ENV
|
|
80
|
+
echo "RELEASE_TAG=beta" >> "$GITHUB_ENV"
|
|
81
|
+
echo "IS_PRERELEASE=true" >> "$GITHUB_ENV"
|
|
90
82
|
else
|
|
91
|
-
echo "RELEASE_TAG=latest" >> $GITHUB_ENV
|
|
92
|
-
echo "IS_PRERELEASE=false" >> $GITHUB_ENV
|
|
83
|
+
echo "RELEASE_TAG=latest" >> "$GITHUB_ENV"
|
|
84
|
+
echo "IS_PRERELEASE=false" >> "$GITHUB_ENV"
|
|
93
85
|
fi
|
|
94
86
|
# Note(Nishant): Enforces prerelease-only behavior on non-master branches
|
|
95
87
|
|
|
@@ -102,16 +94,18 @@ jobs:
|
|
|
102
94
|
fi
|
|
103
95
|
# Note(Nishant): Unified step for version bump, respecting prerelease condition
|
|
104
96
|
|
|
105
|
-
|
|
97
|
+
# Push changes
|
|
106
98
|
- name: Push CHANGELOG.md and created release tag
|
|
107
|
-
run: |
|
|
108
|
-
git push --follow-tags origin ${{ github.event.inputs.branch }}
|
|
109
99
|
env:
|
|
110
100
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
101
|
+
run: |
|
|
102
|
+
# Push to the same branch the workflow was dispatched from
|
|
103
|
+
git push --follow-tags origin "${GITHUB_REF_NAME}"
|
|
104
|
+
|
|
111
105
|
# Note(Nishant): Push to selected branch, not hardcoded master
|
|
112
106
|
|
|
113
107
|
# Publish version to NPM repository
|
|
114
108
|
- name: Publish to NPM
|
|
115
|
-
run: yarn publish --verbose --access public --tag ${{ env.RELEASE_TAG }}
|
|
116
109
|
env:
|
|
117
110
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
|
|
111
|
+
run: yarn publish --verbose --access public --tag "$RELEASE_TAG"
|
package/.storybook/main.ts
CHANGED
|
@@ -59,7 +59,7 @@ const config: StorybookConfig = {
|
|
|
59
59
|
process: require.resolve('process/browser'),
|
|
60
60
|
};
|
|
61
61
|
|
|
62
|
-
// Fix font rule clobbering images
|
|
62
|
+
// Fix font rule clobbering images
|
|
63
63
|
config.module!.rules = (config.module!.rules || []).map((rule: any) => {
|
|
64
64
|
if (rule.test && rule.test.toString().includes('woff')) {
|
|
65
65
|
return {
|
|
@@ -1,95 +1,95 @@
|
|
|
1
1
|
{
|
|
2
2
|
"leaves": [
|
|
3
|
-
"Card
|
|
4
|
-
"CircularLoader
|
|
5
|
-
"ConditionalWrapper
|
|
6
|
-
"EmptyState
|
|
7
|
-
"ErrorMessage
|
|
8
|
-
"FocusManager
|
|
9
|
-
"Grid
|
|
10
|
-
"LinearLoader
|
|
11
|
-
"Separator
|
|
12
|
-
"Shimmer
|
|
13
|
-
"StatusIndicator
|
|
14
|
-
"StickyBar
|
|
15
|
-
"Text
|
|
16
|
-
"Toggle
|
|
17
|
-
"Truncate
|
|
3
|
+
"Card",
|
|
4
|
+
"CircularLoader",
|
|
5
|
+
"ConditionalWrapper",
|
|
6
|
+
"EmptyState",
|
|
7
|
+
"ErrorMessage",
|
|
8
|
+
"FocusManager",
|
|
9
|
+
"Grid",
|
|
10
|
+
"LinearLoader",
|
|
11
|
+
"Separator",
|
|
12
|
+
"Shimmer",
|
|
13
|
+
"StatusIndicator",
|
|
14
|
+
"StickyBar",
|
|
15
|
+
"Text",
|
|
16
|
+
"Toggle",
|
|
17
|
+
"Truncate"
|
|
18
18
|
],
|
|
19
19
|
"1_level_parents": [
|
|
20
|
-
"FocusManagerWithArrowKeyNavigation
|
|
21
|
-
"Icon
|
|
22
|
-
"ProgressDonut
|
|
23
|
-
"RadioButton
|
|
24
|
-
"ScoreBar
|
|
25
|
-
"Textarea
|
|
26
|
-
"Tooltip
|
|
20
|
+
"FocusManagerWithArrowKeyNavigation",
|
|
21
|
+
"Icon",
|
|
22
|
+
"ProgressDonut",
|
|
23
|
+
"RadioButton",
|
|
24
|
+
"ScoreBar",
|
|
25
|
+
"Textarea",
|
|
26
|
+
"Tooltip"
|
|
27
27
|
],
|
|
28
28
|
"2_level_parents": [
|
|
29
|
-
"Avatar
|
|
30
|
-
"Badge
|
|
31
|
-
"BadgedIcon
|
|
32
|
-
"Button
|
|
33
|
-
"Checkbox
|
|
34
|
-
"Chip
|
|
35
|
-
"FormTitleWrapper
|
|
36
|
-
"Input
|
|
37
|
-
"KPIBox
|
|
38
|
-
"Link
|
|
39
|
-
"Notification
|
|
40
|
-
"PromptChip
|
|
41
|
-
"Stepper
|
|
42
|
-
"TextTile
|
|
43
|
-
"Timeline
|
|
44
|
-
"Toast
|
|
45
|
-
"TruncatedTextWithTooltip
|
|
29
|
+
"Avatar",
|
|
30
|
+
"Badge",
|
|
31
|
+
"BadgedIcon",
|
|
32
|
+
"Button",
|
|
33
|
+
"Checkbox",
|
|
34
|
+
"Chip",
|
|
35
|
+
"FormTitleWrapper",
|
|
36
|
+
"Input",
|
|
37
|
+
"KPIBox",
|
|
38
|
+
"Link",
|
|
39
|
+
"Notification",
|
|
40
|
+
"PromptChip",
|
|
41
|
+
"Stepper",
|
|
42
|
+
"TextTile",
|
|
43
|
+
"Timeline",
|
|
44
|
+
"Toast",
|
|
45
|
+
"TruncatedTextWithTooltip"
|
|
46
46
|
],
|
|
47
47
|
"3_level_parents": [
|
|
48
|
-
"Accordion
|
|
49
|
-
"AvatarGroup
|
|
50
|
-
"Breadcrumbs
|
|
51
|
-
"ChatBubble
|
|
52
|
-
"CollapsibleCard
|
|
53
|
-
"FileUpload
|
|
54
|
-
"InContextAlert
|
|
55
|
-
"Modal
|
|
56
|
-
"PageTitle
|
|
57
|
-
"PromptInput
|
|
58
|
-
"RadioTile
|
|
59
|
-
"RangeSlider
|
|
60
|
-
"Rating
|
|
61
|
-
"SearchInput
|
|
62
|
-
"SideMenuLink
|
|
63
|
-
"SubMenu
|
|
64
|
-
"WeekdayPicker
|
|
48
|
+
"Accordion",
|
|
49
|
+
"AvatarGroup",
|
|
50
|
+
"Breadcrumbs",
|
|
51
|
+
"ChatBubble",
|
|
52
|
+
"CollapsibleCard",
|
|
53
|
+
"FileUpload",
|
|
54
|
+
"InContextAlert",
|
|
55
|
+
"Modal",
|
|
56
|
+
"PageTitle",
|
|
57
|
+
"PromptInput",
|
|
58
|
+
"RadioTile",
|
|
59
|
+
"RangeSlider",
|
|
60
|
+
"Rating",
|
|
61
|
+
"SearchInput",
|
|
62
|
+
"SideMenuLink",
|
|
63
|
+
"SubMenu",
|
|
64
|
+
"WeekdayPicker"
|
|
65
65
|
],
|
|
66
66
|
"4_level_parents": [
|
|
67
|
-
"Banner
|
|
68
|
-
"Dialog
|
|
69
|
-
"InContextAlertWithMultipleActions
|
|
70
|
-
"Menu
|
|
71
|
-
"Panel
|
|
67
|
+
"Banner",
|
|
68
|
+
"Dialog",
|
|
69
|
+
"InContextAlertWithMultipleActions",
|
|
70
|
+
"Menu",
|
|
71
|
+
"Panel"
|
|
72
72
|
],
|
|
73
73
|
"5_level_parents": [
|
|
74
|
-
"ButtonDropdown
|
|
75
|
-
"Disclaimer
|
|
76
|
-
"Dropdown
|
|
77
|
-
"Typeahead
|
|
74
|
+
"ButtonDropdown",
|
|
75
|
+
"Disclaimer",
|
|
76
|
+
"Dropdown",
|
|
77
|
+
"Typeahead"
|
|
78
78
|
],
|
|
79
79
|
"6_level_parents": [
|
|
80
|
-
"ButtonTabs
|
|
81
|
-
"Charts
|
|
82
|
-
"Combobox
|
|
83
|
-
"DateRangePicker
|
|
84
|
-
"FilterButtonOverlay
|
|
85
|
-
"InlineDropdown
|
|
86
|
-
"OptionButton
|
|
87
|
-
"Pagination
|
|
88
|
-
"Table
|
|
89
|
-
"Tabs
|
|
90
|
-
"TokenListInput
|
|
80
|
+
"ButtonTabs",
|
|
81
|
+
"Charts",
|
|
82
|
+
"Combobox",
|
|
83
|
+
"DateRangePicker",
|
|
84
|
+
"FilterButtonOverlay",
|
|
85
|
+
"InlineDropdown",
|
|
86
|
+
"OptionButton",
|
|
87
|
+
"Pagination",
|
|
88
|
+
"Table",
|
|
89
|
+
"Tabs",
|
|
90
|
+
"TokenListInput"
|
|
91
91
|
],
|
|
92
92
|
"7_level_parents": [
|
|
93
|
-
"InfinitePagination
|
|
93
|
+
"InfinitePagination"
|
|
94
94
|
]
|
|
95
95
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,31 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.5.11](https://github.com/spaced-out/ui-design-system/compare/v0.5.10...v0.5.11) (2025-09-23)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* adds testid support in input icon and text ([3ce908f](https://github.com/spaced-out/ui-design-system/commit/3ce908f6171b85cba0757433e1924df5d9ee09f2))
|
|
11
|
+
* adds testid support other leaf nodes ([ccdd323](https://github.com/spaced-out/ui-design-system/commit/ccdd3230a73b8813033024473a83271024b2b6d9))
|
|
12
|
+
* extra classNames in prompt chip ([#408](https://github.com/spaced-out/ui-design-system/issues/408)) ([f000cbf](https://github.com/spaced-out/ui-design-system/commit/f000cbf6b8841680460a7c5d82db86066514b200))
|
|
13
|
+
|
|
14
|
+
### [0.5.10](https://github.com/spaced-out/ui-design-system/compare/v0.5.9...v0.5.10) (2025-09-23)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* introduces new util and story for generating data-testids ([4baf068](https://github.com/spaced-out/ui-design-system/commit/4baf0680bfe3d1aa9cf86b88c150df97c85271be))
|
|
20
|
+
* release workflow changes ([90a910e](https://github.com/spaced-out/ui-design-system/commit/90a910ea75517b3da60e2156cc508d660b2cc8c4))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Bug Fixes
|
|
24
|
+
|
|
25
|
+
* added stricter eslint rules ([45c42b9](https://github.com/spaced-out/ui-design-system/commit/45c42b9b1a3de57c5420047a247b2028aac5e9dd))
|
|
26
|
+
* added stricter rules ([2ca45da](https://github.com/spaced-out/ui-design-system/commit/2ca45dada041a412c3d43a84b6b442a44542fbf0))
|
|
27
|
+
* fixed scripts to work with alias paths ([b3f1542](https://github.com/spaced-out/ui-design-system/commit/b3f1542710f4347611235b7770858209092dcb0b))
|
|
28
|
+
* rules of hooks fixed ([2eaba73](https://github.com/spaced-out/ui-design-system/commit/2eaba73ab64bd4191852f9926d7e54c1469b5c1b))
|
|
29
|
+
|
|
5
30
|
### [0.5.9](https://github.com/spaced-out/ui-design-system/compare/v0.5.8...v0.5.9) (2025-09-17)
|
|
6
31
|
|
|
7
32
|
|
package/eslint.config.mjs
CHANGED
|
@@ -65,21 +65,21 @@ export default [
|
|
|
65
65
|
files: ['src/**/*.{ts,tsx}'],
|
|
66
66
|
rules: {
|
|
67
67
|
// Core
|
|
68
|
-
'arrow-body-style': ['
|
|
69
|
-
curly: ['
|
|
70
|
-
'comma-spacing': ['
|
|
71
|
-
'eol-last': '
|
|
68
|
+
'arrow-body-style': ['error', 'as-needed'],
|
|
69
|
+
curly: ['error', 'all'],
|
|
70
|
+
'comma-spacing': ['error', {before: false, after: true}],
|
|
71
|
+
'eol-last': 'error',
|
|
72
72
|
eqeqeq: ['error', 'always', {null: 'ignore'}],
|
|
73
73
|
indent: 'off',
|
|
74
|
-
'max-params': ['
|
|
75
|
-
'no-alert': '
|
|
74
|
+
'max-params': ['error', {max: 4}],
|
|
75
|
+
'no-alert': 'error',
|
|
76
76
|
'no-console': ['error', {allow: ['warn', 'error']}],
|
|
77
77
|
'no-dupe-args': 'error',
|
|
78
78
|
'no-dupe-keys': 'error',
|
|
79
79
|
'no-duplicate-case': 'error',
|
|
80
80
|
// Allow TS overloads
|
|
81
81
|
'no-dupe-class-members': 'off',
|
|
82
|
-
'no-empty-function': '
|
|
82
|
+
'no-empty-function': 'error',
|
|
83
83
|
'no-empty-pattern': 'error',
|
|
84
84
|
'no-eval': 'error',
|
|
85
85
|
'no-extend-native': 'error',
|
|
@@ -94,43 +94,51 @@ export default [
|
|
|
94
94
|
'no-redeclare': 'off', // use TS rule
|
|
95
95
|
'no-restricted-globals': ['error', 'event', 'location'],
|
|
96
96
|
'no-sparse-arrays': 'error',
|
|
97
|
-
'no-tabs': '
|
|
97
|
+
'no-tabs': 'error',
|
|
98
98
|
'no-this-before-super': 'error',
|
|
99
|
-
'no-trailing-spaces': '
|
|
99
|
+
'no-trailing-spaces': 'error',
|
|
100
100
|
'no-underscore-dangle': 'off',
|
|
101
|
-
'no-unmodified-loop-condition': '
|
|
101
|
+
'no-unmodified-loop-condition': 'error',
|
|
102
102
|
'no-undef': 'off', // TS handles this
|
|
103
|
-
'no-unreachable': '
|
|
103
|
+
'no-unreachable': 'error',
|
|
104
104
|
'no-useless-constructor': 'off', // use TS rule
|
|
105
105
|
'no-var': 'error',
|
|
106
106
|
'no-with': 'error',
|
|
107
107
|
'object-shorthand': 'error',
|
|
108
108
|
'prefer-arrow-callback': 'error',
|
|
109
|
-
'prefer-const': '
|
|
110
|
-
'prefer-spread': '
|
|
111
|
-
quotes: ['
|
|
109
|
+
'prefer-const': 'error',
|
|
110
|
+
'prefer-spread': 'error',
|
|
111
|
+
quotes: ['error', 'single', {allowTemplateLiterals: true}],
|
|
112
112
|
'require-yield': 'error',
|
|
113
113
|
'rest-spread-spacing': 'error',
|
|
114
|
-
strict: ['
|
|
114
|
+
strict: ['error', 'never'],
|
|
115
115
|
|
|
116
116
|
// import
|
|
117
|
-
'import/newline-after-import': ['
|
|
117
|
+
'import/newline-after-import': ['error', {count: 2}],
|
|
118
118
|
'import/no-duplicates': 'error',
|
|
119
|
+
'no-restricted-imports': [
|
|
120
|
+
'error',
|
|
121
|
+
{
|
|
122
|
+
patterns: [
|
|
123
|
+
'./*', // ban same-folder
|
|
124
|
+
'../*', // ban parent-folder
|
|
125
|
+
],
|
|
126
|
+
},
|
|
127
|
+
],
|
|
119
128
|
|
|
120
129
|
// react
|
|
121
130
|
'react/jsx-no-undef': 'error',
|
|
122
|
-
'react/jsx-pascal-case': '
|
|
131
|
+
'react/jsx-pascal-case': 'error',
|
|
123
132
|
'react/jsx-uses-react': 'off',
|
|
124
133
|
'react/jsx-uses-vars': 'error',
|
|
125
|
-
'react/no-array-index-key': '
|
|
134
|
+
'react/no-array-index-key': 'error',
|
|
126
135
|
'react/no-deprecated': 'error',
|
|
127
136
|
'react/no-direct-mutation-state': 'error',
|
|
128
|
-
'react/no-string-refs': '
|
|
137
|
+
'react/no-string-refs': 'error',
|
|
129
138
|
'react/prop-types': 'off',
|
|
130
139
|
'react/react-in-jsx-scope': 'off',
|
|
131
140
|
|
|
132
|
-
|
|
133
|
-
'react-hooks/rules-of-hooks': 'warn',
|
|
141
|
+
'react-hooks/rules-of-hooks': 'error',
|
|
134
142
|
|
|
135
143
|
// unused
|
|
136
144
|
'unused-imports/no-unused-imports': 'error',
|
|
@@ -169,11 +177,19 @@ export default [
|
|
|
169
177
|
'@typescript-eslint/ban-ts-comment': 'error',
|
|
170
178
|
'@typescript-eslint/no-empty-object-type': 'error',
|
|
171
179
|
'@typescript-eslint/no-unnecessary-type-constraint': 'error',
|
|
172
|
-
'@typescript-eslint/no-non-null-assertion': '
|
|
180
|
+
'@typescript-eslint/no-non-null-assertion': 'error',
|
|
173
181
|
'@typescript-eslint/prefer-as-const': 'error',
|
|
174
182
|
|
|
175
183
|
// ADDITIONAL NON TYPE-AWARE RULES (Valid for v8.39.1)
|
|
176
|
-
|
|
184
|
+
'@typescript-eslint/consistent-type-definitions': ['error', 'interface'],
|
|
185
|
+
'@typescript-eslint/consistent-type-imports': [
|
|
186
|
+
'error',
|
|
187
|
+
{
|
|
188
|
+
prefer: 'type-imports', // enforce `import type`
|
|
189
|
+
disallowTypeAnnotations: false, // allow `import Foo = require(...)` style if needed
|
|
190
|
+
fixStyle: 'separate-type-imports', // auto-fix groups type imports separately
|
|
191
|
+
},
|
|
192
|
+
],
|
|
177
193
|
'@typescript-eslint/explicit-function-return-type': 'off', // Too strict for most projects
|
|
178
194
|
'@typescript-eslint/explicit-member-accessibility': 'off', // Too strict for most projects
|
|
179
195
|
'@typescript-eslint/explicit-module-boundary-types': 'off', // Too strict for most projects
|
|
@@ -214,7 +230,7 @@ export default [
|
|
|
214
230
|
{
|
|
215
231
|
files: ['**/*.stories.{jsx,tsx}'],
|
|
216
232
|
rules: {
|
|
217
|
-
semi: ['
|
|
233
|
+
semi: ['error', 'always'],
|
|
218
234
|
},
|
|
219
235
|
},
|
|
220
236
|
|
|
@@ -256,7 +272,7 @@ export default [
|
|
|
256
272
|
],
|
|
257
273
|
|
|
258
274
|
// optional: keep two blank lines after imports (helps readability)
|
|
259
|
-
'import/newline-after-import': ['
|
|
275
|
+
'import/newline-after-import': ['error', {count: 2}],
|
|
260
276
|
},
|
|
261
277
|
},
|
|
262
278
|
];
|
|
@@ -20,20 +20,22 @@ export interface CardProps {
|
|
|
20
20
|
paddingRight?: PaddingSizeType;
|
|
21
21
|
paddingBottom?: PaddingSizeType;
|
|
22
22
|
paddingLeft?: PaddingSizeType;
|
|
23
|
+
testId?: string;
|
|
23
24
|
}
|
|
24
25
|
export interface CardChildProps {
|
|
25
26
|
className?: string;
|
|
26
27
|
children: React.ReactNode;
|
|
28
|
+
testId?: string;
|
|
27
29
|
}
|
|
28
30
|
export interface ClickableCardProps extends Omit<CardProps, 'onClick' | 'disabled'> {
|
|
29
31
|
onClick?: ((arg1: React.SyntheticEvent<HTMLElement>) => unknown) | null | undefined;
|
|
30
32
|
disabled?: boolean;
|
|
31
33
|
}
|
|
32
|
-
export declare const CardHeader: ({ className, children, ...props }: CardChildProps) => React.JSX.Element;
|
|
33
|
-
export declare const CardTitle: ({ className, children, ...props }: CardChildProps) => React.JSX.Element;
|
|
34
|
-
export declare const CardActions: ({ className, children, ...props }: CardChildProps) => React.JSX.Element;
|
|
35
|
-
export declare const CardFooter: ({ className, children, ...props }: CardChildProps) => React.JSX.Element;
|
|
36
|
-
export declare const CardContent: ({ className, children, ...props }: CardChildProps) => React.JSX.Element;
|
|
34
|
+
export declare const CardHeader: ({ className, children, testId, ...props }: CardChildProps) => React.JSX.Element;
|
|
35
|
+
export declare const CardTitle: ({ className, children, testId, ...props }: CardChildProps) => React.JSX.Element;
|
|
36
|
+
export declare const CardActions: ({ className, children, testId, ...props }: CardChildProps) => React.JSX.Element;
|
|
37
|
+
export declare const CardFooter: ({ className, children, testId, ...props }: CardChildProps) => React.JSX.Element;
|
|
38
|
+
export declare const CardContent: ({ className, children, testId, ...props }: CardChildProps) => React.JSX.Element;
|
|
37
39
|
export declare const Card: Flow.AbstractComponent<CardProps, HTMLDivElement>;
|
|
38
40
|
export declare const ClickableCard: Flow.AbstractComponent<ClickableCardProps, HTMLDivElement>;
|
|
39
41
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../src/components/Card/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../src/components/Card/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAUrD,KAAK,UAAU,GAAG,QAAQ,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC,CAAC;AAEH,eAAO,MAAM,aAAa;;;;;EAKxB,CAAC;AAEH,MAAM,MAAM,eAAe,GACzB,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC;AAErD,MAAM,WAAW,SAAS;IACxB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IACzD,SAAS,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IAC1D,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,YAAY,CAAC,EAAE,eAAe,CAAC;IAC/B,aAAa,CAAC,EAAE,eAAe,CAAC;IAChC,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,cAAc;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,kBACf,SAAQ,IAAI,CAAC,SAAS,EAAE,SAAS,GAAG,UAAU,CAAC;IAC/C,OAAO,CAAC,EACJ,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,KAAK,OAAO,CAAC,GACtD,IAAI,GACJ,SAAS,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAOD,eAAO,MAAM,UAAU,GAAI,2CAKxB,cAAc,sBAQhB,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,2CAKvB,cAAc,sBAQhB,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,2CAKzB,cAAc,sBAQhB,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,2CAKxB,cAAc,sBAQhB,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,2CAKzB,cAAc,sBAQhB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAAI,CAAC,iBAAiB,CAAC,SAAS,EAAE,cAAc,CA8BhE,CAAC;AAEJ,eAAO,MAAM,aAAa,EAAE,IAAI,CAAC,iBAAiB,CAChD,kBAAkB,EAClB,cAAc,CAsDf,CAAC"}
|
|
@@ -7,6 +7,7 @@ exports.PADDING_SIZES = exports.ClickableCard = exports.CardTitle = exports.Card
|
|
|
7
7
|
var React = _interopRequireWildcard(require("react"));
|
|
8
8
|
var SPACES = _interopRequireWildcard(require("../../styles/variables/_space"));
|
|
9
9
|
var _classify = _interopRequireDefault(require("../../utils/classify"));
|
|
10
|
+
var _qa = require("../../utils/qa");
|
|
10
11
|
var _string = require("../../utils/string");
|
|
11
12
|
var _CardModule = _interopRequireDefault(require("./Card.module.css"));
|
|
12
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -26,10 +27,15 @@ const CardHeader = _ref => {
|
|
|
26
27
|
let {
|
|
27
28
|
className,
|
|
28
29
|
children,
|
|
30
|
+
testId,
|
|
29
31
|
...props
|
|
30
32
|
} = _ref;
|
|
31
33
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
32
34
|
...props,
|
|
35
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
36
|
+
base: testId,
|
|
37
|
+
slot: 'header'
|
|
38
|
+
}),
|
|
33
39
|
className: (0, _classify.default)(_CardModule.default.cardHeader, className),
|
|
34
40
|
children: children
|
|
35
41
|
});
|
|
@@ -39,10 +45,15 @@ const CardTitle = _ref2 => {
|
|
|
39
45
|
let {
|
|
40
46
|
className,
|
|
41
47
|
children,
|
|
48
|
+
testId,
|
|
42
49
|
...props
|
|
43
50
|
} = _ref2;
|
|
44
51
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
45
52
|
...props,
|
|
53
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
54
|
+
base: testId,
|
|
55
|
+
slot: 'title'
|
|
56
|
+
}),
|
|
46
57
|
className: (0, _classify.default)(_CardModule.default.cardTitle, className),
|
|
47
58
|
children: children
|
|
48
59
|
});
|
|
@@ -52,10 +63,15 @@ const CardActions = _ref3 => {
|
|
|
52
63
|
let {
|
|
53
64
|
className,
|
|
54
65
|
children,
|
|
66
|
+
testId,
|
|
55
67
|
...props
|
|
56
68
|
} = _ref3;
|
|
57
69
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
58
70
|
...props,
|
|
71
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
72
|
+
base: testId,
|
|
73
|
+
slot: 'actions'
|
|
74
|
+
}),
|
|
59
75
|
className: (0, _classify.default)(_CardModule.default.cardActions, className),
|
|
60
76
|
children: children
|
|
61
77
|
});
|
|
@@ -65,10 +81,15 @@ const CardFooter = _ref4 => {
|
|
|
65
81
|
let {
|
|
66
82
|
className,
|
|
67
83
|
children,
|
|
84
|
+
testId,
|
|
68
85
|
...props
|
|
69
86
|
} = _ref4;
|
|
70
87
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
71
88
|
...props,
|
|
89
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
90
|
+
base: testId,
|
|
91
|
+
slot: 'footer'
|
|
92
|
+
}),
|
|
72
93
|
className: (0, _classify.default)(_CardModule.default.cardFooter, className),
|
|
73
94
|
children: children
|
|
74
95
|
});
|
|
@@ -78,10 +99,15 @@ const CardContent = _ref5 => {
|
|
|
78
99
|
let {
|
|
79
100
|
className,
|
|
80
101
|
children,
|
|
102
|
+
testId,
|
|
81
103
|
...props
|
|
82
104
|
} = _ref5;
|
|
83
105
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
84
106
|
...props,
|
|
107
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
108
|
+
base: testId,
|
|
109
|
+
slot: 'content'
|
|
110
|
+
}),
|
|
85
111
|
className: (0, _classify.default)(_CardModule.default.cardContent, className),
|
|
86
112
|
children: children
|
|
87
113
|
});
|
|
@@ -95,6 +121,7 @@ const Card = exports.Card = /*#__PURE__*/React.forwardRef((_ref6, ref) => {
|
|
|
95
121
|
paddingRight = 'medium',
|
|
96
122
|
paddingBottom = 'medium',
|
|
97
123
|
paddingLeft = 'medium',
|
|
124
|
+
testId,
|
|
98
125
|
...props
|
|
99
126
|
} = _ref6;
|
|
100
127
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
@@ -105,7 +132,10 @@ const Card = exports.Card = /*#__PURE__*/React.forwardRef((_ref6, ref) => {
|
|
|
105
132
|
'--card-padding-bottom': getPaddingValue(paddingBottom),
|
|
106
133
|
'--card-padding-left': getPaddingValue(paddingLeft)
|
|
107
134
|
},
|
|
108
|
-
"data-testid":
|
|
135
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
136
|
+
base: testId,
|
|
137
|
+
slot: 'card'
|
|
138
|
+
}),
|
|
109
139
|
className: (0, _classify.default)(_CardModule.default.cardWrapper, classNames?.wrapper),
|
|
110
140
|
ref: ref,
|
|
111
141
|
children: children
|
|
@@ -116,6 +146,7 @@ const ClickableCard = exports.ClickableCard = /*#__PURE__*/React.forwardRef((_re
|
|
|
116
146
|
classNames,
|
|
117
147
|
onClick,
|
|
118
148
|
disabled = false,
|
|
149
|
+
testId,
|
|
119
150
|
...props
|
|
120
151
|
} = _ref7;
|
|
121
152
|
const componentRef = React.useRef(null);
|
|
@@ -145,6 +176,7 @@ const ClickableCard = exports.ClickableCard = /*#__PURE__*/React.forwardRef((_re
|
|
|
145
176
|
tabIndex: disabled ? -1 : 0,
|
|
146
177
|
onClick: onClickHandler,
|
|
147
178
|
onKeyDown: onKeyDownHandler,
|
|
179
|
+
testId: testId,
|
|
148
180
|
ref: ref
|
|
149
181
|
});
|
|
150
182
|
});
|
|
@@ -5,6 +5,7 @@ export interface CircularLoaderProps {
|
|
|
5
5
|
className?: string;
|
|
6
6
|
ariaLabel?: string;
|
|
7
7
|
colorToken?: keyof typeof COLORS;
|
|
8
|
+
testId?: string;
|
|
8
9
|
}
|
|
9
10
|
export declare const CircularLoader: Flow.AbstractComponent<CircularLoaderProps, HTMLDivElement>;
|
|
10
11
|
//# sourceMappingURL=CircularLoader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CircularLoader.d.ts","sourceRoot":"","sources":["../../../src/components/CircularLoader/CircularLoader.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAErD,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"CircularLoader.d.ts","sourceRoot":"","sources":["../../../src/components/CircularLoader/CircularLoader.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAErD,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AAOtD,MAAM,WAAW,mBAAmB;IAClC,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,OAAO,MAAM,CAAC;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,cAAc,EAAE,IAAI,CAAC,iBAAiB,CACjD,mBAAmB,EACnB,cAAc,CAuCf,CAAC"}
|
|
@@ -7,6 +7,7 @@ exports.CircularLoader = void 0;
|
|
|
7
7
|
var React = _interopRequireWildcard(require("react"));
|
|
8
8
|
var COLORS = _interopRequireWildcard(require("../../styles/variables/_color"));
|
|
9
9
|
var _classify = _interopRequireDefault(require("../../utils/classify"));
|
|
10
|
+
var _qa = require("../../utils/qa");
|
|
10
11
|
var _CircularLoaderModule = _interopRequireDefault(require("./CircularLoader.module.css"));
|
|
11
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
13
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -16,9 +17,14 @@ const CircularLoader = exports.CircularLoader = /*#__PURE__*/React.forwardRef((_
|
|
|
16
17
|
size = 'medium',
|
|
17
18
|
className,
|
|
18
19
|
colorToken = 'colorTextClickable',
|
|
19
|
-
ariaLabel = 'Loading'
|
|
20
|
+
ariaLabel = 'Loading',
|
|
21
|
+
testId
|
|
20
22
|
} = _ref;
|
|
21
23
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
24
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
25
|
+
base: testId,
|
|
26
|
+
slot: 'loader'
|
|
27
|
+
}),
|
|
22
28
|
className: (0, _classify.default)(_CircularLoaderModule.default.container, {
|
|
23
29
|
[_CircularLoaderModule.default.mediumContainer]: size === 'medium',
|
|
24
30
|
[_CircularLoaderModule.default.smallContainer]: size === 'small'
|