@faasjs/ant-design 0.0.3-beta.10 → 0.0.3-beta.11

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/README.md CHANGED
@@ -48,9 +48,7 @@ Form are based on [Ant Design's Form.Item component](https://ant.design/componen
48
48
  - [BaseItemProps](#baseitemprops)
49
49
  - [BaseOption](#baseoption)
50
50
  - [BlankProps](#blankprops)
51
- - [CalendarProps](#calendarprops)
52
51
  - [ConfigProviderProps](#configproviderprops)
53
- - [DatePickerProps](#datepickerprops)
54
52
  - [DescriptionItemProps](#descriptionitemprops)
55
53
  - [DescriptionProps](#descriptionprops)
56
54
  - [DrawerProps](#drawerprops)
@@ -71,7 +69,6 @@ Form are based on [Ant Design's Form.Item component](https://ant.design/componen
71
69
  - [RoutesProps](#routesprops)
72
70
  - [TableItemProps](#tableitemprops)
73
71
  - [TableProps](#tableprops)
74
- - [TimePickerProps](#timepickerprops)
75
72
  - [TitleProps](#titleprops)
76
73
  - [setDrawerProps](#setdrawerprops)
77
74
  - [setModalProps](#setmodalprops)
@@ -79,12 +76,10 @@ Form are based on [Ant Design's Form.Item component](https://ant.design/componen
79
76
  ### Variables
80
77
 
81
78
  - [ConfigContext](#configcontext)
82
- - [DatePicker](#datepicker)
83
79
 
84
80
  ### Functions
85
81
 
86
82
  - [Blank](#blank)
87
- - [Calendar](#calendar)
88
83
  - [ConfigProvider](#configprovider)
89
84
  - [Description](#description)
90
85
  - [Form](#form)
@@ -93,7 +88,6 @@ Form are based on [Ant Design's Form.Item component](https://ant.design/componen
93
88
  - [PageNotFound](#pagenotfound)
94
89
  - [Routes](#routes)
95
90
  - [Table](#table)
96
- - [TimePicker](#timepicker)
97
91
  - [Title](#title)
98
92
  - [transferOptions](#transferoptions)
99
93
  - [transferValue](#transfervalue)
@@ -136,12 +130,6 @@ ___
136
130
 
137
131
  ___
138
132
 
139
- ### CalendarProps
140
-
141
- Ƭ **CalendarProps**: `AntdProps`<`Dayjs`\>
142
-
143
- ___
144
-
145
133
  ### ConfigProviderProps
146
134
 
147
135
  Ƭ **ConfigProviderProps**: `Object`
@@ -176,12 +164,6 @@ ___
176
164
 
177
165
  ___
178
166
 
179
- ### DatePickerProps
180
-
181
- Ƭ **DatePickerProps**: `PickerDateProps`<`Dayjs`\>
182
-
183
- ___
184
-
185
167
  ### DescriptionItemProps
186
168
 
187
169
  Ƭ **DescriptionItemProps**<`T`\>: { `children?`: `JSX.Element` ; `if?`: (`values`: `Record`<`string`, `any`\>) => `boolean` ; `render?`: (`value`: `T`, `values`: `any`) => `ReactNode` \| `JSX.Element` } & [`FaasItemProps`](#faasitemprops) & { `object?`: [`DescriptionItemProps`](#descriptionitemprops)[] }
@@ -333,7 +315,7 @@ ___
333
315
 
334
316
  ### FormProps
335
317
 
336
- Ƭ **FormProps**<`Values`, `ExtendItemProps`\>: { `beforeItems?`: `JSX.Element` \| `JSX.Element`[] ; `children?`: `ReactNode` ; `extendTypes?`: [`ExtendTypes`](#extendtypes) ; `footer?`: `JSX.Element` \| `JSX.Element`[] ; `initialValues?`: `Values` ; `items?`: ([`FormItemProps`](#formitemprops) \| `ExtendItemProps`)[] ; `onFinish?`: (`values`: `Values`, `submit?`: (`values`: `any`) => `Promise`<`any`\>) => `Promise`<`any`\> ; `submit?`: ``false`` \| { `text?`: `string` ; `to?`: { `action`: `string` ; `params?`: `Record`<`string`, `any`\> } } } & `Omit`<`AntdFormProps`<`Values`\>, ``"onFinish"`` \| ``"children"`` \| ``"initialValues"``\>
318
+ Ƭ **FormProps**<`Values`, `ExtendItemProps`\>: { `beforeItems?`: `JSX.Element` \| `JSX.Element`[] ; `children?`: `ReactNode` ; `extendTypes?`: [`ExtendTypes`](#extendtypes) ; `footer?`: `JSX.Element` \| `JSX.Element`[] ; `initialValues?`: `Values` ; `items?`: ([`FormItemProps`](#formitemprops) \| `ExtendItemProps` \| `JSX.Element`)[] ; `onFinish?`: (`values`: `Values`, `submit?`: (`values`: `any`) => `Promise`<`any`\>) => `Promise`<`any`\> ; `submit?`: ``false`` \| { `text?`: `string` ; `to?`: { `action`: `string` ; `params?`: `Record`<`string`, `any`\> } } } & `Omit`<`AntdFormProps`<`Values`\>, ``"onFinish"`` \| ``"children"`` \| ``"initialValues"``\>
337
319
 
338
320
  #### Type parameters
339
321
 
@@ -406,12 +388,6 @@ ___
406
388
 
407
389
  ___
408
390
 
409
- ### TimePickerProps
410
-
411
- Ƭ **TimePickerProps**: `Omit`<`PickerTimeProps`<`Dayjs`\>, ``"picker"``\>
412
-
413
- ___
414
-
415
391
  ### TitleProps
416
392
 
417
393
  Ƭ **TitleProps**: `Object`
@@ -422,7 +398,6 @@ ___
422
398
  | :------ | :------ | :------ |
423
399
  | `children?` | `JSX.Element` | return children |
424
400
  | `h1?` | `boolean` \| { `className?`: `string` ; `style?`: `React.CSSProperties` } | return a h1 element |
425
- | `header?` | `PageHeaderProps` | return a PageHeader element |
426
401
  | `plain?` | `boolean` | return a pure text element |
427
402
  | `separator?` | `string` | ` - ` as default |
428
403
  | `suffix?` | `string` | - |
@@ -474,12 +449,6 @@ ___
474
449
 
475
450
  • `Const` **ConfigContext**: `Context`<[`ConfigProviderProps`](#configproviderprops)\>
476
451
 
477
- ___
478
-
479
- ### DatePicker
480
-
481
- • `Const` **DatePicker**: `PickerComponentClass`<`Object`, `unknown`\> & {}
482
-
483
452
  ## Functions
484
453
 
485
454
  ### Blank
@@ -504,25 +473,9 @@ If value is undefined or null, return text, otherwise return value.
504
473
 
505
474
  ___
506
475
 
507
- ### Calendar
508
-
509
- ▸ **Calendar**(`props`): `Element`
510
-
511
- #### Parameters
512
-
513
- | Name | Type |
514
- | :------ | :------ |
515
- | `props` | `CalendarProps`<`Dayjs`\> |
516
-
517
- #### Returns
518
-
519
- `Element`
520
-
521
- ___
522
-
523
476
  ### ConfigProvider
524
477
 
525
- ▸ **ConfigProvider**(`__namedParameters`): `Element`
478
+ ▸ **ConfigProvider**(`«destructured»`): `Element`
526
479
 
527
480
  Config for @faasjs/ant-design components.
528
481
 
@@ -540,9 +493,9 @@ Config for @faasjs/ant-design components.
540
493
 
541
494
  | Name | Type |
542
495
  | :------ | :------ |
543
- | `__namedParameters` | `Object` |
544
- | `__namedParameters.children` | `ReactNode` |
545
- | `__namedParameters.config` | [`ConfigProviderProps`](#configproviderprops) |
496
+ | `«destructured»` | `Object` |
497
+ | › `children` | `ReactNode` |
498
+ | › `config` | [`ConfigProviderProps`](#configproviderprops) |
546
499
 
547
500
  #### Returns
548
501
 
@@ -608,10 +561,10 @@ FormItem, can be used without Form.
608
561
 
609
562
  ```ts
610
563
  // use inline type
611
- <FormItem item={{ type: 'string', id: 'name' }} />
564
+ <FormItem type='string' id='name' />
612
565
 
613
566
  // use custom type
614
- <FormItem item={{ id: 'password' }}>
567
+ <FormItem id='password'>
615
568
  <Input.Password />
616
569
  </>
617
570
  ```
@@ -636,7 +589,7 @@ ___
636
589
 
637
590
  ### Link
638
591
 
639
- ▸ **Link**(`__namedParameters`): `Element`
592
+ ▸ **Link**(`«destructured»`): `Element`
640
593
 
641
594
  ```ts
642
595
  // pure link
@@ -650,7 +603,7 @@ ___
650
603
 
651
604
  | Name | Type |
652
605
  | :------ | :------ |
653
- | `__namedParameters` | [`LinkProps`](#linkprops) |
606
+ | `«destructured»` | [`LinkProps`](#linkprops) |
654
607
 
655
608
  #### Returns
656
609
 
@@ -731,24 +684,6 @@ https://ant.design/components/table/
731
684
 
732
685
  ___
733
686
 
734
- ### TimePicker
735
-
736
- ▸ **TimePicker**(`props`): `ReactElement`<`any`, `string` \| `JSXElementConstructor`<`any`\>\>
737
-
738
- **NOTE**: Exotic components are not callable.
739
-
740
- #### Parameters
741
-
742
- | Name | Type |
743
- | :------ | :------ |
744
- | `props` | [`TimePickerProps`](#timepickerprops) & `RefAttributes`<`any`\> |
745
-
746
- #### Returns
747
-
748
- `ReactElement`<`any`, `string` \| `JSXElementConstructor`<`any`\>\>
749
-
750
- ___
751
-
752
687
  ### Title
753
688
 
754
689
  ▸ **Title**(`props`): `JSX.Element`
@@ -834,7 +769,7 @@ Hook style drawer.
834
769
 
835
770
  | Name | Type | Description |
836
771
  | :------ | :------ | :------ |
837
- | `init?` | [`DrawerProps`](#drawerprops) | initial props ```ts function Example() { const { drawer, setDrawerProps } = useDrawer() return <> <Button onClick={ () => setDrawerProps(prev => ({ open: !prev.open})) }> Toggle </Button> {drawer} </> } ``` |
772
+ | `init?` | [`DrawerProps`](#drawerprops) | initial props ```ts function Example() { const { drawer, setDrawerProps } = useDrawer() return <> <Button onClick={ () => setDrawerProps(prev => ({ open: !prev.open})) }> Toggle </Button> {drawer} </> } ``` |
838
773
 
839
774
  #### Returns
840
775
 
@@ -858,7 +793,7 @@ Hook style modal.
858
793
 
859
794
  | Name | Type | Description |
860
795
  | :------ | :------ | :------ |
861
- | `init?` | [`ModalProps`](#modalprops) | initial props ```ts function Example() { const { modal, setModalProps } = useModal() return <> <Button onClick={() => setModalProps({ open: true })}>Open Modal</Button> {modal}</> } ``` |
796
+ | `init?` | [`ModalProps`](#modalprops) | initial props ```ts function Example() { const { modal, setModalProps } = useModal() return <> <Button onClick={() => setModalProps({ open: true })}>Open Modal</Button> {modal}</> } ``` |
862
797
 
863
798
  #### Returns
864
799
 
package/dist/index.js CHANGED
@@ -846,15 +846,13 @@ function Link({
846
846
  if (button)
847
847
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd7.Button, {
848
848
  ...button,
849
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", {
850
- href,
851
- target: target || (Link2 == null ? void 0 : Link2.target) || "_blank",
852
- style: {
853
- ...Link2.style,
854
- ...style || {}
855
- },
856
- children: text || children
857
- })
849
+ target: target || (Link2 == null ? void 0 : Link2.target) || "_blank",
850
+ style: {
851
+ ...Link2.style,
852
+ ...style || {}
853
+ },
854
+ href,
855
+ children: text || children
858
856
  });
859
857
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", {
860
858
  href,
@@ -867,11 +865,11 @@ function Link({
867
865
  });
868
866
  }
869
867
  if (button)
870
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd7.Button, {
871
- ...button,
872
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_router_dom.Link, {
873
- to: href,
874
- target: target || (Link2 == null ? void 0 : Link2.target),
868
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_router_dom.Link, {
869
+ to: href,
870
+ target: target || (Link2 == null ? void 0 : Link2.target),
871
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd7.Button, {
872
+ ...button,
875
873
  style: {
876
874
  ...Link2.style,
877
875
  ...style || {}
package/dist/index.mjs CHANGED
@@ -832,15 +832,13 @@ function Link({
832
832
  if (button)
833
833
  return /* @__PURE__ */ jsx7(Button3, {
834
834
  ...button,
835
- children: /* @__PURE__ */ jsx7("a", {
836
- href,
837
- target: target || (Link2 == null ? void 0 : Link2.target) || "_blank",
838
- style: {
839
- ...Link2.style,
840
- ...style || {}
841
- },
842
- children: text || children
843
- })
835
+ target: target || (Link2 == null ? void 0 : Link2.target) || "_blank",
836
+ style: {
837
+ ...Link2.style,
838
+ ...style || {}
839
+ },
840
+ href,
841
+ children: text || children
844
842
  });
845
843
  return /* @__PURE__ */ jsx7("a", {
846
844
  href,
@@ -853,11 +851,11 @@ function Link({
853
851
  });
854
852
  }
855
853
  if (button)
856
- return /* @__PURE__ */ jsx7(Button3, {
857
- ...button,
858
- children: /* @__PURE__ */ jsx7(RouterLink, {
859
- to: href,
860
- target: target || (Link2 == null ? void 0 : Link2.target),
854
+ return /* @__PURE__ */ jsx7(RouterLink, {
855
+ to: href,
856
+ target: target || (Link2 == null ? void 0 : Link2.target),
857
+ children: /* @__PURE__ */ jsx7(Button3, {
858
+ ...button,
861
859
  style: {
862
860
  ...Link2.style,
863
861
  ...style || {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faasjs/ant-design",
3
- "version": "0.0.3-beta.10",
3
+ "version": "0.0.3-beta.11",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -28,7 +28,7 @@
28
28
  "lodash-es": "*",
29
29
  "react": "*",
30
30
  "react-dom": "*",
31
- "@faasjs/react": "^0.0.3-beta.10",
31
+ "@faasjs/react": "^0.0.3-beta.11",
32
32
  "react-router-dom": "*",
33
33
  "dayjs": "*"
34
34
  },