@statistikzh/leu 0.14.4 → 0.15.1
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/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +17 -0
- package/dist/Accordion.js +2 -30
- package/dist/Button.d.ts +56 -68
- package/dist/Button.js +74 -52
- package/dist/ButtonGroup.d.ts +9 -9
- package/dist/ButtonGroup.js +30 -20
- package/dist/ChartWrapper.d.ts +38 -0
- package/dist/ChartWrapper.js +164 -0
- package/dist/Checkbox.d.ts +6 -21
- package/dist/Checkbox.js +17 -9
- package/dist/CheckboxGroup.d.ts +13 -14
- package/dist/CheckboxGroup.js +18 -11
- package/dist/Chip.js +1 -1
- package/dist/ChipGroup.js +1 -1
- package/dist/ChipLink.js +1 -1
- package/dist/ChipRemovable.js +1 -1
- package/dist/ChipSelectable.js +1 -1
- package/dist/Dialog.js +1 -1
- package/dist/Dropdown.js +3 -1
- package/dist/Icon.js +1 -1
- package/dist/Input.js +1 -1
- package/dist/{LeuElement-x8UlIDDl.js → LeuElement-B84x5CPL.js} +1 -1
- package/dist/Menu.js +1 -1
- package/dist/MenuItem.js +1 -1
- package/dist/Pagination.d.ts +40 -28
- package/dist/Pagination.js +39 -14
- package/dist/Placeholder.d.ts +27 -0
- package/dist/Placeholder.js +90 -0
- package/dist/Popup.js +1 -1
- package/dist/Radio.d.ts +6 -21
- package/dist/Radio.js +17 -9
- package/dist/RadioGroup.d.ts +28 -23
- package/dist/RadioGroup.js +29 -16
- package/dist/Range.js +1 -1
- package/dist/ScrollTop.d.ts +0 -1
- package/dist/ScrollTop.js +3 -1
- package/dist/Select.js +3 -1
- package/dist/Spinner.js +1 -1
- package/dist/Table.d.ts +0 -1
- package/dist/Table.js +3 -1
- package/dist/VisuallyHidden.js +1 -1
- package/dist/_tslib-CNEFicEt.js +30 -0
- package/dist/components/button/Button.d.ts +55 -67
- package/dist/components/button/Button.d.ts.map +1 -1
- package/dist/components/button/stories/button.stories.d.ts.map +1 -1
- package/dist/components/button-group/ButtonGroup.d.ts +9 -9
- package/dist/components/button-group/ButtonGroup.d.ts.map +1 -1
- package/dist/components/chart-wrapper/ChartWrapper.d.ts +34 -0
- package/dist/components/chart-wrapper/ChartWrapper.d.ts.map +1 -0
- package/dist/components/chart-wrapper/leu-chart-wrapper.d.ts +3 -0
- package/dist/components/chart-wrapper/leu-chart-wrapper.d.ts.map +1 -0
- package/dist/components/chart-wrapper/stories/chart-wrapper.stories.d.ts +47 -0
- package/dist/components/chart-wrapper/stories/chart-wrapper.stories.d.ts.map +1 -0
- package/dist/components/chart-wrapper/test/chart-wrapper.test.d.ts +2 -0
- package/dist/components/chart-wrapper/test/chart-wrapper.test.d.ts.map +1 -0
- package/dist/components/checkbox/Checkbox.d.ts +6 -21
- package/dist/components/checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/checkbox/CheckboxGroup.d.ts +13 -14
- package/dist/components/checkbox/CheckboxGroup.d.ts.map +1 -1
- package/dist/components/icon/stories/icon.stories.d.ts +10 -0
- package/dist/components/icon/stories/icon.stories.d.ts.map +1 -1
- package/dist/components/pagination/Pagination.d.ts +40 -27
- package/dist/components/pagination/Pagination.d.ts.map +1 -1
- package/dist/components/pagination/stories/pagination.stories.d.ts +10 -2
- package/dist/components/pagination/stories/pagination.stories.d.ts.map +1 -1
- package/dist/components/placeholder/Placeholder.d.ts +23 -0
- package/dist/components/placeholder/Placeholder.d.ts.map +1 -0
- package/dist/components/placeholder/leu-placeholder.d.ts +3 -0
- package/dist/components/placeholder/leu-placeholder.d.ts.map +1 -0
- package/dist/components/placeholder/stories/placeholder.stories.d.ts +27 -0
- package/dist/components/placeholder/stories/placeholder.stories.d.ts.map +1 -0
- package/dist/components/placeholder/test/placeholder.test.d.ts +2 -0
- package/dist/components/placeholder/test/placeholder.test.d.ts.map +1 -0
- package/dist/components/radio/Radio.d.ts +6 -21
- package/dist/components/radio/Radio.d.ts.map +1 -1
- package/dist/components/radio/RadioGroup.d.ts +28 -23
- package/dist/components/radio/RadioGroup.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -2
- package/dist/leu-accordion.js +2 -1
- package/dist/leu-button-group.js +8 -1
- package/dist/leu-button.d.ts +0 -1
- package/dist/leu-button.js +3 -1
- package/dist/leu-chart-wrapper.d.ts +6 -0
- package/dist/leu-chart-wrapper.js +11 -0
- package/dist/leu-checkbox-group.js +5 -1
- package/dist/leu-checkbox.js +3 -1
- package/dist/leu-chip-group.js +1 -1
- package/dist/leu-chip-link.js +1 -1
- package/dist/leu-chip-removable.js +1 -1
- package/dist/leu-chip-selectable.js +1 -1
- package/dist/leu-dialog.js +1 -1
- package/dist/leu-dropdown.js +3 -1
- package/dist/leu-icon.js +1 -1
- package/dist/leu-input.js +1 -1
- package/dist/leu-menu-item.js +1 -1
- package/dist/leu-menu.js +1 -1
- package/dist/leu-pagination.d.ts +0 -1
- package/dist/leu-pagination.js +3 -1
- package/dist/leu-placeholder.d.ts +4 -0
- package/dist/leu-placeholder.js +7 -0
- package/dist/leu-popup.js +1 -1
- package/dist/leu-radio-group.js +4 -1
- package/dist/leu-radio.js +3 -1
- package/dist/leu-range.js +1 -1
- package/dist/leu-scroll-top.d.ts +0 -1
- package/dist/leu-scroll-top.js +3 -1
- package/dist/leu-select.js +3 -1
- package/dist/leu-spinner.js +1 -1
- package/dist/leu-table.d.ts +0 -1
- package/dist/leu-table.js +3 -1
- package/dist/leu-visually-hidden.js +1 -1
- package/dist/lib/a11y.d.ts +2 -2
- package/dist/theme.css +18 -18
- package/dist/vscode.html-custom-data.json +95 -25
- package/dist/vue/index.d.ts +86 -46
- package/dist/web-types.json +222 -80
- package/package.json +1 -1
- package/release-please-config.json +1 -2
- package/scripts/generate-component/templates/stories/[name].stories.ts +17 -4
- package/scripts/postcss-leu-font-styles.cjs +10 -10
- package/src/components/button/Button.ts +95 -79
- package/src/components/button/stories/button.stories.ts +5 -6
- package/src/components/button-group/ButtonGroup.ts +18 -13
- package/src/components/chart-wrapper/ChartWrapper.ts +78 -0
- package/src/components/chart-wrapper/chart-wrapper.css +87 -0
- package/src/components/chart-wrapper/leu-chart-wrapper.ts +5 -0
- package/src/components/chart-wrapper/stories/chart-wrapper.stories.ts +58 -0
- package/src/components/chart-wrapper/test/chart-wrapper.test.ts +77 -0
- package/src/components/checkbox/Checkbox.ts +13 -15
- package/src/components/checkbox/CheckboxGroup.ts +20 -16
- package/src/components/icon/stories/icon.stories.ts +27 -0
- package/src/components/pagination/Pagination.ts +45 -32
- package/src/components/pagination/stories/pagination.stories.ts +28 -17
- package/src/components/placeholder/Placeholder.ts +33 -0
- package/src/components/placeholder/leu-placeholder.ts +5 -0
- package/src/components/placeholder/placeholder.css +59 -0
- package/src/components/placeholder/stories/placeholder.stories.ts +34 -0
- package/src/components/placeholder/test/placeholder.test.ts +31 -0
- package/src/components/radio/Radio.ts +13 -15
- package/src/components/radio/RadioGroup.ts +42 -28
- package/src/docs/contributing.mdx +1 -1
- package/src/index.ts +1 -0
- package/src/lib/a11y.ts +2 -2
- package/src/styles/theme.css +89 -1
- package/src/styles/custom-properties.css +0 -89
|
@@ -34,42 +34,78 @@
|
|
|
34
34
|
}
|
|
35
35
|
]
|
|
36
36
|
},
|
|
37
|
+
{
|
|
38
|
+
"name": "leu-button-group",
|
|
39
|
+
"description": "A radio input-like button group component.\nIt allows only one button to be active at a time.\n---\n\n\n### **Events:**\n - **input** - When the value of the group changes by clicking a button\n\n### **Slots:**\n - _default_ - Slot for the buttons",
|
|
40
|
+
"attributes": [],
|
|
41
|
+
"references": [
|
|
42
|
+
{
|
|
43
|
+
"name": "Documentation",
|
|
44
|
+
"url": "https://statistikzh.github.io/leu/?path=/story/button-group"
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
},
|
|
37
48
|
{
|
|
38
49
|
"name": "leu-button",
|
|
39
50
|
"description": "\n---\n\n\n### **Slots:**\n - **before** - The icon to display before the label\n- **after** - The icon to display after the label\n- _default_ - The label of the button or the icon if no label is set",
|
|
40
51
|
"attributes": [
|
|
41
|
-
{
|
|
42
|
-
|
|
43
|
-
|
|
52
|
+
{
|
|
53
|
+
"name": "label",
|
|
54
|
+
"description": "`aria-label` of the underlying button elements.\nUse it to provide a label when only an icon is visible.",
|
|
55
|
+
"values": []
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"name": "size",
|
|
59
|
+
"description": "The size of the button.",
|
|
60
|
+
"values": [{ "name": "regular" }, { "name": "small" }]
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"name": "variant",
|
|
64
|
+
"description": "The visual variant of the button.",
|
|
65
|
+
"values": [
|
|
66
|
+
{ "name": "primary" },
|
|
67
|
+
{ "name": "secondary" },
|
|
68
|
+
{ "name": "ghost" }
|
|
69
|
+
]
|
|
70
|
+
},
|
|
44
71
|
{
|
|
45
72
|
"name": "type",
|
|
73
|
+
"description": "The `type` of the underlying button element.",
|
|
46
74
|
"values": [
|
|
47
75
|
{ "name": "button" },
|
|
48
76
|
{ "name": "submit" },
|
|
49
77
|
{ "name": "reset" }
|
|
50
78
|
]
|
|
51
79
|
},
|
|
52
|
-
{
|
|
53
|
-
|
|
80
|
+
{
|
|
81
|
+
"name": "componentRole",
|
|
82
|
+
"description": "The `role` of the underlying button element.",
|
|
83
|
+
"values": []
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"name": "disabled",
|
|
87
|
+
"description": "Whether the button is disabled or not.",
|
|
88
|
+
"values": []
|
|
89
|
+
},
|
|
54
90
|
{
|
|
55
91
|
"name": "round",
|
|
56
|
-
"description": "
|
|
92
|
+
"description": "Whether the button should be round.\nCan only be applied when the button contains an icon without a visible label.",
|
|
93
|
+
"values": []
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"name": "active",
|
|
97
|
+
"description": "Whether the button is active or not.\nDepending on the `componentRole`, it applies `aria-checked` or `aria-selected` to the underlying button element.",
|
|
57
98
|
"values": []
|
|
58
99
|
},
|
|
59
|
-
{ "name": "active", "values": [] },
|
|
60
100
|
{
|
|
61
101
|
"name": "inverted",
|
|
62
|
-
"description": "
|
|
102
|
+
"description": "Wheter the colors should be inverted. For use on dark backgrounds.",
|
|
63
103
|
"values": []
|
|
64
104
|
},
|
|
65
105
|
{
|
|
66
106
|
"name": "expanded",
|
|
67
|
-
"description": "
|
|
68
|
-
"values": [
|
|
69
|
-
{ "name": "(\"true\"" },
|
|
70
|
-
{ "name": "false" },
|
|
71
|
-
{ "name": "undefined)" }
|
|
72
|
-
]
|
|
107
|
+
"description": "Whether the button is expanded or not.\nOnly has an effect on the variant `ghost` to show an expanding icon.\nIf the property is not set, the icon will not be shown.\nIf it is set, the icon will either show an expanded or collapsed state.",
|
|
108
|
+
"values": [{ "name": "true" }, { "name": "false" }]
|
|
73
109
|
},
|
|
74
110
|
{
|
|
75
111
|
"name": "fluid",
|
|
@@ -85,13 +121,19 @@
|
|
|
85
121
|
]
|
|
86
122
|
},
|
|
87
123
|
{
|
|
88
|
-
"name": "leu-
|
|
89
|
-
"description": "
|
|
90
|
-
"attributes": [
|
|
124
|
+
"name": "leu-chart-wrapper",
|
|
125
|
+
"description": "A wrapper element for charts.\n---\n\n\n### **Slots:**\n - **title** - The title of the chart. Use a heading tag (h2-4) depending on your context.\n- **description** - A description of the chart. Content is wrapped in a `<p>` tag by the component.\n- **chart** - The actual chart\n- **caption** - A caption for the chart, e.g. a source or explanation of the data.\n- **download** - A download button or dropdown to export the chart in different formats.",
|
|
126
|
+
"attributes": [
|
|
127
|
+
{
|
|
128
|
+
"name": "pending",
|
|
129
|
+
"description": "Whether the chart is currently loading or not.\nWhen set to `true`, a spinner will be shown in the chart container.",
|
|
130
|
+
"values": []
|
|
131
|
+
}
|
|
132
|
+
],
|
|
91
133
|
"references": [
|
|
92
134
|
{
|
|
93
135
|
"name": "Documentation",
|
|
94
|
-
"url": "https://statistikzh.github.io/leu/?path=/story/
|
|
136
|
+
"url": "https://statistikzh.github.io/leu/?path=/story/chart-wrapper"
|
|
95
137
|
}
|
|
96
138
|
]
|
|
97
139
|
},
|
|
@@ -113,13 +155,18 @@
|
|
|
113
155
|
},
|
|
114
156
|
{
|
|
115
157
|
"name": "leu-checkbox-group",
|
|
116
|
-
"description": "\n---\n",
|
|
158
|
+
"description": "\n---\n\n\n### **Slots:**\n - _default_ - Place the checkboxes inside the default slot.",
|
|
117
159
|
"attributes": [
|
|
118
160
|
{
|
|
119
161
|
"name": "orientation",
|
|
162
|
+
"description": "Defines how the checkboxes should be aligned.",
|
|
120
163
|
"values": [{ "name": "horizontal" }, { "name": "vertical" }]
|
|
121
164
|
},
|
|
122
|
-
{
|
|
165
|
+
{
|
|
166
|
+
"name": "label",
|
|
167
|
+
"description": "The label of the checkbox group",
|
|
168
|
+
"values": []
|
|
169
|
+
}
|
|
123
170
|
],
|
|
124
171
|
"references": [
|
|
125
172
|
{
|
|
@@ -449,9 +496,16 @@
|
|
|
449
496
|
"description": "\n---\n\n\n### **Events:**\n - **leu:pagechange**",
|
|
450
497
|
"attributes": [
|
|
451
498
|
{ "name": "defaultPage", "values": [] },
|
|
452
|
-
{
|
|
453
|
-
|
|
454
|
-
|
|
499
|
+
{
|
|
500
|
+
"name": "itemsPerPage",
|
|
501
|
+
"description": "Number of items per page.",
|
|
502
|
+
"values": []
|
|
503
|
+
},
|
|
504
|
+
{
|
|
505
|
+
"name": "numOfItems",
|
|
506
|
+
"description": "Total number of items to paginate.",
|
|
507
|
+
"values": []
|
|
508
|
+
}
|
|
455
509
|
],
|
|
456
510
|
"references": [
|
|
457
511
|
{
|
|
@@ -460,6 +514,17 @@
|
|
|
460
514
|
}
|
|
461
515
|
]
|
|
462
516
|
},
|
|
517
|
+
{
|
|
518
|
+
"name": "leu-placeholder",
|
|
519
|
+
"description": "* A placeholder to display when no content is available.\n---\n\n\n### **Slots:**\n - **title** - The placeholders title. Use a heading tag (h1-6) depeneding on your context.\n- **description** - A description of the placeholder. Content is wrapped in a `<p>` tag by the component.\n- **cta** - A call to action button like \"Reload\" or \"Create\". Add a single `<leu-button>`.",
|
|
520
|
+
"attributes": [],
|
|
521
|
+
"references": [
|
|
522
|
+
{
|
|
523
|
+
"name": "Documentation",
|
|
524
|
+
"url": "https://statistikzh.github.io/leu/?path=/story/placeholder"
|
|
525
|
+
}
|
|
526
|
+
]
|
|
527
|
+
},
|
|
463
528
|
{
|
|
464
529
|
"name": "leu-popup",
|
|
465
530
|
"description": "\n---\n",
|
|
@@ -513,13 +578,18 @@
|
|
|
513
578
|
},
|
|
514
579
|
{
|
|
515
580
|
"name": "leu-radio-group",
|
|
516
|
-
"description": "
|
|
581
|
+
"description": "Handles a group of radio buttons, allowing only one to be selected at a time. It provides keyboard navigation and manages focus within the group.\n---\n\n\n### **Slots:**\n - _default_ - Place the radio buttons inside the default slot.",
|
|
517
582
|
"attributes": [
|
|
518
583
|
{
|
|
519
584
|
"name": "orientation",
|
|
585
|
+
"description": "Defines how the radio buttons should be aligned.",
|
|
520
586
|
"values": [{ "name": "horizontal" }, { "name": "vertical" }]
|
|
521
587
|
},
|
|
522
|
-
{
|
|
588
|
+
{
|
|
589
|
+
"name": "label",
|
|
590
|
+
"description": "The label of the radio group",
|
|
591
|
+
"values": []
|
|
592
|
+
}
|
|
523
593
|
],
|
|
524
594
|
"references": [
|
|
525
595
|
{
|
package/dist/vue/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { DefineComponent } from "vue";
|
|
2
2
|
|
|
3
3
|
import type { LeuAccordion } from "../Accordion.js";
|
|
4
|
+
import type { LeuButtonGroup } from "../ButtonGroup.js";
|
|
4
5
|
import type { LeuButton } from "../Button.js";
|
|
5
|
-
import type {
|
|
6
|
+
import type { LeuChartWrapper } from "../ChartWrapper.js";
|
|
6
7
|
import type { LeuCheckbox } from "../Checkbox.js";
|
|
7
8
|
import type { LeuCheckboxGroup } from "../CheckboxGroup.js";
|
|
8
9
|
import type { LeuChipGroup } from "../ChipGroup.js";
|
|
@@ -16,6 +17,7 @@ import type { LeuInput, CustomEvent } from "../Input.js";
|
|
|
16
17
|
import type { LeuMenu } from "../Menu.js";
|
|
17
18
|
import type { LeuMenuItem } from "../MenuItem.js";
|
|
18
19
|
import type { LeuPagination, CustomEvent } from "../Pagination.js";
|
|
20
|
+
import type { LeuPlaceholder } from "../Placeholder.js";
|
|
19
21
|
import type { LeuPopup } from "../Popup.js";
|
|
20
22
|
import type { LeuRadio } from "../Radio.js";
|
|
21
23
|
import type { LeuRadioGroup } from "../RadioGroup.js";
|
|
@@ -37,36 +39,50 @@ type LeuAccordionProps = {
|
|
|
37
39
|
label?: LeuAccordion["label"];
|
|
38
40
|
};
|
|
39
41
|
|
|
42
|
+
type LeuButtonGroupProps = {
|
|
43
|
+
/** The value of the currently selected (active) button */
|
|
44
|
+
value?: LeuButtonGroup["value"];
|
|
45
|
+
/** When the value of the group changes by clicking a button */
|
|
46
|
+
oninput?: (e: CustomEvent<never>) => void;
|
|
47
|
+
};
|
|
48
|
+
|
|
40
49
|
type LeuButtonProps = {
|
|
41
|
-
/**
|
|
50
|
+
/** `aria-label` of the underlying button elements.
|
|
51
|
+
Use it to provide a label when only an icon is visible. */
|
|
42
52
|
label?: LeuButton["label"];
|
|
43
|
-
/**
|
|
53
|
+
/** The size of the button. */
|
|
44
54
|
size?: LeuButton["size"];
|
|
45
|
-
/**
|
|
55
|
+
/** The visual variant of the button. */
|
|
46
56
|
variant?: LeuButton["variant"];
|
|
47
|
-
/**
|
|
57
|
+
/** The `type` of the underlying button element. */
|
|
48
58
|
type?: LeuButton["type"];
|
|
49
|
-
/**
|
|
59
|
+
/** The `role` of the underlying button element. */
|
|
50
60
|
componentRole?: LeuButton["componentRole"];
|
|
51
|
-
/**
|
|
61
|
+
/** Whether the button is disabled or not. */
|
|
52
62
|
disabled?: LeuButton["disabled"];
|
|
53
|
-
/**
|
|
63
|
+
/** Whether the button should be round.
|
|
64
|
+
Can only be applied when the button contains an icon without a visible label. */
|
|
54
65
|
round?: LeuButton["round"];
|
|
55
|
-
/**
|
|
66
|
+
/** Whether the button is active or not.
|
|
67
|
+
Depending on the `componentRole`, it applies `aria-checked` or `aria-selected` to the underlying button element. */
|
|
56
68
|
active?: LeuButton["active"];
|
|
57
|
-
/**
|
|
69
|
+
/** Wheter the colors should be inverted. For use on dark backgrounds. */
|
|
58
70
|
inverted?: LeuButton["inverted"];
|
|
59
|
-
/**
|
|
71
|
+
/** Whether the button is expanded or not.
|
|
72
|
+
Only has an effect on the variant `ghost` to show an expanding icon.
|
|
73
|
+
If the property is not set, the icon will not be shown.
|
|
74
|
+
If it is set, the icon will either show an expanded or collapsed state. */
|
|
60
75
|
expanded?: LeuButton["expanded"];
|
|
61
76
|
/** Alters the shape of the button to be full width of its parent container */
|
|
62
77
|
fluid?: LeuButton["fluid"];
|
|
63
78
|
};
|
|
64
79
|
|
|
65
|
-
type
|
|
66
|
-
/**
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
80
|
+
type LeuChartWrapperProps = {
|
|
81
|
+
/** Whether the chart is currently loading or not.
|
|
82
|
+
When set to `true`, a spinner will be shown in the chart container. */
|
|
83
|
+
pending?: LeuChartWrapper["pending"];
|
|
84
|
+
/** */
|
|
85
|
+
hasSlotController?: LeuChartWrapper["hasSlotController"];
|
|
70
86
|
};
|
|
71
87
|
|
|
72
88
|
type LeuCheckboxProps = {
|
|
@@ -81,14 +97,12 @@ type LeuCheckboxProps = {
|
|
|
81
97
|
};
|
|
82
98
|
|
|
83
99
|
type LeuCheckboxGroupProps = {
|
|
84
|
-
/**
|
|
100
|
+
/** Defines how the checkboxes should be aligned. */
|
|
85
101
|
orientation?: LeuCheckboxGroup["orientation"];
|
|
86
|
-
/**
|
|
102
|
+
/** The label of the checkbox group */
|
|
87
103
|
label?: LeuCheckboxGroup["label"];
|
|
88
104
|
/** */
|
|
89
105
|
value?: LeuCheckboxGroup["value"];
|
|
90
|
-
/** */
|
|
91
|
-
items?: LeuCheckboxGroup["items"];
|
|
92
106
|
};
|
|
93
107
|
|
|
94
108
|
type LeuChipGroupProps = {
|
|
@@ -252,17 +266,18 @@ type LeuMenuItemProps = {
|
|
|
252
266
|
type LeuPaginationProps = {
|
|
253
267
|
/** */
|
|
254
268
|
defaultPage?: LeuPagination["defaultPage"];
|
|
255
|
-
/**
|
|
269
|
+
/** Number of items per page. */
|
|
256
270
|
itemsPerPage?: LeuPagination["itemsPerPage"];
|
|
257
|
-
/**
|
|
271
|
+
/** Total number of items to paginate. */
|
|
258
272
|
numOfItems?: LeuPagination["numOfItems"];
|
|
259
|
-
/**
|
|
260
|
-
|
|
261
|
-
|
|
273
|
+
/** The current page number. This is a 1-based index.
|
|
274
|
+
When setting this value, it will be clamped
|
|
275
|
+
to the range of valid pages. */
|
|
262
276
|
page?: LeuPagination["page"];
|
|
263
|
-
/**
|
|
277
|
+
/** The index of the first item on the current page. */
|
|
264
278
|
startIndex?: LeuPagination["startIndex"];
|
|
265
|
-
/**
|
|
279
|
+
/** The index of the last item on the current page.
|
|
280
|
+
This is exclusive, meaning it is one past the last item. */
|
|
266
281
|
endIndex?: LeuPagination["endIndex"];
|
|
267
282
|
/** */
|
|
268
283
|
_maxPage?: LeuPagination["_maxPage"];
|
|
@@ -270,6 +285,8 @@ type LeuPaginationProps = {
|
|
|
270
285
|
"onleu:pagechange"?: (e: CustomEvent<CustomEvent>) => void;
|
|
271
286
|
};
|
|
272
287
|
|
|
288
|
+
type LeuPlaceholderProps = {};
|
|
289
|
+
|
|
273
290
|
type LeuPopupProps = {
|
|
274
291
|
/** */
|
|
275
292
|
anchor?: LeuPopup["anchor"];
|
|
@@ -309,22 +326,12 @@ type LeuRadioProps = {
|
|
|
309
326
|
};
|
|
310
327
|
|
|
311
328
|
type LeuRadioGroupProps = {
|
|
312
|
-
/**
|
|
329
|
+
/** Defines how the radio buttons should be aligned. */
|
|
313
330
|
orientation?: LeuRadioGroup["orientation"];
|
|
314
|
-
/**
|
|
331
|
+
/** The label of the radio group */
|
|
315
332
|
label?: LeuRadioGroup["label"];
|
|
316
333
|
/** */
|
|
317
334
|
value?: LeuRadioGroup["value"];
|
|
318
|
-
/** */
|
|
319
|
-
handleFocusIn?: LeuRadioGroup["handleFocusIn"];
|
|
320
|
-
/** */
|
|
321
|
-
handleKeyDown?: LeuRadioGroup["handleKeyDown"];
|
|
322
|
-
/** */
|
|
323
|
-
handleInput?: LeuRadioGroup["handleInput"];
|
|
324
|
-
/** */
|
|
325
|
-
_currentIndex?: LeuRadioGroup["_currentIndex"];
|
|
326
|
-
/** */
|
|
327
|
-
items?: LeuRadioGroup["items"];
|
|
328
335
|
};
|
|
329
336
|
|
|
330
337
|
type LeuRangeProps = {
|
|
@@ -440,6 +447,20 @@ export type CustomElements = {
|
|
|
440
447
|
*/
|
|
441
448
|
"leu-accordion": DefineComponent<LeuAccordionProps>;
|
|
442
449
|
|
|
450
|
+
/**
|
|
451
|
+
* A radio input-like button group component.
|
|
452
|
+
* It allows only one button to be active at a time.
|
|
453
|
+
* ---
|
|
454
|
+
*
|
|
455
|
+
*
|
|
456
|
+
* ### **Events:**
|
|
457
|
+
* - **input** - When the value of the group changes by clicking a button
|
|
458
|
+
*
|
|
459
|
+
* ### **Slots:**
|
|
460
|
+
* - _default_ - Slot for the buttons
|
|
461
|
+
*/
|
|
462
|
+
"leu-button-group": DefineComponent<LeuButtonGroupProps>;
|
|
463
|
+
|
|
443
464
|
/**
|
|
444
465
|
*
|
|
445
466
|
* ---
|
|
@@ -453,17 +474,18 @@ export type CustomElements = {
|
|
|
453
474
|
"leu-button": DefineComponent<LeuButtonProps>;
|
|
454
475
|
|
|
455
476
|
/**
|
|
456
|
-
*
|
|
477
|
+
* A wrapper element for charts.
|
|
457
478
|
* ---
|
|
458
479
|
*
|
|
459
480
|
*
|
|
460
|
-
* ### **Events:**
|
|
461
|
-
* - **input** - When the value of the group changes by clicking a button
|
|
462
|
-
*
|
|
463
481
|
* ### **Slots:**
|
|
464
|
-
* -
|
|
482
|
+
* - **title** - The title of the chart. Use a heading tag (h2-4) depending on your context.
|
|
483
|
+
* - **description** - A description of the chart. Content is wrapped in a `<p>` tag by the component.
|
|
484
|
+
* - **chart** - The actual chart
|
|
485
|
+
* - **caption** - A caption for the chart, e.g. a source or explanation of the data.
|
|
486
|
+
* - **download** - A download button or dropdown to export the chart in different formats.
|
|
465
487
|
*/
|
|
466
|
-
"leu-
|
|
488
|
+
"leu-chart-wrapper": DefineComponent<LeuChartWrapperProps>;
|
|
467
489
|
|
|
468
490
|
/**
|
|
469
491
|
*
|
|
@@ -476,6 +498,9 @@ export type CustomElements = {
|
|
|
476
498
|
*
|
|
477
499
|
* ---
|
|
478
500
|
*
|
|
501
|
+
*
|
|
502
|
+
* ### **Slots:**
|
|
503
|
+
* - _default_ - Place the checkboxes inside the default slot.
|
|
479
504
|
*/
|
|
480
505
|
"leu-checkbox-group": DefineComponent<LeuCheckboxGroupProps>;
|
|
481
506
|
|
|
@@ -613,6 +638,18 @@ export type CustomElements = {
|
|
|
613
638
|
*/
|
|
614
639
|
"leu-pagination": DefineComponent<LeuPaginationProps>;
|
|
615
640
|
|
|
641
|
+
/**
|
|
642
|
+
* * A placeholder to display when no content is available.
|
|
643
|
+
* ---
|
|
644
|
+
*
|
|
645
|
+
*
|
|
646
|
+
* ### **Slots:**
|
|
647
|
+
* - **title** - The placeholders title. Use a heading tag (h1-6) depeneding on your context.
|
|
648
|
+
* - **description** - A description of the placeholder. Content is wrapped in a `<p>` tag by the component.
|
|
649
|
+
* - **cta** - A call to action button like "Reload" or "Create". Add a single `<leu-button>`.
|
|
650
|
+
*/
|
|
651
|
+
"leu-placeholder": DefineComponent<LeuPlaceholderProps>;
|
|
652
|
+
|
|
616
653
|
/**
|
|
617
654
|
*
|
|
618
655
|
* ---
|
|
@@ -628,9 +665,12 @@ export type CustomElements = {
|
|
|
628
665
|
"leu-radio": DefineComponent<LeuRadioProps>;
|
|
629
666
|
|
|
630
667
|
/**
|
|
631
|
-
*
|
|
668
|
+
* Handles a group of radio buttons, allowing only one to be selected at a time. It provides keyboard navigation and manages focus within the group.
|
|
632
669
|
* ---
|
|
633
670
|
*
|
|
671
|
+
*
|
|
672
|
+
* ### **Slots:**
|
|
673
|
+
* - _default_ - Place the radio buttons inside the default slot.
|
|
634
674
|
*/
|
|
635
675
|
"leu-radio-group": DefineComponent<LeuRadioGroupProps>;
|
|
636
676
|
|