@veracity/vui 0.0.9 → 0.0.11

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 (117) hide show
  1. package/alert/alert.js +3 -3
  2. package/alert/alert.types.d.ts +2 -1
  3. package/alert/alertIcon.js +3 -3
  4. package/alert/alertTitle.d.ts +1 -1
  5. package/alert/alertTitle.js +1 -1
  6. package/alert/consts.js +17 -5
  7. package/avatar/avatar.d.ts +3 -4
  8. package/avatar/avatar.js +2 -2
  9. package/avatar/avatar.types.d.ts +2 -6
  10. package/box/box.d.ts +3 -4
  11. package/box/box.js +3 -4
  12. package/box/box.types.d.ts +2 -4
  13. package/button/button.d.ts +3 -4
  14. package/button/button.js +19 -14
  15. package/button/button.types.d.ts +9 -5
  16. package/button/buttonGroup.d.ts +3 -2
  17. package/button/buttonGroup.js +3 -4
  18. package/button/buttonGroup.types.d.ts +2 -4
  19. package/button/consts.d.ts +2 -0
  20. package/button/consts.js +26 -0
  21. package/button/theme.d.ts +1 -0
  22. package/button/theme.js +1 -0
  23. package/checkbox/checkbox.d.ts +3 -2
  24. package/checkbox/checkbox.js +5 -7
  25. package/checkbox/checkbox.types.d.ts +4 -6
  26. package/checkbox/checkboxGroup.d.ts +3 -2
  27. package/checkbox/checkboxGroup.js +3 -4
  28. package/checkbox/checkboxGroup.types.d.ts +2 -4
  29. package/divider/divider.d.ts +3 -2
  30. package/divider/divider.js +3 -4
  31. package/divider/divider.types.d.ts +2 -4
  32. package/heading/heading.d.ts +3 -4
  33. package/heading/heading.js +2 -4
  34. package/heading/heading.types.d.ts +2 -4
  35. package/icons/baseIcons/fad/fadSpinnerThird.d.ts +3 -0
  36. package/icons/baseIcons/fad/fadSpinnerThird.js +7 -0
  37. package/icons/baseIcons/fal/falSignIn.d.ts +3 -0
  38. package/icons/baseIcons/fal/falSignIn.js +7 -0
  39. package/icons/baseIcons/types.d.ts +1 -1
  40. package/icons/consts.js +2 -0
  41. package/input/consts.js +13 -7
  42. package/input/helpers.d.ts +2 -0
  43. package/input/helpers.js +9 -0
  44. package/input/input.d.ts +4 -5
  45. package/input/input.js +66 -13
  46. package/input/input.types.d.ts +10 -12
  47. package/input/theme.d.ts +0 -1
  48. package/input/theme.js +2 -4
  49. package/label/label.d.ts +3 -4
  50. package/label/label.js +5 -9
  51. package/label/label.types.d.ts +2 -5
  52. package/link/link.d.ts +3 -4
  53. package/link/link.js +4 -6
  54. package/link/link.types.d.ts +4 -5
  55. package/link/theme.d.ts +5 -0
  56. package/link/theme.js +14 -1
  57. package/list/list.d.ts +3 -2
  58. package/list/list.js +3 -4
  59. package/list/list.types.d.ts +2 -4
  60. package/list/listItem.d.ts +3 -2
  61. package/list/listItem.js +3 -4
  62. package/list/listItem.types.d.ts +2 -4
  63. package/p/p.d.ts +3 -4
  64. package/p/p.js +2 -4
  65. package/p/p.types.d.ts +2 -4
  66. package/package.json +1 -1
  67. package/radio/radio.d.ts +3 -2
  68. package/radio/radio.js +5 -7
  69. package/radio/radio.types.d.ts +4 -6
  70. package/radio/radioGroup.d.ts +3 -2
  71. package/radio/radioGroup.js +3 -4
  72. package/radio/radioGroup.types.d.ts +2 -4
  73. package/skeleton/skeleton.d.ts +3 -2
  74. package/skeleton/skeleton.js +3 -4
  75. package/skeleton/skeleton.types.d.ts +2 -4
  76. package/spinner/spinner.js +3 -4
  77. package/spinner/spinner.types.d.ts +2 -2
  78. package/svg/svg.d.ts +4 -3
  79. package/svg/svg.js +8 -8
  80. package/svg/svg.types.d.ts +3 -11
  81. package/switch/switch.d.ts +3 -2
  82. package/switch/switch.js +3 -4
  83. package/switch/switch.types.d.ts +2 -4
  84. package/switch/switchButton.d.ts +5 -4
  85. package/switch/switchButton.js +6 -9
  86. package/switch/switchButton.types.d.ts +2 -8
  87. package/system/animations.d.ts +9 -7
  88. package/system/backgrounds.d.ts +8 -8
  89. package/system/borders.d.ts +138 -129
  90. package/system/colors.d.ts +1 -2
  91. package/system/effects.d.ts +15 -12
  92. package/system/flexboxes.d.ts +43 -54
  93. package/system/index.d.ts +2 -0
  94. package/system/index.js +7 -0
  95. package/system/interactivity.d.ts +17 -23
  96. package/system/layout.d.ts +69 -74
  97. package/system/sizing.d.ts +27 -27
  98. package/system/space.d.ts +89 -87
  99. package/system/system.d.ts +17 -0
  100. package/system/system.js +5 -0
  101. package/system/transforms.d.ts +53 -53
  102. package/system/transitions.d.ts +20 -25
  103. package/system/typography.d.ts +68 -61
  104. package/t/t.d.ts +3 -4
  105. package/t/t.js +2 -4
  106. package/t/t.types.d.ts +2 -4
  107. package/textarea/helpers.d.ts +2 -0
  108. package/textarea/helpers.js +9 -0
  109. package/textarea/textarea.d.ts +5 -5
  110. package/textarea/textarea.js +79 -10
  111. package/textarea/textarea.types.d.ts +22 -4
  112. package/textarea/theme.d.ts +7 -3
  113. package/textarea/theme.js +7 -4
  114. package/theme/components.d.ts +12 -4
  115. package/theme/defaultTheme.d.ts +12 -4
  116. package/theme/foundations/animations.js +6 -6
  117. package/tile/tile.types.d.ts +2 -4
@@ -30,14 +30,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
30
30
  };
31
31
  Object.defineProperty(exports, "__esModule", { value: true });
32
32
  exports.Heading = exports.HeadingBase = void 0;
33
- var styled_components_1 = require("@xstyled/styled-components");
34
33
  var react_1 = __importDefault(require("react"));
35
- var styled_components_2 = __importDefault(require("styled-components"));
34
+ var styled_components_1 = __importDefault(require("styled-components"));
36
35
  var core_1 = require("../core");
37
36
  var system_1 = require("../system");
38
37
  var utils_1 = require("../utils");
