forstok-ui-lib 8.2.3 → 8.3.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "forstok-ui-lib",
3
- "version": "8.2.3",
3
+ "version": "8.3.0",
4
4
  "description": "Forstok UI Components Library",
5
5
  "path": "dist",
6
6
  "main": "dist/index.js",
@@ -3690,7 +3690,7 @@ export const DropdownList = styled.ul<{ $mode?: 'no-border' }>`
3690
3690
  }
3691
3691
  }
3692
3692
  @media only screen and (min-width: 768px) {
3693
- padding: 4px 8px;
3693
+ padding: 8px;
3694
3694
  }
3695
3695
  @media only screen and (min-width: 1366px) {
3696
3696
  max-height: 50vh;
@@ -3708,6 +3708,15 @@ export const DropdownItem = styled.li<{ $mode?: 'common' | 'categories', $isActi
3708
3708
  grid-auto-flow: column;
3709
3709
  grid-template-columns: 100px auto;
3710
3710
  }
3711
+ ${({ $mode }) => !$mode && css`
3712
+ padding: 8px .5em;
3713
+ &:first-child {
3714
+ padding-top: 4px;
3715
+ }
3716
+ &:last-child {
3717
+ padding-bottom: 4px;
3718
+ }
3719
+ `}
3711
3720
  ${({ $mode }) => $mode === 'categories' && css`
3712
3721
  grid-auto-flow: column;
3713
3722
  grid-template-columns: 22px auto;
@@ -3723,18 +3732,21 @@ export const DropdownItem = styled.li<{ $mode?: 'common' | 'categories', $isActi
3723
3732
  }
3724
3733
  `}
3725
3734
  ${({ $mode }) => $mode === 'common' && css`
3726
- margin-top: .125rem;
3727
- margin-bottom: .125rem;
3735
+ margin-bottom: 4px;
3728
3736
  color: var(--pri-clr);
3729
3737
  line-height: 20px;
3730
3738
  align-items: center;
3731
3739
  padding: .5rem .75rem;
3732
3740
  display: block;
3733
3741
  min-height: auto;
3742
+ border-radius: var(--nav-rd);
3734
3743
  &:hover {
3735
3744
  background-color: var(--nav-clr-bg__hvr);
3736
3745
  border-radius: var(--nav-rd);
3737
3746
  }
