@udixio/ui-react 0.1.2 → 0.2.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.
Files changed (70) hide show
  1. package/CHANGELOG.md +0 -10
  2. package/dist/index.cjs +2 -2
  3. package/dist/index.js +1164 -1181
  4. package/dist/lib/components/Button.d.ts +4 -2
  5. package/dist/lib/components/Button.d.ts.map +1 -1
  6. package/dist/lib/components/Card.d.ts +5 -0
  7. package/dist/lib/components/Card.d.ts.map +1 -1
  8. package/dist/lib/components/Carousel.d.ts +6 -0
  9. package/dist/lib/components/Carousel.d.ts.map +1 -1
  10. package/dist/lib/components/CarouselItem.d.ts +4 -0
  11. package/dist/lib/components/CarouselItem.d.ts.map +1 -1
  12. package/dist/lib/components/{Divided.d.ts → Divider.d.ts} +6 -1
  13. package/dist/lib/components/Divider.d.ts.map +1 -0
  14. package/dist/lib/components/Fab.d.ts +5 -0
  15. package/dist/lib/components/Fab.d.ts.map +1 -1
  16. package/dist/lib/components/IconButton.d.ts +6 -1
  17. package/dist/lib/components/IconButton.d.ts.map +1 -1
  18. package/dist/lib/components/NavigationRail.d.ts +5 -0
  19. package/dist/lib/components/NavigationRail.d.ts.map +1 -1
  20. package/dist/lib/components/NavigationRailItem.d.ts +8 -0
  21. package/dist/lib/components/NavigationRailItem.d.ts.map +1 -1
  22. package/dist/lib/components/ProgressIndicator.d.ts +4 -0
  23. package/dist/lib/components/ProgressIndicator.d.ts.map +1 -1
  24. package/dist/lib/components/Slider.d.ts +5 -0
  25. package/dist/lib/components/Slider.d.ts.map +1 -1
  26. package/dist/lib/components/Snackbar.d.ts +5 -0
  27. package/dist/lib/components/Snackbar.d.ts.map +1 -1
  28. package/dist/lib/components/Switch.d.ts +5 -0
  29. package/dist/lib/components/Switch.d.ts.map +1 -1
  30. package/dist/lib/components/Tab.d.ts +4 -0
  31. package/dist/lib/components/Tab.d.ts.map +1 -1
  32. package/dist/lib/components/Tabs.d.ts +5 -0
  33. package/dist/lib/components/Tabs.d.ts.map +1 -1
  34. package/dist/lib/components/TextField.d.ts +5 -0
  35. package/dist/lib/components/TextField.d.ts.map +1 -1
  36. package/dist/lib/components/ToolTip.d.ts +5 -0
  37. package/dist/lib/components/ToolTip.d.ts.map +1 -1
  38. package/dist/lib/components/index.d.ts +1 -1
  39. package/dist/lib/effects/SyncedFixedWrapper.d.ts.map +1 -1
  40. package/dist/lib/interfaces/button.interface.d.ts +5 -0
  41. package/dist/lib/interfaces/button.interface.d.ts.map +1 -1
  42. package/dist/lib/interfaces/icon-button.interface.d.ts +1 -1
  43. package/dist/lib/interfaces/icon-button.interface.d.ts.map +1 -1
  44. package/dist/lib/styles/button.style.d.ts +14 -4
  45. package/dist/lib/styles/button.style.d.ts.map +1 -1
  46. package/dist/lib/styles/icon-button.style.d.ts +4 -4
  47. package/package.json +2 -2
  48. package/src/lib/components/Button.tsx +42 -15
  49. package/src/lib/components/Card.tsx +5 -0
  50. package/src/lib/components/Carousel.tsx +12 -6
  51. package/src/lib/components/CarouselItem.tsx +6 -1
  52. package/src/lib/components/{Divided.tsx → Divider.tsx} +5 -0
  53. package/src/lib/components/Fab.tsx +6 -1
  54. package/src/lib/components/IconButton.tsx +12 -7
  55. package/src/lib/components/NavigationRail.tsx +40 -41
  56. package/src/lib/components/NavigationRailItem.tsx +8 -0
  57. package/src/lib/components/ProgressIndicator.tsx +8 -2
  58. package/src/lib/components/Slider.tsx +5 -0
  59. package/src/lib/components/Snackbar.tsx +7 -2
  60. package/src/lib/components/Switch.tsx +5 -0
  61. package/src/lib/components/Tab.tsx +4 -0
  62. package/src/lib/components/Tabs.tsx +8 -3
  63. package/src/lib/components/TextField.tsx +8 -3
  64. package/src/lib/components/ToolTip.tsx +8 -8
  65. package/src/lib/components/index.ts +1 -1
  66. package/src/lib/effects/SyncedFixedWrapper.tsx +0 -2
  67. package/src/lib/interfaces/button.interface.ts +6 -0
  68. package/src/lib/interfaces/icon-button.interface.ts +1 -1
  69. package/src/lib/styles/button.style.ts +27 -48
  70. package/dist/lib/components/Divided.d.ts.map +0 -1
@@ -1,7 +1,9 @@
1
1
  import { ReactProps } from '../utils';
2
2
  import { ButtonInterface } from '../interfaces';
