@omniumretail/component-library 1.1.23 → 1.1.25

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/dist/main.css CHANGED
@@ -8,7 +8,7 @@
8
8
  .YPXf1KvhUKPvYzjuCpbK{display:block;color:var(--color-black);text-transform:capitalize;font-size:var(--font-size-body-base);line-height:125%;font-weight:var(--font-weight-semibold)}.YPXf1KvhUKPvYzjuCpbK:not(:first-child){margin-top:8px}.ExPJyFK95xTcgtx9cRbg{text-transform:uppercase}
9
9
  .EBnBgAHgtsQFrDoso9Dw{background-color:var(--color-orange);height:1px;border:none}.FLVlQ5eFtNDkCl4IcIIx{opacity:50%}.L2HU9MLCi6B1ZsJyWfp9{background-color:var(--color-blue)}.MQcBac9Gnb9D2ONENY8Q{margin:8px 0}.tdvYp9O5RnLEsNa3E_wz{margin:16px 0}.hWWGCDnwP_ROWFDlyVxe{margin:24px 0}
10
10
  .pwZdBKCECvzAH92fQDTI{display:flex;flex-wrap:wrap;flex-direction:column}.pwZdBKCECvzAH92fQDTI .ant-table-thead>tr>th{background-color:rgba(0,0,0,0);border:0px;color:var(--color-blue)}.pwZdBKCECvzAH92fQDTI .ant-table-thead>tr>th:before{display:none}.pwZdBKCECvzAH92fQDTI .ant-table-tbody>tr{cursor:pointer}.pwZdBKCECvzAH92fQDTI .ant-table-tbody>tr:last-child>td{border-bottom:1px solid var(--color-grey-light) !important}.pwZdBKCECvzAH92fQDTI .ant-table-tbody>tr:first-child>td{border-top:1px solid var(--color-blue) !important}.pwZdBKCECvzAH92fQDTI .ant-table-tbody>tr:hover td{border-radius:0 !important;border-bottom-color:var(--color-grey-light) !important}.pwZdBKCECvzAH92fQDTI .ant-space{align-self:flex-end}.pwZdBKCECvzAH92fQDTI .ant-select-selection-placeholder{color:var(--color-black)}.pwZdBKCECvzAH92fQDTI .ant-select-selector,.pwZdBKCECvzAH92fQDTI .ant-select-focused .ant-select-selection-search{border:none !important;box-shadow:none !important}.pwZdBKCECvzAH92fQDTI .ant-select-selector:focus,.pwZdBKCECvzAH92fQDTI .ant-select-selector:hover,.pwZdBKCECvzAH92fQDTI .ant-select-focused .ant-select-selection-search:focus,.pwZdBKCECvzAH92fQDTI .ant-select-focused .ant-select-selection-search:hover{border:none !important;box-shadow:none !important}.pwZdBKCECvzAH92fQDTI .ant-pagination{max-width:calc(100% - 200px);margin-left:auto !important}.pwZdBKCECvzAH92fQDTI button[type=button].ant-pagination-item-link{margin-top:0 !important}.pwZdBKCECvzAH92fQDTI button[type=button]{margin-top:-50px}
11
- .yhGDUJJiYhqjPCJgNdjI{contain:inline-size}.LEywos4xlf3LV6eEFLFv{height:50px;display:flex;align-items:center;gap:12px;padding:16px;margin-inline-end:0}.LEywos4xlf3LV6eEFLFv .ant-input{height:50px;padding-left:40px}.VhQgSZHBi1swQZeQePfL{height:50px}.Hfh5KLg4Y_g44Ajhx9aV .ant-tag{background-color:var(--color-orange);color:var(--color-white);padding:6px 16px;max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;position:relative;padding-right:24px;min-height:34px}.Hfh5KLg4Y_g44Ajhx9aV .anticon-close{color:var(--color-white);font-size:12px;position:absolute;right:4px;top:10px}.Hfh5KLg4Y_g44Ajhx9aV .anticon-close:hover{color:var(--color-black)}.yhGDUJJiYhqjPCJgNdjI .Gj9zvBh4toFNL6uoWOIk{display:flex;gap:12px}.yhGDUJJiYhqjPCJgNdjI .BvTiplJPlDM4ob_yobaL{display:flex;flex-direction:row;gap:12px;font-family:"SilkaBold";text-decoration:underline}.yhGDUJJiYhqjPCJgNdjI .BvTiplJPlDM4ob_yobaL div{cursor:pointer}
11
+ .yhGDUJJiYhqjPCJgNdjI{contain:inline-size}.yhGDUJJiYhqjPCJgNdjI .G9kG_bHpbSm0APdxALXI{margin-top:16px}.yhGDUJJiYhqjPCJgNdjI .G9kG_bHpbSm0APdxALXI.sFDpKKys2XzhCHAvcoE3{pointer-events:none}.LEywos4xlf3LV6eEFLFv{height:50px;display:flex;align-items:center;gap:12px;padding:16px;margin-inline-end:0}.LEywos4xlf3LV6eEFLFv .ant-input{height:50px;padding-left:40px}.VhQgSZHBi1swQZeQePfL{height:50px}.Hfh5KLg4Y_g44Ajhx9aV .ant-tag{background-color:var(--color-orange);color:var(--color-white);padding:6px 16px;max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;position:relative;padding-right:24px;min-height:34px}.Hfh5KLg4Y_g44Ajhx9aV .anticon-close{color:var(--color-white);font-size:12px;position:absolute;right:4px;top:10px}.Hfh5KLg4Y_g44Ajhx9aV .anticon-close:hover{color:var(--color-black)}.yhGDUJJiYhqjPCJgNdjI .Gj9zvBh4toFNL6uoWOIk{display:flex;gap:12px}.yhGDUJJiYhqjPCJgNdjI .BvTiplJPlDM4ob_yobaL{display:flex;flex-direction:row;gap:12px;font-family:"SilkaBold";text-decoration:underline}.yhGDUJJiYhqjPCJgNdjI .BvTiplJPlDM4ob_yobaL div{cursor:pointer}
12
12
  .vdTO5pKaLXA2FdyblLq5{border-color:rgba(var(--color-black-rgb), 0.5)}
