@phillips/seldon 1.277.0 → 1.278.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 (46) hide show
  1. package/dist/_virtual/index10.cjs +1 -1
  2. package/dist/_virtual/index10.js +2 -2
  3. package/dist/_virtual/index9.cjs +1 -1
  4. package/dist/_virtual/index9.js +2 -2
  5. package/dist/components/SlideToActivate/SlideToActivate.cjs +1 -0
  6. package/dist/components/SlideToActivate/SlideToActivate.d.ts +14 -0
  7. package/dist/components/SlideToActivate/SlideToActivate.js +147 -0
  8. package/dist/components/SlideToActivate/SlideToActivate.stories.argTypes.d.ts +276 -0
  9. package/dist/components/SlideToActivate/SlideToActivate.stories.d.ts +499 -0
  10. package/dist/components/SlideToActivate/SlideToActivate.stories.demo.d.ts +8 -0
  11. package/dist/components/SlideToActivate/SlideToActivate.test.d.ts +1 -0
  12. package/dist/components/SlideToActivate/SlideToActivateThumb.cjs +1 -0
  13. package/dist/components/SlideToActivate/SlideToActivateThumb.d.ts +28 -0
  14. package/dist/components/SlideToActivate/SlideToActivateThumb.js +76 -0
  15. package/dist/components/SlideToActivate/hooks/useSlideDragHandlers.cjs +1 -0
  16. package/dist/components/SlideToActivate/hooks/useSlideDragHandlers.d.ts +20 -0
  17. package/dist/components/SlideToActivate/hooks/useSlideDragHandlers.js +90 -0
  18. package/dist/components/SlideToActivate/hooks/useSlideKeyboardActivate.cjs +1 -0
  19. package/dist/components/SlideToActivate/hooks/useSlideKeyboardActivate.d.ts +14 -0
  20. package/dist/components/SlideToActivate/hooks/useSlideKeyboardActivate.js +44 -0
  21. package/dist/components/SlideToActivate/hooks/useSlideToActivate.cjs +1 -0
  22. package/dist/components/SlideToActivate/hooks/useSlideToActivate.d.ts +33 -0
  23. package/dist/components/SlideToActivate/hooks/useSlideToActivate.js +122 -0
  24. package/dist/components/SlideToActivate/index.d.ts +4 -0
  25. package/dist/components/SlideToActivate/slideToActivateReducer.cjs +1 -0
  26. package/dist/components/SlideToActivate/slideToActivateReducer.d.ts +37 -0
  27. package/dist/components/SlideToActivate/slideToActivateReducer.js +38 -0
  28. package/dist/components/SlideToActivate/slideToActivateUtils.cjs +1 -0
  29. package/dist/components/SlideToActivate/slideToActivateUtils.d.ts +19 -0
  30. package/dist/components/SlideToActivate/slideToActivateUtils.js +23 -0
  31. package/dist/components/SlideToActivate/slideToActivateUtils.test.d.ts +1 -0
  32. package/dist/components/SlideToActivate/types.cjs +1 -0
  33. package/dist/components/SlideToActivate/types.d.ts +105 -0
  34. package/dist/components/SlideToActivate/types.js +9 -0
  35. package/dist/index.cjs +1 -1
  36. package/dist/index.d.ts +1 -0
  37. package/dist/index.js +104 -98
  38. package/dist/node_modules/ics/dist/index.cjs +1 -1
  39. package/dist/node_modules/ics/dist/index.js +1 -1
  40. package/dist/node_modules/prop-types/node_modules/react-is/index.cjs +1 -1
  41. package/dist/node_modules/prop-types/node_modules/react-is/index.js +1 -1
  42. package/dist/scss/componentStyles.scss +1 -0
  43. package/dist/scss/components/SlideToActivate/_slideToActivate.scss +284 -0
  44. package/dist/scss/components/SlideToActivate/_slideToActivate.stories.scss +166 -0
  45. package/dist/scss/components/Toast/_toast.scss +5 -6
  46. package/package.json +1 -1
