@iota/apps-ui-kit 0.10.1 → 0.12.0
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/CHANGELOG.md +25 -0
- package/dist/index.d.ts +40 -16
- package/dist/index.es.js +228 -189
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +4 -4
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/lib/components/atoms/badge/Badge.tsx +18 -2
- package/src/lib/components/atoms/button/Button.tsx +1 -1
- package/src/lib/components/atoms/checkbox/Checkbox.tsx +2 -2
- package/src/lib/components/atoms/info-box/InfoBox.tsx +3 -1
- package/src/lib/components/atoms/key-value-info/KeyValueInfo.tsx +32 -8
- package/src/lib/components/atoms/tooltip/Tooltip.tsx +45 -18
- package/src/lib/components/molecules/card/CardAction.tsx +2 -2
- package/src/lib/components/molecules/card/CardBody.tsx +2 -2
- package/src/lib/components/molecules/display-stats/DisplayStats.tsx +2 -2
- package/src/lib/components/molecules/input/Input.tsx +2 -2
- package/src/lib/components/molecules/input/InputWrapper.tsx +3 -2
- package/src/lib/components/molecules/table-cell/TableCell.tsx +6 -0
- package/src/lib/components/molecules/table-header-cell/TableHeaderCell.tsx +13 -7
- package/src/lib/components/organisms/accordion/Accordion.tsx +10 -1
- package/src/lib/components/organisms/table/Table.tsx +12 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# @iota/apps-ui-kit
|
|
2
2
|
|
|
3
|
+
## 0.12.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 352991b: fix checkbox alignment
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- dd41759: Add icon for Badge
|
|
12
|
+
- 437f907: Fix Tooltip not closing on scroll and overflowing the viewport.
|
|
13
|
+
- 3ac0260: add prop to disable state layer in the accordion and add a receipt layout option for the keyvalue
|
|
14
|
+
- 2dcb8d1: update some types in displaystats and keyvalueinfo components
|
|
15
|
+
|
|
16
|
+
## 0.11.0
|
|
17
|
+
|
|
18
|
+
### Minor Changes
|
|
19
|
+
|
|
20
|
+
- bf352b1: Add `actionLeft` and `actionRight` props to `TableHeaderCell` to render content (e.g. a tooltip icon) alongside the header label.
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- 140abe4: Add actionLeft and actionRight to TableHeaderCell
|
|
25
|
+
- b9462f0: Accept `ReactNode` in `KeyValueInfo` `supportingLabel` and `CardAction` `subtitle`, and fix `InfoBox` elevated-style left padding when no icon is provided.
|
|
26
|
+
- b656aef: Align card body title and subtitle text to the start.
|
|
27
|
+
|
|
3
28
|
## 0.10.1
|
|
4
29
|
|
|
5
30
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -34,7 +34,7 @@ declare interface AccordionContentProps {
|
|
|
34
34
|
isExpanded: boolean;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
export declare function AccordionHeader({ onToggle, children, isExpanded, hideArrow, }: PropsWithChildren<AccordionHeaderProps>): JSX_2.Element;
|
|
37
|
+
export declare function AccordionHeader({ onToggle, children, isExpanded, hideArrow, disableStateLayer, }: PropsWithChildren<AccordionHeaderProps>): JSX_2.Element;
|
|
38
38
|
|
|
39
39
|
export declare interface AccordionHeaderProps {
|
|
40
40
|
/**
|
|
@@ -57,6 +57,12 @@ export declare interface AccordionHeaderProps {
|
|
|
57
57
|
* Flag for hiding border.
|
|
58
58
|
*/
|
|
59
59
|
hideBorder?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Disable the header state layer while an interactive child is active.
|
|
62
|
+
* This keeps the parent hover treatment from competing with child links
|
|
63
|
+
* and controls.
|
|
64
|
+
*/
|
|
65
|
+
disableStateLayer?: boolean;
|
|
60
66
|
}
|
|
61
67
|
|
|
62
68
|
export declare function Account({ title, subtitle, badgeType, badgeText, avatarContent, onOptionsClick, onCopy, copyText, onOpen, isCopyable, isExternal, isSelected, isActive, showSelected, badgeTooltipText, badgeTooltipPosition, }: AccountProps): React.JSX.Element;
|
|
@@ -186,7 +192,7 @@ export declare interface AssetMediaRendererProps extends VideoProps {
|
|
|
186
192
|
showFallback?: boolean;
|
|
187
193
|
}
|
|
188
194
|
|
|
189
|
-
export declare function Badge({ type, label, size }: BadgeProps): React.JSX.Element;
|
|
195
|
+
export declare function Badge({ type, label, size, icon, }: BadgeProps): React.JSX.Element;
|
|
190
196
|
|
|
191
197
|
declare interface BadgeProps {
|
|
192
198
|
/**
|
|
@@ -201,6 +207,10 @@ declare interface BadgeProps {
|
|
|
201
207
|
* The size of the badge
|
|
202
208
|
*/
|
|
203
209
|
size?: BadgeSize;
|
|
210
|
+
/**
|
|
211
|
+
* An icon rendered before the label.
|
|
212
|
+
*/
|
|
213
|
+
icon?: ReactNode;
|
|
204
214
|
}
|
|
205
215
|
|
|
206
216
|
export declare enum BadgeSize {
|
|
@@ -230,7 +240,7 @@ export declare interface BaseInputProps extends InputWrapperProps {
|
|
|
230
240
|
/**
|
|
231
241
|
* Amount counter that is shown at the side of the caption text.
|
|
232
242
|
*/
|
|
233
|
-
amountCounter?:
|
|
243
|
+
amountCounter?: React.ReactNode;
|
|
234
244
|
/**
|
|
235
245
|
* Trailing element that is shown after the input
|
|
236
246
|
*/
|
|
@@ -246,7 +256,7 @@ export declare interface BaseInputProps extends InputWrapperProps {
|
|
|
246
256
|
/**
|
|
247
257
|
* Text that is shown below the value of the input.
|
|
248
258
|
*/
|
|
249
|
-
supportingValue?:
|
|
259
|
+
supportingValue?: React.ReactNode;
|
|
250
260
|
/**
|
|
251
261
|
* Default value of the input
|
|
252
262
|
*/
|
|
@@ -285,7 +295,7 @@ export declare interface ButtonProps extends Omit<React.ButtonHTMLAttributes<HTM
|
|
|
285
295
|
/**
|
|
286
296
|
* The text of the button.
|
|
287
297
|
*/
|
|
288
|
-
text?:
|
|
298
|
+
text?: React.ReactNode;
|
|
289
299
|
/**
|
|
290
300
|
The icon of the button
|
|
291
301
|
*/
|
|
@@ -382,8 +392,8 @@ export declare function Card({ isDisabled, type, isHoverable, onClick, children,
|
|
|
382
392
|
export declare function CardAction({ type, onClick, subtitle, title, icon, iconAfterText, buttonType, buttonDisabled, }: CardActionProps): JSX_2.Element | null;
|
|
383
393
|
|
|
384
394
|
export declare type CardActionProps = {
|
|
385
|
-
title?:
|
|
386
|
-
subtitle?: string;
|
|
395
|
+
title?: React.ReactNode;
|
|
396
|
+
subtitle?: string | React.ReactNode;
|
|
387
397
|
type: CardActionType;
|
|
388
398
|
onClick?: () => void;
|
|
389
399
|
icon?: React.ReactNode;
|
|
@@ -643,7 +653,7 @@ declare interface DisplayStatsProps {
|
|
|
643
653
|
/**
|
|
644
654
|
* The tooltip text.
|
|
645
655
|
*/
|
|
646
|
-
tooltipText?:
|
|
656
|
+
tooltipText?: ReactNode;
|
|
647
657
|
/**
|
|
648
658
|
* The value of the stats.
|
|
649
659
|
*/
|
|
@@ -832,7 +842,7 @@ declare interface InputWrapperProps {
|
|
|
832
842
|
/**
|
|
833
843
|
* Shows a caption with the text below the input.
|
|
834
844
|
*/
|
|
835
|
-
caption?:
|
|
845
|
+
caption?: ReactNode;
|
|
836
846
|
/**
|
|
837
847
|
* Error Message. Overrides the caption.
|
|
838
848
|
*/
|
|
@@ -840,7 +850,7 @@ declare interface InputWrapperProps {
|
|
|
840
850
|
/**
|
|
841
851
|
* Amount counter that is shown at the side of the caption text.
|
|
842
852
|
*/
|
|
843
|
-
amountCounter?:
|
|
853
|
+
amountCounter?: React.ReactNode;
|
|
844
854
|
/**
|
|
845
855
|
* Is the input required
|
|
846
856
|
*/
|
|
@@ -1035,13 +1045,17 @@ export declare const IOTA_PRIMITIVES_COLOR_PALETTE: {
|
|
|
1035
1045
|
};
|
|
1036
1046
|
};
|
|
1037
1047
|
|
|
1038
|
-
export declare function KeyValueInfo({ keyText, value, tooltipPosition, tooltipText, supportingLabel, size, isTruncated, copyText, onCopySuccess, onCopyError, fullwidth, isReverse, valueHoverTitle, }: KeyValueProps): React.JSX.Element;
|
|
1048
|
+
export declare function KeyValueInfo({ keyText, keyIcon, value, tooltipPosition, tooltipText, supportingLabel, size, isTruncated, copyText, onCopySuccess, onCopyError, fullwidth, isReverse, layout, valueHoverTitle, }: KeyValueProps): React.JSX.Element;
|
|
1039
1049
|
|
|
1040
1050
|
declare interface KeyValueProps {
|
|
1041
1051
|
/**
|
|
1042
1052
|
* The key of the KeyValue.
|
|
1043
1053
|
*/
|
|
1044
|
-
keyText:
|
|
1054
|
+
keyText: ReactNode;
|
|
1055
|
+
/**
|
|
1056
|
+
* An icon shown next to the key text (optional).
|
|
1057
|
+
*/
|
|
1058
|
+
keyIcon?: ReactNode;
|
|
1045
1059
|
/**
|
|
1046
1060
|
* The value of the KeyValue.
|
|
1047
1061
|
*/
|
|
@@ -1057,7 +1071,7 @@ declare interface KeyValueProps {
|
|
|
1057
1071
|
/**
|
|
1058
1072
|
* The supporting label of the KeyValue (optional).
|
|
1059
1073
|
*/
|
|
1060
|
-
supportingLabel?: string;
|
|
1074
|
+
supportingLabel?: string | ReactNode;
|
|
1061
1075
|
/**
|
|
1062
1076
|
* The size of the value (optional).
|
|
1063
1077
|
*/
|
|
@@ -1086,6 +1100,11 @@ declare interface KeyValueProps {
|
|
|
1086
1100
|
* Reverse the KeyValue (optional).
|
|
1087
1101
|
*/
|
|
1088
1102
|
isReverse?: boolean;
|
|
1103
|
+
/**
|
|
1104
|
+
* Use a receipt-style row with a dotted leader and right-aligned value.
|
|
1105
|
+
* This is opt-in so existing KeyValueInfo layouts remain unchanged.
|
|
1106
|
+
*/
|
|
1107
|
+
layout?: 'default' | 'receipt';
|
|
1089
1108
|
/**
|
|
1090
1109
|
* Text shown on value hover.
|
|
1091
1110
|
*/
|
|
@@ -1599,7 +1618,7 @@ export declare function TableActionButton(props: PropsWithChildren<ButtonProps_2
|
|
|
1599
1618
|
|
|
1600
1619
|
export declare function TableBody({ children }: PropsWithChildren): JSX.Element;
|
|
1601
1620
|
|
|
1602
|
-
export declare function TableCellBase({ children, hasLastBorderNoneClass, isContentCentered, }: PropsWithChildren<TableCellBaseProps>): JSX_2.Element;
|
|
1621
|
+
export declare function TableCellBase({ children, hasLastBorderNoneClass, isContentCentered, colSpan, }: PropsWithChildren<TableCellBaseProps>): JSX_2.Element;
|
|
1603
1622
|
|
|
1604
1623
|
declare interface TableCellBaseProps {
|
|
1605
1624
|
/**
|
|
@@ -1614,6 +1633,10 @@ declare interface TableCellBaseProps {
|
|
|
1614
1633
|
* Whether the cell content should be centered.
|
|
1615
1634
|
*/
|
|
1616
1635
|
isContentCentered?: boolean;
|
|
1636
|
+
/**
|
|
1637
|
+
* The number of columns the cell should span.
|
|
1638
|
+
*/
|
|
1639
|
+
colSpan?: number;
|
|
1617
1640
|
}
|
|
1618
1641
|
|
|
1619
1642
|
export declare function TableCellPlaceholder(): JSX_2.Element;
|
|
@@ -1626,7 +1649,7 @@ export declare interface TableCellTextProps {
|
|
|
1626
1649
|
|
|
1627
1650
|
export declare function TableHeader({ children }: PropsWithChildren): JSX.Element;
|
|
1628
1651
|
|
|
1629
|
-
export declare function TableHeaderCell({ label, columnKey, hasSort, hasCheckbox, isChecked, isIndeterminate, isContentCentered, onSortClick, onCheckboxChange, sortOrder, ...ariaProps }: TableHeaderCellProps): JSX.Element;
|
|
1652
|
+
export declare function TableHeaderCell({ label, columnKey, actionLeft, actionRight, hasSort, hasCheckbox, isChecked, isIndeterminate, isContentCentered, onSortClick, onCheckboxChange, sortOrder, ...ariaProps }: TableHeaderCellProps): JSX.Element;
|
|
1630
1653
|
|
|
1631
1654
|
export declare interface TableHeaderCellProps extends React.AriaAttributes {
|
|
1632
1655
|
/**
|
|
@@ -1756,8 +1779,9 @@ export declare type TableProps = {
|
|
|
1756
1779
|
heightFull?: boolean;
|
|
1757
1780
|
};
|
|
1758
1781
|
|
|
1759
|
-
export declare function TableRow({ children, leading, }: PropsWithChildren<{
|
|
1782
|
+
export declare function TableRow({ children, leading, onClick, }: PropsWithChildren<{
|
|
1760
1783
|
leading?: React.ReactNode;
|
|
1784
|
+
onClick?: React.MouseEventHandler<HTMLTableRowElement>;
|
|
1761
1785
|
}>): JSX.Element;
|
|
1762
1786
|
|
|
1763
1787
|
export declare function TableRowCheckbox({ rowIndex, onCheckboxChange, isDisabled, }: TableRowCheckboxProps): React.JSX.Element;
|