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

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.
@@ -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
159
  "contributorsPerLine": 7
44
- }
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,24 @@
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.40](https://github.com/spaced-out/ui-design-system/compare/v0.3.40-beta.0...v0.3.40) (2025-05-16)
6
+
7
+
8
+ ### Features
9
+
10
+ * multiline support in chips ([919bd29](https://github.com/spaced-out/ui-design-system/commit/919bd29671436a19e279c03b656faf1234ed8eae))
11
+ * 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))
12
+
13
+
14
+ ### Bug Fixes
15
+
16
+ * added intro and updated contributors ([35e0584](https://github.com/spaced-out/ui-design-system/commit/35e058457b737a647a77bc6862aa99d4e271c501))
17
+ * fixes allcontributors ([01570de](https://github.com/spaced-out/ui-design-system/commit/01570de0b64ae1ffe79f800e6902e109839f9448))
18
+ * fixes intro ([a4430fb](https://github.com/spaced-out/ui-design-system/commit/a4430fb76ddd149a417e2762c65d43c872086741))
19
+ * installs dts generator before running the declaration files script ([e02361e](https://github.com/spaced-out/ui-design-system/commit/e02361e4bff04ed160078a79c19c59db988b8382))
20
+ * removed the build step in checks ([e1c951d](https://github.com/spaced-out/ui-design-system/commit/e1c951d745570757d9cf4d2c9f110a70dbb4e0e8))
21
+ * **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))
22
+
5
23
  ### [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
24
 
7
25
 
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
 
@@ -261,9 +266,26 @@ Check out our [**Changelog here**](https://spaced-out.github.io/ui-design-system
261
266
  <table>
262
267
  <tbody>
263
268
  <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>
269
+ <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="#infra-superrover" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
265
270
  <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
271
  <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>
272
+ <td align="center" valign="top" width="14.28%"><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>
273
+ <td align="center" valign="top" width="14.28%"><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>
274
+ <td align="center" valign="top" width="14.28%"><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>
275
+ <td align="center" valign="top" width="14.28%"><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>
276
+ </tr>
277
+ <tr>
278
+ <td align="center" valign="top" width="14.28%"><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>
279
+ <td align="center" valign="top" width="14.28%"><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>
280
+ <td align="center" valign="top" width="14.28%"><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>
281
+ <td align="center" valign="top" width="14.28%"><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>
282
+ <td align="center" valign="top" width="14.28%"><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>
283
+ <td align="center" valign="top" width="14.28%"><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>
284
+ <td align="center" valign="top" width="14.28%"><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>
285
+ </tr>
286
+ <tr>
287
+ <td align="center" valign="top" width="14.28%"><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>
288
+ <td align="center" valign="top" width="14.28%"><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
289
  </tr>
268
290
  </tbody>
269
291
  </table>
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`);
@@ -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 {
@@ -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;
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.40",
4
4
  "main": "index.js",
5
5
  "description": "Sense UI components library",
6
6
  "author": {