@telefonica/mistica 16.0.0 → 16.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (152) hide show
  1. package/README.md +11 -9
  2. package/css/mistica.css +1 -1
  3. package/dist/box.d.ts +1 -0
  4. package/dist/box.js +12 -12
  5. package/dist/card.d.ts +14 -2
  6. package/dist/card.js +210 -206
  7. package/dist/credit-card-expiration-field.d.ts +1 -1
  8. package/dist/credit-card-expiration-field.js +53 -52
  9. package/dist/credit-card-number-field.d.ts +1 -1
  10. package/dist/credit-card-number-field.js +47 -45
  11. package/dist/cvv-field.d.ts +1 -1
  12. package/dist/cvv-field.js +38 -37
  13. package/dist/date-field.d.ts +1 -1
  14. package/dist/date-field.js +15 -13
  15. package/dist/date-time-field.d.ts +1 -1
  16. package/dist/date-time-field.js +13 -11
  17. package/dist/decimal-field.d.ts +1 -1
  18. package/dist/decimal-field.js +39 -38
  19. package/dist/email-field.d.ts +1 -1
  20. package/dist/email-field.js +21 -19
  21. package/dist/form-context.d.ts +7 -2
  22. package/dist/form-context.js +69 -62
  23. package/dist/form.d.ts +2 -1
  24. package/dist/form.js +94 -80
  25. package/dist/iban-field.d.ts +1 -1
  26. package/dist/iban-field.js +32 -30
  27. package/dist/index.d.ts +12 -3
  28. package/dist/index.js +19 -8
  29. package/dist/inline.d.ts +2 -1
  30. package/dist/inline.js +16 -15
  31. package/dist/integer-field.d.ts +1 -1
  32. package/dist/integer-field.js +30 -30
  33. package/dist/month-field.d.ts +1 -1
  34. package/dist/month-field.js +15 -13
  35. package/dist/package-version.js +1 -1
  36. package/dist/password-field.d.ts +1 -1
  37. package/dist/password-field.js +24 -22
  38. package/dist/phone-number-field.d.ts +4 -1
  39. package/dist/phone-number-field.js +84 -52
  40. package/dist/pin-field.js +21 -20
  41. package/dist/radio-button.d.ts +1 -0
  42. package/dist/radio-button.js +42 -41
  43. package/dist/rating.css-mistica.js +44 -0
  44. package/dist/rating.css.d.ts +11 -0
  45. package/dist/rating.css.ts.vanilla.css-mistica.js +11 -0
  46. package/dist/rating.d.ts +37 -0
  47. package/dist/rating.js +320 -0
  48. package/dist/search-field.d.ts +1 -0
  49. package/dist/search-field.js +18 -16
  50. package/dist/select.js +36 -33
  51. package/dist/sheet-action-row.css-mistica.js +13 -0
  52. package/dist/sheet-action-row.css.d.ts +1 -0
  53. package/dist/sheet-actions-list.d.ts +26 -0
  54. package/dist/sheet-actions-list.js +147 -0
  55. package/dist/sheet-actions.d.ts +23 -0
  56. package/dist/sheet-actions.js +175 -0
  57. package/dist/{sheet.css-mistica.js → sheet-common.css-mistica.js} +15 -21
  58. package/dist/{sheet.css.d.ts → sheet-common.css.d.ts} +0 -2
  59. package/dist/sheet-common.css.ts.vanilla.css-mistica.js +11 -0
  60. package/dist/sheet-common.d.ts +24 -0
  61. package/dist/sheet-common.js +429 -0
  62. package/dist/sheet-info.css-mistica.js +12 -0
  63. package/dist/sheet-info.css.d.ts +1 -0
  64. package/dist/sheet-info.d.ts +28 -0
  65. package/dist/sheet-info.js +156 -0
  66. package/dist/sheet-native.d.ts +2 -0
  67. package/dist/sheet-native.js +173 -0
  68. package/dist/sheet-radio-list.d.ts +22 -0
  69. package/dist/sheet-radio-list.js +143 -0
  70. package/dist/sheet-root.d.ts +4 -85
  71. package/dist/sheet-root.js +48 -322
  72. package/dist/sheet-types.d.ts +88 -0
  73. package/dist/sheet-web.d.ts +8 -0
  74. package/dist/sheet-web.js +183 -0
  75. package/dist/slider.js +40 -39
  76. package/dist/switch-component.js +18 -17
  77. package/dist/text-field-base.d.ts +3 -1
  78. package/dist/text-field-base.js +74 -66
  79. package/dist/text-field-components.css-mistica.js +14 -14
  80. package/dist/text-field-components.css.d.ts +2 -2
  81. package/dist/text-field-components.js +49 -39
  82. package/dist/text-field.d.ts +1 -0
  83. package/dist/text-field.js +24 -22
  84. package/dist/text-tokens.d.ts +14 -0
  85. package/dist/text-tokens.js +145 -89
  86. package/dist/theme-context-provider.js +6 -5
  87. package/dist/theme.d.ts +2 -0
  88. package/dist/utils/credit-card.d.ts +2 -2
  89. package/dist/utils/credit-card.js +1 -1
  90. package/dist/vivinho-loading-animation/in-lottie.json.js +544 -612
  91. package/dist/vivinho-loading-animation/out-lottie.json.js +828 -896
  92. package/dist/vivinho-loading-animation/pulse-lottie.json.js +798 -866
  93. package/dist/vivinho-loading-animation/wave-lottie.json.js +4303 -4409
  94. package/dist-es/box.js +18 -18
  95. package/dist-es/card.js +305 -301
  96. package/dist-es/credit-card-expiration-field.js +57 -56
  97. package/dist-es/credit-card-number-field.js +74 -72
  98. package/dist-es/cvv-field.js +82 -81
  99. package/dist-es/date-field.js +29 -27
  100. package/dist-es/date-time-field.js +29 -27
  101. package/dist-es/decimal-field.js +46 -45
  102. package/dist-es/email-field.js +26 -24
  103. package/dist-es/form-context.js +70 -63
  104. package/dist-es/form.js +102 -88
  105. package/dist-es/iban-field.js +35 -33
  106. package/dist-es/index.js +1822 -1817
  107. package/dist-es/inline.js +26 -25
  108. package/dist-es/integer-field.js +31 -31
  109. package/dist-es/month-field.js +28 -26
  110. package/dist-es/package-version.js +1 -1
  111. package/dist-es/password-field.js +37 -35
  112. package/dist-es/phone-number-field.js +92 -60
  113. package/dist-es/pin-field.js +32 -31
  114. package/dist-es/radio-button.js +42 -41
  115. package/dist-es/rating.css-mistica.js +6 -0
  116. package/dist-es/rating.css.ts.vanilla.css-mistica.js +2 -0
  117. package/dist-es/rating.js +257 -0
  118. package/dist-es/search-field.js +33 -31
  119. package/dist-es/select.js +49 -46
  120. package/dist-es/sheet-action-row.css-mistica.js +4 -0
  121. package/dist-es/sheet-actions-list.js +92 -0
  122. package/dist-es/sheet-actions.js +125 -0
  123. package/dist-es/sheet-common.css-mistica.js +4 -0
  124. package/dist-es/sheet-common.css.ts.vanilla.css-mistica.js +2 -0
  125. package/dist-es/sheet-common.js +366 -0
  126. package/dist-es/sheet-info.css-mistica.js +3 -0
  127. package/dist-es/sheet-info.js +101 -0
  128. package/dist-es/sheet-native.js +164 -0
  129. package/dist-es/sheet-radio-list.js +88 -0
  130. package/dist-es/sheet-root.js +50 -319
  131. package/dist-es/sheet-web.js +128 -0
  132. package/dist-es/slider.js +49 -48
  133. package/dist-es/style.css +1 -1
  134. package/dist-es/switch-component.js +27 -26
  135. package/dist-es/text-field-base.js +108 -100
  136. package/dist-es/text-field-components.css-mistica.js +2 -2
  137. package/dist-es/text-field-components.js +70 -60
  138. package/dist-es/text-field.js +33 -31
  139. package/dist-es/text-tokens.js +80 -45
  140. package/dist-es/theme-context-provider.js +20 -19
  141. package/dist-es/utils/credit-card.js +1 -1
  142. package/dist-es/vivinho-loading-animation/in-lottie.json.js +534 -599
  143. package/dist-es/vivinho-loading-animation/out-lottie.json.js +821 -886
  144. package/dist-es/vivinho-loading-animation/pulse-lottie.json.js +790 -855
  145. package/dist-es/vivinho-loading-animation/wave-lottie.json.js +4297 -4400
  146. package/package.json +4 -3
  147. package/dist/sheet.d.ts +0 -107
  148. package/dist/sheet.js +0 -642
  149. package/dist-es/sheet.css-mistica.js +0 -4
  150. package/dist-es/sheet.js +0 -567
  151. /package/dist/{sheet.css.ts.vanilla.css-mistica.js → sheet-action-row.css.ts.vanilla.css-mistica.js} +0 -0
  152. /package/dist-es/{sheet.css.ts.vanilla.css-mistica.js → sheet-action-row.css.ts.vanilla.css-mistica.js} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telefonica/mistica",
