@televet/kibble-ui 1.0.16 → 1.0.17-beta.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.
@@ -0,0 +1,12 @@
1
+ import { ReactNode } from 'react';
2
+ import { IconName } from '../Icon';
3
+ import { ButtonOptions } from '@chakra-ui/button/dist/declarations/src/button';
4
+ import { ButtonSize, ButtonVariant } from './button.types';
5
+ export interface ButtonProps extends ButtonOptions {
6
+ children?: ReactNode;
7
+ variant: ButtonVariant;
8
+ size: ButtonSize;
9
+ iconName?: IconName;
10
+ iconPosition?: 'left' | 'right';
11
+ }
12
+ export declare const Button: (props: ButtonProps) => JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { ButtonColorOptions } from './button.types';
2
+ import { AdaptiveColorMap } from '../../theme/tokens/colors';
3
+ export interface ButtonVariantConfig extends AdaptiveColorMap<ButtonColorOptions> {
4
+ variant: 'solid' | 'outline' | 'ghost';
5
+ }
@@ -0,0 +1,2 @@
1
+ import { ButtonStyleConfig } from './button.types';
2
+ export declare const ButtonConfig: ButtonStyleConfig;
@@ -0,0 +1,5 @@
1
+ import { ButtonVariantConfig } from './button.model';
2
+ export declare type ButtonVariant = 'primary' | 'primaryDestructive' | 'secondary' | 'secondaryDestructive' | 'secondarySubtle' | 'secondarySubtleDestructive' | 'tertiary' | 'tertiaryDestructive' | 'ghost' | 'ghostNeutral' | 'ghostDestructive';
3
+ export declare type ButtonColorOptions = 'content' | 'default' | 'hover' | 'active' | 'border';
4
+ export declare type ButtonSize = 'xs' | 'sm' | 'md' | 'lg';
5
+ export declare type ButtonStyleConfig = Record<ButtonVariant, ButtonVariantConfig>;
@@ -0,0 +1,4 @@
1
+ export * from './button.component';
2
+ export * from './button.types';
3
+ export * from './button.model';
4
+ export * from './button.records';
@@ -1,10 +1,2 @@
1
- import { CSSProperties } from 'react';
2
- import { LogoType, LogoColor, LogoHoliday } from './logo.records';
3
- export interface ILogoProps {
4
- type?: LogoType;
5
- color?: LogoColor;
6
- holiday?: LogoHoliday;
7
- style?: CSSProperties;
8
- }
9
- declare const Logo: ({ type, color, holiday, style }: ILogoProps) => JSX.Element;
10
- export default Logo;
1
+ export * from './logo.component';
2
+ export * from './logo.types';
@@ -0,0 +1,10 @@
1
+ import { CSSProperties } from 'react';
2
+ import { LogoHoliday } from './logo.records';
3
+ import { LogoType, LogoColor } from './logo.types';
4
+ export interface ILogoProps {
5
+ type?: LogoType;
6
+ color?: LogoColor;
7
+ holiday?: LogoHoliday;
8
+ style?: CSSProperties;
9
+ }
10
+ export declare const Logo: ({ type, color, holiday, style }: ILogoProps) => JSX.Element;
@@ -1,6 +1,4 @@
1
1
  /// <reference types="react" />