3
3
  /**
4
- * The Button component is a versatile component that can be used to trigger actions or to navigate to different sections of the application
4
+ * Buttons prompt most actions in a UI
5
+ * @status beta
6
+ * @category Action
5
7
  */
6
- export declare const Button: ({ variant, disabled, icon, href, label, className, iconPosition, loading, shape, onClick, ref, size, allowShapeTransformation, transition, ...restProps }: ReactProps<ButtonInterface>) => import("react/jsx-runtime").JSX.Element;
8
+ export declare const Button: ({ variant, disabled, icon, href, label, className, iconPosition, loading, shape, onClick, onToggle, activated, ref, size, allowShapeTransformation, transition, children, ...restProps }: ReactProps<ButtonInterface>) => import("react/jsx-runtime").JSX.Element;
7
9
  //# sourceMappingURL=Button.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/lib/components/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,UAAU,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAOhD;;GAEG;AACH,eAAO,MAAM,MAAM,GAAI,2JAgBpB,UAAU,CAAC,eAAe,CAAC,4CAgH7B,CAAC"}
1
+ {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/lib/components/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,UAAU,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAOhD;;;;GAIG;AACH,eAAO,MAAM,MAAM,GAAI,0LAmBpB,UAAU,CAAC,eAAe,CAAC,4CAsI7B,CAAC"}
@@ -1,4 +1,9 @@
1
1
  import { CardInterface } from '../interfaces';
2
2
  import { ReactProps } from '../utils';
3
+ /**
4
+ * Cards display content and actions about a single subject
5
+ * @status beta
6
+ * @category Layout
7
+ */
3
8
  export declare const Card: ({ variant, className, children, isInteractive, ref, ...rest }: ReactProps<CardInterface>) => import("react/jsx-runtime").JSX.Element;
4
9
  //# sourceMappingURL=Card.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../src/lib/components/Card.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,eAAO,MAAM,IAAI,GAAI,+DAOlB,UAAU,CAAC,aAAa,CAAC,4CAgB3B,CAAC"}
1
+ {"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../src/lib/components/Card.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC;;;;GAIG;AACH,eAAO,MAAM,IAAI,GAAI,+DAOlB,UAAU,CAAC,aAAa,CAAC,4CAgB3B,CAAC"}
@@ -1,4 +1,10 @@
1
1
  import { CarouselInterface } from '../interfaces';
2
2
  import { ReactProps } from '../utils';
3
+ /**
4
+ * Carousels show a collection of items that can be scrolled on and off the screen
5
+ * Resources
6
+ * @status beta
7
+ * @category Layout
8
+ */
3
9
  export declare const Carousel: ({ variant, className, children, ref: optionalRef, marginPourcent, inputRange, outputRange, gap, onChange, scrollSensitivity, ...restProps }: ReactProps<CarouselInterface>) => import("react/jsx-runtime").JSX.Element;
4
10
  //# sourceMappingURL=Carousel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Carousel.d.ts","sourceRoot":"","sources":["../../../src/lib/components/Carousel.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAyB,MAAM,eAAe,CAAC;AAMzE,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAGtC,eAAO,MAAM,QAAQ,GAAI,6IAYtB,UAAU,CAAC,iBAAiB,CAAC,4CAuK/B,CAAC"}
1
+ {"version":3,"file":"Carousel.d.ts","sourceRoot":"","sources":["../../../src/lib/components/Carousel.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAyB,MAAM,eAAe,CAAC;AAMzE,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAGtC;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,GAAI,6IAYtB,UAAU,CAAC,iBAAiB,CAAC,4CAuK/B,CAAC"}
@@ -1,5 +1,9 @@
1
1
  import { CarouselItemInterface } from '../interfaces';
2
2
  import { MotionProps } from '../utils';
3
3
  export declare const normalize: (value: number, inputRange: [number, number], outputRange?: [number, number]) => number;
4
+ /**
5
+ * @status beta
6
+ * @parent Carousel
7
+ */
4
8
  export declare const CarouselItem: ({ className, children, width, index, ref: optionalRef, ...restProps }: MotionProps<CarouselItemInterface>) => import("react/jsx-runtime").JSX.Element;
5
9
  //# sourceMappingURL=CarouselItem.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CarouselItem.d.ts","sourceRoot":"","sources":["../../../src/lib/components/CarouselItem.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAGtD,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC,eAAO,MAAM,SAAS,GACpB,OAAO,MAAM,EACb,YAAY,CAAC,MAAM,EAAE,MAAM,CAAC,EAC5B,cAAa,CAAC,MAAM,EAAE,MAAM,CAAU,KACrC,MASF,CAAC;AACF,eAAO,MAAM,YAAY,GAAI,uEAO1B,WAAW,CAAC,qBAAqB,CAAC,4CAyBpC,CAAC"}
1
+ {"version":3,"file":"CarouselItem.d.ts","sourceRoot":"","sources":["../../../src/lib/components/CarouselItem.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAGtD,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC,eAAO,MAAM,SAAS,GACpB,OAAO,MAAM,EACb,YAAY,CAAC,MAAM,EAAE,MAAM,CAAC,EAC5B,cAAa,CAAC,MAAM,EAAE,MAAM,CAAU,KACrC,MASF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,YAAY,GAAI,uEAO1B,WAAW,CAAC,qBAAqB,CAAC,4CAyBpC,CAAC"}
@@ -1,4 +1,9 @@
1
1
  import { DividerInterface } from '../interfaces';
2
2
  import { ReactProps } from '../utils';
3
+ /**
4
+ * Dividers are thin lines that group content in lists or other containers
5
+ * @status beta
6
+ * @category Layout
7
+ */
3
8
  export declare const Divider: ({ orientation, className, ...restProps }: ReactProps<DividerInterface>) => import("react/jsx-runtime").JSX.Element;
4
- //# sourceMappingURL=Divided.d.ts.map
9
+ //# sourceMappingURL=Divider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Divider.d.ts","sourceRoot":"","sources":["../../../src/lib/components/Divider.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC;;;;GAIG;AACH,eAAO,MAAM,OAAO,GAAI,0CAIrB,UAAU,CAAC,gBAAgB,CAAC,4CAI9B,CAAC"}
@@ -1,4 +1,9 @@
1
1
  import { FabInterface } from '../interfaces/fab.interface';
2
2
  import { ReactProps } from '../utils/component';
3
+ /**
4
+ * Floating action buttons (FABs) help people take primary actions
5
+ * @status beta
6
+ * @category Action
7
+ */
3
8
  export declare const Fab: ({ className, label, variant, size, href, type, icon, isExtended, ref, transition, ...restProps }: ReactProps<FabInterface>) => import("react/jsx-runtime").JSX.Element;
4
9
  //# sourceMappingURL=Fab.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Fab.d.ts","sourceRoot":"","sources":["../../../src/lib/components/Fab.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAG3D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGhD,eAAO,MAAM,GAAG,GAAI,kGAYjB,UAAU,CAAC,YAAY,CAAC,4CAqF1B,CAAC"}
1
+ {"version":3,"file":"Fab.d.ts","sourceRoot":"","sources":["../../../src/lib/components/Fab.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAG3D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGhD;;;;GAIG;AACH,eAAO,MAAM,GAAG,GAAI,kGAYjB,UAAU,CAAC,YAAY,CAAC,4CAqF1B,CAAC"}
@@ -1,5 +1,10 @@
1
1
  import { IconButtonInterface } from '../interfaces/icon-button.interface';
2
2
  import { ReactProps } from '../utils/component';
3
3
  export type IconButtonVariant = 'standard' | 'filled' | 'tonal' | 'outlined';
4
- export declare const IconButton: ({ variant, href, disabled, type, title, arialLabel, onToggle, activated, onClick, icon, size, iconSelected, className, ref, width, shape, allowShapeTransformation, transition, ...restProps }: ReactProps<IconButtonInterface>) => import("react/jsx-runtime").JSX.Element;
4
+ /**
5
+ * Icon buttons help people take minor actions with one tap
6
+ * @status beta
7
+ * @category Action
8
+ */
9
+ export declare const IconButton: ({ variant, href, disabled, type, title, ariaLabel, onToggle, activated, onClick, icon, size, iconSelected, className, ref, width, shape, allowShapeTransformation, transition, ...restProps }: ReactProps<IconButtonInterface>) => import("react/jsx-runtime").JSX.Element;
5
10
  //# sourceMappingURL=IconButton.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../src/lib/components/IconButton.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAE1E,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAKhD,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG,QAAQ,GAAG,OAAO,GAAG,UAAU,CAAC;AAE7E,eAAO,MAAM,UAAU,GAAI,gMAoBxB,UAAU,CAAC,mBAAmB,CAAC,4CA4GjC,CAAC"}
1
+ {"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../src/lib/components/IconButton.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAE1E,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAKhD,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG,QAAQ,GAAG,OAAO,GAAG,UAAU,CAAC;AAE7E;;;;GAIG;AACH,eAAO,MAAM,UAAU,GAAI,+LAoBxB,UAAU,CAAC,mBAAmB,CAAC,4CA4GjC,CAAC"}
@@ -1,4 +1,9 @@
1
1
  import { ReactProps } from '../utils';
2
2
  import { NavigationRailInterface } from '../interfaces/navigation-rail.interface';
3
+ /**
4
+ * Navigation rails let people switch between UI views on mid-sized devices
5
+ * @status beta
6
+ * @category Navigation
7
+ */
3
8
  export declare const NavigationRail: ({ variant, onItemSelected, children, className, selectedItem: externalSelectedItem, extended, alignment, menu, style, onExtendedChange, transition, setSelectedItem: externalSetSelectedItem, }: ReactProps<NavigationRailInterface>) => import("react/jsx-runtime").JSX.Element;
4
9
  //# sourceMappingURL=NavigationRail.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"NavigationRail.d.ts","sourceRoot":"","sources":["../../../src/lib/components/NavigationRail.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAOtC,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAKlF,eAAO,MAAM,cAAc,GAAI,iMAsB5B,UAAU,CAAC,uBAAuB,CAAC,4CA8IrC,CAAC"}
1
+ {"version":3,"file":"NavigationRail.d.ts","sourceRoot":"","sources":["../../../src/lib/components/NavigationRail.tsx"],"names":[],"mappings":"AAYA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAItC,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAKlF;;;;GAIG;AACH,eAAO,MAAM,cAAc,GAAI,iMAsB5B,UAAU,CAAC,uBAAuB,CAAC,4CAgIrC,CAAC"}
@@ -1,7 +1,15 @@
1
1
  import { ReactProps } from '../utils';
2
2
  import { NavigationRailItemInterface } from '../interfaces';
3
+ /**
4
+ * @status beta
5
+ * @parent NavigationRail
6
+ */
3
7
  export declare const NavigationRailSection: ({ label }: {
4
8
  label: string;
5
9
  }) => import("react/jsx-runtime").JSX.Element;
10
+ /**
11
+ * @status beta
12
+ * @parent NavigationRail
13
+ */
6
14
  export declare const NavigationRailItem: ({ className, onClick, label, variant, href, icon, selectedItem, setSelectedItem, index, onItemSelected, selected, ref, transition, isExtended, iconSelected, style, extendedOnly, ...restProps }: ReactProps<NavigationRailItemInterface>) => import("react/jsx-runtime").JSX.Element | null;
7
15
  //# sourceMappingURL=NavigationRailItem.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"NavigationRailItem.d.ts","sourceRoot":"","sources":["../../../src/lib/components/NavigationRailItem.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAI5D,eAAO,MAAM,qBAAqB,GAAI,WAAW;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,4CAMjE,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,kMAmBhC,UAAU,CAAC,2BAA2B,CAAC,mDAmKzC,CAAC"}
1
+ {"version":3,"file":"NavigationRailItem.d.ts","sourceRoot":"","sources":["../../../src/lib/components/NavigationRailItem.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAI5D;;;GAGG;AACH,eAAO,MAAM,qBAAqB,GAAI,WAAW;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,4CAMjE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,GAAI,kMAmBhC,UAAU,CAAC,2BAA2B,CAAC,mDAmKzC,CAAC"}
@@ -1,4 +1,8 @@
1
1
  import { ProgressIndicatorInterface } from '../interfaces/progress-indicator.interface';
2
2
  import { ReactProps } from '../utils/component';
3
+ /**
4
+ * @status beta
5
+ * @category Communication
6
+ */
3
7
  export declare const ProgressIndicator: ({ variant, minHeight, value, transitionDuration, className, ...restProps }: ReactProps<ProgressIndicatorInterface>) => any;
4
8
  //# sourceMappingURL=ProgressIndicator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ProgressIndicator.d.ts","sourceRoot":"","sources":["../../../src/lib/components/ProgressIndicator.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AAIxF,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,eAAO,MAAM,iBAAiB,GAAI,4EAO/B,UAAU,CAAC,0BAA0B,CAAC,KAAG,GA8I3C,CAAC"}
1
+ {"version":3,"file":"ProgressIndicator.d.ts","sourceRoot":"","sources":["../../../src/lib/components/ProgressIndicator.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AAIxF,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD;;;GAGG;AACH,eAAO,MAAM,iBAAiB,GAAI,4EAO/B,UAAU,CAAC,0BAA0B,CAAC,KAAG,GAgJ3C,CAAC"}
@@ -1,4 +1,9 @@
1
1
  import { SliderInterface } from '../interfaces';
2
2
  import { ReactProps } from '../utils';
3
+ /**
4
+ * Sliders let users make selections from a range of values
5
+ * @status beta
6
+ * @category Input
7
+ */
3
8
  export declare const Slider: ({ className, valueFormatter, step, name, value: defaultValue, min, max, marks, ref, onChange, ...restProps }: ReactProps<SliderInterface>) => import("react/jsx-runtime").JSX.Element;
4
9
  //# sourceMappingURL=Slider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Slider.d.ts","sourceRoot":"","sources":["../../../src/lib/components/Slider.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,OAAO,EAAc,UAAU,EAAE,MAAM,UAAU,CAAC;AAGlD,eAAO,MAAM,MAAM,GAAI,8GAqBpB,UAAU,CAAC,eAAe,CAAC,4CA6U7B,CAAC"}
1
+ {"version":3,"file":"Slider.d.ts","sourceRoot":"","sources":["../../../src/lib/components/Slider.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,OAAO,EAAc,UAAU,EAAE,MAAM,UAAU,CAAC;AAGlD;;;;GAIG;AACH,eAAO,MAAM,MAAM,GAAI,8GAqBpB,UAAU,CAAC,eAAe,CAAC,4CA6U7B,CAAC"}
@@ -1,4 +1,9 @@
1
1
  import { SnackbarInterface } from '../interfaces/snackbar.interface';
2
2
  import { MotionProps } from '../utils/component';
3
+ /**
4
+ * Snackbars show short updates about app processes at the bottom of the screen
5
+ * @status beta
6
+ * @category Communication
7
+ */
3
8
  export declare const Snackbar: ({ supportingText, className, duration, closeIcon, onClose, ...restProps }: MotionProps<SnackbarInterface>) => import("react/jsx-runtime").JSX.Element;
4
9
  //# sourceMappingURL=Snackbar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Snackbar.d.ts","sourceRoot":"","sources":["../../../src/lib/components/Snackbar.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAGrE,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGjD,eAAO,MAAM,QAAQ,GAAI,2EAOtB,WAAW,CAAC,iBAAiB,CAAC,4CAiDhC,CAAC"}
1
+ {"version":3,"file":"Snackbar.d.ts","sourceRoot":"","sources":["../../../src/lib/components/Snackbar.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAGrE,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGjD;;;;GAIG;AACH,eAAO,MAAM,QAAQ,GAAI,2EAOtB,WAAW,CAAC,iBAAiB,CAAC,4CAiDhC,CAAC"}
@@ -1,4 +1,9 @@
1
1
  import { SwitchInterface } from '../interfaces/switch.interface';
2
2
  import { MotionProps } from '../utils/component';
3
+ /**
4
+ * Switches toggle the selection of an item on or off
5
+ * @status beta
6
+ * @category Input
7
+ */
3
8
  export declare const Switch: ({ selected, className, activeIcon, disabled, inactiveIcon, onChange, onClick, onKeyDown, ref, ...restProps }: MotionProps<SwitchInterface>) => import("react/jsx-runtime").JSX.Element;
4
9
  //# sourceMappingURL=Switch.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../../src/lib/components/Switch.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAEjE,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,eAAO,MAAM,MAAM,GAAI,8GAWpB,WAAW,CAAC,eAAe,CAAC,4CA0E9B,CAAC"}
1
+ {"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../../src/lib/components/Switch.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAEjE,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD;;;;GAIG;AACH,eAAO,MAAM,MAAM,GAAI,8GAWpB,WAAW,CAAC,eAAe,CAAC,4CA0E9B,CAAC"}
@@ -1,4 +1,8 @@
1
1
  import { TabInterface } from '../interfaces/tab.interface';
2
2
  import { ReactProps } from '../utils/component';
3
+ /**
4
+ * @status beta
5
+ * @parent Tabs
6
+ */
3
7
  export declare const Tab: ({ className, onClick, label, variant, href, icon, selectedTab, setSelectedTab, tabsId, index, onTabSelected, scrollable, selected, ref, ...restProps }: ReactProps<TabInterface>) => import("react/jsx-runtime").JSX.Element;
4
8
  //# sourceMappingURL=Tab.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tab.d.ts","sourceRoot":"","sources":["../../../src/lib/components/Tab.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,eAAO,MAAM,GAAG,GAAI,wJAgBjB,UAAU,CAAC,YAAY,CAAC,4CAoF1B,CAAC"}
1
+ {"version":3,"file":"Tab.d.ts","sourceRoot":"","sources":["../../../src/lib/components/Tab.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD;;;GAGG;AACH,eAAO,MAAM,GAAG,GAAI,wJAgBjB,UAAU,CAAC,YAAY,CAAC,4CAoF1B,CAAC"}
@@ -1,4 +1,9 @@
1
1
  import { TabsInterface } from '../interfaces/tabs.interface';
2
2
  import { ReactProps } from '../utils/component';
3
+ /**
4
+ * Tabs organize content across different screens and views
5
+ * @status beta
6
+ * @category Navigation
7
+ */
3
8
  export declare const Tabs: ({ variant, onTabSelected, children, className, selectedTab: externalSelectedTab, setSelectedTab: externalSetSelectedTab, scrollable, }: ReactProps<TabsInterface>) => import("react/jsx-runtime").JSX.Element;
4
9
  //# sourceMappingURL=Tabs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../../src/lib/components/Tabs.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAG7D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAIhD,eAAO,MAAM,IAAI,GAAI,wIAQlB,UAAU,CAAC,aAAa,CAAC,4CAmE3B,CAAC"}
1
+ {"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../../src/lib/components/Tabs.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAG7D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAIhD;;;;GAIG;AACH,eAAO,MAAM,IAAI,GAAI,wIAQlB,UAAU,CAAC,aAAa,CAAC,4CAmE3B,CAAC"}
@@ -1,4 +1,9 @@
1
1
  import { ReactProps } from '../utils/component';
2
2
  import { TextFieldInterface } from '../interfaces/text-field.interface';
3
+ /**
4
+ * Text fields let users enter text into a UI
5
+ * @status beta
6
+ * @category Input
7
+ */
3
8
  export declare const TextField: ({ variant, disabled, errorText, placeholder, suffix, name, label, className, supportingText, trailingIcon, leadingIcon, type, textLine, autoComplete, onChange, value: defaultValue, showSupportingText: defaultShowSupportingText, ...restProps }: ReactProps<TextFieldInterface>) => import("react/jsx-runtime").JSX.Element;
4
9
  //# sourceMappingURL=TextField.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TextField.d.ts","sourceRoot":"","sources":["../../../src/lib/components/TextField.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAExE,eAAO,MAAM,SAAS,GAAI,oPAmBvB,UAAU,CAAC,kBAAkB,CAAC,4CA6OhC,CAAC"}
1
+ {"version":3,"file":"TextField.d.ts","sourceRoot":"","sources":["../../../src/lib/components/TextField.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAExE;;;;GAIG;AACH,eAAO,MAAM,SAAS,GAAI,oPAmBvB,UAAU,CAAC,kBAAkB,CAAC,4CA6OhC,CAAC"}
@@ -1,4 +1,9 @@
1
1
  import { MotionProps } from '../utils';
2
2
  import { ToolTipInterface } from '../interfaces';
3
+ /**
4
+ * Tooltips display brief labels or messages
5
+ * @status beta
6
+ * @category Communication
7
+ */
3
8
  export declare const ToolTip: ({ variant, buttons, className, children, title, text, position, targetRef, ref, trigger, ...props }: MotionProps<ToolTipInterface>) => import("react/jsx-runtime").JSX.Element;
4
9
  //# sourceMappingURL=ToolTip.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ToolTip.d.ts","sourceRoot":"","sources":["../../../src/lib/components/ToolTip.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAMjD,eAAO,MAAM,OAAO,GAAI,qGAYrB,WAAW,CAAC,gBAAgB,CAAC,4CA4M/B,CAAC"}
1
+ {"version":3,"file":"ToolTip.d.ts","sourceRoot":"","sources":["../../../src/lib/components/ToolTip.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAMjD;;;;GAIG;AACH,eAAO,MAAM,OAAO,GAAI,qGAYrB,WAAW,CAAC,gBAAgB,CAAC,4CA6M/B,CAAC"}
@@ -3,7 +3,7 @@ export * from './Card';
3
3
  export * from './Carousel';
4
4
  export * from './CarouselItem';
5
5
  export * from './CarouselItem';
6
- export * from './Divided';
6
+ export * from './Divider';
7
7
  export * from './Fab';
8
8
  export * from './IconButton';
9
9
  export * from './IconButton';
@@ -1 +1 @@
1
- {"version":3,"file":"SyncedFixedWrapper.d.ts","sourceRoot":"","sources":["../../../src/lib/effects/SyncedFixedWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,SAAS,EACd,KAAK,SAAS,EAIf,MAAM,OAAO,CAAC;AAGf,KAAK,uBAAuB,GAAG;IAC7B,SAAS,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC;IAC1B,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,0BAGhC,uBAAuB,uCA8CzB,CAAC"}
1
+ {"version":3,"file":"SyncedFixedWrapper.d.ts","sourceRoot":"","sources":["../../../src/lib/effects/SyncedFixedWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,SAAS,EACd,KAAK,SAAS,EAIf,MAAM,OAAO,CAAC;AAGf,KAAK,uBAAuB,GAAG;IAC7B,SAAS,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC;IAC1B,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,0BAGhC,uBAAuB,uCA4CzB,CAAC"}
@@ -27,10 +27,15 @@ type Props = {
27
27
  shape?: 'squared' | 'rounded';
28
28
  allowShapeTransformation?: boolean;
29
29
  transition?: Transition;
30
+ onToggle?: (isActive: boolean) => void;
31
+ activated?: boolean;
30
32
  };
31
33
  type Elements = ['button', 'stateLayer', 'container', 'icon', 'label'];
32
34
  export type ButtonInterface = ActionOrLink<Props> & {
33
35
  elements: Elements;
36
+ states: {
37
+ isActive: boolean;
38
+ };
34
39
  };
35
40
  export {};
36
41
  //# sourceMappingURL=button.interface.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"button.interface.d.ts","sourceRoot":"","sources":["../../../src/lib/interfaces/button.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC,KAAK,KAAK,GAAG;IACX;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;IAE1D;;OAEG;IACH,OAAO,CAAC,EAAE,QAAQ,GAAG,UAAU,GAAG,UAAU,GAAG,MAAM,GAAG,aAAa,CAAC;IAEtE;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,IAAI,CAAC,EAAE,cAAc,CAAC;IAEtB,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAEhC,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAE9B,wBAAwB,CAAC,EAAE,OAAO,CAAC;IAEnC,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB,CAAC;AAEF,KAAK,QAAQ,GAAG,CAAC,QAAQ,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;AAEvE,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC,KAAK,CAAC,GAAG;IAClD,QAAQ,EAAE,QAAQ,CAAC;CACpB,CAAC"}
1
+ {"version":3,"file":"button.interface.d.ts","sourceRoot":"","sources":["../../../src/lib/interfaces/button.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC,KAAK,KAAK,GAAG;IACX;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;IAE1D;;OAEG;IACH,OAAO,CAAC,EAAE,QAAQ,GAAG,UAAU,GAAG,UAAU,GAAG,MAAM,GAAG,aAAa,CAAC;IAEtE;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,IAAI,CAAC,EAAE,cAAc,CAAC;IAEtB,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAEhC,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAE9B,wBAAwB,CAAC,EAAE,OAAO,CAAC;IAEnC,UAAU,CAAC,EAAE,UAAU,CAAC;IAExB,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,KAAK,QAAQ,GAAG,CAAC,QAAQ,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;AAEvE,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC,KAAK,CAAC,GAAG;IAClD,QAAQ,EAAE,QAAQ,CAAC;IACnB,MAAM,EAAE;QACN,QAAQ,EAAE,OAAO,CAAC;KACnB,CAAC;CACH,CAAC"}
@@ -3,7 +3,7 @@ import { IconButtonVariant } from '../components/IconButton';
3
3
  import { ActionOrLink } from '../utils/component';
4
4
  import { Transition } from 'motion';
5
5
  type Props = {
6
- arialLabel: string;
6
+ ariaLabel: string;
7
7
  icon: IconDefinition;
8
8
  size?: 'xSmall' | 'small' | 'medium' | 'large' | 'xLarge';
9
9
  width?: 'default' | 'narrow' | 'wide';
@@ -1 +1 @@
1
- {"version":3,"file":"icon-button.interface.d.ts","sourceRoot":"","sources":["../../../src/lib/interfaces/icon-button.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC,KAAK,KAAK,GAAG;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,cAAc,CAAC;IACrB,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;IAC1D,KAAK,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAC;IACtC,YAAY,CAAC,EAAE,cAAc,CAAC;IAC9B,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAE9B,wBAAwB,CAAC,EAAE,OAAO,CAAC;IAEnC,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AACF,KAAK,QAAQ,GAAG,CAAC,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC;AAElE,MAAM,MAAM,mBAAmB,GAAG,YAAY,CAAC,KAAK,CAAC,GAAG;IACtD,MAAM,EAAE,gBAAgB,CAAC;IACzB,QAAQ,EAAE,QAAQ,CAAC;CACpB,CAAC"}
1
+ {"version":3,"file":"icon-button.interface.d.ts","sourceRoot":"","sources":["../../../src/lib/interfaces/icon-button.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC,KAAK,KAAK,GAAG;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,cAAc,CAAC;IACrB,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;IAC1D,KAAK,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAC;IACtC,YAAY,CAAC,EAAE,cAAc,CAAC;IAC9B,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAE9B,wBAAwB,CAAC,EAAE,OAAO,CAAC;IAEnC,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AACF,KAAK,QAAQ,GAAG,CAAC,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC;AAElE,MAAM,MAAM,mBAAmB,GAAG,YAAY,CAAC,KAAK,CAAC,GAAG;IACtD,MAAM,EAAE,gBAAgB,CAAC;IACzB,QAAQ,EAAE,QAAQ,CAAC;CACpB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { ButtonInterface } from '../interfaces';
2
- export declare const buttonStyle: (states: ({
2
+ export declare const buttonStyle: (states: (({
3
3
  label: any;
4
4
  size: any;
5
5
  variant: any;
@@ -10,6 +10,8 @@ export declare const buttonStyle: (states: ({
10
10
  shape: any;
11
11
  allowShapeTransformation: any;
12
12
  transition: any;
13
+ onToggle: any;
14
+ activated: any;
13
15
  href: any;
14
16
  } | {
15
17
  label: any;
@@ -22,8 +24,10 @@ export declare const buttonStyle: (states: ({
22
24
  shape: any;
23
25
  allowShapeTransformation: any;
24
26
  transition: any;
27
+ onToggle: any;
28
+ activated: any;
25
29
  href: any;
26
- }) & ((({
30
+ }) & (({
27
31
  label: string;
28
32
  size?: "xSmall" | "small" | "medium" | "large" | "xLarge";
29
33
  variant?: "filled" | "elevated" | "outlined" | "text" | "filledTonal";
@@ -34,6 +38,8 @@ export declare const buttonStyle: (states: ({
34
38
  shape?: "squared" | "rounded";
35
39
  allowShapeTransformation?: boolean;
36
40
  transition?: import('motion').Transition;
41
+ onToggle?: (isActive: boolean) => void;
42
+ activated?: boolean;
37
43
  } & {
38
44
  href?: string;
39
45
  }) | ({
@@ -47,9 +53,13 @@ export declare const buttonStyle: (states: ({
47
53
  shape?: "squared" | "rounded";
48
54
  allowShapeTransformation?: boolean;
49
55
  transition?: import('motion').Transition;
56
+ onToggle?: (isActive: boolean) => void;
57
+ activated?: boolean;
50
58
  } & {
51
59
  href?: never;
52
- })) & {
60
+ }))) & {
61
+ isActive: boolean;
62
+ } & {
53
63
  className: string | import('..').ClassNameComponent<ButtonInterface> | undefined;
54
- })) => Record<"container" | "button" | "label" | "stateLayer" | "icon", string>;
64
+ }) => Record<"container" | "button" | "label" | "stateLayer" | "icon", string>;
55
65
  //# sourceMappingURL=button.style.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"button.style.d.ts","sourceRoot":"","sources":["../../../src/lib/styles/button.style.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+EAuJvB,CAAC"}
1
+ {"version":3,"file":"button.style.d.ts","sourceRoot":"","sources":["../../../src/lib/styles/button.style.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8EAkIvB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { IconButtonInterface } from '../interfaces/icon-button.interface';
2
2
  export declare const iconButtonStyle: (states: (({
3
- arialLabel: any;
3
+ ariaLabel: any;
4
4
  icon: any;
5
5
  size: any;
6
6
  width: any;
@@ -14,7 +14,7 @@ export declare const iconButtonStyle: (states: (({
14
14
  transition: any;
15
15
  href: any;
16
16
  } | {
17
- arialLabel: any;
17
+ ariaLabel: any;
18
18
  icon: any;
19
19
  size: any;
20
20
  width: any;
@@ -28,7 +28,7 @@ export declare const iconButtonStyle: (states: (({
28
28
  transition: any;
29
29
  href: any;
30
30
  }) & (({
31
- arialLabel: string;
31
+ ariaLabel: string;
32
32
  icon: import('@fortawesome/fontawesome-svg-core').IconDefinition;
33
33
  size?: "xSmall" | "small" | "medium" | "large" | "xLarge";
34
34
  width?: "default" | "narrow" | "wide";
@@ -43,7 +43,7 @@ export declare const iconButtonStyle: (states: (({
43
43
  } & {
44
44
  href?: string;
45
45
  }) | ({
46
- arialLabel: string;
46
+ ariaLabel: string;
47
47
  icon: import('@fortawesome/fontawesome-svg-core').IconDefinition;
48
48
  size?: "xSmall" | "small" | "medium" | "large" | "xLarge";
49
49
  width?: "default" | "narrow" | "wide";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@udixio/ui-react",
3
- "version": "0.1.2",
3
+ "version": "0.2.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -30,7 +30,7 @@
30
30
  "react": "^19.1.1",
31
31
  "react-dom": "^19.1.1",
32
32
  "@udixio/theme": "1.0.0",
33
- "@udixio/tailwind": "1.0.0"
33
+ "@udixio/tailwind": "1.1.0"
34
34
  },
35
35
  "repository": {
36
36
  "type": "git",
@@ -4,10 +4,12 @@ import { buttonStyle } from '../styles';
4
4
  import { Icon } from '../icon';
5
5
  import { ProgressIndicator } from './ProgressIndicator';
6
6
  import { RippleEffect } from '../effects';
7
- import { useRef } from 'react';
7
+ import React, { useEffect, useRef } from 'react';
8
8
 
9
9
  /**
10
- * The Button component is a versatile component that can be used to trigger actions or to navigate to different sections of the application
10
+ * Buttons prompt most actions in a UI
11
+ * @status beta
12
+ * @category Action
11
13
  */
12
14
  export const Button = ({
13
15
  variant = 'filled',
@@ -20,10 +22,13 @@ export const Button = ({
20
22
  loading = false,
21
23
  shape = 'rounded',
22
24
  onClick,
25
+ onToggle,
26
+ activated,
23
27
  ref,
24
28
  size = 'medium',
25
29
  allowShapeTransformation = true,
26
30
  transition,
31
+ children,
27
32
  ...restProps
28
33
  }: ReactProps<ButtonInterface>) => {
29
34
  const ElementType = href ? 'a' : 'button';
@@ -31,6 +36,33 @@ export const Button = ({
31
36
  const defaultRef = useRef<HTMLDivElement>(null);
32
37
  const resolvedRef = ref || defaultRef;
33
38
 
39
+ const [isActive, setIsActive] = React.useState(activated);
40
+ useEffect(() => {
41
+ setIsActive(activated);
42
+ }, [activated]);
43
+
44
+ transition = { duration: 0.3, ...transition };
45
+
46
+ let handleClick;
47
+
48
+ if (!onToggle) {
49
+ handleClick = (e: React.MouseEvent<any, MouseEvent>) => {
50
+ if (disabled) {
51
+ e.preventDefault();
52
+ }
53
+ if (onClick) {
54
+ onClick(e);
55
+ }
56
+ };
57
+ } else if (onToggle) {
58
+ handleClick = (e: React.MouseEvent<any, MouseEvent>) => {
59
+ if (disabled) {
60
+ e.preventDefault();
61
+ }
62
+ setIsActive(!isActive);
63
+ onToggle(Boolean(isActive));
64
+ };
65
+ }
34
66
  const styles = buttonStyle({
35
67
  allowShapeTransformation,
36
68
  size,
@@ -44,31 +76,26 @@ export const Button = ({
44
76
  variant,
45
77
  transition,
46
78
  className,
79
+ isActive: isActive ?? false,
80
+ onToggle,
81
+ activated: isActive,
47
82
  });
48
-
49
83
  const iconElement = icon ? (
50
84
  <Icon icon={icon} className={styles.icon} />
51
85
  ) : (
52
86
  <></>
53
87
  );
54
-
55
- transition = { duration: 0.3, ...transition };
88
+ console.log('gfegrger', onToggle);
89
+ console.log('test', isActive, onToggle, handleClick);
56
90
  return (
57
91
  <ElementType
58
92
  ref={resolvedRef}
59
93
  href={href}
60
94
  className={styles.button}
61
95
  {...(restProps as any)}
62
- onClick={(e: any) => {
63
- if (!disabled) {
64
- if (onClick) {
65
- onClick(e);
66
- }
67
- } else {
68
- e.preventDefault();
69
- }
70
- }}
96
+ onClick={handleClick}
71
97
  disabled={disabled}
98
+ aria-pressed={onToggle ? isActive : undefined}
72
99
  >
73
100
  <div
74
101
  className={styles.container}
@@ -132,7 +159,7 @@ export const Button = ({
132
159
  />
133
160
  </div>
134
161
  )}
135
- <span className={styles.label}>{label}</span>
162
+ <span className={styles.label}>{label ?? children}</span>
136
163
  {iconPosition === 'right' && iconElement}
137
164
  </div>
138
165
  </ElementType>
@@ -5,6 +5,11 @@ import { CardInterface } from '../interfaces';
5
5
  import { cardStyle } from '../styles';
6
6
  import { ReactProps } from '../utils';
7
7
 
8
+ /**
9
+ * Cards display content and actions about a single subject
10
+ * @status beta
11
+ * @category Layout
12
+ */
8
13
  export const Card = ({
9
14
  variant = 'outlined',
10
15
  className,