@smart-react-components/ui 2.0.0-alpha-8 → 2.0.0-alpha-10
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/Alert/AlertCloseIcon.d.ts +2 -0
- package/Alert/{AlertCloseIcon/index.js → AlertCloseIcon.js} +1 -1
- package/Alert/{AlertIcon/index.d.ts → AlertIcon.d.ts} +0 -0
- package/Alert/{AlertIcon/index.js → AlertIcon.js} +1 -1
- package/Alert/index.js +1 -1
- package/Badge/{BadgeIcon/index.d.ts → BadgeIcon.d.ts} +0 -0
- package/Badge/{BadgeIcon/index.js → BadgeIcon.js} +1 -1
- package/Badge/{BadgeList/index.d.ts → BadgeList.d.ts} +0 -0
- package/Badge/{BadgeList/index.js → BadgeList.js} +1 -1
- package/Badge/index.js +1 -1
- package/Breadcrumb/{BreadcrumbItem/index.d.ts → BreadcrumbItem.d.ts} +0 -0
- package/Breadcrumb/{BreadcrumbItem/index.js → BreadcrumbItem.js} +2 -2
- package/Breadcrumb/{BreadcrumbLink/index.d.ts → BreadcrumbLink.d.ts} +0 -0
- package/Breadcrumb/{BreadcrumbLink/index.js → BreadcrumbLink.js} +2 -2
- package/Breadcrumb/{BreadcrumbList/index.d.ts → BreadcrumbList.d.ts} +0 -0
- package/Breadcrumb/{BreadcrumbList/index.js → BreadcrumbList.js} +1 -1
- package/Button/{ButtonAddon/index.d.ts → ButtonAddon.d.ts} +0 -0
- package/Button/{ButtonAddon/index.js → ButtonAddon.js} +4 -4
- package/Button/{ButtonGroup/index.d.ts → ButtonGroup.d.ts} +1 -1
- package/Button/{ButtonGroup/index.js → ButtonGroup.js} +3 -3
- package/Button/{ButtonLink/index.d.ts → ButtonLink.d.ts} +1 -1
- package/Button/{ButtonLink/index.js → ButtonLink.js} +2 -2
- package/Button/{ButtonList/index.d.ts → ButtonList.d.ts} +1 -1
- package/Button/{ButtonList/index.js → ButtonList.js} +2 -2
- package/Button/{ButtonLoading/index.d.ts → ButtonLoading.d.ts} +0 -0
- package/Button/{ButtonLoading/index.js → ButtonLoading.js} +3 -3
- package/Button/{ButtonSelect/index.d.ts → ButtonSelect.d.ts} +2 -2
- package/Button/{ButtonSelect/index.js → ButtonSelect.js} +7 -7
- package/Button/index.js +5 -5
- package/Checkbox/{CheckboxGroup/index.d.ts → CheckboxGroup.d.ts} +2 -2
- package/Checkbox/{CheckboxGroup/index.js → CheckboxGroup.js} +2 -2
- package/Checkbox/index.js +3 -3
- package/ColorPicker/index.d.ts +28 -0
- package/ColorPicker/index.js +83 -0
- package/Dropdown/DropdownArrowIcon.d.ts +2 -0
- package/Dropdown/{DropdownArrowIcon/index.js → DropdownArrowIcon.js} +1 -1
- package/Dropdown/{DropdownCategory/index.d.ts → DropdownCategory.d.ts} +0 -0
- package/Dropdown/{DropdownCategory/index.js → DropdownCategory.js} +0 -0
- package/Dropdown/{DropdownItem/index.d.ts → DropdownItem.d.ts} +0 -0
- package/Dropdown/{DropdownItem/index.js → DropdownItem.js} +2 -2
- package/Dropdown/{DropdownList/index.d.ts → DropdownList.d.ts} +0 -0
- package/Dropdown/{DropdownList/index.js → DropdownList.js} +1 -1
- package/FixedBox/index.js +2 -2
- package/Grid/{Column/index.d.ts → Column.d.ts} +0 -0
- package/Grid/{Column/index.js → Column.js} +1 -1
- package/Grid/{Container/index.d.ts → Container.d.ts} +0 -0
- package/Grid/{Container/index.js → Container.js} +0 -0
- package/Grid/{Row/index.d.ts → Row.d.ts} +0 -0
- package/Grid/{Row/index.js → Row.js} +0 -0
- package/Input/{InputAddon/index.d.ts → InputAddon.d.ts} +3 -2
- package/Input/InputAddon.js +15 -0
- package/Input/InputColorPicker.d.ts +20 -0
- package/Input/InputColorPicker.js +135 -0
- package/Input/{InputFile/index.d.ts → InputFile.d.ts} +0 -0
- package/Input/{InputFile/index.js → InputFile.js} +6 -6
- package/Input/{InputNumber/index.d.ts → InputNumber.d.ts} +0 -0
- package/Input/{InputNumber/index.js → InputNumber.js} +5 -5
- package/Input/index.js +2 -2
- package/Loading/index.js +1 -1
- package/Modal/{ModalBody/index.d.ts → ModalBody.d.ts} +0 -0
- package/Modal/{ModalBody/index.js → ModalBody.js} +0 -0
- package/Modal/ModalCloseIcon.d.ts +2 -0
- package/Modal/{ModalCloseIcon/index.js → ModalCloseIcon.js} +1 -1
- package/Modal/{ModalFooter/index.d.ts → ModalFooter.d.ts} +0 -0
- package/Modal/{ModalFooter/index.js → ModalFooter.js} +2 -2
- package/Modal/{ModalHeader/index.d.ts → ModalHeader.d.ts} +0 -0
- package/Modal/{ModalHeader/index.js → ModalHeader.js} +0 -0
- package/Modal/{ModalTitle/index.d.ts → ModalTitle.d.ts} +0 -0
- package/Modal/{ModalTitle/index.js → ModalTitle.js} +0 -0
- package/Modal/index.js +5 -5
- package/Overlay/index.js +1 -1
- package/Pagination/{PaginationItem/index.d.ts → PaginationItem.d.ts} +0 -0
- package/Pagination/{PaginationItem/index.js → PaginationItem.js} +2 -2
- package/Pagination/{PaginationLink/index.d.ts → PaginationLink.d.ts} +0 -0
- package/Pagination/{PaginationLink/index.js → PaginationLink.js} +2 -2
- package/Pagination/{PaginationList/index.d.ts → PaginationList.d.ts} +0 -0
- package/Pagination/{PaginationList/index.js → PaginationList.js} +1 -1
- package/Pagination/PaginationNextIcon.d.ts +2 -0
- package/Pagination/{PaginationNextIcon/index.js → PaginationNextIcon.js} +1 -1
- package/Pagination/PaginationPrevIcon.d.ts +2 -0
- package/Pagination/{PaginationPrevIcon/index.js → PaginationPrevIcon.js} +1 -1
- package/PopUp/{Alert/index.d.ts → Alert.d.ts} +0 -0
- package/PopUp/{Alert/index.js → Alert.js} +6 -6
- package/PopUp/{Confirm/index.d.ts → Confirm.d.ts} +0 -0
- package/PopUp/{Confirm/index.js → Confirm.js} +7 -7
- package/PopUp/{Prompt/index.d.ts → Prompt.d.ts} +0 -0
- package/PopUp/{Prompt/index.js → Prompt.js} +8 -8
- package/Popover/index.js +2 -2
- package/ProgressBar/index.js +1 -1
- package/Radio/{RadioGroup/index.d.ts → RadioGroup.d.ts} +2 -2
- package/Radio/{RadioGroup/index.js → RadioGroup.js} +2 -2
- package/Radio/index.js +3 -3
- package/Select/{Option/index.d.ts → Option.d.ts} +1 -1
- package/Select/{Option/index.js → Option.js} +2 -2
- package/Select/{OptionGroup/index.d.ts → OptionGroup.d.ts} +0 -0
- package/Select/{OptionGroup/index.js → OptionGroup.js} +0 -0
- package/Select/SelectAddon.d.ts +2 -0
- package/Select/{SelectAddon/index.js → SelectAddon.js} +1 -1
- package/Select/{SelectBox/index.d.ts → SelectBox.d.ts} +1 -1
- package/Select/{SelectBox/index.js → SelectBox.js} +16 -16
- package/Select/index.js +3 -3
- package/Switch/{SwitchGroup/index.d.ts → SwitchGroup.d.ts} +2 -2
- package/Switch/{SwitchGroup/index.js → SwitchGroup.js} +2 -2
- package/Switch/index.js +1 -1
- package/Textarea/TextareaAddon.d.ts +2 -0
- package/Textarea/{TextareaAddon/index.js → TextareaAddon.js} +1 -1
- package/Textarea/index.js +1 -1
- package/Tooltip/index.js +2 -2
- package/WaveEffect/index.js +1 -1
- package/{Alert → components/Alert}/AlertElement.d.ts +0 -0
- package/{Alert → components/Alert}/AlertElement.js +0 -0
- package/{Alert/AlertIcon → components/Alert}/AlertIconElement.d.ts +0 -0
- package/{Alert/AlertIcon → components/Alert}/AlertIconElement.js +0 -0
- package/{Badge → components/Badge}/BadgeElement.d.ts +1 -1
- package/{Badge → components/Badge}/BadgeElement.js +3 -3
- package/{Badge/BadgeIcon → components/Badge}/BadgeIconElement.d.ts +0 -0
- package/{Badge/BadgeIcon → components/Badge}/BadgeIconElement.js +0 -0
- package/{Badge/BadgeList → components/Badge}/BadgeListElement.d.ts +0 -0
- package/{Badge/BadgeList → components/Badge}/BadgeListElement.js +0 -0
- package/{Breadcrumb/BreadcrumbItem → components/Breadcrumb}/BreadcrumbItemElement.d.ts +0 -0
- package/{Breadcrumb/BreadcrumbItem → components/Breadcrumb}/BreadcrumbItemElement.js +0 -0
- package/{Breadcrumb/BreadcrumbList → components/Breadcrumb}/BreadcrumbListElement.d.ts +0 -0
- package/{Breadcrumb/BreadcrumbList → components/Breadcrumb}/BreadcrumbListElement.js +0 -0
- package/components/Button/{ButtonAddon/index.d.ts → ButtonAddonElement.d.ts} +1 -1
- package/components/Button/{ButtonAddon/index.js → ButtonAddonElement.js} +3 -3
- package/components/Button/{ButtonContent/index.d.ts → ButtonContent.d.ts} +0 -0
- package/components/Button/{ButtonContent/index.js → ButtonContent.js} +0 -0
- package/components/Button/{index.d.ts → ButtonElement.d.ts} +0 -0
- package/components/Button/{index.js → ButtonElement.js} +6 -6
- package/components/Button/ButtonGroupElement.d.ts +3 -0
- package/components/Button/{ButtonGroup/index.js → ButtonGroupElement.js} +9 -9
- package/components/Button/{ButtonList/index.d.ts → ButtonListElement.d.ts} +0 -0
- package/components/Button/{ButtonList/index.js → ButtonListElement.js} +0 -0
- package/components/Button/{ButtonLoading/index.d.ts → ButtonLoadingElement.d.ts} +0 -0
- package/components/Button/{ButtonLoading/index.js → ButtonLoadingElement.js} +0 -0
- package/{Checkbox → components/Checkbox}/CheckboxElement.d.ts +0 -0
- package/{Checkbox → components/Checkbox}/CheckboxElement.js +0 -0
- package/components/ColorPicker/ButtonsSection/index.d.ts +12 -0
- package/components/ColorPicker/ButtonsSection/index.js +27 -0
- package/components/ColorPicker/ColorPickerElement.d.ts +7 -0
- package/components/ColorPicker/ColorPickerElement.js +26 -0
- package/components/ColorPicker/ConsoleSection/ConsoleSectionElement.d.ts +6 -0
- package/components/ColorPicker/ConsoleSection/ConsoleSectionElement.js +31 -0
- package/components/ColorPicker/ConsoleSection/index.d.ts +10 -0
- package/components/ColorPicker/ConsoleSection/index.js +59 -0
- package/components/ColorPicker/PaletteSection/PaletteItemElement.d.ts +7 -0
- package/components/ColorPicker/PaletteSection/PaletteItemElement.js +43 -0
- package/components/ColorPicker/PaletteSection/PaletteList.d.ts +11 -0
- package/components/ColorPicker/PaletteSection/PaletteList.js +38 -0
- package/components/ColorPicker/PaletteSection/PaletteListContainerElement.d.ts +2 -0
- package/components/ColorPicker/PaletteSection/PaletteListContainerElement.js +26 -0
- package/components/ColorPicker/PaletteSection/index.d.ts +11 -0
- package/components/ColorPicker/PaletteSection/index.js +24 -0
- package/components/ColorPicker/PickerSection/DraggerElement.d.ts +6 -0
- package/components/ColorPicker/PickerSection/DraggerElement.js +24 -0
- package/components/ColorPicker/PickerSection/MajorDraggerElement.d.ts +3 -0
- package/components/ColorPicker/PickerSection/MajorDraggerElement.js +26 -0
- package/components/ColorPicker/PickerSection/MajorPicker.d.ts +4 -0
- package/components/ColorPicker/PickerSection/MajorPicker.js +117 -0
- package/components/ColorPicker/PickerSection/MajorPickerElement.d.ts +8 -0
- package/components/ColorPicker/PickerSection/MajorPickerElement.js +18 -0
- package/components/ColorPicker/PickerSection/MinorDraggerElement.d.ts +3 -0
- package/components/ColorPicker/PickerSection/MinorDraggerElement.js +13 -0
- package/components/ColorPicker/PickerSection/MinorPicker.d.ts +4 -0
- package/components/ColorPicker/PickerSection/MinorPicker.js +64 -0
- package/components/{Button/ButtonGroup/index.d.ts → ColorPicker/PickerSection/MinorPickerElement.d.ts} +1 -1
- package/components/ColorPicker/PickerSection/MinorPickerElement.js +16 -0
- package/components/ColorPicker/PickerSection/OpacityPicker.d.ts +4 -0
- package/components/ColorPicker/PickerSection/OpacityPicker.js +82 -0
- package/components/ColorPicker/PickerSection/OpacityPickerElement.d.ts +8 -0
- package/components/ColorPicker/PickerSection/OpacityPickerElement.js +17 -0
- package/components/ColorPicker/PickerSection/PickerElement.d.ts +6 -0
- package/components/ColorPicker/PickerSection/PickerElement.js +29 -0
- package/components/ColorPicker/PickerSection/index.d.ts +8 -0
- package/components/ColorPicker/PickerSection/index.js +66 -0
- package/{Dropdown/DropdownItem → components/Dropdown}/DropdownItemElement.d.ts +0 -0
- package/{Dropdown/DropdownItem → components/Dropdown}/DropdownItemElement.js +0 -0
- package/{Dropdown/DropdownList → components/Dropdown}/DropdownListElement.d.ts +0 -0
- package/{Dropdown/DropdownList → components/Dropdown}/DropdownListElement.js +0 -0
- package/{FixedBox → components/FixedBox}/FixedBoxElement.d.ts +0 -0
- package/{FixedBox → components/FixedBox}/FixedBoxElement.js +0 -0
- package/{FixedBox → components/FixedBox}/OverlayElement.d.ts +0 -0
- package/{FixedBox → components/FixedBox}/OverlayElement.js +0 -0
- package/components/{FormBlockLabel/index.d.ts → Form/FormBlockLabel.d.ts} +0 -0
- package/components/{FormBlockLabel/index.js → Form/FormBlockLabel.js} +0 -0
- package/components/{FormGroup/index.d.ts → Form/FormGroup.d.ts} +0 -0
- package/components/{FormGroup/index.js → Form/FormGroup.js} +0 -0
- package/components/{FormInlineLabel/index.d.ts → Form/FormInlineLabel.d.ts} +0 -0
- package/components/{FormInlineLabel/index.js → Form/FormInlineLabel.js} +0 -0
- package/components/{HiddenInput/index.d.ts → Form/HiddenInput.d.ts} +0 -0
- package/components/{HiddenInput/index.js → Form/HiddenInput.js} +0 -0
- package/{Input/InputAddon → components/Input}/InputAddonElement.d.ts +0 -0
- package/{Input/InputAddon → components/Input}/InputAddonElement.js +8 -11
- package/{Input → components/Input}/InputElement.d.ts +0 -0
- package/{Input → components/Input}/InputElement.js +3 -2
- package/{Input/InputFile → components/Input}/InputFileTemplate.d.ts +0 -0
- package/{Input/InputFile → components/Input}/InputFileTemplate.js +1 -1
- package/{Input/InputNumber → components/Input}/InputNumberTemplate.d.ts +0 -0
- package/{Input/InputNumber → components/Input}/InputNumberTemplate.js +2 -2
- package/{Input/InputNumber → components/Input}/InputNumberTemplateElement.d.ts +0 -0
- package/{Input/InputNumber → components/Input}/InputNumberTemplateElement.js +2 -2
- package/{Loading → components/Loading}/LoadingElement.d.ts +0 -0
- package/{Loading → components/Loading}/LoadingElement.js +0 -0
- package/components/Modal/{index.d.ts → ModalElement.d.ts} +0 -0
- package/components/Modal/{index.js → ModalElement.js} +0 -0
- package/components/Modal/{Overlay/index.d.ts → OverlayElement.d.ts} +3 -3
- package/components/Modal/{Overlay/index.js → OverlayElement.js} +8 -8
- package/{Overlay → components/Overlay}/OverlayElement.d.ts +0 -0
- package/{Overlay → components/Overlay}/OverlayElement.js +0 -0
- package/{Pagination/PaginationItem → components/Pagination}/PaginationItemElement.d.ts +0 -0
- package/{Pagination/PaginationItem → components/Pagination}/PaginationItemElement.js +0 -0
- package/{Pagination/PaginationList → components/Pagination}/PaginationListElement.d.ts +0 -0
- package/{Pagination/PaginationList → components/Pagination}/PaginationListElement.js +0 -0
- package/{Popover → components/Popover}/PopoverArrow.d.ts +0 -0
- package/{Popover → components/Popover}/PopoverArrow.js +1 -1
- package/{Popover → components/Popover}/PopoverElement.d.ts +0 -0
- package/{Popover → components/Popover}/PopoverElement.js +1 -1
- package/{ProgressBar → components/ProgressBar}/ProgressBarElement.d.ts +0 -0
- package/{ProgressBar → components/ProgressBar}/ProgressBarElement.js +0 -0
- package/{Radio → components/Radio}/RadioElement.d.ts +0 -0
- package/{Radio → components/Radio}/RadioElement.js +2 -2
- package/{Select → components/Select}/SelectElement.d.ts +0 -0
- package/{Select → components/Select}/SelectElement.js +1 -1
- package/{Switch → components/Switch}/SwitchElement.d.ts +0 -0
- package/{Switch → components/Switch}/SwitchElement.js +1 -1
- package/{Tooltip → components/Tooltip}/TooltipElement.d.ts +0 -0
- package/{Tooltip → components/Tooltip}/TooltipElement.js +1 -1
- package/{WaveEffect → components/WaveEffect}/WaveEffectElement.d.ts +0 -0
- package/{WaveEffect → components/WaveEffect}/WaveEffectElement.js +0 -0
- package/constants/color-picker.d.ts +1 -0
- package/constants/color-picker.js +4 -0
- package/context/ColorPickerProps.d.ts +10 -0
- package/context/ColorPickerProps.js +4 -0
- package/icons/Add.d.ts +6 -0
- package/icons/Add.js +12 -0
- package/icons/ArrowMultipleDown.d.ts +6 -0
- package/icons/ArrowMultipleDown.js +12 -0
- package/icons/Cancel.d.ts +6 -0
- package/icons/Cancel.js +12 -0
- package/icons/Eraser.d.ts +6 -0
- package/icons/Eraser.js +12 -0
- package/icons/Palette.d.ts +6 -0
- package/icons/Palette.js +14 -0
- package/icons/Save.d.ts +6 -0
- package/icons/Save.js +14 -0
- package/index.d.ts +15 -3
- package/index.js +32 -18
- package/package.json +7 -7
- package/types/color-picker.d.ts +21 -0
- package/types/color-picker.js +9 -0
- package/types/wave-effect.d.ts +4 -0
- package/types/wave-effect.js +2 -0
- package/util/color-picker.d.ts +27 -0
- package/util/color-picker.js +77 -0
- package/util/props.d.ts +18 -14
- package/util/props.js +24 -4
- package/Alert/AlertCloseIcon/index.d.ts +0 -2
- package/Breadcrumb/index.d.ts +0 -3
- package/Breadcrumb/index.js +0 -12
- package/Dropdown/DropdownArrowIcon/index.d.ts +0 -2
- package/Grid/index.d.ts +0 -3
- package/Grid/index.js +0 -12
- package/Input/InputAddon/index.js +0 -12
- package/Modal/ModalCloseIcon/index.d.ts +0 -2
- package/Pagination/PaginationNextIcon/index.d.ts +0 -2
- package/Pagination/PaginationPrevIcon/index.d.ts +0 -2
- package/Pagination/index.d.ts +0 -5
- package/Pagination/index.js +0 -16
- package/Select/SelectAddon/index.d.ts +0 -2
- package/Textarea/TextareaAddon/index.d.ts +0 -2
package/index.d.ts
CHANGED
|
@@ -4,7 +4,9 @@ export { default as AlertIcon } from './Alert/AlertIcon';
|
|
|
4
4
|
export { default as Badge } from './Badge';
|
|
5
5
|
export { default as BadgeIcon } from './Badge/BadgeIcon';
|
|
6
6
|
export { default as BadgeList } from './Badge/BadgeList';
|
|
7
|
-
export
|
|
7
|
+
export { default as BreadcrumbItem } from './Breadcrumb/BreadcrumbItem';
|
|
8
|
+
export { default as BreadcrumbLink } from './Breadcrumb/BreadcrumbLink';
|
|
9
|
+
export { default as BreadcrumbList } from './Breadcrumb/BreadcrumbList';
|
|
8
10
|
export { default as Button } from './Button';
|
|
9
11
|
export { default as ButtonAddon } from './Button/ButtonAddon';
|
|
10
12
|
export { default as ButtonGroup } from './Button/ButtonGroup';
|
|
@@ -14,15 +16,19 @@ export { default as ButtonLoading } from './Button/ButtonLoading';
|
|
|
14
16
|
export { default as ButtonSelect } from './Button/ButtonSelect';
|
|
15
17
|
export { default as Checkbox } from './Checkbox';
|
|
16
18
|
export { default as CheckboxGroup } from './Checkbox/CheckboxGroup';
|
|
19
|
+
export { default as ColorPicker } from './ColorPicker';
|
|
17
20
|
export { default as Dropdown } from './Dropdown';
|
|
18
21
|
export { default as DropdownArrowIcon } from './Dropdown/DropdownArrowIcon';
|
|
19
22
|
export { default as DropdownCategory } from './Dropdown/DropdownCategory';
|
|
20
23
|
export { default as DropdownItem } from './Dropdown/DropdownItem';
|
|
21
24
|
export { default as DropdownList } from './Dropdown/DropdownList';
|
|
22
25
|
export { default as FixedBox } from './FixedBox';
|
|
23
|
-
export
|
|
26
|
+
export { default as Column } from './Grid/Column';
|
|
27
|
+
export { default as Container } from './Grid/Container';
|
|
28
|
+
export { default as Row } from './Grid/Row';
|
|
24
29
|
export { default as Input } from './Input';
|
|
25
30
|
export { default as InputAddon } from './Input/InputAddon';
|
|
31
|
+
export { default as InputColorPicker } from './Input/InputColorPicker';
|
|
26
32
|
export { default as InputFile } from './Input/InputFile';
|
|
27
33
|
export { default as InputNumber } from './Input/InputNumber';
|
|
28
34
|
export { default as Loading } from './Loading';
|
|
@@ -33,7 +39,11 @@ export { default as ModalHeader } from './Modal/ModalHeader';
|
|
|
33
39
|
export { default as ModalTitle } from './Modal/ModalTitle';
|
|
34
40
|
export { default as ModalFooter } from './Modal/ModalFooter';
|
|
35
41
|
export { default as Overlay } from './Overlay';
|
|
36
|
-
export
|
|
42
|
+
export { default as PaginationItem } from './Pagination/PaginationItem';
|
|
43
|
+
export { default as PaginationLink } from './Pagination/PaginationLink';
|
|
44
|
+
export { default as PaginationList } from './Pagination/PaginationList';
|
|
45
|
+
export { default as PaginationNextIcon } from './Pagination/PaginationNextIcon';
|
|
46
|
+
export { default as PaginationPrevIcon } from './Pagination/PaginationPrevIcon';
|
|
37
47
|
export { default as Popover } from './Popover';
|
|
38
48
|
export { default as PopupAlert } from './PopUp/Alert';
|
|
39
49
|
export { default as Confirm } from './PopUp/Confirm';
|
|
@@ -43,10 +53,12 @@ export { default as Radio } from './Radio';
|
|
|
43
53
|
export { default as RadioGroup } from './Radio/RadioGroup';
|
|
44
54
|
export { default as Select } from './Select';
|
|
45
55
|
export { default as SelectAddon } from './Select/SelectAddon';
|
|
56
|
+
export { default as SelectBox } from './Select/SelectBox';
|
|
46
57
|
export { default as Option } from './Select/Option';
|
|
47
58
|
export { default as OptionGroup } from './Select/OptionGroup';
|
|
48
59
|
export { default as Switch } from './Switch';
|
|
49
60
|
export { default as SwitchGroup } from './Switch/SwitchGroup';
|
|
50
61
|
export { default as Textarea } from './Textarea';
|
|
62
|
+
export { default as TextareaAddon } from './Textarea/TextareaAddon';
|
|
51
63
|
export { default as Tooltip } from './Tooltip';
|
|
52
64
|
export { default as WaveEffect } from './WaveEffect';
|
package/index.js
CHANGED
|
@@ -1,23 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
17
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
4
|
};
|
|
19
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.
|
|
6
|
+
exports.Prompt = exports.Confirm = exports.PopupAlert = exports.Popover = exports.PaginationPrevIcon = exports.PaginationNextIcon = exports.PaginationList = exports.PaginationLink = exports.PaginationItem = exports.Overlay = exports.ModalFooter = exports.ModalTitle = exports.ModalHeader = exports.ModalCloseIcon = exports.ModalBody = exports.Modal = exports.Loading = exports.InputNumber = exports.InputFile = exports.InputColorPicker = exports.InputAddon = exports.Input = exports.Row = exports.Container = exports.Column = exports.FixedBox = exports.DropdownList = exports.DropdownItem = exports.DropdownCategory = exports.DropdownArrowIcon = exports.Dropdown = exports.ColorPicker = exports.CheckboxGroup = exports.Checkbox = exports.ButtonSelect = exports.ButtonLoading = exports.ButtonList = exports.ButtonLink = exports.ButtonGroup = exports.ButtonAddon = exports.Button = exports.BreadcrumbList = exports.BreadcrumbLink = exports.BreadcrumbItem = exports.BadgeList = exports.BadgeIcon = exports.Badge = exports.AlertIcon = exports.AlertCloseIcon = exports.Alert = void 0;
|
|
7
|
+
exports.WaveEffect = exports.Tooltip = exports.TextareaAddon = exports.Textarea = exports.SwitchGroup = exports.Switch = exports.OptionGroup = exports.Option = exports.SelectBox = exports.SelectAddon = exports.Select = exports.RadioGroup = exports.Radio = exports.ProgressBar = void 0;
|
|
21
8
|
var Alert_1 = require("./Alert");
|
|
22
9
|
Object.defineProperty(exports, "Alert", { enumerable: true, get: function () { return __importDefault(Alert_1).default; } });
|
|
23
10
|
var AlertCloseIcon_1 = require("./Alert/AlertCloseIcon");
|
|
@@ -30,7 +17,12 @@ var BadgeIcon_1 = require("./Badge/BadgeIcon");
|
|
|
30
17
|
Object.defineProperty(exports, "BadgeIcon", { enumerable: true, get: function () { return __importDefault(BadgeIcon_1).default; } });
|
|
31
18
|
var BadgeList_1 = require("./Badge/BadgeList");
|
|
32
19
|
Object.defineProperty(exports, "BadgeList", { enumerable: true, get: function () { return __importDefault(BadgeList_1).default; } });
|
|
33
|
-
|
|
20
|
+
var BreadcrumbItem_1 = require("./Breadcrumb/BreadcrumbItem");
|
|
21
|
+
Object.defineProperty(exports, "BreadcrumbItem", { enumerable: true, get: function () { return __importDefault(BreadcrumbItem_1).default; } });
|
|
22
|
+
var BreadcrumbLink_1 = require("./Breadcrumb/BreadcrumbLink");
|
|
23
|
+
Object.defineProperty(exports, "BreadcrumbLink", { enumerable: true, get: function () { return __importDefault(BreadcrumbLink_1).default; } });
|
|
24
|
+
var BreadcrumbList_1 = require("./Breadcrumb/BreadcrumbList");
|
|
25
|
+
Object.defineProperty(exports, "BreadcrumbList", { enumerable: true, get: function () { return __importDefault(BreadcrumbList_1).default; } });
|
|
34
26
|
var Button_1 = require("./Button");
|
|
35
27
|
Object.defineProperty(exports, "Button", { enumerable: true, get: function () { return __importDefault(Button_1).default; } });
|
|
36
28
|
var ButtonAddon_1 = require("./Button/ButtonAddon");
|
|
@@ -49,6 +41,8 @@ var Checkbox_1 = require("./Checkbox");
|
|
|
49
41
|
Object.defineProperty(exports, "Checkbox", { enumerable: true, get: function () { return __importDefault(Checkbox_1).default; } });
|
|
50
42
|
var CheckboxGroup_1 = require("./Checkbox/CheckboxGroup");
|
|
51
43
|
Object.defineProperty(exports, "CheckboxGroup", { enumerable: true, get: function () { return __importDefault(CheckboxGroup_1).default; } });
|
|
44
|
+
var ColorPicker_1 = require("./ColorPicker");
|
|
45
|
+
Object.defineProperty(exports, "ColorPicker", { enumerable: true, get: function () { return __importDefault(ColorPicker_1).default; } });
|
|
52
46
|
var Dropdown_1 = require("./Dropdown");
|
|
53
47
|
Object.defineProperty(exports, "Dropdown", { enumerable: true, get: function () { return __importDefault(Dropdown_1).default; } });
|
|
54
48
|
var DropdownArrowIcon_1 = require("./Dropdown/DropdownArrowIcon");
|
|
@@ -61,11 +55,18 @@ var DropdownList_1 = require("./Dropdown/DropdownList");
|
|
|
61
55
|
Object.defineProperty(exports, "DropdownList", { enumerable: true, get: function () { return __importDefault(DropdownList_1).default; } });
|
|
62
56
|
var FixedBox_1 = require("./FixedBox");
|
|
63
57
|
Object.defineProperty(exports, "FixedBox", { enumerable: true, get: function () { return __importDefault(FixedBox_1).default; } });
|
|
64
|
-
|
|
58
|
+
var Column_1 = require("./Grid/Column");
|
|
59
|
+
Object.defineProperty(exports, "Column", { enumerable: true, get: function () { return __importDefault(Column_1).default; } });
|
|
60
|
+
var Container_1 = require("./Grid/Container");
|
|
61
|
+
Object.defineProperty(exports, "Container", { enumerable: true, get: function () { return __importDefault(Container_1).default; } });
|
|
62
|
+
var Row_1 = require("./Grid/Row");
|
|
63
|
+
Object.defineProperty(exports, "Row", { enumerable: true, get: function () { return __importDefault(Row_1).default; } });
|
|
65
64
|
var Input_1 = require("./Input");
|
|
66
65
|
Object.defineProperty(exports, "Input", { enumerable: true, get: function () { return __importDefault(Input_1).default; } });
|
|
67
66
|
var InputAddon_1 = require("./Input/InputAddon");
|
|
68
67
|
Object.defineProperty(exports, "InputAddon", { enumerable: true, get: function () { return __importDefault(InputAddon_1).default; } });
|
|
68
|
+
var InputColorPicker_1 = require("./Input/InputColorPicker");
|
|
69
|
+
Object.defineProperty(exports, "InputColorPicker", { enumerable: true, get: function () { return __importDefault(InputColorPicker_1).default; } });
|
|
69
70
|
var InputFile_1 = require("./Input/InputFile");
|
|
70
71
|
Object.defineProperty(exports, "InputFile", { enumerable: true, get: function () { return __importDefault(InputFile_1).default; } });
|
|
71
72
|
var InputNumber_1 = require("./Input/InputNumber");
|
|
@@ -86,7 +87,16 @@ var ModalFooter_1 = require("./Modal/ModalFooter");
|
|
|
86
87
|
Object.defineProperty(exports, "ModalFooter", { enumerable: true, get: function () { return __importDefault(ModalFooter_1).default; } });
|
|
87
88
|
var Overlay_1 = require("./Overlay");
|
|
88
89
|
Object.defineProperty(exports, "Overlay", { enumerable: true, get: function () { return __importDefault(Overlay_1).default; } });
|
|
89
|
-
|
|
90
|
+
var PaginationItem_1 = require("./Pagination/PaginationItem");
|
|
91
|
+
Object.defineProperty(exports, "PaginationItem", { enumerable: true, get: function () { return __importDefault(PaginationItem_1).default; } });
|
|
92
|
+
var PaginationLink_1 = require("./Pagination/PaginationLink");
|
|
93
|
+
Object.defineProperty(exports, "PaginationLink", { enumerable: true, get: function () { return __importDefault(PaginationLink_1).default; } });
|
|
94
|
+
var PaginationList_1 = require("./Pagination/PaginationList");
|
|
95
|
+
Object.defineProperty(exports, "PaginationList", { enumerable: true, get: function () { return __importDefault(PaginationList_1).default; } });
|
|
96
|
+
var PaginationNextIcon_1 = require("./Pagination/PaginationNextIcon");
|
|
97
|
+
Object.defineProperty(exports, "PaginationNextIcon", { enumerable: true, get: function () { return __importDefault(PaginationNextIcon_1).default; } });
|
|
98
|
+
var PaginationPrevIcon_1 = require("./Pagination/PaginationPrevIcon");
|
|
99
|
+
Object.defineProperty(exports, "PaginationPrevIcon", { enumerable: true, get: function () { return __importDefault(PaginationPrevIcon_1).default; } });
|
|
90
100
|
var Popover_1 = require("./Popover");
|
|
91
101
|
Object.defineProperty(exports, "Popover", { enumerable: true, get: function () { return __importDefault(Popover_1).default; } });
|
|
92
102
|
var Alert_2 = require("./PopUp/Alert");
|
|
@@ -105,6 +115,8 @@ var Select_1 = require("./Select");
|
|
|
105
115
|
Object.defineProperty(exports, "Select", { enumerable: true, get: function () { return __importDefault(Select_1).default; } });
|
|
106
116
|
var SelectAddon_1 = require("./Select/SelectAddon");
|
|
107
117
|
Object.defineProperty(exports, "SelectAddon", { enumerable: true, get: function () { return __importDefault(SelectAddon_1).default; } });
|
|
118
|
+
var SelectBox_1 = require("./Select/SelectBox");
|
|
119
|
+
Object.defineProperty(exports, "SelectBox", { enumerable: true, get: function () { return __importDefault(SelectBox_1).default; } });
|
|
108
120
|
var Option_1 = require("./Select/Option");
|
|
109
121
|
Object.defineProperty(exports, "Option", { enumerable: true, get: function () { return __importDefault(Option_1).default; } });
|
|
110
122
|
var OptionGroup_1 = require("./Select/OptionGroup");
|
|
@@ -115,6 +127,8 @@ var SwitchGroup_1 = require("./Switch/SwitchGroup");
|
|
|
115
127
|
Object.defineProperty(exports, "SwitchGroup", { enumerable: true, get: function () { return __importDefault(SwitchGroup_1).default; } });
|
|
116
128
|
var Textarea_1 = require("./Textarea");
|
|
117
129
|
Object.defineProperty(exports, "Textarea", { enumerable: true, get: function () { return __importDefault(Textarea_1).default; } });
|
|
130
|
+
var TextareaAddon_1 = require("./Textarea/TextareaAddon");
|
|
131
|
+
Object.defineProperty(exports, "TextareaAddon", { enumerable: true, get: function () { return __importDefault(TextareaAddon_1).default; } });
|
|
118
132
|
var Tooltip_1 = require("./Tooltip");
|
|
119
133
|
Object.defineProperty(exports, "Tooltip", { enumerable: true, get: function () { return __importDefault(Tooltip_1).default; } });
|
|
120
134
|
var WaveEffect_1 = require("./WaveEffect");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smart-react-components/ui",
|
|
3
|
-
"version": "2.0.0-alpha-
|
|
3
|
+
"version": "2.0.0-alpha-10",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"description": "SRC UI includes React and Styled components.",
|
|
@@ -64,9 +64,9 @@
|
|
|
64
64
|
"test": "jest"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
|
-
"@smart-react-components/core": "2.0.0-alpha-
|
|
68
|
-
"@smart-react-components/router": "2.0.0-alpha-
|
|
69
|
-
"@smart-react-components/transition": "2.0.0-alpha-
|
|
67
|
+
"@smart-react-components/core": "2.0.0-alpha-16",
|
|
68
|
+
"@smart-react-components/router": "2.0.0-alpha-12",
|
|
69
|
+
"@smart-react-components/transition": "2.0.0-alpha-12",
|
|
70
70
|
"@testing-library/react": "13.4.0",
|
|
71
71
|
"@types/jest": "29.0.1",
|
|
72
72
|
"@types/react": "18.0.19",
|
|
@@ -83,9 +83,9 @@
|
|
|
83
83
|
"typescript": "4.8.3"
|
|
84
84
|
},
|
|
85
85
|
"peerDependencies": {
|
|
86
|
-
"@smart-react-components/core": "^2.0.0-alpha-
|
|
87
|
-
"@smart-react-components/router": "^2.0.0-alpha-
|
|
88
|
-
"@smart-react-components/transition": "^2.0.0-alpha-
|
|
86
|
+
"@smart-react-components/core": "^2.0.0-alpha-16",
|
|
87
|
+
"@smart-react-components/router": "^2.0.0-alpha-12",
|
|
88
|
+
"@smart-react-components/transition": "^2.0.0-alpha-12",
|
|
89
89
|
"react": "^18.2.0",
|
|
90
90
|
"react-dom": "^18.2.0",
|
|
91
91
|
"styled-components": "^5.3.5"
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Color, Nullable } from '@smart-react-components/core/types';
|
|
2
|
+
import { MutableRefObject } from 'react';
|
|
3
|
+
export declare enum ColorPickerFormat {
|
|
4
|
+
HEX = 0,
|
|
5
|
+
RGB = 1,
|
|
6
|
+
HSL = 2
|
|
7
|
+
}
|
|
8
|
+
export interface ConsoleRef {
|
|
9
|
+
onDrag: (value: Nullable<Color>) => void;
|
|
10
|
+
}
|
|
11
|
+
export interface PickerProps {
|
|
12
|
+
color: MutableRefObject<Color>;
|
|
13
|
+
onDrag: () => void;
|
|
14
|
+
onEnd: (onMove: (e: Event) => void, onEnd: () => void) => void;
|
|
15
|
+
onRef?: (v: PickerRef) => void;
|
|
16
|
+
onStart: (onMove: (e: Event) => void, onEnd: () => void) => void;
|
|
17
|
+
}
|
|
18
|
+
export interface PickerRef {
|
|
19
|
+
onChange: () => void;
|
|
20
|
+
onExternalDrag?: () => void;
|
|
21
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ColorPickerFormat = void 0;
|
|
4
|
+
var ColorPickerFormat;
|
|
5
|
+
(function (ColorPickerFormat) {
|
|
6
|
+
ColorPickerFormat[ColorPickerFormat["HEX"] = 0] = "HEX";
|
|
7
|
+
ColorPickerFormat[ColorPickerFormat["RGB"] = 1] = "RGB";
|
|
8
|
+
ColorPickerFormat[ColorPickerFormat["HSL"] = 2] = "HSL";
|
|
9
|
+
})(ColorPickerFormat = exports.ColorPickerFormat || (exports.ColorPickerFormat = {}));
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Nullable } from '@smart-react-components/core/types';
|
|
2
|
+
import { ColorPickerFormat } from '../types/color-picker';
|
|
3
|
+
/**
|
|
4
|
+
* Converts color to string by given format.
|
|
5
|
+
*/
|
|
6
|
+
export declare const colorToString: (color: Color, format: ColorPickerFormat) => Nullable<string>;
|
|
7
|
+
/**
|
|
8
|
+
* Calculates new position of the dragger.
|
|
9
|
+
*/
|
|
10
|
+
export declare const calculateDraggerPosition: (e: MouseEvent, pickerEl: HTMLDivElement, draggerSize: number) => {
|
|
11
|
+
left: number;
|
|
12
|
+
top: number;
|
|
13
|
+
x: number;
|
|
14
|
+
y: number;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Converts color to the given format as string.
|
|
18
|
+
*/
|
|
19
|
+
export declare const convertColor: (color: Color, format: ColorPickerFormat) => Nullable<string>;
|
|
20
|
+
/**
|
|
21
|
+
* Checks if two given colors are equal.
|
|
22
|
+
*/
|
|
23
|
+
export declare const isEqual: (color1: Color, color2: Color) => boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Checks if the given color is light.
|
|
26
|
+
*/
|
|
27
|
+
export declare const isLight: (color: Color, hasOpacity: boolean) => boolean;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isLight = exports.isEqual = exports.convertColor = exports.calculateDraggerPosition = exports.colorToString = void 0;
|
|
4
|
+
const color_picker_1 = require("../types/color-picker");
|
|
5
|
+
/**
|
|
6
|
+
* Converts color to string by given format.
|
|
7
|
+
*/
|
|
8
|
+
const colorToString = (color, format) => {
|
|
9
|
+
if (!color) {
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
12
|
+
if (format === color_picker_1.ColorPickerFormat.HSL) {
|
|
13
|
+
return color.hsl().toString();
|
|
14
|
+
}
|
|
15
|
+
if (format === color_picker_1.ColorPickerFormat.RGB || color.valpha < 1) {
|
|
16
|
+
return color.rgb().toString();
|
|
17
|
+
}
|
|
18
|
+
return color.hex().toString();
|
|
19
|
+
};
|
|
20
|
+
exports.colorToString = colorToString;
|
|
21
|
+
/**
|
|
22
|
+
* Calculates new position of the dragger.
|
|
23
|
+
*/
|
|
24
|
+
const calculateDraggerPosition = (e, pickerEl, draggerSize) => {
|
|
25
|
+
const pickerRect = pickerEl.getBoundingClientRect();
|
|
26
|
+
const draggerHalfSize = draggerSize / 2;
|
|
27
|
+
const eX = e.clientX || e.pageX - window.pageXOffset;
|
|
28
|
+
const eY = e.clientY || e.pageY - window.pageYOffset;
|
|
29
|
+
let x = eX - (pickerRect.left + draggerHalfSize);
|
|
30
|
+
let y = eY - (pickerRect.top + draggerHalfSize);
|
|
31
|
+
if (x < -draggerHalfSize) {
|
|
32
|
+
x = -draggerHalfSize;
|
|
33
|
+
}
|
|
34
|
+
else if (x > (pickerRect.width - draggerHalfSize)) {
|
|
35
|
+
x = pickerRect.width - draggerHalfSize;
|
|
36
|
+
}
|
|
37
|
+
if (y < -draggerHalfSize) {
|
|
38
|
+
y = -draggerHalfSize;
|
|
39
|
+
}
|
|
40
|
+
else if (y > (pickerRect.height - draggerHalfSize)) {
|
|
41
|
+
y = pickerRect.height - draggerHalfSize;
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
left: x,
|
|
45
|
+
top: y,
|
|
46
|
+
x: x + draggerHalfSize,
|
|
47
|
+
y: y + draggerHalfSize,
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
exports.calculateDraggerPosition = calculateDraggerPosition;
|
|
51
|
+
/**
|
|
52
|
+
* Converts color to the given format as string.
|
|
53
|
+
*/
|
|
54
|
+
const convertColor = (color, format) => {
|
|
55
|
+
if (!color) {
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
58
|
+
if (format === color_picker_1.ColorPickerFormat.HSL) {
|
|
59
|
+
return color.hsl().toString();
|
|
60
|
+
}
|
|
61
|
+
return (format === color_picker_1.ColorPickerFormat.RGB || color.valpha < 1) ? color.rgb().toString() : color.hex().toString();
|
|
62
|
+
};
|
|
63
|
+
exports.convertColor = convertColor;
|
|
64
|
+
/**
|
|
65
|
+
* Checks if two given colors are equal.
|
|
66
|
+
*/
|
|
67
|
+
const isEqual = (color1, color2) => ((!color1 && !color2)
|
|
68
|
+
|| ((color1 === null || color1 === void 0 ? void 0 : color1.rgb().toString()) === (color2 === null || color2 === void 0 ? void 0 : color2.rgb().toString())));
|
|
69
|
+
exports.isEqual = isEqual;
|
|
70
|
+
/**
|
|
71
|
+
* Checks if the given color is light.
|
|
72
|
+
*/
|
|
73
|
+
const isLight = (color, hasOpacity) => {
|
|
74
|
+
const isLight = color.isLight();
|
|
75
|
+
return hasOpacity ? (isLight || color.valpha < .4) : isLight;
|
|
76
|
+
};
|
|
77
|
+
exports.isLight = isLight;
|
package/util/props.d.ts
CHANGED
|
@@ -1,20 +1,24 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { JSXElementProps, SizeProp, Value } from '@smart-react-components/core/types';
|
|
2
2
|
import { OrderPosition } from '../types';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Apply the given prop to each breakpoint which has a corresponding size prop.
|
|
5
|
+
*
|
|
6
|
+
* @param sizeProps - Object that holds size props.
|
|
7
|
+
* @param sizePropKey - Name of the size prop.
|
|
8
|
+
* @param responsivePropKey - Name of the applied prop.
|
|
9
|
+
* @param valueCallback - It is invoked with the given size prop value to return the responsive prop value.
|
|
5
10
|
*/
|
|
6
|
-
export declare const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
};
|
|
11
|
+
export declare const applyResponsiveStyledProp: (sizeProps: JSXElementProps, sizePropKey: string, responsivePropKey: string, valueCallback: (size: SizeProp) => Value) => JSXElementProps;
|
|
12
|
+
/**
|
|
13
|
+
* Apply the given props to each breakpoint which has a corresponding size prop.
|
|
14
|
+
*
|
|
15
|
+
* @param sizeProps - Object that holds size props.
|
|
16
|
+
* @param sizePropKey - Name of the size prop.
|
|
17
|
+
* @param responsiveProps - Object key indicates name of the applied prop, and its value is invoked with the given size prop value to return the responsive prop value.
|
|
18
|
+
*/
|
|
19
|
+
export declare const applyResponsiveStyledProps: (sizeProps: JSXElementProps, sizePropKey: string, responsiveProps: {
|
|
20
|
+
[key: string]: (size: SizeProp) => Value;
|
|
21
|
+
}) => JSXElementProps;
|
|
18
22
|
/**
|
|
19
23
|
* Returns reverse value of the order position.
|
|
20
24
|
* If value is left, returns right.
|
package/util/props.js
CHANGED
|
@@ -1,12 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getReverseOrderPosition = exports.
|
|
3
|
+
exports.getReverseOrderPosition = exports.applyResponsiveStyledProps = exports.applyResponsiveStyledProp = void 0;
|
|
4
4
|
const types_1 = require("../types");
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Apply the given prop to each breakpoint which has a corresponding size prop.
|
|
7
|
+
*
|
|
8
|
+
* @param sizeProps - Object that holds size props.
|
|
9
|
+
* @param sizePropKey - Name of the size prop.
|
|
10
|
+
* @param responsivePropKey - Name of the applied prop.
|
|
11
|
+
* @param valueCallback - It is invoked with the given size prop value to return the responsive prop value.
|
|
7
12
|
*/
|
|
8
|
-
const
|
|
9
|
-
exports.
|
|
13
|
+
const applyResponsiveStyledProp = (sizeProps, sizePropKey, responsivePropKey, valueCallback) => (Object.assign(Object.assign(Object.assign(Object.assign({ [responsivePropKey]: valueCallback(sizeProps[sizePropKey]) }, (sizeProps[`${sizePropKey}Sm`] && { [`${responsivePropKey}Sm`]: valueCallback(sizeProps[`${sizePropKey}Sm`]) })), (sizeProps[`${sizePropKey}Md`] && { [`${responsivePropKey}Md`]: valueCallback(sizeProps[`${sizePropKey}Md`]) })), (sizeProps[`${sizePropKey}Lg`] && { [`${responsivePropKey}Lg`]: valueCallback(sizeProps[`${sizePropKey}Lg`]) })), (sizeProps[`${sizePropKey}Xl`] && { [`${responsivePropKey}Xl`]: valueCallback(sizeProps[`${sizePropKey}Xl`]) })));
|
|
14
|
+
exports.applyResponsiveStyledProp = applyResponsiveStyledProp;
|
|
15
|
+
/**
|
|
16
|
+
* Apply the given props to each breakpoint which has a corresponding size prop.
|
|
17
|
+
*
|
|
18
|
+
* @param sizeProps - Object that holds size props.
|
|
19
|
+
* @param sizePropKey - Name of the size prop.
|
|
20
|
+
* @param responsiveProps - Object key indicates name of the applied prop, and its value is invoked with the given size prop value to return the responsive prop value.
|
|
21
|
+
*/
|
|
22
|
+
const applyResponsiveStyledProps = (sizeProps, sizePropKey, responsiveProps) => {
|
|
23
|
+
let result = {};
|
|
24
|
+
Object.keys(responsiveProps).forEach(key => {
|
|
25
|
+
result = Object.assign(Object.assign({}, result), (0, exports.applyResponsiveStyledProp)(sizeProps, sizePropKey, key, responsiveProps[key]));
|
|
26
|
+
});
|
|
27
|
+
return result;
|
|
28
|
+
};
|
|
29
|
+
exports.applyResponsiveStyledProps = applyResponsiveStyledProps;
|
|
10
30
|
/**
|
|
11
31
|
* Returns reverse value of the order position.
|
|
12
32
|
* If value is left, returns right.
|
package/Breadcrumb/index.d.ts
DELETED
package/Breadcrumb/index.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.BreadcrumbList = exports.BreadcrumbLink = exports.BreacrumbItem = void 0;
|
|
7
|
-
var BreadcrumbItem_1 = require("./BreadcrumbItem");
|
|
8
|
-
Object.defineProperty(exports, "BreacrumbItem", { enumerable: true, get: function () { return __importDefault(BreadcrumbItem_1).default; } });
|
|
9
|
-
var BreadcrumbLink_1 = require("./BreadcrumbLink");
|
|
10
|
-
Object.defineProperty(exports, "BreadcrumbLink", { enumerable: true, get: function () { return __importDefault(BreadcrumbLink_1).default; } });
|
|
11
|
-
var BreadcrumbList_1 = require("./BreadcrumbList");
|
|
12
|
-
Object.defineProperty(exports, "BreadcrumbList", { enumerable: true, get: function () { return __importDefault(BreadcrumbList_1).default; } });
|
package/Grid/index.d.ts
DELETED
package/Grid/index.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Row = exports.Container = exports.Column = void 0;
|
|
7
|
-
var Column_1 = require("./Column");
|
|
8
|
-
Object.defineProperty(exports, "Column", { enumerable: true, get: function () { return __importDefault(Column_1).default; } });
|
|
9
|
-
var Container_1 = require("./Container");
|
|
10
|
-
Object.defineProperty(exports, "Container", { enumerable: true, get: function () { return __importDefault(Container_1).default; } });
|
|
11
|
-
var Row_1 = require("./Row");
|
|
12
|
-
Object.defineProperty(exports, "Row", { enumerable: true, get: function () { return __importDefault(Row_1).default; } });
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const element_props_1 = __importDefault(require("@smart-react-components/core/element-props"));
|
|
7
|
-
const click_events_1 = __importDefault(require("@smart-react-components/core/element-props/click-events"));
|
|
8
|
-
const react_1 = __importDefault(require("react"));
|
|
9
|
-
const InputAddonElement_1 = __importDefault(require("./InputAddonElement"));
|
|
10
|
-
const InputAddon = (props) => (react_1.default.createElement(InputAddonElement_1.default, Object.assign({ addonPosition: props.position, hasBorder: props.hasBorder, inputSize: props.size, inputSizeSm: props.sizeSm, inputSizeMd: props.sizeMd, inputSizeLg: props.sizeLg, inputSizeXl: props.sizeXl, isDisabled: props.isDisabled, isFocused: props.isFocused, isOutline: props.isOutline, isSeparated: props.isSeparated, isSoft: props.isSoft, palette: props.palette, shape: props.shape }, (0, element_props_1.default)(props, [click_events_1.default])), props.children));
|
|
11
|
-
InputAddon.displayName = 'SRCAddon';
|
|
12
|
-
exports.default = InputAddon;
|
package/Pagination/index.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { default as PaginationItem } from './PaginationItem';
|
|
2
|
-
export { default as PaginationLink } from './PaginationLink';
|
|
3
|
-
export { default as PaginationList } from './PaginationList';
|
|
4
|
-
export { default as PaginationNextIcon } from './PaginationNextIcon';
|
|
5
|
-
export { default as PaginationPrevIcon } from './PaginationPrevIcon';
|
package/Pagination/index.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.PaginationPrevIcon = exports.PaginationNextIcon = exports.PaginationList = exports.PaginationLink = exports.PaginationItem = void 0;
|
|
7
|
-
var PaginationItem_1 = require("./PaginationItem");
|
|
8
|
-
Object.defineProperty(exports, "PaginationItem", { enumerable: true, get: function () { return __importDefault(PaginationItem_1).default; } });
|
|
9
|
-
var PaginationLink_1 = require("./PaginationLink");
|
|
10
|
-
Object.defineProperty(exports, "PaginationLink", { enumerable: true, get: function () { return __importDefault(PaginationLink_1).default; } });
|
|
11
|
-
var PaginationList_1 = require("./PaginationList");
|
|
12
|
-
Object.defineProperty(exports, "PaginationList", { enumerable: true, get: function () { return __importDefault(PaginationList_1).default; } });
|
|
13
|
-
var PaginationNextIcon_1 = require("./PaginationNextIcon");
|
|
14
|
-
Object.defineProperty(exports, "PaginationNextIcon", { enumerable: true, get: function () { return __importDefault(PaginationNextIcon_1).default; } });
|
|
15
|
-
var PaginationPrevIcon_1 = require("./PaginationPrevIcon");
|
|
16
|
-
Object.defineProperty(exports, "PaginationPrevIcon", { enumerable: true, get: function () { return __importDefault(PaginationPrevIcon_1).default; } });
|