2
- export declare type LogoType = 'full' | 'icon';
3
- export declare type LogoColor = 'teal' | 'black' | 'white';
4
2
  export declare enum LogoHoliday {
5
3
  NewYears = "NewYears",
6
4
  Valentines = "Valentines",
@@ -0,0 +1,2 @@
1
+ export declare type LogoType = 'full' | 'icon';
2
+ export declare type LogoColor = 'teal' | 'black' | 'white';
@@ -0,0 +1,3 @@
1
+ export * from './tooltip.component';
2
+ export * from './tooltip.model';
3
+ export * from './tooltip.records';
@@ -0,0 +1,8 @@
1
+ import { ReactNode } from 'react';
2
+ import { Placement, TooltipProps as ChakraTooltipProps } from '@chakra-ui/react';
3
+ export interface TooltipProps extends ChakraTooltipProps {
4
+ children: ReactNode;
5
+ label: string;
6
+ placement: Placement;
7
+ }
8
+ export declare const Tooltip: ({ children, label, placement, isOpen, defaultIsOpen, ...rest }: TooltipProps) => JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { AdaptiveColor } from '../../theme/tokens';
2
+ export interface TooltipStyleConfig {
3
+ color: AdaptiveColor;
4
+ }
@@ -0,0 +1,9 @@
1
+ import { TooltipStyleConfig } from './tooltip.model';
2
+ export declare const TooltipGlobalStyle: {
3
+ '[id^=tooltip]': {
4
+ padding: string;
5
+ borderRadius: string;
6
+ textTransform: string;
7
+ };
8
+ };
9
+ export declare const TooltipConfig: TooltipStyleConfig;
package/build/index.js CHANGED
@@ -747,6 +747,105 @@ var Icon = function (_a) {
747
747
  return React__default["default"].createElement(MappedIcon, { width: d, height: d, color: c });
748
748
  };
749
749
 
750
+ var _path$k, _path2$7;
751
+
752
+ function _extends$k() { _extends$k = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$k.apply(this, arguments); }
753
+
754
+ var SvgTeal = function SvgTeal(props) {
755
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$k({
756
+ width: 200,
757
+ height: 44,
758
+ fill: "none",
759
+ xmlns: "http://www.w3.org/2000/svg"
760
+ }, props), _path$k || (_path$k = /*#__PURE__*/React__namespace.createElement("path", {
761
+ d: "M176.773 35.166c-2.461 4.878-7.25 7.877-13.739 7.877-9.219 0-15.708-6.4-15.708-15.574 0-8.95 6.579-15.574 15.35-15.574 8.951 0 15.127 6.534 15.127 15.842 0 1.03-.045 1.79-.135 2.149h-21.749c.313 3.49 3.49 5.996 7.115 5.996 3.222 0 4.968-1.387 6.355-3.58l7.384 2.864Zm-7.563-11.009c-.358-3.177-3.043-5.46-6.579-5.46-3.49 0-6.31 2.64-6.668 5.46h13.247ZM192.482 3.929v8.682H200v7.205h-7.518v10.875c0 3.178 1.387 4.43 4.251 4.43 1.074 0 2.282-.313 3.222-.894v7.563c-1.298.671-3.311 1.208-6.131 1.208-6.221 0-10.069-3.849-10.069-10.427V19.86h-4.207v-7.205h4.207V3.974h8.727v-.045ZM139.047.035c-3.715.18-6.713 3.178-6.892 6.892-.179 4.162 3.133 7.564 7.205 7.564h.179l.134 5.236c0 .492.716.671.94.224 0 0 4.699-8.862 4.744-8.951.895-1.79 1.253-2.327 1.253-3.76 0-4.072-3.446-7.384-7.563-7.205ZM129.022 23.396h-.045L117.521.037h-10.696l17.23 33.52 4.878 9.442 4.922-9.622-4.833-9.98Z",
762
+ fill: "#050E5F"
763
+ })), _path2$7 || (_path2$7 = /*#__PURE__*/React__namespace.createElement("path", {
764
+ d: "M0 .26h31.193v8.413H20.139v33.564h-9.04V8.673H0V.259ZM58.537 35.166c-2.462 4.879-7.25 7.877-13.74 7.877-9.219 0-15.708-6.4-15.708-15.574 0-8.95 6.579-15.574 15.35-15.574 8.951 0 15.127 6.534 15.127 15.843 0 1.029-.045 1.79-.134 2.148h-21.75c.313 3.49 3.49 5.997 7.115 5.997 3.223 0 4.968-1.388 6.355-3.58l7.385 2.863Zm-7.564-11.009c-.358-3.177-3.043-5.46-6.578-5.46-3.491 0-6.31 2.64-6.668 5.46h13.246ZM73.216.26v41.977h-8.772V.26h8.772ZM107.675 35.166c-2.461 4.879-7.25 7.877-13.739 7.877-9.219 0-15.708-6.4-15.708-15.574 0-8.95 6.579-15.574 15.35-15.574 8.951 0 15.126 6.534 15.126 15.843 0 1.029-.044 1.79-.134 2.148H86.82c.314 3.49 3.491 5.997 7.116 5.997 3.222 0 4.968-1.388 6.355-3.58l7.384 2.863Zm-7.518-11.009c-.358-3.177-3.043-5.46-6.579-5.46-3.49 0-6.31 2.64-6.668 5.46h13.247Z",
765
+ fill: "#39ADC3"
766
+ })));
767
+ };
768
+
769
+ var _path$j;
770
+
771
+ function _extends$j() { _extends$j = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$j.apply(this, arguments); }
772
+
773
+ var SvgTealIcon = function SvgTealIcon(props) {
774
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$j({
775
+ width: 56,
776
+ height: 60,
777
+ fill: "none",
778
+ xmlns: "http://www.w3.org/2000/svg"
779
+ }, props), _path$j || (_path$j = /*#__PURE__*/React__namespace.createElement("path", {
780
+ d: "M55.596 10.103c0-5.73-4.783-10.35-10.59-10.085-5.17.246-9.389 4.443-9.618 9.609-.265 5.8 4.359 10.579 10.095 10.579h.23l.158 7.334c.018.723.971.953 1.324.318 0 0 6.583-12.395 6.636-12.501 1.253-2.521 1.765-3.244 1.765-5.254ZM31.01 32.618h-.017v.035L14.932 0H0l30.887 60 6.9-13.435-6.777-13.947Z",
781
+ fill: "#39ADC3"
782
+ })));
783
+ };
784
+
785
+ var _path$i;
786
+
787
+ function _extends$i() { _extends$i = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$i.apply(this, arguments); }
788
+
789
+ var SvgBlack = function SvgBlack(props) {
790
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$i({
791
+ width: 200,
792
+ height: 44,
793
+ fill: "none",
794
+ xmlns: "http://www.w3.org/2000/svg"
795
+ }, props), _path$i || (_path$i = /*#__PURE__*/React__namespace.createElement("path", {
796
+ d: "M0 .23h31.193v8.414H20.139V42.21h-9.04V8.644H0V.231ZM58.537 35.138c-2.462 4.878-7.25 7.876-13.74 7.876-9.219 0-15.708-6.4-15.708-15.574 0-8.95 6.579-15.574 15.35-15.574 8.951 0 15.127 6.534 15.127 15.843 0 1.03-.045 1.79-.134 2.148h-21.75c.313 3.49 3.49 5.997 7.115 5.997 3.223 0 4.968-1.387 6.355-3.58l7.385 2.864Zm-7.564-11.01c-.358-3.177-3.043-5.46-6.578-5.46-3.491 0-6.31 2.641-6.669 5.46h13.247ZM73.216.23V42.21h-8.772V.23h8.772ZM107.675 35.138c-2.461 4.878-7.25 7.876-13.739 7.876-9.22 0-15.708-6.4-15.708-15.574 0-8.95 6.578-15.574 15.35-15.574 8.951 0 15.126 6.534 15.126 15.843 0 1.03-.044 1.79-.134 2.148H86.82c.314 3.49 3.491 5.997 7.116 5.997 3.222 0 4.968-1.387 6.355-3.58l7.384 2.864Zm-7.518-11.01c-.358-3.177-3.044-5.46-6.579-5.46-3.49 0-6.31 2.641-6.668 5.46h13.247ZM176.773 35.138c-2.461 4.878-7.25 7.876-13.739 7.876-9.219 0-15.708-6.4-15.708-15.574 0-8.95 6.579-15.574 15.35-15.574 8.951 0 15.127 6.534 15.127 15.843 0 1.03-.045 1.79-.135 2.148h-21.749c.313 3.49 3.49 5.997 7.115 5.997 3.222 0 4.968-1.387 6.355-3.58l7.384 2.864Zm-7.563-11.01c-.358-3.177-3.043-5.46-6.579-5.46-3.49 0-6.31 2.641-6.668 5.46h13.247ZM192.482 3.9v8.682H200v7.206h-7.518v10.875c0 3.177 1.387 4.43 4.251 4.43 1.074 0 2.282-.313 3.222-.895v7.563c-1.298.671-3.311 1.209-6.131 1.209-6.221 0-10.069-3.85-10.069-10.428v-12.71h-4.207v-7.205h4.207V3.945h8.727V3.9ZM139.047.007c-3.715.179-6.713 3.177-6.892 6.892-.179 4.162 3.133 7.563 7.205 7.563h.179l.134 5.236c0 .492.716.671.94.224 0 0 4.699-8.861 4.744-8.95.895-1.79 1.253-2.328 1.253-3.76 0-4.072-3.446-7.384-7.563-7.205ZM129.022 23.368h-.045L117.521.007h-10.696l17.23 33.52 4.878 9.442 4.922-9.621-4.833-9.98Z",
797
+ fill: "#000"
798
+ })));
799
+ };
800
+
801
+ var _path$h;
802
+
803
+ function _extends$h() { _extends$h = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$h.apply(this, arguments); }
804
+
805
+ var SvgBlackIcon = function SvgBlackIcon(props) {
806
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$h({
807
+ width: 56,
808
+ height: 60,
809
+ fill: "none",
810
+ xmlns: "http://www.w3.org/2000/svg"
811
+ }, props), _path$h || (_path$h = /*#__PURE__*/React__namespace.createElement("path", {
812
+ d: "M55.596 10.103c0-5.73-4.783-10.35-10.59-10.085-5.17.246-9.389 4.443-9.618 9.609-.265 5.8 4.359 10.579 10.095 10.579h.23l.158 7.334c.018.723.971.953 1.324.318 0 0 6.583-12.395 6.636-12.5 1.253-2.522 1.765-3.245 1.765-5.255ZM31.01 32.618h-.017v.035L14.932 0H0l30.887 60 6.9-13.435-6.777-13.947Z",
813
+ fill: "#000"
814
+ })));
815
+ };
816
+
817
+ var _path$g;
818
+
819
+ function _extends$g() { _extends$g = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$g.apply(this, arguments); }
820
+
821
+ var SvgWhite = function SvgWhite(props) {
822
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$g({
823
+ width: 200,
824
+ height: 44,
825
+ fill: "none",
826
+ xmlns: "http://www.w3.org/2000/svg"
827
+ }, props), _path$g || (_path$g = /*#__PURE__*/React__namespace.createElement("path", {
828
+ d: "M0 .245h31.193v8.413H20.139v33.565h-9.04V8.66H0V.245ZM58.537 35.152c-2.462 4.878-7.25 7.877-13.74 7.877-9.219 0-15.708-6.4-15.708-15.574 0-8.95 6.579-15.574 15.35-15.574 8.951 0 15.127 6.534 15.127 15.842 0 1.03-.045 1.79-.134 2.148h-21.75c.313 3.491 3.49 5.997 7.115 5.997 3.223 0 4.968-1.387 6.355-3.58l7.385 2.864Zm-7.564-11.009c-.358-3.178-3.043-5.46-6.578-5.46-3.491 0-6.31 2.64-6.669 5.46h13.247ZM73.216.245v41.978h-8.772V.245h8.772ZM107.675 35.152c-2.461 4.878-7.25 7.877-13.739 7.877-9.22 0-15.708-6.4-15.708-15.574 0-8.95 6.579-15.574 15.35-15.574 8.951 0 15.126 6.534 15.126 15.842 0 1.03-.044 1.79-.134 2.148H86.82c.314 3.491 3.491 5.997 7.116 5.997 3.222 0 4.968-1.387 6.355-3.58l7.384 2.864Zm-7.518-11.009c-.358-3.178-3.043-5.46-6.579-5.46-3.49 0-6.31 2.64-6.668 5.46h13.247ZM176.773 35.152c-2.461 4.878-7.25 7.877-13.739 7.877-9.219 0-15.708-6.4-15.708-15.574 0-8.95 6.579-15.574 15.35-15.574 8.951 0 15.127 6.534 15.127 15.842 0 1.03-.045 1.79-.135 2.148h-21.749c.313 3.491 3.49 5.997 7.115 5.997 3.222 0 4.968-1.387 6.355-3.58l7.384 2.864Zm-7.563-11.009c-.358-3.178-3.043-5.46-6.579-5.46-3.49 0-6.31 2.64-6.668 5.46h13.247ZM192.482 3.915v8.682H200v7.205h-7.518v10.875c0 3.177 1.387 4.43 4.251 4.43 1.074 0 2.282-.313 3.222-.895v7.563c-1.298.672-3.311 1.209-6.131 1.209-6.22 0-10.069-3.849-10.069-10.428v-12.71h-4.207v-7.204h4.207V3.959h8.727v-.044ZM139.047.021c-3.715.18-6.713 3.178-6.892 6.892-.179 4.162 3.133 7.563 7.205 7.563h.179l.134 5.236c0 .493.716.672.94.224 0 0 4.699-8.86 4.744-8.95.895-1.79 1.253-2.328 1.253-3.76 0-4.072-3.446-7.384-7.563-7.205ZM129.022 23.382h-.045L117.521.022h-10.696l17.23 33.52 4.878 9.442 4.922-9.622-4.833-9.98Z",
829
+ fill: "#fff"
830
+ })));
831
+ };
832
+
833
+ var _path$f;
834
+
835
+ function _extends$f() { _extends$f = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$f.apply(this, arguments); }
836
+
837
+ var SvgWhiteIcon = function SvgWhiteIcon(props) {
838
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$f({
839
+ width: 56,
840
+ height: 60,
841
+ fill: "none",
842
+ xmlns: "http://www.w3.org/2000/svg"
843
+ }, props), _path$f || (_path$f = /*#__PURE__*/React__namespace.createElement("path", {
844
+ d: "M55.596 10.103c0-5.73-4.783-10.35-10.59-10.085-5.17.246-9.389 4.443-9.618 9.609-.265 5.8 4.359 10.579 10.095 10.579h.23l.158 7.334c.018.723.971.953 1.324.318 0 0 6.583-12.395 6.636-12.501 1.253-2.521 1.765-3.244 1.765-5.254ZM31.01 32.618h-.017v.035L14.932 0H0l30.887 60 6.9-13.435-6.777-13.947Z",
845
+ fill: "#fff"
846
+ })));
847
+ };
848
+
750
849
  var _path$e, _path2$6, _path3$5, _path4$3, _path5$3;
