@innovaccer/design-system 2.5.0 → 2.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,7 +2,7 @@ name: "Test build release"
2
2
  on:
3
3
  push:
4
4
  branches:
5
- - master
5
+ - 2.5.x
6
6
  jobs:
7
7
  release:
8
8
  # uncomment next line as soon as visual tesing starts working
@@ -62,11 +62,6 @@ jobs:
62
62
  if: steps.is_release_commit.outputs.result == 1
63
63
  run: git push https://${{ secrets.GH_TOKEN }}@github.com/$GITHUB_REPOSITORY.git HEAD:master
64
64
 
65
- - name: deploy storybook
66
- env:
67
- GH_TOKEN: ${{ secrets.GH_TOKEN }}
68
- if: steps.is_release_commit.outputs.result == 1
69
- run: npm run deploy-storybook -- --ci
70
65
 
71
66
  - name: notify release
72
67
  if: steps.is_release_commit.outputs.result == 1
@@ -2,7 +2,7 @@ name: "Test"
2
2
  on:
3
3
  push:
4
4
  branches:
5
- - master
5
+ - 2.5.x
6
6
  jobs:
7
7
  test:
8
8
  name: Test for coverage
@@ -20,5 +20,3 @@ jobs:
20
20
  - name: test
21
21
  run: npm run test
22
22
 
23
- - name: Upload coverage to Codecov
24
- uses: codecov/codecov-action@v1
@@ -94,7 +94,7 @@ const sizeMapping: Record<Size, number> = {
94
94
  large: 20,
95
95
  };
96
96
 
