flet-box 1.1.2 → 1.1.3
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/AGENTS_FOR_CODE_GEN.md +284 -0
- package/CONTRIBUTING.md +238 -0
- package/README.md +2 -2
- package/bin/cli.js +88 -1
- package/bin/commands/auditFix.js +181 -27
- package/bin/commands/checkApi.js +14 -3
- package/bin/commands/checkStructure.js +368 -0
- package/bin/commands/checkSyntax.js +293 -0
- package/bin/commands/checkUi.js +666 -14
- package/bin/commands/create.js +14 -0
- package/bin/commands/createBundle.js +2 -2
- package/bin/commands/metrics.js +448 -0
- package/bin/commands/release.js +18 -0
- package/bin/commands/report.js +849 -0
- package/bin/commands/tools.js +76 -0
- package/bin/commands/unpack.js +39 -11
- package/bin/commands/verify.js +879 -0
- package/bin/mcp.js +280 -0
- package/bin/utils/contract.js +27 -0
- package/bin/utils/dtsProps.js +5 -1
- package/bin/utils/migrationGuide.js +146 -0
- package/bin/utils/moduleExports.js +9 -5
- package/bin/utils/templates.js +225 -18
- package/bin/utils/toolkit.js +191 -0
- package/docs/README.md +5 -1
- package/docs/arquitectura.md +1 -1
- package/docs/cli/README.md +168 -2
- package/docs/guides/README.md +6 -0
- package/docs/guides/accessibility.md +2 -1
- package/docs/guides/ai-toolkit.md +166 -0
- package/docs/guides/compatibility.md +1 -1
- package/docs/guides/migration.md +92 -0
- package/docs/guides/minification-and-protection.md +2 -1
- package/docs/guides/mobile-and-platforms.md +1 -1
- package/docs/guides/online-updates.md +2 -0
- package/docs/server/deployment.md +1 -1
- package/docs/tools/styling.md +2 -2
- package/docs/tools/theme.md +139 -4
- package/docs/widget/Accordion.md +74 -8
- package/docs/widget/AdMob.md +68 -3
- package/docs/widget/AdSense.md +67 -2
- package/docs/widget/AlertDialog.md +1 -1
- package/docs/widget/AnimatedBox.md +80 -39
- package/docs/widget/AnimatedText.md +74 -18
- package/docs/widget/Audio.md +73 -14
- package/docs/widget/Avatar.md +69 -4
- package/docs/widget/Badge.md +68 -3
- package/docs/widget/BottomSheet.md +2 -2
- package/docs/widget/Button.md +69 -3
- package/docs/widget/Card.md +69 -4
- package/docs/widget/Carousel.md +67 -2
- package/docs/widget/Chart.md +67 -2
- package/docs/widget/Checkbox.md +74 -8
- package/docs/widget/Chip.md +68 -3
- package/docs/widget/CircularBar.md +74 -15
- package/docs/widget/CircularChart.md +71 -10
- package/docs/widget/CodeViewer.md +67 -2
- package/docs/widget/Column.md +68 -3
- package/docs/widget/Container.md +68 -3
- package/docs/widget/DataTable.md +67 -2
- package/docs/widget/Divider.md +67 -2
- package/docs/widget/DraggBox.md +67 -2
- package/docs/widget/Dropdown.md +76 -10
- package/docs/widget/DroppBox.md +67 -2
- package/docs/widget/FloatingActionButton.md +68 -3
- package/docs/widget/GridView.md +67 -2
- package/docs/widget/Icon.md +71 -5
- package/docs/widget/Image.md +68 -3
- package/docs/widget/Input.md +68 -3
- package/docs/widget/Inspector.md +2 -2
- package/docs/widget/InstallButton.md +73 -13
- package/docs/widget/ListTile.md +69 -3
- package/docs/widget/ListView.md +67 -2
- package/docs/widget/Maps.md +68 -3
- package/docs/widget/Markdown.md +74 -15
- package/docs/widget/MatrixRain.md +72 -11
- package/docs/widget/Menu.md +209 -0
- package/docs/widget/Modal.md +3 -3
- package/docs/widget/Pagination.md +68 -3
- package/docs/widget/ParallaxBox.md +72 -12
- package/docs/widget/ProgressBar.md +69 -4
- package/docs/widget/QRCode.md +67 -2
- package/docs/widget/README.md +54 -50
- package/docs/widget/Radio.md +76 -10
- package/docs/widget/Rating.md +70 -6
- package/docs/widget/Row.md +68 -3
- package/docs/widget/Skeleton.md +68 -3
- package/docs/widget/Slider.md +75 -9
- package/docs/widget/SnackBar.md +2 -2
- package/docs/widget/Stack.md +68 -3
- package/docs/widget/Stepper.md +68 -3
- package/docs/widget/Switch.md +74 -8
- package/docs/widget/Text.md +71 -4
- package/docs/widget/ThemePicker.md +197 -0
- package/docs/widget/Tooltip.md +72 -7
- package/docs/widget/TreeView.md +70 -10
- package/docs/widget/Video.md +71 -10
- package/package.json +10 -3
- package/skills/fletbox-design/SKILL.md +89 -5
- package/skills/fletbox-motion/SKILL.md +1 -1
- package/skills/fletbox-rules/SKILL.md +56 -4
- package/src/core/runApp.js +12 -0
- package/src/index.d.ts +374 -101
- package/src/index.js +9 -0
- package/src/navigations/AdaptiveScaffold.js +2 -2
- package/src/navigations/BottomNavigation.js +1 -1
- package/src/navigations/Scaffold.js +18 -6
- package/src/tools/useState.js +11 -4
- package/src/utils/colors.js +275 -0
- package/src/utils/errorBoundary.js +288 -0
- package/src/utils/index.js +10 -2
- package/src/utils/stackPosition.js +39 -24
- package/src/utils/syntaxHighlight.js +4 -1
- package/src/utils/themes.js +279 -3
- package/src/widget-factory/addChildren.js +17 -10
- package/src/widget-factory/assignProps.js +18 -6
- package/src/widget-factory/createWidget.js +7 -0
- package/src/widget-factory/deprecations.js +77 -0
- package/src/widget-factory/translateProps.js +11 -1
- package/src/widget-factory/warnings.js +1 -27
- package/src/widget-factory/widgetFactory.js +59 -17
- package/src/widgets/Accordion.js +21 -7
- package/src/widgets/Badge.js +11 -2
- package/src/widgets/Button.js +15 -3
- package/src/widgets/Carousel.js +12 -4
- package/src/widgets/Chart.js +7 -2
- package/src/widgets/Checkbox.js +1 -2
- package/src/widgets/Chip.js +24 -10
- package/src/widgets/CircularBar.js +9 -3
- package/src/widgets/CircularChart.js +5 -3
- package/src/widgets/Container.js +6 -0
- package/src/widgets/Divider.js +3 -1
- package/src/widgets/DraggBox.js +9 -0
- package/src/widgets/Dropdown.js +3 -3
- package/src/widgets/DroppBox.js +5 -0
- package/src/widgets/FloatingActionButton.js +1 -1
- package/src/widgets/Icon.js +5 -1
- package/src/widgets/InstallButton.js +4 -2
- package/src/widgets/Markdown.js +171 -103
- package/src/widgets/Menu.js +340 -0
- package/src/widgets/Modal.js +7 -1
- package/src/widgets/Pagination.js +10 -5
- package/src/widgets/ProgressBar.js +5 -4
- package/src/widgets/QRCode.js +4 -0
- package/src/widgets/Radio.js +1 -2
- package/src/widgets/Rating.js +9 -0
- package/src/widgets/Slider.js +4 -1
- package/src/widgets/SnackBar.js +2 -2
- package/src/widgets/Switch.js +1 -2
- package/src/widgets/Text.js +9 -5
- package/src/widgets/ThemePicker.js +234 -0
- package/src/widgets/TreeView.js +2 -1
- package/src/widgets/index.js +2 -0
- package/docs/CONTRIBUTING.md +0 -156
package/docs/widget/Column.md
CHANGED
|
@@ -30,7 +30,7 @@ const column = Column({
|
|
|
30
30
|
| `justifyContent` | `ContainerProps['justifyContent']` | Aligns children along the main axis (CSS `justify-content`). |
|
|
31
31
|
| `alignItems` | `ContainerProps['alignItems']` | Aligns children across the cross axis (CSS `align-items`). |
|
|
32
32
|
| `children` | `Widget[]` | An array of child widgets. Alias: `child` for a single child. |
|
|
33
|
-
| `onPress` | `(
|
|
33
|
+
| `onPress` | `(event?: Event) => void` | Callback fired when the widget is pressed. Alias: `onClick`. |
|
|
34
34
|
|
|
35
35
|
### Common props
|
|
36
36
|
|
|
@@ -38,11 +38,64 @@ Every widget also accepts these shared props — see [common props](COMMON_PROPS
|
|
|
38
38
|
|
|
39
39
|
| Prop | Type | Description |
|
|
40
40
|
| --- | --- | --- |
|
|
41
|
+
| `full` | `boolean` | Stretches the widget to fill its parent on both axes in stack mode. |
|
|
42
|
+
| `fullHeight` | `boolean` | Stretches the widget to the full height of its parent in stack mode. |
|
|
43
|
+
| `fullWidth` | `boolean` | Stretches the widget to the full width of its parent. |
|
|
44
|
+
| `center` | `boolean` | Centres the widget on both axes in stack mode. |
|
|
45
|
+
| `centerY` | `boolean` | Centres the widget vertically in stack mode. |
|
|
46
|
+
| `centerX` | `boolean` | Centres the widget horizontally in stack mode. |
|
|
47
|
+
| `zIndex` | `number` | Stacking order: a widget with a higher value paints above lower ones. |
|
|
48
|
+
| `z` | `number` | Alias of `zIndex`. |
|
|
49
|
+
| `end` | `Size` | Logical alias of `right`, used by the stack placement shorthands. |
|
|
50
|
+
| `start` | `Size` | Logical alias of `left`, used by the stack placement shorthands. |
|
|
51
|
+
| `inset` | `Size` | Shorthand for the four edge offsets (`top`/`right`/`bottom`/`left`). |
|
|
52
|
+
| `left` | `Size` | Offset from the left edge. A number is pixels; a string uses any CSS unit. |
|
|
53
|
+
| `bottom` | `Size` | Offset from the bottom edge. A number is pixels; a string uses any CSS unit. |
|
|
54
|
+
| `right` | `Size` | Offset from the right edge. A number is pixels; a string uses any CSS unit. |
|
|
55
|
+
| `top` | `Size` | Offset from the top edge. A number is pixels; a string uses any CSS unit. |
|
|
56
|
+
| `pos` | `'static' \| 'relative' \| 'absolute' \| 'fixed' \| 'sticky' \| 'stack'` | Alias of `position`. |
|
|
57
|
+
| `position` | `'static' \| 'relative' \| 'absolute' \| 'fixed' \| 'sticky' \| 'stack'` | CSS `position` value, or `stack` for centered stacking. |
|
|
41
58
|
| `width` | `Size` | Width of the widget. A number is pixels; a string uses any CSS unit. |
|
|
42
59
|
| `height` | `Size` | Height of the widget. A number is pixels; a string uses any CSS unit. |
|
|
43
60
|
| `size` | `Size` | Overall size preset or pixel value, depending on the widget. |
|
|
61
|
+
| `flex` | `number` | Flex grow/shrink/basis shorthand for a flex child. |
|
|
62
|
+
| `minWidth` | `Size` | Minimum width the widget may shrink to. |
|
|
63
|
+
| `maxWidth` | `Size` | Maximum width the widget may grow to. |
|
|
64
|
+
| `minHeight` | `Size` | Minimum height the widget may shrink to. |
|
|
65
|
+
| `maxHeight` | `Size` | Maximum height the widget may grow to. |
|
|
66
|
+
| `border` | `string` | CSS `border` shorthand for all four edges: width, style and color in one string. |
|
|
67
|
+
| `borderTop` | `string` | The top edge of the border alone, for a widget whose rim differs per side. |
|
|
68
|
+
| `borderBottom` | `string` | The bottom edge of the border alone, for a widget whose rim differs per side. |
|
|
69
|
+
| `borderLeft` | `string` | The left edge of the border alone, for a widget whose rim differs per side. |
|
|
70
|
+
| `borderRight` | `string` | The right edge of the border alone, for a widget whose rim differs per side. |
|
|
71
|
+
| `cursor` | `string` | CSS `cursor` value: what the pointer becomes over the widget (`pointer`, `grab`, `not-allowed`). |
|
|
72
|
+
| `display` | `string` | CSS `display` value for the container. |
|
|
73
|
+
| `boxSizing` | `'border-box' \| 'content-box'` | Which box `width` and `height` measure: `border-box` keeps the size you asked for and pushes padding inward. |
|
|
74
|
+
| `flexDirection` | `'row' \| 'column' \| 'row-reverse' \| 'column-reverse'` | Main axis of a flex container: `row` places children side by side, `column` stacks them. |
|
|
75
|
+
| `flexGrow` | `number` | Share of the leftover space this child takes, relative to its siblings. |
|
|
76
|
+
| `flexShrink` | `number` | How readily the child gives space back when the row overflows; `0` keeps its size. |
|
|
77
|
+
| `gap` | `number \| string` | Space between children along the layout axis. |
|
|
78
|
+
| `fontSize` | `number` | Size of the font. |
|
|
79
|
+
| `borderColor` | `Color` | Color used for the border. |
|
|
80
|
+
| `borderWidth` | `number` | Width of the border. |
|
|
44
81
|
| `padding` | `Padding` | Space inside the widget, between its content and its border. |
|
|
82
|
+
| `paddingTop` | `Size` | Space inside the widget, on the top edge only. |
|
|
83
|
+
| `paddingRight` | `Size` | Space inside the widget, on the right edge only. |
|
|
84
|
+
| `paddingBottom` | `Size` | Space inside the widget, on the bottom edge only. |
|
|
85
|
+
| `paddingLeft` | `Size` | Space inside the widget, on the left edge only. |
|
|
86
|
+
| `pt` | `Size` | Alias of `paddingTop`. |
|
|
87
|
+
| `pr` | `Size` | Alias of `paddingRight`. |
|
|
88
|
+
| `pb` | `Size` | Alias of `paddingBottom`. |
|
|
89
|
+
| `pl` | `Size` | Alias of `paddingLeft`. |
|
|
45
90
|
| `margin` | `Margin` | Space outside the widget, between it and its neighbors. |
|
|
91
|
+
| `marginTop` | `Size` | Space outside the widget, on the top edge only. |
|
|
92
|
+
| `marginRight` | `Size` | Space outside the widget, on the right edge only. |
|
|
93
|
+
| `marginBottom` | `Size` | Space outside the widget, on the bottom edge only. |
|
|
94
|
+
| `marginLeft` | `Size` | Space outside the widget, on the left edge only. |
|
|
95
|
+
| `mt` | `Size` | Alias of `marginTop`. |
|
|
96
|
+
| `mr` | `Size` | Alias of `marginRight`. |
|
|
97
|
+
| `mb` | `Size` | Alias of `marginBottom`. |
|
|
98
|
+
| `ml` | `Size` | Alias of `marginLeft`. |
|
|
46
99
|
| `bgColor` | `Color` | Background color. Alias: `backgroundColor`. |
|
|
47
100
|
| `backgroundColor` | `Color` | Background color. Alias of `bgColor`. |
|
|
48
101
|
| `color` | `Color` | Foreground color, usually the text or icon color. |
|
|
@@ -52,11 +105,23 @@ Every widget also accepts these shared props — see [common props](COMMON_PROPS
|
|
|
52
105
|
| `filter` | `string` | Raw CSS `filter` value applied to the widget itself, e.g. `blur(4px)`. |
|
|
53
106
|
| `backdropFilter` | `string` | Raw CSS `backdrop-filter` value: what sits behind the widget is blurred through it, which is what makes a translucent card frosted glass. |
|
|
54
107
|
| `maskImage` | `string` | Raw CSS `mask-image` value, used to fade a widget out at its edges instead of cutting it. |
|
|
108
|
+
| `bgImage` | `string` | Image painted behind the widget's content (CSS `background-image`), placed with `bgSize` and `bgPosition`. |
|
|
109
|
+
| `bgSize` | `string` | How the background image fills its box (`cover`, `contain`, or a length). |
|
|
110
|
+
| `bgPosition` | `string` | Where the background image is anchored (`center`, `top`, `50% 20%`). |
|
|
111
|
+
| `bgRepeat` | `string` | Whether the background image tiles; `no-repeat` for a single cover. |
|
|
55
112
|
| `opacity` | `number` | Opacity from 0 (invisible) to 1 (fully opaque). |
|
|
56
113
|
| `visible` | `boolean` | Whether the widget is rendered and visible. |
|
|
57
114
|
| `disabled` | `boolean` | Disables interaction and shows the non-interactive state. |
|
|
58
|
-
| `onPress` | `(
|
|
59
|
-
| `onClick` | `(
|
|
115
|
+
| `onPress` | `(event?: Event) => void` | Callback fired when the widget is pressed. Alias: `onClick`. |
|
|
116
|
+
| `onClick` | `(event?: Event) => void` | Callback fired when the widget is clicked. Alias: `onPress`. |
|
|
117
|
+
| `onclick` | `(event?: Event) => void` | Lowercase alias of `onClick`, kept because the shipped templates and the HTML habit write it. |
|
|
118
|
+
| `alignSelf` | `AlignSelf` | Overrides the parent's `alignItems` for this child alone (CSS `align-self`). Alias: `selfAlign`. |
|
|
119
|
+
| `selfAlign` | `AlignSelf` | Alias of `alignSelf`. |
|
|
120
|
+
| `overflow` | `'auto' \| 'hidden' \| 'visible' \| 'scroll' \| 'clip'` | How overflowing content is handled (`hidden`, `auto`, `scroll`). |
|
|
121
|
+
| `overflowX` | `'auto' \| 'hidden' \| 'visible' \| 'scroll' \| 'clip'` | The `overflowX` value for the widget. |
|
|
122
|
+
| `overflowY` | `'auto' \| 'hidden' \| 'visible' \| 'scroll' \| 'clip'` | The `overflowY` value for the widget. |
|
|
123
|
+
| `textOverflow` | `'clip' \| 'ellipsis' \| string` | The `textOverflow` value for the widget. |
|
|
124
|
+
| `whiteSpace` | `'normal' \| 'nowrap' \| 'pre' \| 'pre-wrap' \| 'pre-line' \| string` | The `whiteSpace` value for the widget. |
|
|
60
125
|
| `id` | `string` | DOM `id` for the rendered element. |
|
|
61
126
|
| `className` | `string` | CSS class names applied to the rendered element. |
|
|
62
127
|
| `ref` | `(widget: Widget) => void` | Callback that receives the underlying DOM node. |
|
package/docs/widget/Container.md
CHANGED
|
@@ -27,7 +27,7 @@ const panel = Container({
|
|
|
27
27
|
| `direction` | `'row' \| 'column'` | Main-axis direction for layout widgets (`row` or `column`). |
|
|
28
28
|
| `gap` | `number \| string` | Space between children along the layout axis. |
|
|
29
29
|
| `justifyContent` | `'flex-start' \| 'center' \| 'flex-end' \| 'space-between' \| 'space-around' \| 'space-evenly'` | Aligns children along the main axis (CSS `justify-content`). |
|
|
30
|
-
| `alignItems` | `'flex-start' \| 'center' \| 'flex-end' \| 'stretch'` | Aligns children across the cross axis (CSS `align-items`). |
|
|
30
|
+
| `alignItems` | `'flex-start' \| 'center' \| 'flex-end' \| 'start' \| 'end' \| 'baseline' \| 'stretch'` | Aligns children across the cross axis (CSS `align-items`). |
|
|
31
31
|
| `wrap` | `boolean \| 'wrap' \| 'nowrap' \| 'wrap-reverse'` | Lets children wrap onto multiple lines. |
|
|
32
32
|
| `child` | `Widget` | A single child widget. Alias: `children` for a list. |
|
|
33
33
|
| `children` | `Widget[]` | An array of child widgets. Alias: `child` for a single child. |
|
|
@@ -45,11 +45,64 @@ Every widget also accepts these shared props — see [common props](COMMON_PROPS
|
|
|
45
45
|
|
|
46
46
|
| Prop | Type | Description |
|
|
47
47
|
| --- | --- | --- |
|
|
48
|
+
| `full` | `boolean` | Stretches the widget to fill its parent on both axes in stack mode. |
|
|
49
|
+
| `fullHeight` | `boolean` | Stretches the widget to the full height of its parent in stack mode. |
|
|
50
|
+
| `fullWidth` | `boolean` | Stretches the widget to the full width of its parent. |
|
|
51
|
+
| `center` | `boolean` | Centres the widget on both axes in stack mode. |
|
|
52
|
+
| `centerY` | `boolean` | Centres the widget vertically in stack mode. |
|
|
53
|
+
| `centerX` | `boolean` | Centres the widget horizontally in stack mode. |
|
|
54
|
+
| `zIndex` | `number` | Stacking order: a widget with a higher value paints above lower ones. |
|
|
55
|
+
| `z` | `number` | Alias of `zIndex`. |
|
|
56
|
+
| `end` | `Size` | Logical alias of `right`, used by the stack placement shorthands. |
|
|
57
|
+
| `start` | `Size` | Logical alias of `left`, used by the stack placement shorthands. |
|
|
58
|
+
| `inset` | `Size` | Shorthand for the four edge offsets (`top`/`right`/`bottom`/`left`). |
|
|
59
|
+
| `left` | `Size` | Offset from the left edge. A number is pixels; a string uses any CSS unit. |
|
|
60
|
+
| `bottom` | `Size` | Offset from the bottom edge. A number is pixels; a string uses any CSS unit. |
|
|
61
|
+
| `right` | `Size` | Offset from the right edge. A number is pixels; a string uses any CSS unit. |
|
|
62
|
+
| `top` | `Size` | Offset from the top edge. A number is pixels; a string uses any CSS unit. |
|
|
63
|
+
| `pos` | `'static' \| 'relative' \| 'absolute' \| 'fixed' \| 'sticky' \| 'stack'` | Alias of `position`. |
|
|
64
|
+
| `position` | `'static' \| 'relative' \| 'absolute' \| 'fixed' \| 'sticky' \| 'stack'` | CSS `position` value, or `stack` for centered stacking. |
|
|
48
65
|
| `width` | `Size` | Width of the widget. A number is pixels; a string uses any CSS unit. |
|
|
49
66
|
| `height` | `Size` | Height of the widget. A number is pixels; a string uses any CSS unit. |
|
|
50
67
|
| `size` | `Size` | Overall size preset or pixel value, depending on the widget. |
|
|
68
|
+
| `flex` | `number` | Flex grow/shrink/basis shorthand for a flex child. |
|
|
69
|
+
| `minWidth` | `Size` | Minimum width the widget may shrink to. |
|
|
70
|
+
| `maxWidth` | `Size` | Maximum width the widget may grow to. |
|
|
71
|
+
| `minHeight` | `Size` | Minimum height the widget may shrink to. |
|
|
72
|
+
| `maxHeight` | `Size` | Maximum height the widget may grow to. |
|
|
73
|
+
| `border` | `string` | CSS `border` shorthand for all four edges: width, style and color in one string. |
|
|
74
|
+
| `borderTop` | `string` | The top edge of the border alone, for a widget whose rim differs per side. |
|
|
75
|
+
| `borderBottom` | `string` | The bottom edge of the border alone, for a widget whose rim differs per side. |
|
|
76
|
+
| `borderLeft` | `string` | The left edge of the border alone, for a widget whose rim differs per side. |
|
|
77
|
+
| `borderRight` | `string` | The right edge of the border alone, for a widget whose rim differs per side. |
|
|
78
|
+
| `cursor` | `string` | CSS `cursor` value: what the pointer becomes over the widget (`pointer`, `grab`, `not-allowed`). |
|
|
79
|
+
| `display` | `string` | CSS `display` value for the container. |
|
|
80
|
+
| `boxSizing` | `'border-box' \| 'content-box'` | Which box `width` and `height` measure: `border-box` keeps the size you asked for and pushes padding inward. |
|
|
81
|
+
| `flexDirection` | `'row' \| 'column' \| 'row-reverse' \| 'column-reverse'` | Main axis of a flex container: `row` places children side by side, `column` stacks them. |
|
|
82
|
+
| `flexGrow` | `number` | Share of the leftover space this child takes, relative to its siblings. |
|
|
83
|
+
| `flexShrink` | `number` | How readily the child gives space back when the row overflows; `0` keeps its size. |
|
|
84
|
+
| `gap` | `number \| string` | Space between children along the layout axis. |
|
|
85
|
+
| `fontSize` | `number` | Size of the font. |
|
|
86
|
+
| `borderColor` | `Color` | Color used for the border. |
|
|
87
|
+
| `borderWidth` | `number` | Width of the border. |
|
|
51
88
|
| `padding` | `Padding` | Space inside the widget, between its content and its border. |
|
|
89
|
+
| `paddingTop` | `Size` | Space inside the widget, on the top edge only. |
|
|
90
|
+
| `paddingRight` | `Size` | Space inside the widget, on the right edge only. |
|
|
91
|
+
| `paddingBottom` | `Size` | Space inside the widget, on the bottom edge only. |
|
|
92
|
+
| `paddingLeft` | `Size` | Space inside the widget, on the left edge only. |
|
|
93
|
+
| `pt` | `Size` | Alias of `paddingTop`. |
|
|
94
|
+
| `pr` | `Size` | Alias of `paddingRight`. |
|
|
95
|
+
| `pb` | `Size` | Alias of `paddingBottom`. |
|
|
96
|
+
| `pl` | `Size` | Alias of `paddingLeft`. |
|
|
52
97
|
| `margin` | `Margin` | Space outside the widget, between it and its neighbors. |
|
|
98
|
+
| `marginTop` | `Size` | Space outside the widget, on the top edge only. |
|
|
99
|
+
| `marginRight` | `Size` | Space outside the widget, on the right edge only. |
|
|
100
|
+
| `marginBottom` | `Size` | Space outside the widget, on the bottom edge only. |
|
|
101
|
+
| `marginLeft` | `Size` | Space outside the widget, on the left edge only. |
|
|
102
|
+
| `mt` | `Size` | Alias of `marginTop`. |
|
|
103
|
+
| `mr` | `Size` | Alias of `marginRight`. |
|
|
104
|
+
| `mb` | `Size` | Alias of `marginBottom`. |
|
|
105
|
+
| `ml` | `Size` | Alias of `marginLeft`. |
|
|
53
106
|
| `bgColor` | `Color` | Background color. Alias: `backgroundColor`. |
|
|
54
107
|
| `backgroundColor` | `Color` | Background color. Alias of `bgColor`. |
|
|
55
108
|
| `color` | `Color` | Foreground color, usually the text or icon color. |
|
|
@@ -59,11 +112,23 @@ Every widget also accepts these shared props — see [common props](COMMON_PROPS
|
|
|
59
112
|
| `filter` | `string` | Raw CSS `filter` value applied to the widget itself, e.g. `blur(4px)`. |
|
|
60
113
|
| `backdropFilter` | `string` | Raw CSS `backdrop-filter` value: what sits behind the widget is blurred through it, which is what makes a translucent card frosted glass. |
|
|
61
114
|
| `maskImage` | `string` | Raw CSS `mask-image` value, used to fade a widget out at its edges instead of cutting it. |
|
|
115
|
+
| `bgImage` | `string` | Image painted behind the widget's content (CSS `background-image`), placed with `bgSize` and `bgPosition`. |
|
|
116
|
+
| `bgSize` | `string` | How the background image fills its box (`cover`, `contain`, or a length). |
|
|
117
|
+
| `bgPosition` | `string` | Where the background image is anchored (`center`, `top`, `50% 20%`). |
|
|
118
|
+
| `bgRepeat` | `string` | Whether the background image tiles; `no-repeat` for a single cover. |
|
|
62
119
|
| `opacity` | `number` | Opacity from 0 (invisible) to 1 (fully opaque). |
|
|
63
120
|
| `visible` | `boolean` | Whether the widget is rendered and visible. |
|
|
64
121
|
| `disabled` | `boolean` | Disables interaction and shows the non-interactive state. |
|
|
65
|
-
| `onPress` | `(
|
|
66
|
-
| `onClick` | `(
|
|
122
|
+
| `onPress` | `(event?: Event) => void` | Callback fired when the widget is pressed. Alias: `onClick`. |
|
|
123
|
+
| `onClick` | `(event?: Event) => void` | Callback fired when the widget is clicked. Alias: `onPress`. |
|
|
124
|
+
| `onclick` | `(event?: Event) => void` | Lowercase alias of `onClick`, kept because the shipped templates and the HTML habit write it. |
|
|
125
|
+
| `alignSelf` | `AlignSelf` | Overrides the parent's `alignItems` for this child alone (CSS `align-self`). Alias: `selfAlign`. |
|
|
126
|
+
| `selfAlign` | `AlignSelf` | Alias of `alignSelf`. |
|
|
127
|
+
| `overflow` | `'auto' \| 'hidden' \| 'visible' \| 'scroll' \| 'clip'` | How overflowing content is handled (`hidden`, `auto`, `scroll`). |
|
|
128
|
+
| `overflowX` | `'auto' \| 'hidden' \| 'visible' \| 'scroll' \| 'clip'` | The `overflowX` value for the widget. |
|
|
129
|
+
| `overflowY` | `'auto' \| 'hidden' \| 'visible' \| 'scroll' \| 'clip'` | The `overflowY` value for the widget. |
|
|
130
|
+
| `textOverflow` | `'clip' \| 'ellipsis' \| string` | The `textOverflow` value for the widget. |
|
|
131
|
+
| `whiteSpace` | `'normal' \| 'nowrap' \| 'pre' \| 'pre-wrap' \| 'pre-line' \| string` | The `whiteSpace` value for the widget. |
|
|
67
132
|
| `id` | `string` | DOM `id` for the rendered element. |
|
|
68
133
|
| `className` | `string` | CSS class names applied to the rendered element. |
|
|
69
134
|
| `ref` | `(widget: Widget) => void` | Callback that receives the underlying DOM node. |
|
package/docs/widget/DataTable.md
CHANGED
|
@@ -49,11 +49,64 @@ Every widget also accepts these shared props — see [common props](COMMON_PROPS
|
|
|
49
49
|
|
|
50
50
|
| Prop | Type | Description |
|
|
51
51
|
| --- | --- | --- |
|
|
52
|
+
| `full` | `boolean` | Stretches the widget to fill its parent on both axes in stack mode. |
|
|
53
|
+
| `fullHeight` | `boolean` | Stretches the widget to the full height of its parent in stack mode. |
|
|
54
|
+
| `fullWidth` | `boolean` | Stretches the widget to the full width of its parent. |
|
|
55
|
+
| `center` | `boolean` | Centres the widget on both axes in stack mode. |
|
|
56
|
+
| `centerY` | `boolean` | Centres the widget vertically in stack mode. |
|
|
57
|
+
| `centerX` | `boolean` | Centres the widget horizontally in stack mode. |
|
|
58
|
+
| `zIndex` | `number` | Stacking order: a widget with a higher value paints above lower ones. |
|
|
59
|
+
| `z` | `number` | Alias of `zIndex`. |
|
|
60
|
+
| `end` | `Size` | Logical alias of `right`, used by the stack placement shorthands. |
|
|
61
|
+
| `start` | `Size` | Logical alias of `left`, used by the stack placement shorthands. |
|
|
62
|
+
| `inset` | `Size` | Shorthand for the four edge offsets (`top`/`right`/`bottom`/`left`). |
|
|
63
|
+
| `left` | `Size` | Offset from the left edge. A number is pixels; a string uses any CSS unit. |
|
|
64
|
+
| `bottom` | `Size` | Offset from the bottom edge. A number is pixels; a string uses any CSS unit. |
|
|
65
|
+
| `right` | `Size` | Offset from the right edge. A number is pixels; a string uses any CSS unit. |
|
|
66
|
+
| `top` | `Size` | Offset from the top edge. A number is pixels; a string uses any CSS unit. |
|
|
67
|
+
| `pos` | `'static' \| 'relative' \| 'absolute' \| 'fixed' \| 'sticky' \| 'stack'` | Alias of `position`. |
|
|
68
|
+
| `position` | `'static' \| 'relative' \| 'absolute' \| 'fixed' \| 'sticky' \| 'stack'` | CSS `position` value, or `stack` for centered stacking. |
|
|
52
69
|
| `width` | `Size` | Width of the widget. A number is pixels; a string uses any CSS unit. |
|
|
53
70
|
| `height` | `Size` | Height of the widget. A number is pixels; a string uses any CSS unit. |
|
|
54
71
|
| `size` | `Size` | Overall size preset or pixel value, depending on the widget. |
|
|
72
|
+
| `flex` | `number` | Flex grow/shrink/basis shorthand for a flex child. |
|
|
73
|
+
| `minWidth` | `Size` | Minimum width the widget may shrink to. |
|
|
74
|
+
| `maxWidth` | `Size` | Maximum width the widget may grow to. |
|
|
75
|
+
| `minHeight` | `Size` | Minimum height the widget may shrink to. |
|
|
76
|
+
| `maxHeight` | `Size` | Maximum height the widget may grow to. |
|
|
77
|
+
| `border` | `string` | CSS `border` shorthand for all four edges: width, style and color in one string. |
|
|
78
|
+
| `borderTop` | `string` | The top edge of the border alone, for a widget whose rim differs per side. |
|
|
79
|
+
| `borderBottom` | `string` | The bottom edge of the border alone, for a widget whose rim differs per side. |
|
|
80
|
+
| `borderLeft` | `string` | The left edge of the border alone, for a widget whose rim differs per side. |
|
|
81
|
+
| `borderRight` | `string` | The right edge of the border alone, for a widget whose rim differs per side. |
|
|
82
|
+
| `cursor` | `string` | CSS `cursor` value: what the pointer becomes over the widget (`pointer`, `grab`, `not-allowed`). |
|
|
83
|
+
| `display` | `string` | CSS `display` value for the container. |
|
|
84
|
+
| `boxSizing` | `'border-box' \| 'content-box'` | Which box `width` and `height` measure: `border-box` keeps the size you asked for and pushes padding inward. |
|
|
85
|
+
| `flexDirection` | `'row' \| 'column' \| 'row-reverse' \| 'column-reverse'` | Main axis of a flex container: `row` places children side by side, `column` stacks them. |
|
|
86
|
+
| `flexGrow` | `number` | Share of the leftover space this child takes, relative to its siblings. |
|
|
87
|
+
| `flexShrink` | `number` | How readily the child gives space back when the row overflows; `0` keeps its size. |
|
|
88
|
+
| `gap` | `number \| string` | Space between children along the layout axis. |
|
|
89
|
+
| `fontSize` | `number` | Size of the font. |
|
|
90
|
+
| `borderColor` | `Color` | Color used for the border. |
|
|
91
|
+
| `borderWidth` | `number` | Width of the border. |
|
|
55
92
|
| `padding` | `Padding` | Space inside the widget, between its content and its border. |
|
|
93
|
+
| `paddingTop` | `Size` | Space inside the widget, on the top edge only. |
|
|
94
|
+
| `paddingRight` | `Size` | Space inside the widget, on the right edge only. |
|
|
95
|
+
| `paddingBottom` | `Size` | Space inside the widget, on the bottom edge only. |
|
|
96
|
+
| `paddingLeft` | `Size` | Space inside the widget, on the left edge only. |
|
|
97
|
+
| `pt` | `Size` | Alias of `paddingTop`. |
|
|
98
|
+
| `pr` | `Size` | Alias of `paddingRight`. |
|
|
99
|
+
| `pb` | `Size` | Alias of `paddingBottom`. |
|
|
100
|
+
| `pl` | `Size` | Alias of `paddingLeft`. |
|
|
56
101
|
| `margin` | `Margin` | Space outside the widget, between it and its neighbors. |
|
|
102
|
+
| `marginTop` | `Size` | Space outside the widget, on the top edge only. |
|
|
103
|
+
| `marginRight` | `Size` | Space outside the widget, on the right edge only. |
|
|
104
|
+
| `marginBottom` | `Size` | Space outside the widget, on the bottom edge only. |
|
|
105
|
+
| `marginLeft` | `Size` | Space outside the widget, on the left edge only. |
|
|
106
|
+
| `mt` | `Size` | Alias of `marginTop`. |
|
|
107
|
+
| `mr` | `Size` | Alias of `marginRight`. |
|
|
108
|
+
| `mb` | `Size` | Alias of `marginBottom`. |
|
|
109
|
+
| `ml` | `Size` | Alias of `marginLeft`. |
|
|
57
110
|
| `bgColor` | `Color` | Background color. Alias: `backgroundColor`. |
|
|
58
111
|
| `backgroundColor` | `Color` | Background color. Alias of `bgColor`. |
|
|
59
112
|
| `color` | `Color` | Foreground color, usually the text or icon color. |
|
|
@@ -63,11 +116,23 @@ Every widget also accepts these shared props — see [common props](COMMON_PROPS
|
|
|
63
116
|
| `filter` | `string` | Raw CSS `filter` value applied to the widget itself, e.g. `blur(4px)`. |
|
|
64
117
|
| `backdropFilter` | `string` | Raw CSS `backdrop-filter` value: what sits behind the widget is blurred through it, which is what makes a translucent card frosted glass. |
|
|
65
118
|
| `maskImage` | `string` | Raw CSS `mask-image` value, used to fade a widget out at its edges instead of cutting it. |
|
|
119
|
+
| `bgImage` | `string` | Image painted behind the widget's content (CSS `background-image`), placed with `bgSize` and `bgPosition`. |
|
|
120
|
+
| `bgSize` | `string` | How the background image fills its box (`cover`, `contain`, or a length). |
|
|
121
|
+
| `bgPosition` | `string` | Where the background image is anchored (`center`, `top`, `50% 20%`). |
|
|
122
|
+
| `bgRepeat` | `string` | Whether the background image tiles; `no-repeat` for a single cover. |
|
|
66
123
|
| `opacity` | `number` | Opacity from 0 (invisible) to 1 (fully opaque). |
|
|
67
124
|
| `visible` | `boolean` | Whether the widget is rendered and visible. |
|
|
68
125
|
| `disabled` | `boolean` | Disables interaction and shows the non-interactive state. |
|
|
69
|
-
| `onPress` | `(
|
|
70
|
-
| `onClick` | `(
|
|
126
|
+
| `onPress` | `(event?: Event) => void` | Callback fired when the widget is pressed. Alias: `onClick`. |
|
|
127
|
+
| `onClick` | `(event?: Event) => void` | Callback fired when the widget is clicked. Alias: `onPress`. |
|
|
128
|
+
| `onclick` | `(event?: Event) => void` | Lowercase alias of `onClick`, kept because the shipped templates and the HTML habit write it. |
|
|
129
|
+
| `alignSelf` | `AlignSelf` | Overrides the parent's `alignItems` for this child alone (CSS `align-self`). Alias: `selfAlign`. |
|
|
130
|
+
| `selfAlign` | `AlignSelf` | Alias of `alignSelf`. |
|
|
131
|
+
| `overflow` | `'auto' \| 'hidden' \| 'visible' \| 'scroll' \| 'clip'` | How overflowing content is handled (`hidden`, `auto`, `scroll`). |
|
|
132
|
+
| `overflowX` | `'auto' \| 'hidden' \| 'visible' \| 'scroll' \| 'clip'` | The `overflowX` value for the widget. |
|
|
133
|
+
| `overflowY` | `'auto' \| 'hidden' \| 'visible' \| 'scroll' \| 'clip'` | The `overflowY` value for the widget. |
|
|
134
|
+
| `textOverflow` | `'clip' \| 'ellipsis' \| string` | The `textOverflow` value for the widget. |
|
|
135
|
+
| `whiteSpace` | `'normal' \| 'nowrap' \| 'pre' \| 'pre-wrap' \| 'pre-line' \| string` | The `whiteSpace` value for the widget. |
|
|
71
136
|
| `id` | `string` | DOM `id` for the rendered element. |
|
|
72
137
|
| `className` | `string` | CSS class names applied to the rendered element. |
|
|
73
138
|
| `ref` | `(widget: Widget) => void` | Callback that receives the underlying DOM node. |
|
package/docs/widget/Divider.md
CHANGED
|
@@ -31,11 +31,64 @@ Every widget also accepts these shared props — see [common props](COMMON_PROPS
|
|
|
31
31
|
|
|
32
32
|
| Prop | Type | Description |
|
|
33
33
|
| --- | --- | --- |
|
|
34
|
+
| `full` | `boolean` | Stretches the widget to fill its parent on both axes in stack mode. |
|
|
35
|
+
| `fullHeight` | `boolean` | Stretches the widget to the full height of its parent in stack mode. |
|
|
36
|
+
| `fullWidth` | `boolean` | Stretches the widget to the full width of its parent. |
|
|
37
|
+
| `center` | `boolean` | Centres the widget on both axes in stack mode. |
|
|
38
|
+
| `centerY` | `boolean` | Centres the widget vertically in stack mode. |
|
|
39
|
+
| `centerX` | `boolean` | Centres the widget horizontally in stack mode. |
|
|
40
|
+
| `zIndex` | `number` | Stacking order: a widget with a higher value paints above lower ones. |
|
|
41
|
+
| `z` | `number` | Alias of `zIndex`. |
|
|
42
|
+
| `end` | `Size` | Logical alias of `right`, used by the stack placement shorthands. |
|
|
43
|
+
| `start` | `Size` | Logical alias of `left`, used by the stack placement shorthands. |
|
|
44
|
+
| `inset` | `Size` | Shorthand for the four edge offsets (`top`/`right`/`bottom`/`left`). |
|
|
45
|
+
| `left` | `Size` | Offset from the left edge. A number is pixels; a string uses any CSS unit. |
|
|
46
|
+
| `bottom` | `Size` | Offset from the bottom edge. A number is pixels; a string uses any CSS unit. |
|
|
47
|
+
| `right` | `Size` | Offset from the right edge. A number is pixels; a string uses any CSS unit. |
|
|
48
|
+
| `top` | `Size` | Offset from the top edge. A number is pixels; a string uses any CSS unit. |
|
|
49
|
+
| `pos` | `'static' \| 'relative' \| 'absolute' \| 'fixed' \| 'sticky' \| 'stack'` | Alias of `position`. |
|
|
50
|
+
| `position` | `'static' \| 'relative' \| 'absolute' \| 'fixed' \| 'sticky' \| 'stack'` | CSS `position` value, or `stack` for centered stacking. |
|
|
34
51
|
| `width` | `Size` | Width of the widget. A number is pixels; a string uses any CSS unit. |
|
|
35
52
|
| `height` | `Size` | Height of the widget. A number is pixels; a string uses any CSS unit. |
|
|
36
53
|
| `size` | `Size` | Overall size preset or pixel value, depending on the widget. |
|
|
54
|
+
| `flex` | `number` | Flex grow/shrink/basis shorthand for a flex child. |
|
|
55
|
+
| `minWidth` | `Size` | Minimum width the widget may shrink to. |
|
|
56
|
+
| `maxWidth` | `Size` | Maximum width the widget may grow to. |
|
|
57
|
+
| `minHeight` | `Size` | Minimum height the widget may shrink to. |
|
|
58
|
+
| `maxHeight` | `Size` | Maximum height the widget may grow to. |
|
|
59
|
+
| `border` | `string` | CSS `border` shorthand for all four edges: width, style and color in one string. |
|
|
60
|
+
| `borderTop` | `string` | The top edge of the border alone, for a widget whose rim differs per side. |
|
|
61
|
+
| `borderBottom` | `string` | The bottom edge of the border alone, for a widget whose rim differs per side. |
|
|
62
|
+
| `borderLeft` | `string` | The left edge of the border alone, for a widget whose rim differs per side. |
|
|
63
|
+
| `borderRight` | `string` | The right edge of the border alone, for a widget whose rim differs per side. |
|
|
64
|
+
| `cursor` | `string` | CSS `cursor` value: what the pointer becomes over the widget (`pointer`, `grab`, `not-allowed`). |
|
|
65
|
+
| `display` | `string` | CSS `display` value for the container. |
|
|
66
|
+
| `boxSizing` | `'border-box' \| 'content-box'` | Which box `width` and `height` measure: `border-box` keeps the size you asked for and pushes padding inward. |
|
|
67
|
+
| `flexDirection` | `'row' \| 'column' \| 'row-reverse' \| 'column-reverse'` | Main axis of a flex container: `row` places children side by side, `column` stacks them. |
|
|
68
|
+
| `flexGrow` | `number` | Share of the leftover space this child takes, relative to its siblings. |
|
|
69
|
+
| `flexShrink` | `number` | How readily the child gives space back when the row overflows; `0` keeps its size. |
|
|
70
|
+
| `gap` | `number \| string` | Space between children along the layout axis. |
|
|
71
|
+
| `fontSize` | `number` | Size of the font. |
|
|
72
|
+
| `borderColor` | `Color` | Color used for the border. |
|
|
73
|
+
| `borderWidth` | `number` | Width of the border. |
|
|
37
74
|
| `padding` | `Padding` | Space inside the widget, between its content and its border. |
|
|
75
|
+
| `paddingTop` | `Size` | Space inside the widget, on the top edge only. |
|
|
76
|
+
| `paddingRight` | `Size` | Space inside the widget, on the right edge only. |
|
|
77
|
+
| `paddingBottom` | `Size` | Space inside the widget, on the bottom edge only. |
|
|
78
|
+
| `paddingLeft` | `Size` | Space inside the widget, on the left edge only. |
|
|
79
|
+
| `pt` | `Size` | Alias of `paddingTop`. |
|
|
80
|
+
| `pr` | `Size` | Alias of `paddingRight`. |
|
|
81
|
+
| `pb` | `Size` | Alias of `paddingBottom`. |
|
|
82
|
+
| `pl` | `Size` | Alias of `paddingLeft`. |
|
|
38
83
|
| `margin` | `Margin` | Space outside the widget, between it and its neighbors. |
|
|
84
|
+
| `marginTop` | `Size` | Space outside the widget, on the top edge only. |
|
|
85
|
+
| `marginRight` | `Size` | Space outside the widget, on the right edge only. |
|
|
86
|
+
| `marginBottom` | `Size` | Space outside the widget, on the bottom edge only. |
|
|
87
|
+
| `marginLeft` | `Size` | Space outside the widget, on the left edge only. |
|
|
88
|
+
| `mt` | `Size` | Alias of `marginTop`. |
|
|
89
|
+
| `mr` | `Size` | Alias of `marginRight`. |
|
|
90
|
+
| `mb` | `Size` | Alias of `marginBottom`. |
|
|
91
|
+
| `ml` | `Size` | Alias of `marginLeft`. |
|
|
39
92
|
| `bgColor` | `Color` | Background color. Alias: `backgroundColor`. |
|
|
40
93
|
| `backgroundColor` | `Color` | Background color. Alias of `bgColor`. |
|
|
41
94
|
| `color` | `Color` | Foreground color, usually the text or icon color. |
|
|
@@ -45,11 +98,23 @@ Every widget also accepts these shared props — see [common props](COMMON_PROPS
|
|
|
45
98
|
| `filter` | `string` | Raw CSS `filter` value applied to the widget itself, e.g. `blur(4px)`. |
|
|
46
99
|
| `backdropFilter` | `string` | Raw CSS `backdrop-filter` value: what sits behind the widget is blurred through it, which is what makes a translucent card frosted glass. |
|
|
47
100
|
| `maskImage` | `string` | Raw CSS `mask-image` value, used to fade a widget out at its edges instead of cutting it. |
|
|
101
|
+
| `bgImage` | `string` | Image painted behind the widget's content (CSS `background-image`), placed with `bgSize` and `bgPosition`. |
|
|
102
|
+
| `bgSize` | `string` | How the background image fills its box (`cover`, `contain`, or a length). |
|
|
103
|
+
| `bgPosition` | `string` | Where the background image is anchored (`center`, `top`, `50% 20%`). |
|
|
104
|
+
| `bgRepeat` | `string` | Whether the background image tiles; `no-repeat` for a single cover. |
|
|
48
105
|
| `opacity` | `number` | Opacity from 0 (invisible) to 1 (fully opaque). |
|
|
49
106
|
| `visible` | `boolean` | Whether the widget is rendered and visible. |
|
|
50
107
|
| `disabled` | `boolean` | Disables interaction and shows the non-interactive state. |
|
|
51
|
-
| `onPress` | `(
|
|
52
|
-
| `onClick` | `(
|
|
108
|
+
| `onPress` | `(event?: Event) => void` | Callback fired when the widget is pressed. Alias: `onClick`. |
|
|
109
|
+
| `onClick` | `(event?: Event) => void` | Callback fired when the widget is clicked. Alias: `onPress`. |
|
|
110
|
+
| `onclick` | `(event?: Event) => void` | Lowercase alias of `onClick`, kept because the shipped templates and the HTML habit write it. |
|
|
111
|
+
| `alignSelf` | `AlignSelf` | Overrides the parent's `alignItems` for this child alone (CSS `align-self`). Alias: `selfAlign`. |
|
|
112
|
+
| `selfAlign` | `AlignSelf` | Alias of `alignSelf`. |
|
|
113
|
+
| `overflow` | `'auto' \| 'hidden' \| 'visible' \| 'scroll' \| 'clip'` | How overflowing content is handled (`hidden`, `auto`, `scroll`). |
|
|
114
|
+
| `overflowX` | `'auto' \| 'hidden' \| 'visible' \| 'scroll' \| 'clip'` | The `overflowX` value for the widget. |
|
|
115
|
+
| `overflowY` | `'auto' \| 'hidden' \| 'visible' \| 'scroll' \| 'clip'` | The `overflowY` value for the widget. |
|
|
116
|
+
| `textOverflow` | `'clip' \| 'ellipsis' \| string` | The `textOverflow` value for the widget. |
|
|
117
|
+
| `whiteSpace` | `'normal' \| 'nowrap' \| 'pre' \| 'pre-wrap' \| 'pre-line' \| string` | The `whiteSpace` value for the widget. |
|
|
53
118
|
| `id` | `string` | DOM `id` for the rendered element. |
|
|
54
119
|
| `className` | `string` | CSS class names applied to the rendered element. |
|
|
55
120
|
| `ref` | `(widget: Widget) => void` | Callback that receives the underlying DOM node. |
|
package/docs/widget/DraggBox.md
CHANGED
|
@@ -40,11 +40,64 @@ Every widget also accepts these shared props — see [common props](COMMON_PROPS
|
|
|
40
40
|
|
|
41
41
|
| Prop | Type | Description |
|
|
42
42
|
| --- | --- | --- |
|
|
43
|
+
| `full` | `boolean` | Stretches the widget to fill its parent on both axes in stack mode. |
|
|
44
|
+
| `fullHeight` | `boolean` | Stretches the widget to the full height of its parent in stack mode. |
|
|
45
|
+
| `fullWidth` | `boolean` | Stretches the widget to the full width of its parent. |
|
|
46
|
+
| `center` | `boolean` | Centres the widget on both axes in stack mode. |
|
|
47
|
+
| `centerY` | `boolean` | Centres the widget vertically in stack mode. |
|
|
48
|
+
| `centerX` | `boolean` | Centres the widget horizontally in stack mode. |
|
|
49
|
+
| `zIndex` | `number` | Stacking order: a widget with a higher value paints above lower ones. |
|
|
50
|
+
| `z` | `number` | Alias of `zIndex`. |
|
|
51
|
+
| `end` | `Size` | Logical alias of `right`, used by the stack placement shorthands. |
|
|
52
|
+
| `start` | `Size` | Logical alias of `left`, used by the stack placement shorthands. |
|
|
53
|
+
| `inset` | `Size` | Shorthand for the four edge offsets (`top`/`right`/`bottom`/`left`). |
|
|
54
|
+
| `left` | `Size` | Offset from the left edge. A number is pixels; a string uses any CSS unit. |
|
|
55
|
+
| `bottom` | `Size` | Offset from the bottom edge. A number is pixels; a string uses any CSS unit. |
|
|
56
|
+
| `right` | `Size` | Offset from the right edge. A number is pixels; a string uses any CSS unit. |
|
|
57
|
+
| `top` | `Size` | Offset from the top edge. A number is pixels; a string uses any CSS unit. |
|
|
58
|
+
| `pos` | `'static' \| 'relative' \| 'absolute' \| 'fixed' \| 'sticky' \| 'stack'` | Alias of `position`. |
|
|
59
|
+
| `position` | `'static' \| 'relative' \| 'absolute' \| 'fixed' \| 'sticky' \| 'stack'` | CSS `position` value, or `stack` for centered stacking. |
|
|
43
60
|
| `width` | `Size` | Width of the widget. A number is pixels; a string uses any CSS unit. |
|
|
44
61
|
| `height` | `Size` | Height of the widget. A number is pixels; a string uses any CSS unit. |
|
|
45
62
|
| `size` | `Size` | Overall size preset or pixel value, depending on the widget. |
|
|
63
|
+
| `flex` | `number` | Flex grow/shrink/basis shorthand for a flex child. |
|
|
64
|
+
| `minWidth` | `Size` | Minimum width the widget may shrink to. |
|
|
65
|
+
| `maxWidth` | `Size` | Maximum width the widget may grow to. |
|
|
66
|
+
| `minHeight` | `Size` | Minimum height the widget may shrink to. |
|
|
67
|
+
| `maxHeight` | `Size` | Maximum height the widget may grow to. |
|
|
68
|
+
| `border` | `string` | CSS `border` shorthand for all four edges: width, style and color in one string. |
|
|
69
|
+
| `borderTop` | `string` | The top edge of the border alone, for a widget whose rim differs per side. |
|
|
70
|
+
| `borderBottom` | `string` | The bottom edge of the border alone, for a widget whose rim differs per side. |
|
|
71
|
+
| `borderLeft` | `string` | The left edge of the border alone, for a widget whose rim differs per side. |
|
|
72
|
+
| `borderRight` | `string` | The right edge of the border alone, for a widget whose rim differs per side. |
|
|
73
|
+
| `cursor` | `string` | CSS `cursor` value: what the pointer becomes over the widget (`pointer`, `grab`, `not-allowed`). |
|
|
74
|
+
| `display` | `string` | CSS `display` value for the container. |
|
|
75
|
+
| `boxSizing` | `'border-box' \| 'content-box'` | Which box `width` and `height` measure: `border-box` keeps the size you asked for and pushes padding inward. |
|
|
76
|
+
| `flexDirection` | `'row' \| 'column' \| 'row-reverse' \| 'column-reverse'` | Main axis of a flex container: `row` places children side by side, `column` stacks them. |
|
|
77
|
+
| `flexGrow` | `number` | Share of the leftover space this child takes, relative to its siblings. |
|
|
78
|
+
| `flexShrink` | `number` | How readily the child gives space back when the row overflows; `0` keeps its size. |
|
|
79
|
+
| `gap` | `number \| string` | Space between children along the layout axis. |
|
|
80
|
+
| `fontSize` | `number` | Size of the font. |
|
|
81
|
+
| `borderColor` | `Color` | Color used for the border. |
|
|
82
|
+
| `borderWidth` | `number` | Width of the border. |
|
|
46
83
|
| `padding` | `Padding` | Space inside the widget, between its content and its border. |
|
|
84
|
+
| `paddingTop` | `Size` | Space inside the widget, on the top edge only. |
|
|
85
|
+
| `paddingRight` | `Size` | Space inside the widget, on the right edge only. |
|
|
86
|
+
| `paddingBottom` | `Size` | Space inside the widget, on the bottom edge only. |
|
|
87
|
+
| `paddingLeft` | `Size` | Space inside the widget, on the left edge only. |
|
|
88
|
+
| `pt` | `Size` | Alias of `paddingTop`. |
|
|
89
|
+
| `pr` | `Size` | Alias of `paddingRight`. |
|
|
90
|
+
| `pb` | `Size` | Alias of `paddingBottom`. |
|
|
91
|
+
| `pl` | `Size` | Alias of `paddingLeft`. |
|
|
47
92
|
| `margin` | `Margin` | Space outside the widget, between it and its neighbors. |
|
|
93
|
+
| `marginTop` | `Size` | Space outside the widget, on the top edge only. |
|
|
94
|
+
| `marginRight` | `Size` | Space outside the widget, on the right edge only. |
|
|
95
|
+
| `marginBottom` | `Size` | Space outside the widget, on the bottom edge only. |
|
|
96
|
+
| `marginLeft` | `Size` | Space outside the widget, on the left edge only. |
|
|
97
|
+
| `mt` | `Size` | Alias of `marginTop`. |
|
|
98
|
+
| `mr` | `Size` | Alias of `marginRight`. |
|
|
99
|
+
| `mb` | `Size` | Alias of `marginBottom`. |
|
|
100
|
+
| `ml` | `Size` | Alias of `marginLeft`. |
|
|
48
101
|
| `bgColor` | `Color` | Background color. Alias: `backgroundColor`. |
|
|
49
102
|
| `backgroundColor` | `Color` | Background color. Alias of `bgColor`. |
|
|
50
103
|
| `color` | `Color` | Foreground color, usually the text or icon color. |
|
|
@@ -54,11 +107,23 @@ Every widget also accepts these shared props — see [common props](COMMON_PROPS
|
|
|
54
107
|
| `filter` | `string` | Raw CSS `filter` value applied to the widget itself, e.g. `blur(4px)`. |
|
|
55
108
|
| `backdropFilter` | `string` | Raw CSS `backdrop-filter` value: what sits behind the widget is blurred through it, which is what makes a translucent card frosted glass. |
|
|
56
109
|
| `maskImage` | `string` | Raw CSS `mask-image` value, used to fade a widget out at its edges instead of cutting it. |
|
|
110
|
+
| `bgImage` | `string` | Image painted behind the widget's content (CSS `background-image`), placed with `bgSize` and `bgPosition`. |
|
|
111
|
+
| `bgSize` | `string` | How the background image fills its box (`cover`, `contain`, or a length). |
|
|
112
|
+
| `bgPosition` | `string` | Where the background image is anchored (`center`, `top`, `50% 20%`). |
|
|
113
|
+
| `bgRepeat` | `string` | Whether the background image tiles; `no-repeat` for a single cover. |
|
|
57
114
|
| `opacity` | `number` | Opacity from 0 (invisible) to 1 (fully opaque). |
|
|
58
115
|
| `visible` | `boolean` | Whether the widget is rendered and visible. |
|
|
59
116
|
| `disabled` | `boolean` | Disables interaction and shows the non-interactive state. |
|
|
60
|
-
| `onPress` | `(
|
|
61
|
-
| `onClick` | `(
|
|
117
|
+
| `onPress` | `(event?: Event) => void` | Callback fired when the widget is pressed. Alias: `onClick`. |
|
|
118
|
+
| `onClick` | `(event?: Event) => void` | Callback fired when the widget is clicked. Alias: `onPress`. |
|
|
119
|
+
| `onclick` | `(event?: Event) => void` | Lowercase alias of `onClick`, kept because the shipped templates and the HTML habit write it. |
|
|
120
|
+
| `alignSelf` | `AlignSelf` | Overrides the parent's `alignItems` for this child alone (CSS `align-self`). Alias: `selfAlign`. |
|
|
121
|
+
| `selfAlign` | `AlignSelf` | Alias of `alignSelf`. |
|
|
122
|
+
| `overflow` | `'auto' \| 'hidden' \| 'visible' \| 'scroll' \| 'clip'` | How overflowing content is handled (`hidden`, `auto`, `scroll`). |
|
|
123
|
+
| `overflowX` | `'auto' \| 'hidden' \| 'visible' \| 'scroll' \| 'clip'` | The `overflowX` value for the widget. |
|
|
124
|
+
| `overflowY` | `'auto' \| 'hidden' \| 'visible' \| 'scroll' \| 'clip'` | The `overflowY` value for the widget. |
|
|
125
|
+
| `textOverflow` | `'clip' \| 'ellipsis' \| string` | The `textOverflow` value for the widget. |
|
|
126
|
+
| `whiteSpace` | `'normal' \| 'nowrap' \| 'pre' \| 'pre-wrap' \| 'pre-line' \| string` | The `whiteSpace` value for the widget. |
|
|
62
127
|
| `id` | `string` | DOM `id` for the rendered element. |
|
|
63
128
|
| `className` | `string` | CSS class names applied to the rendered element. |
|
|
64
129
|
| `ref` | `(widget: Widget) => void` | Callback that receives the underlying DOM node. |
|