3
- "version": "16.0.0",
3
+ "version": "16.1.0",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -25,7 +25,7 @@
25
25
  "ts-check": "tsc --project tsconfig.json --noEmit",
26
26
  "build": "yarn clean && node scripts/build.js",
27
27
  "compile": "node scripts/compile.js",
28
- "clean": "rimraf dist && rimraf dist-es && rimraf dist-ts && rimraf css/mistica.css && rimraf community.d.ts && rimraf community.js && rimraf node_modules/.cache",
28
+ "clean": "rimraf dist && rimraf dist-es && rimraf dist-ts && rimraf css/mistica.css && rimraf community.d.ts && rimraf community.js && rimraf node_modules/.cache && bash -c 'yarn jest --clearCache > /dev/null 2>&1'",
29
29
  "prepublishOnly": "node scripts/prepublish-only.js",
30
30
  "prepack": "yarn build",
31
31
  "storybook": "storybook dev -p 6006",
@@ -200,7 +200,8 @@
200
200
  "react-dom": "18.2.0",
201
201
  "@types/react": "^18.0.26",
202
202
  "@types/react-dom": "^18.0.10",
203
- "@testing-library/dom": "^8.19.1"
203
+ "@testing-library/dom": "^8.19.1",
204
+ "lottie-react@^2.4.0": "patch:lottie-react@npm%3A2.4.0#./.yarn/patches/lottie-react-npm-2.4.0-d4d95c55aa.patch"
204
205
  },