97
- export const Button = React.forwardRef<HTMLButtonElement, ButtonProps>((props, ref) => {
97
+ const ButtonBase = React.forwardRef<HTMLButtonElement, ButtonProps>((props, ref) => {
98
98
  const {
99
99
  size = 'regular',
100
100
  appearance = 'basic',
@@ -129,60 +129,62 @@ export const Button = React.forwardRef<HTMLButtonElement, ButtonProps>((props, r
129
129
  [`Button-icon--${iconAlign}`]: children && iconAlign,
130
130
  });
131
131
 
132
- const ButtonElement = () => {
133
- return (
134
- <button
135
- data-test="DesignSystem-Button"
136
- ref={ref}
137
- type={type}
138
- className={buttonClass}
139
- disabled={disabled || loading}
140
- tabIndex={tabIndex}
141
- {...rest}
142
- >
143
- {loading ? (
144
- <>
145
- <Spinner
146
- size="small"
147
- appearance={appearance === 'basic' || appearance === 'transparent' ? 'secondary' : 'white'}
148
- data-test="DesignSystem-Button--Spinner"
149
- className="Button-spinner"
150
- />
151
- <Text className="Button-text Button-text--hidden">{children || ''}</Text>
152
- </>
153
- ) : (
154
- <>
155
- {icon && (
156
- <div className={iconClass}>
157
- <Icon
158
- data-test="DesignSystem-Button--Icon"
159
- name={icon}
160
- appearance={
161
- disabled
162
- ? 'disabled'
163
- : appearance === 'basic' || appearance === 'transparent'
164
- ? selected
165
- ? 'info'
166
- : 'default'
167
- : 'white'
168
- }
169
- size={largeIcon && !children ? sizeMapping[size] + 4 : sizeMapping[size]}
170
- />
171
- </div>
172
- )}
173
- {children}
174
- </>
175
- )}
176
- </button>
177
- );
178
- };
132
+ return (
133
+ <button
134
+ data-test="DesignSystem-Button"
135
+ ref={ref}
136
+ type={type}
137
+ className={buttonClass}
138
+ disabled={disabled || loading}
139
+ tabIndex={tabIndex}
140
+ {...rest}
141
+ >
142
+ {loading ? (
143
+ <>
144
+ <Spinner
145
+ size="small"
146
+ appearance={appearance === 'basic' || appearance === 'transparent' ? 'secondary' : 'white'}
147
+ data-test="DesignSystem-Button--Spinner"
148
+ className="Button-spinner"
149
+ />
150
+ <Text className="Button-text Button-text--hidden">{children || ''}</Text>
151
+ </>
152
+ ) : (
153
+ <>
154
+ {icon && (
155
+ <div className={iconClass}>
156
+ <Icon
157
+ data-test="DesignSystem-Button--Icon"
158
+ name={icon}
159
+ appearance={
160
+ disabled
161
+ ? 'disabled'
162
+ : appearance === 'basic' || appearance === 'transparent'
163
+ ? selected
164
+ ? 'info'
165
+ : 'default'
166
+ : 'white'
167
+ }
168
+ size={largeIcon && !children ? sizeMapping[size] + 4 : sizeMapping[size]}
169
+ />
170
+ </div>
171
+ )}
172
+ {children}
173
+ </>
174
+ )}
175
+ </button>
176
+ );
177
+ });
178
+
179
+ export const Button = React.forwardRef<HTMLButtonElement, ButtonProps>((props, ref) => {
180
+ const { icon, tooltip, children } = { ...props };
179
181
 
180
182
  return icon && tooltip && !children ? (
181
183
  <Tooltip tooltip={tooltip}>
182
- <ButtonElement />
184
+ <ButtonBase {...props} ref={ref} />
183
185
  </Tooltip>
184
186
  ) : (
185
- <ButtonElement />
187
+ <ButtonBase {...props} ref={ref} />
186
188
  );
187
189
  });
188
190
 
@@ -38970,11 +38970,11 @@ exports[`DateRangePicker component
38970
38970
  class="Calendar-valueRow"
38971
38971
  >
38972
38972
  <div
38973
- class="Calendar-value Calendar-monthValue Calendar-monthValue--large Calendar-value--currDateMonthYear"
38973
+ class="Calendar-value Calendar-monthValue Calendar-monthValue--large"
38974
38974
  data-test="DesignSystem-Calendar--monthValue"
38975
38975
  >
38976
38976
  <span
38977
- class="Text Text--link Text--regular"
38977
+ class="Text Text--default Text--regular"
38978
38978
  data-test="DesignSystem-Text"
38979
38979
  >
38980
38980
  Oct
@@ -38992,11 +38992,11 @@ exports[`DateRangePicker component
38992
38992
  </span>
38993
38993
  </div>
38994
38994
  <div
38995
- class="Calendar-value Calendar-monthValue Calendar-monthValue--large"
38995
+ class="Calendar-value Calendar-monthValue Calendar-monthValue--large Calendar-value--currDateMonthYear"
38996
38996
  data-test="DesignSystem-Calendar--monthValue"
38997
38997
  >
38998
38998
  <span
38999
- class="Text Text--default Text--regular"
38999
+ class="Text Text--link Text--regular"
39000
39000
  data-test="DesignSystem-Text"
39001
39001
  >
39002
39002
  Dec
@@ -40511,11 +40511,11 @@ exports[`DateRangePicker component
40511
40511
  class="Calendar-valueRow"
40512
40512
  >
40513
40513
  <div
40514
- class="Calendar-value Calendar-monthValue Calendar-monthValue--small Calendar-value--currDateMonthYear"
40514
+ class="Calendar-value Calendar-monthValue Calendar-monthValue--small"
40515
40515
  data-test="DesignSystem-Calendar--monthValue"
40516
40516
  >
40517
40517
  <span
40518
- class="Text Text--link Text--small"
40518
+ class="Text Text--default Text--small"
40519
40519
  data-test="DesignSystem-Text"
40520
40520
  >
40521
40521
  Oct
@@ -40533,11 +40533,11 @@ exports[`DateRangePicker component
40533
40533
  </span>
40534
40534
  </div>
40535
40535
  <div
40536
- class="Calendar-value Calendar-monthValue Calendar-monthValue--small"
40536
+ class="Calendar-value Calendar-monthValue Calendar-monthValue--small Calendar-value--currDateMonthYear"
40537
40537
  data-test="DesignSystem-Calendar--monthValue"
40538
40538
  >
40539
40539
  <span
40540
- class="Text Text--default Text--small"
40540
+ class="Text Text--link Text--small"
40541
40541
  data-test="DesignSystem-Text"
40542
40542
  >
40543
40543
  Dec
@@ -42052,11 +42052,11 @@ exports[`DateRangePicker component
42052
42052
  class="Calendar-valueRow"
42053
42053
  >
42054
42054
  <div
42055
- class="Calendar-value Calendar-monthValue Calendar-monthValue--large Calendar-value--currDateMonthYear"
42055
+ class="Calendar-value Calendar-monthValue Calendar-monthValue--large"
42056
42056
  data-test="DesignSystem-Calendar--monthValue"
42057
42057
  >
42058
42058
  <span
42059
- class="Text Text--link Text--regular"
42059
+ class="Text Text--default Text--regular"
42060
42060
  data-test="DesignSystem-Text"
42061
42061
  >
42062
42062
  Oct
@@ -42074,11 +42074,11 @@ exports[`DateRangePicker component
42074
42074
  </span>
42075
42075
  </div>
42076
42076
  <div
42077
- class="Calendar-value Calendar-monthValue Calendar-monthValue--large"
42077
+ class="Calendar-value Calendar-monthValue Calendar-monthValue--large Calendar-value--currDateMonthYear"
42078
42078
  data-test="DesignSystem-Calendar--monthValue"
42079
42079
  >
42080
42080
  <span
42081
- class="Text Text--default Text--regular"
42081
+ class="Text Text--link Text--regular"
42082
42082
  data-test="DesignSystem-Text"
42083
42083
  >
42084
42084
  Dec
@@ -46614,11 +46614,11 @@ exports[`DateRangePicker component
46614
46614
  class="Calendar-valueRow"
46615
46615
  >
46616
46616
  <div
46617
- class="Calendar-value Calendar-monthValue Calendar-monthValue--small Calendar-value--currDateMonthYear"
46617
+ class="Calendar-value Calendar-monthValue Calendar-monthValue--small"
46618
46618
  data-test="DesignSystem-Calendar--monthValue"
46619
46619
  >
46620
46620
  <span
46621
- class="Text Text--link Text--small"
46621
+ class="Text Text--default Text--small"
46622
46622
  data-test="DesignSystem-Text"
46623
46623
  >
46624
46624
  Oct
@@ -46636,11 +46636,11 @@ exports[`DateRangePicker component
46636
46636
  </span>
46637
46637
  </div>
46638
46638
  <div
46639
- class="Calendar-value Calendar-monthValue Calendar-monthValue--small"
46639
+ class="Calendar-value Calendar-monthValue Calendar-monthValue--small Calendar-value--currDateMonthYear"
46640
46640
  data-test="DesignSystem-Calendar--monthValue"
46641
46641
  >
46642
46642
  <span
46643
- class="Text Text--default Text--small"
46643
+ class="Text Text--link Text--small"
46644
46644
  data-test="DesignSystem-Text"
46645
46645
  >
46646
46646
  Dec