751
850
 
752
851
  function _extends$e() { _extends$e = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$e.apply(this, arguments); }
@@ -2000,7 +2099,7 @@ var LogoHoliday;
2000
2099
  LogoHoliday["Thanksgiving"] = "Thanksgiving";
2001
2100
  LogoHoliday["Christmas"] = "Christmas";
2002
2101
  })(LogoHoliday || (LogoHoliday = {}));
2003
- (_a = {},
2102
+ var holidaysLogoIconMap = (_a = {},
2004
2103
  _a[LogoHoliday.NewYears] = SvgNewYears,
2005
2104
  _a[LogoHoliday.Valentines] = SvgValentines,
2006
2105
  _a[LogoHoliday.StPatricks] = SvgStPatricks,
@@ -2016,7 +2115,32 @@ var LogoHoliday;
2016
2115
  _a[LogoHoliday.Halloween] = SvgHalloween,
2017
2116
  _a[LogoHoliday.Thanksgiving] = SvgThanksgiving,
2018
2117
  _a[LogoHoliday.Christmas] = SvgChristmas,
2019
- _a);
2118
+ _a);
2119
+ var logoIconMap = {
2120
+ black: SvgBlackIcon,
2121
+ white: SvgWhiteIcon,
2122
+ teal: SvgTealIcon,
2123
+ };
2124
+ var fullLogoMap = {
2125
+ black: SvgBlack,
2126
+ white: SvgWhite,
2127
+ teal: SvgTeal,
2128
+ };
2129
+
2130
+ var Logo = function (_a) {
2131
+ var _b = _a.type, type = _b === void 0 ? 'full' : _b, _c = _a.color, color = _c === void 0 ? 'teal' : _c, holiday = _a.holiday, style = _a.style;
2132
+ var LogoComponent;
2133
+ if (holiday) {
2134
+ LogoComponent = holidaysLogoIconMap[holiday];
2135
+ }
2136
+ else if (type === 'icon') {
2137
+ LogoComponent = logoIconMap[color];
2138
+ }
2139
+ else {
2140
+ LogoComponent = fullLogoMap[color];
2141
+ }
2142
+ return React__default["default"].createElement(LogoComponent, { style: style });
2143
+ };
2020
2144
 
2021
2145
  /*! *****************************************************************************
2022
2146
  Copyright (c) Microsoft Corporation.
@@ -2633,6 +2757,7 @@ exports.Heading = Heading;
2633
2757
  exports.HeadingConfig = HeadingConfig;
2634
2758
  exports.Icon = Icon;
2635
2759
  exports.KibbleThemeProvider = KibbleThemeProvider;
2760
+ exports.Logo = Logo;
2636
2761
  exports.Text = Text;
2637
2762
  exports.TextConfig = TextConfig;
2638
2763
  exports.Textarea = Textarea;