@antscorp/antsomi-ui 1.3.5-beta.764 → 1.3.5-beta.766

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.
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { PayloadInfo } from '@antscorp/antsomi-ui/es/types';
3
2
  export type TDisplayFormat = 'number' | 'percentage' | 'currency' | 'datetime';
4
3
  type DisplayFormatProps = {
@@ -117,6 +117,7 @@ export const MessageItemWrapper = styled.div `
117
117
  .answer {
118
118
  padding: 10px;
119
119
  border-radius: 10px;
120
+ word-break: break-word;
120
121
  }
121
122
 
122
123
  .icon {
@@ -275,19 +276,28 @@ export const InputWrapper = styled.div `
275
276
  .input {
276
277
  border: none;
277
278
  font-size: 12px;
278
- line-height: 14px;
279
+ line-height: 1.5 !important;
279
280
 
280
281
  /* padding: 10px 0px; */
281
- min-height: 30px !important;
282
+ min-height: auto !important;
282
283
  max-height: 230px !important;
283
284
  background: #eef5fc;
284
285
  margin: 10px 0;
286
+ padding: 0;
285
287
 
286
288
  &:focus {
287
289
  outline: none !important;
288
290
  box-shadow: none !important;
289
291
  background: #eef5fc;
290
292
  }
293
+
294
+ &::placeholder {
295
+ font-size: 12px;
296
+ font-style: normal !important;
297
+ line-height: 1.5 !important;
298
+ color: #a2a2a2;
299
+ font-weight: 400;
300
+ }
291
301
  }
292
302
  .submit-btn {
293
303
  border: none;
@@ -118,6 +118,7 @@ export const MessageItemWrapper = styled.div `
118
118
  .answer {
119
119
  padding: 10px;
120
120
  border-radius: 10px;
121
+ word-break: break-word;
121
122
  }
122
123
 
123
124
  .icon {
@@ -267,19 +268,28 @@ export const InputWrapper = styled.div `
267
268
  .input {
268
269
  border: none;
269
270
  font-size: 12px;
270
- line-height: 14px;
271
+ line-height: 1.5 !important;
271
272
 
272
273
  /* padding: 10px 0px; */
273
- min-height: 30px !important;
274
+ min-height: auto !important;
274
275
  max-height: 230px !important;
275
276
  background: #eef5fc;
276
277
  margin: 10px 0;
278
+ padding: 0;
277
279
 
278
280
  &:focus {
279
281
  outline: none !important;
280
282
  box-shadow: none !important;
281
283
  background: #eef5fc;
282
284
  }
285
+
286
+ &::placeholder {
287
+ font-size: 12px;
288
+ font-style: normal !important;
289
+ line-height: 1.5 !important;
290
+ color: #a2a2a2;
291
+ font-weight: 400;
292
+ }
283
293
  }
284
294
  .submit-btn {
285
295
  border: none;
@@ -307,13 +317,13 @@ export const InputWrapper = styled.div `
307
317
  left: 3px;
308
318
  }
309
319
 
310
- .textarea {
320
+ /* .textarea {
311
321
  &::placeholder {
312
322
  color: #a2a2a2;
313
323
  font-size: 12px;
314
324
  font-weight: 400;
315
325
  }
316
- }
326
+ } */
317
327
  `;
318
328
  export const TypingCursor = styled.div `
319
329
  width: 3px;
@@ -18,7 +18,7 @@ import { parseTagString, convertInputString, emojiManufacturer, getEmojiTag } fr
18
18
  import { EMOJI, defaultCssVariables, tagifyDefaultProps } from './constants';
19
19
  const TagifyInput = forwardRef((props, ref) => {
20
20
  // Props
21
- const { value, acceptableTagPattern, mapAttributes, maxTags, mode, name, children, cssTagifyVariables, onTagClick, onChange, } = props;
21
+ const { value, placeholder, acceptableTagPattern, mapAttributes, maxTags, mode, name, children, cssTagifyVariables, onTagClick, onChange, } = props;
22
22
  // console.log('========= props ============', props);
23
23
  // console.count('------------ re-render ------------');
24
24
  // States
@@ -116,6 +116,7 @@ const TagifyInput = forwardRef((props, ref) => {
116
116
  },
117
117
  maxTags,
118
118
  mode,
119
+ placeholder,
119
120
  mixMode: {
120
121
  insertAfterTag: '', // Not insert anything after tag
121
122
  },
@@ -125,7 +126,7 @@ const TagifyInput = forwardRef((props, ref) => {
125
126
  editTags: false, // Allow tag editing
126
127
  });
127
128
  }
128
- }, [mode, maxTags, customizeTag]);
129
+ }, [mode, placeholder, maxTags, customizeTag]);
129
130
  // Initialization tagify
130
131
  useLayoutEffect(() => {
131
132
  initializeTagify();
@@ -44,6 +44,7 @@ export declare const TAG_COLOR: {
44
44
  readonly custom: "#bbefbe";
45
45
  };
46
46
  export declare const EMOJI_COLLECTIONS: {
47
+ readonly COMMON: "common";
47
48
  readonly VIBER: "viber";
48
49
  readonly LINE: "line";
49
50
  };
@@ -34,6 +34,7 @@ export const tagifyDefaultProps = {
34
34
  value: '',
35
35
  mode: 'mix',
36
36
  name: 'tagifyInput',
37
+ placeholder: undefined,
37
38
  acceptableTagPattern: DEFAULT_ACCEPT_TAGS,
38
39
  onChange: () => { },
39
40
  };
@@ -56,6 +57,7 @@ export const TAG_COLOR = {
56
57
  [CUSTOM_FN]: '#bbefbe',
57
58
  };
58
59
  export const EMOJI_COLLECTIONS = {
60
+ COMMON: 'common',
59
61
  VIBER: 'viber',
60
62
  LINE: 'line',
61
63
  };