spaday-spectrum 0.2.0__py3-none-any.whl
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.
- spaday_spectrum/__init__.py +25 -0
- spaday_spectrum/button.py +375 -0
- spaday_spectrum/checkbox.py +65 -0
- spaday_spectrum/example.py +375 -0
- spaday_spectrum/extension/cdn/index.js +952 -0
- spaday_spectrum/extension/cdn/index.js.map +7 -0
- spaday_spectrum/extension/css/index.css +0 -0
- spaday_spectrum/extension/index.html +13 -0
- spaday_spectrum/extension/versions.json +8 -0
- spaday_spectrum/manifests/button.json +1624 -0
- spaday_spectrum/manifests/checkbox.json +279 -0
- spaday_spectrum/manifests/switch.json +142 -0
- spaday_spectrum/manifests/tabs.json +915 -0
- spaday_spectrum/manifests/textfield.json +952 -0
- spaday_spectrum/manifests/theme.json +340 -0
- spaday_spectrum/switch.py +60 -0
- spaday_spectrum/tabs.py +200 -0
- spaday_spectrum/tests/test_all.py +49 -0
- spaday_spectrum/tests/test_example.py +66 -0
- spaday_spectrum/tests/test_versions.py +18 -0
- spaday_spectrum/textfield.py +186 -0
- spaday_spectrum/theme.py +73 -0
- spaday_spectrum-0.2.0.dist-info/METADATA +133 -0
- spaday_spectrum-0.2.0.dist-info/RECORD +27 -0
- spaday_spectrum-0.2.0.dist-info/WHEEL +4 -0
- spaday_spectrum-0.2.0.dist-info/entry_points.txt +2 -0
- spaday_spectrum-0.2.0.dist-info/licenses/LICENSE +201 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import json
|
|
2
|
+
from pathlib import Path
|
|
3
|
+
|
|
4
|
+
from spaday import ComponentPackage
|
|
5
|
+
|
|
6
|
+
from . import button, checkbox, switch, tabs, textfield, theme
|
|
7
|
+
from .button import *
|
|
8
|
+
from .checkbox import *
|
|
9
|
+
from .switch import *
|
|
10
|
+
from .tabs import *
|
|
11
|
+
from .textfield import *
|
|
12
|
+
from .theme import *
|
|
13
|
+
|
|
14
|
+
__version__ = "0.2.0"
|
|
15
|
+
|
|
16
|
+
# the exact version of each JS library the package serves, written by its JS build
|
|
17
|
+
_VERSIONS = Path(__file__).parent / "extension" / "versions.json"
|
|
18
|
+
|
|
19
|
+
package = ComponentPackage(
|
|
20
|
+
name="spectrum",
|
|
21
|
+
assets_dir=Path(__file__).parent / "extension",
|
|
22
|
+
assets=(("js", "cdn/index.js"),),
|
|
23
|
+
components=tuple(getattr(module, name) for module in (button, checkbox, switch, tabs, textfield, theme) for name in module.__all__),
|
|
24
|
+
provides=json.loads(_VERSIONS.read_text(encoding="utf-8")) if _VERSIONS.exists() else {},
|
|
25
|
+
)
|
|
@@ -0,0 +1,375 @@
|
|
|
1
|
+
# Generated by spaday.cem from @spectrum-web-components/button — do not edit by hand.
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
from typing import Any, Literal
|
|
5
|
+
|
|
6
|
+
from spaday.catalog import ComponentSchema, PropertySchema
|
|
7
|
+
from spaday.component import Child, Component
|
|
8
|
+
|
|
9
|
+
__all__ = ["SpButton", "SpClearButton", "SpCloseButton"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class SpButton(Component):
|
|
13
|
+
tag = "sp-button"
|
|
14
|
+
schema = ComponentSchema(
|
|
15
|
+
tag="sp-button",
|
|
16
|
+
class_name="SpButton",
|
|
17
|
+
summary="",
|
|
18
|
+
props=(
|
|
19
|
+
PropertySchema(name="pending-label", kind="string", choices=(), default="Pending", description=None),
|
|
20
|
+
PropertySchema(name="pending", kind="boolean", choices=(), default="false", description=None),
|
|
21
|
+
PropertySchema(
|
|
22
|
+
name="variant",
|
|
23
|
+
kind="json",
|
|
24
|
+
choices=(),
|
|
25
|
+
type_text="ButtonVariants",
|
|
26
|
+
default=None,
|
|
27
|
+
description="The visual variant to apply to this button.",
|
|
28
|
+
),
|
|
29
|
+
PropertySchema(
|
|
30
|
+
name="static-color",
|
|
31
|
+
kind="enum",
|
|
32
|
+
choices=("black", "white"),
|
|
33
|
+
default=None,
|
|
34
|
+
description="The static color variant to use for this button.",
|
|
35
|
+
),
|
|
36
|
+
PropertySchema(
|
|
37
|
+
name="treatment",
|
|
38
|
+
kind="json",
|
|
39
|
+
choices=(),
|
|
40
|
+
type_text="ButtonTreatments",
|
|
41
|
+
default="fill",
|
|
42
|
+
description="The visual treatment to apply to this button.",
|
|
43
|
+
),
|
|
44
|
+
PropertySchema(name="quiet", kind="boolean", choices=(), default=None, description="Style this button to be less obvious."),
|
|
45
|
+
PropertySchema(
|
|
46
|
+
name="no-wrap",
|
|
47
|
+
kind="boolean",
|
|
48
|
+
choices=(),
|
|
49
|
+
default=None,
|
|
50
|
+
description="Disables text wrapping within the button component's label.\nPlease note that this option is not a part of the design specification\nand should be used carefully, with consideration of this overflow behavior\nand the readability of the button's content.",
|
|
51
|
+
),
|
|
52
|
+
PropertySchema(name="active", kind="boolean", choices=(), default="false", description=None),
|
|
53
|
+
PropertySchema(
|
|
54
|
+
name="type",
|
|
55
|
+
kind="enum",
|
|
56
|
+
choices=("button", "submit", "reset"),
|
|
57
|
+
default="button",
|
|
58
|
+
description="The default behavior of the button.\nPossible values are: `button` (default), `submit`, and `reset`.",
|
|
59
|
+
),
|
|
60
|
+
PropertySchema(name="disabled", kind="boolean", choices=(), default=None, description=None),
|
|
61
|
+
PropertySchema(name="autofocus", kind="boolean", choices=(), default=None, description=None),
|
|
62
|
+
PropertySchema(name="tabindex", kind="number", choices=(), default=None, description=None),
|
|
63
|
+
PropertySchema(name="download", kind="string", choices=(), default=None, description=None),
|
|
64
|
+
PropertySchema(name="label", kind="string", choices=(), default=None, description=None),
|
|
65
|
+
PropertySchema(name="href", kind="string", choices=(), default=None, description=None),
|
|
66
|
+
PropertySchema(name="target", kind="enum", choices=("_blank", "_parent", "_self", "_top"), default=None, description=None),
|
|
67
|
+
PropertySchema(
|
|
68
|
+
name="referrerpolicy",
|
|
69
|
+
kind="enum",
|
|
70
|
+
choices=(
|
|
71
|
+
"no-referrer",
|
|
72
|
+
"no-referrer-when-downgrade",
|
|
73
|
+
"origin",
|
|
74
|
+
"origin-when-cross-origin",
|
|
75
|
+
"same-origin",
|
|
76
|
+
"strict-origin",
|
|
77
|
+
"strict-origin-when-cross-origin",
|
|
78
|
+
"unsafe-url",
|
|
79
|
+
),
|
|
80
|
+
default=None,
|
|
81
|
+
description=None,
|
|
82
|
+
),
|
|
83
|
+
PropertySchema(name="rel", kind="string", choices=(), default=None, description=None),
|
|
84
|
+
PropertySchema(name="size", kind="enum", choices=("xxs", "xs", "s", "m", "l", "xl", "xxl"), default=None, description=None),
|
|
85
|
+
),
|
|
86
|
+
fields=(
|
|
87
|
+
PropertySchema(
|
|
88
|
+
name="pendingStateController", kind="json", choices=(), type_text="PendingStateController<this>", default=None, description=None
|
|
89
|
+
),
|
|
90
|
+
),
|
|
91
|
+
events=(),
|
|
92
|
+
slots=("", "icon"),
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
def __init__(
|
|
96
|
+
self,
|
|
97
|
+
*children: Child,
|
|
98
|
+
key: str | None = None,
|
|
99
|
+
pending_label: str | None = None,
|
|
100
|
+
pending: bool | None = None,
|
|
101
|
+
variant: Any = None,
|
|
102
|
+
static_color: Literal["black", "white"] | None = None,
|
|
103
|
+
treatment: Any = None,
|
|
104
|
+
quiet: bool | None = None,
|
|
105
|
+
no_wrap: bool | None = None,
|
|
106
|
+
active: bool | None = None,
|
|
107
|
+
type: Literal["button", "submit", "reset"] | None = None,
|
|
108
|
+
disabled: bool | None = None,
|
|
109
|
+
autofocus: bool | None = None,
|
|
110
|
+
tabindex: float | None = None,
|
|
111
|
+
download: str | None = None,
|
|
112
|
+
label: str | None = None,
|
|
113
|
+
href: str | None = None,
|
|
114
|
+
target: Literal["_blank", "_parent", "_self", "_top"] | None = None,
|
|
115
|
+
referrerpolicy: Literal[
|
|
116
|
+
"no-referrer",
|
|
117
|
+
"no-referrer-when-downgrade",
|
|
118
|
+
"origin",
|
|
119
|
+
"origin-when-cross-origin",
|
|
120
|
+
"same-origin",
|
|
121
|
+
"strict-origin",
|
|
122
|
+
"strict-origin-when-cross-origin",
|
|
123
|
+
"unsafe-url",
|
|
124
|
+
]
|
|
125
|
+
| None = None,
|
|
126
|
+
rel: str | None = None,
|
|
127
|
+
size: Literal["xxs", "xs", "s", "m", "l", "xl", "xxl"] | None = None,
|
|
128
|
+
**props: Any,
|
|
129
|
+
) -> None:
|
|
130
|
+
super().__init__(
|
|
131
|
+
*children,
|
|
132
|
+
key=key,
|
|
133
|
+
props={
|
|
134
|
+
"pending-label": pending_label,
|
|
135
|
+
"pending": pending,
|
|
136
|
+
"variant": variant,
|
|
137
|
+
"static-color": static_color,
|
|
138
|
+
"treatment": treatment,
|
|
139
|
+
"quiet": quiet,
|
|
140
|
+
"no-wrap": no_wrap,
|
|
141
|
+
"active": active,
|
|
142
|
+
"type": type,
|
|
143
|
+
"disabled": disabled,
|
|
144
|
+
"autofocus": autofocus,
|
|
145
|
+
"tabindex": tabindex,
|
|
146
|
+
"download": download,
|
|
147
|
+
"label": label,
|
|
148
|
+
"href": href,
|
|
149
|
+
"target": target,
|
|
150
|
+
"referrerpolicy": referrerpolicy,
|
|
151
|
+
"rel": rel,
|
|
152
|
+
"size": size,
|
|
153
|
+
},
|
|
154
|
+
**props,
|
|
155
|
+
)
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
class SpClearButton(Component):
|
|
159
|
+
tag = "sp-clear-button"
|
|
160
|
+
schema = ComponentSchema(
|
|
161
|
+
tag="sp-clear-button",
|
|
162
|
+
class_name="SpClearButton",
|
|
163
|
+
summary="",
|
|
164
|
+
props=(
|
|
165
|
+
PropertySchema(
|
|
166
|
+
name="label",
|
|
167
|
+
kind="string",
|
|
168
|
+
choices=(),
|
|
169
|
+
default=None,
|
|
170
|
+
description="An accessible label that describes the component.\nIt will be applied to aria-label, but not visually rendered.\nThis attribute is required for clear buttons.",
|
|
171
|
+
),
|
|
172
|
+
PropertySchema(name="quiet", kind="boolean", choices=(), default="false", description=None),
|
|
173
|
+
PropertySchema(
|
|
174
|
+
name="variant", kind="enum", choices=("overBackground",), default=None, description="The visual variant to apply to this button."
|
|
175
|
+
),
|
|
176
|
+
PropertySchema(
|
|
177
|
+
name="static-color", kind="enum", choices=("white",), default=None, description="The visual variant to apply to this button."
|
|
178
|
+
),
|
|
179
|
+
PropertySchema(name="active", kind="boolean", choices=(), default="false", description=None),
|
|
180
|
+
PropertySchema(
|
|
181
|
+
name="type",
|
|
182
|
+
kind="enum",
|
|
183
|
+
choices=("button", "submit", "reset"),
|
|
184
|
+
default="button",
|
|
185
|
+
description="The default behavior of the button.\nPossible values are: `button` (default), `submit`, and `reset`.",
|
|
186
|
+
),
|
|
187
|
+
PropertySchema(name="disabled", kind="boolean", choices=(), default=None, description=None),
|
|
188
|
+
PropertySchema(name="autofocus", kind="boolean", choices=(), default=None, description=None),
|
|
189
|
+
PropertySchema(name="tabindex", kind="number", choices=(), default=None, description=None),
|
|
190
|
+
PropertySchema(name="download", kind="string", choices=(), default=None, description=None),
|
|
191
|
+
PropertySchema(name="href", kind="string", choices=(), default=None, description=None),
|
|
192
|
+
PropertySchema(name="target", kind="enum", choices=("_blank", "_parent", "_self", "_top"), default=None, description=None),
|
|
193
|
+
PropertySchema(
|
|
194
|
+
name="referrerpolicy",
|
|
195
|
+
kind="enum",
|
|
196
|
+
choices=(
|
|
197
|
+
"no-referrer",
|
|
198
|
+
"no-referrer-when-downgrade",
|
|
199
|
+
"origin",
|
|
200
|
+
"origin-when-cross-origin",
|
|
201
|
+
"same-origin",
|
|
202
|
+
"strict-origin",
|
|
203
|
+
"strict-origin-when-cross-origin",
|
|
204
|
+
"unsafe-url",
|
|
205
|
+
),
|
|
206
|
+
default=None,
|
|
207
|
+
description=None,
|
|
208
|
+
),
|
|
209
|
+
PropertySchema(name="rel", kind="string", choices=(), default=None, description=None),
|
|
210
|
+
PropertySchema(name="size", kind="enum", choices=("xxs", "xs", "s", "m", "l", "xl", "xxl"), default=None, description=None),
|
|
211
|
+
),
|
|
212
|
+
events=(),
|
|
213
|
+
slots=("", "icon"),
|
|
214
|
+
)
|
|
215
|
+
|
|
216
|
+
def __init__(
|
|
217
|
+
self,
|
|
218
|
+
*children: Child,
|
|
219
|
+
key: str | None = None,
|
|
220
|
+
label: str | None = None,
|
|
221
|
+
quiet: bool | None = None,
|
|
222
|
+
variant: Literal["overBackground"] | None = None,
|
|
223
|
+
static_color: Literal["white"] | None = None,
|
|
224
|
+
active: bool | None = None,
|
|
225
|
+
type: Literal["button", "submit", "reset"] | None = None,
|
|
226
|
+
disabled: bool | None = None,
|
|
227
|
+
autofocus: bool | None = None,
|
|
228
|
+
tabindex: float | None = None,
|
|
229
|
+
download: str | None = None,
|
|
230
|
+
href: str | None = None,
|
|
231
|
+
target: Literal["_blank", "_parent", "_self", "_top"] | None = None,
|
|
232
|
+
referrerpolicy: Literal[
|
|
233
|
+
"no-referrer",
|
|
234
|
+
"no-referrer-when-downgrade",
|
|
235
|
+
"origin",
|
|
236
|
+
"origin-when-cross-origin",
|
|
237
|
+
"same-origin",
|
|
238
|
+
"strict-origin",
|
|
239
|
+
"strict-origin-when-cross-origin",
|
|
240
|
+
"unsafe-url",
|
|
241
|
+
]
|
|
242
|
+
| None = None,
|
|
243
|
+
rel: str | None = None,
|
|
244
|
+
size: Literal["xxs", "xs", "s", "m", "l", "xl", "xxl"] | None = None,
|
|
245
|
+
**props: Any,
|
|
246
|
+
) -> None:
|
|
247
|
+
super().__init__(
|
|
248
|
+
*children,
|
|
249
|
+
key=key,
|
|
250
|
+
props={
|
|
251
|
+
"label": label,
|
|
252
|
+
"quiet": quiet,
|
|
253
|
+
"variant": variant,
|
|
254
|
+
"static-color": static_color,
|
|
255
|
+
"active": active,
|
|
256
|
+
"type": type,
|
|
257
|
+
"disabled": disabled,
|
|
258
|
+
"autofocus": autofocus,
|
|
259
|
+
"tabindex": tabindex,
|
|
260
|
+
"download": download,
|
|
261
|
+
"href": href,
|
|
262
|
+
"target": target,
|
|
263
|
+
"referrerpolicy": referrerpolicy,
|
|
264
|
+
"rel": rel,
|
|
265
|
+
"size": size,
|
|
266
|
+
},
|
|
267
|
+
**props,
|
|
268
|
+
)
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
class SpCloseButton(Component):
|
|
272
|
+
tag = "sp-close-button"
|
|
273
|
+
schema = ComponentSchema(
|
|
274
|
+
tag="sp-close-button",
|
|
275
|
+
class_name="SpCloseButton",
|
|
276
|
+
summary="",
|
|
277
|
+
props=(
|
|
278
|
+
PropertySchema(
|
|
279
|
+
name="variant",
|
|
280
|
+
kind="json",
|
|
281
|
+
choices=(),
|
|
282
|
+
type_text="ButtonStaticColors | ''",
|
|
283
|
+
default="",
|
|
284
|
+
description="The visual variant to apply to this button.",
|
|
285
|
+
),
|
|
286
|
+
PropertySchema(name="static-color", kind="enum", choices=("black", "white"), default=None, description=None),
|
|
287
|
+
PropertySchema(name="active", kind="boolean", choices=(), default="false", description=None),
|
|
288
|
+
PropertySchema(
|
|
289
|
+
name="type",
|
|
290
|
+
kind="enum",
|
|
291
|
+
choices=("button", "submit", "reset"),
|
|
292
|
+
default="button",
|
|
293
|
+
description="The default behavior of the button.\nPossible values are: `button` (default), `submit`, and `reset`.",
|
|
294
|
+
),
|
|
295
|
+
PropertySchema(name="disabled", kind="boolean", choices=(), default=None, description=None),
|
|
296
|
+
PropertySchema(name="autofocus", kind="boolean", choices=(), default=None, description=None),
|
|
297
|
+
PropertySchema(name="tabindex", kind="number", choices=(), default=None, description=None),
|
|
298
|
+
PropertySchema(name="download", kind="string", choices=(), default=None, description=None),
|
|
299
|
+
PropertySchema(name="label", kind="string", choices=(), default=None, description=None),
|
|
300
|
+
PropertySchema(name="href", kind="string", choices=(), default=None, description=None),
|
|
301
|
+
PropertySchema(name="target", kind="enum", choices=("_blank", "_parent", "_self", "_top"), default=None, description=None),
|
|
302
|
+
PropertySchema(
|
|
303
|
+
name="referrerpolicy",
|
|
304
|
+
kind="enum",
|
|
305
|
+
choices=(
|
|
306
|
+
"no-referrer",
|
|
307
|
+
"no-referrer-when-downgrade",
|
|
308
|
+
"origin",
|
|
309
|
+
"origin-when-cross-origin",
|
|
310
|
+
"same-origin",
|
|
311
|
+
"strict-origin",
|
|
312
|
+
"strict-origin-when-cross-origin",
|
|
313
|
+
"unsafe-url",
|
|
314
|
+
),
|
|
315
|
+
default=None,
|
|
316
|
+
description=None,
|
|
317
|
+
),
|
|
318
|
+
PropertySchema(name="rel", kind="string", choices=(), default=None, description=None),
|
|
319
|
+
PropertySchema(name="size", kind="enum", choices=("xxs", "xs", "s", "m", "l", "xl", "xxl"), default=None, description=None),
|
|
320
|
+
),
|
|
321
|
+
events=(),
|
|
322
|
+
slots=("", "icon"),
|
|
323
|
+
)
|
|
324
|
+
|
|
325
|
+
def __init__(
|
|
326
|
+
self,
|
|
327
|
+
*children: Child,
|
|
328
|
+
key: str | None = None,
|
|
329
|
+
variant: Any = None,
|
|
330
|
+
static_color: Literal["black", "white"] | None = None,
|
|
331
|
+
active: bool | None = None,
|
|
332
|
+
type: Literal["button", "submit", "reset"] | None = None,
|
|
333
|
+
disabled: bool | None = None,
|
|
334
|
+
autofocus: bool | None = None,
|
|
335
|
+
tabindex: float | None = None,
|
|
336
|
+
download: str | None = None,
|
|
337
|
+
label: str | None = None,
|
|
338
|
+
href: str | None = None,
|
|
339
|
+
target: Literal["_blank", "_parent", "_self", "_top"] | None = None,
|
|
340
|
+
referrerpolicy: Literal[
|
|
341
|
+
"no-referrer",
|
|
342
|
+
"no-referrer-when-downgrade",
|
|
343
|
+
"origin",
|
|
344
|
+
"origin-when-cross-origin",
|
|
345
|
+
"same-origin",
|
|
346
|
+
"strict-origin",
|
|
347
|
+
"strict-origin-when-cross-origin",
|
|
348
|
+
"unsafe-url",
|
|
349
|
+
]
|
|
350
|
+
| None = None,
|
|
351
|
+
rel: str | None = None,
|
|
352
|
+
size: Literal["xxs", "xs", "s", "m", "l", "xl", "xxl"] | None = None,
|
|
353
|
+
**props: Any,
|
|
354
|
+
) -> None:
|
|
355
|
+
super().__init__(
|
|
356
|
+
*children,
|
|
357
|
+
key=key,
|
|
358
|
+
props={
|
|
359
|
+
"variant": variant,
|
|
360
|
+
"static-color": static_color,
|
|
361
|
+
"active": active,
|
|
362
|
+
"type": type,
|
|
363
|
+
"disabled": disabled,
|
|
364
|
+
"autofocus": autofocus,
|
|
365
|
+
"tabindex": tabindex,
|
|
366
|
+
"download": download,
|
|
367
|
+
"label": label,
|
|
368
|
+
"href": href,
|
|
369
|
+
"target": target,
|
|
370
|
+
"referrerpolicy": referrerpolicy,
|
|
371
|
+
"rel": rel,
|
|
372
|
+
"size": size,
|
|
373
|
+
},
|
|
374
|
+
**props,
|
|
375
|
+
)
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Generated by spaday.cem from @spectrum-web-components/checkbox — do not edit by hand.
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
from typing import Any, Literal
|
|
5
|
+
|
|
6
|
+
from spaday.catalog import ComponentSchema, PropertySchema
|
|
7
|
+
from spaday.component import Child, Component
|
|
8
|
+
|
|
9
|
+
__all__ = ["SpCheckbox"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class SpCheckbox(Component):
|
|
13
|
+
tag = "sp-checkbox"
|
|
14
|
+
schema = ComponentSchema(
|
|
15
|
+
tag="sp-checkbox",
|
|
16
|
+
class_name="SpCheckbox",
|
|
17
|
+
summary="",
|
|
18
|
+
props=(
|
|
19
|
+
PropertySchema(
|
|
20
|
+
name="disabled", kind="boolean", choices=(), default="false", description="Disable this control. It will not receive focus or events"
|
|
21
|
+
),
|
|
22
|
+
PropertySchema(name="indeterminate", kind="boolean", choices=(), default="false", description=None),
|
|
23
|
+
PropertySchema(name="invalid", kind="boolean", choices=(), default="false", description=None),
|
|
24
|
+
PropertySchema(name="emphasized", kind="boolean", choices=(), default="false", description=None),
|
|
25
|
+
PropertySchema(name="tabindex", kind="number", choices=(), default="0", description=None),
|
|
26
|
+
PropertySchema(name="checked", kind="boolean", choices=(), default="false", description=None),
|
|
27
|
+
PropertySchema(name="name", kind="string", choices=(), default=None, description=None),
|
|
28
|
+
PropertySchema(name="readonly", kind="boolean", choices=(), default="false", description=None),
|
|
29
|
+
PropertySchema(name="size", kind="enum", choices=("xxs", "xs", "s", "m", "l", "xl", "xxl"), default=None, description=None),
|
|
30
|
+
),
|
|
31
|
+
events=("change",),
|
|
32
|
+
slots=("",),
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
def __init__(
|
|
36
|
+
self,
|
|
37
|
+
*children: Child,
|
|
38
|
+
key: str | None = None,
|
|
39
|
+
disabled: bool | None = None,
|
|
40
|
+
indeterminate: bool | None = None,
|
|
41
|
+
invalid: bool | None = None,
|
|
42
|
+
emphasized: bool | None = None,
|
|
43
|
+
tabindex: float | None = None,
|
|
44
|
+
checked: bool | None = None,
|
|
45
|
+
name: str | None = None,
|
|
46
|
+
readonly: bool | None = None,
|
|
47
|
+
size: Literal["xxs", "xs", "s", "m", "l", "xl", "xxl"] | None = None,
|
|
48
|
+
**props: Any,
|
|
49
|
+
) -> None:
|
|
50
|
+
super().__init__(
|
|
51
|
+
*children,
|
|
52
|
+
key=key,
|
|
53
|
+
props={
|
|
54
|
+
"disabled": disabled,
|
|
55
|
+
"indeterminate": indeterminate,
|
|
56
|
+
"invalid": invalid,
|
|
57
|
+
"emphasized": emphasized,
|
|
58
|
+
"tabindex": tabindex,
|
|
59
|
+
"checked": checked,
|
|
60
|
+
"name": name,
|
|
61
|
+
"readonly": readonly,
|
|
62
|
+
"size": size,
|
|
63
|
+
},
|
|
64
|
+
**props,
|
|
65
|
+
)
|