@@ -0,0 +1,166 @@
1
+ @use 'sass:color';
2
+ @use '../../allPartials' as *;
3
+
4
+ $slide-story-max-width: 360px;
5
+ $branded-blush: color.mix($pure-white, $highlight-purple, 88%);
6
+ $branded-rose: color.mix($pure-white, $highlight-purple, 62%);
7
+ $branded-lilac: color.mix($pure-white, $highlight-purple, 45%);
8
+ $branded-petal: color.mix($pure-white, $highlight-red, 82%);
9
+
10
+ .slide-to-activate-story {
11
+ display: flex;
12
+ flex-direction: column;
13
+ gap: $spacing-sm;
14
+ max-width: $slide-story-max-width;
15
+ touch-action: none;
16
+ width: 100%;
17
+
18
+ &__reset {
19
+ align-self: flex-start;
20
+ }
21
+ }
22
+
23
+ .slide-to-activate-story-branded {
24
+ background: linear-gradient(165deg, $branded-blush 0%, $pure-white 55%, $branded-petal 100%);
25
+ border-radius: $radius-md;
26
+ box-sizing: border-box;
27
+ max-width: $slide-story-max-width;
28
+ padding: $padding-md;
29
+ width: 100%;
30
+
31
+ .slide-to-activate-story {
32
+ max-width: none;
33
+ }
34
+
35
+ .#{$px}-slide-to-activate__track {
36
+ background: linear-gradient(90deg, $branded-lilac 0%, $branded-rose 55%, $branded-petal 100%);
37
+ box-shadow: inset 0 1px 0 rgba($pure-white, 0.55);
38
+ }
39
+
40
+ .#{$px}-slide-to-activate__thumb-face {
41
+ background: linear-gradient(145deg, $pure-white 0%, $branded-blush 100%);
42
+ border: 2px solid rgba($highlight-purple, 0.35);
43
+ box-shadow: 0 2px 8px rgba($highlight-purple, 0.18);
44
+ color: $highlight-purple;
45
+ }
46
+
47
+ .#{$px}-slide-to-activate__label {
48
+ color: $pure-white;
49
+ font-variation-settings: 'wght' 500;
50
+ letter-spacing: 0.02em;
51
+ text-shadow: 0 1px 8px rgba($highlight-purple, 0.25);
52
+ }
53
+
54
+ .#{$px}-slide-to-activate--held .#{$px}-slide-to-activate__thumb-face,
55
+ .#{$px}-slide-to-activate__thumb--held .#{$px}-slide-to-activate__thumb-face {
56
+ border-color: $highlight-purple;
57
+ box-shadow:
58
+ 0 0 0 2px rgba($pure-white, 0.85),
59
+ 0 4px 14px rgba($highlight-purple, 0.28);
60
+ }
61
+
62
+ .#{$px}-slide-to-activate--disabled-complete {
63
+ .#{$px}-slide-to-activate__track {
64
+ background: linear-gradient(90deg, $branded-rose 0%, $highlight-purple 100%);
65
+ }
66
+ }
67
+
68
+ .#{$px}-slide-to-activate__pending-indicator .#{$px}-loader {
69
+ border-color: $pure-white;
70
+ border-bottom-color: transparent;
71
+ }
72
+ }
73
+
74
+ .slide-to-activate-story-custom-styling {
75
+ display: flex;
76
+ flex-direction: column;
77
+ gap: $spacing-lg;
78
+ width: 100%;
79
+ }
80
+
81
+ .slide-to-activate-story-compact {
82
+ .#{$px}-slide-to-activate__track {
83
+ background-color: $pure-white;
84
+ border: 2px solid $pure-black;
85
+ }
86
+
87
+ .#{$px}-slide-to-activate__label {
88
+ color: $pure-black;
89
+ }
90
+
91
+ .#{$px}-slide-to-activate__thumb-face {
92
+ background-color: $pure-black;
93
+ border: 2px solid $pure-black;
94
+ color: $pure-white;
95
+ }
96
+
97
+ .#{$px}-slide-to-activate__pending-indicator .#{$px}-loader {
98
+ border-color: $pure-black;
99
+ border-bottom-color: transparent;
100
+ }
101
+ }
102
+
103
+ .slide-to-activate-story-disabled-states {
104
+ display: flex;
105
+ flex-direction: column;
106
+ gap: $spacing-md;
107
+ max-width: $slide-story-max-width;
108
+ width: 100%;
109
+ }
110
+
111
+ .slide-to-activate-story-widths {
112
+ display: flex;
113
+ flex-direction: column;
114
+ gap: $spacing-md;
115
+ max-width: 100%;
116
+ overflow-x: hidden;
117
+ touch-action: none;
118
+ width: 100%;
119
+
120
+ &__toast {
121
+ display: flex;
122
+ flex-direction: column;
123
+ gap: $spacing-xsm;
124
+ }
125
+
126
+ &__item {
127
+ box-sizing: border-box;
128
+ display: flex;
129
+ flex-direction: column;
130
+ gap: $spacing-xsm;
131
+ max-width: 100%;
132
+ width: min(var(--slide-demo-width, #{$slide-story-max-width}), 100%);
133
+
134
+ .slide-to-activate-story {
135
+ max-width: none;
136
+ }
137
+
138
+ .#{$px}-slide-to-activate__label {
139
+ font-size: calc(#{$font-size-label-medium} * var(--slide-demo-label-scale, 1));
140
+ }
141
+ }
142
+ }
143
+
144
+ .slide-to-activate-story-held-demo {
145
+ max-width: $slide-story-max-width;
146
+
147
+ .#{$px}-slide-to-activate__thumb-icon--held {
148
+ color: $highlight-blue;
149
+ filter: drop-shadow(0 0 4px rgba($highlight-blue, 0.55));
150
+ transform: scale(1.55) rotate(28deg);
151
+ }
152
+
153
+ .#{$px}-slide-to-activate__thumb--held .#{$px}-slide-to-activate__thumb-face {
154
+ background-color: $highlight-blue;
155
+ border-color: $highlight-blue;
156
+ box-shadow:
157
+ 0 0 0 3px rgba($highlight-blue, 0.35),
158
+ 0 0 0 6px rgba($highlight-blue, 0.15);
159
+ color: $pure-white;
160
+ transform: scale(1.08);
161
+ }
162
+
163
+ .slide-to-activate-story {
164
+ max-width: none;
165
+ }
166
+ }
@@ -10,6 +10,9 @@
10
10
  grid-template-areas: 'title action';
11
11
  grid-template-columns: auto max-content;
12
12
  padding: $spacing-xsm $spacing-sm;
13
+ // Viewport is pointer-events: none so empty space doesn't block the page; re-enable on
14
+ // each toast so actions stay clickable (including when DismissableLayer sets body to none).
15
+ pointer-events: auto;
13
16
 
14
17
  &__content {
15
18
  display: flex;
@@ -89,12 +92,8 @@
89
92
  max-width: 100vw;
90
93
  outline: none;
91
94
  padding: $spacing-lg;
92
-
93
- // Radix UI DismissableLayer sets pointer-events: none on document.body when
94
- // any dialog is open, and only restores auto on its own layer elements. This
95
- // viewport is a portal into body (not a DismissableLayer), so it must opt
96
- // back in explicitly to remain interactive while a modal is open.
97
- pointer-events: auto;
95
+ // Pass clicks through empty viewport space; individual toasts re-enable pointer events.
96
+ pointer-events: none;
98
97
  position: fixed;
99
98
  z-index: 99999;
100
99
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phillips/seldon",
3
- "version": "1.277.0",
3
+ "version": "1.278.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/PhillipsAuctionHouse/seldon"