@quenty/snackbar 11.26.0 → 11.26.1-canary.6a5af88.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.
- package/CHANGELOG.md +8 -0
- package/package.json +25 -25
- package/src/Client/Gui/Snackbar.lua +16 -16
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [11.26.1-canary.6a5af88.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/snackbar@11.26.0...@quenty/snackbar@11.26.1-canary.6a5af88.0) (2025-11-12)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @quenty/snackbar
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
# [11.26.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/snackbar@11.25.0...@quenty/snackbar@11.26.0) (2025-10-08)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @quenty/snackbar
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/snackbar",
|
|
3
|
-
"version": "11.26.0",
|
|
3
|
+
"version": "11.26.1-canary.6a5af88.0",
|
|
4
4
|
"description": "Snackbars provide lightweight feedback on an operation at the base of the screen. They automatically disappear after a timeout or user interaction. There can only be one on the screen at a time.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -25,33 +25,33 @@
|
|
|
25
25
|
"Quenty"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@quenty/baseobject": "
|
|
29
|
-
"@quenty/basicpane": "
|
|
30
|
-
"@quenty/blend": "
|
|
31
|
-
"@quenty/buttondragmodel": "
|
|
32
|
-
"@quenty/buttonhighlightmodel": "
|
|
33
|
-
"@quenty/ducktype": "
|
|
34
|
-
"@quenty/genericscreenguiprovider": "
|
|
35
|
-
"@quenty/inputobjectutils": "
|
|
36
|
-
"@quenty/lipsum": "
|
|
37
|
-
"@quenty/loader": "
|
|
38
|
-
"@quenty/maid": "
|
|
39
|
-
"@quenty/math": "
|
|
40
|
-
"@quenty/promise": "
|
|
41
|
-
"@quenty/promisemaid": "
|
|
42
|
-
"@quenty/promptqueue": "
|
|
43
|
-
"@quenty/qgui": "
|
|
44
|
-
"@quenty/rx": "
|
|
45
|
-
"@quenty/servicebag": "
|
|
46
|
-
"@quenty/table": "
|
|
47
|
-
"@quenty/textserviceutils": "
|
|
48
|
-
"@quenty/transitionmodel": "
|
|
49
|
-
"@quenty/utf8": "
|
|
50
|
-
"@quenty/valueobject": "
|
|
28
|
+
"@quenty/baseobject": "10.9.0",
|
|
29
|
+
"@quenty/basicpane": "13.21.1-canary.6a5af88.0",
|
|
30
|
+
"@quenty/blend": "12.22.1-canary.6a5af88.0",
|
|
31
|
+
"@quenty/buttondragmodel": "1.19.1-canary.6a5af88.0",
|
|
32
|
+
"@quenty/buttonhighlightmodel": "14.22.1-canary.6a5af88.0",
|
|
33
|
+
"@quenty/ducktype": "5.9.0",
|
|
34
|
+
"@quenty/genericscreenguiprovider": "13.25.1-canary.6a5af88.0",
|
|
35
|
+
"@quenty/inputobjectutils": "4.21.0",
|
|
36
|
+
"@quenty/lipsum": "14.22.1-canary.6a5af88.0",
|
|
37
|
+
"@quenty/loader": "10.9.0",
|
|
38
|
+
"@quenty/maid": "3.5.0",
|
|
39
|
+
"@quenty/math": "2.7.3",
|
|
40
|
+
"@quenty/promise": "10.12.0",
|
|
41
|
+
"@quenty/promisemaid": "5.12.0",
|
|
42
|
+
"@quenty/promptqueue": "1.22.1-canary.6a5af88.0",
|
|
43
|
+
"@quenty/qgui": "2.4.1-canary.6a5af88.0",
|
|
44
|
+
"@quenty/rx": "13.20.0",
|
|
45
|
+
"@quenty/servicebag": "11.13.1",
|
|
46
|
+
"@quenty/table": "3.8.0",
|
|
47
|
+
"@quenty/textserviceutils": "13.22.1-canary.6a5af88.0",
|
|
48
|
+
"@quenty/transitionmodel": "7.23.1-canary.6a5af88.0",
|
|
49
|
+
"@quenty/utf8": "2.3.3",
|
|
50
|
+
"@quenty/valueobject": "13.21.1-canary.6a5af88.0",
|
|
51
51
|
"@quentystudios/t": "^3.0.0"
|
|
52
52
|
},
|
|
53
53
|
"publishConfig": {
|
|
54
54
|
"access": "public"
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "6a5af88028456bdfcbab401ca38d0c3ecf4a71e8"
|
|
57
57
|
}
|
|
@@ -33,7 +33,7 @@ local PADDING_FROM_BOTTOM = 10
|
|
|
33
33
|
|
|
34
34
|
local DRAG_DISTANCE_TO_HIDE = 48
|
|
35
35
|
local DURATION = 3
|
|
36
|
-
local SHOW_POSITION = UDim2.
|
|
36
|
+
local SHOW_POSITION = UDim2.fromScale(1, 1)
|
|
37
37
|
local HIDE_POSITION = UDim2.new(1, 0, 1, 48)
|
|
38
38
|
|
|
39
39
|
local PADDING_X = 24
|
|
@@ -189,16 +189,16 @@ function Snackbar._updateHideFromDragTarget(self: Snackbar, doNotAnimate: boolea
|
|
|
189
189
|
local hideTarget
|
|
190
190
|
if target.Y > 0 then
|
|
191
191
|
-- Down
|
|
192
|
-
hideTarget = SHOW_POSITION + UDim2.
|
|
192
|
+
hideTarget = SHOW_POSITION + UDim2.fromOffset(0, guiSize.Y)
|
|
193
193
|
elseif target.Y < 0 then
|
|
194
194
|
-- Up
|
|
195
|
-
hideTarget = SHOW_POSITION + UDim2.
|
|
195
|
+
hideTarget = SHOW_POSITION + UDim2.fromOffset(0, -guiSize.Y)
|
|
196
196
|
elseif target.X < 0 then
|
|
197
|
-
hideTarget = SHOW_POSITION + UDim2.
|
|
197
|
+
hideTarget = SHOW_POSITION + UDim2.fromOffset(-guiSize.X, 0)
|
|
198
198
|
elseif target.X > 0 then
|
|
199
|
-
hideTarget = SHOW_POSITION + UDim2.
|
|
199
|
+
hideTarget = SHOW_POSITION + UDim2.fromOffset(guiSize.X, 0)
|
|
200
200
|
else
|
|
201
|
-
hideTarget = SHOW_POSITION + UDim2.
|
|
201
|
+
hideTarget = SHOW_POSITION + UDim2.fromOffset(0, guiSize.Y)
|
|
202
202
|
end
|
|
203
203
|
|
|
204
204
|
self._positionSpringModel:SetHideTarget(hideTarget, doNotAnimate)
|
|
@@ -219,7 +219,7 @@ function Snackbar._render(self: Snackbar)
|
|
|
219
219
|
return Blend.New("Frame")({
|
|
220
220
|
ZIndex = 1,
|
|
221
221
|
Name = "Snackbar",
|
|
222
|
-
Size = UDim2.
|
|
222
|
+
Size = UDim2.fromScale(0, 0),
|
|
223
223
|
AutomaticSize = Enum.AutomaticSize.XY,
|
|
224
224
|
Position = Blend.Computed(
|
|
225
225
|
self._positionSpringModel:Observe(),
|
|
@@ -243,7 +243,7 @@ function Snackbar._render(self: Snackbar)
|
|
|
243
243
|
}),
|
|
244
244
|
|
|
245
245
|
Blend.New("ImageButton")({
|
|
246
|
-
Size = UDim2.
|
|
246
|
+
Size = UDim2.fromScale(0, 0),
|
|
247
247
|
AnchorPoint = Vector2.new(1, 1),
|
|
248
248
|
AutomaticSize = Enum.AutomaticSize.XY,
|
|
249
249
|
BackgroundTransparency = 1,
|
|
@@ -286,7 +286,7 @@ function Snackbar._render(self: Snackbar)
|
|
|
286
286
|
Blend.New("Frame")({
|
|
287
287
|
Name = "InnerSnackbarContainer",
|
|
288
288
|
AutomaticSize = Enum.AutomaticSize.XY,
|
|
289
|
-
Size = UDim2.
|
|
289
|
+
Size = UDim2.fromScale(0, 0),
|
|
290
290
|
ZIndex = 2,
|
|
291
291
|
BackgroundColor3 = self._backgroundColor:Observe(),
|
|
292
292
|
BackgroundTransparency = self._computedTransparency,
|
|
@@ -324,8 +324,8 @@ function Snackbar._render(self: Snackbar)
|
|
|
324
324
|
BackgroundTransparency = 1,
|
|
325
325
|
AutomaticSize = Enum.AutomaticSize.XY,
|
|
326
326
|
TextColor3 = Color3.new(1, 1, 1),
|
|
327
|
-
Size = UDim2.
|
|
328
|
-
Position = UDim2.
|
|
327
|
+
Size = UDim2.fromScale(0, 0),
|
|
328
|
+
Position = UDim2.fromOffset(0, 18),
|
|
329
329
|
TextXAlignment = Enum.TextXAlignment.Left,
|
|
330
330
|
TextYAlignment = Enum.TextYAlignment.Center,
|
|
331
331
|
BorderSizePixel = 0,
|
|
@@ -358,14 +358,14 @@ function Snackbar._renderCallToAction(self: Snackbar, callToAction)
|
|
|
358
358
|
|
|
359
359
|
local buttonModel = self._maid:Add(ButtonHighlightModel.new())
|
|
360
360
|
|
|
361
|
-
return Blend.New
|
|
361
|
+
return Blend.New("TextButton")({
|
|
362
362
|
Name = "CallToActionButton",
|
|
363
363
|
AnchorPoint = Vector2.new(1, 0.5),
|
|
364
364
|
LayoutOrder = 2,
|
|
365
365
|
BackgroundTransparency = 1,
|
|
366
|
-
Position = UDim2.
|
|
366
|
+
Position = UDim2.fromScale(1, 0.5),
|
|
367
367
|
AutomaticSize = Enum.AutomaticSize.X,
|
|
368
|
-
Size = UDim2.
|
|
368
|
+
Size = UDim2.fromOffset(0, 18),
|
|
369
369
|
Text = UTF8.upper(callToActionText),
|
|
370
370
|
Font = Enum.Font.SourceSans,
|
|
371
371
|
TextSize = assert(self._textLabel, "Must have textLabel").TextSize,
|
|
@@ -380,14 +380,14 @@ function Snackbar._renderCallToAction(self: Snackbar, callToAction)
|
|
|
380
380
|
buttonModel:SetButton(gui)
|
|
381
381
|
end,
|
|
382
382
|
|
|
383
|
-
[Blend.OnEvent
|
|
383
|
+
[Blend.OnEvent("Activated")] = function()
|
|
384
384
|
self:Hide()
|
|
385
385
|
|
|
386
386
|
if onClick then
|
|
387
387
|
onClick()
|
|
388
388
|
end
|
|
389
389
|
end,
|
|
390
|
-
}
|
|
390
|
+
})
|
|
391
391
|
end
|
|
392
392
|
|
|
393
393
|
return Snackbar
|