forstok-ui-lib 8.3.1 → 8.3.3

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.3.1",
3
+ "version": "8.3.3",
4
4
  "description": "Forstok UI Components Library",
5
5
  "path": "dist",
6
6
  "main": "dist/index.js",
@@ -151,24 +151,26 @@ const SelectAllComponent = (props: TSelect) => {
151
151
  letterSpacing: 'normal',
152
152
  lineHeight: 'normal',
153
153
  } as CSSObjectWithLabel),
154
- option: (provided: CSSObject, state: { isSelected: any }) => ({
154
+ option: (provided: CSSObject, state: { isSelected: any, isDisabled: any, isFocused: any }) => ({
155
155
  ...provided,
156
156
  width: '100%',
157
157
  margin: '0 0 4px',
158
- color: 'var(--pri-clr)',
159
158
  borderRadius: 'var(--nav-rd)',
160
- backgroundColor: state.isSelected ? 'var(--nav-clr-bg__hvr)' : 'transparent',
161
159
  cursor: 'pointer',
162
160
  overflowWrap: 'break-word',
163
161
  wordBreak: 'break-all',
164
- fontWeight: state.isSelected ? 500 : 'normal',
165
162
  position: 'relative',
163
+ backgroundColor: state.isSelected || state.isFocused ? 'var(--nav-clr-bg__hvr)' : 'transparent',
166
164
  '&:last-child': {
167
165
  marginBottom: 0,
168
166
  },
169
- '&:hover': {
170
- backgroundColor: 'var(--nav-clr-bg__hvr)',
171
- },
167
+ ...(!state.isDisabled && {
168
+ color: 'var(--pri-clr)',
169
+ fontWeight: state.isSelected ? 500 : 'normal',
170
+ '&:hover': {
171
+ backgroundColor: 'var(--nav-clr-bg__hvr)',
172
+ },
173
+ }),
172
174
  ...(state.isSelected && {
173
175
  paddingRight: '1.75em',
174
176
  '&:after': {
@@ -184,20 +184,22 @@ const SelectAsyncPaginateComponent = ({ loadOptions, ...props }: TSelect) => {
184
184
  ...provided,
185
185
  width: '100%',
186
186
  margin: '0 0 4px',
187
- color: 'var(--pri-clr)',
188
187
  borderRadius: 'var(--nav-rd)',
189
- backgroundColor: state.isSelected || state.isFocused ? 'var(--nav-clr-bg__hvr)' : 'transparent',
190
188
  cursor: 'pointer',
191
189
  overflowWrap: 'break-word',
192
190
  wordBreak: 'break-all',
193
- fontWeight: state.isSelected ? 500 : 'normal',
194
191
  position: 'relative',
192
+ backgroundColor: state.isSelected || state.isFocused ? 'var(--nav-clr-bg__hvr)' : 'transparent',
195
193
  '&:last-child': {
196
194
  marginBottom: 0,
197
195
  },
198
- '&:hover': {
199
- backgroundColor: 'var(--nav-clr-bg__hvr)',
200
- },
196
+ ...(!state.isDisabled && {
197
+ color: 'var(--pri-clr)',
198
+ fontWeight: state.isSelected ? 500 : 'normal',
199
+ '&:hover': {
200
+ backgroundColor: 'var(--nav-clr-bg__hvr)',
201
+ },
202
+ }),
201
203
  ...(state.isSelected && {
202
204
  paddingRight: '1.75em',
203
205
  '&:after': {
@@ -248,23 +248,23 @@ const SelectComponent = ({ type, isError=false, mode, customOption, customLabel,
248
248
  } as CSSObjectWithLabel),
249
249
  option: (provided: CSSObject, state: OptionProps<TOption, typeof isMulti>) => ({
250
250
  ...provided,
251
+ width: '100%',
252
+ margin: '0 0 4px',
253
+ borderRadius: 'var(--nav-rd)',
254
+ cursor: 'pointer',
255
+ overflowWrap: 'break-word',
256
+ wordBreak: 'break-all',
257
+ position: 'relative',
258
+ backgroundColor: state.isSelected || state.isFocused ? 'var(--nav-clr-bg__hvr)' : 'transparent',
259
+ '&:last-child': {
260
+ marginBottom: 0,
261
+ },
251
262
  ...(!state.isDisabled && {
252
- width: '100%',
253
- margin: '0 0 4px',
254
263
  color: 'var(--pri-clr)',
255
- borderRadius: 'var(--nav-rd)',
256
- backgroundColor: state.isSelected || state.isFocused ? 'var(--nav-clr-bg__hvr)' : 'transparent',
257
- cursor: 'pointer',
258
- overflowWrap: 'break-word',
259
- wordBreak: 'break-all',
260
264
  fontWeight: state.isSelected ? 500 : 'normal',
261
- position: 'relative',
262
- '&:last-child': {
263
- marginBottom: 0,
264
- },
265
265
  '&:hover': {
266
266
  backgroundColor: 'var(--nav-clr-bg__hvr)',
267
- }
267
+ },
268
268
  }),
269
269
  ...(state.isSelected && {
270
270
  paddingRight: '1.75em',
@@ -1,6 +1,7 @@
1
1
  import type { ActionMeta, OnChangeValue, SingleValueProps } from 'react-select';
2
2
  import type { OptionProps, GroupBase, StylesConfig, CSSObjectWithLabel, ControlProps, ValueContainerProps, MultiValueProps, MultiValue, OptionsOrGroups, MenuListProps } from 'react-select';
3
- import { CSSObject } from '@emotion/serialize'
3
+ import type { Moment } from 'moment';
4
+ import type { CSSObject } from '@emotion/serialize'
4
5
  import type { TChannel } from '../../typeds/shares.typed';
5
6
  import type { TState } from '../../typeds';
6
7
 
@@ -30,6 +31,7 @@ export type TOption = {
30
31
  postalCode?: string
31
32
  localId?: string
32
33
  isDisabled?: boolean | null
34
+ momentValue?: Moment[]
33
35
  option?: {
34
36
  readonly value: any
35
37
  readonly label: string