feffery_antd_components 0.1.8 → 0.1.9

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.
Files changed (112) hide show
  1. package/DESCRIPTION +1 -1
  2. package/NAMESPACE +1 -0
  3. package/Project.toml +1 -1
  4. package/feffery_antd_components/AntdPopconfirm.py +5 -3
  5. package/feffery_antd_components/AntdRadioGroup.py +3 -3
  6. package/{build/lib/feffery_antd_components/AntdCheckboxGroup.py → feffery_antd_components/AntdSegmented.py} +17 -11
  7. package/feffery_antd_components/AntdSwitch.py +5 -3
  8. package/feffery_antd_components/_imports_.py +2 -0
  9. package/feffery_antd_components/feffery_antd_components.min.js +143 -158
  10. package/feffery_antd_components/metadata.json +259 -4
  11. package/feffery_antd_components/package-info.json +3 -3
  12. package/package.json +3 -3
  13. package/src/FefferyAntdComponents.jl +4 -3
  14. package/src/jl/'feffery'_antdpopconfirm.jl +2 -1
  15. package/src/jl/'feffery'_antdradiogroup.jl +3 -3
  16. package/src/jl/'feffery'_antdsegmented.jl +48 -0
  17. package/src/jl/'feffery'_antdswitch.jl +2 -1
  18. package/src/lib/components/AntdMessage.react.js +2 -0
  19. package/src/lib/components/AntdPopconfirm.react.js +7 -2
  20. package/src/lib/components/AntdRadioGroup.react.js +10 -4
  21. package/src/lib/components/AntdSegmented.react.js +167 -0
  22. package/src/lib/components/AntdSwitch.react.js +9 -1
  23. package/src/lib/components/tabs/AntdTabs.react.js +0 -1
  24. package/src/lib/index.js +3 -1
  25. package/usage.py +28 -115
  26. package/build/lib/feffery_antd_components/AntdAffix.py +0 -54
  27. package/build/lib/feffery_antd_components/AntdAlert.py +0 -58
  28. package/build/lib/feffery_antd_components/AntdAnchor.py +0 -60
  29. package/build/lib/feffery_antd_components/AntdAvatar.py +0 -79
  30. package/build/lib/feffery_antd_components/AntdBackTop.py +0 -52
  31. package/build/lib/feffery_antd_components/AntdBadge.py +0 -70
  32. package/build/lib/feffery_antd_components/AntdBreadcrumb.py +0 -74
  33. package/build/lib/feffery_antd_components/AntdButton.py +0 -68
  34. package/build/lib/feffery_antd_components/AntdCalendar.py +0 -75
  35. package/build/lib/feffery_antd_components/AntdCard.py +0 -86
  36. package/build/lib/feffery_antd_components/AntdCardGrid.py +0 -52
  37. package/build/lib/feffery_antd_components/AntdCarousel.py +0 -56
  38. package/build/lib/feffery_antd_components/AntdCascader.py +0 -93
  39. package/build/lib/feffery_antd_components/AntdCheckbox.py +0 -71
  40. package/build/lib/feffery_antd_components/AntdCol.py +0 -146
  41. package/build/lib/feffery_antd_components/AntdCollapse.py +0 -79
  42. package/build/lib/feffery_antd_components/AntdComment.py +0 -88
  43. package/build/lib/feffery_antd_components/AntdContent.py +0 -50
  44. package/build/lib/feffery_antd_components/AntdCountdown.py +0 -72
  45. package/build/lib/feffery_antd_components/AntdDatePicker.py +0 -95
  46. package/build/lib/feffery_antd_components/AntdDateRangePicker.py +0 -91
  47. package/build/lib/feffery_antd_components/AntdDescriptionItem.py +0 -58
  48. package/build/lib/feffery_antd_components/AntdDescriptions.py +0 -76
  49. package/build/lib/feffery_antd_components/AntdDivider.py +0 -62
  50. package/build/lib/feffery_antd_components/AntdDraggerUpload.py +0 -84
  51. package/build/lib/feffery_antd_components/AntdDrawer.py +0 -72
  52. package/build/lib/feffery_antd_components/AntdDropdown.py +0 -84
  53. package/build/lib/feffery_antd_components/AntdEmpty.py +0 -54
  54. package/build/lib/feffery_antd_components/AntdFooter.py +0 -50
  55. package/build/lib/feffery_antd_components/AntdForm.py +0 -72
  56. package/build/lib/feffery_antd_components/AntdFormItem.py +0 -84
  57. package/build/lib/feffery_antd_components/AntdHeader.py +0 -50
  58. package/build/lib/feffery_antd_components/AntdIcon.py +0 -48
  59. package/build/lib/feffery_antd_components/AntdImage.py +0 -62
  60. package/build/lib/feffery_antd_components/AntdInput.py +0 -101
  61. package/build/lib/feffery_antd_components/AntdInputNumber.py +0 -101
  62. package/build/lib/feffery_antd_components/AntdLayout.py +0 -50
  63. package/build/lib/feffery_antd_components/AntdMentions.py +0 -76
  64. package/build/lib/feffery_antd_components/AntdMenu.py +0 -81
  65. package/build/lib/feffery_antd_components/AntdMessage.py +0 -56
  66. package/build/lib/feffery_antd_components/AntdModal.py +0 -88
  67. package/build/lib/feffery_antd_components/AntdNotification.py +0 -60
  68. package/build/lib/feffery_antd_components/AntdPageHeader.py +0 -62
  69. package/build/lib/feffery_antd_components/AntdPagination.py +0 -95
  70. package/build/lib/feffery_antd_components/AntdParagraph.py +0 -70
  71. package/build/lib/feffery_antd_components/AntdPasteImage.py +0 -52
  72. package/build/lib/feffery_antd_components/AntdPopconfirm.py +0 -80
  73. package/build/lib/feffery_antd_components/AntdPopover.py +0 -74
  74. package/build/lib/feffery_antd_components/AntdProgress.py +0 -88
  75. package/build/lib/feffery_antd_components/AntdRadio.py +0 -54
  76. package/build/lib/feffery_antd_components/AntdRadioGroup.py +0 -89
  77. package/build/lib/feffery_antd_components/AntdRate.py +0 -60
  78. package/build/lib/feffery_antd_components/AntdResult.py +0 -52
  79. package/build/lib/feffery_antd_components/AntdRibbon.py +0 -54
  80. package/build/lib/feffery_antd_components/AntdRow.py +0 -72
  81. package/build/lib/feffery_antd_components/AntdSelect.py +0 -121
  82. package/build/lib/feffery_antd_components/AntdSider.py +0 -68
  83. package/build/lib/feffery_antd_components/AntdSkeleton.py +0 -86
  84. package/build/lib/feffery_antd_components/AntdSlider.py +0 -68
  85. package/build/lib/feffery_antd_components/AntdSpace.py +0 -60
  86. package/build/lib/feffery_antd_components/AntdSpin.py +0 -68
  87. package/build/lib/feffery_antd_components/AntdStatistic.py +0 -74
  88. package/build/lib/feffery_antd_components/AntdSteps.py +0 -72
  89. package/build/lib/feffery_antd_components/AntdSwitch.py +0 -75
  90. package/build/lib/feffery_antd_components/AntdTabPane.py +0 -66
  91. package/build/lib/feffery_antd_components/AntdTable.py +0 -264
  92. package/build/lib/feffery_antd_components/AntdTabs.py +0 -81
  93. package/build/lib/feffery_antd_components/AntdTag.py +0 -54
  94. package/build/lib/feffery_antd_components/AntdTestLink.py +0 -58
  95. package/build/lib/feffery_antd_components/AntdText.py +0 -72
  96. package/build/lib/feffery_antd_components/AntdTimePicker.py +0 -95
  97. package/build/lib/feffery_antd_components/AntdTimeRangePicker.py +0 -95
  98. package/build/lib/feffery_antd_components/AntdTimeline.py +0 -68
  99. package/build/lib/feffery_antd_components/AntdTitle.py +0 -74
  100. package/build/lib/feffery_antd_components/AntdTooltip.py +0 -64
  101. package/build/lib/feffery_antd_components/AntdTransfer.py +0 -99
  102. package/build/lib/feffery_antd_components/AntdTree.py +0 -103
  103. package/build/lib/feffery_antd_components/AntdTreeSelect.py +0 -107
  104. package/build/lib/feffery_antd_components/AntdTypography.py +0 -50
  105. package/build/lib/feffery_antd_components/AntdUpload.py +0 -92
  106. package/build/lib/feffery_antd_components/AntdWatermark.py +0 -64
  107. package/build/lib/feffery_antd_components/Link.py +0 -58
  108. package/build/lib/feffery_antd_components/__init__.py +0 -53
  109. package/build/lib/feffery_antd_components/_imports_.py +0 -161
  110. package/build/lib/feffery_antd_components/feffery_antd_components.min.js +0 -344
  111. package/build/lib/feffery_antd_components/metadata.json +0 -15596
  112. package/build/lib/feffery_antd_components/package-info.json +0 -81
