@spaced-out/ui-design-system 0.3.40-beta.0 → 0.3.41

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.
Files changed (33) hide show
  1. package/.all-contributorsrc +121 -5
  2. package/.cspell/custom-words.txt +3 -0
  3. package/.github/workflows/publish_to_npm.yml +1 -1
  4. package/.github/workflows/pull_request_checks.yml +29 -6
  5. package/.github/workflows/pull_request_semantics_checker.yml +16 -5
  6. package/CHANGELOG.md +30 -0
  7. package/README.md +41 -10
  8. package/cspell.json +1 -1
  9. package/dts-generator/convert.js +7 -1
  10. package/lib/components/Avatar/Avatar.d.ts +0 -1
  11. package/lib/components/Avatar/Avatar.js.flow +0 -1
  12. package/lib/components/Chip/Chip.d.ts +20 -3
  13. package/lib/components/Chip/Chip.js +12 -3
  14. package/lib/components/Chip/Chip.js.flow +16 -3
  15. package/lib/components/Chip/Chip.module.css +9 -9
  16. package/lib/components/Icon/ClickableIcon.d.ts +1 -1
  17. package/lib/components/Icon/ClickableIcon.js +1 -1
  18. package/lib/components/Icon/ClickableIcon.js.flow +1 -1
  19. package/lib/components/StatusIndicator/StatusIndicator.module.css +3 -0
  20. package/lib/components/Table/DefaultRow.d.ts +1 -0
  21. package/lib/components/Table/DefaultRow.js +1 -0
  22. package/lib/components/Table/DefaultRow.js.flow +1 -0
  23. package/lib/components/Table/DefaultTableHeader.d.ts +1 -0
  24. package/lib/components/Table/DefaultTableHeader.js.flow +1 -0
  25. package/lib/components/Table/StaticTable.d.ts +10 -3
  26. package/lib/components/Table/StaticTable.js +5 -3
  27. package/lib/components/Table/StaticTable.js.flow +10 -4
  28. package/lib/components/Table/Table.d.ts +1 -0
  29. package/lib/components/Table/Table.docs.d.ts +12 -0
  30. package/lib/components/Table/Table.docs.js +11 -0
  31. package/lib/components/Table/Table.docs.js.flow +10 -0
  32. package/lib/components/Table/Table.js.flow +1 -0
  33. package/package.json +1 -1
@@ -4,8 +4,7 @@
4
4
  "repoType": "github",
5
5
  "repoHost": "https://github.com",
6
6
  "files": [
7
- "README.md",
8
- "src/stories/INTRODUCTION.stories.mdx"
7
+ "README.md"
9
8
  ],
10
9
  "imageSize": 100,
11
10
  "commit": false,
@@ -18,7 +17,7 @@
18
17
  "profile": "https://github.com/superrover",
19
18
  "contributions": [
20
19
  "code",
21
- "doc"
20
+ "infra"
22
21
  ]
23
22
  },
24
23
  {
@@ -38,7 +37,124 @@
38
37
  "contributions": [
39
38
  "code"
40
39
  ]
40
+ },
41
+ {
42
+ "login": "VivekJangid",
43
+ "name": "Vivek Jangid",
44
+ "avatar_url": "https://avatars.githubusercontent.com/u/33223696?v=4",
45
+ "profile": "https://github.com/VivekJangid",
46
+ "contributions": [
47
+ "code"
48
+ ]
49
+ },
50
+ {
51
+ "login": "sharad-kushwah",
52
+ "name": "Sharad Kushwah",
53
+ "avatar_url": "https://avatars.githubusercontent.com/u/161806585?v=4",
54
+ "profile": "https://github.com/sharad-kushwah",
55
+ "contributions": [
56
+ "code"
57
+ ]
58
+ },
59
+ {
60
+ "login": "sanskar-s",
61
+ "name": "Sanskar Saxena",
62
+ "avatar_url": "https://avatars.githubusercontent.com/u/137482980?v=4",
63
+ "profile": "https://github.com/sanskar-s",
64
+ "contributions": [
65
+ "code"
66
+ ]
67
+ },
68
+ {
69
+ "login": "aditya-kaushal",
70
+ "name": "aditya-kaushal",
71
+ "avatar_url": "https://avatars.githubusercontent.com/u/141118827?v=4",
72
+ "profile": "https://github.com/aditya-kaushal",
73
+ "contributions": [
74
+ "code"
75
+ ]
76
+ },
77
+ {
78
+ "login": "bhatiarush27",
79
+ "name": "Arush Bhatia",
80
+ "avatar_url": "https://avatars.githubusercontent.com/u/161808754?v=4",
81
+ "profile": "https://github.com/bhatiarush27",
82
+ "contributions": [
83
+ "code"
84
+ ]
85
+ },
86
+ {
87
+ "login": "LakshayKumar-1",
88
+ "name": "LakshayKumar-1",
89
+ "avatar_url": "https://avatars.githubusercontent.com/u/183346574?v=4",
90
+ "profile": "https://github.com/LakshayKumar-1",
91
+ "contributions": [
92
+ "code"
93
+ ]
94
+ },
95
+ {
96
+ "login": "Swatantramishra1",
97
+ "name": "Swatantra Mishra",
98
+ "avatar_url": "https://avatars.githubusercontent.com/u/5427027?v=4",
99
+ "profile": "https://github.com/Swatantramishra1",
100
+ "contributions": [
101
+ "code"
102
+ ]
103
+ },
104
+ {
105
+ "login": "VishalBarnawal",
106
+ "name": "Vishal-sense",
107
+ "avatar_url": "https://avatars.githubusercontent.com/u/113020105?v=4",
108
+ "profile": "https://github.com/VishalBarnawal",
109
+ "contributions": [
110
+ "code"
111
+ ]
112
+ },
113
+ {
114
+ "login": "vish-sah",
115
+ "name": "Vishwanath Sah",
116
+ "avatar_url": "https://avatars.githubusercontent.com/u/108925162?v=4",
117
+ "profile": "https://github.com/vish-sah",
118
+ "contributions": [
119
+ "code"
120
+ ]
121
+ },
122
+ {
123
+ "login": "pearel-sense",
124
+ "name": "Pearel Nazareth",
125
+ "avatar_url": "https://avatars.githubusercontent.com/u/113005498?v=4",
126
+ "profile": "https://github.com/pearel-sense",
127
+ "contributions": [
128
+ "code"
129
+ ]
130
+ },
131
+ {
132
+ "login": "deepak-rao-96",
133
+ "name": "deepak-rao-96",
134
+ "avatar_url": "https://avatars.githubusercontent.com/u/185754227?v=4",
135
+ "profile": "https://github.com/deepak-rao-96",
136
+ "contributions": [
137
+ "code"
138
+ ]
139
+ },
140
+ {
141
+ "login": "darsh-mecwan-sense",
142
+ "name": "Darsh Mecwan",
143
+ "avatar_url": "https://avatars.githubusercontent.com/u/186684223?v=4",
144
+ "profile": "https://github.com/darsh-mecwan-sense",
145
+ "contributions": [
146
+ "code"
147
+ ]
148
+ },
149
+ {
150
+ "login": "diwakersurya",
151
+ "name": "Diwaker Singh",
152
+ "avatar_url": "https://avatars.githubusercontent.com/u/7386665?v=4",
153
+ "profile": "https://github.com/diwakersurya",
154
+ "contributions": [
155
+ "code"
156
+ ]
41
157
  }