3747
+ &:last-child {
3748
+ margin-bottom: 0;
3749
+ }
3738
3750
  > label, > span {
3739
3751
  cursor: pointer;
3740
3752
  text-transform: capitalize;
@@ -3756,7 +3768,6 @@ export const DropdownItem = styled.li<{ $mode?: 'common' | 'categories', $isActi
3756
3768
  `}
3757
3769
  ${({ $mode, $isActive }) => ($mode === 'common' && $isActive) && css`
3758
3770
  background-color: var(--nav-clr-bg__hvr);
3759
- border-radius: var(--nav-rd);
3760
3771
  padding-right: 1.75em;
3761
3772
  &, > label, > span {
3762
3773
  font-weight: 500;
@@ -4456,8 +4467,8 @@ export const NavChildItem = styled.div<{ $activated?: boolean, $mode?: 'counter'
4456
4467
  position: relative;
4457
4468
  grid-gap: 6px;
4458
4469
  margin-left: 1.5rem;
4459
- margin-top: .125rem;
4460
- margin-bottom: .125rem;
4470
+ margin-top: 0;
4471
+ margin-bottom: 4px;
4461
4472
  padding-top: .25rem;
4462
4473
  padding-bottom: .25rem;
4463
4474
  padding-left: .5rem;
@@ -4688,19 +4699,23 @@ export const ItemQtyLabel = styled.span`
4688
4699
  display: grid;
4689
4700
  `
4690
4701
 
4691
- export const APILabel = styled.label`
4692
- color: var(--act-clr);
4702
+ export const OptCustomLabel = styled.label<{$mode?: string}>`
4693
4703
  font-size: 10px;
4694
- text-transform: uppercase;
4704
+ text-transform: capitalize;
4695
4705
  letter-spacing: .5px;
4696
4706
  padding: 3px 5px;
4697
- background-color: #21BA45;
4698
4707
  display: block;
4699
4708
  position: absolute;
4700
4709
  right: 10px;
4701
- top: 12px;
4710
+ top: 50%;
4711
+ transform: translateY(-50%);
4702
4712
  z-index: 1;
4703
- border-radius: var(--ter-rd);
4713
+ background-color: #EFEFEF;
4714
+ border-radius: var(--nav-rd);
4715
+ color: var(--pri-clr);
4716
+ ${({ $mode }) => $mode === 'label' && css`
4717
+ transform: translateY(0);
4718
+ `}
4704
4719
  `
4705
4720
 
4706
4721
  export const TableContentWrapper = styled.div<{ $mode?: 'package' }>`
@@ -1,6 +1,6 @@
1
1
  import Image from '.'
2
2
 
3
- import { InitialContainer, APILabel } from '../../assets/stylesheets/shares.styles'
3
+ import { InitialContainer, OptCustomLabel } from '../../assets/stylesheets/shares.styles'
4
4
  import LinkComponent from '../link';
5
5
 
6
6
  import { ImageMode } from './typed'
@@ -89,7 +89,7 @@ const ImageChannelComponent = (props: TImage) => {
89
89
  ) : (
90
90
  <span className='multi-elipsis' title={defName}>
91
91
  {defName}
92
- {isAPI && <APILabel className='_refLabel'>API</APILabel>}
92
+ {isAPI && <OptCustomLabel className='_refLabel'>API</OptCustomLabel>}
93
93
  </span>
94
94
  )
95
95
  )}
@@ -153,16 +153,36 @@ const SelectAllComponent = (props: TSelect) => {
153
153
  } as CSSObjectWithLabel),
154
154
  option: (provided: CSSObject, state: { isSelected: any }) => ({
155
155
  ...provided,
156
- color: state.isSelected ? '#ffffff' : '#000000',
157
- backgroundColor: state.isSelected ? '#fc5c64' : 'transparent',
156
+ width: '100%',
157
+ margin: '0 0 4px',
158
+ color: 'var(--pri-clr)',
159
+ borderRadius: 'var(--nav-rd)',
160
+ backgroundColor: state.isSelected ? 'var(--nav-clr-bg__hvr)' : 'transparent',
158
161
  cursor: 'pointer',
162
+ overflowWrap: 'break-word',
163
+ wordBreak: 'break-all',
164
+ fontWeight: state.isSelected ? 500 : 'normal',
165
+ position: 'relative',
159
166
  '&:hover': {
160
- backgroundColor: '#ec5b62',
161
- color: '#ffffff'
162
- }
167
+ backgroundColor: 'var(--nav-clr-bg__hvr)',
168
+ },
169
+ ...(state.isSelected && {
170
+ paddingRight: '1.75em',
171
+ '&:after': {
172
+ content: '"✔"',
173
+ position: 'absolute',
174
+ top: '50%',
175
+ transform: 'translateY(-50%)',
176
+ right: '7px',
177
+ bottom: '0',
178
+ width: '12px',
179
+ height: '20px'
180
+ }
181
+ })
163
182
  } as CSSObjectWithLabel),
164
183
  menu: (provided: CSSObject) => ({
165
184
  ...provided,
185
+ padding: '8px',
166
186
  borderRadius: '.75rem',
167
187
  boxShadow: '0rem .5rem 1.5rem -.5rem rgba(0, 0, 0, .05), 0rem .5rem 1rem -.25rem rgba(0, 0, 0, .05), 0rem .1875rem .375rem 0rem rgba(0, 0, 0, .05), 0rem .125rem .25rem 0rem rgba(0, 0, 0, .05), 0rem .0625rem .125rem 0rem rgba(0, 0, 0, .05), 0rem 0rem 0rem .0625rem rgba(0, 0, 0, .06)',
168
188
  border: 'none'
@@ -182,16 +182,36 @@ const SelectAsyncPaginateComponent = ({ loadOptions, ...props }: TSelect) => {
182
182
  } as CSSObjectWithLabel),
183
183
  option: (provided: CSSObject, state: OptionProps<TOption, boolean>) => ({
184
184
  ...provided,
185
- color: state.isSelected ? '#ffffff' : '#000000',
186
- backgroundColor: state.isSelected || state.isFocused ? '#fc5c64' : 'transparent',
185
+ width: '100%',
186
+ margin: '0 0 4px',
187
+ color: 'var(--pri-clr)',
188
+ borderRadius: 'var(--nav-rd)',
189
+ backgroundColor: state.isSelected || state.isFocused ? 'var(--nav-clr-bg__hvr)' : 'transparent',
187
190
  cursor: 'pointer',
191
+ overflowWrap: 'break-word',
192
+ wordBreak: 'break-all',
193
+ fontWeight: state.isSelected ? 500 : 'normal',
194
+ position: 'relative',
188
195
  '&:hover': {
189
- backgroundColor: '#ec5b62',
190
- color: '#ffffff'
191
- }
196
+ backgroundColor: 'var(--nav-clr-bg__hvr)',
197
+ },
198
+ ...(state.isSelected && {
199
+ paddingRight: '1.75em',
200
+ '&:after': {
201
+ content: '"✔"',
202
+ position: 'absolute',
203
+ top: '50%',
204
+ transform: 'translateY(-50%)',
205
+ right: '7px',
206
+ bottom: '0',
207
+ width: '12px',
208
+ height: '20px'
209
+ }
210
+ })
192
211
  } as CSSObjectWithLabel),