13
13
  .e3BZiSKkbgvekUOREMi6{font-weight:var(--font-weight-medium);font-size:var(--font-size-body-3);margin-right:44px;margin-top:18px}.e3BZiSKkbgvekUOREMi6 .ant-radio-checked .ant-radio-inner{border-color:var(--color-black)}.e3BZiSKkbgvekUOREMi6 .ant-radio-checked .ant-radio-inner:after{background-color:var(--color-black)}.e3BZiSKkbgvekUOREMi6 .ant-radio-checked:hover .ant-radio-inner:after{background-color:var(--color-orange)}.e3BZiSKkbgvekUOREMi6 .ant-radio:hover .ant-radio-inner{border-color:var(--color-orange)}
14
14
  .D8zh2JqbXPRwa7HPZoou{display:flex;justify-content:space-between;align-items:center;flex-wrap:nowrap;gap:0 16px;background-color:var(--color-black);position:fixed;bottom:0;width:100%;padding:12px 24px;font-size:var(--font-size-body-1);color:var(--color-grey-light);height:60px;flex-direction:row;text-align:left;box-sizing:border-box}.D8zh2JqbXPRwa7HPZoou .rLcS8I6I0aB1gd6Ro7Ix{color:var(--grey2);width:100%;margin-bottom:4px}.D8zh2JqbXPRwa7HPZoou .I18ixqhkBJrOHeIm9ELH{margin-left:8px}.D8zh2JqbXPRwa7HPZoou .XVFO_EVWpXwEwbcS7OwM,.D8zh2JqbXPRwa7HPZoou .I18ixqhkBJrOHeIm9ELH{display:inline-block}.D8zh2JqbXPRwa7HPZoou .Ch59mk3ENKwL_xUV4kwI{height:25px;align-self:flex-end}
@@ -8,5 +8,6 @@ export interface customTagProps extends TagProps {
8
8
  value: string;
9
9
  }[];
10
10
  addExtraTags?: string;
11
+ disable?: boolean;
11
12
  }
12
13
  export declare const TagField: (props: customTagProps) => import("react/jsx-runtime").JSX.Element;
@@ -3,6 +3,7 @@ interface UploadPropsExtended extends UploadProps {
3
3
  onImageChange?: (file: UploadFile | null) => void;
4
4
  initialFileList?: UploadFile[];
5
5
  initialImageUrl?: string;
6
+ disable?: boolean;
6
7
  }
7
8
  export declare const Upload: (props: UploadPropsExtended) => import("react/jsx-runtime").JSX.Element;
8
9
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omniumretail/component-library",
3
- "version": "1.1.23",
3
+ "version": "1.1.25",
4
4
  "private": false,
5
5
  "main": "dist/bundle.js",
6
6
  "typings": "./dist/types/index",
@@ -174,16 +174,17 @@ export const ModalWithTable = (props: ModalWithTableProps) => {
174
174
  }, [rowSelectionInfo])
175
175
 
176
176
  useEffect(() => {
177
- if (tagsInfo.length > 0) {
177
+ if (advancedTagsInfo.length > 0) {
178
178
  setConfirmLoading(true);
179
179
  }
180
- }, [tagsInfo]);
180
+ setConfirmLoading(false);
181
+ }, [advancedTagsInfo]);
181
182
 
