@phillips/seldon 1.145.0 → 1.146.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 (50) hide show
  1. package/dist/_virtual/index5.js +2 -2
  2. package/dist/_virtual/index6.js +2 -2
  3. package/dist/_virtual/index7.js +2 -2
  4. package/dist/_virtual/index8.js +2 -2
  5. package/dist/components/Loader/Loader.test.d.ts +1 -0
  6. package/dist/components/Toast/Toast.d.ts +39 -0
  7. package/dist/components/Toast/Toast.js +24 -0
  8. package/dist/components/Toast/Toast.stories.d.ts +16 -0
  9. package/dist/components/Toast/Toast.test.d.ts +1 -0
  10. package/dist/components/Toast/ToastContextProvider.d.ts +19 -0
  11. package/dist/components/Toast/ToastContextProvider.js +35 -0
  12. package/dist/components/Toast/ToastContextProvider.test.d.ts +1 -0
  13. package/dist/components/Toast/index.d.ts +3 -0
  14. package/dist/components/Toast/useToast.d.ts +3 -0
  15. package/dist/components/Toast/useToast.js +10 -0
  16. package/dist/components/Toast/useToast.test.d.ts +1 -0
  17. package/dist/components/Toast/useToastContext.d.ts +7 -0
  18. package/dist/components/Toast/useToastContext.js +16 -0
  19. package/dist/index.d.ts +1 -0
  20. package/dist/index.js +50 -44
  21. package/dist/node_modules/@radix-ui/react-toast/dist/index.js +447 -0
  22. package/dist/node_modules/@radix-ui/react-toast/node_modules/@radix-ui/primitive/dist/index.js +9 -0
  23. package/dist/node_modules/@radix-ui/react-toast/node_modules/@radix-ui/react-collection/dist/index.js +48 -0
  24. package/dist/node_modules/@radix-ui/react-toast/node_modules/@radix-ui/react-compose-refs/dist/index.js +29 -0
  25. package/dist/node_modules/@radix-ui/react-toast/node_modules/@radix-ui/react-context/dist/index.js +53 -0
  26. package/dist/node_modules/@radix-ui/react-toast/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +130 -0
  27. package/dist/node_modules/@radix-ui/react-toast/node_modules/@radix-ui/react-portal/dist/index.js +15 -0
  28. package/dist/node_modules/@radix-ui/react-toast/node_modules/@radix-ui/react-presence/dist/index.js +70 -0
  29. package/dist/node_modules/@radix-ui/react-toast/node_modules/@radix-ui/react-primitive/dist/index.js +36 -0
  30. package/dist/node_modules/@radix-ui/react-toast/node_modules/@radix-ui/react-slot/dist/index.js +48 -0
  31. package/dist/node_modules/@radix-ui/react-toast/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +10 -0
  32. package/dist/node_modules/@radix-ui/react-toast/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +52 -0
  33. package/dist/node_modules/@radix-ui/react-toast/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +14 -0
  34. package/dist/node_modules/@radix-ui/react-toast/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +6 -0
  35. package/dist/node_modules/@radix-ui/react-toast/node_modules/@radix-ui/react-visually-hidden/dist/index.js +30 -0
  36. package/dist/node_modules/exenv/index.js +1 -1
  37. package/dist/node_modules/ics/dist/index.js +2 -2
  38. package/dist/node_modules/ics/dist/pipeline/index.js +1 -1
  39. package/dist/node_modules/prop-types/node_modules/react-is/index.js +1 -1
  40. package/dist/node_modules/uuid/dist/esm-browser/native.js +4 -0
  41. package/dist/node_modules/uuid/dist/esm-browser/rng.js +13 -0
  42. package/dist/node_modules/uuid/dist/esm-browser/stringify.js +9 -0
  43. package/dist/node_modules/uuid/dist/esm-browser/v4.js +15 -0
  44. package/dist/patterns/AccountPageHeader/AccountPageHeader.d.ts +2 -2
  45. package/dist/patterns/AccountPageHeader/AccountPageHeader.js +21 -21
  46. package/dist/patterns/AccountPageHeader/AccountPageHeader.stories.d.ts +1 -1
  47. package/dist/scss/componentStyles.scss +1 -0
  48. package/dist/scss/components/Toast/_toast.scss +95 -0
  49. package/dist/scss/patterns/AccountPageHeader/_accountPageHeader.scss +6 -1
  50. package/package.json +5 -2
