@iota/apps-ui-kit 0.7.0 → 0.7.2

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.
Files changed (53) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/index.d.ts +51 -25
  3. package/dist/index.es.js +2213 -2151
  4. package/dist/index.es.js.map +1 -1
  5. package/dist/index.umd.js +10 -10
  6. package/dist/index.umd.js.map +1 -1
  7. package/dist/style.css +1 -1
  8. package/package.json +3 -2
  9. package/src/lib/components/atoms/button/Button.tsx +1 -0
  10. package/src/lib/components/atoms/button-segment/ButtonSegment.tsx +1 -1
  11. package/src/lib/components/atoms/checkbox/Checkbox.tsx +0 -1
  12. package/src/lib/components/atoms/index.ts +1 -0
  13. package/src/lib/components/atoms/list-item/ListItem.tsx +1 -1
  14. package/src/lib/components/atoms/radio-button/RadioButton.tsx +1 -1
  15. package/src/lib/components/atoms/skeleton/Skeleton.tsx +5 -20
  16. package/src/lib/components/index.ts +0 -2
  17. package/src/lib/components/molecules/chip/Chip.tsx +51 -17
  18. package/src/lib/components/molecules/chip/chip.classes.ts +36 -14
  19. package/src/lib/components/molecules/chip/chip.enums.ts +6 -3
  20. package/src/lib/components/molecules/input/Input.tsx +34 -17
  21. package/src/lib/components/molecules/input/TextArea.tsx +5 -4
  22. package/src/lib/components/molecules/navbar-item/NavbarItem.tsx +0 -1
  23. package/src/lib/components/molecules/navbar-item/NavbarItemHorizontal.tsx +1 -1
  24. package/src/lib/components/molecules/navbar-item/NavbarItemVertical.tsx +1 -1
  25. package/src/lib/components/molecules/select/Select.tsx +24 -4
  26. package/src/lib/components/organisms/dialog/Dialog.tsx +37 -22
  27. package/src/lib/constants/colors.constants.ts +12 -5
  28. package/src/lib/enums/index.ts +1 -0
  29. package/src/lib/enums/theme.enums.ts +8 -0
  30. package/src/lib/index.ts +2 -0
  31. package/src/lib/styles/base.css +40 -0
  32. package/src/lib/styles/components.css +52 -4
  33. package/src/lib/styles/index.css +4 -753
  34. package/src/lib/styles/utilities.css +11 -3
  35. package/src/lib/styles/variables/dark-variables.css +262 -0
  36. package/src/lib/styles/variables/general-variables.css +9 -0
  37. package/src/lib/styles/variables/light-variables.css +276 -0
  38. package/src/lib/styles/variables/names-variables.css +270 -0
  39. package/src/lib/tailwind/base.presets.ts +4 -0
  40. package/src/lib/tailwind/constants/gradients.constants.ts +6 -0
  41. package/src/storybook/blocks/TypeSet.tsx +3 -3
  42. package/src/storybook/constants/gradients.constants.ts +8 -0
  43. package/src/storybook/helpers/formatGradientNames.ts +15 -0
  44. package/src/storybook/stories/atoms/Skeleton.stories.tsx +5 -5
  45. package/src/storybook/stories/components/DocsSyncTheme.tsx +20 -0
  46. package/src/storybook/stories/components/index.ts +1 -0
  47. package/src/storybook/stories/design-tokens/colors.stories.mdx +12 -0
  48. package/src/storybook/stories/design-tokens/icons.stories.mdx +2 -0
  49. package/src/storybook/stories/design-tokens/typeset.stories.mdx +2 -0
  50. package/src/storybook/stories/design-tokens/variable-spacing.stories.mdx +2 -1
  51. package/src/storybook/stories/molecules/Chip.stories.tsx +5 -0
  52. package/src/storybook/stories/molecules/Input.stories.tsx +79 -2
  53. package/src/storybook/stories/organisms/Dialog.stories.tsx +54 -28
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # @iota/apps-ui-kit
2
2
 
3
+ ## 0.7.2
4
+
5
+ ### Patch Changes
6
+
7
+ - f5b6b19: Allow using defaultValue to avoid react warning
8
+
9
+ ## 0.7.1
10
+
11
+ ### Patch Changes
12
+
13
+ - b3b2b4b: fix double scroll bar in the select component
14
+ - 5a3fd67: remove gradient from outline button & add CSS classes to components
15
+ - 8b8bf41: Improve typeset for the names theme
16
+ - 4a25f42: Add supportingValue to input
17
+ - 23c13dc: add new state-layer-secondary
18
+ - 4e7d5ae: Add colors for iota names
19
+ - eebb4f5: add gradient border to outline button
20
+ - c7ba8c4: export SecondaryText component
21
+ - Updated dependencies [3d09899]
22
+ - @iota/apps-ui-icons@0.4.1
23
+
3
24
  ## 0.7.0