@@ -0,0 +1,167 @@
1
+ import React, { Component } from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import { Segmented } from 'antd';
4
+ import 'antd/dist/antd.css';
5
+
6
+ // 定义分段控制器组件AntdSegmented,api参数参考https://ant.design/components/segmented-cn/
7
+ export default class AntdSegmented extends Component {
8
+
9
+ constructor(props) {
10
+ super(props)
11
+ if (!props.value) {
12
+ props.setProps({ value: props.defaultValue })
13
+ }
14
+ }
15
+
16
+ render() {
17
+ // 取得必要属性或参数
18
+ let {
19
+ id,
20
+ style,
21
+ className,
22
+ options,
23
+ defaultValue,
24
+ value,
25
+ block,
26
+ disabled,
27
+ size,
28
+ setProps,
29
+ persistence,
30
+ persisted_props,
31
+ persistence_type,
32
+ loading_state
33
+ } = this.props;
34
+
35
+ const onSelect = (v) => {
36
+ setProps({ value: v })
37
+ }
38
+
39
+ // 返回定制化的前端组件
40
+ return (
41
+ <Segmented
42
+ id={id}
43
+ className={className}
44
+ style={style}
45
+ options={options}
46
+ defaultValue={defaultValue}
47
+ value={value}
48
+ block={block}
49
+ disabled={disabled}
50
+ size={size}
51
+ persistence={persistence}
52
+ persisted_props={persisted_props}
53
+ persistence_type={persistence_type}
54
+ onChange={onSelect}
55
+ data-dash-is-loading={
56
+ (loading_state && loading_state.is_loading) || undefined
57
+ }
58
+ />
59
+ );
60
+
61
+ }
62
+ }
63
+
64
+ // 定义参数或属性
65
+ AntdSegmented.propTypes = {
66
+ // 组件id
67
+ id: PropTypes.string,
68
+
69
+ // css类名
70
+ className: PropTypes.string,
71
+
72
+ // 自定义css字典
73
+ style: PropTypes.object,
74
+
75
+ // 设置选项参数数组
76
+ options: PropTypes.arrayOf(
77
+ PropTypes.exact({
78
+ // 设置选项的标题内容
79
+ label: PropTypes.string,
80
+
81
+ // 设置选项的对应值
82
+ value: PropTypes.oneOfType([
83
+ PropTypes.string,
84
+ PropTypes.number
85
+ ]),
86
+
87
+ // 设置是否禁用当前选项
88
+ disabled: PropTypes.bool
89
+ })
90
+ ),
91
+
92
+ // 对应当前已选中的值
93
+ value: PropTypes.oneOfType([
94
+ PropTypes.string,
95
+ PropTypes.number
96
+ ]),
97
+
98
+ // 设置初始化状态下被选中的值
99
+ defaultValue: PropTypes.oneOfType([
100
+ PropTypes.string,
101
+ PropTypes.number
102
+ ]),
103
+
104
+ // 设置是否占据父级容器全部宽度,默认为false
105
+ block: PropTypes.bool,
106
+
107
+ // 设置是否禁用整体组件
108
+ disabled: PropTypes.bool,
109
+
110
+ // 当optionType为'button'时,用于设置按钮的大小规格
111
+ // 可选的有'large'、'middle'和'small',默认为'middle'
112
+ size: PropTypes.oneOf(['large', 'middle', 'small']),
113
+
114
+ loading_state: PropTypes.shape({
115
+ /**
116
+ * Determines if the component is loading or not
117
+ */
118
+ is_loading: PropTypes.bool,
119
+ /**
120
+ * Holds which property is loading
121
+ */
122
+ prop_name: PropTypes.string,
123
+ /**
124
+ * Holds the name of the component that is loading
125
+ */
126
+ component_name: PropTypes.string
127
+ }),
128
+
129
+ /**
130
+ * Dash-assigned callback that should be called to report property changes
131
+ * to Dash, to make them available for callbacks.
132
+ */
133
+ setProps: PropTypes.func,
134
+
135
+ /**
136
+ * Used to allow user interactions in this component to be persisted when
137
+ * the component - or the page - is refreshed. If `persisted` is truthy and
138
+ * hasn't changed from its previous value, a `value` that the user has
139
+ * changed while using the app will keep that change, as long as
140
+ * the new `value` also matches what was given originally.
141
+ * Used in conjunction with `persistence_type`.
142
+ */
143
+ persistence: PropTypes.oneOfType([
144
+ PropTypes.bool,
145
+ PropTypes.string,
146
+ PropTypes.number
147
+ ]),
148
+
149
+ /**
150
+ * Properties whose user interactions will persist after refreshing the
151
+ * component or the page. Since only `value` is allowed this prop can
152
+ * normally be ignored.
153
+ */
154
+ persisted_props: PropTypes.arrayOf(PropTypes.oneOf(['value'])),
155
+
156
+ /**
157
+ * Where persisted user changes will be stored:
158
+ * memory: only kept in memory, reset on page refresh.
159
+ * local: window.localStorage, data is kept after the browser quit.
160
+ * session: window.sessionStorage, data is cleared once the browser quit.
161
+ */
162
+ persistence_type: PropTypes.oneOf(['local', 'session', 'memory'])
163
+ };
164
+
165
+ // 设置默认参数
166
+ AntdSegmented.defaultProps = {
167
+ }
@@ -8,7 +8,9 @@ export default class AntdSwitch extends Component {
8
8
 
9
9
  constructor(props) {
10
10
  super(props)
11
- if (!props.checked) {
11
+ if (props.defaultChecked) {
12
+ props.setProps({ checked: props.defaultChecked })
13
+ } else if (!props.checked) {
12
14
  props.setProps({ checked: false })
13
15
  }
14
16
  }
@@ -24,6 +26,7 @@ export default class AntdSwitch extends Component {
24
26
  checkedChildren,
25
27
  unCheckedChildren,
26
28
  size,
29
+ loading,
27
30
  setProps,
28
31
  persistence,
29
32
  persisted_props,
@@ -44,8 +47,10 @@ export default class AntdSwitch extends Component {
44
47
  disabled={disabled}
45
48
  defaultChecked={checked}
46
49
  checkedChildren={checkedChildren}
50
+ checked={checked}
47
51
  unCheckedChildren={unCheckedChildren}
48
52
  size={size}
53
+ loading={loading}
49
54
  onChange={onChange}
50
55
  persistence={persistence}
51
56
  persisted_props={persisted_props}
@@ -84,6 +89,9 @@ AntdSwitch.propTypes = {
84
89
  // 设置开关大小,可选的有'default'与'small',默认为'default'
85
90
  size: PropTypes.oneOf(['default', 'small']),
86
91
 
92
+ // 设置是否渲染loading状态,默认为false
93
+ loading: PropTypes.bool,
94
+
87
95
  loading_state: PropTypes.shape({
88
96
  /**
89
97
  * Determines if the component is loading or not
@@ -108,7 +108,6 @@ export default class AntdTabs extends Component {
108
108
  overlayStyle={{ maxWidth: "250px" }}
109
109
  placement={"right"}
110
110
  getPopupContainer={(triggerNode) => {
111
- console.log(triggerNode.parentNode)
112
111
  return triggerNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode;
113
112
  }}
114
113
  >
package/src/lib/index.js CHANGED
@@ -78,6 +78,7 @@ import AntdDescriptions from './components/descriptions/AntdDescriptions.react'
78
78
  import AntdDescriptionItem from './components/descriptions/AntdDescriptionItem.react'
79
79
  import AntdWatermark from './components/AntdWatermark.react'
80
80
  import AntdPasteImage from './components/AntdPasteImage.react'
81
+ import AntdSegmented from './components/AntdSegmented.react'
81
82
 
82
83
  export {
83
84
  AntdDatePicker,
@@ -158,5 +159,6 @@ export {
158
159
  AntdDescriptions,
159
160
  AntdDescriptionItem,
160
161
  AntdWatermark,
161
- AntdPasteImage
162
+ AntdPasteImage,
163
+ AntdSegmented
162
164
  };
package/usage.py CHANGED
@@ -1,132 +1,45 @@
1
1
  import dash
2
- import numpy as np
3
2
  from dash import html
4
- from flask import request
5
3
  import feffery_antd_components as fac
6
- from dash.dependencies import Input, Output, State
4
+ from dash.dependencies import Input, Output
7
5
 
8
- app = dash.Dash(__name__)
6
+ app = dash.Dash(
7
+ __name__
8
+ )
9
+
10
+
11
+ @app.callback(
12
+ Output('segmented-output-demo', 'children'),
13
+ Input('segmented-demo', 'value')
14
+ )
15
+ def segmented_demo(value):
16
+
17
+ return value
9
18
 
10
19
 
11
20
  app.layout = html.Div(
12
21
  [
13
-
14
- fac.AntdTable(
15
- columns=[
16
- {
17
- 'title': '超链接示例',
18
- 'dataIndex': '超链接示例',
19
- 'renderOptions': {
20
- 'renderType': 'link',
21
- 'renderLinkText': '点击跳转'
22
- }
23
- }
24
- ],
25
- data=[
22
+ fac.AntdSegmented(
23
+ id='segmented-demo',
24
+ block=True,
25
+ options=[
26
26
  {
27
- 'key': i,
28
- '超链接示例': {
29
- 'href': 'https://github.com/CNFeffery/feffery-antd-components'
30
- }
27
+ 'label': f'选项{i}',
28
+ 'value': i
31
29
  }
32
- for i in range(3)
33
- ],
34
- bordered=True,
35
- style={
36
- 'width': '250px'
37
- }
30
+ for i in range(5)
31
+ ]
38
32
  ),
39
-
40
- fac.AntdTable(
41
- columns=[
42
- {
43
- 'title': '默认的checkbox模式',
44
- 'dataIndex': '默认的checkbox模式',
45
- 'width': '25%'
46
- },
47
- {
48
- 'title': '自定义选项的checkbox模式',
49
- 'dataIndex': '自定义选项的checkbox模式',
50
- 'width': '25%'
51
- },
52
- {
53
- 'title': 'keyword模式',
54
- 'dataIndex': 'keyword模式',
55
- 'width': '25%'
56
- },
57
- {
58
- 'title': '数值测试',
59
- 'dataIndex': '数值测试',
60
- 'width': '25%',
61
- 'renderOptions': {
62
- 'renderType': 'custom-format'
63
- }
64
- }
65
- ],
66
- data=[
67
- {
68
- '默认的checkbox模式': i,
69
- '自定义选项的checkbox模式': i,
70
- 'keyword模式': i,
71
- '数值测试': np.random.rand()
72
- }
73
- for i in range(20)
74
- ],
75
- bordered=True,
76
- filterOptions={
77
- '默认的checkbox模式': {},
78
- '自定义选项的checkbox模式': {
79
- 'filterMode': 'checkbox',
80
- 'filterCustomItems': [1, 2, 3],
81
- 'filterMultiple': False,
82
- 'filterSearch': True
83
- },
84
- 'keyword模式': {
85
- 'filterMode': 'keyword'
86
- }
87
- },
88
- pagination={
89
- 'pageSize': 20
90
- },
91
- customFormatFuncs={
92
- '数值测试': '(x) => `${(x*100).toFixed(2)}%`'
93
- },
94
- conditionalStyleFuncs={
95
- **{
96
- key: '''
97
- (record, index) => {
98
- if ( index % 2 === 1 ) {
99
- return {
100
- style: {
101
- backgroundColor: "rgb(250, 250, 250)"
102
- }
103
- }
104
- }
105
- }
106
- '''
107
- for key in ['默认的checkbox模式', '自定义选项的checkbox模式', 'keyword模式']
108
- },
109
- '数值测试': '''
110
- (record, index) => {
111
- if ( record['数值测试'] <= 0.5 ) {
112
- return {
113
- style: {
114
- background: `linear-gradient(90deg, rgb(61, 153, 112) 0%, rgb(61, 153, 112) ${record['数值测试']*100}%, white ${record['数值测试']*100}%, white 100%)`
115
- }
116
- };
117
- }
118
- return {
119
- style: {
120
- background: `linear-gradient(90deg, rgb(255, 65, 54) 0%, rgb(255, 65, 54) ${record['数值测试']*100}%, white ${record['数值测试']*100}%, white 100%)`
121
- }
122
- };
123
- }
124
- '''
125
- }
33
+ fac.AntdText(
34
+ id='segmented-output-demo'
35
+ ),
36
+ fac.AntdMessage(
37
+ content='AntdMessage top参数测试',
38
+ top=400,
39
+ duration=1000
126
40
  )
127
41
  ],
128
42
  style={
129
- 'height': '100vh',
130
43
  'padding': '50px'
131
44
  }
132
45
  )
@@ -1,54 +0,0 @@
1
- # AUTO GENERATED FILE - DO NOT EDIT
2
-
3
- from dash.development.base_component import Component, _explicitize_args
4
-
5
-
6
- class AntdAffix(Component):
7
- """An AntdAffix component.
8
-
9
-
10
- Keyword arguments:
11
-
12
- - children (a list of or a singular dash component, string or number; optional)
13
-
14
- - id (string; optional)
15
-
16
- - className (string; optional)
17
-
18
- - loading_state (dict; optional)
19
-
20
- `loading_state` is a dict with keys:
21
-
22
- - component_name (string; optional):
23
- Holds the name of the component that is loading.
24
-
25
- - is_loading (boolean; optional):
26
- Determines if the component is loading or not.
27
-
28
- - prop_name (string; optional):
29
- Holds which property is loading.
30
-
31
- - offsetBottom (number; optional)
32
-
33
- - offsetTop (number; optional)
34
-
35
- - style (dict; optional)
36
-
37
- - target (string; optional)"""
38
- @_explicitize_args
39
- def __init__(self, children=None, id=Component.UNDEFINED, className=Component.UNDEFINED, style=Component.UNDEFINED, offsetBottom=Component.UNDEFINED, offsetTop=Component.UNDEFINED, target=Component.UNDEFINED, loading_state=Component.UNDEFINED, **kwargs):
40
- self._prop_names = ['children', 'id', 'className', 'loading_state', 'offsetBottom', 'offsetTop', 'style', 'target']
41
- self._type = 'AntdAffix'
42
- self._namespace = 'feffery_antd_components'
43
- self._valid_wildcard_attributes = []
44
- self.available_properties = ['children', 'id', 'className', 'loading_state', 'offsetBottom', 'offsetTop', 'style', 'target']
45
- self.available_wildcard_properties = []
46
- _explicit_args = kwargs.pop('_explicit_args')
47
- _locals = locals()
48
- _locals.update(kwargs) # For wildcard attrs
49
- args = {k: _locals[k] for k in _explicit_args if k != 'children'}
50
- for k in []:
51
- if k not in args:
52
- raise TypeError(
53
- 'Required argument `' + k + '` was not specified.')
54
- super(AntdAffix, self).__init__(children=children, **args)
@@ -1,58 +0,0 @@
1
- # AUTO GENERATED FILE - DO NOT EDIT
2
-
3
- from dash.development.base_component import Component, _explicitize_args
4
-
5
-
6
- class AntdAlert(Component):
7
- """An AntdAlert component.
8
-
9
-
10
- Keyword arguments:
11
-
12
- - id (string; optional)
13
-
14
- - className (string; optional)
15
-
16
- - closable (boolean; default False)
17
-
18
- - description (boolean | number | string | dict | list; optional)
19
-
20
- - loading_state (dict; optional)
21
-
22
- `loading_state` is a dict with keys:
23
-
24
- - component_name (string; optional):
25
- Holds the name of the component that is loading.
26
-
27
- - is_loading (boolean; optional):
28
- Determines if the component is loading or not.
29
-
30
- - prop_name (string; optional):
31
- Holds which property is loading.
32
-
33
- - message (boolean | number | string | dict | list | list of boolean | number | string | dict | lists; optional)
34
-
35
- - messageRenderMode (a value equal to: 'default', 'loop-text', 'marquee'; default 'default')
36
-
37
- - showIcon (boolean; optional)
38
-
39
- - style (dict; optional)
40
-
41
- - type (a value equal to: 'success', 'info', 'warning', 'error'; optional)"""
42
- @_explicitize_args
43
- def __init__(self, id=Component.UNDEFINED, className=Component.UNDEFINED, style=Component.UNDEFINED, description=Component.UNDEFINED, message=Component.UNDEFINED, type=Component.UNDEFINED, showIcon=Component.UNDEFINED, closable=Component.UNDEFINED, messageRenderMode=Component.UNDEFINED, loading_state=Component.UNDEFINED, **kwargs):
44
- self._prop_names = ['id', 'className', 'closable', 'description', 'loading_state', 'message', 'messageRenderMode', 'showIcon', 'style', 'type']
45
- self._type = 'AntdAlert'
46
- self._namespace = 'feffery_antd_components'
47
- self._valid_wildcard_attributes = []
48
- self.available_properties = ['id', 'className', 'closable', 'description', 'loading_state', 'message', 'messageRenderMode', 'showIcon', 'style', 'type']
49
- self.available_wildcard_properties = []
50
- _explicit_args = kwargs.pop('_explicit_args')
51
- _locals = locals()
52
- _locals.update(kwargs) # For wildcard attrs
53
- args = {k: _locals[k] for k in _explicit_args if k != 'children'}
54
- for k in []:
55
- if k not in args:
56
- raise TypeError(
57
- 'Required argument `' + k + '` was not specified.')
58
- super(AntdAlert, self).__init__(**args)
@@ -1,60 +0,0 @@
1
- # AUTO GENERATED FILE - DO NOT EDIT
2
-
3
- from dash.development.base_component import Component, _explicitize_args
4
-
5
-
6
- class AntdAnchor(Component):
7
- """An AntdAnchor component.
8
-
9
-
10
- Keyword arguments:
11
-
12
- - id (string; optional)
13
-
14
- - affix (boolean; optional)
15
-
16
- - align (a value equal to: 'left', 'right'; default 'right')
17
-
18
- - bounds (number; optional)
19
-
20
- - className (string; optional)
21
-
22
- - containerId (string; optional)
23
-
24
- - linkDict (optional)
25
-
26
- - loading_state (dict; optional)
27
-
28
- `loading_state` is a dict with keys:
29
-
30
- - component_name (string; optional):
31
- Holds the name of the component that is loading.
32
-
33
- - is_loading (boolean; optional):
34
- Determines if the component is loading or not.
35
-
36
- - prop_name (string; optional):
37
- Holds which property is loading.
38
-
39
- - offsetTop (number; optional)
40
-
41
- - style (dict; optional)
42
-
43
- - targetOffset (number; optional)"""
44
- @_explicitize_args
45
- def __init__(self, id=Component.UNDEFINED, className=Component.UNDEFINED, style=Component.UNDEFINED, linkDict=Component.UNDEFINED, align=Component.UNDEFINED, containerId=Component.UNDEFINED, targetOffset=Component.UNDEFINED, affix=Component.UNDEFINED, bounds=Component.UNDEFINED, offsetTop=Component.UNDEFINED, loading_state=Component.UNDEFINED, **kwargs):
46
- self._prop_names = ['id', 'affix', 'align', 'bounds', 'className', 'containerId', 'linkDict', 'loading_state', 'offsetTop', 'style', 'targetOffset']
47
- self._type = 'AntdAnchor'
48
- self._namespace = 'feffery_antd_components'
49
- self._valid_wildcard_attributes = []
50
- self.available_properties = ['id', 'affix', 'align', 'bounds', 'className', 'containerId', 'linkDict', 'loading_state', 'offsetTop', 'style', 'targetOffset']
51
- self.available_wildcard_properties = []
52
- _explicit_args = kwargs.pop('_explicit_args')
53
- _locals = locals()
54
- _locals.update(kwargs) # For wildcard attrs
55
- args = {k: _locals[k] for k in _explicit_args if k != 'children'}
56
- for k in []:
57
- if k not in args:
58
- raise TypeError(
59
- 'Required argument `' + k + '` was not specified.')
60
- super(AntdAnchor, self).__init__(**args)
@@ -1,79 +0,0 @@
1
- # AUTO GENERATED FILE - DO NOT EDIT
2
-
3
- from dash.development.base_component import Component, _explicitize_args
4
-
5
-
6
- class AntdAvatar(Component):
7
- """An AntdAvatar component.
8
-
9
-
10
- Keyword arguments:
11
-
12
- - id (string; optional)
13
-
14
- - alt (string; optional)
15
-
16
- - className (string; optional)
17
-
18
- - gap (number; optional)
19
-
20
- - icon (string; optional)
21
-
22
- - loading_state (dict; optional)
23
-
24
- `loading_state` is a dict with keys:
25
-
26
- - component_name (string; optional):
27
- Holds the name of the component that is loading.
28
-
29
- - is_loading (boolean; optional):
30
- Determines if the component is loading or not.
31
-
32
- - prop_name (string; optional):
33
- Holds which property is loading.
34
-
35
- - mode (a value equal to: 'text', 'icon', 'image'; default 'icon')
36
-
37
- - shape (a value equal to: 'circle', 'square'; optional)
38
-
39
- - size (dict; optional)
40
-
41
- `size` is a number | a value equal to: 'large', 'small', 'default'
42
- | dict with keys:
43
-
44
- - lg (number; optional)
45
-
46
- - md (number; optional)
47
-
48
- - sm (number; optional)
49
-
50
- - xl (number; optional)
51
-
52
- - xs (number; optional)
53
-
54
- - xxl (number; optional)
55
-
56
- - src (string; optional)
57
-
58
- - srcSet (string; optional)
59
-
60
- - style (dict; optional)
61
-
62
- - text (string; optional)"""
63
- @_explicitize_args
64
- def __init__(self, id=Component.UNDEFINED, className=Component.UNDEFINED, style=Component.UNDEFINED, gap=Component.UNDEFINED, mode=Component.UNDEFINED, text=Component.UNDEFINED, icon=Component.UNDEFINED, alt=Component.UNDEFINED, src=Component.UNDEFINED, srcSet=Component.UNDEFINED, size=Component.UNDEFINED, shape=Component.UNDEFINED, loading_state=Component.UNDEFINED, **kwargs):
65
- self._prop_names = ['id', 'alt', 'className', 'gap', 'icon', 'loading_state', 'mode', 'shape', 'size', 'src', 'srcSet', 'style', 'text']
66
- self._type = 'AntdAvatar'
67
- self._namespace = 'feffery_antd_components'
68
- self._valid_wildcard_attributes = []
69
- self.available_properties = ['id', 'alt', 'className', 'gap', 'icon', 'loading_state', 'mode', 'shape', 'size', 'src', 'srcSet', 'style', 'text']
70
- self.available_wildcard_properties = []
71
- _explicit_args = kwargs.pop('_explicit_args')
72
- _locals = locals()
73
- _locals.update(kwargs) # For wildcard attrs
74
- args = {k: _locals[k] for k in _explicit_args if k != 'children'}
75
- for k in []:
76
- if k not in args:
77
- raise TypeError(
78
- 'Required argument `' + k + '` was not specified.')
79
- super(AntdAvatar, self).__init__(**args)