@@ -0,0 +1,95 @@
1
+ @use '../../allPartials' as *;
2
+
3
+ .#{$px}-toast {
4
+ align-items: center;
5
+ background-color: $primary-black;
6
+ border-radius: 4px;
7
+ box-shadow: 0 6px 14px 0 $primary-black;
8
+ color: $white;
9
+ column-gap: $spacing-sm;
10
+ display: grid;
11
+ grid-template-areas: 'title action';
12
+ grid-template-columns: auto max-content;
13
+ padding: $spacing-xsm $spacing-sm;
14
+
15
+ &__content {
16
+ display: flex;
17
+ gap: $spacing-sm;
18
+ }
19
+
20
+ &__action {
21
+ color: $cta-blue;
22
+
23
+ &:hover {
24
+ color: $white;
25
+ }
26
+ }
27
+
28
+ &[data-state='open'] {
29
+ animation: slide-in 150ms cubic-bezier(0.16, 1, 0.3, 1);
30
+ }
31
+
32
+ &[data-state='closed'] {
33
+ animation: hide 100ms ease-in;
34
+ }
35
+
36
+ &[data-swipe='move'] {
37
+ transform: translateX(var(--radix-toast-swipe-move-x));
38
+ }
39
+
40
+ &[data-swipe='cancel'] {
41
+ transform: translateX(0);
42
+ transition: transform 200ms ease-out;
43
+ }
44
+
45
+ &[data-swipe='end'] {
46
+ animation: swipeOut 100ms ease-out;
47
+ }
48
+ }
49
+
50
+ @keyframes hide {
51
+ from {
52
+ opacity: 1;
53
+ }
54
+
55
+ to {
56
+ opacity: 0;
57
+ }
58
+ }
59
+
60
+ @keyframes slide-in {
61
+ from {
62
+ opacity: 0;
63
+ transform: translateY(100%);
64
+ }
65
+
66
+ to {
67
+ opacity: 1;
68
+ transform: translateY(0);
69
+ }
70
+ }
71
+
72
+ @keyframes swipe-out {
73
+ from {
74
+ transform: translateX(var(--radix-toast-swipe-end-x));
75
+ }
76
+
77
+ to {
78
+ transform: translateX(calc(100% + #{$spacing-lg}));
79
+ }
80
+ }
81
+
82
+ .#{$px}-toast-viewport {
83
+ bottom: 0;
84
+ display: flex;
85
+ flex-direction: column;
86
+ gap: $spacing-sm;
87
+ left: 0;
88
+ list-style: none;
89
+ margin: 0;
90
+ max-width: 100vw;
91
+ outline: none;
92
+ padding: $spacing-lg;
93
+ position: fixed;
94
+ z-index: 99999;
95
+ }
@@ -8,7 +8,12 @@
8
8
  width: 100%;
9
9
  }
10
10
 
11
- &__header {
11
+ &__title {
12
+ // To help center the title, accounts for the extra space inside the span below the text
13
+ margin-top: $spacing-micro;
14
+ }
15
+
16
+ &__title-wrapper {
12
17
  align-items: center;
13
18
  display: flex;
14
19
  gap: $spacing-md;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phillips/seldon",
3
- "version": "1.145.0",
3
+ "version": "1.146.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/PhillipsAuctionHouse/seldon"
@@ -49,6 +49,7 @@
49
49
  "@radix-ui/react-popover": "^1.1.11",
50
50
  "@radix-ui/react-select": "^2.1.1",
51
51
  "@radix-ui/react-tabs": "^1.1.1",
52
+ "@radix-ui/react-toast": "^1.2.11",
52
53
  "@types/dompurify": "^3.0.5",
53
54
  "change-case": "^5.4.4",
54
55
  "classnames": "^2.5.1",
@@ -68,7 +69,8 @@
68
69
  "react-remove-scroll": "^2.6.3",
69
70
  "react-transition-group": "^4.4.5",
70
71
  "react-zoom-pan-pinch": "^3.6.1",
71
- "usehooks-ts": "^3.1.0"
72
+ "usehooks-ts": "^3.1.0",
73
+ "uuid": "^11.1.0"
72
74
  },
73
75
  "devDependencies": {
74
76
  "@chromatic-com/storybook": "^3.2.3",
@@ -103,6 +105,7 @@
103
105
  "@types/react-dom": "^18.0.11",
104
106
  "@types/react-modal": "^3.16.3",
105
107
  "@types/react-transition-group": "^4.4.11",
108
+ "@types/uuid": "^10.0.0",
106
109
  "@typescript-eslint/eslint-plugin": "^5.62.0",
107
110
  "@typescript-eslint/parser": "^5.62.0",
108
111
  "@vitejs/plugin-react": "^4.3.1",