42
158
  ],
43
- "contributorsPerLine": 7
44
- }
159
+ "contributorsPerLine": 5
160
+ }
@@ -30,6 +30,7 @@ datetime
30
30
  DEFAULTTEXT
31
31
  Dili
32
32
  dismissable
33
+ diwakersurya
33
34
  Docgen
34
35
  drilldown
35
36
  Drilldown
@@ -123,10 +124,12 @@ useRowspanHeaders
123
124
  valuenow
124
125
  Velho
125
126
  Verda
127
+ viewports
126
128
  vish
127
129
  VishalBarnawal
128
130
  Vivek
129
131
  voiceflow
132
+ WCAG
130
133
  xmark
131
134
  yourcomponentname
132
135
  Yuzhno
@@ -22,7 +22,7 @@ jobs:
22
22
  - name: Check Permissions
23
23
  id: check-permissions
24
24
  env:
25
- ALLOWED_USERS: superrover, Anant-Raj, ashwini-sensehq, vish-sah, VishalBarnawal, sanskar-s, VivekJangid, sharad-kushwah, Swatantramishra1, bhatiarush27, darsh-mecwan-sense
25
+ ALLOWED_USERS: superrover, Anant-Raj, diwakersurya, ashwini-sensehq, vish-sah, VishalBarnawal, sanskar-s, VivekJangid, sharad-kushwah, Swatantramishra1, bhatiarush27, darsh-mecwan-sense
26
26
  if: ${{ !contains(env.ALLOWED_USERS, github.actor) }}
27
27
  run: |
28
28
  echo "You don't have correct permissions to do this release"
@@ -1,7 +1,7 @@
1
1
  # Author: Nishant Gaurav
2
2
  # Note: Do not change
3
3
 
4
- name: Run Yarn Flow, Lint, and Spell Check
4
+ name: Run Yarn Flow, Lint, Spell Check and Build
5
5
 
6
6
  on:
7
7
  pull_request:
@@ -20,16 +20,26 @@ jobs:
20
20
  - name: Checkout code
21
21
  uses: actions/checkout@v3
22
22
 
23
- # Set up Node.js environment
24
- - name: Setup Node.js
25
- uses: actions/setup-node@v2
23
+ # Note(Nishant): Possible cleanup required Setup Node 18 for the base npm package
24
+ - name: Setup Node.js @18
25
+ uses: actions/setup-node@v4
26
26
  with:
27
27
  registry-url: https://registry.npmjs.org/
28
- node-version: '18'
28
+ node-version: '18.20.5'
29
+
30
+ # Note(Nishant): Possible cleanup required Setup Node 20 for the dts-generator
31
+ # We already pin the node versions with volta so this should be fine(but not ideal)
32
+ - name: Setup Node.js @20
33
+ uses: actions/setup-node@v4
34
+ with:
35
+ registry-url: https://registry.npmjs.org/
36
+ node-version: '20.9.0'
29
37
 
30
38
  # Install project dependencies
31
39
  - name: Install dependencies
32
- run: yarn install
40
+ run: |
41
+ yarn install
42
+ yarn --cwd dts-generator install
33
43
 
34
44
  # Run Yarn Flow static type checking
35
45
  - name: Run Yarn Flow
@@ -42,3 +52,16 @@ jobs:
42
52
  # Run ESLint code linting
43
53
  - name: Run Yarn Lint
44
54
  run: yarn lint:strict
55
+
56
+ # Run build step
57
+ # - name: Run Yarn Build
58
+ # run: yarn build
59
+
60
+ # Validate if declaration files are generated
61
+ # - name: Validate .d.ts generation
62
+ # run: |
63
+ # count=$(find lib -name "*.d.ts" | wc -l)
64
+ # if [ "$count" -eq 0 ]; then
65
+ # echo "No .d.ts files were generated!"
66
+ # exit 1
67
+ # fi
@@ -1,5 +1,5 @@
1
1
  # Author: Nishant Gaurav
2
- # workflow to check for PR names wrt conventional commits, uses a third party action
2
+ # workflow to check for PR names wrt conventional commits
3
3
 
4
4
  name: 'Lint PR'
5
5
 
@@ -11,10 +11,21 @@ on:
11
11
  - synchronize
12
12
 
13
13
  jobs:
14
- main:
15
- name: Validate PR title
14
+ validate-pr-title:
16
15
  runs-on: ubuntu-latest
17
16
  steps:
18
- - uses: amannn/action-semantic-pull-request@v5
17
+ - name: Check PR title format
19
18
  env:
20
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19
+ PR_TITLE: ${{ github.event.pull_request.title }}
20
+ run: |
21
+ echo "PR Title: \"$PR_TITLE\""
22
+
23
+ # Define allowed prefixes
24
+ if echo "$PR_TITLE" | grep -Eq '^(feat|fix|docs|chore|style|refactor|perf|test|build|ci)(\([a-zA-Z0-9\-]+\))?: .+'
25
+ then
26
+ echo "✅ PR title follows conventional commit format."
27
+ else
28
+ echo "❌ PR title does not follow conventional commit format."
29
+ echo "Title must start with one of: feat:, fix:, docs:, chore:, style:, refactor:, perf:, test:, build:, ci:"
30
+ exit 1
31
+ fi
package/CHANGELOG.md CHANGED
@@ -2,6 +2,36 @@
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.3.41](https://github.com/spaced-out/ui-design-system/compare/v0.3.40...v0.3.41) (2025-05-19)
6
+
7
+
8
+ ### Features
9
+
10
+ * **table:** added disabledKeys functionality in table component ([#345](https://github.com/spaced-out/ui-design-system/issues/345)) ([06b2bc3](https://github.com/spaced-out/ui-design-system/commit/06b2bc35047e50f988f552ca58d07262afdb1d10))
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * formatting fixes ([a091cce](https://github.com/spaced-out/ui-design-system/commit/a091cced24908ae2d0c42a1f6b4742b238046633))
16
+
17
+ ### [0.3.40](https://github.com/spaced-out/ui-design-system/compare/v0.3.40-beta.0...v0.3.40) (2025-05-16)
18
+
19
+
20
+ ### Features
21
+
22
+ * multiline support in chips ([919bd29](https://github.com/spaced-out/ui-design-system/commit/919bd29671436a19e279c03b656faf1234ed8eae))
23
+ * pr title check with conventional commits pre merge workflow now checks for build step ([59a941f](https://github.com/spaced-out/ui-design-system/commit/59a941f8f28337c9f9886e1e559a79fe47df94bb))
24
+
25
+
26
+ ### Bug Fixes
27
+
28
+ * added intro and updated contributors ([35e0584](https://github.com/spaced-out/ui-design-system/commit/35e058457b737a647a77bc6862aa99d4e271c501))
29
+ * fixes allcontributors ([01570de](https://github.com/spaced-out/ui-design-system/commit/01570de0b64ae1ffe79f800e6902e109839f9448))
30
+ * fixes intro ([a4430fb](https://github.com/spaced-out/ui-design-system/commit/a4430fb76ddd149a417e2762c65d43c872086741))
31
+ * installs dts generator before running the declaration files script ([e02361e](https://github.com/spaced-out/ui-design-system/commit/e02361e4bff04ed160078a79c19c59db988b8382))
32
+ * removed the build step in checks ([e1c951d](https://github.com/spaced-out/ui-design-system/commit/e1c951d745570757d9cf4d2c9f110a70dbb4e0e8))
33
+ * **typeahead:** mock api call function in typeahead stories ([#346](https://github.com/spaced-out/ui-design-system/issues/346)) ([7ac92b5](https://github.com/spaced-out/ui-design-system/commit/7ac92b55986c71778e269977e8017aa24c5b35a0))
34
+
5
35
  ### [0.3.40-beta.0](https://github.com/spaced-out/ui-design-system/compare/v0.3.39...v0.3.40-beta.0) (2025-05-14)
6
36
 
7
37
 
package/README.md CHANGED
@@ -23,12 +23,17 @@
23
23
 
24
24
  ## Intro
25
25
 
26
- Genesis design system consists of a set of tools and protocols that unify design and development across surfaces (platforms) to deliver consistent
27
- user experiences. The system utilizes workflow automation to streamline the design and development process. It's comprised of a number of React
28
- web components that each play a unique role within the product development cycle.
29
-
30
- The integration of these components are intended to grow and scale overtime to increasingly decrease workflow friction and optimize the product
31
- development lifecycle.
26
+ Genesis is the foundational design system at Sense. It serves as the
27
+ single source of truth for our product UI crafted to ensure visual
28
+ consistency, engineering efficiency, and design cohesion across the
29
+ entire platform.
30
+
31
+ Genesis is a systematic collection of reusable UI components, design
32
+ tokens, utilities, and principles. It’s purpose-built to ensure every
33
+ part of the Sense product ecosystem speaks the same design and
34
+ interaction language. Whether you're building candidate workflows,
35
+ recruiter dashboards, or internal analytics tools, Genesis provides the
36
+ building blocks to do so with speed and reliability.
32
37
 
33
38
  ## Usage
34
39
 
@@ -255,15 +260,39 @@ Check out our [**Changelog here**](https://spaced-out.github.io/ui-design-system
255
260
 
256
261
  ## Contributors
257
262
 
263
+ <div style="overflow-x: auto">
264
+
258
265
  <!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
259
266
  <!-- prettier-ignore-start -->
260
267
  <!-- markdownlint-disable -->
261
- <table>
268
+ <table style="
269
+ width: -webkit-fill-available;
270
+ min-width: 800px;
271
+ ">
262
272
  <tbody>
263
273
  <tr>
264
- <td align="center" valign="top" width="14.28%"><a href="https://github.com/superrover"><img src="https://avatars.githubusercontent.com/u/86281150?v=4?s=100" width="100px;" alt="Nishant Gaurav"/><br /><sub><b>Nishant Gaurav</b></sub></a><br /><a href="https://github.com/Spaced-Out/ui-design-system/commits?author=superrover" title="Code">💻</a> <a href="https://github.com/Spaced-Out/ui-design-system/commits?author=superrover" title="Documentation">📖</a></td>
265
- <td align="center" valign="top" width="14.28%"><a href="https://github.com/Anant-Raj"><img src="https://avatars.githubusercontent.com/u/8904071?v=4?s=100" width="100px;" alt="Anant Raj"/><br /><sub><b>Anant Raj</b></sub></a><br /><a href="https://github.com/Spaced-Out/ui-design-system/commits?author=Anant-Raj" title="Code">💻</a></td>
266
- <td align="center" valign="top" width="14.28%"><a href="https://github.com/ashwinikemshetty"><img src="https://avatars.githubusercontent.com/u/12839599?v=4?s=100" width="100px;" alt="Ashwini Kemshetty"/><br /><sub><b>Ashwini Kemshetty</b></sub></a><br /><a href="https://github.com/Spaced-Out/ui-design-system/commits?author=ashwinikemshetty" title="Code">💻</a></td>
274
+ <td align="center" valign="top" width="20%"><a href="https://github.com/superrover"><img src="https://avatars.githubusercontent.com/u/86281150?v=4?s=100" width="100px;" alt="Nishant Gaurav"/><br /><sub><b>Nishant Gaurav</b></sub></a><br /><a href="https://github.com/Spaced-Out/ui-design-system/commits?author=superrover" title="Code">💻</a> <a href="#infra-superrover" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
275
+ <td align="center" valign="top" width="20%"><a href="https://github.com/Anant-Raj"><img src="https://avatars.githubusercontent.com/u/8904071?v=4?s=100" width="100px;" alt="Anant Raj"/><br /><sub><b>Anant Raj</b></sub></a><br /><a href="https://github.com/Spaced-Out/ui-design-system/commits?author=Anant-Raj" title="Code">💻</a></td>
276
+ <td align="center" valign="top" width="20%"><a href="https://github.com/ashwinikemshetty"><img src="https://avatars.githubusercontent.com/u/12839599?v=4?s=100" width="100px;" alt="Ashwini Kemshetty"/><br /><sub><b>Ashwini Kemshetty</b></sub></a><br /><a href="https://github.com/Spaced-Out/ui-design-system/commits?author=ashwinikemshetty" title="Code">💻</a></td>
277
+ <td align="center" valign="top" width="20%"><a href="https://github.com/VivekJangid"><img src="https://avatars.githubusercontent.com/u/33223696?v=4?s=100" width="100px;" alt="Vivek Jangid"/><br /><sub><b>Vivek Jangid</b></sub></a><br /><a href="https://github.com/Spaced-Out/ui-design-system/commits?author=VivekJangid" title="Code">💻</a></td>
278
+ <td align="center" valign="top" width="20%"><a href="https://github.com/sharad-kushwah"><img src="https://avatars.githubusercontent.com/u/161806585?v=4?s=100" width="100px;" alt="Sharad Kushwah"/><br /><sub><b>Sharad Kushwah</b></sub></a><br /><a href="https://github.com/Spaced-Out/ui-design-system/commits?author=sharad-kushwah" title="Code">💻</a></td>
279
+ </tr>
280
+ <tr>
281
+ <td align="center" valign="top" width="20%"><a href="https://github.com/sanskar-s"><img src="https://avatars.githubusercontent.com/u/137482980?v=4?s=100" width="100px;" alt="Sanskar Saxena"/><br /><sub><b>Sanskar Saxena</b></sub></a><br /><a href="https://github.com/Spaced-Out/ui-design-system/commits?author=sanskar-s" title="Code">💻</a></td>
282
+ <td align="center" valign="top" width="20%"><a href="https://github.com/aditya-kaushal"><img src="https://avatars.githubusercontent.com/u/141118827?v=4?s=100" width="100px;" alt="aditya-kaushal"/><br /><sub><b>aditya-kaushal</b></sub></a><br /><a href="https://github.com/Spaced-Out/ui-design-system/commits?author=aditya-kaushal" title="Code">💻</a></td>
283
+ <td align="center" valign="top" width="20%"><a href="https://github.com/bhatiarush27"><img src="https://avatars.githubusercontent.com/u/161808754?v=4?s=100" width="100px;" alt="Arush Bhatia"/><br /><sub><b>Arush Bhatia</b></sub></a><br /><a href="https://github.com/Spaced-Out/ui-design-system/commits?author=bhatiarush27" title="Code">💻</a></td>
284
+ <td align="center" valign="top" width="20%"><a href="https://github.com/LakshayKumar-1"><img src="https://avatars.githubusercontent.com/u/183346574?v=4?s=100" width="100px;" alt="LakshayKumar-1"/><br /><sub><b>LakshayKumar-1</b></sub></a><br /><a href="https://github.com/Spaced-Out/ui-design-system/commits?author=LakshayKumar-1" title="Code">💻</a></td>
285
+ <td align="center" valign="top" width="20%"><a href="https://github.com/Swatantramishra1"><img src="https://avatars.githubusercontent.com/u/5427027?v=4?s=100" width="100px;" alt="Swatantra Mishra"/><br /><sub><b>Swatantra Mishra</b></sub></a><br /><a href="https://github.com/Spaced-Out/ui-design-system/commits?author=Swatantramishra1" title="Code">💻</a></td>
286
+ </tr>
287
+ <tr>
288
+ <td align="center" valign="top" width="20%"><a href="https://github.com/VishalBarnawal"><img src="https://avatars.githubusercontent.com/u/113020105?v=4?s=100" width="100px;" alt="Vishal-sense"/><br /><sub><b>Vishal-sense</b></sub></a><br /><a href="https://github.com/Spaced-Out/ui-design-system/commits?author=VishalBarnawal" title="Code">💻</a></td>
289
+ <td align="center" valign="top" width="20%"><a href="https://github.com/vish-sah"><img src="https://avatars.githubusercontent.com/u/108925162?v=4?s=100" width="100px;" alt="Vishwanath Sah"/><br /><sub><b>Vishwanath Sah</b></sub></a><br /><a href="https://github.com/Spaced-Out/ui-design-system/commits?author=vish-sah" title="Code">💻</a></td>
290
+ <td align="center" valign="top" width="20%"><a href="https://github.com/pearel-sense"><img src="https://avatars.githubusercontent.com/u/113005498?v=4?s=100" width="100px;" alt="Pearel Nazareth"/><br /><sub><b>Pearel Nazareth</b></sub></a><br /><a href="https://github.com/Spaced-Out/ui-design-system/commits?author=pearel-sense" title="Code">💻</a></td>
291
+ <td align="center" valign="top" width="20%"><a href="https://github.com/deepak-rao-96"><img src="https://avatars.githubusercontent.com/u/185754227?v=4?s=100" width="100px;" alt="deepak-rao-96"/><br /><sub><b>deepak-rao-96</b></sub></a><br /><a href="https://github.com/Spaced-Out/ui-design-system/commits?author=deepak-rao-96" title="Code">💻</a></td>
292
+ <td align="center" valign="top" width="20%"><a href="https://github.com/darsh-mecwan-sense"><img src="https://avatars.githubusercontent.com/u/186684223?v=4?s=100" width="100px;" alt="Darsh Mecwan"/><br /><sub><b>Darsh Mecwan</b></sub></a><br /><a href="https://github.com/Spaced-Out/ui-design-system/commits?author=darsh-mecwan-sense" title="Code">💻</a></td>
293
+ </tr>
294
+ <tr>
295
+ <td align="center" valign="top" width="20%"><a href="https://github.com/diwakersurya"><img src="https://avatars.githubusercontent.com/u/7386665?v=4?s=100" width="100px;" alt="Diwaker Singh"/><br /><sub><b>Diwaker Singh</b></sub></a><br /><a href="https://github.com/Spaced-Out/ui-design-system/commits?author=diwakersurya" title="Code">💻</a></td>
267
296
  </tr>
268
297
  </tbody>
269
298
  </table>
@@ -272,3 +301,5 @@ Check out our [**Changelog here**](https://spaced-out.github.io/ui-design-system
272
301
  <!-- prettier-ignore-end -->
273
302
 
274
303
  <!-- ALL-CONTRIBUTORS-LIST:END -->
304
+
305
+ </div>
package/cspell.json CHANGED
@@ -10,7 +10,7 @@
10
10
  ".storybook/public",
11
11
  ".all-contributorsrc",
12
12
  "README.md",
13
- "src/stories/INTRODUCTION.stories.mdx",
13
+ "src/stories/INTRODUCTION.mdx",
14
14
  ".github/CODEOWNERS",
15
15
  ".github/workflows/pull_request_semantics_checker.yml"
16
16
  ],
@@ -47,6 +47,9 @@ const {spawnSync} = require('child_process');
47
47
 
48
48
  const files = glob.sync(path.resolve(__dirname, '../lib/**/*.js.flow'));
49
49
 
50
+ // eslint-disable-next-line no-console
51
+ console.log('🔄 Converting .js.flow files to TypeScript declaration files...');
52
+
50
53
  files.forEach((file) => {
51
54
  const outPath = file.replace(/\.js\.flow$/, '.d.ts');
52
55
  const flowToTs = path.resolve(__dirname, './node_modules/.bin/flow-to-ts');
@@ -95,7 +98,10 @@ files.forEach((file) => {
95
98
  }
96
99
  } else {
97
100
  console.warn(
98
- `No meaningful output for ${file}. It may be empty or skipped.`,
101
+ `⚠️ No meaningful output for ${file}. It may be empty or skipped.`,
99
102
  );
100
103
  }
101
104
  });
105
+
106
+ // eslint-disable-next-line no-console
107
+ console.log(`✅ Flow to d.ts Job Finished`);
@@ -57,7 +57,6 @@ export type AvatarProps = {
57
57
  style?: unknown;
58
58
  iconName?: string;
59
59
  iconType?: IconType;
60
- ring?: boolean;
61
60
  status?: StatusSemanticType;
62
61
  statusBorderColorToken?: $Keys<typeof COLORS>;
63
62
  };
@@ -66,7 +66,6 @@ export type AvatarProps = {
66
66
  style?: mixed,
67
67
  iconName?: string,
68
68
  iconType?: IconType,
69
- ring?: boolean,
70
69
  status?: StatusSemanticType,
71
70
  statusBorderColorToken?: $Keys<typeof COLORS>,
72
71
  };
@@ -27,6 +27,8 @@ export type BaseChipProps = {
27
27
  disabled?: boolean;
28
28
  showStatusIndicator?: boolean;
29
29
  disableHoverState?: boolean;
30
+ line?: number;
31
+ wordBreak?: string;
30
32
  onClick?:
31
33
  | ((arg0: React.SyntheticEvent<HTMLElement>) => unknown)
32
34
  | null
@@ -72,6 +74,8 @@ export const Chip: React$AbstractComponent<ChipProps, HTMLDivElement> =
72
74
  onDismiss = () => null,
73
75
  onClick,
74
76
  disabled,
77
+ line = 1,
78
+ wordBreak,
75
79
  disableHoverState = !onClick,
76
80
  // There is no reason for hover state to be active when there is no click handler attached
77
81
  ...restProps
@@ -148,19 +152,32 @@ export const Chip: React$AbstractComponent<ChipProps, HTMLDivElement> =
148
152
 
149
153
  {iconName && size !== 'small' && (
150
154
  <Icon
151
- className={classify(css.chipIcon, classNames?.icon)}
155
+ className={classify(
156
+ css.chipIcon,
157
+ {
158
+ [css.alignTop]: line > 1,
159
+ },
160
+ classNames?.icon,
161
+ )}
152
162
  name={iconName}
153
163
  type={iconType}
154
164
  size="small"
155
165
  />
156
166
  )}
157
- <Truncate>{children}</Truncate>
167
+ <Truncate line={line} wordBreak={wordBreak}>
168
+ {children}
169
+ </Truncate>
158
170
 
159
171
  {dismissable && size !== 'small' && (
160
172
  <CloseIcon
161
173
  classNames={{
162
174
  icon: css.dismissIcon,
163
- button: css.dismissIconWrapper,
175
+ button: classify(
176
+ {
177
+ [css.alignTop]: line > 1,
178
+ },
179
+ css.dismissIconWrapper,
180
+ ),
164
181
  }}
165
182
  type={iconType}
166
183
  size="small"
@@ -36,6 +36,8 @@ const Chip = /*#__PURE__*/React.forwardRef((_ref, ref) => {
36
36
  onDismiss = () => null,
37
37
  onClick,
38
38
  disabled,
39
+ line = 1,
40
+ wordBreak,
39
41
  disableHoverState = !onClick,
40
42
  // There is no reason for hover state to be active when there is no click handler attached
41
43
  ...restProps
@@ -95,14 +97,21 @@ const Chip = /*#__PURE__*/React.forwardRef((_ref, ref) => {
95
97
  },
96
98
  disabled: disabled
97
99
  }), iconName && size !== 'small' && /*#__PURE__*/React.createElement(_Icon.Icon, {
98
- className: (0, _classify.classify)(_ChipModule.default.chipIcon, classNames?.icon),
100
+ className: (0, _classify.classify)(_ChipModule.default.chipIcon, {
101
+ [_ChipModule.default.alignTop]: line > 1
102
+ }, classNames?.icon),
99
103
  name: iconName,
100
104
  type: iconType,
101
105
  size: "small"
102
- }), /*#__PURE__*/React.createElement(_Truncate.Truncate, null, children), dismissable && size !== 'small' && /*#__PURE__*/React.createElement(_Icon.CloseIcon, {
106
+ }), /*#__PURE__*/React.createElement(_Truncate.Truncate, {
107
+ line: line,
108
+ wordBreak: wordBreak
109
+ }, children), dismissable && size !== 'small' && /*#__PURE__*/React.createElement(_Icon.CloseIcon, {
103
110
  classNames: {
104
111
  icon: _ChipModule.default.dismissIcon,
105
- button: _ChipModule.default.dismissIconWrapper
112
+ button: (0, _classify.classify)({
113
+ [_ChipModule.default.alignTop]: line > 1
114
+ }, _ChipModule.default.dismissIconWrapper)
106
115
  },
107
116
  type: iconType,
108
117
  size: "small",
@@ -35,6 +35,8 @@ export type BaseChipProps = {
35
35
  disabled?: boolean,
36
36
  showStatusIndicator?: boolean,
37
37
  disableHoverState?: boolean,
38
+ line?: number,
39
+ wordBreak?: string,
38
40
  onClick?: ?(SyntheticEvent<HTMLElement>) => mixed,
39
41
  onMouseEnter?: ?(SyntheticEvent<HTMLElement>) => mixed,
40
42
  onMouseLeave?: ?(SyntheticEvent<HTMLElement>) => mixed,
@@ -76,6 +78,8 @@ export const Chip: React$AbstractComponent<ChipProps, HTMLDivElement> =
76
78
  onDismiss = () => null,
77
79
  onClick,
78
80
  disabled,
81
+ line = 1,
82
+ wordBreak,
79
83
  disableHoverState = !onClick, // There is no reason for hover state to be active when there is no click handler attached
80
84
  ...restProps
81
85
  }: ChipProps,
@@ -149,19 +153,28 @@ export const Chip: React$AbstractComponent<ChipProps, HTMLDivElement> =
149
153
 
150
154
  {iconName && size !== 'small' && (
151
155
  <Icon
152
- className={classify(css.chipIcon, classNames?.icon)}
156
+ className={classify(
157
+ css.chipIcon,
158
+ {[css.alignTop]: line > 1},
159
+ classNames?.icon,
160
+ )}
153
161
  name={iconName}
154
162
  type={iconType}
155
163
  size="small"
156
164
  />
157
165
  )}
158
- <Truncate>{children}</Truncate>
166
+ <Truncate line={line} wordBreak={wordBreak}>
167
+ {children}
168
+ </Truncate>
159
169
 
160
170
  {dismissable && size !== 'small' && (
161
171
  <CloseIcon
162
172
  classNames={{
163
173
  icon: css.dismissIcon,
164
- button: css.dismissIconWrapper,
174
+ button: classify(
175
+ {[css.alignTop]: line > 1},
176
+ css.dismissIconWrapper,
177
+ ),
165
178
  }}
166
179
  type={iconType}
167
180
  size="small"
@@ -16,7 +16,6 @@
16
16
  colorFocusPrimary
17
17
  ) from '../../styles/variables/_color.css';
18
18
  @value (
19
- spaceNone,
20
19
  spaceXXSmall,
21
20
  spaceXSmall,
22
21
  spaceSmall
@@ -55,20 +54,17 @@
55
54
  }
56
55
 
57
56
  .large {
58
- padding: spaceNone spaceSmall;
59
- height: size34;
57
+ padding: spaceXSmall spaceSmall;
60
58
  min-height: size34;
61
59
  }
62
60
 
63
61
  .medium {
64
- height: size26;
65
62
  min-height: size26;
66
- padding: spaceNone spaceSmall;
63
+ padding: spaceXXSmall spaceSmall;
67
64
  }
68
65
 
69
66
  .small {
70
- padding: spaceNone spaceXSmall;
71
- height: size18;
67
+ padding: calc(spaceXXSmall / 2) spaceXSmall;
72
68
  min-height: size18;
73
69
  }
74
70
 
@@ -126,11 +122,11 @@
126
122
  }
127
123
 
128
124
  .withIcon {
129
- padding: spaceNone spaceSmall spaceNone spaceXSmall;
125
+ padding: spaceXXSmall spaceSmall spaceXXSmall spaceXSmall;
130
126
  }
131
127
 
132
128
  .dismissable {
133
- padding: spaceNone spaceXSmall spaceNone spaceSmall;
129
+ padding: spaceXXSmall spaceXSmall spaceXXSmall spaceSmall;
134
130
  }
135
131
 
136
132
  .dismissIconWrapper {
@@ -142,6 +138,10 @@
142
138
  margin-right: spaceXXSmall;
143
139
  }
144
140
 
141
+ .alignTop {
142
+ align-self: flex-start;
143
+ }
144
+
145
145
  /* This should be last section for CSS Specificity */
146
146
 
147
147
  .disabled {
@@ -27,7 +27,7 @@ export const ClickableIcon: React$AbstractComponent<
27
27
  className,
28
28
  // Deprecated for Clickable Icon
29
29
  classNames,
30
- disabled,
30
+ disabled = false,
31
31
  ...props
32
32
  }: ClickableIconProps,
33
33
  ref,
@@ -22,7 +22,7 @@ const ClickableIcon = /*#__PURE__*/React.forwardRef((_ref, ref) => {
22
22
  className,
23
23
  // Deprecated for Clickable Icon
24
24
  classNames,
25
- disabled,
25
+ disabled = false,
26
26
  ...props
27
27
  } = _ref;
28
28
  const onKeyDownHandler = e => {
@@ -35,7 +35,7 @@ export const ClickableIcon: React$AbstractComponent<
35
35
  onClick,
36
36
  className, // Deprecated for Clickable Icon
37
37
  classNames,
38
- disabled,
38
+ disabled = false,
39
39
  ...props
40
40
  }: ClickableIconProps,
41
41
  ref,
@@ -5,6 +5,7 @@
5
5
  colorTextDanger,
6
6
  colorTextNeutral,
7
7
  colorBackgroundTertiary,
8
+ colorFillPrimary,
8
9
  colorTextPrimary,
9
10
  colorTextDisabled
10
11
  ) from '../../styles/variables/_color.css';
@@ -16,7 +17,9 @@
16
17
  display: flex;
17
18
  color: colorFillPrimary;
18
19
  width: size8;
20
+ min-width: size8;
19
21
  height: size8;
22
+ min-height: size8;
20
23
  border-radius: borderRadiusCircle;
21
24
  background-color: colorTextPrimary;
22
25
  box-sizing: content-box;
@@ -125,6 +125,7 @@ export function DefaultRow<T extends GenericObject, U extends GenericObject>({
125
125
  data={data}
126
126
  extras={extras}
127
127
  selected={selected}
128
+ disabled={disabled}
128
129
  className={classify({
129
130
  [css.stickyCell]: sticky,
130
131
  })}
@@ -85,6 +85,7 @@ function DefaultRow(_ref2) {
85
85
  data: data,
86
86
  extras: extras,
87
87
  selected: selected,
88
+ disabled: disabled,
88
89
  className: (0, _classify.default)({
89
90
  [_TableModule.default.stickyCell]: sticky
90
91
  })
@@ -135,6 +135,7 @@ export function DefaultRow<T: GenericObject, U: GenericObject>({
135
135
  data={data}
136
136
  extras={extras}
137
137
  selected={selected}
138
+ disabled={disabled}
138
139
  className={classify({[css.stickyCell]: sticky})}
139
140
  />
140
141
  ) : (
@@ -29,6 +29,7 @@ export type GenericHeaderItem<
29
29
  extras?: U;
30
30
  className?: string;
31
31
  selected?: boolean;
32
+ disabled?: boolean;
32
33
  }>;
33
34
  };
34
35
  export type GenericHeaderItems<T, U> = GenericHeaderItem<T, U>[];
@@ -32,6 +32,7 @@ export type GenericHeaderItem<T: GenericObject, U: GenericObject> = {
32
32
  extras?: U,
33
33
  className?: string,
34
34
  selected?: boolean,
35
+ disabled?: boolean,
35
36
  }>,
36
37
  };
37
38
 
@@ -55,6 +55,7 @@ export function StaticTable<
55
55
  sortKey,
56
56
  sortDirection,
57
57
  selectedKeys,
58
+ disabledKeys = [],
58
59
  onSelect,
59
60
  isLoading,
60
61
  idName = 'id',
@@ -159,7 +160,13 @@ export function StaticTable<
159
160
 
160
161
  data as Data;
161
162
  const selected =
162
- selectedKeys?.includes(get(data, idName)) ?? undefined;
163
+ selectedKeys && Array.isArray(selectedKeys)
164
+ ? selectedKeys.includes(get(data, idName))
165
+ : undefined;
166
+ const isRowDisabled =
167
+ disabledKeys && Array.isArray(disabledKeys)
168
+ ? disabledKeys.includes(get(data, idName))
169
+ : false;
163
170
  return TableRow ? (
164
171
  <TableRow
165
172
  key={key}
@@ -168,7 +175,7 @@ export function StaticTable<
168
175
  extras={extras}
169
176
  sortedKeys={rowKeys ?? mappedKeys}
170
177
  selected={selected}
171
- disabled={disabled}
178
+ disabled={disabled || isRowDisabled}
172
179
  />
173
180
  ) : (
174
181
  <DefaultRow
@@ -182,7 +189,7 @@ export function StaticTable<
182
189
  ? (_v) => onSelect?.(xor(selectedKeys ?? [], [key]))
183
190
  : undefined
184
191
  }
185
- disabled={disabled}
192
+ disabled={disabled || isRowDisabled}
186
193
  classNames={{
187
194
  tableRow: classNames?.tableRow,
188
195
  checkbox: classNames?.checkbox,
@@ -51,6 +51,7 @@ function StaticTable(props) {
51
51
  sortKey,
52
52
  sortDirection,
53
53
  selectedKeys,
54
+ disabledKeys = [],
54
55
  onSelect,
55
56
  isLoading,
56
57
  idName = 'id',
@@ -128,7 +129,8 @@ function StaticTable(props) {
128
129
  return null;
129
130
  }
130
131
  data;
131
- const selected = selectedKeys?.includes((0, _get.default)(data, idName)) ?? undefined;
132
+ const selected = selectedKeys && Array.isArray(selectedKeys) ? selectedKeys.includes((0, _get.default)(data, idName)) : undefined;
133
+ const isRowDisabled = disabledKeys && Array.isArray(disabledKeys) ? disabledKeys.includes((0, _get.default)(data, idName)) : false;
132
134
  return TableRow ? /*#__PURE__*/React.createElement(TableRow, {
133
135
  key: key,
134
136
  data: data,
@@ -138,7 +140,7 @@ function StaticTable(props) {
138
140
  extras: extras,
139
141
  sortedKeys: rowKeys ?? mappedKeys,
140
142
  selected: selected,
141
- disabled: disabled
143
+ disabled: disabled || isRowDisabled
142
144
  }) : /*#__PURE__*/React.createElement(_DefaultRow.DefaultRow, {
143
145
  key: key,
144
146
  data: data,
@@ -146,7 +148,7 @@ function StaticTable(props) {
146
148
  headers: headers,
147
149
  selected: selected,
148
150
  onSelect: selectedKeys != null ? _v => onSelect?.((0, _xor.default)(selectedKeys ?? [], [key])) : undefined,
149
- disabled: disabled,
151
+ disabled: disabled || isRowDisabled,
150
152
  classNames: {
151
153
  tableRow: classNames?.tableRow,
152
154
  checkbox: classNames?.checkbox
@@ -60,6 +60,7 @@ export function StaticTable<Data: GenericObject, Extras: GenericObject>(props: {
60
60
  sortKey,
61
61
  sortDirection,
62
62
  selectedKeys,
63
+ disabledKeys = [],
63
64
  onSelect,
64
65
  isLoading,
65
66
  idName = 'id',
@@ -104,7 +105,6 @@ export function StaticTable<Data: GenericObject, Extras: GenericObject>(props: {
104
105
  }
105
106
  }
106
107
  : undefined;
107
-
108
108
  return (
109
109
  <div
110
110
  className={classify(css.tableContainer, classNames?.wrapper)}
@@ -165,7 +165,13 @@ export function StaticTable<Data: GenericObject, Extras: GenericObject>(props: {
165
165
  }
166
166
  (data: Data);
167
167
  const selected =
168
- selectedKeys?.includes(get(data, idName)) ?? undefined;
168
+ selectedKeys && Array.isArray(selectedKeys)
169
+ ? selectedKeys.includes(get(data, idName))
170
+ : undefined;
171
+ const isRowDisabled =
172
+ disabledKeys && Array.isArray(disabledKeys)
173
+ ? disabledKeys.includes(get(data, idName))
174
+ : false;
169
175
 
170
176
  return TableRow ? (
171
177
  <TableRow
@@ -176,7 +182,7 @@ export function StaticTable<Data: GenericObject, Extras: GenericObject>(props: {
176
182
  extras={extras}
177
183
  sortedKeys={rowKeys ?? mappedKeys}
178
184
  selected={selected}
179
- disabled={disabled}
185
+ disabled={disabled || isRowDisabled}
180
186
  />
181
187
  ) : (
182
188
  <DefaultRow
@@ -190,7 +196,7 @@ export function StaticTable<Data: GenericObject, Extras: GenericObject>(props: {
190
196
  ? (_v) => onSelect?.(xor(selectedKeys ?? [], [key]))
191
197
  : undefined
192
198
  }
193
- disabled={disabled}
199
+ disabled={disabled || isRowDisabled}
194
200
  classNames={{
195
201
  tableRow: classNames?.tableRow,
196
202
  checkbox: classNames?.checkbox,
@@ -31,6 +31,7 @@ export type TableProps<T, U> = {
31
31
  // Please start using this prop if you want internal sorting to work in the table
32
32
  enableInternalSorting?: boolean;
33
33
  selectedKeys?: string[];
34
+ disabledKeys?: string[];
34
35
  onSelect?: (keys: string[]) => unknown;
35
36
  idName?: $Keys<T>;
36
37
  onSort?: (key: $Keys<T>, direction: SortDirection) => void;
@@ -116,6 +116,18 @@ export const TABLE_DOCS = {
116
116
  },
117
117
  },
118
118
  },
119
+ disabledKeys: {
120
+ description:
121
+ 'array of keys which are disabled. This prop is used to disable the checkbox and its events for particular rows.',
122
+ control: {
123
+ type: 'object',
124
+ },
125
+ table: {
126
+ type: {
127
+ summary: 'string[]',
128
+ },
129
+ },
130
+ },
119
131
  //onSelect?: (keys: string[]) => mixed
120
132
  onSelect: {
121
133
  description: 'callback function when any row is selected',
@@ -114,6 +114,17 @@ const TABLE_DOCS = {
114
114
  }
115
115
  }
116
116
  },
117
+ disabledKeys: {
118
+ description: 'array of keys which are disabled. This prop is used to disable the checkbox and its events for particular rows.',
119
+ control: {
120
+ type: 'object'
121
+ },
122
+ table: {
123
+ type: {
124
+ summary: 'string[]'
125
+ }
126
+ }
127
+ },
117
128
  //onSelect?: (keys: string[]) => mixed
118
129
  onSelect: {
119
130
  description: 'callback function when any row is selected',
@@ -97,6 +97,16 @@ export const TABLE_DOCS = {
97
97
  type: {summary: 'string[]'},
98
98
  },
99
99
  },
100
+ disabledKeys: {
101
+ description:
102
+ 'array of keys which are disabled. This prop is used to disable the checkbox and its events for particular rows.',
103
+ control: {
104
+ type: 'object',
105
+ },
106
+ table: {
107
+ type: {summary: 'string[]'},
108
+ },
109
+ },
100
110
  //onSelect?: (keys: string[]) => mixed
101
111
  onSelect: {
102
112
  description: 'callback function when any row is selected',
@@ -45,6 +45,7 @@ export type TableProps<T, U> = {
45
45
  enableInternalSorting?: boolean,
46
46
 
47
47
  selectedKeys?: string[],
48
+ disabledKeys?: string[],
48
49
  onSelect?: (keys: string[]) => mixed,
49
50
 
50
51
  idName?: $Keys<T>,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spaced-out/ui-design-system",
3
- "version": "0.3.40-beta.0",
3
+ "version": "0.3.41",
4
4
  "main": "index.js",
5
5
  "description": "Sense UI components library",
6
6
  "author": {