4
25
 
5
26
  ### Minor Changes
package/dist/index.d.ts CHANGED
@@ -4,6 +4,7 @@ import { ButtonSegmentType as ButtonSegmentType_2 } from '../../../../components
4
4
  import { ButtonType as ButtonType_2 } from '../../../../components/atoms/button';
5
5
  import { ComponentProps } from 'react';
6
6
  import { Config } from 'tailwindcss';
7
+ import { default as default_2 } from 'react';
7
8
  import { DetailedHTMLProps } from 'react';
8
9
  import { ForwardRefExoticComponent } from 'react';
9
10
  import { ImgHTMLAttributes } from 'react';
@@ -225,7 +226,7 @@ export declare interface BaseInputProps extends InputWrapperProps {
225
226
  /**
226
227
  * A leading icon that is shown before the input
227
228
  */
228
- leadingIcon?: React.JSX.Element;
229
+ leadingIcon?: React.ReactNode;
229
230
  /**
230
231
  * Supporting text that is shown at the end of the input component.
231
232
  */
@@ -237,7 +238,7 @@ export declare interface BaseInputProps extends InputWrapperProps {
237
238
  /**
238
239
  * Trailing element that is shown after the input
239
240
  */
240
- trailingElement?: React.JSX.Element;
241
+ trailingElement?: React.ReactNode;
241
242
  /**
242
243
  * Is the content of the input visible
243
244
  */
@@ -246,6 +247,10 @@ export declare interface BaseInputProps extends InputWrapperProps {
246
247
  * Value of the input
247
248
  */
248
249
  value?: string | number;
250
+ /**
251
+ * Text that is shown below the value of the input.
252
+ */
253
+ supportingValue?: string | null;
249
254
  /**
250
255
  * Default value of the input
251
256
  */
@@ -485,7 +490,7 @@ declare interface CheckboxProps {
485
490
  name?: string;
486
491
  }
487
492
 
488
- export declare function Chip({ label, showClose, selected, onClose, onClick, avatar, leadingElement, trailingElement, disabled, size, }: ChipProps): JSX_2.Element;
493
+ export declare function Chip({ label, type, selected, showClose, onClose, onClick, avatar, leadingElement, trailingElement, disabled, size, }: ChipProps): JSX_2.Element;
489
494
 
490
495
  declare interface ChipProps {
491
496
  /**
@@ -524,6 +529,10 @@ declare interface ChipProps {
524
529
  * The button is disabled or not.
525
530
  */
526
531
  disabled?: boolean;
532
+ /**
533
+ * The type of the Chip
534
+ */
535
+ type?: ChipType;
527
536
  /**
528
537
  * The size of the chip.
529
538
  */
@@ -535,9 +544,12 @@ export declare enum ChipSize {
535
544
  Default = "default"
536
545
  }
537
546
 
538
- export declare enum ChipState {
539
- Default = "default",
540
- Selected = "selected"
547
+ export declare enum ChipType {
548
+ Outline = "outline",
549
+ Elevated = "elevated",
550
+ Success = "success",
551
+ Brand = "brand",
552
+ Error = "error"
541
553
  }
542
554
 
543
555
  declare interface CustomAssetDisplayProps {
@@ -558,6 +570,7 @@ export declare const DialogContent: React_2.ForwardRefExoticComponent<Omit<Radix
558
570
  showCloseOnOverlay?: boolean;
559
571
  position?: DialogPosition;
560
572
  customWidth?: string;
573
+ isFixedPosition?: boolean;
561
574
  } & React_2.RefAttributes<HTMLDivElement>>;
562
575
 
563
576
  export declare enum DialogPosition {
@@ -867,11 +880,11 @@ export declare const IOTA_NAMES_COLOR_PALETTE: {
867
880
  '98': string;
868
881
  '100': string;
869
882
  };
870
- 'names-gradient': {
871
- 'stop-1': string;
872
- 'stop-2': string;
873
- 'stop-3': string;
874
- 'stop-4': string;
883
+ 'names-solid': {
884
+ blue: string;
885
+ purple: string;
886
+ green: string;
887
+ neutral: string;
875
888
  };
876
889
  'names-warning': {
877
890
  '0': string;
@@ -1314,6 +1327,19 @@ export declare interface SearchProps {
1314
1327
  renderSuggestion?: (suggestion: Suggestion, index: number) => React.ReactNode;
1315
1328
  }
1316
1329
 
1330
+ export declare function SecondaryText({ children, hasErrorStyles }: SecondaryTextProps): JSX_2.Element;
1331
+
1332
+ declare interface SecondaryTextProps {
1333
+ /**
1334
+ * The children to render.
1335
+ */
1336
+ children: React.ReactNode;
1337
+ /**
1338
+ * Should the text have error styles.
1339
+ */
1340
+ hasErrorStyles?: boolean;
1341
+ }
1342
+
1317
1343
  export declare function SegmentedButton({ type, children, shape, }: PropsWithChildren<SegmentedButtonProps>): React.JSX.Element;
1318
1344
 
1319
1345
  declare interface SegmentedButtonProps {
@@ -1407,6 +1433,7 @@ export declare const SHADER_COLOR_PALETTE: {
1407
1433
  '16': string;
1408
1434
  '48': string;
1409
1435
  '72': string;
1436
+ '100': string;
1410
1437
  };
1411
1438
  'shader-inverted-dark': {
1412
1439
  '0': string;
@@ -1415,6 +1442,7 @@ export declare const SHADER_COLOR_PALETTE: {
1415
1442
  '16': string;
1416
1443
  '48': string;
1417
1444
  '72': string;
1445
+ '100': string;
1418
1446
  };
1419
1447
  'shader-neutral-dark': {
1420
1448
  '0': string;
@@ -1423,6 +1451,7 @@ export declare const SHADER_COLOR_PALETTE: {
1423
1451
  '16': string;
1424
1452
  '48': string;
1425
1453
  '72': string;
1454
+ '100': string;
1426
1455
  };
1427
1456
  'shader-primary-light': {
1428
1457
  0: string;
@@ -1431,6 +1460,7 @@ export declare const SHADER_COLOR_PALETTE: {
1431
1460
  16: string;
1432
1461
  48: string;
1433
1462
  72: string;
1463
+ 100: string;
1434
1464
  };
1435
1465
  'shader-inverted-light': {
1436
1466
  0: string;
@@ -1439,6 +1469,7 @@ export declare const SHADER_COLOR_PALETTE: {
1439
1469
  16: string;
1440
1470
  48: string;
1441
1471
  72: string;
1472
+ 100: string;
1442
1473
  };
1443
1474
  'shader-neutral-light': {
1444
1475
  0: string;
@@ -1447,28 +1478,17 @@ export declare const SHADER_COLOR_PALETTE: {
1447
1478
  16: string;
1448
1479
  48: string;
1449
1480
  72: string;
1481
+ 100: string;
1450
1482
  };
1451
1483
  };
1452
1484
 
1453
- export declare function Skeleton({ children, widthClass, heightClass, hasSecondaryColors, isRounded, }: React.PropsWithChildren<SkeletonLoaderProps>): React.JSX.Element;
1485
+ export declare function Skeleton({ children, className, hasSecondaryColors, }: default_2.PropsWithChildren<SkeletonLoaderProps>): default_2.JSX.Element;
1454
1486
 
1455
- declare interface SkeletonLoaderProps {
1456
- /**
1457
- * Width class for the skeleton div.
1458
- */
1459
- widthClass?: string;
1460
- /**
1461
- * Height class for the skeleton div.
1462
- */
1463
- heightClass?: string;
1487
+ declare interface SkeletonLoaderProps extends Pick<default_2.HTMLAttributes<HTMLDivElement>, 'className'> {
1464
1488
  /**
1465
1489
  * If true, the skeleton will use darker neutral colors.
1466
1490
  */
1467
1491
  hasSecondaryColors?: boolean;
1468
- /**
1469
- * Whether the class `rounded-full` should be applied. Defaults to true.
1470
- */
1471
- isRounded?: boolean;
1472
1492
  }
1473
1493
 
1474
1494
  export declare function Snackbar({ text, duration, onClose, showClose, type, }: SnackbarProps): JSX_2.Element;
@@ -1832,6 +1852,12 @@ export declare const uiKitResponsivePreset: Config;
1832
1852
 
1833
1853
  export declare const uiKitStaticPreset: Config;
1834
1854
 
1855
+ export declare enum UIKitTheme {
1856
+ Light = "light",
1857
+ Dark = "dark",
1858
+ Names = "names"
1859
+ }
1860
+
1835
1861
  export declare enum ValueSize {
1836
1862
  Small = "small",
1837
1863
  Medium = "medium"