@iota/apps-ui-kit 0.3.0 → 0.5.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 +26 -0
- package/README.md +16 -0
- package/dist/index.d.ts +68 -6
- package/dist/index.es.js +2858 -2723
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +45 -45
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/lib/components/atoms/badge/badge.classes.ts +9 -0
- package/src/lib/components/atoms/badge/badge.enums.ts +3 -0
- package/src/lib/components/atoms/index.ts +1 -0
- package/src/lib/components/atoms/info-box/InfoBox.tsx +1 -1
- package/src/lib/components/atoms/toggle/Toggle.tsx +140 -0
- package/src/lib/components/atoms/toggle/index.ts +6 -0
- package/src/lib/components/atoms/toggle/toggle.classes.ts +41 -0
- package/src/lib/components/atoms/toggle/toggle.enums.ts +12 -0
- package/src/lib/components/molecules/card/CardBody.tsx +12 -1
- package/src/lib/components/molecules/card/card.classes.ts +1 -0
- package/src/lib/components/molecules/card/card.enums.ts +1 -0
- package/src/lib/components/molecules/search/Search.tsx +5 -2
- package/src/lib/components/molecules/title/Title.tsx +9 -1
- package/src/lib/components/organisms/table/Table.tsx +19 -3
- package/src/lib/constants/colors.constants.ts +1 -0
- package/src/storybook/stories/atoms/Toggle.stories.tsx +59 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @iota/apps-ui-kit
|
|
2
2
|
|
|
3
|
+
## 0.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- a4b46bc: add more badge types
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- 6d274df: make renderSuggestion prop optional in Search component
|
|
12
|
+
- 976e7f8: Add heightFull configuration props to Table component
|
|
13
|
+
- bb45cb5: Add new type for CardImage component
|
|
14
|
+
- Updated dependencies [a4b46bc]
|
|
15
|
+
- @iota/apps-ui-icons@0.3.0
|
|
16
|
+
|
|
17
|
+
## 0.4.0
|
|
18
|
+
|
|
19
|
+
### Minor Changes
|
|
20
|
+
|
|
21
|
+
- a3f08da: add toggle component
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- 1ad39f9: Update dependencies
|
|
26
|
+
- 4e4f710: replace supportingText from string to ReactNode in InfoBox component
|
|
27
|
+
- d0cb92e: manage unreachable images by displaying a placeholder instead in VisualAssetCard
|
|
28
|
+
|
|
3
29
|
## 0.3.0
|
|
4
30
|
|
|
5
31
|
### Minor Changes
|
package/README.md
ADDED
package/dist/index.d.ts
CHANGED
|
@@ -178,7 +178,10 @@ declare interface BadgeProps {
|
|
|
178
178
|
export declare enum BadgeType {
|
|
179
179
|
Neutral = "neutral",
|
|
180
180
|
PrimarySolid = "primary-solid",
|
|
181
|
-
PrimarySoft = "primary-fill"
|
|
181
|
+
PrimarySoft = "primary-fill",
|
|
182
|
+
Success = "success",
|
|
183
|
+
Warning = "warning",
|
|
184
|
+
Error = "error"
|
|
182
185
|
}
|
|
183
186
|
|
|
184
187
|
export declare interface BaseInputProps extends InputWrapperProps {
|
|
@@ -353,7 +356,7 @@ export declare enum CardActionType {
|
|
|
353
356
|
Button = "button"
|
|
354
357
|
}
|
|
355
358
|
|
|
356
|
-
export declare function CardBody({ title, subtitle, clickableAction, icon, isTextTruncated, }: CardBodyProps): JSX_2.Element;
|
|
359
|
+
export declare function CardBody({ title, subtitle, clickableAction, icon, isTextTruncated, tooltipText, tooltipPosition, }: CardBodyProps): JSX_2.Element;
|
|
357
360
|
|
|
358
361
|
export declare type CardBodyProps = {
|
|
359
362
|
title: string;
|
|
@@ -361,6 +364,8 @@ export declare type CardBodyProps = {
|
|
|
361
364
|
clickableAction?: React.ReactNode;
|
|
362
365
|
icon?: React.ReactNode;
|
|
363
366
|
isTextTruncated?: boolean;
|
|
367
|
+
tooltipText?: string;
|
|
368
|
+
tooltipPosition?: TooltipPosition;
|
|
364
369
|
};
|
|
365
370
|
|
|
366
371
|
export declare function CardImage({ type, shape, url, children, }: CardImageProps): JSX_2.Element;
|
|
@@ -620,6 +625,7 @@ export declare enum ImageShape {
|
|
|
620
625
|
export declare enum ImageType {
|
|
621
626
|
Placeholder = "placeholder",
|
|
622
627
|
BgSolid = "bg-solid",
|
|
628
|
+
BgWhite = "bg-white",
|
|
623
629
|
BgTransparent = "bg-transparent"
|
|
624
630
|
}
|
|
625
631
|
|
|
@@ -637,7 +643,7 @@ export declare interface InfoBoxProps {
|
|
|
637
643
|
/**
|
|
638
644
|
* The supporting text of the info box (optional).
|
|
639
645
|
*/
|
|
640
|
-
supportingText?:
|
|
646
|
+
supportingText?: React.ReactNode;
|
|
641
647
|
/**
|
|
642
648
|
* The type of the info box.
|
|
643
649
|
*/
|
|
@@ -781,6 +787,7 @@ export declare const IOTA_PRIMITIVES_COLOR_PALETTE: {
|
|
|
781
787
|
warning: {
|
|
782
788
|
'10': string;
|
|
783
789
|
'20': string;
|
|
790
|
+
'60': string;
|
|
784
791
|
'90': string;
|
|
785
792
|
};
|
|
786
793
|
};
|
|
@@ -1123,7 +1130,7 @@ export declare interface SearchProps {
|
|
|
1123
1130
|
/**
|
|
1124
1131
|
* Render suggestion.
|
|
1125
1132
|
*/
|
|
1126
|
-
renderSuggestion
|
|
1133
|
+
renderSuggestion?: (suggestion: Suggestion, index: number) => React.ReactNode;
|
|
1127
1134
|
}
|
|
1128
1135
|
|
|
1129
1136
|
export declare function SegmentedButton({ type, children, shape, }: PropsWithChildren<SegmentedButtonProps>): React.JSX.Element;
|
|
@@ -1322,7 +1329,7 @@ export declare interface Suggestion {
|
|
|
1322
1329
|
type?: string;
|
|
1323
1330
|
}
|
|
1324
1331
|
|
|
1325
|
-
export declare function Table({ paginationOptions, action, supportingLabel, selectedRowIndexes, rowIndexes, children, pageSizeSelector, }: PropsWithChildren<TableProps>): JSX.Element;
|
|
1332
|
+
export declare function Table({ paginationOptions, action, supportingLabel, selectedRowIndexes, rowIndexes, children, pageSizeSelector, heightFull, }: PropsWithChildren<TableProps>): JSX.Element;
|
|
1326
1333
|
|
|
1327
1334
|
export declare function TableActionButton(props: PropsWithChildren<ButtonProps>): JSX_2.Element;
|
|
1328
1335
|
|
|
@@ -1479,6 +1486,10 @@ export declare type TableProps = {
|
|
|
1479
1486
|
* The page size selector component.
|
|
1480
1487
|
*/
|
|
1481
1488
|
pageSizeSelector?: ReactNode;
|
|
1489
|
+
/**
|
|
1490
|
+
* If the table should take the full height of the parent.
|
|
1491
|
+
*/
|
|
1492
|
+
heightFull?: boolean;
|
|
1482
1493
|
};
|
|
1483
1494
|
|
|
1484
1495
|
export declare function TableRow({ children, leading, }: PropsWithChildren<{
|
|
@@ -1527,7 +1538,7 @@ declare interface TextFieldBaseProps extends TextAreaProps, InputWrapperProps {
|
|
|
1527
1538
|
isResizeEnabled?: boolean;
|
|
1528
1539
|
}
|
|
1529
1540
|
|
|
1530
|
-
export declare function Title({ title, subtitle, trailingElement, tooltipText, supportingElement, tooltipPosition, size, }: TitleProps): JSX_2.Element;
|
|
1541
|
+
export declare function Title({ title, subtitle, trailingElement, tooltipText, supportingElement, tooltipPosition, size, testId, }: TitleProps): JSX_2.Element;
|
|
1531
1542
|
|
|
1532
1543
|
declare interface TitleProps {
|
|
1533
1544
|
/**
|
|
@@ -1558,6 +1569,10 @@ declare interface TitleProps {
|
|
|
1558
1569
|
* The size of the component
|
|
1559
1570
|
*/
|
|
1560
1571
|
size?: TitleSize;
|
|
1572
|
+
/**
|
|
1573
|
+
* The 'data-testid' attribute value (used in e2e tests)
|
|
1574
|
+
*/
|
|
1575
|
+
testId?: string;
|
|
1561
1576
|
}
|
|
1562
1577
|
|
|
1563
1578
|
export declare enum TitleSize {
|
|
@@ -1565,6 +1580,53 @@ export declare enum TitleSize {
|
|
|
1565
1580
|
Medium = "medium"
|
|
1566
1581
|
}
|
|
1567
1582
|
|
|
1583
|
+
export declare const Toggle: ForwardRefExoticComponent<ToggleProps & RefAttributes<HTMLInputElement>>;
|
|
1584
|
+
|
|
1585
|
+
export declare enum ToggleLabelPosition {
|
|
1586
|
+
Left = "left",
|
|
1587
|
+
Right = "right"
|
|
1588
|
+
}
|
|
1589
|
+
|
|
1590
|
+
declare interface ToggleProps {
|
|
1591
|
+
/**
|
|
1592
|
+
* The label for the toggle.
|
|
1593
|
+
*/
|
|
1594
|
+
label?: string | React.ReactNode;
|
|
1595
|
+
/**
|
|
1596
|
+
* The state of the toggle (on or off).
|
|
1597
|
+
*/
|
|
1598
|
+
isToggled: boolean;
|
|
1599
|
+
/**
|
|
1600
|
+
* Whether the label should be placed before the toggle.
|
|
1601
|
+
*/
|
|
1602
|
+
labelPosition?: ToggleLabelPosition;
|
|
1603
|
+
/**
|
|
1604
|
+
* If true, the toggle will be disabled.
|
|
1605
|
+
*/
|
|
1606
|
+
isDisabled?: boolean;
|
|
1607
|
+
/**
|
|
1608
|
+
* The callback to call when the toggle state changes.
|
|
1609
|
+
*/
|
|
1610
|
+
onChange?: (isToggled: boolean, event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
1611
|
+
/**
|
|
1612
|
+
* The name and id of the toggle input.
|
|
1613
|
+
*/
|
|
1614
|
+
name?: string;
|
|
1615
|
+
/**
|
|
1616
|
+
* The size of the toggle.
|
|
1617
|
+
*/
|
|
1618
|
+
size?: ToggleSize;
|
|
1619
|
+
/**
|
|
1620
|
+
* The 'data-testid' attribute value (used in e2e tests)
|
|
1621
|
+
*/
|
|
1622
|
+
testId?: string;
|
|
1623
|
+
}
|
|
1624
|
+
|
|
1625
|
+
export declare enum ToggleSize {
|
|
1626
|
+
Small = "small",
|
|
1627
|
+
Default = "default"
|
|
1628
|
+
}
|
|
1629
|
+
|
|
1568
1630
|
export declare function Tooltip({ text, position, maxWidth, children, }: PropsWithChildren<TooltipProps>): React.JSX.Element;
|
|
1569
1631
|
|
|
1570
1632
|
export declare enum TooltipPosition {
|