@app-studio/web 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/components/Button/Button/Button.props.d.ts +1 -1
  2. package/dist/components/Form/TextField/TextField/TextField.props.d.ts +1 -1
  3. package/package.json +4 -4
  4. package/src/components/Button/Button/Button.props.ts +1 -1
  5. package/src/components/Button/Button/Button.view.tsx +3 -6
  6. package/src/components/Button/examples/DefaultButton.tsx +1 -1
  7. package/src/components/Button/examples/DisabledButton.tsx +1 -1
  8. package/src/components/Button/examples/LoadingButtons.tsx +5 -1
  9. package/src/components/Form/Checkbox/Checkbox/Checkbox.view.tsx +2 -2
  10. package/src/components/Form/Checkbox/examples/FormCheckout.tsx +1 -1
  11. package/src/components/Form/CountryPicker/CountryPicker/CountryPicker.view.tsx +3 -3
  12. package/src/components/Form/CountryPicker/examples/StylesInput.tsx +1 -3
  13. package/src/components/Form/DatePicker/DatePicker/DatePicker.view.tsx +1 -1
  14. package/src/components/Form/Label/Label/Label.style.ts +0 -1
  15. package/src/components/Form/Label/Label/Label.view.tsx +1 -1
  16. package/src/components/Form/Password/Password/Password.view.tsx +1 -1
  17. package/src/components/Form/Password/example/FormikErrorInput.tsx +7 -1
  18. package/src/components/Form/Select/Select/Select.view.tsx +5 -10
  19. package/src/components/Form/Switch/examples/StylesInput.tsx +1 -3
  20. package/src/components/Form/TextArea/TextArea/TextArea.view.tsx +1 -1
  21. package/src/components/Form/TextArea/examples/StylesInput.tsx +1 -3
  22. package/src/components/Form/TextField/TextField/TextField.props.ts +1 -1
  23. package/src/components/Form/TextField/TextField/TextField.view.tsx +2 -2
  24. package/src/components/Form/TextField/examples/StylesInput.tsx +1 -3
  25. package/src/components/Layout/Input/FieldContent/FieldContent.tsx +1 -1
  26. package/src/components/Layout/Input/FieldLayout/FieldLayout.tsx +1 -1
  27. package/src/components/Layout/View/View.tsx +1 -1
  28. package/src/components/Modal/Examples/BlurModal.tsx +2 -2
  29. package/src/components/Modal/Examples/CloseButtonModal.tsx +4 -4
  30. package/src/components/Modal/Examples/DefaultModal.tsx +2 -2
  31. package/src/components/Modal/Examples/FullScreenModal.tsx +2 -2
  32. package/src/components/Modal/Examples/ModalPosition.tsx +5 -5
  33. package/src/components/Modal/Examples/PreventCloseModal.tsx +2 -2
  34. package/src/components/Modal/Examples/ScrollModal.tsx +2 -2
  35. package/src/components/Modal/Examples/ShadowModal.tsx +1 -1
  36. package/src/components/Modal/Examples/VariantModal.tsx +2 -2
  37. package/src/components/Modal/Modal/Modal.view.tsx +4 -4
  38. package/src/components/Modal/Modal.md +31 -31
  39. package/src/components/Text/Text/Text.view.tsx +1 -1
  40. package/src/components/Wrapper.tsx +1 -1
  41. package/src/components/index.tsx +1 -1
