@pismo/marola 1.1.5 → 1.1.7

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.
@@ -11,6 +11,7 @@ declare const meta: {
11
11
  export default meta;
12
12
  type Story = StoryObj<typeof meta>;
13
13
  export declare const Simple: Story;
14
+ export declare const SimpleNumberAsText: Story;
14
15
  export declare const WithLabel: Story;
15
16
  export declare const WithRequiredLabel: Story;
16
17
  export declare const WithPlaceholder: Story;
@@ -12,7 +12,10 @@ export declare const InputSearch: import('react').ForwardRefExoticComponent<(Omi
12
12
  multiline?: false | undefined;
13
13
  leftIcon?: import('react').ReactNode;
14
14
  rightIcon?: import('react').ReactNode;
15
- type?: ("number" | "url" | "file" | "color" | "search" | (string & {}) | "button" | "time" | "image" | "text" | "reset" | "tel" | "email" | "date" | "hidden" | "range" | "datetime-local" | "month" | "password" | "week") | undefined;
15
+ type?: ("number" | "url" | "file" | "color" | "search" | (string & {}) | "button" | "time" | "image" | "text" | "reset" | "tel" | "email" | "date" | "hidden" | "range" | "datetime-local" | "month" | "password" | "week") | "number-as-text" | undefined;
16
+ isInteger?: boolean | undefined;
17
+ useCommaInDecimal?: boolean | undefined;
18
+ allowNegativeNumbers?: boolean | undefined;
16
19
  decimalLength?: number | undefined;
17
20
  hideCharsCounter?: boolean | undefined;
18
21
  classNameWrapper?: string | undefined;
@@ -13,7 +13,10 @@ declare const meta: {
13
13
  multiline?: false | undefined;
14
14
  leftIcon?: import('react').ReactNode;
15
15
  rightIcon?: import('react').ReactNode;
16
- type?: ("number" | "url" | "file" | "color" | "search" | (string & {}) | "button" | "time" | "image" | "text" | "reset" | "tel" | "email" | "date" | "hidden" | "range" | "datetime-local" | "month" | "password" | "week") | undefined;
16
+ type?: ("number" | "url" | "file" | "color" | "search" | (string & {}) | "button" | "time" | "image" | "text" | "reset" | "tel" | "email" | "date" | "hidden" | "range" | "datetime-local" | "month" | "password" | "week") | "number-as-text" | undefined;
17
+ isInteger?: boolean | undefined;
18
+ useCommaInDecimal?: boolean | undefined;
19
+ allowNegativeNumbers?: boolean | undefined;
17
20
  decimalLength?: number | undefined;
18
21
  hideCharsCounter?: boolean | undefined;
19
22
  classNameWrapper?: string | undefined;
package/dist/main.d.ts CHANGED
@@ -7,6 +7,7 @@ export * from './components/Advice/Advice';
7
7
  export * from './components/Alert/Alert';
8
8
  export * from './components/Autocomplete/Autocomplete';
9
9
  export * from './components/Avatar/Avatar';
10
+ export * from './components/Badge/Badge';
10
11
  export * from './components/BankCard/BankCard';
11
12
  export * from './components/Button/Button';
12
13
  export * from './components/Calendar/Calendar';
package/dist/main.js CHANGED
@@ -3,107 +3,109 @@ import { Advice as p } from "./components/Advice/Advice.js";
3
3
  import { Alert as f } from "./components/Alert/Alert.js";
4
4
  import { Autocomplete as m } from "./components/Autocomplete/Autocomplete.js";
5
5
  import { Avatar as l } from "./components/Avatar/Avatar.js";
6
- import { BankCard as T } from "./components/BankCard/BankCard.js";
7
- import { Button as c } from "./components/Button/Button.js";
8
- import { Calendar as u } from "./components/Calendar/Calendar.js";
9
- import { Checkbox as d } from "./components/Checkbox/Checkbox.js";
10
- import { C as b, R as k, T as h } from "./Toggle-BuZjueQ7.js";
11
- import { ConfirmationDialog as A } from "./components/ConfirmationDialog/ConfirmationDialog.js";
12
- import { Description as v } from "./components/Description/Description.js";
13
- import { Dialog as P } from "./components/Dialog/Dialog.js";
14
- import { EllipsisTooltip as y } from "./components/EllipsisTooltip/EllipsisTooltip.js";
15
- import { Icon as w } from "./components/Icon/Icon.js";
16
- import { IconButton as E } from "./components/IconButton/IconButton.js";
17
- import { Input as N } from "./components/Input/Input.js";
18
- import { InputSearch as W } from "./components/InputSearch/InputSearch.js";
19
- import { LoadingSpinner as q } from "./components/LoadingSpinner/LoadingSpinner.js";
20
- import { PageHeader as F } from "./components/PageHeader/PageHeader.js";
21
- import { Pagination as K, paginationDefaultTranslations as M } from "./components/Pagination/Pagination.js";
22
- import { Popover as U } from "./components/Popover/Popover.js";
23
- import { RadioButton as X } from "./components/RadioButton/RadioButton.js";
24
- import { ResultWithChips as Z } from "./components/ResultWithChips/ResultWithChips.js";
25
- import { Select as $, SelectContext as oo, SelectOption as ro, useSelectContext as eo } from "./components/Select/Select.js";
26
- import { Skeleton as po, SkeletonCircle as ao, SkeletonTable as fo } from "./components/Skeleton/Skeleton.js";
27
- import { Snackbar as mo } from "./components/Snackbar/Snackbar.js";
28
- import { SortTooltip as lo, sortTooltipDefaultTranslations as io } from "./components/SortTooltip/SortTooltip.js";
29
- import { Stepper as so } from "./components/Stepper/Stepper.js";
30
- import { StepperNavigator as go } from "./components/StepperNavigator/StepperNavigator.js";
31
- import { TBody as So, THead as Co, Table as bo, Td as ko, Th as ho, Tr as Do } from "./components/Table/Table.js";
32
- import { Tabs as Io } from "./components/Tabs/Tabs.js";
33
- import { Tag as Bo } from "./components/Tag/Tag.js";
34
- import { TextDisplay as Ro } from "./components/TextDisplay/TextDisplay.js";
35
- import { Toggle as Go } from "./components/Toggle/Toggle.js";
36
- import { G as Ho } from "./Group-ZXteFV4M.js";
37
- import { Tooltip as Lo } from "./components/Tooltip/Tooltip.js";
38
- import { TransactionRow as Oo } from "./components/TransactionRow/TransactionRow.js";
39
- import { Text as jo, Typography as qo } from "./components/Typography/Typography.js";
40
- import { SnackbarContext as Fo, SnackbarProvider as Jo, useSnackbar as Ko } from "./contexts/SnackbarProvider/SnackbarProvider.js";
41
- import { default as Qo } from "./components/Dialog/DialogTitle.js";
42
- import { default as Vo } from "./components/Dialog/Content.js";
43
- import { default as Yo } from "./components/Dialog/Actions.js";
44
- import { Tab as _o } from "./components/Tabs/Tab.js";
45
- import { TabPanel as or } from "./components/Tabs/TabPanel.js";
6
+ import { Badge as T } from "./components/Badge/Badge.js";
7
+ import { BankCard as c } from "./components/BankCard/BankCard.js";
8
+ import { Button as u } from "./components/Button/Button.js";
9
+ import { Calendar as d } from "./components/Calendar/Calendar.js";
10
+ import { Checkbox as b } from "./components/Checkbox/Checkbox.js";
11
+ import { C as h, R as D, T as A } from "./Toggle-BuZjueQ7.js";
12
+ import { ConfirmationDialog as I } from "./components/ConfirmationDialog/ConfirmationDialog.js";
13
+ import { Description as P } from "./components/Description/Description.js";
14
+ import { Dialog as y } from "./components/Dialog/Dialog.js";
15
+ import { EllipsisTooltip as w } from "./components/EllipsisTooltip/EllipsisTooltip.js";
16
+ import { Icon as E } from "./components/Icon/Icon.js";
17
+ import { IconButton as N } from "./components/IconButton/IconButton.js";
18
+ import { Input as W } from "./components/Input/Input.js";
19
+ import { InputSearch as q } from "./components/InputSearch/InputSearch.js";
20
+ import { LoadingSpinner as F } from "./components/LoadingSpinner/LoadingSpinner.js";
21
+ import { PageHeader as K } from "./components/PageHeader/PageHeader.js";
22
+ import { Pagination as Q, paginationDefaultTranslations as U } from "./components/Pagination/Pagination.js";
23
+ import { Popover as X } from "./components/Popover/Popover.js";
24
+ import { RadioButton as Z } from "./components/RadioButton/RadioButton.js";
25
+ import { ResultWithChips as $ } from "./components/ResultWithChips/ResultWithChips.js";
26
+ import { Select as ro, SelectContext as eo, SelectOption as to, useSelectContext as po } from "./components/Select/Select.js";
27
+ import { Skeleton as fo, SkeletonCircle as xo, SkeletonTable as mo } from "./components/Skeleton/Skeleton.js";
28
+ import { Snackbar as lo } from "./components/Snackbar/Snackbar.js";
29
+ import { SortTooltip as To, sortTooltipDefaultTranslations as so } from "./components/SortTooltip/SortTooltip.js";
30
+ import { Stepper as go } from "./components/Stepper/Stepper.js";
31
+ import { StepperNavigator as So } from "./components/StepperNavigator/StepperNavigator.js";
32
+ import { TBody as bo, THead as ko, Table as ho, Td as Do, Th as Ao, Tr as Bo } from "./components/Table/Table.js";
33
+ import { Tabs as vo } from "./components/Tabs/Tabs.js";
34
+ import { Tag as Ro } from "./components/Tag/Tag.js";
35
+ import { TextDisplay as Go } from "./components/TextDisplay/TextDisplay.js";
36
+ import { Toggle as Ho } from "./components/Toggle/Toggle.js";
37
+ import { G as Lo } from "./Group-ZXteFV4M.js";
38
+ import { Tooltip as Oo } from "./components/Tooltip/Tooltip.js";
39
+ import { TransactionRow as jo } from "./components/TransactionRow/TransactionRow.js";
40
+ import { Text as zo, Typography as Fo } from "./components/Typography/Typography.js";
41
+ import { SnackbarContext as Ko, SnackbarProvider as Mo, useSnackbar as Qo } from "./contexts/SnackbarProvider/SnackbarProvider.js";
42
+ import { default as Vo } from "./components/Dialog/DialogTitle.js";
43
+ import { default as Yo } from "./components/Dialog/Content.js";
44
+ import { default as _o } from "./components/Dialog/Actions.js";
45
+ import { Tab as or } from "./components/Tabs/Tab.js";
46
+ import { TabPanel as er } from "./components/Tabs/TabPanel.js";
46
47
  export {
47
- Yo as Actions,
48
+ _o as Actions,
48
49
  e as Adornment,
49
50
  p as Advice,
50
51
  f as Alert,
51
52
  m as Autocomplete,
52
53
  l as Avatar,
53
- T as BankCard,
54
- c as Button,
55
- u as Calendar,
56
- d as Checkbox,
57
- b as Chip,
58
- A as ConfirmationDialog,
59
- Vo as Content,
60
- v as Description,
61
- P as Dialog,
62
- Qo as DialogTitle,
63
- y as EllipsisTooltip,
64
- w as Icon,
65
- E as IconButton,
66
- N as Input,
67
- W as InputSearch,
68
- q as LoadingSpinner,
69
- F as PageHeader,
70
- K as Pagination,
71
- U as Popover,
72
- X as RadioButton,
73
- Z as ResultWithChips,
74
- k as RowItem,
75
- $ as Select,
76
- oo as SelectContext,
77
- ro as SelectOption,
78
- po as Skeleton,
79
- ao as SkeletonCircle,
80
- fo as SkeletonTable,
81
- mo as Snackbar,
82
- Fo as SnackbarContext,
83
- Jo as SnackbarProvider,
84
- lo as SortTooltip,
85
- so as Stepper,
86
- go as StepperNavigator,
87
- So as TBody,
88
- Co as THead,
89
- _o as Tab,
90
- or as TabPanel,
91
- bo as Table,
92
- Io as Tabs,
93
- Bo as Tag,
94
- ko as Td,
95
- jo as Text,
96
- Ro as TextDisplay,
97
- ho as Th,
98
- Go as Toggle,
99
- Ho as ToggleGroup,
100
- h as ToggleGroupItem,
101
- Lo as Tooltip,
102
- Do as Tr,
103
- Oo as TransactionRow,
104
- qo as Typography,
105
- M as paginationDefaultTranslations,
106
- io as sortTooltipDefaultTranslations,
107
- eo as useSelectContext,
108
- Ko as useSnackbar
54
+ T as Badge,
55
+ c as BankCard,
56
+ u as Button,
57
+ d as Calendar,
58
+ b as Checkbox,
59
+ h as Chip,
60
+ I as ConfirmationDialog,
61
+ Yo as Content,
62
+ P as Description,
63
+ y as Dialog,
64
+ Vo as DialogTitle,
65
+ w as EllipsisTooltip,
66
+ E as Icon,
67
+ N as IconButton,
68
+ W as Input,
69
+ q as InputSearch,
70
+ F as LoadingSpinner,
71
+ K as PageHeader,
72
+ Q as Pagination,
73
+ X as Popover,
74
+ Z as RadioButton,
75
+ $ as ResultWithChips,
76
+ D as RowItem,
77
+ ro as Select,
78
+ eo as SelectContext,
79
+ to as SelectOption,
80
+ fo as Skeleton,
81
+ xo as SkeletonCircle,
82
+ mo as SkeletonTable,
83
+ lo as Snackbar,
84
+ Ko as SnackbarContext,
85
+ Mo as SnackbarProvider,
86
+ To as SortTooltip,
87
+ go as Stepper,
88
+ So as StepperNavigator,
89
+ bo as TBody,
90
+ ko as THead,
91
+ or as Tab,
92
+ er as TabPanel,
93
+ ho as Table,
94
+ vo as Tabs,
95
+ Ro as Tag,
96
+ Do as Td,
97
+ zo as Text,
98
+ Go as TextDisplay,
99
+ Ao as Th,
100
+ Ho as Toggle,
101
+ Lo as ToggleGroup,
102
+ A as ToggleGroupItem,
103
+ Oo as Tooltip,
104
+ Bo as Tr,
105
+ jo as TransactionRow,
106
+ Fo as Typography,
107
+ U as paginationDefaultTranslations,
108
+ so as sortTooltipDefaultTranslations,
109
+ po as useSelectContext,
110
+ Qo as useSnackbar
109
111
  };
package/dist/marola.css CHANGED
@@ -1 +1 @@
1
- :root{--secondary-orange: #ffa945;--secondary-orange-rgb: 255, 169, 69;--secondary-orange-dark: #fe8d53;--secondary-orange-dark-rgb: 254, 141, 83;--secondary-orange-light: #525061;--secondary-orange-light-rgb: 82, 80, 97;--secondary-green: #99dec3;--secondary-green-rgb: 153, 222, 195;--secondary-green-dark: #6acbb1;--secondary-green-dark-rgb: 106, 203, 177;--secondary-green-darker: #31aa7e;--secondary-green-darker-rgb: 49, 170, 126;--secondary-green-light: #baedd9;--secondary-green-light-rgb: 186, 237, 217;--accent: #1897f3;--accent-rgb: 24, 151, 243;--accent-dark: #1672c7;--accent-dark-rgb: 22, 114, 199;--accent-light: #4fb1f9;--accent-light-rgb: 79, 177, 249;--accent-lighter: #8ae1fd;--accent-lighter-rgb: 138, 225, 253;--alert: #df4561;--alert-rgb: 223, 69, 97;--alert-dark: #bb2b45;--alert-dark-rgb: 187, 43, 69;--accent-alert-light: #f37c91;--accent-alert-light-rgb: 243, 124, 145;--cream: #fafafa;--cream-rgb: 250, 250, 250;--hover: #42b7ff;--hover-rgb: 66, 183, 255;--active: #0a75cc;--active-rgb: 10, 117, 204;--border: #d9d9d9;--border-rgb: 217, 217, 217;--border-secondary: #f0f0f0;--border-secondary-rgb: 240, 240, 240;--error-background: #fff2f0;--error-background-rgb: 255, 242, 240;--error-border: #ffccc7;--error-border-rgb: 255, 204, 199;--error-text: #d9363e;--error-text-rgb: 217, 54, 62;--success-text: #045440;--success-text-rgb: 4, 84, 64;--warning-text: #874d00;--warning-text-rgb: 135, 77, 0;--warning: #faad14;--warning-rgb: 250, 173, 20;--avatar-background: rgba(63, 61, 75, .2509803922);--avatar-background-rgb: 63, 61, 75}:root{--gray-100: #16161e;--gray-100-rgb: 22, 22, 30;--gray-95: #3f3d4b;--gray-95-rgb: 63, 61, 75;--gray-90: #525061;--gray-90-rgb: 82, 80, 97;--gray-75: #838192;--gray-75-rgb: 131, 129, 146;--gray-50: #bcbac8;--gray-50-rgb: 188, 186, 200;--gray-25: #dbdae2;--gray-25-rgb: 219, 218, 226;--gray-10: #ebeaf0;--gray-10-rgb: 235, 234, 240;--gray-5: #f7f7fc;--gray-5-rgb: 247, 247, 252;--black-100: #000000;--black-100-rgb: 0, 0, 0;--black-75: #616161;--black-75-rgb: 97, 97, 97;--black-50: #838192;--black-50-rgb: 131, 129, 146;--black-25: #bcbac8;--black-25-rgb: 188, 186, 200;--black-10: #ebeaf0;--black-10-rgb: 235, 234, 240;--white-100: #ffffff;--white-100-rgb: 255, 255, 255;--green-1: #f0fff7;--green-1-rgb: 240, 255, 247;--green-3: #a1edcb;--green-3-rgb: 161, 237, 203;--green-6: #28c88f;--green-6-rgb: 40, 200, 143;--blue-1: #e6f9ff;--blue-1-rgb: 230, 249, 255;--blue-3: #94ddff;--blue-3-rgb: 148, 221, 255;--blue-6: #1897f3;--blue-6-rgb: 24, 151, 243;--gold-1: #fffbe6;--gold-1-rgb: 255, 251, 230;--gold-3: #ffe58f;--gold-3-rgb: 255, 229, 143;--gold-6: #faad14;--gold-6-rgb: 250, 173, 20;--magenta-1: #fff0f6;--magenta-1-rgb: 255, 240, 246;--magenta-3: #ffadd2;--magenta-3-rgb: 255, 173, 210;--magenta-6: #eb2f96;--magenta-6-rgb: 235, 47, 150;--cyan-1: #e6fffb;--cyan-1-rgb: 230, 255, 251;--cyan-3: #87e8de;--cyan-3-rgb: 135, 232, 222;--cyan-6: #13c2c2;--cyan-6-rgb: 19, 194, 194;--geek-blue-1: #f0f5ff;--geek-blue-1-rgb: 240, 245, 255;--geek-blue-3: #adc6ff;--geek-blue-3-rgb: 173, 198, 255;--geek-blue-5: #597ef7;--geek-blue-5-rgb: 89, 126, 247;--geek-blue-6: #2f54eb;--geek-blue-6-rgb: 47, 84, 235;--lime-1: #fcffe6;--lime-1-rgb: 252, 255, 230;--lime-3: #eaff8f;--lime-3-rgb: 234, 255, 143;--lime-6: #a0d911;--lime-6-rgb: 160, 217, 17;--orange-1: #fffaf0;--orange-1-rgb: 255, 250, 240;--orange-3: #ffe8bf;--orange-3-rgb: 255, 232, 191;--orange-6: #ffa945;--orange-6-rgb: 255, 169, 69;--purple-1: #f9f0ff;--purple-1-rgb: 249, 240, 255;--purple-3: #d3adf7;--purple-3-rgb: 211, 173, 247;--purple-6: #722ed1;--purple-6-rgb: 114, 46, 209;--red-1: #fff0f0;--red-1-rgb: 255, 240, 240;--red-3: #fcbdc3;--red-3-rgb: 252, 189, 195;--red-6: #d53a56;--red-6-rgb: 213, 58, 86;--volcano-1: #fff2e8;--volcano-1-rgb: 255, 242, 232;--volcano-3: #ffbb96;--volcano-3-rgb: 255, 187, 150;--volcano-6: #fa541c;--volcano-6-rgb: 250, 84, 28}:root{--heading-font-weight: 700;--heading-font-size-1: 3.75rem;--heading-line-height-1: 4.875rem;--heading-font-size-2: 3rem;--heading-line-height-2: 4rem;--heading-font-size-3: 2.25rem;--heading-line-height-3: 2.875rem;--heading-font-size-4: 1.875rem;--heading-line-height-4: 2.375rem;--heading-font-size-5: 1.5rem;--heading-line-height-5: 2rem;--heading-font-size-6: 1.25rem;--heading-line-height-6: 1.75rem;--base-font-size: .875rem;--base-line-height: 1.375rem;--base-weight: 400;--base-bold: 700;--base-font-size-sm: .75rem;--base-line-height-sm: 1.25rem;--base-font-size-lg: 1rem;--base-line-height-lg: 1.5rem;--base-font-size-xl: 1.25rem;--base-line-height-xl: 1.75rem;--base-font-size-xxl: 1.5rem;--base-line-height-xxl: 2rem}:root{--heading-font-weight: 700;--heading-font-size-xl: 3.75rem;--heading-line-height-xl: 4.875rem;--heading-font-size-l: 3rem;--heading-line-height-l: 3.9375rem;--heading-font-size: 2.25rem;--heading-line-height: 2.875rem;--heading-font-size-s: 1.5rem;--heading-line-height-s: 2rem;--body-font-size: 1rem;--body-line-height: 1.3125rem;--body-weight: normal;--body-bold: bold;--body-font-size-large: 1.5rem;--body-line-height-large: 1.625rem;--body-font-size-medium: 1.125;--body-line-height-medium: 1rem;--body-font-size-small: .875rem;--body-line-height-small: 1.125rem;--body-font-size-tiny: .75rem;--body-line-height-tiny: 1rem;--quote-font-size-large: 1.5rem;--quote-line-height-large: 2rem;--quote-font-weight-large: normal;--quote-font-size: 1rem;--quote-line-height: 1.3125rem;--quote-font-weight: normal;--form-input-font-size: 1rem;--form-input-line-height: 1.3125rem;--form-input-font-weight: bold;--form-hint-font-size: .875rem;--form-hint-line-height: 1.3125rem;--form-hint-font-weight: normal;--form-label-font-size: .875rem;--form-label-line-height: 1.3125rem;--form-label-font-weight: normal;--form-dropdown-font-size: 1rem;--form-dropdown-line-height: 1.3125rem;--form-dropdown-font-weight: normal;--table-font-size: .875rem;--table-line-height: 1.0625rem;--table-header-font-weight: bold;--table-body-font-weight: normal;--table-body-secondary-line-height: 1.3125rem;--button-font-size: 1rem;--button-line-height: 1.25rem;--button-font-weight: bold;--font-size-small: .75rem;--font-weight-small: 400;--font-line-height-small: 1.25rem;--font-weight-700: 700}:root{--spacing: 8px;--border-radius: 6px;--border-radius-soft: 4px;--transition-soft: .3s;--transition-long: .75s}*{box-sizing:border-box}:root{--border-radius-border-radius: .375rem;--size-base-size: 1rem;--size-base-size-sm: .75rem;--colors-base-green-3: #a1edcb;--colors-brand-success-color-success-border: var(--colors-base-green-3);--colors-base-green-1: #f0fff7;--colors-brand-success-color-success-bg: var(--colors-base-green-1);--colors-brand-error-color-error-border: #ffccc7;--colors-brand-error-color-error-bg: #fff2f0;--colors-brand-error-color-error-hover: #ff7875;--colors-brand-error-color-error-active: #d9363e;--colors-brand-error-color-error: #ff4d4f;--colors-base-gold-3: #ffe58f;--colors-brand-warning-color-warning-border: var(--colors-base-gold-3);--colors-base-gold-1: #fffbe6;--colors-brand-warning-color-warning-bg: var(--colors-base-gold-1);--colors-base-blue-3: #94ddff;--colors-brand-primary-color-primary-border: var(--colors-base-blue-3);--colors-brand-info-color-info-border: var(--colors-brand-primary-color-primary-border);--colors-base-blue-1: #e6f9ff;--colors-brand-primary-color-primary-bg: var(--colors-base-blue-1);--colors-brand-info-color-info-bg: var(--colors-brand-primary-color-primary-bg);--colors-base-blue-6: #1897f3;--colors-brand-primary-color-primary: var(--colors-base-blue-6);--colors-base-blue-4: #6bcbff;--colors-brand-primary-color-primary-border-hover: var(--colors-base-blue-4);--colors-base-blue-7: #0a75cc;--colors-brand-primary-color-primary-active: var(--colors-base-blue-7);--colors-neutral-border-color-border: #d9d9d9;--colors-neutral-text-color-text: rgba(63, 61, 75, .8784313725);--colors-neutral-text-color-text-tertiary: rgba(63, 61, 75, .4509803922);--colors-neutral-text-color-text-description: var(--colors-neutral-text-color-text-tertiary);--colors-neutral-text-color-text-quaternary: rgba(63, 61, 75, .2509803922);--colors-neutral-text-color-text-disabled: var(--colors-neutral-text-color-text-quaternary);--colors-neutral-fill-color-fill: rgba(0, 0, 0, .1490196078)}
1
+ :root{--secondary-orange: #ffa945;--secondary-orange-rgb: 255, 169, 69;--secondary-orange-dark: #fe8d53;--secondary-orange-dark-rgb: 254, 141, 83;--secondary-orange-light: #525061;--secondary-orange-light-rgb: 82, 80, 97;--secondary-green: #99dec3;--secondary-green-rgb: 153, 222, 195;--secondary-green-dark: #6acbb1;--secondary-green-dark-rgb: 106, 203, 177;--secondary-green-darker: #31aa7e;--secondary-green-darker-rgb: 49, 170, 126;--secondary-green-light: #baedd9;--secondary-green-light-rgb: 186, 237, 217;--accent: #1897f3;--accent-rgb: 24, 151, 243;--accent-dark: #1672c7;--accent-dark-rgb: 22, 114, 199;--accent-light: #4fb1f9;--accent-light-rgb: 79, 177, 249;--accent-lighter: #8ae1fd;--accent-lighter-rgb: 138, 225, 253;--alert: #df4561;--alert-rgb: 223, 69, 97;--alert-dark: #bb2b45;--alert-dark-rgb: 187, 43, 69;--accent-alert-light: #f37c91;--accent-alert-light-rgb: 243, 124, 145;--cream: #fafafa;--cream-rgb: 250, 250, 250;--hover: #42b7ff;--hover-rgb: 66, 183, 255;--active: #0a75cc;--active-rgb: 10, 117, 204;--border: #d9d9d9;--border-rgb: 217, 217, 217;--border-secondary: #f0f0f0;--border-secondary-rgb: 240, 240, 240;--error-background: #fff2f0;--error-background-rgb: 255, 242, 240;--error-border: #ffccc7;--error-border-rgb: 255, 204, 199;--error-text: #d9363e;--error-text-rgb: 217, 54, 62;--success-text: #045440;--success-text-rgb: 4, 84, 64;--warning-text: #874d00;--warning-text-rgb: 135, 77, 0;--warning: #faad14;--warning-rgb: 250, 173, 20;--avatar-background: rgba(63, 61, 75, .2509803922);--avatar-background-rgb: 63, 61, 75}:root{--gray-100: #16161e;--gray-100-rgb: 22, 22, 30;--gray-95: #3f3d4b;--gray-95-rgb: 63, 61, 75;--gray-90: #525061;--gray-90-rgb: 82, 80, 97;--gray-75: #838192;--gray-75-rgb: 131, 129, 146;--gray-50: #bcbac8;--gray-50-rgb: 188, 186, 200;--gray-25: #dbdae2;--gray-25-rgb: 219, 218, 226;--gray-10: #ebeaf0;--gray-10-rgb: 235, 234, 240;--gray-5: #f7f7fc;--gray-5-rgb: 247, 247, 252;--black-100: #000000;--black-100-rgb: 0, 0, 0;--black-75: #616161;--black-75-rgb: 97, 97, 97;--black-50: #838192;--black-50-rgb: 131, 129, 146;--black-25: #bcbac8;--black-25-rgb: 188, 186, 200;--black-10: #ebeaf0;--black-10-rgb: 235, 234, 240;--white-100: #ffffff;--white-100-rgb: 255, 255, 255;--green-1: #f0fff7;--green-1-rgb: 240, 255, 247;--green-3: #a1edcb;--green-3-rgb: 161, 237, 203;--green-6: #28c88f;--green-6-rgb: 40, 200, 143;--blue-1: #e6f9ff;--blue-1-rgb: 230, 249, 255;--blue-3: #94ddff;--blue-3-rgb: 148, 221, 255;--blue-6: #1897f3;--blue-6-rgb: 24, 151, 243;--gold-1: #fffbe6;--gold-1-rgb: 255, 251, 230;--gold-3: #ffe58f;--gold-3-rgb: 255, 229, 143;--gold-6: #faad14;--gold-6-rgb: 250, 173, 20;--magenta-1: #fff0f6;--magenta-1-rgb: 255, 240, 246;--magenta-3: #ffadd2;--magenta-3-rgb: 255, 173, 210;--magenta-6: #eb2f96;--magenta-6-rgb: 235, 47, 150;--cyan-1: #e6fffb;--cyan-1-rgb: 230, 255, 251;--cyan-3: #87e8de;--cyan-3-rgb: 135, 232, 222;--cyan-6: #13c2c2;--cyan-6-rgb: 19, 194, 194;--geek-blue-1: #f0f5ff;--geek-blue-1-rgb: 240, 245, 255;--geek-blue-3: #adc6ff;--geek-blue-3-rgb: 173, 198, 255;--geek-blue-5: #597ef7;--geek-blue-5-rgb: 89, 126, 247;--geek-blue-6: #2f54eb;--geek-blue-6-rgb: 47, 84, 235;--lime-1: #fcffe6;--lime-1-rgb: 252, 255, 230;--lime-3: #eaff8f;--lime-3-rgb: 234, 255, 143;--lime-6: #a0d911;--lime-6-rgb: 160, 217, 17;--orange-1: #fffaf0;--orange-1-rgb: 255, 250, 240;--orange-3: #ffe8bf;--orange-3-rgb: 255, 232, 191;--orange-6: #ffa945;--orange-6-rgb: 255, 169, 69;--purple-1: #f9f0ff;--purple-1-rgb: 249, 240, 255;--purple-3: #d3adf7;--purple-3-rgb: 211, 173, 247;--purple-6: #722ed1;--purple-6-rgb: 114, 46, 209;--red-1: #fff0f0;--red-1-rgb: 255, 240, 240;--red-3: #fcbdc3;--red-3-rgb: 252, 189, 195;--red-6: #d53a56;--red-6-rgb: 213, 58, 86;--volcano-1: #fff2e8;--volcano-1-rgb: 255, 242, 232;--volcano-3: #ffbb96;--volcano-3-rgb: 255, 187, 150;--volcano-6: #fa541c;--volcano-6-rgb: 250, 84, 28}:root{--heading-font-weight: 700;--heading-font-size-1: 3.75rem;--heading-line-height-1: 4.875rem;--heading-font-size-2: 3rem;--heading-line-height-2: 4rem;--heading-font-size-3: 2.25rem;--heading-line-height-3: 2.875rem;--heading-font-size-4: 1.875rem;--heading-line-height-4: 2.375rem;--heading-font-size-5: 1.5rem;--heading-line-height-5: 2rem;--heading-font-size-6: 1.25rem;--heading-line-height-6: 1.75rem;--base-font-size: .875rem;--base-line-height: 1.375rem;--base-weight: 400;--base-bold: 700;--base-font-size-sm: .75rem;--base-line-height-sm: 1.25rem;--base-font-size-lg: 1rem;--base-line-height-lg: 1.5rem;--base-font-size-xl: 1.25rem;--base-line-height-xl: 1.75rem;--base-font-size-xxl: 1.5rem;--base-line-height-xxl: 2rem}:root{--heading-font-weight: 700;--heading-font-size-xl: 3.75rem;--heading-line-height-xl: 4.875rem;--heading-font-size-l: 3rem;--heading-line-height-l: 3.9375rem;--heading-font-size: 2.25rem;--heading-line-height: 2.875rem;--heading-font-size-s: 1.5rem;--heading-line-height-s: 2rem;--body-font-size: 1rem;--body-line-height: 1.3125rem;--body-weight: normal;--body-bold: bold;--body-font-size-large: 1.5rem;--body-line-height-large: 1.625rem;--body-font-size-medium: 1.125;--body-line-height-medium: 1rem;--body-font-size-small: .875rem;--body-line-height-small: 1.125rem;--body-font-size-tiny: .75rem;--body-line-height-tiny: 1rem;--quote-font-size-large: 1.5rem;--quote-line-height-large: 2rem;--quote-font-weight-large: normal;--quote-font-size: 1rem;--quote-line-height: 1.3125rem;--quote-font-weight: normal;--form-input-font-size: 1rem;--form-input-line-height: 1.3125rem;--form-input-font-weight: bold;--form-hint-font-size: .875rem;--form-hint-line-height: 1.3125rem;--form-hint-font-weight: normal;--form-label-font-size: .875rem;--form-label-line-height: 1.3125rem;--form-label-font-weight: normal;--form-dropdown-font-size: 1rem;--form-dropdown-line-height: 1.3125rem;--form-dropdown-font-weight: normal;--table-font-size: .875rem;--table-line-height: 1.0625rem;--table-header-font-weight: bold;--table-body-font-weight: normal;--table-body-secondary-line-height: 1.3125rem;--button-font-size: 1rem;--button-line-height: 1.25rem;--button-font-weight: bold;--font-size-small: .75rem;--font-weight-small: 400;--font-line-height-small: 1.25rem;--font-weight-700: 700}:root{--spacing: 8px;--border-radius: 6px;--border-radius-soft: 4px;--transition-soft: .3s;--transition-long: .75s}*{box-sizing:border-box}:root{--border-radius-border-radius: .375rem;--size-base-size: 1rem;--size-base-size-sm: .75rem;--colors-base-green-3: #a1edcb;--colors-brand-success-color-success-border: var(--colors-base-green-3);--colors-base-green-1: #f0fff7;--colors-brand-success-color-success-bg: var(--colors-base-green-1);--colors-brand-error-color-error-border: #ffccc7;--colors-brand-error-color-error-bg: #fff2f0;--colors-brand-error-color-error-hover: #ff7875;--colors-brand-error-color-error-active: #d9363e;--colors-brand-error-color-error: #ff4d4f;--colors-base-gold-3: #ffe58f;--colors-brand-warning-color-warning-border: var(--colors-base-gold-3);--colors-base-gold-1: #fffbe6;--colors-brand-warning-color-warning-bg: var(--colors-base-gold-1);--colors-base-blue-3: #94ddff;--colors-brand-primary-color-primary-border: var(--colors-base-blue-3);--colors-brand-info-color-info-border: var(--colors-brand-primary-color-primary-border);--colors-brand-info-color-info-bg: var(--colors-brand-primary-color-primary-bg);--colors-base-blue-6: #1897f3;--colors-brand-primary-color-primary: var(--colors-base-blue-6);--colors-base-blue-4: #6bcbff;--colors-brand-primary-color-primary-border-hover: var(--colors-base-blue-4);--colors-base-blue-7: #0a75cc;--colors-brand-primary-color-primary-active: var(--colors-base-blue-7);--colors-neutral-border-color-border: #d9d9d9;--colors-neutral-text-color-text: rgba(63, 61, 75, .8784313725);--colors-neutral-text-color-text-tertiary: rgba(63, 61, 75, .4509803922);--colors-neutral-text-color-text-description: var(--colors-neutral-text-color-text-tertiary);--colors-neutral-text-color-text-quaternary: rgba(63, 61, 75, .2509803922);--colors-neutral-text-color-text-disabled: var(--colors-neutral-text-color-text-quaternary);--colors-neutral-fill-color-fill: rgba(0, 0, 0, .1490196078);--colors-base-green-6: #28c88f;--colors-brand-success-color-success: var(--colors-base-green-6);--colors-base-blue-1: #e6f9ff;--colors-brand-primary-color-primary-bg: var(--colors-base-blue-1)}
@@ -0,0 +1,10 @@
1
+ import { KeyboardEvent } from 'react';
2
+
3
+ declare const allowOnlyMathSignals: (ev: KeyboardEvent<HTMLInputElement>) => {
4
+ wasPrevented: boolean;
5
+ };
6
+ declare const allowOnlyNumbers: (ev: KeyboardEvent<HTMLInputElement>, allowNegative?: boolean) => void;
7
+ declare const allowOnlyIntegerNumbers: (ev: KeyboardEvent<HTMLInputElement>, allowNegative?: boolean) => void;
8
+ declare const formatDecimalValue: (value: string | number, useCommaInDecimal?: boolean) => string;
9
+ declare const parseToInteger: (value: string) => number | "";
10
+ export { allowOnlyNumbers, allowOnlyIntegerNumbers, allowOnlyMathSignals, formatDecimalValue, parseToInteger };
@@ -0,0 +1,42 @@
1
+ const s = ["ArrowLeft", "ArrowRight", "Backspace", "Delete", "Tab"], n = [".", ","], l = ["-"], i = (e) => {
2
+ var t;
3
+ return l.includes(e.key) ? e.currentTarget.value.match(
4
+ new RegExp(l.map((r) => `\\${r}`).join("|"))
5
+ ) ? (e.preventDefault(), { wasPrevented: !0 }) : (n.includes((t = e.currentTarget.value) == null ? void 0 : t[0]) ? (e.currentTarget.value = e.key, e.preventDefault()) : e.currentTarget.setSelectionRange(0, 0), { wasPrevented: !0 }) : { wasPrevented: !1 };
6
+ }, u = (e, t = !1) => {
7
+ if (e.key === " ") {
8
+ e.preventDefault();
9
+ return;
10
+ }
11
+ if (t) {
12
+ const { wasPrevented: r } = i(e);
13
+ if (r)
14
+ return;
15
+ }
16
+ if (isNaN(Number(e.key)) && !s.includes(e.key) && !n.includes(e.key)) {
17
+ e.preventDefault();
18
+ return;
19
+ }
20
+ const a = e.currentTarget.value.match(
21
+ new RegExp(`(${n.map((r) => `\\${r}`).join("|")})`)
22
+ );
23
+ n.includes(e.key) && a && e.preventDefault();
24
+ }, c = (e, t = !1) => {
25
+ if (e.key === " ") {
26
+ e.preventDefault();
27
+ return;
28
+ }
29
+ if (t) {
30
+ const { wasPrevented: a } = i(e);
31
+ if (a)
32
+ return;
33
+ }
34
+ isNaN(Number(e.key)) && !s.includes(e.key) && e.preventDefault();
35
+ }, o = (e, t = !1) => t ? String(e).replace(".", ",") : String(e).replace(",", "."), f = (e) => e.length ? Number(String(e).replace(/\.|,/gi, "")) : "";
36
+ export {
37
+ c as allowOnlyIntegerNumbers,
38
+ i as allowOnlyMathSignals,
39
+ u as allowOnlyNumbers,
40
+ o as formatDecimalValue,
41
+ f as parseToInteger
42
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pismo/marola",
3
3
  "description": "CDX tribe component library",
4
- "version": "1.1.5",
4
+ "version": "1.1.7",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",
7
7
  "types": "dist/main.d.ts",