193
212
  menu: (provided: CSSObject) => ({
194
213
  ...provided,
214
+ padding: '8px',
195
215
  borderRadius: '.75rem',
196
216
  boxShadow: '0rem .5rem 1.5rem -.5rem rgba(0, 0, 0, .05), 0rem .5rem 1rem -.25rem rgba(0, 0, 0, .05), 0rem .1875rem .375rem 0rem rgba(0, 0, 0, .05), 0rem .125rem .25rem 0rem rgba(0, 0, 0, .05), 0rem .0625rem .125rem 0rem rgba(0, 0, 0, .05), 0rem 0rem 0rem .0625rem rgba(0, 0, 0, .06)',
197
217
  border: 'none'
@@ -249,19 +249,37 @@ const SelectComponent = ({ type, isError=false, mode, customOption, customLabel,
249
249
  option: (provided: CSSObject, state: OptionProps<TOption, typeof isMulti>) => ({
250
250
  ...provided,
251
251
  ...(!state.isDisabled && {
252
- color: state.isSelected ? '#ffffff' : '#000000',
253
- backgroundColor: state.isSelected || state.isFocused ? '#fc5c64' : 'transparent',
252
+ width: '100%',
253
+ margin: '0 0 4px',
254
+ color: 'var(--pri-clr)',
255
+ borderRadius: 'var(--nav-rd)',
256
+ backgroundColor: state.isSelected || state.isFocused ? 'var(--nav-clr-bg__hvr)' : 'transparent',
254
257
  cursor: 'pointer',
255
258
  overflowWrap: 'break-word',
256
259
  wordBreak: 'break-all',
260
+ fontWeight: state.isSelected ? 500 : 'normal',
261
+ position: 'relative',
257
262
  '&:hover': {
258
- backgroundColor: '#ec5b62',
259
- color: '#ffffff'
263
+ backgroundColor: 'var(--nav-clr-bg__hvr)',
264
+ }
265
+ }),
266
+ ...(state.isSelected && {
267
+ paddingRight: '1.75em',
268
+ '&:after': {
269
+ content: '"✔"',
270
+ position: 'absolute',
271
+ top: '50%',
272
+ transform: 'translateY(-50%)',
273
+ right: '7px',
274
+ bottom: '0',
275
+ width: '12px',
276
+ height: '20px'
260
277
  }
261
278
  })
262
279
  } as CSSObjectWithLabel),
263
280
  menu: (provided: CSSObject) => ({
264
281
  ...provided,
282
+ padding: '8px',
265
283
  borderRadius: '.75rem',
266
284
  boxShadow: '0rem .5rem 1.5rem -.5rem rgba(0, 0, 0, .05), 0rem .5rem 1rem -.25rem rgba(0, 0, 0, .05), 0rem .1875rem .375rem 0rem rgba(0, 0, 0, .05), 0rem .125rem .25rem 0rem rgba(0, 0, 0, .05), 0rem .0625rem .125rem 0rem rgba(0, 0, 0, .05), 0rem 0rem 0rem .0625rem rgba(0, 0, 0, .06)',
267
285
  border: 'none'