@@ -49,7 +49,7 @@ export interface ButtonProps {
49
49
  /**
50
50
  * The event handler called when the button is clicked or pressed.
51
51
  */
52
- onPress?: Function;
52
+ onClick?: Function;
53
53
  /**
54
54
  * Specifies the size of the button's text and padding.
55
55
  */
@@ -70,7 +70,7 @@ export interface TextFieldProps {
70
70
  /**
71
71
  * Event called when the input field is clicked/pressed.
72
72
  */
73
- onPress?: () => void;
73
+ onClick?: () => void;
74
74
  /**
75
75
  * Callback function called when the text input receives focus.
76
76
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@app-studio/web",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
6
6
  "files": [
@@ -141,13 +141,13 @@
141
141
  },
142
142
  "size-limit": [
143
143
  {
144
- "path": "dist/app-studio-web.esm.cjs.production.min.js",
144
+ "path": "dist/web.esm.cjs.production.min.js",
145
145
  "limit": "10 KB"
146
146
  },
147
147
  {
148
- "path": "dist/app-studio-web.esm.esm.js",
148
+ "path": "dist/web.esm.esm.js",
149
149
  "limit": "10 KB"
150
150
  }
151
151
  ],
152
- "module": "dist/app-studio-web.esm.js"
152
+ "module": "dist/web.esm.js"
153
153
  }
@@ -51,7 +51,7 @@ export interface ButtonProps {
51
51
  /**
52
52
  * The event handler called when the button is clicked or pressed.
53
53
  */
54
- onPress?: Function;
54
+ onClick?: Function;
55
55
  /**
56
56
  * Specifies the size of the button's text and padding.
57
57
  */
@@ -1,5 +1,5 @@
1
1
  import React, { CSSProperties } from 'react';
2
- import { Element, useTheme } from 'app-studio';
2
+ import { Element } from 'app-studio';
3
3
  import { Link } from 'src/components';
4
4
 
5
5
  import { ButtonProps } from './Button.props';
@@ -22,11 +22,10 @@ const ButtonView: React.FC<ButtonProps> = ({
22
22
  iconPosition = 'left',
23
23
  colorScheme = 'theme.primary',
24
24
  shape = 'rounded',
25
- onPress = () => {},
25
+ onClick = () => {},
26
26
  ...props
27
27
  }) => {
28
28
  const isActive = !(isDisabled || isLoading);
29
- const {getColor} = useTheme()
30
29
 
31
30
  const defaultNativeProps = { disabled: !isActive };
32
31
 
@@ -77,8 +76,6 @@ const ButtonView: React.FC<ButtonProps> = ({
77
76
  </>
78
77
  );
79
78
 
80
- console.log({buttonColor, r: getColor(buttonColor)})
81
-
82
79
  return (
83
80
  <Element
84
81
  gap={8}
@@ -92,7 +89,7 @@ const ButtonView: React.FC<ButtonProps> = ({
92
89
  ariaLabel={ariaLabel}
93
90
  backgroundColor={buttonColor}
94
91
  borderRadius={ButtonShapes[shape]}
95
- onPress={props.onClick ?? onPress}
92
+ onClick={props.onClick ?? onClick}
96
93
  cursor={isActive ? 'pointer' : 'default'}
97
94
  {...defaultNativeProps} // set default native html button properties
98
95
  {...buttonSizeStyles} // set default width, paddings and fonts
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import { Button } from 'src/components';
3
3
 
4
- export const DefaultButton = () => <Button onPress={() => alert('Hello, World!')}>Default</Button>;
4
+ export const DefaultButton = () => <Button onClick={() => alert('Hello, World!')}>Default</Button>;
@@ -3,7 +3,7 @@ import { Button } from 'src/components';
3
3
 
4
4
  export const DisabledButton = () => (
5
5
  <Button
6
- onPress={() => {
6
+ onClick={() => {
7
7
  alert('Disabled');
8
8
  }}
9
9
  isDisabled
@@ -20,7 +20,11 @@ export const LoadingButtons = () => (
20
20
  </Loading>
21
21
  </Button>
22
22
  <Button isLoading isFilled>
23
- <Loading type="quarter" textPosition="right" styles={{ loader: { color: 'color.black' }, text: { color: 'color.black' } }}>
23
+ <Loading
24
+ type="quarter"
25
+ textPosition="right"
26
+ styles={{ loader: { color: 'color.black' }, text: { color: 'color.black' } }}
27
+ >
24
28
  Submitting
25
29
  </Loading>
26
30
  </Button>
@@ -75,8 +75,8 @@ const CheckboxView: React.FC<CheckboxViewProps> = ({
75
75
  return (
76
76
  <Label
77
77
  htmlFor={id}
78
- as="checkbox"
79
- onPress={handleChange}
78
+ as="div"
79
+ onClick={handleChange}
80
80
  onMouseEnter={handleHover}
81
81
  onMouseLeave={handleHover}
82
82
  size={Typography.fontSizes[size]}
@@ -37,7 +37,7 @@ export const FormCheckbox = () => {
37
37
  isChecked={isCarrotChecked}
38
38
  onChange={setIsCarrotChecked}
39
39
  />
40
- <Button type="submit" onPress={handleSubmit}>
40
+ <Button type="submit" onClick={handleSubmit}>
41
41
  Submit
42
42
  </Button>
43
43
  </Vertical>
@@ -1,5 +1,5 @@
1
1
  import React, { useEffect, useState } from 'react';
2
- import { Element,Input,Typography,useTheme } from 'app-studio';
2
+ import { Element, Input, Typography, useTheme } from 'app-studio';
3
3
  import { FieldContainer, FieldContent, FieldIcons, FieldLabel, FieldWrapper } from 'src/components/Layout/Input';
4
4
  import { ArrowDownSvg } from 'src/components/Svg/ArrowDown';
5
5
  import { ArrowUpSvg } from 'src/components/Svg/ArrowUp';
@@ -38,7 +38,7 @@ export const DropDownItem: React.FC<DropDownItemProps> = ({
38
38
  paddingHorizontal={12}
39
39
  onMouseEnter={handleHover}
40
40
  onMouseLeave={handleHover}
41
- onPress={handleOptionClick}
41
+ onClick={handleOptionClick}
42
42
  fontSize={Typography.fontSizes[size]}
43
43
  backgroundColor={isHovered ? 'trueGray.100' : 'transparent'}
44
44
  {...styles['text']}
@@ -177,7 +177,7 @@ const CountryPickerView: React.FC<CountryPickerViewProps> = ({
177
177
  };
178
178
 
179
179
  return (
180
- <FieldContainer helperText={helperText} error={error} styles={styles} onPress={handleClick}>
180
+ <FieldContainer helperText={helperText} error={error} styles={styles} onClick={handleClick}>
181
181
  <FieldContent
182
182
  label={label}
183
183
  size={size}
@@ -7,9 +7,7 @@ export const StyledCountryPicker = () => (
7
7
  name="colorScheme"
8
8
  colorScheme="theme.primary"
9
9
  styles={{
10
- box: { borderRadius: 10, borderColor: 'theme.primary',
11
- borderStyle: 'solid',
12
- borderWidth: 1, },
10
+ box: { borderRadius: 10, borderColor: 'theme.primary', borderStyle: 'solid', borderWidth: 1 },
13
11
  text: { color: 'theme.primary' },
14
12
  label: { fontWeight: 'bold', color: 'theme.primary' },
15
13
  dropDown: { color: 'theme.primary' },
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { Input,Typography } from 'app-studio';
2
+ import { Input, Typography } from 'app-studio';
3
3
  import { FieldContainer } from 'src/components/Layout/Input/FieldContainer/FieldContainer';
4
4
  import { FieldContent } from 'src/components/Layout/Input/FieldContent/FieldContent';
5
5
  import { FieldLabel } from 'src/components/Layout/Input/FieldLabel/FieldLabel';
@@ -1,4 +1,3 @@
1
-
2
1
  import { Headings } from './Label.type';
3
2
 
4
3
  export const HeadingSizes: Record<Headings, Record<string, number | string>> = {
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { Element,Typography } from 'app-studio';
2
+ import { Element, Typography } from 'app-studio';
3
3
 
4
4
  import { LabelProps } from './Label.props';
5
5
  import { HeadingSizes } from './Label.style';
@@ -17,7 +17,7 @@ const PasswordView: React.FC<PasswordViewProps> = ({
17
17
  type={isVisible ? 'text' : 'password'}
18
18
  rightChild={
19
19
  <View
20
- onPress={() => {
20
+ onClick={() => {
21
21
  if (!isDisabled) setIsVisible(!isVisible);
22
22
  }}
23
23
  >
@@ -39,7 +39,13 @@ export const FormikErrorPassword = () => {
39
39
  {({ errors, touched, isSubmitting }) => (
40
40
  <Form>
41
41
  <Vertical gap={10}>
42
- <Field as={TextField} name="name" label="Name" error={touched.name && errors.name} colorScheme="theme.secondary" />
42
+ <Field
43
+ as={TextField}
44
+ name="name"
45
+ label="Name"
46
+ error={touched.name && errors.name}
47
+ colorScheme="theme.secondary"
48
+ />
43
49
  <Field
44
50
  as={Password}
45
51
  name="password"
@@ -1,6 +1,6 @@
1
1
  import React, { useCallback } from 'react';
2
2
  import { Element } from 'app-studio';
3
- import {Typography} from 'app-studio';
3
+ import { Typography } from 'app-studio';
4
4
  import { Horizontal, Text } from 'src/components';
5
5
  import { FieldContainer } from 'src/components/Layout/Input/FieldContainer/FieldContainer';
6
6
  import { FieldContent } from 'src/components/Layout/Input/FieldContent/FieldContent';
@@ -34,7 +34,7 @@ const Item: React.FC<ItemProps> = ({ isHovered, setIsHovered, option, size = 'md
34
34
  onMouseEnter={handleHover}
35
35
  onMouseLeave={handleHover}
36
36
  fontSize={Typography.fontSizes[size]}
37
- onPress={() => handleOptionClick(option)}
37
+ onClick={() => handleOptionClick(option)}
38
38
  backgroundColor={isHovered ? 'trueGray.100' : 'transparent'}
39
39
  {...props}
40
40
  >
@@ -177,12 +177,7 @@ const DropDown: React.FC<DropDownProps> = ({ size, styles = { dropDown: {} }, op
177
177
  );
178
178
  };
179
179
 
180
- export const MultiSelect: React.FC<MultiSelectProps> = ({
181
- option,
182
- size = 'md',
183
- removeOption = () => {},
184
- ...props
185
- }) => {
180
+ export const MultiSelect: React.FC<MultiSelectProps> = ({ option, size = 'md', removeOption = () => {}, ...props }) => {
186
181
  const handleClick = () => removeOption(option);
187
182
 
188
183
  return (
@@ -193,7 +188,7 @@ export const MultiSelect: React.FC<MultiSelectProps> = ({
193
188
  alignItems="center"
194
189
  fontSize={Typography.fontSizes[size]}
195
190
  backgroundColor="trueGray.300"
196
- onPress={(event: any) => event.stopPropagation()}
191
+ onClick={(event: any) => event.stopPropagation()}
197
192
  {...props}
198
193
  >
199
194
  <Text size={size}>{option}</Text>
@@ -274,7 +269,7 @@ const SelectView: React.FC<SelectViewProps> = ({
274
269
  helperText={helperText}
275
270
  error={error}
276
271
  styles={styles}
277
- onPress={isDisabled || isReadOnly ? () => {} : handleClick}
272
+ onClick={isDisabled || isReadOnly ? () => {} : handleClick}
278
273
  >
279
274
  <FieldContent
280
275
  label={label}
@@ -19,9 +19,7 @@ export const StyledSwitch = () => {
19
19
  variant="unStyled"
20
20
  shadow={{ boxShadow: 'rgba(0, 0, 0, 0.20) 0px 3px 8px' }}
21
21
  styles={{
22
- slider: { borderRadius: 8, borderColor: 'theme.primary',
23
- borderStyle: 'solid',
24
- borderWidth: 1, },
22
+ slider: { borderRadius: 8, borderColor: 'theme.primary', borderStyle: 'solid', borderWidth: 1 },
25
23
  circle: { backgroundColor: 'theme.primary' },
26
24
  }}
27
25
  />
@@ -1,5 +1,5 @@
1
1
  import React, { useMemo } from 'react';
2
- import { Element,Typography } from 'app-studio';
2
+ import { Element, Typography } from 'app-studio';
3
3
  import { FieldContainer, FieldContent, FieldLabel, FieldWrapper } from 'src/components/Layout/Input';
4
4
 
5
5
  import { TextAreaViewProps } from './TextArea.props';
@@ -18,9 +18,7 @@ export const StyledArea = () => {
18
18
  label="Surname"
19
19
  variant="unStyled"
20
20
  styles={{
21
- box: { borderRadius: 8, padding: 5, borderColor: 'theme.primary',
22
- borderStyle: 'solid',
23
- borderWidth: 1, },
21
+ box: { borderRadius: 8, padding: 5, borderColor: 'theme.primary', borderStyle: 'solid', borderWidth: 1 },
24
22
  field: { color: 'theme.primary', padding: 0 },
25
23
  label: { color: 'theme.primary' },
26
24
  }}
@@ -72,7 +72,7 @@ export interface TextFieldProps {
72
72
  /**
73
73
  * Event called when the input field is clicked/pressed.
74
74
  */
75
- onPress?: () => void;
75
+ onClick?: () => void;
76
76
  /**
77
77
  * Callback function called when the text input receives focus.
78
78
  */
@@ -1,5 +1,5 @@
1
1
  import React, { useMemo } from 'react';
2
- import { Input,Typography,useTheme } from 'app-studio';
2
+ import { Input, Typography, useTheme } from 'app-studio';
3
3
  import { FieldContainer } from 'src/components/Layout/Input/FieldContainer/FieldContainer';
4
4
  import { FieldContent } from 'src/components/Layout/Input/FieldContent/FieldContent';
5
5
  import { FieldIcons } from 'src/components/Layout/Input/FieldIcons/FieldIcons';
@@ -41,7 +41,7 @@ const TextFieldView: React.FC<TextFieldViewProps> = ({
41
41
  setIsFocused = () => {},
42
42
  setIsHovered = () => {},
43
43
  setInputValue = () => {},
44
- onPress = () => {},
44
+ onClick = () => {},
45
45
  onFocus,
46
46
  onBlur = () => {},
47
47
  ...props
@@ -19,9 +19,7 @@ export const StyledInput = () => {
19
19
  variant="unStyled"
20
20
  shadow={{ boxShadow: 'rgba(0, 0, 0, 0.20) 0px 3px 8px' }}
21
21
  styles={{
22
- box: { borderRadius: 8, borderColor: 'theme.primary',
23
- borderStyle: 'solid',
24
- borderWidth: 1, },
22
+ box: { borderRadius: 8, borderColor: 'theme.primary', borderStyle: 'solid', borderWidth: 1 },
25
23
  text: { color: 'theme.primary' },
26
24
  label: { color: 'theme.primary' },
27
25
  }}
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import {Typography} from 'app-studio';
2
+ import { Typography } from 'app-studio';
3
3
 
4
4
  import { InputVariants, PadddingWithLabel, PaddingWithoutLabel, Shapes } from '../../configs/Input.style';
5
5
  import { Horizontal } from '../../Horizontal/Horizontal';
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import {Typography} from 'app-studio';
2
+ import { Typography } from 'app-studio';
3
3
 
4
4
  import { Vertical } from '../../Vertical/Vertical';
5
5
 
@@ -1,2 +1,2 @@
1
1
  export type { ViewProps } from 'app-studio';
2
- export { View } from 'app-studio';
2
+ export { View } from 'app-studio';
@@ -8,7 +8,7 @@ export const BlurModal = () => {
8
8
  const [show, setShow] = useState(false);
9
9
  return (
10
10
  <>
11
- <Button onPress={() => setShow(true)} isAuto>
11
+ <Button onClick={() => setShow(true)} isAuto>
12
12
  Blur Overlay
13
13
  </Button>
14
14
 
@@ -28,7 +28,7 @@ export const BlurModal = () => {
28
28
  </Text>
29
29
  </Modal.Body>
30
30
  <Modal.Footer>
31
- <Button onPress={() => setShow(false)}>Cancel</Button>
31
+ <Button onClick={() => setShow(false)}>Cancel</Button>
32
32
  </Modal.Footer>
33
33
  </Modal.Container>
34
34
  </Modal.Overlay>
@@ -10,10 +10,10 @@ export const CloseButtonModal = () => {
10
10
  return (
11
11
  <>
12
12
  <Horizontal gap={10}>
13
- <Button onPress={() => setShowWith(true)} isAuto>
13
+ <Button onClick={() => setShowWith(true)} isAuto>
14
14
  With Close Button
15
15
  </Button>
16
- <Button onPress={() => setShowWithout(true)} isAuto>
16
+ <Button onClick={() => setShowWithout(true)} isAuto>
17
17
  Without Close Button
18
18
  </Button>
19
19
  </Horizontal>
@@ -23,7 +23,7 @@ export const CloseButtonModal = () => {
23
23
  <Modal.Header buttonPosition="left" />
24
24
  <Modal.Body>Cras mattis consectetur purus sit amet fermentum.</Modal.Body>
25
25
  <Modal.Footer>
26
- <Button onPress={() => setShowWith(false)}>Cancel</Button>
26
+ <Button onClick={() => setShowWith(false)}>Cancel</Button>
27
27
  </Modal.Footer>
28
28
  </Modal.Container>
29
29
  </Modal.Overlay>
@@ -34,7 +34,7 @@ export const CloseButtonModal = () => {
34
34
  <Modal.Header buttonPosition="none">Without Close Button</Modal.Header>
35
35
  <Modal.Body>Cras mattis consectetur purus sit amet fermentum.</Modal.Body>
36
36
  <Modal.Footer>
37
- <Button onPress={() => setShowWithout(false)}>Cancel</Button>
37
+ <Button onClick={() => setShowWithout(false)}>Cancel</Button>
38
38
  </Modal.Footer>
39
39
  </Modal.Container>
40
40
  </Modal.Overlay>
@@ -8,7 +8,7 @@ export const DefaultModal = () => {
8
8
 
9
9
  return (
10
10
  <>
11
- <Button onPress={() => setShow(true)} isAuto>
11
+ <Button onClick={() => setShow(true)} isAuto>
12
12
  Blur Overlay
13
13
  </Button>
14
14
 
@@ -28,7 +28,7 @@ export const DefaultModal = () => {
28
28
  </Text>
29
29
  </Modal.Body>
30
30
  <Modal.Footer>
31
- <Button onPress={() => setShow(false)}>Cancel</Button>
31
+ <Button onClick={() => setShow(false)}>Cancel</Button>
32
32
  </Modal.Footer>
33
33
  </Modal.Container>
34
34
  </Modal.Overlay>
@@ -7,7 +7,7 @@ export const FullScreenModal = () => {
7
7
  const [show, setShow] = useState(false);
8
8
  return (
9
9
  <>
10
- <Button onPress={() => setShow(true)} isAuto>
10
+ <Button onClick={() => setShow(true)} isAuto>
11
11
  Full Screen
12
12
  </Button>
13
13
  <Modal.Overlay isOpen={show} onClose={() => setShow(false)}>
@@ -19,7 +19,7 @@ export const FullScreenModal = () => {
19
19
  scelerisque nisl consectetur et.
20
20
  </Modal.Body>
21
21
  <Modal.Footer>
22
- <Button onPress={() => setShow(false)}>Cancel</Button>
22
+ <Button onClick={() => setShow(false)}>Cancel</Button>
23
23
  </Modal.Footer>
24
24
  </Modal.Container>
25
25
  </Modal.Overlay>
@@ -23,11 +23,11 @@ export const ModalPosition = () => {
23
23
  return (
24
24
  <>
25
25
  <Horizontal gap={10} wrap="nowrap">
26
- <Button onPress={() => setShowTop(true)}>Top</Button>
27
- <Button onPress={() => setShowBottom(true)}>Bottom</Button>
28
- <Button onPress={() => setShowRight(true)}>Right</Button>
29
- <Button onPress={() => setShowLeft(true)}>Left</Button>
30
- <Button onPress={() => setShowCenter(true)}>Center</Button>
26
+ <Button onClick={() => setShowTop(true)}>Top</Button>
27
+ <Button onClick={() => setShowBottom(true)}>Bottom</Button>
28
+ <Button onClick={() => setShowRight(true)}>Right</Button>
29
+ <Button onClick={() => setShowLeft(true)}>Left</Button>
30
+ <Button onClick={() => setShowCenter(true)}>Center</Button>
31
31
  </Horizontal>
32
32
 
33
33
  {showTop && (
@@ -7,7 +7,7 @@ export const PreventClose = () => {
7
7
  const [prevent, setPrevent] = useState(false);
8
8
  return (
9
9
  <>
10
- <Button onPress={() => setPrevent(true)} isAuto>
10
+ <Button onClick={() => setPrevent(true)} isAuto>
11
11
  Prevent Close Button on Overlay
12
12
  </Button>
13
13
 
@@ -17,7 +17,7 @@ export const PreventClose = () => {
17
17
  <Modal.Header> Prevent Close Button on Overlay</Modal.Header>
18
18
  <Modal.Body>Cras mattis consectetur purus sit amet fermentum.</Modal.Body>
19
19
  <Modal.Footer>
20
- <Button onPress={() => setPrevent(false)}>Cancel</Button>
20
+ <Button onClick={() => setPrevent(false)}>Cancel</Button>
21
21
  </Modal.Footer>
22
22
  </Modal.Container>
23
23
  </Modal.Overlay>
@@ -7,7 +7,7 @@ export const ScrollModal = () => {
7
7
  const [show, setShow] = useState(false);
8
8
  return (
9
9
  <>
10
- <Button onPress={() => setShow(true)} isAuto>
10
+ <Button onClick={() => setShow(true)} isAuto>
11
11
  Scroll
12
12
  </Button>
13
13
  {show && (
@@ -31,7 +31,7 @@ export const ScrollModal = () => {
31
31
  fermentum.
32
32
  </Modal.Body>
33
33
  <Modal.Footer>
34
- <Button onPress={() => setShow(false)}>Cancel</Button>
34
+ <Button onClick={() => setShow(false)}>Cancel</Button>
35
35
  </Modal.Footer>
36
36
  </Modal.Container>
37
37
  </Modal.Overlay>
@@ -7,7 +7,7 @@ export const ShadowModal = () => {
7
7
  const [show, setShow] = useState(false);
8
8
  return (
9
9
  <>
10
- <Button onPress={() => setShow(true)} isAuto>
10
+ <Button onClick={() => setShow(true)} isAuto>
11
11
  Shadow
12
12
  </Button>
13
13
 
@@ -9,10 +9,10 @@ export const VariantModal = () => {
9
9
  return (
10
10
  <>
11
11
  <Horizontal gap={10}>
12
- <Button onPress={() => setShowSharp(true)} isAuto>
12
+ <Button onClick={() => setShowSharp(true)} isAuto>
13
13
  Sharp
14
14
  </Button>
15
- <Button onPress={() => setShowRounded(true)} isAuto>
15
+ <Button onClick={() => setShowRounded(true)} isAuto>
16
16
  Rounded
17
17
  </Button>
18
18
  </Horizontal>
@@ -41,7 +41,7 @@ export const ModalOverlay: React.FC<OverlayProps> = ({
41
41
  width="100%"
42
42
  height="100%"
43
43
  zIndex={1000}
44
- onPress={handleClick}
44
+ onClick={handleClick}
45
45
  visibility={isOpen ? 'visible' : 'hidden'}
46
46
  >
47
47
  <View
@@ -55,7 +55,7 @@ export const ModalOverlay: React.FC<OverlayProps> = ({
55
55
  display="flex"
56
56
  backgroundColor="blackAlpha.500"
57
57
  backdropFilter={blur ? `blur(${blur}px)` : undefined}
58
- onPress={handleClick}
58
+ onClick={handleClick}
59
59
  {...OverlayAlignments[position]}
60
60
  {...props}
61
61
  >
@@ -93,7 +93,7 @@ export const ModalContainer: React.FC<ContainerProps> = ({
93
93
  backgroundColor="white"
94
94
  width={isFullScreen ? '100%' : 600}
95
95
  height={isFullScreen ? '100%' : 'fit-content'}
96
- onPress={handleClick}
96
+ onClick={handleClick}
97
97
  {...(shadow ? shadow : defaultShadow)}
98
98
  {...ContainerShapes[shape]}
99
99
  {...props}
@@ -114,7 +114,7 @@ export const ModalHeader: React.FC<HeaderProps> = ({
114
114
 
115
115
  const buttonIcon = (
116
116
  <Button
117
- onPress={onClose}
117
+ onClick={onClose}
118
118
  colorScheme="transparent"
119
119
  icon={<CloseSvg size={HeaderIconSizes[iconSize]} color={buttonColor} />}
120
120
  padding={0}
@@ -15,7 +15,7 @@ import { useState } from 'react';
15
15
  const [show, setShow] = useState(false);
16
16
 
17
17
  <>
18
- <Button onPress={() => setShow(true)} isAuto>
18
+ <Button onClick={() => setShow(true)} isAuto>
19
19
  Open Modal
20
20
  </Button>
21
21
  <Modal.Overlay isOpen={show} onClose={() => setShow(false)}>
@@ -27,7 +27,7 @@ const [show, setShow] = useState(false);
27
27
  nisl consectetur et.
28
28
  </Modal.Body>
29
29
  <Modal.Footer>
30
- <Button onPress={() => setShow(false)}>Cancel</Button>
30
+ <Button onClick={() => setShow(false)}>Cancel</Button>
31
31
  </Modal.Footer>
32
32
  </Modal.Container>
33
33
  </Modal.Overlay>
@@ -49,7 +49,7 @@ import { useState } from 'react';
49
49
  const [show, setShow] = useState(false);
50
50
 
51
51
  <>
52
- <Button onPress={() => setShow(true)} isAuto>
52
+ <Button onClick={() => setShow(true)} isAuto>
53
53
  Full Screen
54
54
  </Button>
55
55
  <Modal.Overlay isOpen={show} onClose={() => setShow(false)}>
@@ -61,7 +61,7 @@ const [show, setShow] = useState(false);
61
61
  nisl consectetur et.
62
62
  </Modal.Body>
63
63
  <Modal.Footer>
64
- <Button onPress={() => setShow(false)}>Cancel</Button>
64
+ <Button onClick={() => setShow(false)}>Cancel</Button>
65
65
  </Modal.Footer>
66
66
  </Modal.Container>
67
67
  </Modal.Overlay>
@@ -85,11 +85,11 @@ const [showCenter, setShowCenter] = useState(false);
85
85
 
86
86
  <>
87
87
  <Horizontal gap={10} wrap="nowrap">
88
- <Button onPress={() => setShowTop(true)}>Top</Button>
89
- <Button onPress={() => setShowBottom(true)}>Bottom</Button>
90
- <Button onPress={() => setShowRight(true)}>Right</Button>
91
- <Button onPress={() => setShowLeft(true)}>Left</Button>
92
- <Button onPress={() => setShowCenter(true)}>Center</Button>
88
+ <Button onClick={() => setShowTop(true)}>Top</Button>
89
+ <Button onClick={() => setShowBottom(true)}>Bottom</Button>
90
+ <Button onClick={() => setShowRight(true)}>Right</Button>
91
+ <Button onClick={() => setShowLeft(true)}>Left</Button>
92
+ <Button onClick={() => setShowCenter(true)}>Center</Button>
93
93
  </Horizontal>
94
94
 
95
95
  {showBottom && (
@@ -102,7 +102,7 @@ const [showCenter, setShowCenter] = useState(false);
102
102
  nisl consectetur et.
103
103
  </Modal.Body>
104
104
  <Modal.Footer>
105
- <Button onPress={() => setShowBottom(false)}>Cancel</Button>
105
+ <Button onClick={() => setShowBottom(false)}>Cancel</Button>
106
106
  </Modal.Footer>
107
107
  </Modal.Container>
108
108
  </Modal.Overlay>
@@ -117,7 +117,7 @@ const [showCenter, setShowCenter] = useState(false);
117
117
  nisl consectetur et.
118
118
  </Modal.Body>
119
119
  <Modal.Footer>
120
- <Button onPress={() => setShowTop(false)}>Cancel</Button>
120
+ <Button onClick={() => setShowTop(false)}>Cancel</Button>
121
121
  </Modal.Footer>
122
122
  </Modal.Container>
123
123
  </Modal.Overlay>
@@ -132,7 +132,7 @@ const [showCenter, setShowCenter] = useState(false);
132
132
  nisl consectetur et.
133
133
  </Modal.Body>
134
134
  <Modal.Footer>
135
- <Button onPress={() => setShowLeft(false)}>Cancel</Button>
135
+ <Button onClick={() => setShowLeft(false)}>Cancel</Button>
136
136
  </Modal.Footer>
137
137
  </Modal.Container>
138
138
  </Modal.Overlay>
@@ -147,7 +147,7 @@ const [showCenter, setShowCenter] = useState(false);
147
147
  nisl consectetur et.
148
148
  </Modal.Body>
149
149
  <Modal.Footer>
150
- <Button onPress={() => setShowRight(false)}>Cancel</Button>
150
+ <Button onClick={() => setShowRight(false)}>Cancel</Button>
151
151
  </Modal.Footer>
152
152
  </Modal.Container>
153
153
  </Modal.Overlay>
@@ -162,7 +162,7 @@ const [showCenter, setShowCenter] = useState(false);
162
162
  nisl consectetur et.
163
163
  </Modal.Body>
164
164
  <Modal.Footer>
165
- <Button onPress={() => setShowCenter(false)}>Cancel</Button>
165
+ <Button onClick={() => setShowCenter(false)}>Cancel</Button>
166
166
  </Modal.Footer>
167
167
  </Modal.Container>
168
168
  </Modal.Overlay>
@@ -181,7 +181,7 @@ import { Button } from '../Button/Button';
181
181
  const [show, setShow] = useState(false);
182
182
 
183
183
  <>
184
- <Button onPress={() => setShow(true)}>Blur Overlay</Button>
184
+ <Button onClick={() => setShow(true)}>Blur Overlay</Button>
185
185
  <Modal.Overlay isOpen={show} onClose={() => setShow(false)} blur={10}>
186
186
  <Modal.Container>
187
187
  <Modal.Header>Title</Modal.Header>
@@ -191,7 +191,7 @@ const [show, setShow] = useState(false);
191
191
  nisl consectetur et.
192
192
  </Modal.Body>
193
193
  <Modal.Footer>
194
- <Button onPress={() => setShow(false)}>Cancel</Button>
194
+ <Button onClick={() => setShow(false)}>Cancel</Button>
195
195
  </Modal.Footer>
196
196
  </Modal.Container>
197
197
  </Modal.Overlay>
@@ -209,7 +209,7 @@ import { Button } from '../Button/Button';
209
209
  const [show, setShow] = useState(false);
210
210
 
211
211
  <>
212
- <Button onPress={() => setShow(true)} isAuto>
212
+ <Button onClick={() => setShow(true)} isAuto>
213
213
  Prevent Close on Overlay
214
214
  </Button>
215
215
  <Modal.Overlay isOpen={show} onClose={() => setShow(false)} isClosePrevented>
@@ -221,7 +221,7 @@ const [show, setShow] = useState(false);
221
221
  nisl consectetur et.
222
222
  </Modal.Body>
223
223
  <Modal.Footer>
224
- <Button onPress={() => setShow(false)}>Cancel</Button>
224
+ <Button onClick={() => setShow(false)}>Cancel</Button>
225
225
  </Modal.Footer>
226
226
  </Modal.Container>
227
227
  </Modal.Overlay>
@@ -247,8 +247,8 @@ const [showRounded, setShowRounded] = useState(false);
247
247
 
248
248
  <>
249
249
  <Horizontal gap={10}>
250
- <Button onPress={() => setShowSharp(true)}>Sharp</Button>
251
- <Button onPress={() => setShowRounded(true)}>Rounded</Button>
250
+ <Button onClick={() => setShowSharp(true)}>Sharp</Button>
251
+ <Button onClick={() => setShowRounded(true)}>Rounded</Button>
252
252
  </Horizontal>
253
253
 
254
254
  {showSharp && (
@@ -292,7 +292,7 @@ import { Text } from '../Text/Text';
292
292
  const [show, setShow] = useState(false);
293
293
 
294
294
  <>
295
- <Button onPress={() => setShow(true)}>Shadow</Button>
295
+ <Button onClick={() => setShow(true)}>Shadow</Button>
296
296
 
297
297
  {show && (
298
298
  <Modal.Overlay isOpen={show} onClose={() => setShow(false)}>
@@ -329,13 +329,13 @@ const [showLeft, setShowLeft] = useState(false);
329
329
 
330
330
  <>
331
331
  <Horizontal gap={10}>
332
- <Button onPress={() => setShowRight(true)} isAuto>
332
+ <Button onClick={() => setShowRight(true)} isAuto>
333
333
  Close button on the right
334
334
  </Button>
335
- <Button onPress={() => setShowWithout(true)} isAuto>
335
+ <Button onClick={() => setShowWithout(true)} isAuto>
336
336
  Without Close Button
337
337
  </Button>
338
- <Button onPress={() => setShowLeft(true)} isAuto>
338
+ <Button onClick={() => setShowLeft(true)} isAuto>
339
339
  Without Close left
340
340
  </Button>
341
341
  </Horizontal>
@@ -345,7 +345,7 @@ const [showLeft, setShowLeft] = useState(false);
345
345
  <Modal.Header> Close Button</Modal.Header>
346
346
  <Modal.Body>Cras mattis consectetur purus sit amet fermentum.</Modal.Body>
347
347
  <Modal.Footer>
348
- <Button onPress={() => setShowRight(false)}>Cancel</Button>
348
+ <Button onClick={() => setShowRight(false)}>Cancel</Button>
349
349
  </Modal.Footer>
350
350
  </Modal.Container>
351
351
  </Modal.Overlay>
@@ -356,7 +356,7 @@ const [showLeft, setShowLeft] = useState(false);
356
356
  <Modal.Header buttonPosition="none"> Close Button</Modal.Header>
357
357
  <Modal.Body>Cras mattis consectetur purus sit amet fermentum.</Modal.Body>
358
358
  <Modal.Footer>
359
- <Button onPress={() => setShowWithout(false)}>Cancel</Button>
359
+ <Button onClick={() => setShowWithout(false)}>Cancel</Button>
360
360
  </Modal.Footer>
361
361
  </Modal.Container>
362
362
  </Modal.Overlay>
@@ -367,7 +367,7 @@ const [showLeft, setShowLeft] = useState(false);
367
367
  <Modal.Header buttonPosition="left">Close Button</Modal.Header>
368
368
  <Modal.Body>Cras mattis consectetur purus sit amet fermentum.</Modal.Body>
369
369
  <Modal.Footer>
370
- <Button onPress={() => setShowLeft(false)}>Cancel</Button>
370
+ <Button onClick={() => setShowLeft(false)}>Cancel</Button>
371
371
  </Modal.Footer>
372
372
  </Modal.Container>
373
373
  </Modal.Overlay>
@@ -391,7 +391,7 @@ import { Text } from '../Text/Text';
391
391
  const [show, setShow] = useState(false);
392
392
 
393
393
  <>
394
- <Button onPress={() => setShow(true)}>Scroll</Button>
394
+ <Button onClick={() => setShow(true)}>Scroll</Button>
395
395
  {show && (
396
396
  <Modal.Overlay isOpen={show} onClose={() => setShow(false)}>
397
397
  <Modal.Container>
@@ -412,7 +412,7 @@ const [show, setShow] = useState(false);
412
412
  fermentum.Cras mattis consectetur purus sit amet fermentum.
413
413
  </Modal.Body>
414
414
  <Modal.Footer>
415
- <Button onPress={() => setShow(false)}>Cancel</Button>
415
+ <Button onClick={() => setShow(false)}>Cancel</Button>
416
416
  </Modal.Footer>
417
417
  </Modal.Container>
418
418
  </Modal.Overlay>
@@ -432,7 +432,7 @@ import { Text } from '../Text/Text';
432
432
  const [show, setShow] = useState(false);
433
433
 
434
434
  <>
435
- <Button onPress={() => setShow(true)}>Footer</Button>
435
+ <Button onClick={() => setShow(true)}>Footer</Button>
436
436
  {show && (
437
437
  <Modal.Overlay isOpen={show} onClose={() => setShow(false)}>
438
438
  <Modal.Container>
@@ -447,7 +447,7 @@ const [show, setShow] = useState(false);
447
447
  purus sit amet fermentum.
448
448
  </Modal.Body>
449
449
  <Modal.Footer>
450
- <Button onPress={() => setShow(false)}>Cancel</Button>
450
+ <Button onClick={() => setShow(false)}>Cancel</Button>
451
451
  </Modal.Footer>
452
452
  </Modal.Container>
453
453
  </Modal.Overlay>
@@ -1,5 +1,5 @@
1
1
  import React, { useEffect, useRef, useState } from 'react';
2
- import { Element,Typography } from 'app-studio';
2
+ import { Element, Typography } from 'app-studio';
3
3
 
4
4
  import { ContentProps, TextProps, TruncateTextProps } from './Text.props';
5
5
  import { HeadingSizes } from './Text.style';
@@ -1,5 +1,5 @@
1
1
  import React, { ReactNode } from 'react';
2
- import { ResponsiveProvider,ThemeProvider } from 'app-studio';
2
+ import { ResponsiveProvider, ThemeProvider } from 'app-studio';
3
3
  import { RouterProvider } from 'src/providers/Router';
4
4
 
5
5
  interface WrapperProps {
@@ -15,4 +15,4 @@ export * from 'src/components/Layout/View/View';
15
15
  export * from 'src/components/Link/Link';
16
16
  export * from 'src/components/Loader/Loader';
17
17
  export * from 'src/components/Modal/Modal';
18
- export * from 'src/components/Text/Text';
18
+ export * from 'src/components/Text/Text';