39
- var generator = styled_components_1.compose(system_1.isTruncated, system_1.maxLines, styled_components_1.sizing, styled_components_1.space, styled_components_1.transitions, styled_components_1.typography);
40
- exports.HeadingBase = styled_components_2.default.h2.withConfig(core_1.forwardPropConfig(generator))(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\t", "\n"], ["\n\t", "\n"])), generator);
38
+ exports.HeadingBase = styled_components_1.default.h2.withConfig(core_1.forwardPropConfig(system_1.system))(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\t", "\n"], ["\n\t", "\n"])), system_1.system);
41
39
  exports.Heading = core_1.vui(function (props, ref) {
42
40
  var _a = core_1.omitThemingProps(props), align = _a.align, casing = _a.casing, children = _a.children, className = _a.className, decoration = _a.decoration, text = _a.text, weight = _a.weight, rest = __rest(_a, ["align", "casing", "children", "className", "decoration", "text", "weight"]);
43
41
  var styles = core_1.useStyleConfig('Heading', props);
@@ -1,11 +1,9 @@
1
- import { IsTruncatedProps, MaxLinesProps, SizingProps, SpaceProps, TransitionsProps, TypographyProps } from '../system';
1
+ import { SystemProps, TypographyProps } from '../system';
2
2
  import { ThemingProps } from '../theme';
3
- export interface HeadingProps extends HeadingStyleProps, ThemingProps<'Heading'> {
3
+ export interface HeadingProps extends SystemProps, ThemingProps<'Heading'> {
4
4
  align?: TypographyProps['textAlign'];
5
5
  casing?: TypographyProps['textTransform'];
6
6
  decoration?: TypographyProps['textDecoration'];
7
7
  text?: number | string;
8
8
  weight?: TypographyProps['fontWeight'];
9
9
  }
10
- export interface HeadingStyleProps extends IsTruncatedProps, MaxLinesProps, SizingProps, SpaceProps, TransitionsProps, TypographyProps {
11
- }
@@ -0,0 +1,3 @@
1
+ import { IconDefinition } from '../../types';
2
+ declare const _default: IconDefinition;
3
+ export default _default;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ /* eslint-disable */
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.default = {
5
+ details: [512, 512, [], '', ['M478.71 364.58zm-22 6.11l-27.83-15.9a15.92 15.92 0 0 1-6.94-19.2A184 184 0 1 1 256 72c5.89 0 11.71.29 17.46.83-.74-.07-1.48-.15-2.23-.21-8.49-.69-15.23-7.31-15.23-15.83v-32a16 16 0 0 1 15.34-16C266.24 8.46 261.18 8 256 8 119 8 8 119 8 256s111 248 248 248c98 0 182.42-56.95 222.71-139.42-4.13 7.86-14.23 10.55-22 6.11z', 'M271.23 72.62c-8.49-.69-15.23-7.31-15.23-15.83V24.73c0-9.11 7.67-16.78 16.77-16.17C401.92 17.18 504 124.67 504 256a246 246 0 0 1-25 108.24c-4 8.17-14.37 11-22.26 6.45l-27.84-15.9c-7.41-4.23-9.83-13.35-6.2-21.07A182.53 182.53 0 0 0 440 256c0-96.49-74.27-175.63-168.77-183.38z']],
6
+ name: 'fadSpinnerThird'
7
+ };
@@ -0,0 +1,3 @@
1
+ import { IconDefinition } from '../../types';
2
+ declare const _default: IconDefinition;
3
+ export default _default;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ /* eslint-disable */
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.default = {
5
+ details: [512, 512, [], '', 'M184 83.5l164.5 164c4.7 4.7 4.7 12.3 0 17L184 428.5c-4.7 4.7-12.3 4.7-17 0l-7.1-7.1c-4.7-4.7-4.7-12.3 0-17l132-131.4H12c-6.6 0-12-5.4-12-12v-10c0-6.6 5.4-12 12-12h279.9L160 107.6c-4.7-4.7-4.7-12.3 0-17l7.1-7.1c4.6-4.7 12.2-4.7 16.9 0zM512 400V112c0-26.5-21.5-48-48-48H332c-6.6 0-12 5.4-12 12v8c0 6.6 5.4 12 12 12h132c8.8 0 16 7.2 16 16v288c0 8.8-7.2 16-16 16H332c-6.6 0-12 5.4-12 12v8c0 6.6 5.4 12 12 12h132c26.5 0 48-21.5 48-48z'],
6
+ name: 'falSignIn'
7
+ };
@@ -1 +1 @@
1
- export declare type BaseIcon = 'cuiCheckboxIndeterminate' | 'cuiCheckboxSelected' | 'cuiCheckboxUnselected' | 'cuiRadioSelected' | 'cuiRadioUnselected' | 'culCovid' | 'culDeepSearch' | 'culDotsMenu' | 'culGlobePlus' | 'culListDense' | 'culMapMarkerStar' | 'culPlusThin' | 'culScreenshot' | 'culScreenshotAlt' | 'culShortcut' | 'culTimesThin' | 'culTransformer' | 'culUserTransfer' | 'culVessel' | 'culVesselGroup' | 'cusCheckboxSelected' | 'cusDotFull' | 'cusDotFullAlt' | 'cusDotsMenu' | 'cusRadio' | 'cusSquareMinus' | 'cusTransformer' | 'cusVessel' | 'fabApplePay' | 'fabBluetooth' | 'fabBtc' | 'fabCcAmazonPay' | 'fabCcAmex' | 'fabCcApplePay' | 'fabCcDinersClub' | 'fabCcMastercard' | 'fabCcPaypal' | 'fabCcVisa' | 'fabDhl' | 'fabEbay' | 'fabFacebook' | 'fabFedex' | 'fabFirefox' | 'fabGoogle' | 'fabGoogleDrive' | 'fabLinkedinIn' | 'fabMedium' | 'fabOsi' | 'fabSlack' | 'fabTwitter' | 'fabUps' | 'falAddressBook' | 'falAddressCard' | 'falAnalytics' | 'falAngleDoubleDown' | 'falAngleDoubleLeft' | 'falAngleDoubleRight' | 'falAngleDoubleUp' | 'falAngleDown' | 'falAngleLeft' | 'falAngleRight' | 'falAngleUp' | 'falArrowAltDown' | 'falArrowAltLeft' | 'falArrowAltRight' | 'falArrowAltUp' | 'falArrowCircleDown' | 'falArrowCircleLeft' | 'falArrowCircleRight' | 'falArrowCircleUp' | 'falArrowDown' | 'falArrowFromBottom' | 'falArrowFromLeft' | 'falArrowFromRight' | 'falArrowFromTop' | 'falArrowLeft' | 'falArrowRight' | 'falArrowToBottom' | 'falArrowToLeft' | 'falArrowToRight' | 'falArrowToTop' | 'falArrowUp' | 'falArrows' | 'falAward' | 'falBan' | 'falBell' | 'falBookOpen' | 'falBroadcastTower' | 'falBuilding' | 'falBullseye' | 'falCalendar' | 'falCalendarAlt' | 'falCamera' | 'falCaretDown' | 'falCaretLeft' | 'falCaretRight' | 'falCaretUp' | 'falCauldron' | 'falChartArea' | 'falChartBar' | 'falChartLineDown' | 'falChartLine' | 'falChartNetwork' | 'falChartPie' | 'falChartPieAlt' | 'falChartScatter' | 'falCheckCircle' | 'falCheckSquare' | 'falCheck' | 'falChevronCircleDown' | 'falChevronCircleLeft' | 'falChevronCircleRight' | 'falChevronCircleUp' | 'falChevronDoubleDown' | 'falChevronDoubleLeft' | 'falChevronDoubleRight' | 'falChevronDoubleUp' | 'falChevronDown' | 'falChevronLeft' | 'falChevronRight' | 'falChevronUp' | 'falCircle' | 'falCloudShowersHeavy' | 'falCloudSnow' | 'falCloudSunRain' | 'falCloudSun' | 'falCloudUpload' | 'falCloud' | 'falCode' | 'falCog' | 'falCogs' | 'falComment' | 'falCommentAlt' | 'falCompressAlt' | 'falCopy' | 'falCreditCard' | 'falDatabase' | 'falDotCircle' | 'falDownload' | 'falEdit' | 'falEllipsisH' | 'falEllipsisV' | 'falEnvelope' | 'falExchange' | 'falExclamationCircle' | 'falExclamationTriangle' | 'falExpandAlt' | 'falExternalLink' | 'falEye' | 'falEyeSlash' | 'falFile' | 'falFilePdf' | 'falFileAlt' | 'falFileArchive' | 'falFileAudio' | 'falFileCertificate' | 'falFileChartLine' | 'falFileChartPie' | 'falFileCheck' | 'falFileCode' | 'falFileCsv' | 'falFileEdit' | 'falFileExcel' | 'falFileImage' | 'falFilePlus' | 'falFilePowerpoint' | 'falFileSpreadsheet' | 'falFileVideo' | 'falFileWord' | 'falFilter' | 'falFlag' | 'falFolderOpen' | 'falFolderPlus' | 'falFolder' | 'falFolders' | 'falGlassesAlt' | 'falGlobe' | 'falHome' | 'falHourglass' | 'falImage' | 'falInfoCircle' | 'falKey' | 'falLayerPlus' | 'falLink' | 'falList' | 'falLockAlt' | 'falLongArrowDown' | 'falLongArrowLeft' | 'falLongArrowRight' | 'falLongArrowUp' | 'falMapMarked' | 'falMapMarkedAlt' | 'falMapMarkerAlt' | 'falMapMarkerAltSlash' | 'falMapMarkerCheck' | 'falMapMarkerExclamation' | 'falMapMarker' | 'falMap' | 'falMinus' | 'falPause' | 'falPauseCircle' | 'falPen' | 'falPlay' | 'falPlayCircle' | 'falPlug' | 'falPlusSquare' | 'falPlus' | 'falPlusCircle' | 'falPrint' | 'falPuzzlePiece' | 'falReceipt' | 'falRedo' | 'falSave' | 'falSearchPlus' | 'falSearch' | 'falServer' | 'falShareAll' | 'falShare' | 'falShareAlt' | 'falShieldAlt' | 'falShieldCheck' | 'falShip' | 'falShoppingBasket' | 'falSignInAlt' | 'falSignOut' | 'falSignOutAlt' | 'falSlidersV' | 'falSnowBlowing' | 'falSnowflake' | 'falSolarPanel' | 'falSort' | 'falSpinner' | 'falSquare' | 'falStepForward' | 'falStop' | 'falStopCircle' | 'falStopwatch' | 'falSuitcase' | 'falSun' | 'falSync' | 'falTachometer' | 'falTemperatureHigh' | 'falThLarge' | 'falThList' | 'falTh' | 'falTimesCircle' | 'falTimes' | 'falToggleOff' | 'falToggleOn' | 'falTrashAlt' | 'falUnlockAlt' | 'falUserChart' | 'falUserCircle' | 'falUserCog' | 'falUserEdit' | 'falUserFriends' | 'falUserPlus' | 'falUserShield' | 'falUserTimes' | 'falUser' | 'falUsersClass' | 'falUsers' | 'falWater' | 'falWindTurbine' | 'falWind' | 'falWrench' | 'fasCaretDown' | 'fasCaretLeft' | 'fasCaretRight' | 'fasCaretUp' | 'fasDiamond' | 'fasFolder' | 'fasMapMarkerAlt' | 'fasMapMarkerExclamation' | 'fasQuoteLeft' | 'fasQuoteRight' | 'fasSolarPanel' | 'fasSort' | 'fasStar' | 'fasWindTurbine';
1
+ export declare type BaseIcon = 'cuiCheckboxIndeterminate' | 'cuiCheckboxSelected' | 'cuiCheckboxUnselected' | 'cuiRadioSelected' | 'cuiRadioUnselected' | 'culCovid' | 'culDeepSearch' | 'culDotsMenu' | 'culGlobePlus' | 'culListDense' | 'culMapMarkerStar' | 'culPlusThin' | 'culScreenshot' | 'culScreenshotAlt' | 'culShortcut' | 'culTimesThin' | 'culTransformer' | 'culUserTransfer' | 'culVessel' | 'culVesselGroup' | 'cusCheckboxSelected' | 'cusDotFull' | 'cusDotFullAlt' | 'cusDotsMenu' | 'cusRadio' | 'cusSquareMinus' | 'cusTransformer' | 'cusVessel' | 'fabApplePay' | 'fabBluetooth' | 'fabBtc' | 'fabCcAmazonPay' | 'fabCcAmex' | 'fabCcApplePay' | 'fabCcDinersClub' | 'fabCcMastercard' | 'fabCcPaypal' | 'fabCcVisa' | 'fabDhl' | 'fabEbay' | 'fabFacebook' | 'fabFedex' | 'fabFirefox' | 'fabGoogle' | 'fabGoogleDrive' | 'fabLinkedinIn' | 'fabMedium' | 'fabOsi' | 'fabSlack' | 'fabTwitter' | 'fabUps' | 'fadSpinnerThird' | 'falAddressBook' | 'falAddressCard' | 'falAnalytics' | 'falAngleDoubleDown' | 'falAngleDoubleLeft' | 'falAngleDoubleRight' | 'falAngleDoubleUp' | 'falAngleDown' | 'falAngleLeft' | 'falAngleRight' | 'falAngleUp' | 'falArrowAltDown' | 'falArrowAltLeft' | 'falArrowAltRight' | 'falArrowAltUp' | 'falArrowCircleDown' | 'falArrowCircleLeft' | 'falArrowCircleRight' | 'falArrowCircleUp' | 'falArrowDown' | 'falArrowFromBottom' | 'falArrowFromLeft' | 'falArrowFromRight' | 'falArrowFromTop' | 'falArrowLeft' | 'falArrowRight' | 'falArrowToBottom' | 'falArrowToLeft' | 'falArrowToRight' | 'falArrowToTop' | 'falArrowUp' | 'falArrows' | 'falAward' | 'falBan' | 'falBell' | 'falBookOpen' | 'falBroadcastTower' | 'falBuilding' | 'falBullseye' | 'falCalendar' | 'falCalendarAlt' | 'falCamera' | 'falCaretDown' | 'falCaretLeft' | 'falCaretRight' | 'falCaretUp' | 'falCauldron' | 'falChartArea' | 'falChartBar' | 'falChartLineDown' | 'falChartLine' | 'falChartNetwork' | 'falChartPie' | 'falChartPieAlt' | 'falChartScatter' | 'falCheckCircle' | 'falCheckSquare' | 'falCheck' | 'falChevronCircleDown' | 'falChevronCircleLeft' | 'falChevronCircleRight' | 'falChevronCircleUp' | 'falChevronDoubleDown' | 'falChevronDoubleLeft' | 'falChevronDoubleRight' | 'falChevronDoubleUp' | 'falChevronDown' | 'falChevronLeft' | 'falChevronRight' | 'falChevronUp' | 'falCircle' | 'falCloudShowersHeavy' | 'falCloudSnow' | 'falCloudSunRain' | 'falCloudSun' | 'falCloudUpload' | 'falCloud' | 'falCode' | 'falCog' | 'falCogs' | 'falComment' | 'falCommentAlt' | 'falCompressAlt' | 'falCopy' | 'falCreditCard' | 'falDatabase' | 'falDotCircle' | 'falDownload' | 'falEdit' | 'falEllipsisH' | 'falEllipsisV' | 'falEnvelope' | 'falExchange' | 'falExclamationCircle' | 'falExclamationTriangle' | 'falExpandAlt' | 'falExternalLink' | 'falEye' | 'falEyeSlash' | 'falFile' | 'falFilePdf' | 'falFileAlt' | 'falFileArchive' | 'falFileAudio' | 'falFileCertificate' | 'falFileChartLine' | 'falFileChartPie' | 'falFileCheck' | 'falFileCode' | 'falFileCsv' | 'falFileEdit' | 'falFileExcel' | 'falFileImage' | 'falFilePlus' | 'falFilePowerpoint' | 'falFileSpreadsheet' | 'falFileVideo' | 'falFileWord' | 'falFilter' | 'falFlag' | 'falFolderOpen' | 'falFolderPlus' | 'falFolder' | 'falFolders' | 'falGlassesAlt' | 'falGlobe' | 'falHome' | 'falHourglass' | 'falImage' | 'falInfoCircle' | 'falKey' | 'falLayerPlus' | 'falLink' | 'falList' | 'falLockAlt' | 'falLongArrowDown' | 'falLongArrowLeft' | 'falLongArrowRight' | 'falLongArrowUp' | 'falMapMarked' | 'falMapMarkedAlt' | 'falMapMarkerAlt' | 'falMapMarkerAltSlash' | 'falMapMarkerCheck' | 'falMapMarkerExclamation' | 'falMapMarker' | 'falMap' | 'falMinus' | 'falPause' | 'falPauseCircle' | 'falPen' | 'falPlay' | 'falPlayCircle' | 'falPlug' | 'falPlusSquare' | 'falPlus' | 'falPlusCircle' | 'falPrint' | 'falPuzzlePiece' | 'falReceipt' | 'falRedo' | 'falSave' | 'falSearchPlus' | 'falSearch' | 'falServer' | 'falShareAll' | 'falShare' | 'falShareAlt' | 'falShieldAlt' | 'falShieldCheck' | 'falShip' | 'falShoppingBasket' | 'falSignIn' | 'falSignInAlt' | 'falSignOut' | 'falSignOutAlt' | 'falSlidersV' | 'falSnowBlowing' | 'falSnowflake' | 'falSolarPanel' | 'falSort' | 'falSpinner' | 'falSquare' | 'falStepForward' | 'falStop' | 'falStopCircle' | 'falStopwatch' | 'falSuitcase' | 'falSun' | 'falSync' | 'falTachometer' | 'falTemperatureHigh' | 'falThLarge' | 'falThList' | 'falTh' | 'falTimesCircle' | 'falTimes' | 'falToggleOff' | 'falToggleOn' | 'falTrashAlt' | 'falUnlockAlt' | 'falUserChart' | 'falUserCircle' | 'falUserCog' | 'falUserEdit' | 'falUserFriends' | 'falUserPlus' | 'falUserShield' | 'falUserTimes' | 'falUser' | 'falUsersClass' | 'falUsers' | 'falWater' | 'falWindTurbine' | 'falWind' | 'falWrench' | 'fasCaretDown' | 'fasCaretLeft' | 'fasCaretRight' | 'fasCaretUp' | 'fasDiamond' | 'fasFolder' | 'fasMapMarkerAlt' | 'fasMapMarkerExclamation' | 'fasQuoteLeft' | 'fasQuoteRight' | 'fasSolarPanel' | 'fasSort' | 'fasStar' | 'fasWindTurbine';
package/icons/consts.js CHANGED
@@ -9,6 +9,7 @@ var cuiCheckboxSelected_1 = __importDefault(require("./baseIcons/cui/cuiCheckbox
9
9
  var cuiCheckboxUnselected_1 = __importDefault(require("./baseIcons/cui/cuiCheckboxUnselected"));
10
10
  var cuiRadioSelected_1 = __importDefault(require("./baseIcons/cui/cuiRadioSelected"));
11
11
  var cuiRadioUnselected_1 = __importDefault(require("./baseIcons/cui/cuiRadioUnselected"));
12
+ var fadSpinnerThird_1 = __importDefault(require("./baseIcons/fad/fadSpinnerThird"));
12
13
  var falCheck_1 = __importDefault(require("./baseIcons/fal/falCheck"));
13
14
  var falCheckCircle_1 = __importDefault(require("./baseIcons/fal/falCheckCircle"));
14
15
  var falEllipsisH_1 = __importDefault(require("./baseIcons/fal/falEllipsisH"));
@@ -30,6 +31,7 @@ exports.defaultIcons = {
30
31
  cuiCheckboxUnselected: cuiCheckboxUnselected_1.default,
31
32
  cuiRadioSelected: cuiRadioSelected_1.default,
32
33
  cuiRadioUnselected: cuiRadioUnselected_1.default,
34
+ fadSpinnerThird: fadSpinnerThird_1.default,
33
35
  falCheck: falCheck_1.default,
34
36
  falCheckCircle: falCheckCircle_1.default,
35
37
  falEllipsisH: falEllipsisH_1.default,
package/input/consts.js CHANGED
@@ -10,20 +10,26 @@ exports.inputLengths = {
10
10
  xl: 480
11
11
  };
12
12
  exports.inputStateMapping = {
13
- default: {
14
- colorScheme: 'grey',
15
- iconRight: ''
16
- },
17
13
  error: {
18
14
  colorScheme: 'red',
19
- iconRight: 'falExclamationTriangle'
15
+ iconProps: {
16
+ color: 'red.80',
17
+ icon: 'falExclamationTriangle'
18
+ }
20
19
  },
21
20
  loading: {
22
21
  colorScheme: 'grey',
23
- iconRight: 'falSpinner'
22
+ iconProps: {
23
+ animation: 'vui-spin 0.6s linear infinite',
24
+ fill: ['blue.20', 'blue.50'],
25
+ icon: 'fadSpinnerThird'
26
+ }
24
27
  },
25
28
  success: {
26
29
  colorScheme: 'green',
27
- iconRight: 'falCheck'
30
+ iconProps: {
31
+ color: 'green.80',
32
+ icon: 'falCheck'
33
+ }
28
34
  }
29
35
  };
@@ -0,0 +1,2 @@
1
+ import { InputProps } from './input.types';
2
+ export declare function getInitialCount(props: InputProps): number;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getInitialCount = void 0;
4
+ function getInitialCount(props) {
5
+ var _a, _b;
6
+ var defaultValue = props.defaultValue, value = props.value;
7
+ return (_b = (_a = defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.toString().length) !== null && _a !== void 0 ? _a : value === null || value === void 0 ? void 0 : value.toString().length) !== null && _b !== void 0 ? _b : 0;
8
+ }
9
+ exports.getInitialCount = getInitialCount;
package/input/input.d.ts CHANGED
@@ -1,7 +1,6 @@
1
- import { InputInputStyleProps, InputProps, InputStyleProps } from './input.types';
2
- export declare const InputInput: import("styled-components").StyledComponent<"input", import("styled-components").DefaultTheme, InputInputStyleProps & {
3
- color?: any;
4
- }, never>;
5
- export declare const InputBase: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, InputStyleProps, never>;
1
+ import { InputProps } from './input.types';
2
+ import { SystemProps } from '../system';
3
+ export declare const InputInput: import("styled-components").StyledComponent<"input", import("styled-components").DefaultTheme, SystemProps, never>;
4
+ export declare const InputBase: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, SystemProps, never>;
6
5
  export declare const Input: import("../core").VuiComponent<"div", InputProps>;
7
6
  export default Input;
package/input/input.js CHANGED
@@ -14,6 +14,25 @@ var __assign = (this && this.__assign) || function () {
14
14
  };
15
15
  return __assign.apply(this, arguments);
16
16
  };
17
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
18
+ if (k2 === undefined) k2 = k;
19
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
20
+ }) : (function(o, m, k, k2) {
21
+ if (k2 === undefined) k2 = k;
22
+ o[k2] = m[k];
23
+ }));
24
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
25
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
26
+ }) : function(o, v) {
27
+ o["default"] = v;
28
+ });
29
+ var __importStar = (this && this.__importStar) || function (mod) {
30
+ if (mod && mod.__esModule) return mod;
31
+ var result = {};
32
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
33
+ __setModuleDefault(result, mod);
34
+ return result;
35
+ };
17
36
  var __rest = (this && this.__rest) || function (s, e) {
18
37
  var t = {};
19
38
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
@@ -25,39 +44,68 @@ var __rest = (this && this.__rest) || function (s, e) {
25
44
  }
26
45
  return t;
27
46
  };
47
+ var __read = (this && this.__read) || function (o, n) {
48
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
49
+ if (!m) return o;
50
+ var i = m.call(o), r, ar = [], e;
51
+ try {
52
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
53
+ }
54
+ catch (error) { e = { error: error }; }
55
+ finally {
56
+ try {
57
+ if (r && !r.done && (m = i["return"])) m.call(i);
58
+ }
59
+ finally { if (e) throw e.error; }
60
+ }
61
+ return ar;
62
+ };
28
63
  var __importDefault = (this && this.__importDefault) || function (mod) {
29
64
  return (mod && mod.__esModule) ? mod : { "default": mod };
30
65
  };
31
66
  Object.defineProperty(exports, "__esModule", { value: true });
32
67
  exports.Input = exports.InputBase = exports.InputInput = void 0;
33
- var styled_components_1 = require("@xstyled/styled-components");
34
- var react_1 = __importDefault(require("react"));
35
- var styled_components_2 = __importDefault(require("styled-components"));
68
+ var react_1 = __importStar(require("react"));
69
+ var styled_components_1 = __importDefault(require("styled-components"));
36
70
  var consts_1 = require("./consts");
71
+ var helpers_1 = require("./helpers");
37
72
  var core_1 = require("../core");
38
73
  var icon_1 = __importDefault(require("../icon"));
74
+ var system_1 = require("../system");
75
+ var t_1 = __importDefault(require("../t"));
39
76
  var utils_1 = require("../utils");
40
- var generator = styled_components_1.compose(styled_components_1.backgroundColor, styled_components_1.borders, styled_components_1.flexboxes, styled_components_1.sizing, styled_components_1.space, styled_components_1.transitions);
41
- exports.InputInput = styled_components_2.default.input(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\talign-self: stretch;\n\tbackground-color: transparent;\n\tborder: none;\n\tflex: 1;\n\tmargin: 0 8px;\n\tmin-width: 0;\n\toutline: none;\n\tpadding: 0;\n\n\t:disabled,\n\t:disabled::placeholder {\n\t\tcolor: var(--vui-colors-disabled-font);\n\t\tcursor: not-allowed;\n\t}\n\n\t", "\n"], ["\n\talign-self: stretch;\n\tbackground-color: transparent;\n\tborder: none;\n\tflex: 1;\n\tmargin: 0 8px;\n\tmin-width: 0;\n\toutline: none;\n\tpadding: 0;\n\n\t:disabled,\n\t:disabled::placeholder {\n\t\tcolor: var(--vui-colors-disabled-font);\n\t\tcursor: not-allowed;\n\t}\n\n\t", "\n"])), styled_components_1.compose(styled_components_1.color, styled_components_1.fontSize));
42
- exports.InputBase = styled_components_2.default.div.withConfig(core_1.forwardPropConfig(generator))(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n\talign-items: center;\n\tborder-width: 1px;\n\tdisplay: flex;\n\toutline: none;\n\twidth: 100%;\n\n\t&.disabled {\n\t\tbackground-color: var(--vui-colors-disabled-bg);\n\t\tcolor: var(--vui-colors-disabled-font);\n\t\tcursor: not-allowed;\n\t}\n\n\t", "\n"], ["\n\talign-items: center;\n\tborder-width: 1px;\n\tdisplay: flex;\n\toutline: none;\n\twidth: 100%;\n\n\t&.disabled {\n\t\tbackground-color: var(--vui-colors-disabled-bg);\n\t\tcolor: var(--vui-colors-disabled-font);\n\t\tcursor: not-allowed;\n\t}\n\n\t", "\n"])), generator);
77
+ exports.InputInput = styled_components_1.default.input.withConfig(core_1.forwardPropConfig(system_1.system))(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\talign-self: stretch;\n\tbackground-color: transparent;\n\tborder: none;\n\tflex: 1;\n\tmargin: 0 8px;\n\tmin-width: 0;\n\toutline: none;\n\tpadding: 0;\n\n\t:disabled,\n\t:disabled::placeholder {\n\t\tcolor: var(--vui-colors-disabled-font);\n\t\tcursor: not-allowed;\n\t}\n\n\t", "\n"], ["\n\talign-self: stretch;\n\tbackground-color: transparent;\n\tborder: none;\n\tflex: 1;\n\tmargin: 0 8px;\n\tmin-width: 0;\n\toutline: none;\n\tpadding: 0;\n\n\t:disabled,\n\t:disabled::placeholder {\n\t\tcolor: var(--vui-colors-disabled-font);\n\t\tcursor: not-allowed;\n\t}\n\n\t", "\n"])), system_1.system);
78
+ exports.InputBase = styled_components_1.default.div.withConfig(core_1.forwardPropConfig(system_1.system))(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n\talign-items: center;\n\tborder-width: 1px;\n\tdisplay: flex;\n\toutline: none;\n\tposition: relative;\n\twidth: 100%;\n\n\t&.disabled {\n\t\tbackground-color: var(--vui-colors-disabled-bg);\n\t\tcolor: var(--vui-colors-disabled-font);\n\t\tcursor: not-allowed;\n\t}\n\n\t", "\n"], ["\n\talign-items: center;\n\tborder-width: 1px;\n\tdisplay: flex;\n\toutline: none;\n\tposition: relative;\n\twidth: 100%;\n\n\t&.disabled {\n\t\tbackground-color: var(--vui-colors-disabled-bg);\n\t\tcolor: var(--vui-colors-disabled-font);\n\t\tcursor: not-allowed;\n\t}\n\n\t", "\n"])), system_1.system);
43
79
  exports.Input = core_1.vui(function (props, ref) {
44
- var _a;
45
- var _b = core_1.omitThemingProps(props), autoComplete = _b.autoComplete, autoFocus = _b.autoFocus, className = _b.className, colorSchemeProp = _b.colorScheme, defaultValue = _b.defaultValue, disabled = _b.disabled, iconLeft = _b.iconLeft, iconRightProp = _b.iconRight, _c = _b.inputProps, inputProps = _c === void 0 ? {} : _c, inputRef = _b.inputRef, itemLeft = _b.itemLeft, itemRight = _b.itemRight, _d = _b.length, length = _d === void 0 ? 'fluid' : _d, name = _b.name, onBlur = _b.onBlur, onChange = _b.onChange, onFocus = _b.onFocus, placeholder = _b.placeholder, readOnly = _b.readOnly, required = _b.required, _e = _b.state, state = _e === void 0 ? 'default' : _e, stateMapping = _b.stateMapping, _f = _b.type, type = _f === void 0 ? 'text' : _f, value = _b.value, rest = __rest(_b, ["autoComplete", "autoFocus", "className", "colorScheme", "defaultValue", "disabled", "iconLeft", "iconRight", "inputProps", "inputRef", "itemLeft", "itemRight", "length", "name", "onBlur", "onChange", "onFocus", "placeholder", "readOnly", "required", "state", "stateMapping", "type", "value"]);
80
+ var _a, _b;
81
+ var _c = __read(react_1.useState(helpers_1.getInitialCount(props)), 2), count = _c[0], setCount = _c[1];
82
+ var _d = core_1.omitThemingProps(props), autoComplete = _d.autoComplete, autoFocus = _d.autoFocus, className = _d.className, colorSchemeProp = _d.colorScheme, defaultValue = _d.defaultValue, disabled = _d.disabled, iconLeft = _d.iconLeft, iconRight = _d.iconRight, _e = _d.inputProps, inputProps = _e === void 0 ? {} : _e, inputRef = _d.inputRef, isInvalid = _d.isInvalid, itemLeft = _d.itemLeft, itemRight = _d.itemRight, _f = _d.length, length = _f === void 0 ? 'fluid' : _f, maxLength = _d.maxLength, name = _d.name, onBlur = _d.onBlur, onChangeProp = _d.onChange, onFocus = _d.onFocus, placeholder = _d.placeholder, readOnly = _d.readOnly, required = _d.required, showCount = _d.showCount, _g = _d.state, state = _g === void 0 ? '' : _g, stateMapping = _d.stateMapping, _h = _d.type, type = _h === void 0 ? 'text' : _h, value = _d.value, rest = __rest(_d, ["autoComplete", "autoFocus", "className", "colorScheme", "defaultValue", "disabled", "iconLeft", "iconRight", "inputProps", "inputRef", "isInvalid", "itemLeft", "itemRight", "length", "maxLength", "name", "onBlur", "onChange", "onFocus", "placeholder", "readOnly", "required", "showCount", "state", "stateMapping", "type", "value"]);
46
83
  var states = __assign(__assign({}, consts_1.inputStateMapping), stateMapping);
47
- var _g = (_a = states[state]) !== null && _a !== void 0 ? _a : {}, _h = _g.colorScheme, colorScheme = _h === void 0 ? colorSchemeProp : _h, _j = _g.iconRight, iconRight = _j === void 0 ? iconRightProp : _j;
48
- var _k = core_1.useStyleConfig('Input', __assign({ colorScheme: colorScheme }, props)), borderColor = _k.borderColor, focusWithinRingColor = _k.focusWithinRingColor, fontSize = _k.fontSize, iconColorProp = _k.iconColor, iconSize = _k.iconSize, styles = __rest(_k, ["borderColor", "focusWithinRingColor", "fontSize", "iconColor", "iconSize"]);
49
- var iconColor = !disabled ? iconColorProp : 'grey.50';
84
+ var _j = (_a = states[state]) !== null && _a !== void 0 ? _a : {}, stateColorScheme = _j.colorScheme, stateIconProps = _j.iconProps;
85
+ var stateProps = utils_1.filterUndefined({
86
+ colorScheme: (_b = colorSchemeProp !== null && colorSchemeProp !== void 0 ? colorSchemeProp : (isInvalid ? 'red' : undefined)) !== null && _b !== void 0 ? _b : stateColorScheme
87
+ });
88
+ var _k = core_1.useStyleConfig('Input', __assign(__assign({}, stateProps), props)), fontSize = _k.fontSize, iconSize = _k.iconSize, styles = __rest(_k, ["fontSize", "iconSize"]);
89
+ function onChange(e) {
90
+ setCount(e.target.value.length);
91
+ onChangeProp === null || onChangeProp === void 0 ? void 0 : onChangeProp(e);
92
+ }
93
+ var iconColor = !disabled ? 'blue.80' : 'grey.50';
94
+ // const iconRight = iconRightProp ?? states[state]?.iconRight
50
95
  var aliasedProps = utils_1.filterUndefined({
51
96
  bg: readOnly ? 'grey.20' : undefined,
97
+ focusWithinBorderColor: !readOnly ? 'transparent' : undefined,
98
+ focusWithinRingColor: readOnly ? 'transparent' : undefined,
52
99
  maxW: consts_1.inputLengths[length]
53
100
  });
54
- return (react_1.default.createElement(exports.InputBase, __assign({ borderColor: !disabled ? borderColor : 'transparent', borderRadius: "md", className: utils_1.cs('vui-input', disabled && 'disabled', className), focusWithinBorderColor: readOnly ? borderColor : 'transparent', focusWithinRingColor: !readOnly ? focusWithinRingColor : 'transparent', px: 1, ref: ref, transitionDuration: "fast" }, styles, aliasedProps, rest), itemLeft !== null && itemLeft !== void 0 ? itemLeft : (iconLeft && react_1.default.createElement(icon_1.default, { color: iconColor, icon: iconLeft, size: iconSize })),
101
+ return (react_1.default.createElement(exports.InputBase, __assign({ borderRadius: "md", className: utils_1.cs('vui-input', disabled && 'disabled', className), px: 1, ref: ref, transitionDuration: "fast" }, styles, aliasedProps, rest), itemLeft !== null && itemLeft !== void 0 ? itemLeft : (iconLeft && react_1.default.createElement(icon_1.default, { color: iconColor, icon: iconLeft, size: iconSize })),
55
102
  react_1.default.createElement(exports.InputInput, __assign({ className: "vui-inputInput", placeholderColor: "grey.60", ref: inputRef }, {
56
103
  autoComplete: autoComplete,
57
104
  autoFocus: autoFocus,
58
105
  defaultValue: defaultValue,
59
106
  disabled: disabled,
60
107
  fontSize: fontSize,
108
+ maxLength: maxLength,
61
109
  name: name,
62
110
  onBlur: onBlur,
63
111
  onChange: onChange,
@@ -67,7 +115,12 @@ exports.Input = core_1.vui(function (props, ref) {
67
115
  required: required,
68
116
  type: type,
69
117
  value: value
70
- }, inputProps)), itemRight !== null && itemRight !== void 0 ? itemRight : (iconRight && (react_1.default.createElement(icon_1.default, { animation: state === 'loading' ? 'spin' : undefined, color: iconColor, icon: iconRight, size: iconSize })))));
118
+ }, inputProps)), itemRight !== null && itemRight !== void 0 ? itemRight : (iconRight && react_1.default.createElement(icon_1.default, { color: iconColor, icon: iconRight, size: iconSize })),
119
+ state && react_1.default.createElement(icon_1.default, __assign({ size: iconSize }, stateIconProps)),
120
+ showCount && (react_1.default.createElement(t_1.default, { color: "grey.80", position: "absolute", right: 0, size: "sm", top: "calc(100% + 2px)" },
121
+ count,
122
+ " / ",
123
+ maxLength))));
71
124
  });
72
125
  exports.Input.displayName = 'Input';
73
126
  exports.default = exports.Input;
@@ -1,26 +1,25 @@
1
1
  /// <reference types="react" />
2
2
  import { inputLengths } from './consts';
3
- import { ChangeEventHandler, FocusEventHandler } from '../core';
4
- import { IconProp } from '../icon';
5
- import { BackgroundColorProps, BordersProps, ColorProps, EffectsProps, FontSizeProps, SizingProps, SpaceProps, TransitionsProps } from '../system';
3
+ import { ChangeEventHandler, FocusEventHandler, PropsOf } from '../core';
4
+ import { IconProp, IconProps } from '../icon';
5
+ import { SystemProps } from '../system';
6
6
  import { ThemingProps } from '../theme';
7
- export interface InputInputProps extends InputInputStyleProps {
8
- }
9
- export interface InputInputStyleProps extends ColorProps, FontSizeProps {
10
- }
11
7
  export declare type InputLength = keyof typeof inputLengths;
12
- export interface InputProps extends InputStyleProps, ThemingProps<'Input'> {
8
+ export interface InputProps extends SystemProps, ThemingProps<'Input'> {
13
9
  autoComplete?: string;
14
10
  autoFocus?: boolean;
15
11
  colorScheme?: 'green' | 'grey' | 'red';
12
+ defaultValue?: number | string;
16
13
  disabled?: boolean;
17
14
  iconLeft?: IconProp;
18
15
  iconRight?: IconProp;
19
- inputProps?: InputInputProps;
16
+ inputProps?: PropsOf<'input'>;
20
17
  inputRef?: React.MutableRefObject<HTMLInputElement | null> | null;
18
+ isInvalid?: boolean;
21
19
  itemLeft?: React.ReactNode;
22
20
  itemRight?: React.ReactNode;
23
21
  length?: InputLength;
22
+ maxLength?: number;
24
23
  name?: string;
25
24
  onBlur?: FocusEventHandler;
26
25
  onChange?: ChangeEventHandler;
@@ -28,6 +27,7 @@ export interface InputProps extends InputStyleProps, ThemingProps<'Input'> {
28
27
  placeholder?: string;
29
28
  readOnly?: boolean;
30
29
  required?: boolean;
30
+ showCount?: boolean;
31
31
  state?: InputState;
32
32
  stateMapping?: InputStateMapping;
33
33
  type?: string;
@@ -36,7 +36,5 @@ export interface InputProps extends InputStyleProps, ThemingProps<'Input'> {
36
36
  export declare type InputState = 'default' | 'error' | 'loading' | 'success';
37
37
  export declare type InputStateMapping = Record<string, {
38
38
  colorScheme?: InputProps['colorScheme'];
39
- iconRight: InputProps['iconRight'];
39
+ iconProps: IconProps;
40
40
  }>;
41
- export interface InputStyleProps extends BackgroundColorProps, BordersProps, EffectsProps, SizingProps, SpaceProps, TransitionsProps {
42
- }
package/input/theme.d.ts CHANGED
@@ -3,7 +3,6 @@ declare function variantDefault(props: Dict): {
3
3
  borderColor: string;
4
4
  focusWithinRing: number;
5
5
  focusWithinRingColor: string;
6
- iconColor: string;
7
6
  };
8
7
  declare const _default: {
9
8
  defaultProps: {
package/input/theme.js CHANGED
@@ -5,13 +5,11 @@ function variantDefault(props) {
5
5
  var styles = {
6
6
  borderColor: c + ".80",
7
7
  focusWithinRing: 2,
8
- focusWithinRingColor: c + ".80",
9
- iconColor: c + ".80"
8
+ focusWithinRingColor: c + ".80"
10
9
  };
11
10
  if (c === 'grey') {
12
11
  styles.borderColor = c + ".60";
13
12
  styles.focusWithinRingColor = 'blue.50';
14
- styles.iconColor = 'blue.80';
15
13
  }
16
14
  return styles;
17
15
  }
@@ -22,7 +20,7 @@ var defaultProps = {
22
20
  };
23
21
  var sizes = {
24
22
  xs: {
25
- fontSize: 'xs',
23
+ fontSize: 'sm',
26
24
  h: 24,
27
25
  iconSize: 'xs'
28
26
  },
package/label/label.d.ts CHANGED
@@ -1,6 +1,5 @@
1
- import { LabelProps, LabelStyleProps } from './label.types';
2
- export declare const LabelBase: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, LabelStyleProps & {
3
- color?: any;
4
- }, never>;
1
+ import { LabelProps } from './label.types';
2
+ import { SystemProps } from '../system';
3
+ export declare const LabelBase: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, SystemProps, never>;
5
4
  export declare const Label: import("../core").VuiComponent<"span", LabelProps>;
6
5
  export default Label;
package/label/label.js CHANGED
@@ -30,18 +30,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
30
30
  };
31
31
  Object.defineProperty(exports, "__esModule", { value: true });
32
32
  exports.Label = exports.LabelBase = void 0;
33
- var styled_components_1 = require("@xstyled/styled-components");
34
33
  var react_1 = __importDefault(require("react"));
35
- var styled_components_2 = __importDefault(require("styled-components"));
34
+ var styled_components_1 = __importDefault(require("styled-components"));
36
35
  var core_1 = require("../core");
37
36
  var icon_1 = __importDefault(require("../icon"));
38
37
  var system_1 = require("../system");
39
38
  var utils_1 = require("../utils");
40
- var generator = styled_components_1.compose(styled_components_1.backgroundColor, styled_components_1.borders, styled_components_1.effects, styled_components_1.flexboxes, styled_components_1.interactivity, system_1.isTruncated, styled_components_1.sizing, styled_components_1.space, styled_components_1.transitions, styled_components_1.typography);
41
- var Text = styled_components_2.default.span(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\t", "\n"], ["\n\t", "\n"])), system_1.isTruncated);
42
- exports.LabelBase = styled_components_2.default.span.withConfig(core_1.forwardPropConfig(generator))(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n\talign-items: center;\n\tdisplay: flex;\n\tjustify-content: center;\n\tline-height: normal;\n\tmin-width: 0px;\n\tposition: relative;\n\twidth: fit-content;\n\n\t&:focus {\n\t\tborder-color: transparent;\n\t\toutline: none;\n\t}\n\n\t", "\n"], ["\n\talign-items: center;\n\tdisplay: flex;\n\tjustify-content: center;\n\tline-height: normal;\n\tmin-width: 0px;\n\tposition: relative;\n\twidth: fit-content;\n\n\t&:focus {\n\t\tborder-color: transparent;\n\t\toutline: none;\n\t}\n\n\t", "\n"])), generator);
39
+ var Text = styled_components_1.default.span(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\t", "\n"], ["\n\t", "\n"])), system_1.isTruncated);
40
+ exports.LabelBase = styled_components_1.default.span.withConfig(core_1.forwardPropConfig(system_1.system))(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n\talign-items: center;\n\tdisplay: flex;\n\tjustify-content: center;\n\tline-height: normal;\n\tmin-width: 0px;\n\tposition: relative;\n\twidth: fit-content;\n\n\t&:focus {\n\t\tborder-color: transparent;\n\t\toutline: none;\n\t}\n\n\t", "\n"], ["\n\talign-items: center;\n\tdisplay: flex;\n\tjustify-content: center;\n\tline-height: normal;\n\tmin-width: 0px;\n\tposition: relative;\n\twidth: fit-content;\n\n\t&:focus {\n\t\tborder-color: transparent;\n\t\toutline: none;\n\t}\n\n\t", "\n"])), system_1.system);
43
41
  exports.Label = core_1.vui(function (props, ref) {
44
- var _a = core_1.omitThemingProps(props), casing = _a.casing, children = _a.children, className = _a.className, icon = _a.icon, iconLeft = _a.iconLeft, iconRight = _a.iconRight, isElevated = _a.isElevated, isFullWidth = _a.isFullWidth, _b = _a.isInteractive, isInteractive = _b === void 0 ? props.onClick !== undefined : _b, isLoading = _a.isLoading, isRound = _a.isRound, isSplit = _a.isSplit, _c = _a.isTruncated, isTruncated = _c === void 0 ? true : _c, itemLeft = _a.itemLeft, itemRight = _a.itemRight, text = _a.text, weight = _a.weight, rest = __rest(_a, ["casing", "children", "className", "icon", "iconLeft", "iconRight", "isElevated", "isFullWidth", "isInteractive", "isLoading", "isRound", "isSplit", "isTruncated", "itemLeft", "itemRight", "text", "weight"]);
42
+ var _a = core_1.omitThemingProps(props), casing = _a.casing, children = _a.children, className = _a.className, icon = _a.icon, iconLeft = _a.iconLeft, iconRight = _a.iconRight, isElevated = _a.isElevated, isFullWidth = _a.isFullWidth, _b = _a.isInteractive, isInteractive = _b === void 0 ? props.onClick !== undefined : _b, isRound = _a.isRound, isSplit = _a.isSplit, _c = _a.isTruncated, isTruncated = _c === void 0 ? true : _c, itemLeft = _a.itemLeft, itemRight = _a.itemRight, text = _a.text, weight = _a.weight, rest = __rest(_a, ["casing", "children", "className", "icon", "iconLeft", "iconRight", "isElevated", "isFullWidth", "isInteractive", "isRound", "isSplit", "isTruncated", "itemLeft", "itemRight", "text", "weight"]);
45
43
  var _d = core_1.useStyleConfig('Label', props), activeBg = _d.activeBg, h = _d.h, hoverBg = _d.hoverBg, _e = _d.iconSize, iconSize = _e === void 0 ? 'md' : _e, _f = _d.spaceX, spaceXBase = _f === void 0 ? 0 : _f, styles = __rest(_d, ["activeBg", "h", "hoverBg", "iconSize", "spaceX"]);
46
44
  var spaceX = spaceXBase / 8;
47
45
  var spaceXText = (spaceXBase + 4) / 8;
@@ -62,13 +60,11 @@ exports.Label = core_1.vui(function (props, ref) {
62
60
  borderRadius: isRound ? h / 2 : undefined,
63
61
  boxShadow: isElevated ? 2 : undefined,
64
62
  fontWeight: weight,
65
- pointerEvents: isLoading ? 'none' : undefined,
66
63
  textTransform: casing,
67
64
  w: isFullWidth ? '100%' : undefined
68
65
  });
69
66
  return (react_1.default.createElement(exports.LabelBase, __assign({ borderRadius: "md", className: utils_1.cs('vui-label', className), fontWeight: "medium", h: h, pl: pl, pr: pr, ref: ref, transitionDuration: "fast" }, styles, interactiveProps, aliasedProps, rest), icon ? (react_1.default.createElement(icon_1.default, { icon: icon, size: iconSize })) : (react_1.default.createElement(react_1.default.Fragment, null, itemLeft !== null && itemLeft !== void 0 ? itemLeft : (iconLeft && react_1.default.createElement(icon_1.default, { icon: iconLeft, mr: spaceX, size: iconSize })),
70
- react_1.default.createElement(Text, { isTruncated: isTruncated }, children !== null && children !== void 0 ? children : text), itemRight !== null && itemRight !== void 0 ? itemRight : (iconRight && react_1.default.createElement(icon_1.default, { icon: iconRight, ml: iconRightMl, size: iconSize })),
71
- isLoading && react_1.default.createElement(icon_1.default, { animation: "spin", icon: "falSpinner", ml: iconRightMl, size: iconSize })))));
67
+ react_1.default.createElement(Text, { isTruncated: isTruncated }, children !== null && children !== void 0 ? children : text), itemRight !== null && itemRight !== void 0 ? itemRight : (iconRight && react_1.default.createElement(icon_1.default, { icon: iconRight, ml: iconRightMl, size: iconSize }))))));
72
68
  });
73
69
  exports.Label.displayName = 'Label';
74
70
  exports.default = exports.Label;
@@ -1,8 +1,8 @@
1
1
  /// <reference types="react" />
2
2
  import { IconProp } from '../icon';
3
- import { BackgroundColorProps, BordersProps, EffectsProps, InteractivityProps, IsTruncatedProps, SizingProps, SpaceProps, TransitionsProps, TypographyProps } from '../system';
3
+ import { SystemProps, TypographyProps } from '../system';
4
4
  import { ThemingProps } from '../theme';
5
- export interface LabelProps extends LabelStyleProps, ThemingProps<'Label'> {
5
+ export interface LabelProps extends SystemProps, ThemingProps<'Label'> {
6
6
  casing?: TypographyProps['textTransform'];
7
7
  colorScheme?: 'blue' | 'green' | 'grey' | 'prussian' | 'red' | 'yellow';
8
8
  icon?: IconProp;
@@ -11,7 +11,6 @@ export interface LabelProps extends LabelStyleProps, ThemingProps<'Label'> {
11
11
  isElevated?: boolean;
12
12
  isFullWidth?: boolean;
13
13
  isInteractive?: boolean;
14
- isLoading?: boolean;
15
14
  isRound?: boolean;
16
15
  isSplit?: boolean;
17
16
  itemLeft?: React.ReactNode;
@@ -19,5 +18,3 @@ export interface LabelProps extends LabelStyleProps, ThemingProps<'Label'> {
19
18
  text?: number | string;
20
19
  weight?: TypographyProps['fontWeight'];
21
20
  }
22
- export interface LabelStyleProps extends BackgroundColorProps, BordersProps, EffectsProps, InteractivityProps, IsTruncatedProps, SizingProps, SpaceProps, TransitionsProps, TypographyProps {
23
- }
package/link/link.d.ts CHANGED
@@ -1,6 +1,5 @@
1
- import { LinkProps, LinkStyleProps } from './link.types';
2
- export declare const LinkBase: import("styled-components").StyledComponent<"a", import("styled-components").DefaultTheme, LinkStyleProps & {
3
- color?: any;
4
- }, never>;
1
+ import { LinkProps } from './link.types';
2
+ import { SystemProps } from '../system';
3
+ export declare const LinkBase: import("styled-components").StyledComponent<"a", import("styled-components").DefaultTheme, SystemProps, never>;
5
4
  export declare const Link: import("../core").VuiComponent<"a", LinkProps>;
6
5
  export default Link;
package/link/link.js CHANGED
@@ -30,23 +30,21 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
30
30
  };
31
31
  Object.defineProperty(exports, "__esModule", { value: true });
32
32
  exports.Link = exports.LinkBase = void 0;
33
- var styled_components_1 = require("@xstyled/styled-components");
34
33
  var react_1 = __importDefault(require("react"));
35
- var styled_components_2 = __importDefault(require("styled-components"));
34
+ var styled_components_1 = __importDefault(require("styled-components"));
36
35
  var core_1 = require("../core");
37
36
  var system_1 = require("../system");
38
37
  var utils_1 = require("../utils");
39
- var generator = styled_components_1.compose(styled_components_1.borders, system_1.isTruncated, styled_components_1.sizing, styled_components_1.space, styled_components_1.transitions, styled_components_1.typography);
40
- exports.LinkBase = styled_components_2.default.a.withConfig(core_1.forwardPropConfig(generator))(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\talign-items: center;\n\tcursor: pointer;\n\tdisplay: inline-flex;\n\toutline: none;\n\ttext-decoration: none;\n\twidth: fit-content;\n\n\t", "\n"], ["\n\talign-items: center;\n\tcursor: pointer;\n\tdisplay: inline-flex;\n\toutline: none;\n\ttext-decoration: none;\n\twidth: fit-content;\n\n\t", "\n"])), generator);
38
+ exports.LinkBase = styled_components_1.default.a.withConfig(core_1.forwardPropConfig(system_1.system))(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\talign-items: center;\n\tcursor: pointer;\n\tdisplay: inline-flex;\n\toutline: none;\n\ttext-decoration: none;\n\twidth: fit-content;\n\n\t", "\n"], ["\n\talign-items: center;\n\tcursor: pointer;\n\tdisplay: inline-flex;\n\toutline: none;\n\ttext-decoration: none;\n\twidth: fit-content;\n\n\t", "\n"])), system_1.system);
41
39
  exports.Link = core_1.vui(function (props, ref) {
42
- var _a = core_1.omitThemingProps(props), children = _a.children, className = _a.className, decoration = _a.decoration, _b = _a.hoverDecoration, hoverDecoration = _b === void 0 ? 'underline' : _b, isExternal = _a.isExternal, text = _a.text, weight = _a.weight, rest = __rest(_a, ["children", "className", "decoration", "hoverDecoration", "isExternal", "text", "weight"]);
40
+ var _a = core_1.omitThemingProps(props), children = _a.children, className = _a.className, decoration = _a.decoration, _b = _a.hoverDecoration, hoverDecoration = _b === void 0 ? 'underline' : _b, isExternal = _a.isExternal, isUnderlined = _a.isUnderlined, text = _a.text, weight = _a.weight, rest = __rest(_a, ["children", "className", "decoration", "hoverDecoration", "isExternal", "isUnderlined", "text", "weight"]);
43
41
  var styles = core_1.useStyleConfig('Link', props);
44
42
  var aliasedProps = utils_1.filterUndefined({
45
43
  fontWeight: weight,
46
44
  hoverTextDecoration: hoverDecoration,
47
45
  rel: isExternal ? 'noopener' : undefined,
48
46
  target: isExternal ? '_blank' : undefined,
49
- textDecoration: decoration
47
+ textDecoration: decoration !== null && decoration !== void 0 ? decoration : (isUnderlined ? 'underline' : undefined)
50
48
  });
51
49
  return (react_1.default.createElement(exports.LinkBase, __assign({ borderRadius: "sm", className: utils_1.cs('vui-link', className), focusRing: 2, ref: ref, transitionDuration: "instant" }, styles, aliasedProps, rest), children !== null && children !== void 0 ? children : text));
52
50
  });
@@ -1,12 +1,11 @@
1
- import { BordersProps, IsTruncatedProps, SizingProps, SpaceProps, TransitionsProps, TypographyProps } from '../system';
1
+ import { SystemProps, TypographyProps } from '../system';
2
2
  import { ThemingProps } from '../theme';
3
- export interface LinkProps extends LinkStyleProps, ThemingProps<'Link'> {
4
- colorScheme?: 'blue' | 'prussian';
3
+ export interface LinkProps extends SystemProps, ThemingProps<'Link'> {
4
+ colorScheme?: 'blue' | 'white';
5
5
  decoration?: TypographyProps['textDecoration'];
6
6
  hoverDecoration?: TypographyProps['textDecoration'];
7
7
  isExternal?: boolean;
8
+ isUnderlined?: boolean;
8
9
  text?: number | string;
9
10
  weight?: TypographyProps['fontWeight'];
10
11
  }
11
- export interface LinkStyleProps extends BordersProps, IsTruncatedProps, SizingProps, SpaceProps, TransitionsProps, TypographyProps {
12
- }
package/link/theme.d.ts CHANGED
@@ -3,6 +3,10 @@ declare function variantDefault(props: Dict): {
3
3
  color: string;
4
4
  hoverColor: string;
5
5
  };
6
+ declare function variantLight(props: Dict): {
7
+ color: string;
8
+ hoverColor: string;
9
+ };
6
10
  declare const _default: {
7
11
  defaultProps: {
8
12
  colorScheme: string;
@@ -25,6 +29,7 @@ declare const _default: {
25
29
  };
26
30
  variants: {
27
31
  default: typeof variantDefault;
32
+ light: typeof variantLight;
28
33
  };
29
34
  };
30
35
  export default _default;
package/link/theme.js CHANGED
@@ -6,6 +6,18 @@ function variantDefault(props) {
6
6
  color: c + ".80",
7
7
  hoverColor: c + ".60"
8
8
  };
9
+ if (c === 'white') {
10
+ styles.color = 'white';
11
+ styles.hoverColor = 'white';
12
+ }
13
+ return styles;
14
+ }
15
+ function variantLight(props) {
16
+ var c = props.colorScheme;
17
+ var styles = {
18
+ color: c + ".60",
19
+ hoverColor: c + ".40"
20
+ };
9
21
  return styles;
10
22
  }
11
23
  var defaultProps = {
@@ -28,7 +40,8 @@ var sizes = {
28
40
  }
29
41
  };
30
42
  var variants = {
31
- default: variantDefault
43
+ default: variantDefault,
44
+ light: variantLight
32
45
  };
33
46
  exports.default = {
34
47
  defaultProps: defaultProps,
package/list/list.d.ts CHANGED
@@ -1,9 +1,10 @@
1
- import { ListProps, ListStyleProps } from './list.types';
1
+ import { ListProps } from './list.types';
2
2
  import ListHeading from './listHeading';
3
3
  import ListIcon from './listIcon';
4
4
  import ListItem from './listItem';
5
5
  import { VuiComponent } from '../core';
6
- export declare const ListBase: import("styled-components").StyledComponent<"ul", import("styled-components").DefaultTheme, ListStyleProps, never>;
6
+ import { SystemProps } from '../system';
7
+ export declare const ListBase: import("styled-components").StyledComponent<"ul", import("styled-components").DefaultTheme, SystemProps, never>;
7
8
  export declare const List: VuiComponent<"ul", ListProps> & {
8
9
  Heading: typeof ListHeading;
9
10
  Icon: typeof ListIcon;