@tecsinapse/react-core 1.17.3 → 1.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +39 -0
- package/dist/components/atoms/Avatar/Avatar.js.map +1 -1
- package/dist/components/atoms/Avatar/helpers.js.map +1 -1
- package/dist/components/atoms/Avatar/index.js.map +1 -1
- package/dist/components/atoms/Avatar/styled.js.map +1 -1
- package/dist/components/atoms/Badge/Badge.js.map +1 -1
- package/dist/components/atoms/Badge/index.js.map +1 -1
- package/dist/components/atoms/Badge/styled.js.map +1 -1
- package/dist/components/atoms/BoxContent/BoxContent.js.map +1 -1
- package/dist/components/atoms/BoxContent/index.js.map +1 -1
- package/dist/components/atoms/BoxContent/styled.js +1 -1
- package/dist/components/atoms/BoxContent/styled.js.map +1 -1
- package/dist/components/atoms/Button/Button.js +1 -1
- package/dist/components/atoms/Button/Button.js.map +1 -1
- package/dist/components/atoms/Button/States/BaseState.js.map +1 -1
- package/dist/components/atoms/Button/States/Error.js +1 -1
- package/dist/components/atoms/Button/States/Error.js.map +1 -1
- package/dist/components/atoms/Button/States/Loading.js.map +1 -1
- package/dist/components/atoms/Button/States/Success.js +1 -1
- package/dist/components/atoms/Button/States/Success.js.map +1 -1
- package/dist/components/atoms/Button/States/index.js.map +1 -1
- package/dist/components/atoms/Button/States/styled.js +1 -1
- package/dist/components/atoms/Button/States/styled.js.map +1 -1
- package/dist/components/atoms/Button/index.js +1 -1
- package/dist/components/atoms/Button/index.js.map +1 -1
- package/dist/components/atoms/Button/styled.js.map +1 -1
- package/dist/components/atoms/Card/Card.js +1 -1
- package/dist/components/atoms/Card/Card.js.map +1 -1
- package/dist/components/atoms/Card/Footer/Footer.js.map +1 -1
- package/dist/components/atoms/Card/Footer/index.js.map +1 -1
- package/dist/components/atoms/Card/Header/Header.js.map +1 -1
- package/dist/components/atoms/Card/Header/index.js.map +1 -1
- package/dist/components/atoms/Card/index.js.map +1 -1
- package/dist/components/atoms/Card/styled.js.map +1 -1
- package/dist/components/atoms/Checkbox/Checkbox.js +1 -1
- package/dist/components/atoms/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/atoms/Checkbox/index.js.map +1 -1
- package/dist/components/atoms/Checkbox/styled.js +1 -1
- package/dist/components/atoms/Checkbox/styled.js.map +1 -1
- package/dist/components/atoms/Divider/Divider.js.map +1 -1
- package/dist/components/atoms/Divider/index.js.map +1 -1
- package/dist/components/atoms/Divider/styled.js.map +1 -1
- package/dist/components/atoms/GroupButton/GroupButton.d.ts +1 -1
- package/dist/components/atoms/GroupButton/GroupButton.js +1 -1
- package/dist/components/atoms/GroupButton/GroupButton.js.map +1 -1
- package/dist/components/atoms/GroupButton/GroupButtonOption.js.map +1 -1
- package/dist/components/atoms/GroupButton/index.js +1 -1
- package/dist/components/atoms/GroupButton/index.js.map +1 -1
- package/dist/components/atoms/GroupButton/styled.js +1 -1
- package/dist/components/atoms/GroupButton/styled.js.map +1 -1
- package/dist/components/atoms/Icon/Icon.js +1 -1
- package/dist/components/atoms/Icon/Icon.js.map +1 -1
- package/dist/components/atoms/Icon/helpers.js +1 -1
- package/dist/components/atoms/Icon/helpers.js.map +1 -1
- package/dist/components/atoms/Icon/index.js.map +1 -1
- package/dist/components/atoms/Input/Hint.js.map +1 -1
- package/dist/components/atoms/Input/InputContainer/InputContainer.d.ts +1 -1
- package/dist/components/atoms/Input/InputContainer/InputContainer.js +1 -1
- package/dist/components/atoms/Input/InputContainer/InputContainer.js.map +1 -1
- package/dist/components/atoms/Input/InputElement/InputElement.d.ts +3 -4
- package/dist/components/atoms/Input/InputElement/InputElement.js +1 -1
- package/dist/components/atoms/Input/InputElement/InputElement.js.map +1 -1
- package/dist/components/atoms/Input/InputMaskElement/InputMaskElement.d.ts +3 -4
- package/dist/components/atoms/Input/InputMaskElement/InputMaskElement.js +1 -1
- package/dist/components/atoms/Input/InputMaskElement/InputMaskElement.js.map +1 -1
- package/dist/components/atoms/Input/PressableInputContainer/PressableInputContainer.js +1 -1
- package/dist/components/atoms/Input/PressableInputContainer/PressableInputContainer.js.map +1 -1
- package/dist/components/atoms/Input/PressableInputContainer/index.js.map +1 -1
- package/dist/components/atoms/Input/PressableInputContainer/styled.js.map +1 -1
- package/dist/components/atoms/Input/hooks/useInputFocus.js.map +1 -1
- package/dist/components/atoms/Input/hooks/useNumberMask.js.map +1 -1
- package/dist/components/atoms/Input/hooks/useStringMask.js +1 -1
- package/dist/components/atoms/Input/hooks/useStringMask.js.map +1 -1
- package/dist/components/atoms/Input/index.js +1 -1
- package/dist/components/atoms/Input/index.js.map +1 -1
- package/dist/components/atoms/Input/styled.js +1 -1
- package/dist/components/atoms/Input/styled.js.map +1 -1
- package/dist/components/atoms/Paper/Paper.js +1 -1
- package/dist/components/atoms/Paper/Paper.js.map +1 -1
- package/dist/components/atoms/Paper/index.js.map +1 -1
- package/dist/components/atoms/Paper/styled.js.map +1 -1
- package/dist/components/atoms/PressableSurface/PressableSurface.js +1 -1
- package/dist/components/atoms/PressableSurface/PressableSurface.js.map +1 -1
- package/dist/components/atoms/PressableSurface/index.js.map +1 -1
- package/dist/components/atoms/ProgressBar/ProgressBar.d.ts +1 -1
- package/dist/components/atoms/ProgressBar/ProgressBar.js.map +1 -1
- package/dist/components/atoms/ProgressBar/index.js.map +1 -1
- package/dist/components/atoms/ProgressBar/styled.js +1 -1
- package/dist/components/atoms/ProgressBar/styled.js.map +1 -1
- package/dist/components/atoms/RadioButton/RadioButton.js +1 -1
- package/dist/components/atoms/RadioButton/RadioButton.js.map +1 -1
- package/dist/components/atoms/RadioButton/index.js.map +1 -1
- package/dist/components/atoms/RadioButton/styled.js +1 -1
- package/dist/components/atoms/RadioButton/styled.js.map +1 -1
- package/dist/components/atoms/Switch/Switch.d.ts +1 -1
- package/dist/components/atoms/Switch/Switch.js +1 -1
- package/dist/components/atoms/Switch/Switch.js.map +1 -1
- package/dist/components/atoms/Switch/animation.js.map +1 -1
- package/dist/components/atoms/Switch/index.js.map +1 -1
- package/dist/components/atoms/Switch/styled.d.ts +2 -14
- package/dist/components/atoms/Switch/styled.js +1 -1
- package/dist/components/atoms/Switch/styled.js.map +1 -1
- package/dist/components/atoms/Tag/Tag.js +1 -1
- package/dist/components/atoms/Tag/Tag.js.map +1 -1
- package/dist/components/atoms/Tag/index.js.map +1 -1
- package/dist/components/atoms/Tag/styled.js +1 -1
- package/dist/components/atoms/Tag/styled.js.map +1 -1
- package/dist/components/atoms/Text/Text.js +1 -1
- package/dist/components/atoms/Text/Text.js.map +1 -1
- package/dist/components/atoms/Text/functions.js.map +1 -1
- package/dist/components/atoms/Text/index.js.map +1 -1
- package/dist/components/atoms/Text/styled.js +1 -1
- package/dist/components/atoms/Text/styled.js.map +1 -1
- package/dist/components/atoms/shared/PaperAndCard.js.map +1 -1
- package/dist/components/molecules/Calendar/Calendar.js.map +1 -1
- package/dist/components/molecules/Calendar/components/MonthWeek.js.map +1 -1
- package/dist/components/molecules/Calendar/components/Weekdays.js.map +1 -1
- package/dist/components/molecules/Calendar/components/index.js +1 -1
- package/dist/components/molecules/Calendar/components/index.js.map +1 -1
- package/dist/components/molecules/Calendar/index.d.ts +1 -1
- package/dist/components/molecules/Calendar/index.js +1 -1
- package/dist/components/molecules/Calendar/index.js.map +1 -1
- package/dist/components/molecules/Calendar/styled.js +1 -1
- package/dist/components/molecules/Calendar/styled.js.map +1 -1
- package/dist/components/molecules/DatePicker/DatePicker.js +1 -1
- package/dist/components/molecules/DatePicker/DatePicker.js.map +1 -1
- package/dist/components/molecules/DatePicker/index.js.map +1 -1
- package/dist/components/molecules/DatePicker/styled.js +1 -1
- package/dist/components/molecules/DatePicker/styled.js.map +1 -1
- package/dist/components/molecules/DateTimePicker/DateTimePicker.js +1 -1
- package/dist/components/molecules/DateTimePicker/DateTimePicker.js.map +1 -1
- package/dist/components/molecules/DateTimePicker/index.js.map +1 -1
- package/dist/components/molecules/DateTimePicker/styled.js.map +1 -1
- package/dist/components/molecules/DateTimeSelector/DateTimeSelector.js +2 -1
- package/dist/components/molecules/DateTimeSelector/DateTimeSelector.js.map +1 -1
- package/dist/components/molecules/DateTimeSelector/Selector.js.map +1 -1
- package/dist/components/molecules/DateTimeSelector/index.js +1 -1
- package/dist/components/molecules/DateTimeSelector/index.js.map +1 -1
- package/dist/components/molecules/DateTimeSelector/styled.js +1 -1
- package/dist/components/molecules/DateTimeSelector/styled.js.map +1 -1
- package/dist/components/molecules/Grid/functions.d.ts +3 -0
- package/dist/components/molecules/Grid/functions.js +21 -0
- package/dist/components/molecules/Grid/functions.js.map +1 -0
- package/dist/components/molecules/Grid/index.d.ts +42 -2
- package/dist/components/molecules/Grid/index.js +4 -13
- package/dist/components/molecules/Grid/index.js.map +1 -1
- package/dist/components/molecules/HintInputContainer/HintInputContainer.js +1 -1
- package/dist/components/molecules/HintInputContainer/HintInputContainer.js.map +1 -1
- package/dist/components/molecules/HintInputContainer/index.js.map +1 -1
- package/dist/components/molecules/HintInputContainer/styled.js.map +1 -1
- package/dist/components/molecules/IconTextButton/IconComponent.d.ts +9 -0
- package/dist/components/molecules/IconTextButton/IconComponent.js +28 -0
- package/dist/components/molecules/IconTextButton/IconComponent.js.map +1 -0
- package/dist/components/molecules/IconTextButton/IconTextButton.d.ts +8 -0
- package/dist/components/molecules/IconTextButton/IconTextButton.js +4 -0
- package/dist/components/molecules/IconTextButton/IconTextButton.js.map +1 -0
- package/dist/components/molecules/IconTextButton/index.d.ts +2 -0
- package/dist/components/molecules/IconTextButton/index.js +16 -0
- package/dist/components/molecules/IconTextButton/index.js.map +1 -0
- package/dist/components/molecules/IconTextButton/styled.d.ts +4 -0
- package/dist/components/molecules/{Grid/Item/index.js → IconTextButton/styled.js} +19 -5
- package/dist/components/molecules/IconTextButton/styled.js.map +1 -0
- package/dist/components/molecules/InputPassword/InputPasswordIcon.js +1 -1
- package/dist/components/molecules/InputPassword/InputPasswordIcon.js.map +1 -1
- package/dist/components/molecules/InputPassword/index.js.map +1 -1
- package/dist/components/molecules/InputPassword/styled.js.map +1 -1
- package/dist/components/molecules/LabeledSwitch/LabeledSwitch.d.ts +7 -0
- package/dist/components/molecules/LabeledSwitch/LabeledSwitch.js +4 -0
- package/dist/components/molecules/LabeledSwitch/LabeledSwitch.js.map +1 -0
- package/dist/components/molecules/LabeledSwitch/index.d.ts +1 -0
- package/dist/components/molecules/LabeledSwitch/index.js +10 -0
- package/dist/components/molecules/LabeledSwitch/index.js.map +1 -0
- package/dist/components/molecules/Snackbar/Snackbar.js +1 -1
- package/dist/components/molecules/Snackbar/Snackbar.js.map +1 -1
- package/dist/components/molecules/Snackbar/index.js.map +1 -1
- package/dist/components/molecules/Snackbar/styled.js +1 -1
- package/dist/components/molecules/Snackbar/styled.js.map +1 -1
- package/dist/components/molecules/TextArea/TextArea.d.ts +1 -1
- package/dist/components/molecules/TextArea/TextArea.js.map +1 -1
- package/dist/components/molecules/TextArea/index.js +1 -1
- package/dist/components/molecules/TextArea/index.js.map +1 -1
- package/dist/components/molecules/TextArea/styled.d.ts +2 -14
- package/dist/components/molecules/TextArea/styled.js.map +1 -1
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/useDebouncedState.js +1 -1
- package/dist/hooks/useDebouncedState.js.map +1 -1
- package/dist/hooks/useTheme.js.map +1 -1
- package/dist/index.d.ts +7 -5
- package/dist/index.js +58 -30
- package/dist/index.js.map +1 -1
- package/dist/styles/ThemeProvider.js.map +1 -1
- package/dist/styles/definitions.d.ts +2 -1
- package/dist/styles/definitions.js +7 -1
- package/dist/styles/definitions.js.map +1 -1
- package/dist/styles/light.js +2 -1
- package/dist/styles/light.js.map +1 -1
- package/dist/types/defaults.d.ts +8 -2
- package/dist/types/defaults.js.map +1 -1
- package/dist/utils/IPhoneXHelper.js +3 -3
- package/dist/utils/IPhoneXHelper.js.map +1 -1
- package/dist/utils/ResponsiveFontSize.js +6 -6
- package/dist/utils/ResponsiveFontSize.js.map +1 -1
- package/dist/utils/extractNumbersFromString.js +1 -1
- package/dist/utils/extractNumbersFromString.js.map +1 -1
- package/dist/utils/formatWithMask.js.map +1 -1
- package/dist/utils/index.d.ts +5 -4
- package/dist/utils/index.js +28 -19
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/lightenDarkenColor.js.map +1 -1
- package/dist/utils/masks.js.map +1 -1
- package/dist/utils/variantComplement.d.ts +6 -0
- package/dist/utils/variantComplement.js +35 -0
- package/dist/utils/variantComplement.js.map +1 -0
- package/package.json +5 -5
- package/src/components/atoms/Badge/styled.ts +2 -3
- package/src/components/atoms/GroupButton/GroupButton.tsx +2 -5
- package/src/components/atoms/Input/InputContainer/InputContainer.tsx +3 -3
- package/src/components/atoms/Input/InputElement/InputElement.tsx +4 -5
- package/src/components/atoms/Input/InputMaskElement/InputMaskElement.tsx +4 -5
- package/src/components/atoms/ProgressBar/ProgressBar.tsx +2 -4
- package/src/components/atoms/Switch/Switch.tsx +39 -19
- package/src/components/atoms/Switch/animation.ts +4 -6
- package/src/components/atoms/Switch/styled.ts +4 -6
- package/src/components/atoms/Tag/Tag.tsx +1 -1
- package/src/components/atoms/shared/PaperAndCard.ts +1 -1
- package/src/components/molecules/Calendar/index.ts +1 -1
- package/src/components/molecules/DatePicker/DatePicker.tsx +12 -8
- package/src/components/molecules/DateTimePicker/DateTimePicker.tsx +19 -11
- package/src/components/molecules/DateTimeSelector/DateTimeSelector.tsx +0 -1
- package/src/components/molecules/Grid/functions.ts +29 -0
- package/src/components/molecules/Grid/index.ts +66 -2
- package/src/components/molecules/HintInputContainer/HintInputContainer.tsx +6 -1
- package/src/components/molecules/IconTextButton/IconComponent.tsx +31 -0
- package/src/components/molecules/IconTextButton/IconTextButton.tsx +10 -0
- package/src/components/molecules/IconTextButton/index.ts +2 -0
- package/src/components/molecules/IconTextButton/styled.ts +20 -0
- package/src/components/molecules/LabeledSwitch/LabeledSwitch.tsx +9 -0
- package/src/components/molecules/LabeledSwitch/index.ts +1 -0
- package/src/components/molecules/Snackbar/Snackbar.tsx +1 -1
- package/src/components/molecules/Snackbar/styled.ts +6 -2
- package/src/components/molecules/TextArea/TextArea.tsx +6 -2
- package/src/components/molecules/TextArea/styled.ts +5 -2
- package/src/hooks/useDebouncedState.ts +1 -1
- package/src/index.ts +26 -6
- package/src/styles/definitions.ts +8 -1
- package/src/styles/light.ts +2 -0
- package/src/types/defaults.ts +11 -1
- package/src/utils/IPhoneXHelper.ts +27 -22
- package/src/utils/ResponsiveFontSize.ts +55 -36
- package/src/utils/index.ts +5 -4
- package/src/utils/variantComplement.ts +36 -0
- package/dist/components/molecules/Grid/Grid.d.ts +0 -15
- package/dist/components/molecules/Grid/Grid.js +0 -55
- package/dist/components/molecules/Grid/Grid.js.map +0 -1
- package/dist/components/molecules/Grid/Item/Item.d.ts +0 -30
- package/dist/components/molecules/Grid/Item/Item.js +0 -68
- package/dist/components/molecules/Grid/Item/Item.js.map +0 -1
- package/dist/components/molecules/Grid/Item/index.d.ts +0 -1
- package/dist/components/molecules/Grid/Item/index.js.map +0 -1
- package/src/components/molecules/Grid/Grid.stories.tsx +0 -132
- package/src/components/molecules/Grid/Grid.tsx +0 -87
- package/src/components/molecules/Grid/Item/Item.tsx +0 -93
- package/src/components/molecules/Grid/Item/index.ts +0 -1
package/dist/index.js
CHANGED
|
@@ -33,6 +33,7 @@ var _exportNames = {
|
|
|
33
33
|
GroupButtonValue: true,
|
|
34
34
|
Icon: true,
|
|
35
35
|
IconProps: true,
|
|
36
|
+
disabledInputStyles: true,
|
|
36
37
|
Hint: true,
|
|
37
38
|
InputContainer: true,
|
|
38
39
|
InputContainerProps: true,
|
|
@@ -47,7 +48,6 @@ var _exportNames = {
|
|
|
47
48
|
useInputFocus: true,
|
|
48
49
|
useNumberMask: true,
|
|
49
50
|
useStringMask: true,
|
|
50
|
-
disabledInputStyles: true,
|
|
51
51
|
Paper: true,
|
|
52
52
|
PaperProps: true,
|
|
53
53
|
PressableSurface: true,
|
|
@@ -74,21 +74,32 @@ var _exportNames = {
|
|
|
74
74
|
DateTimeSelector: true,
|
|
75
75
|
DateTimeSelectorMode: true,
|
|
76
76
|
DateTimeSelectorProps: true,
|
|
77
|
+
GridSpacing: true,
|
|
78
|
+
IGridItem: true,
|
|
79
|
+
getGridItemPadding: true,
|
|
80
|
+
getGridItemColumSpan: true,
|
|
81
|
+
IGrid: true,
|
|
82
|
+
FlexAlignBase: true,
|
|
83
|
+
FlexAlignType: true,
|
|
84
|
+
FlexPositioning: true,
|
|
85
|
+
FlexSpacing: true,
|
|
86
|
+
PaddingPosition: true,
|
|
87
|
+
HintInputContainer: true,
|
|
88
|
+
HintInputContainerProps: true,
|
|
89
|
+
IconComponent: true,
|
|
90
|
+
IconPositionOptions: true,
|
|
91
|
+
IconTextButtonProps: true,
|
|
77
92
|
InputPasswordIcon: true,
|
|
93
|
+
LabeledSwitchProps: true,
|
|
94
|
+
LabelPositionOptions: true,
|
|
78
95
|
Snackbar: true,
|
|
79
96
|
SnackbarProps: true,
|
|
80
|
-
HintInputContainer: true,
|
|
81
|
-
HintInputContainerProps: true,
|
|
82
97
|
TextArea: true,
|
|
83
|
-
TextAreaProps: true,
|
|
84
98
|
TextAreaInputBase: true,
|
|
85
|
-
|
|
86
|
-
Grid: true,
|
|
87
|
-
IGridItem: true,
|
|
88
|
-
IGrid: true,
|
|
99
|
+
TextAreaProps: true,
|
|
89
100
|
ThemeProvider: true
|
|
90
101
|
};
|
|
91
|
-
exports.
|
|
102
|
+
exports.useStringMask = exports.useNumberMask = exports.useInputFocus = exports.getGridItemPadding = exports.getGridItemColumSpan = exports.disabledInputStyles = exports.Value = exports.ThemeProvider = exports.TextProps = exports.TextAreaProps = exports.TextAreaInputBase = exports.TextArea = exports.Text = exports.TagProps = exports.Tag = exports.SwitchProps = exports.Switch = exports.Success = exports.StyledBorderKeeper = exports.SnackbarProps = exports.Snackbar = exports.SelectionType = exports.RadioButtonProps = exports.RadioButton = exports.ProgressBarProps = exports.ProgressBar = exports.PressableSurfaceProps = exports.PressableSurface = exports.PressableInputContainerProps = exports.PressableInputContainer = exports.PaperProps = exports.Paper = exports.PaddingPosition = exports.Loading = exports.LabeledSwitchProps = exports.LabelPositionOptions = exports.InputVariantType = exports.InputPasswordIcon = exports.InputMaskElementProps = exports.InputMaskElement = exports.InputElementProps = exports.InputElement = exports.InputContainerProps = exports.InputContainer = exports.IconTextButtonProps = exports.IconProps = exports.IconPositionOptions = exports.IconComponent = exports.Icon = exports.IGridItem = exports.IGrid = exports.HintInputContainerProps = exports.HintInputContainer = exports.Hint = exports.HeaderProps = exports.Header = exports.GroupButtonValue = exports.GroupButtonProps = exports.GroupButtonOptionProps = exports.GroupButtonOption = exports.GroupButton = exports.GridSpacing = exports.FooterProps = exports.Footer = exports.FlexSpacing = exports.FlexPositioning = exports.FlexAlignType = exports.FlexAlignBase = exports.Error = exports.DividerProps = exports.Divider = exports.DateTimeSelectorProps = exports.DateTimeSelectorMode = exports.DateTimeSelector = exports.DateTimePickerProps = exports.DateTimePicker = exports.DateRange = exports.DatePickerProps = exports.DatePicker = exports.CheckboxProps = exports.Checkbox = exports.CardProps = exports.Card = exports.CalendarProps = exports.Calendar = exports.ButtonStateType = exports.ButtonStateProps = exports.ButtonSizeType = exports.ButtonProps = exports.Button = exports.BoxContentProps = exports.BoxContent = exports.BadgeProps = exports.Badge = exports.AvatarProps = exports.Avatar = void 0;
|
|
92
103
|
|
|
93
104
|
var _Avatar = require("./components/atoms/Avatar");
|
|
94
105
|
|
|
@@ -156,6 +167,7 @@ exports.IconProps = _Icon.IconProps;
|
|
|
156
167
|
|
|
157
168
|
var _Input = require("./components/atoms/Input");
|
|
158
169
|
|
|
170
|
+
exports.disabledInputStyles = _Input.disabledInputStyles;
|
|
159
171
|
exports.Hint = _Input.Hint;
|
|
160
172
|
exports.InputContainer = _Input.InputContainer;
|
|
161
173
|
exports.InputContainerProps = _Input.InputContainerProps;
|
|
@@ -170,7 +182,6 @@ exports.StyledBorderKeeper = _Input.StyledBorderKeeper;
|
|
|
170
182
|
exports.useInputFocus = _Input.useInputFocus;
|
|
171
183
|
exports.useNumberMask = _Input.useNumberMask;
|
|
172
184
|
exports.useStringMask = _Input.useStringMask;
|
|
173
|
-
exports.disabledInputStyles = _Input.disabledInputStyles;
|
|
174
185
|
|
|
175
186
|
var _Paper = require("./components/atoms/Paper");
|
|
176
187
|
|
|
@@ -231,32 +242,58 @@ exports.DateTimeSelector = _DateTimeSelector.DateTimeSelector;
|
|
|
231
242
|
exports.DateTimeSelectorMode = _DateTimeSelector.DateTimeSelectorMode;
|
|
232
243
|
exports.DateTimeSelectorProps = _DateTimeSelector.DateTimeSelectorProps;
|
|
233
244
|
|
|
245
|
+
var _Grid = require("./components/molecules/Grid");
|
|
246
|
+
|
|
247
|
+
exports.GridSpacing = _Grid.GridSpacing;
|
|
248
|
+
exports.IGridItem = _Grid.IGridItem;
|
|
249
|
+
exports.getGridItemPadding = _Grid.getGridItemPadding;
|
|
250
|
+
exports.getGridItemColumSpan = _Grid.getGridItemColumSpan;
|
|
251
|
+
exports.IGrid = _Grid.IGrid;
|
|
252
|
+
exports.FlexAlignBase = _Grid.FlexAlignBase;
|
|
253
|
+
exports.FlexAlignType = _Grid.FlexAlignType;
|
|
254
|
+
exports.FlexPositioning = _Grid.FlexPositioning;
|
|
255
|
+
exports.FlexSpacing = _Grid.FlexSpacing;
|
|
256
|
+
exports.PaddingPosition = _Grid.PaddingPosition;
|
|
257
|
+
|
|
258
|
+
var _HintInputContainer = require("./components/molecules/HintInputContainer");
|
|
259
|
+
|
|
260
|
+
exports.HintInputContainer = _HintInputContainer.HintInputContainer;
|
|
261
|
+
exports.HintInputContainerProps = _HintInputContainer.HintInputContainerProps;
|
|
262
|
+
|
|
263
|
+
var _IconTextButton = require("./components/molecules/IconTextButton");
|
|
264
|
+
|
|
265
|
+
exports.IconComponent = _IconTextButton.IconComponent;
|
|
266
|
+
exports.IconPositionOptions = _IconTextButton.IconPositionOptions;
|
|
267
|
+
exports.IconTextButtonProps = _IconTextButton.IconTextButtonProps;
|
|
268
|
+
|
|
234
269
|
var _InputPassword = require("./components/molecules/InputPassword");
|
|
235
270
|
|
|
236
271
|
exports.InputPasswordIcon = _InputPassword.InputPasswordIcon;
|
|
237
272
|
|
|
273
|
+
var _LabeledSwitch = require("./components/molecules/LabeledSwitch");
|
|
274
|
+
|
|
275
|
+
exports.LabeledSwitchProps = _LabeledSwitch.LabeledSwitchProps;
|
|
276
|
+
exports.LabelPositionOptions = _LabeledSwitch.LabelPositionOptions;
|
|
277
|
+
|
|
238
278
|
var _Snackbar = require("./components/molecules/Snackbar");
|
|
239
279
|
|
|
240
280
|
exports.Snackbar = _Snackbar.Snackbar;
|
|
241
281
|
exports.SnackbarProps = _Snackbar.SnackbarProps;
|
|
242
282
|
|
|
243
|
-
var _HintInputContainer = require("./components/molecules/HintInputContainer");
|
|
244
|
-
|
|
245
|
-
exports.HintInputContainer = _HintInputContainer.HintInputContainer;
|
|
246
|
-
exports.HintInputContainerProps = _HintInputContainer.HintInputContainerProps;
|
|
247
|
-
|
|
248
283
|
var _TextArea = require("./components/molecules/TextArea");
|
|
249
284
|
|
|
250
285
|
exports.TextArea = _TextArea.TextArea;
|
|
251
|
-
exports.TextAreaProps = _TextArea.TextAreaProps;
|
|
252
286
|
exports.TextAreaInputBase = _TextArea.TextAreaInputBase;
|
|
287
|
+
exports.TextAreaProps = _TextArea.TextAreaProps;
|
|
253
288
|
|
|
254
|
-
var
|
|
289
|
+
var _hooks = require("./hooks");
|
|
255
290
|
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
exports
|
|
291
|
+
Object.keys(_hooks).forEach(function (key) {
|
|
292
|
+
if (key === "default" || key === "__esModule") return;
|
|
293
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
294
|
+
if (key in exports && exports[key] === _hooks[key]) return;
|
|
295
|
+
exports[key] = _hooks[key];
|
|
296
|
+
});
|
|
260
297
|
|
|
261
298
|
var _definitions = require("./styles/definitions");
|
|
262
299
|
|
|
@@ -298,14 +335,5 @@ Object.keys(_utils).forEach(function (key) {
|
|
|
298
335
|
exports[key] = _utils[key];
|
|
299
336
|
});
|
|
300
337
|
|
|
301
|
-
var _hooks = require("./hooks");
|
|
302
|
-
|
|
303
|
-
Object.keys(_hooks).forEach(function (key) {
|
|
304
|
-
if (key === "default" || key === "__esModule") return;
|
|
305
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
306
|
-
if (key in exports && exports[key] === _hooks[key]) return;
|
|
307
|
-
exports[key] = _hooks[key];
|
|
308
|
-
});
|
|
309
|
-
|
|
310
338
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
311
339
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["export { Avatar, AvatarProps } from './components/atoms/Avatar';\nexport { Badge, BadgeProps } from './components/atoms/Badge';\nexport { BoxContent, BoxContentProps } from './components/atoms/BoxContent';\nexport {\n Button,\n ButtonProps,\n ButtonSizeType,\n ButtonStateProps,\n ButtonStateType,\n Error,\n Loading,\n Success,\n} from './components/atoms/Button';\nexport { Card, CardProps } from './components/atoms/Card';\nexport { Footer, FooterProps } from './components/atoms/Card/Footer';\nexport { Header, HeaderProps } from './components/atoms/Card/Header';\nexport { Checkbox, CheckboxProps } from './components/atoms/Checkbox';\nexport { Divider, DividerProps } from './components/atoms/Divider';\nexport {\n GroupButton,\n GroupButtonOption,\n GroupButtonOptionProps,\n GroupButtonProps,\n GroupButtonValue,\n} from './components/atoms/GroupButton';\nexport { Icon, IconProps } from './components/atoms/Icon';\nexport {\n disabledInputStyles,\n Hint,\n InputContainer,\n InputContainerProps,\n InputElement,\n InputElementProps,\n InputMaskElement,\n InputMaskElementProps,\n InputVariantType,\n PressableInputContainer,\n PressableInputContainerProps,\n StyledBorderKeeper,\n useInputFocus,\n useNumberMask,\n useStringMask,\n} from './components/atoms/Input';\nexport { Paper, PaperProps } from './components/atoms/Paper';\nexport {\n PressableSurface,\n PressableSurfaceProps,\n} from './components/atoms/PressableSurface';\nexport { ProgressBar, ProgressBarProps } from './components/atoms/ProgressBar';\nexport { RadioButton, RadioButtonProps } from './components/atoms/RadioButton';\nexport { Switch, SwitchProps } from './components/atoms/Switch';\nexport { Tag, TagProps } from './components/atoms/Tag';\nexport { Text, TextProps } from './components/atoms/Text';\nexport {\n Calendar,\n CalendarProps,\n DateRange,\n SelectionType,\n Value,\n} from './components/molecules/Calendar';\nexport { DatePicker, DatePickerProps } from './components/molecules/DatePicker';\nexport {\n DateTimePicker,\n DateTimePickerProps,\n} from './components/molecules/DateTimePicker';\nexport {\n DateTimeSelector,\n DateTimeSelectorMode,\n DateTimeSelectorProps,\n} from './components/molecules/DateTimeSelector';\nexport {\n GridSpacing,\n IGridItem,\n getGridItemPadding,\n getGridItemColumSpan,\n IGrid,\n FlexAlignBase,\n FlexAlignType,\n FlexPositioning,\n FlexSpacing,\n PaddingPosition,\n} from './components/molecules/Grid';\nexport {\n HintInputContainer,\n HintInputContainerProps,\n} from './components/molecules/HintInputContainer';\nexport {\n IconComponent,\n IconPositionOptions,\n IconTextButtonProps,\n} from './components/molecules/IconTextButton';\nexport { InputPasswordIcon } from './components/molecules/InputPassword';\nexport {\n LabeledSwitchProps,\n LabelPositionOptions,\n} from './components/molecules/LabeledSwitch';\nexport { Snackbar, SnackbarProps } from './components/molecules/Snackbar';\nexport {\n TextArea,\n TextAreaInputBase,\n TextAreaProps,\n} from './components/molecules/TextArea';\nexport * from './hooks';\nexport * from './styles/definitions';\nexport * from './styles/light';\nexport { default as ThemeProvider } from './styles/ThemeProvider';\nexport * from './types/defaults';\nexport * from './utils';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;AACA;;;;;AACA;;;;;AACA;;;;;;;;;;;AAUA;;;;;AACA;;;;;AACA;;;;;AACA;;;;;AACA;;;;;AACA;;;;;;;;AAOA;;;;;AACA;;;;;;;;;;;;;;;;;;AAiBA;;;;;AACA;;;;;AAIA;;;;;AACA;;;;;AACA;;;;;AACA;;;;;AACA;;;;;AACA;;;;;;;;AAOA;;;;;AACA;;;;;AAIA;;;;;;AAKA;;;;;;;;;;;;;AAYA;;;;;AAIA;;;;;;AAKA;;;;AACA;;;;;AAIA;;;;;AACA;;;;;;AAKA;;AAAA;EAAA;EAAA;EAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;EAAA;AAAA;;AACA;;;;AACA;;AAAA;EAAA;EAAA;EAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;EAAA;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"ThemeProvider.js","names":["ThemeProvider","theme","children"],"sources":["../../src/styles/ThemeProvider.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport { ThemeProvider as EmotionProvider } from '@emotion/react';\nimport { ThemeProviderProps } from '../types/defaults';\n\nconst ThemeProvider: FC<ThemeProviderProps> = ({\n theme,\n children,\n}): JSX.Element => {\n return <EmotionProvider theme={theme}>{children}</EmotionProvider>;\n};\n\nexport default ThemeProvider;\n"],"mappings":";;;;;AAAA;;AACA;;;;AAGA,MAAMA,aAAqC,GAAG,CAAC;EAC7CC,KAD6C;EAE7CC;AAF6C,CAAD,KAG3B;EACjB,OAAO,6BAAC,qBAAD;IAAiB,KAAK,EAAED;EAAxB,GAAgCC,QAAhC,CAAP;AACD,CALD;;eAOeF,a"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BorderRadius, BorderWidth, FontColor, FontStack, FontWeight, IconSize, Miscellaneous, Spacing, TypographyVariation, ZIndex } from '../types/defaults';
|
|
1
|
+
import { BorderRadius, BorderWidth, Breakpoints, FontColor, FontStack, FontWeight, IconSize, Miscellaneous, Spacing, TypographyVariation, ZIndex } from '../types/defaults';
|
|
2
2
|
export declare const statusColor: {
|
|
3
3
|
error: {
|
|
4
4
|
xlight: string;
|
|
@@ -42,3 +42,4 @@ export declare const fontFiles: FontWeight;
|
|
|
42
42
|
export declare const fontColor: FontColor;
|
|
43
43
|
export declare const zIndex: ZIndex;
|
|
44
44
|
export declare type IconType = 'material' | 'material-community' | 'simple-line-icon' | 'zocial' | 'font-awesome' | 'octicon' | 'ionicon' | 'foundation' | 'evilicon' | 'entypo' | 'antdesign' | 'font-awesome-5' | string;
|
|
45
|
+
export declare const breakpoints: Breakpoints;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
|
-
exports.zIndex = exports.
|
|
4
|
+
exports.zIndex = exports.typography = exports.statusColor = exports.spacing = exports.miscellaneous = exports.iconSize = exports.hex2rgba = exports.fontWeight = exports.fontStack = exports.fontFiles = exports.fontColor = exports.breakpoints = exports.borderWidth = exports.borderRadius = void 0;
|
|
5
5
|
|
|
6
6
|
var _utils = require("../utils");
|
|
7
7
|
|
|
@@ -160,4 +160,10 @@ const zIndex = {
|
|
|
160
160
|
modal: 1000
|
|
161
161
|
};
|
|
162
162
|
exports.zIndex = zIndex;
|
|
163
|
+
const breakpoints = {
|
|
164
|
+
sm: 480,
|
|
165
|
+
md: 768,
|
|
166
|
+
lg: 1366
|
|
167
|
+
};
|
|
168
|
+
exports.breakpoints = breakpoints;
|
|
163
169
|
//# sourceMappingURL=definitions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"definitions.js","names":["statusColor","error","xlight","light","medium","dark","xdark","warning","success","info","hex2rgba","hex","alpha","r","g","b","match","map","x","parseInt","miscellaneous","shadow","overlay","bodyColor","surfaceColor","spacing","nano","RFValueStr","micro","mili","centi","deca","kilo","mega","giga","tera","peta","hexa","iconSize","borderRadius","pill","borderWidth","pico","typography","h5","fontSize","lineHeight","h4","h3","h2","h1","base","sub","label","fontStack","default","mono","fontWeight","regular","bold","black","fontFiles","fontColor","orange","zIndex","absolute","select","input","popover","tooltip","header","backdrop","drawer","sidebar","modal","breakpoints","sm","md","lg"],"sources":["../../src/styles/definitions.ts"],"sourcesContent":["import {\n BorderRadius,\n BorderWidth,\n Breakpoints,\n FontColor,\n FontStack,\n FontWeight,\n IconSize,\n Miscellaneous,\n Spacing,\n TypographyVariation,\n ZIndex,\n} from '../types/defaults';\nimport { RFValueStr } from '../utils';\n\nexport const statusColor = {\n error: {\n xlight: '#fdf3f2',\n light: '#ee9891',\n medium: '#e04638',\n dark: '#9b2318',\n xdark: '#58240e',\n },\n warning: {\n xlight: '#fffcf0',\n light: '#ffe380',\n medium: '#ffc700',\n dark: '#cc9f00',\n xdark: '#665000',\n },\n success: {\n xlight: '#f3fcf8',\n light: '#99e6c9',\n medium: '#2db783',\n dark: '#238f67',\n xdark: '#14523b',\n },\n info: {\n xlight: '#f0f8fe',\n light: '#85c7fa',\n medium: '#239bf6',\n dark: '#0873c4',\n xdark: '#043962',\n },\n};\n\nexport const hex2rgba: (hex, alpha?: number) => string = (hex, alpha = 1) => {\n const [r, g, b] = hex.match(/\\w\\w/g).map(x => parseInt(x, 16));\n return `rgba(${r},${g},${b},${alpha})`;\n};\n\nexport const miscellaneous: Miscellaneous = {\n shadow: '#000000', // black\n overlay: '#282625', // rgba(40, 38, 37, 0.5)\n bodyColor: '#f8f7f7',\n surfaceColor: '#ffffff', //input, group button, cards\n};\n\nexport const spacing: Spacing = {\n nano: RFValueStr('2px'),\n micro: RFValueStr('4px'),\n mili: RFValueStr('8px'),\n centi: RFValueStr('12px'),\n deca: RFValueStr('16px'),\n kilo: RFValueStr('24px'),\n mega: RFValueStr('32px'),\n giga: RFValueStr('40px'),\n tera: RFValueStr('48px'),\n peta: RFValueStr('56px'),\n hexa: RFValueStr('64px'),\n};\n\nexport const iconSize: IconSize = {\n micro: RFValueStr('12px'),\n mili: RFValueStr('14px'),\n centi: RFValueStr('16px'), // '1rem'\n deca: RFValueStr('18px'), // '1.5rem'\n kilo: RFValueStr('24px'), // '1.6rem'\n mega: RFValueStr('32px'), // '2rem'\n};\n\nexport const borderRadius: BorderRadius = {\n nano: RFValueStr('2px'),\n micro: RFValueStr('4px'),\n mili: RFValueStr('8px'),\n centi: RFValueStr('16px'),\n deca: RFValueStr('24px'),\n pill: RFValueStr('999999px'), // also circle\n};\n\nexport const borderWidth: BorderWidth = {\n pico: RFValueStr('1px'),\n nano: RFValueStr('2px'),\n};\n\nexport const typography: TypographyVariation = {\n h5: {\n fontSize: RFValueStr('16px'), // '1rem'\n lineHeight: RFValueStr('24px'), // '1.5rem'\n },\n h4: {\n fontSize: RFValueStr('18px'), // '1.125rem'\n lineHeight: RFValueStr('27px'), // '1.688rem'\n },\n h3: {\n fontSize: RFValueStr('20px'), // '1.25rem'\n lineHeight: RFValueStr('32px'), // '2rem'\n },\n h2: {\n fontSize: RFValueStr('26px'), // '1.625rem'\n lineHeight: RFValueStr('38px'), // '2.375rem'\n },\n h1: {\n fontSize: RFValueStr('32px'), // '2rem'\n lineHeight: RFValueStr('42px'), // '2.625rem'\n },\n base: {\n fontSize: RFValueStr('14px'), // '0.875rem'\n lineHeight: RFValueStr('21px'), // '1.313rem'\n },\n sub: {\n fontSize: RFValueStr('12px'), // '0.75rem'\n lineHeight: RFValueStr('18px'), // '1.125rem'\n },\n label: {\n fontSize: RFValueStr('10px'),\n lineHeight: RFValueStr('12px'),\n },\n};\n\nexport const fontStack: FontStack = {\n default: 'Lato',\n mono: 'Consolas, monaco, monospace',\n};\n\nexport const fontWeight: FontWeight = {\n regular: '400',\n bold: '700',\n black: '900',\n};\n\nexport const fontFiles: FontWeight = {\n black: '{0}-Black',\n bold: '{0}-Bold',\n regular: '{0}-Regular',\n};\n\nexport const fontColor: FontColor = {\n light: '#fff',\n medium: '#85807a',\n dark: '#353231', // default\n orange: '#f89907',\n};\n\nexport const zIndex: ZIndex = {\n default: 0,\n absolute: 1,\n select: 20,\n input: 20,\n popover: 30,\n tooltip: 40,\n header: 600,\n backdrop: 700,\n drawer: 700,\n sidebar: 800,\n modal: 1000,\n};\n\nexport type IconType =\n | 'material'\n | 'material-community'\n | 'simple-line-icon'\n | 'zocial'\n | 'font-awesome'\n | 'octicon'\n | 'ionicon'\n | 'foundation'\n | 'evilicon'\n | 'entypo'\n | 'antdesign'\n | 'font-awesome-5'\n | string;\n\nexport const breakpoints: Breakpoints = {\n sm: 480,\n md: 768,\n lg: 1366,\n};\n"],"mappings":";;;;;AAaA;;AAEO,MAAMA,WAAW,GAAG;EACzBC,KAAK,EAAE;IACLC,MAAM,EAAE,SADH;IAELC,KAAK,EAAE,SAFF;IAGLC,MAAM,EAAE,SAHH;IAILC,IAAI,EAAE,SAJD;IAKLC,KAAK,EAAE;EALF,CADkB;EAQzBC,OAAO,EAAE;IACPL,MAAM,EAAE,SADD;IAEPC,KAAK,EAAE,SAFA;IAGPC,MAAM,EAAE,SAHD;IAIPC,IAAI,EAAE,SAJC;IAKPC,KAAK,EAAE;EALA,CARgB;EAezBE,OAAO,EAAE;IACPN,MAAM,EAAE,SADD;IAEPC,KAAK,EAAE,SAFA;IAGPC,MAAM,EAAE,SAHD;IAIPC,IAAI,EAAE,SAJC;IAKPC,KAAK,EAAE;EALA,CAfgB;EAsBzBG,IAAI,EAAE;IACJP,MAAM,EAAE,SADJ;IAEJC,KAAK,EAAE,SAFH;IAGJC,MAAM,EAAE,SAHJ;IAIJC,IAAI,EAAE,SAJF;IAKJC,KAAK,EAAE;EALH;AAtBmB,CAApB;;;AA+BA,MAAMI,QAAyC,GAAG,CAACC,GAAD,EAAMC,KAAK,GAAG,CAAd,KAAoB;EAC3E,MAAM,CAACC,CAAD,EAAIC,CAAJ,EAAOC,CAAP,IAAYJ,GAAG,CAACK,KAAJ,CAAU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AAK,EAAE;AAXqB,CAAvB;;AA6BA,MAAMC,WAAwB,GAAG;EACtCC,EAAE,EAAE,GADkC;EAEtCC,EAAE,EAAE,GAFkC;EAGtCC,EAAE,EAAE;AAHkC,CAAjC"}
|
package/dist/styles/light.js
CHANGED
|
@@ -39,7 +39,8 @@ const lightTheme = {
|
|
|
39
39
|
weight: _definitions.fontWeight,
|
|
40
40
|
files: _definitions.fontFiles
|
|
41
41
|
},
|
|
42
|
-
zIndex: _definitions.zIndex
|
|
42
|
+
zIndex: _definitions.zIndex,
|
|
43
|
+
breakpoints: _definitions.breakpoints
|
|
43
44
|
};
|
|
44
45
|
exports.lightTheme = lightTheme;
|
|
45
46
|
//# sourceMappingURL=light.js.map
|
package/dist/styles/light.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"light.js","names":["primaryGradation","xlight","light","medium","dark","xdark","secondaryGradation","lightTheme","color","primary","secondary","statusColor","miscellaneous","spacing","iconSize","borderRadius","borderWidth","typography","font","fontColor","stack","fontStack","weight","fontWeight","files","fontFiles","zIndex","breakpoints"],"sources":["../../src/styles/light.ts"],"sourcesContent":["import { ThemeProp } from '../types/defaults';\nimport {\n borderRadius,\n borderWidth,\n breakpoints,\n fontColor,\n fontFiles,\n fontStack,\n fontWeight,\n iconSize,\n miscellaneous,\n spacing,\n statusColor,\n typography,\n zIndex,\n} from './definitions';\n\nconst primaryGradation = {\n xlight: '#fef9f0',\n light: '#fccb83',\n medium: '#f89907',\n dark: '#ae6b05',\n xdark: '#633d03',\n};\n\nconst secondaryGradation = {\n xlight: '#f8f7f7',\n light: '#c2bfbc',\n medium: '#85807a',\n dark: '#5d5955',\n xdark: '#353231',\n};\n\nexport const lightTheme: ThemeProp = {\n color: {\n primary: {\n ...primaryGradation,\n },\n secondary: { ...secondaryGradation },\n ...statusColor,\n },\n miscellaneous,\n spacing,\n iconSize,\n borderRadius,\n borderWidth,\n typography,\n font: {\n color: fontColor,\n stack: fontStack,\n weight: fontWeight,\n files: fontFiles,\n },\n zIndex,\n breakpoints,\n};\n"],"mappings":";;;;;AACA;;AAgBA,MAAMA,gBAAgB,GAAG;EACvBC,MAAM,EAAE,SADe;EAEvBC,KAAK,EAAE,SAFgB;EAGvBC,MAAM,EAAE,SAHe;EAIvBC,IAAI,EAAE,SAJiB;EAKvBC,KAAK,EAAE;AALgB,CAAzB;AAQA,MAAMC,kBAAkB,GAAG;EACzBL,MAAM,EAAE,SADiB;EAEzBC,KAAK,EAAE,SAFkB;EAGzBC,MAAM,EAAE,SAHiB;EAIzBC,IAAI,EAAE,SAJmB;EAKzBC,KAAK,EAAE;AALkB,CAA3B;AAQO,MAAME,UAAqB,GAAG;EACnCC,KAAK,EAAE;IACLC,OAAO,EAAE,EACP,GAAGT;IADI,CADJ;IAILU,SAAS,EAAE,EAAE,GAAGJ;IAAL,CAJN;IAKL,GAAGK;EALE,CAD4B;EAQnCC,aAAa,EAAbA,0BARmC;EASnCC,OAAO,EAAPA,oBATmC;EAUnCC,QAAQ,EAARA,qBAVmC;EAWnCC,YAAY,EAAZA,yBAXmC;EAYnCC,WAAW,EAAXA,wBAZmC;EAanCC,UAAU,EAAVA,uBAbmC;EAcnCC,IAAI,EAAE;IACJV,KAAK,EAAEW,sBADH;IAEJC,KAAK,EAAEC,sBAFH;IAGJC,MAAM,EAAEC,uBAHJ;IAIJC,KAAK,EAAEC;EAJH,CAd6B;EAoBnCC,MAAM,EAANA,mBApBmC;EAqBnCC,WAAW,EAAXA;AArBmC,CAA9B"}
|
package/dist/types/defaults.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
2
|
export declare type Color = {
|
|
3
3
|
primary: ColorGradation;
|
|
4
4
|
secondary: ColorGradation;
|
|
@@ -95,6 +95,11 @@ export declare type FontWeight = {
|
|
|
95
95
|
bold: string;
|
|
96
96
|
black: string;
|
|
97
97
|
};
|
|
98
|
+
export declare type Breakpoints = {
|
|
99
|
+
sm: number;
|
|
100
|
+
md: number;
|
|
101
|
+
lg: number;
|
|
102
|
+
};
|
|
98
103
|
export declare type ThemeProp = {
|
|
99
104
|
color: Color;
|
|
100
105
|
miscellaneous: Miscellaneous;
|
|
@@ -110,9 +115,10 @@ export declare type ThemeProp = {
|
|
|
110
115
|
files: FontWeight;
|
|
111
116
|
};
|
|
112
117
|
zIndex: ZIndex;
|
|
118
|
+
breakpoints: Breakpoints;
|
|
113
119
|
};
|
|
114
120
|
export interface ThemeProviderProps {
|
|
115
|
-
children?:
|
|
121
|
+
children?: ReactNode;
|
|
116
122
|
theme: ThemeProp;
|
|
117
123
|
}
|
|
118
124
|
export declare type StyleProps = ThemeProviderProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"defaults.js","names":[],"sources":["../../src/types/defaults.ts"],"sourcesContent":["import { ReactNode } from 'react';\n\nexport type Color = {\n primary: ColorGradation;\n secondary: ColorGradation;\n error: ColorGradation;\n success: ColorGradation;\n info: ColorGradation;\n warning: ColorGradation;\n};\n\nexport type TypographyVariation = {\n h1: Typography;\n h2: Typography;\n h3: Typography;\n h4: Typography;\n h5: Typography;\n base: Typography;\n sub: Typography;\n label: Typography;\n};\n\nexport type Miscellaneous = {\n shadow: string;\n overlay: string;\n bodyColor: string;\n surfaceColor: string;\n};\n\nexport type Spacing = {\n nano: string;\n micro: string;\n mili: string;\n centi: string;\n deca: string;\n kilo: string;\n mega: string;\n giga: string;\n tera: string;\n peta: string;\n hexa: string;\n};\n\nexport type IconSize = {\n micro: string;\n mili: string;\n centi: string;\n deca: string;\n kilo: string;\n mega: string;\n};\n\nexport type BorderRadius = {\n nano: string;\n micro: string;\n mili: string;\n centi: string;\n deca: string;\n pill: string;\n};\n\nexport type BorderWidth = {\n pico: string;\n nano: string;\n};\n\nexport type Typography = {\n lineHeight: string;\n fontSize: string;\n};\n\nexport type ColorGradation = {\n xlight: string;\n light: string;\n medium: string;\n dark: string;\n xdark: string;\n};\n\nexport type FontStack = {\n default: string;\n mono: string;\n};\n\nexport type FontColor = {\n light: string;\n medium: string;\n dark: string; // default\n orange: string;\n};\n\nexport type ZIndex = {\n default: number;\n absolute: number;\n drawer: number;\n select: number;\n input: number;\n popover: number;\n tooltip: number;\n header: number;\n backdrop: number;\n sidebar: number;\n modal: number;\n};\n\nexport type FontWeight = {\n regular: string;\n bold: string;\n black: string;\n};\n\nexport type Breakpoints = {\n sm: number;\n md: number;\n lg: number;\n};\n\nexport type ThemeProp = {\n color: Color;\n miscellaneous: Miscellaneous;\n spacing: Spacing;\n iconSize: IconSize;\n borderRadius: BorderRadius;\n borderWidth: BorderWidth;\n typography: TypographyVariation;\n font: {\n color: FontColor;\n stack: FontStack;\n weight: FontWeight;\n files: FontWeight;\n };\n zIndex: ZIndex;\n /** Designed to web */\n breakpoints: Breakpoints;\n};\n\nexport interface ThemeProviderProps {\n children?: ReactNode;\n theme: ThemeProp;\n}\n\nexport type StyleProps = ThemeProviderProps;\n\nexport type ColorType = keyof Color;\n\nexport type SpacingType = keyof Spacing;\n\nexport type TypographyVariationType = keyof TypographyVariation;\n\nexport type FontWeightType = keyof FontWeight;\n\nexport type VariantType = 'filled' | 'outlined' | 'text';\n\nexport type ColorGradationType = keyof ColorGradation;\n\nexport type FontColorType = keyof FontColor;\n\nexport type BorderRadiusType = keyof BorderRadius;\n\nexport type FontStackType = keyof FontStack;\n\nexport type IconSizeType = keyof IconSize;\n"],"mappings":""}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
|
-
exports.isIphoneX = isIphoneX;
|
|
5
|
-
exports.ifIphoneX = ifIphoneX;
|
|
6
|
-
exports.getStatusBarHeight = getStatusBarHeight;
|
|
7
4
|
exports.getBottomSpace = getBottomSpace;
|
|
5
|
+
exports.getStatusBarHeight = getStatusBarHeight;
|
|
6
|
+
exports.ifIphoneX = ifIphoneX;
|
|
7
|
+
exports.isIphoneX = isIphoneX;
|
|
8
8
|
|
|
9
9
|
var _reactNative = require("react-native");
|
|
10
10
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"IPhoneXHelper.js","names":["isIphoneX","dimen","Dimensions","get","Platform","OS","isPad","isTVOS","height","width","ifIphoneX","iphoneXStyle","regularStyle","getStatusBarHeight","safe","select","ios","android","StatusBar","currentHeight","default","getBottomSpace"],"sources":["../../src/utils/IPhoneXHelper.ts"],"sourcesContent":["import { Dimensions, Platform, StatusBar } from 'react-native';\n\nexport function isIphoneX() {\n const dimen = Dimensions.get('window');\n return (\n Platform.OS === 'ios' &&\n !Platform.isPad &&\n !Platform.isTVOS &&\n (dimen.height === 780 ||\n dimen.width === 780 ||\n dimen.height === 812 ||\n dimen.width === 812 ||\n dimen.height === 844 ||\n dimen.width === 844 ||\n dimen.height === 896 ||\n dimen.width === 896 ||\n dimen.height === 926 ||\n dimen.width === 926)\n );\n}\n\nexport function ifIphoneX(iphoneXStyle, regularStyle) {\n if (isIphoneX()) {\n return iphoneXStyle;\n }\n return regularStyle;\n}\n\nexport function getStatusBarHeight(safe) {\n return Platform.select({\n ios: ifIphoneX(safe ? 44 : 30, 20),\n android: StatusBar.currentHeight,\n default: 0,\n });\n}\n\nexport function getBottomSpace() {\n return isIphoneX() ? 34 : 0;\n}\n"],"mappings":";;;;;;;;AAAA;;AAEO,SAASA,SAAT,GAAqB;EAC1B,MAAMC,KAAK,GAAGC,uBAAA,CAAWC,GAAX,CAAe,QAAf,CAAd;;EACA,OACEC,qBAAA,CAASC,EAAT,KAAgB,KAAhB,IACA,CAACD,qBAAA,CAASE,KADV,IAEA,CAACF,qBAAA,CAASG,MAFV,KAGCN,KAAK,CAACO,MAAN,KAAiB,GAAjB,IACCP,KAAK,CAACQ,KAAN,KAAgB,GADjB,IAECR,KAAK,CAACO,MAAN,KAAiB,GAFlB,IAGCP,KAAK,CAACQ,KAAN,KAAgB,GAHjB,IAICR,KAAK,CAACO,MAAN,KAAiB,GAJlB,IAKCP,KAAK,CAACQ,KAAN,KAAgB,GALjB,IAMCR,KAAK,CAACO,MAAN,KAAiB,GANlB,IAOCP,KAAK,CAACQ,KAAN,KAAgB,GAPjB,IAQCR,KAAK,CAACO,MAAN,KAAiB,GARlB,IASCP,KAAK,CAACQ,KAAN,KAAgB,GAZlB,CADF;AAeD;;AAEM,SAASC,SAAT,CAAmBC,YAAnB,EAAiCC,YAAjC,EAA+C;EACpD,IAAIZ,SAAS,EAAb,EAAiB;IACf,OAAOW,YAAP;EACD;;EACD,OAAOC,YAAP;AACD;;AAEM,SAASC,kBAAT,CAA4BC,IAA5B,EAAkC;EACvC,OAAOV,qBAAA,CAASW,MAAT,CAAgB;IACrBC,GAAG,EAAEN,SAAS,CAACI,IAAI,GAAG,EAAH,GAAQ,EAAb,EAAiB,EAAjB,CADO;IAErBG,OAAO,EAAEC,sBAAA,CAAUC,aAFE;IAGrBC,OAAO,EAAE;EAHY,CAAhB,CAAP;AAKD;;AAEM,SAASC,cAAT,GAA0B;EAC/B,OAAOrB,SAAS,KAAK,EAAL,GAAU,CAA1B;AACD"}
|
|
@@ -17,11 +17,11 @@ const RFPercentage = percent => {
|
|
|
17
17
|
const {
|
|
18
18
|
height,
|
|
19
19
|
width
|
|
20
|
-
} = _reactNative.Dimensions.get(
|
|
20
|
+
} = _reactNative.Dimensions.get('window');
|
|
21
21
|
|
|
22
22
|
const standardLength = width > height ? width : height;
|
|
23
|
-
const offset = width > height ? 0 : _reactNative.Platform.OS ===
|
|
24
|
-
const deviceHeight = (0, _IPhoneXHelper.isIphoneX)() || _reactNative.Platform.OS ===
|
|
23
|
+
const offset = width > height ? 0 : _reactNative.Platform.OS === 'ios' ? 78 : _reactNative.StatusBar.currentHeight || 0;
|
|
24
|
+
const deviceHeight = (0, _IPhoneXHelper.isIphoneX)() || _reactNative.Platform.OS === 'android' ? standardLength - offset : standardLength;
|
|
25
25
|
const heightPercent = percent * deviceHeight / 100;
|
|
26
26
|
return Math.round(heightPercent);
|
|
27
27
|
};
|
|
@@ -34,11 +34,11 @@ const RFValue = (fontSize, standardScreenHeight = STANDARD_SCREEN_HEIGHT) => {
|
|
|
34
34
|
const {
|
|
35
35
|
height,
|
|
36
36
|
width
|
|
37
|
-
} = _reactNative.Dimensions.get(
|
|
37
|
+
} = _reactNative.Dimensions.get('window');
|
|
38
38
|
|
|
39
39
|
const standardLength = width > height ? width : height;
|
|
40
|
-
const offset = width > height ? 0 : _reactNative.Platform.OS ===
|
|
41
|
-
const deviceHeight = (0, _IPhoneXHelper.isIphoneX)() || _reactNative.Platform.OS ===
|
|
40
|
+
const offset = width > height ? 0 : _reactNative.Platform.OS === 'ios' ? 78 : _reactNative.StatusBar.currentHeight || 0;
|
|
41
|
+
const deviceHeight = (0, _IPhoneXHelper.isIphoneX)() || _reactNative.Platform.OS === 'android' ? standardLength - offset : standardLength;
|
|
42
42
|
const heightPercent = fontSize * deviceHeight / standardScreenHeight;
|
|
43
43
|
return Math.round(heightPercent);
|
|
44
44
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"ResponsiveFontSize.js","names":["STANDARD_SCREEN_HEIGHT","RFPercentage","percent","Platform","OS","height","width","Dimensions","get","standardLength","offset","StatusBar","currentHeight","deviceHeight","isIphoneX","heightPercent","Math","round","RFValue","fontSize","standardScreenHeight","RFValueStr","_fontSize","extractNumbersFromString"],"sources":["../../src/utils/ResponsiveFontSize.ts"],"sourcesContent":["import { Dimensions, Platform, StatusBar } from 'react-native';\nimport { extractNumbersFromString } from './extractNumbersFromString';\nimport { isIphoneX } from './IPhoneXHelper';\n\nconst STANDARD_SCREEN_HEIGHT = 680;\n\n/**\n * Use this function when you want to scale a percentage number\n * to a reasonable value that will fit better on most of devices.\n *\n * @param percent\n * @returns\n */\nexport const RFPercentage = (percent: number) => {\n if (Platform.OS === 'web') return percent;\n const { height, width } = Dimensions.get('window');\n const standardLength = width > height ? width : height;\n const offset =\n width > height\n ? 0\n : Platform.OS === 'ios'\n ? 78\n : StatusBar.currentHeight || 0; // iPhone X style SafeAreaView size in portrait\n const deviceHeight =\n isIphoneX() || Platform.OS === 'android'\n ? standardLength - offset\n : standardLength;\n const heightPercent = (percent * deviceHeight) / 100;\n return Math.round(heightPercent);\n};\n\n/**\n * Use this function when you want to scale a font size based on pixel unit\n * to a reasonable value that will fit better on most of devices.\n *\n * @param fontSize\n * @param standardScreenHeight\n * @returns\n */\nexport const RFValue = (\n fontSize: number,\n standardScreenHeight: number = STANDARD_SCREEN_HEIGHT\n) => {\n if (Platform.OS === 'web') return fontSize;\n const { height, width } = Dimensions.get('window');\n const standardLength = width > height ? width : height;\n const offset =\n width > height\n ? 0\n : Platform.OS === 'ios'\n ? 78\n : StatusBar.currentHeight || 0; // iPhone X style SafeAreaView size in portrait\n const deviceHeight =\n isIphoneX() || Platform.OS === 'android'\n ? standardLength - offset\n : standardLength;\n const heightPercent = (fontSize * deviceHeight) / standardScreenHeight;\n return Math.round(heightPercent);\n};\n\n/**\n * Same as RFValue, however you can provide string values. E.g: '10px', '-5px'.\n *\n * @param fontSize\n * @param standardScreenHeight\n * @returns\n */\nexport const RFValueStr = (fontSize: string, standardScreenHeight?: number) => {\n const _fontSize = extractNumbersFromString(fontSize);\n return `${RFValue(_fontSize, standardScreenHeight)}px`;\n};\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AAEA,MAAMA,sBAAsB,GAAG,GAA/B;;AASO,MAAMC,YAAY,GAAIC,OAAD,IAAqB;EAC/C,IAAIC,qBAAA,CAASC,EAAT,KAAgB,KAApB,EAA2B,OAAOF,OAAP;;EAC3B,MAAM;IAAEG,MAAF;IAAUC;EAAV,IAAoBC,uBAAA,CAAWC,GAAX,CAAe,QAAf,CAA1B;;EACA,MAAMC,cAAc,GAAGH,KAAK,GAAGD,MAAR,GAAiBC,KAAjB,GAAyBD,MAAhD;EAC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AAED,OAAO,CAACI,SAAD,EAAYF,oBAAZ,CAAkC,IAAnD;AACD,CAHM"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
|
-
exports.
|
|
4
|
+
exports.extractNumbersFromString = exports.extractDigitsFromString = void 0;
|
|
5
5
|
|
|
6
6
|
const extractNumbersFromString = value => Number(extractDigitsFromString(value));
|
|
7
7
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"extractNumbersFromString.js","names":["extractNumbersFromString","value","Number","extractDigitsFromString","replace"],"sources":["../../src/utils/extractNumbersFromString.ts"],"sourcesContent":["export const extractNumbersFromString = (value: string): number =>\n Number(extractDigitsFromString(value));\n\nexport const extractDigitsFromString = (value: string): string =>\n value.replace(/[^0-9]/g, '');\n"],"mappings":";;;;;AAAO,MAAMA,wBAAwB,GAAIC,KAAD,IACtCC,MAAM,CAACC,uBAAuB,CAACF,KAAD,CAAxB,CADD;;;;AAGA,MAAME,uBAAuB,GAAIF,KAAD,IACrCA,KAAK,CAACG,OAAN,CAAc,SAAd,EAAyB,EAAzB,CADK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"formatWithMask.js","names":["formatWithMask","mask","value","Array","isArray","selectedMask","getMask","String","formatted","mergeMask","internalNumber","mergedOptions","getInternalNumberAndMask","currency","format"],"sources":["../../src/utils/formatWithMask.ts"],"sourcesContent":["import {\n MaskType,\n CurrencyOptions,\n getMask,\n mergeMask,\n getInternalNumberAndMask,\n} from '../components/atoms/Input';\nimport currency from 'currency.js';\n\nexport const formatWithMask = (\n mask: (MaskType[] | ((value: string) => MaskType[])) | CurrencyOptions,\n value: string | number\n): string | number => {\n if (Array.isArray(mask) || typeof mask === 'function') {\n const selectedMask = getMask(mask, String(value));\n const { formatted } = mergeMask(String(value), selectedMask);\n return formatted || '';\n } else {\n const { internalNumber, mergedOptions } = getInternalNumberAndMask(\n value,\n mask\n );\n return currency(internalNumber).format(mergedOptions);\n }\n};\n"],"mappings":";;;;;AAAA;;AAOA;;;;AAEO,MAAMA,cAAc,GAAG,CAC5BC,IAD4B,EAE5BC,KAF4B,KAGR;EACpB,IAAIC,KAAK,CAACC,OAAN,CAAcH,IAAd,KAAuB,OAAOA,IAAP,KAAgB,UAA3C,EAAuD;IACrD,MAAMI,YAAY,GAAG,IAAAC,cAAA,EAAQL,IAAR,EAAcM,MAAM,CAACL,KAAD,CAApB,CAArB;IACA,MAAM;MAAEM;IAAF,IAAgB,IAAAC,gBAAA,EAAUF,MAAM,CAACL,KAAD,CAAhB,EAAyBG,YAAzB,CAAtB;IACA,OAAOG,SAAS,IAAI,EAApB;EACD,CAJD,MAIO;IACL,MAAM;MAAEE,cAAF;MAAkBC;IAAlB,IAAoC,IAAAC,+BAAA,EACxCV,KADwC,EAExCD,IAFwC,CAA1C;IAIA,OAAO,IAAAY,iBAAA,EAASH,cAAT,EAAyBI,MAAzB,CAAgCH,aAAhC,CAAP;EACD;AACF,CAfM"}
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export
|
|
1
|
+
export { extractDigitsFromString, extractNumbersFromString, } from './extractNumbersFromString';
|
|
2
|
+
export * from './formatWithMask';
|
|
3
3
|
export * from './IPhoneXHelper';
|
|
4
|
-
export
|
|
4
|
+
export { lightenDarkenColor } from './lightenDarkenColor';
|
|
5
5
|
export * from './masks';
|
|
6
|
-
export * from './
|
|
6
|
+
export * from './ResponsiveFontSize';
|
|
7
|
+
export * from './variantComplement';
|
package/dist/utils/index.js
CHANGED
|
@@ -2,20 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
var _exportNames = {
|
|
5
|
-
|
|
5
|
+
extractDigitsFromString: true,
|
|
6
6
|
extractNumbersFromString: true,
|
|
7
|
-
|
|
7
|
+
lightenDarkenColor: true
|
|
8
8
|
};
|
|
9
|
-
exports.
|
|
10
|
-
|
|
11
|
-
var _lightenDarkenColor = require("./lightenDarkenColor");
|
|
12
|
-
|
|
13
|
-
exports.lightenDarkenColor = _lightenDarkenColor.lightenDarkenColor;
|
|
9
|
+
exports.lightenDarkenColor = exports.extractNumbersFromString = exports.extractDigitsFromString = void 0;
|
|
14
10
|
|
|
15
11
|
var _extractNumbersFromString = require("./extractNumbersFromString");
|
|
16
12
|
|
|
17
|
-
exports.extractNumbersFromString = _extractNumbersFromString.extractNumbersFromString;
|
|
18
13
|
exports.extractDigitsFromString = _extractNumbersFromString.extractDigitsFromString;
|
|
14
|
+
exports.extractNumbersFromString = _extractNumbersFromString.extractNumbersFromString;
|
|
15
|
+
|
|
16
|
+
var _formatWithMask = require("./formatWithMask");
|
|
17
|
+
|
|
18
|
+
Object.keys(_formatWithMask).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
21
|
+
if (key in exports && exports[key] === _formatWithMask[key]) return;
|
|
22
|
+
exports[key] = _formatWithMask[key];
|
|
23
|
+
});
|
|
19
24
|
|
|
20
25
|
var _IPhoneXHelper = require("./IPhoneXHelper");
|
|
21
26
|
|
|
@@ -26,14 +31,9 @@ Object.keys(_IPhoneXHelper).forEach(function (key) {
|
|
|
26
31
|
exports[key] = _IPhoneXHelper[key];
|
|
27
32
|
});
|
|
28
33
|
|
|
29
|
-
var
|
|
34
|
+
var _lightenDarkenColor = require("./lightenDarkenColor");
|
|
30
35
|
|
|
31
|
-
|
|
32
|
-
if (key === "default" || key === "__esModule") return;
|
|
33
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
34
|
-
if (key in exports && exports[key] === _ResponsiveFontSize[key]) return;
|
|
35
|
-
exports[key] = _ResponsiveFontSize[key];
|
|
36
|
-
});
|
|
36
|
+
exports.lightenDarkenColor = _lightenDarkenColor.lightenDarkenColor;
|
|
37
37
|
|
|
38
38
|
var _masks = require("./masks");
|
|
39
39
|
|
|
@@ -44,12 +44,21 @@ Object.keys(_masks).forEach(function (key) {
|
|
|
44
44
|
exports[key] = _masks[key];
|
|
45
45
|
});
|
|
46
46
|
|
|
47
|
-
var
|
|
47
|
+
var _ResponsiveFontSize = require("./ResponsiveFontSize");
|
|
48
48
|
|
|
49
|
-
Object.keys(
|
|
49
|
+
Object.keys(_ResponsiveFontSize).forEach(function (key) {
|
|
50
50
|
if (key === "default" || key === "__esModule") return;
|
|
51
51
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
52
|
-
if (key in exports && exports[key] ===
|
|
53
|
-
exports[key] =
|
|
52
|
+
if (key in exports && exports[key] === _ResponsiveFontSize[key]) return;
|
|
53
|
+
exports[key] = _ResponsiveFontSize[key];
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
var _variantComplement = require("./variantComplement");
|
|
57
|
+
|
|
58
|
+
Object.keys(_variantComplement).forEach(function (key) {
|
|
59
|
+
if (key === "default" || key === "__esModule") return;
|
|
60
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
61
|
+
if (key in exports && exports[key] === _variantComplement[key]) return;
|
|
62
|
+
exports[key] = _variantComplement[key];
|
|
54
63
|
});
|
|
55
64
|
//# sourceMappingURL=index.js.map
|
package/dist/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/utils/index.ts"],"sourcesContent":["export {\n extractDigitsFromString,\n extractNumbersFromString,\n} from './extractNumbersFromString';\nexport * from './formatWithMask';\nexport * from './IPhoneXHelper';\nexport { lightenDarkenColor } from './lightenDarkenColor';\nexport * from './masks';\nexport * from './ResponsiveFontSize';\nexport * from './variantComplement';\n"],"mappings":";;;;;;;;;;AAAA;;;;;AAIA;;AAAA;EAAA;EAAA;EAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;EAAA;AAAA;;AACA;;;;AACA;;AAAA;EAAA;EAAA;EAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;EAAA;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"lightenDarkenColor.js","names":["lightenDarkenColor","color","variation","usePound","slice","num","parseInt","r","b","g","toString"],"sources":["../../src/utils/lightenDarkenColor.ts"],"sourcesContent":["export const lightenDarkenColor = (color: string, variation: number) => {\n let usePound = false;\n\n if (color[0] == '#') {\n color = color.slice(1);\n usePound = true;\n }\n\n const num = parseInt(color, 16);\n\n let r = (num >> 16) + variation;\n if (r > 255) r = 255;\n else if (r < 0) r = 0;\n\n let b = ((num >> 8) & 0x00ff) + variation;\n if (b > 255) b = 255;\n else if (b < 0) b = 0;\n\n let g = (num & 0x0000ff) + variation;\n if (g > 255) g = 255;\n else if (g < 0) g = 0;\n\n return (usePound ? '#' : '') + (g | (b << 8) | (r << 16)).toString(16);\n};\n"],"mappings":";;;;;AAAO,MAAMA,kBAAkB,GAAG,CAACC,KAAD,EAAgBC,SAAhB,KAAsC;EACtE,IAAIC,QAAQ,GAAG,KAAf;;EAEA,IAAIF,KAAK,CAAC,CAAD,CAAL,IAAY,GAAhB,EAAqB;IACnBA,KAAK,GAAGA,KAAK,CAACG,KAAN,CAAY,CAAZ,CAAR;IACAD,QAAQ,GAAG,IAAX;EACD;;EAED,MAAME,GAAG,GAAGC,QAAQ,CAACL,KAAD,EAAQ,EAAR,CAApB;EAEA,IAAIM,CAAC,GAAG,CAACF,GAAG,IAAI,EAAR,IAAcH,SAAtB;EACA,IAAIK,CAAC,GAAG,GAAR,EAAaA,CAAC,GAAG,GAAJ,CAAb,KACK,IAAIA,CAAC,GAAG,CAAR,EAAWA,CAAC,GAAG,CAAJ;EAEhB,IAAIC,CAAC,GAAG,CAAEH,GAAG,IAAI,CAAR,GAAa,MAAd,IAAwBH,SAAhC;EACA,IAAIM,CAAC,GAAG,GAAR,EAAaA,CAAC,GAAG,GAAJ,CAAb,KACK,IAAIA,CAAC,GAAG,CAAR,EAAWA,CAAC,GAAG,CAAJ;EAEhB,IAAIC,CAAC,GAAG,CAACJ,GAAG,GAAG,QAAP,IAAmBH,SAA3B;EACA,IAAIO,CAAC,GAAG,GAAR,EAAaA,CAAC,GAAG,GAAJ,CAAb,KACK,IAAIA,CAAC,GAAG,CAAR,EAAWA,CAAC,GAAG,CAAJ;EAEhB,OAAO,CAACN,QAAQ,GAAG,GAAH,GAAS,EAAlB,IAAwB,CAACM,CAAC,GAAID,CAAC,IAAI,CAAV,GAAgBD,CAAC,IAAI,EAAtB,EAA2BG,QAA3B,CAAoC,EAApC,CAA/B;AACD,CAvBM"}
|
package/dist/utils/masks.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"masks.js","names":["Masks","CPF","CNPJ","DATE","MONTH_YEAR","CEP","PHONE","PHONE_EXTENDED","COMBINED_PHONE","value","onlyNumbers","extractDigitsFromString","isCellPhoneExtended","length","COMBINED_CPF_CNPJ"],"sources":["../../src/utils/masks.ts"],"sourcesContent":["// NOTE: Add here all individually utils, then you can use it on input components everywhere.\nimport { extractDigitsFromString } from './extractNumbersFromString';\n\nexport const Masks = {\n CPF: ['999.999.999-99'],\n CNPJ: ['99.999.999/9999-99'],\n DATE: ['99/99/9999'],\n MONTH_YEAR: ['99/9999'],\n CEP: ['99999-999'],\n PHONE: ['(99) 9999-9999'],\n PHONE_EXTENDED: ['(99) 99999-9999'],\n COMBINED_PHONE: (value: string) => {\n const onlyNumbers = extractDigitsFromString(value);\n // Value is number extended, but without mask.\n const isCellPhoneExtended = onlyNumbers.length === 11;\n\n // Value in formatted mode\n return value?.length <= 14 && !isCellPhoneExtended\n ? Masks.PHONE\n : Masks.PHONE_EXTENDED;\n },\n COMBINED_CPF_CNPJ: (value: string) =>\n value?.length <= 14 ? Masks.CPF : Masks.CNPJ,\n};\n"],"mappings":";;;;;AACA;;AAEO,MAAMA,KAAK,GAAG;EACnBC,GAAG,EAAE,CAAC,gBAAD,CADc;EAEnBC,IAAI,EAAE,CAAC,oBAAD,CAFa;EAGnBC,IAAI,EAAE,CAAC,YAAD,CAHa;EAInBC,UAAU,EAAE,CAAC,SAAD,CAJO;EAKnBC,GAAG,EAAE,CAAC,WAAD,CALc;EAMnBC,KAAK,EAAE,CAAC,gBAAD,CANY;EAOnBC,cAAc,EAAE,CAAC,iBAAD,CAPG;EAQnBC,cAAc,EAAGC,KAAD,IAAmB;IACjC,MAAMC,WAAW,GAAG,IAAAC,iDAAA,EAAwBF,KAAxB,CAApB;IAEA,MAAMG,mBAAmB,GAAGF,WAAW,CAACG,MAAZ,KAAuB,EAAnD;IAGA,OAAO,CAAAJ,KAAK,QAAL,YAAAA,KAAK,CAAEI,MAAP,KAAiB,EAAjB,IAAuB,CAACD,mBAAxB,GACHZ,KAAK,CAACM,KADH,GAEHN,KAAK,CAACO,cAFV;EAGD,CAjBkB;EAkBnBO,iBAAiB,EAAGL,KAAD,IACjB,CAAAA,KAAK,QAAL,YAAAA,KAAK,CAAEI,MAAP,KAAiB,EAAjB,GAAsBb,KAAK,CAACC,GAA5B,GAAkCD,KAAK,CAACE;AAnBvB,CAAd"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ColorGradationType, ColorType, FontColorType, VariantType } from '../types/defaults';
|
|
2
|
+
export declare const fontColorVC: Record<VariantType, FontColorType>;
|
|
3
|
+
export declare const colorVC: Record<VariantType, ColorType>;
|
|
4
|
+
export declare const colorGradationVC: Record<VariantType, ColorGradationType>;
|
|
5
|
+
export declare const borderColorVC: Record<VariantType, ColorType>;
|
|
6
|
+
export declare const borderColorGradationVC: Record<VariantType, ColorGradationType>;
|