205
206
  "packageManager": "yarn@3.6.1",
206
207
  "workspaces": [
package/dist/sheet.d.ts DELETED
@@ -1,107 +0,0 @@
1
- import * as React from 'react';
2
- import { ButtonLink, ButtonPrimary, ButtonSecondary } from './button';
3
- import type { ExclusifyUnion } from './utils/utility-types';
4
- import type { DataAttributes, IconProps, RendersNullableElement, TrackingEvent } from './utils/types';
5
- type SheetProps = {
6
- onClose?: () => void;
7
- dataAttributes?: DataAttributes;
8
- children: React.ReactNode | ((renderParams: {
9
- closeModal: () => void;
10
- modalTitleId: string;
11
- }) => React.ReactNode);
12
- };
13
- declare const Sheet: React.ForwardRefExoticComponent<SheetProps & React.RefAttributes<HTMLDivElement>>;
14
- type SheetBodyProps = {
15
- title?: string;
16
- subtitle?: string;
17
- description?: string | ReadonlyArray<string>;
18
- button?: RendersNullableElement<typeof ButtonPrimary>;
19
- secondaryButton?: RendersNullableElement<typeof ButtonSecondary>;
20
- link?: RendersNullableElement<typeof ButtonLink>;
21
- modalTitleId: string;
22
- children?: React.ReactNode;
23
- };
24
- export declare const SheetBody: ({ title, subtitle, description, modalTitleId, button, secondaryButton, link, children, }: SheetBodyProps) => JSX.Element;
25
- type RadioListSheetProps = {
26
- title?: string;
27
- subtitle?: string;
28
- description?: string | ReadonlyArray<string>;
29
- items: ReadonlyArray<{
30
- id: string;
31
- title?: string;
32
- description?: string;
33
- asset?: React.ReactNode;
34
- }>;
35
- selectedId?: string;
36
- onClose?: () => void;
37
- onSelect?: (id: string) => void;
38
- dataAttributes?: DataAttributes;
39
- button?: {
40
- text: string;
41
- };
42
- };
43
- export declare const RadioListSheet: React.ForwardRefExoticComponent<RadioListSheetProps & React.RefAttributes<HTMLDivElement>>;
44
- type ActionsListSheetProps = {
45
- title?: string;
46
- subtitle?: string;
47
- description?: string | ReadonlyArray<string>;
48
- items: ReadonlyArray<{
49
- id: string;
50
- title: string;
51
- style?: 'normal' | 'destructive';
52
- icon?: ExclusifyUnion<{
53
- Icon: React.ComponentType<IconProps>;
54
- } | {
55
- url: string;
56
- urlDark?: string;
57
- }>;
58
- }>;
59
- onClose?: () => void;
60
- onSelect?: (id: string) => void;
61
- dataAttributes?: DataAttributes;
62
- };
63
- export declare const ActionsListSheet: React.ForwardRefExoticComponent<ActionsListSheetProps & React.RefAttributes<HTMLDivElement>>;
64
- type InfoSheetProps = {
65
- title?: string;
66
- subtitle?: string;
67
- description?: string | ReadonlyArray<string>;
68
- items: ReadonlyArray<{
69
- id?: string;
70
- title: string;
71
- description?: string;
72
- icon: ExclusifyUnion<{
73
- type: 'regular' | 'small';
74
- Icon: React.ComponentType<IconProps>;
75
- } | {
76
- type: 'regular' | 'small';
77
- url: string;
78
- urlDark?: string;
79
- } | {
80
- type: 'bullet';
81
- }>;
82
- }>;
83
- onClose?: () => void;
84
- dataAttributes?: DataAttributes;
85
- };
86
- export declare const InfoSheet: React.ForwardRefExoticComponent<InfoSheetProps & React.RefAttributes<HTMLDivElement>>;
87
- type PressedButton = 'PRIMARY' | 'SECONDARY' | 'LINK';
88
- type ButtonProps = {
89
- text: string;
90
- trackingEvent?: TrackingEvent | ReadonlyArray<TrackingEvent>;
91
- trackEvent?: boolean;
92
- };
93
- type ActionsSheetProps = {
94
- title?: string;
95
- subtitle?: string;
96
- description?: string | ReadonlyArray<string>;
97
- button: ButtonProps;
98
- secondaryButton?: ButtonProps;
99
- buttonLink?: ButtonProps & {
100
- withChevron?: boolean;
101
- };
102
- onClose?: () => void;
103
- onPressButton?: (pressedButton: PressedButton) => void;
104
- dataAttributes?: DataAttributes;
105
- };
106
- export declare const ActionsSheet: React.ForwardRefExoticComponent<ActionsSheetProps & React.RefAttributes<HTMLDivElement>>;
107
- export default Sheet;