182
183
  useEffect(() => {
183
- if (advancedTagsInfo.length > 0) {
184
+ if (tagsInfo.length > 0) {
184
185
  setConfirmLoading(true);
185
186
  }
186
- }, [advancedTagsInfo]);
187
+ }, [tagsInfo]);
187
188
 
188
189
  useEffect(() => {
189
190
  setConfirmLoading(isLoading!);
@@ -16,7 +16,7 @@ const Template: Story<TagProps> = (args) => {
16
16
 
17
17
  console.log('page: basic', tagsInfo,'advanced', advancedTagsInfo);
18
18
 
19
- return <TagField {...args} advancedTags={advancedsFilters} tagsInfo={setTagsInfo} advancedTagsInfo={setAdvancedTagsInfo} addExtraTags={"ola"}></TagField>;
19
+ return <TagField disable={false} {...args} advancedTags={advancedsFilters} tagsInfo={setTagsInfo} advancedTagsInfo={setAdvancedTagsInfo} addExtraTags={"ola"}></TagField>;
20
20
  }
21
21
 
22
22
  export const Primary = Template.bind({});
@@ -13,10 +13,11 @@ export interface customTagProps extends TagProps {
13
13
  advancedTagsInfo?: (tags: string[]) => void;
14
14
  advancedTags?: { display: string; value: string }[];
15
15
  addExtraTags?: string;
16
+ disable?: boolean;
16
17
  }
17
18
 
18
19
  export const TagField = (props: customTagProps) => {
19
- const { customTags = [], advancedTags } = props;
20
+ const { customTags = [], advancedTags, disable } = props;
20
21
 
21
22
  const [tags, setTags] = useState<string[]>(customTags.filter(tag => !tag.includes('=')));
22
23
  const [inputVisible, setInputVisible] = useState<boolean>(false);
@@ -159,6 +160,7 @@ export const TagField = (props: customTagProps) => {
159
160
  onKeyDown={handleKeyDown}
160
161
  onPressEnter={handleInputConfirm}
161
162
  className={styles['tagfield__input']}
163
+ disabled={disable}
162
164
  />
163
165
  )}
164
166
  {!inputVisible && (
@@ -177,7 +179,7 @@ export const TagField = (props: customTagProps) => {
177
179
  </div>
178
180
  </div>
179
181
  }
180
- <div style={{ marginTop: 16 }}>
182
+ <div className={`${styles.tagsContainer} ${disable ? styles.disabled : ''}`}>
181
183
  <TweenOneGroup
182
184
  enter={{
183
185
  scale: 0.8,
@@ -1,6 +1,14 @@
1
1
  .tagfield {
2
2
  contain: inline-size;
3
3
 
4
+ .tagsContainer {
5
+ margin-top: 16px;
6
+
7
+ &.disabled {
8
+ pointer-events: none;
9
+ }
10
+ }
11
+
4
12
  &__creator {
5
13
  height: 50px;
6
14
  display: flex;
@@ -28,7 +28,7 @@ const Template: Story<any> = (args) => {
28
28
  return (
29
29
  <Form form={form} onFinish={handleSubmit}>
30
30
  <Form.Item name="image" valuePropName="file" initialValue={initialValue}>
31
- <Upload {...args} onImageChange={handleImageChange} initialFileList={[initialValue]}></Upload>
31
+ <Upload {...args} onImageChange={handleImageChange} initialFileList={[initialValue]} disable={true}></Upload>
32
32
  </Form.Item>
33
33
  <Form.Item>
34
34
  <Button type="primary" htmlType="submit">
@@ -7,6 +7,7 @@ interface UploadPropsExtended extends UploadProps {
7
7
  onImageChange?: (file: UploadFile | null) => void;
8
8
  initialFileList?: UploadFile[];
9
9
  initialImageUrl?: string;
10
+ disable?: boolean;
10
11
  }
11
12
 
12
13
  function generateRandomString() {
@@ -17,7 +18,8 @@ export const Upload = (props: UploadPropsExtended) => {
17
18
  const {
18
19
  onImageChange,
19
20
  initialFileList,
20
- initialImageUrl
21
+ initialImageUrl,
22
+ disable
21
23
  } = props;
22
24
  const [fileList, setFileList] = useState<UploadFile[]>(initialFileList || []);
23
25
 
@@ -83,6 +85,7 @@ export const Upload = (props: UploadPropsExtended) => {
83
85
  beforeUpload={beforeUpload}
84
86
  onChange={onChange}
85
87
  onPreview={onPreview}
88
+ disabled={disable}
86
89
  >
87
90
  {fileList.length < 1 && '+ Upload'}
88
91
  </UploadAntd>