@rbxts/uiblox 0.2.0-alpha.21 → 0.2.0-alpha.22
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/out/ui/packages/imageList/components/ImageList.styles.luau +0 -1
- package/out/ui/packages/menu/components/Menu.luau +1 -1
- package/out/ui/packages/select/components/Select.luau +2 -39
- package/out/ui/packages/stateMatrix.luau +37 -31
- package/package.json +2 -2
- package/out/ui/packages/select/components/selectMotion.d.ts +0 -2
- package/out/ui/packages/select/components/selectMotion.luau +0 -12
|
@@ -77,7 +77,7 @@ local function Menu(props)
|
|
|
77
77
|
_newValue[_k] = _callback(_v, _k - 1, items)
|
|
78
78
|
end
|
|
79
79
|
-- ▲ ReadonlyArray.map ▲
|
|
80
|
-
_result = _newValue
|
|
80
|
+
_result = (React.createElement(React.Fragment, nil, _newValue))
|
|
81
81
|
end
|
|
82
82
|
return React.createElement(Popup, {
|
|
83
83
|
anchor = anchor,
|
|
@@ -17,7 +17,6 @@ local canActivate = TS.import(script, script.Parent.Parent.Parent, "button", "co
|
|
|
17
17
|
local spinnerPixels = TS.import(script, script.Parent.Parent.Parent, "button", "components", "buttonLook").spinnerPixels
|
|
18
18
|
local CircularProgress = TS.import(script, script.Parent.Parent.Parent, "circularProgress").CircularProgress
|
|
19
19
|
local Input = TS.import(script, script.Parent.Parent.Parent, "input").Input
|
|
20
|
-
local playProperty = TS.import(script, script.Parent.Parent.Parent, "motion").playProperty
|
|
21
20
|
local Popup = TS.import(script, script.Parent.Parent.Parent, "popup").Popup
|
|
22
21
|
local Shadow = TS.import(script, script.Parent.Parent.Parent, "shadow").Shadow
|
|
23
22
|
local _virtualList = TS.import(script, script.Parent.Parent.Parent, "virtualList")
|
|
@@ -33,7 +32,6 @@ local _selectGroups = TS.import(script, script.Parent, "selectGroups")
|
|
|
33
32
|
local groupRows = _selectGroups.groupRows
|
|
34
33
|
local rowForOption = _selectGroups.rowForOption
|
|
35
34
|
local shouldHandleSelectKey = TS.import(script, script.Parent, "selectKey").shouldHandleSelectKey
|
|
36
|
-
local menuHold = TS.import(script, script.Parent, "selectMotion").menuHold
|
|
37
35
|
local _selectMulti = TS.import(script, script.Parent, "selectMulti")
|
|
38
36
|
local includesChoice = _selectMulti.includesChoice
|
|
39
37
|
local selectionLabel = _selectMulti.selectionLabel
|
|
@@ -75,7 +73,6 @@ local function Select(props)
|
|
|
75
73
|
local active = canActivate(disabled, loading)
|
|
76
74
|
local anchor, setAnchor = useState()
|
|
77
75
|
local open, setOpen = useState(defaultOpen == true and not loading)
|
|
78
|
-
local held, setHeld = useState(false)
|
|
79
76
|
local focused, setFocused = useState(false)
|
|
80
77
|
local highlight, setHighlight = useState(-1)
|
|
81
78
|
local _condition = defaultQuery
|
|
@@ -87,7 +84,6 @@ local function Select(props)
|
|
|
87
84
|
local typed = useRef()
|
|
88
85
|
local onKeyRef = useRef()
|
|
89
86
|
local listRef = useRef()
|
|
90
|
-
local menuRef = useRef()
|
|
91
87
|
-- ▼ ReadonlyArray.find ▼
|
|
92
88
|
local _callback = function(option)
|
|
93
89
|
return option.value == value
|
|
@@ -242,40 +238,12 @@ local function Select(props)
|
|
|
242
238
|
_result_1.ensureVisible(rowForOption(rows, highlight))
|
|
243
239
|
end
|
|
244
240
|
end, { shown, highlight })
|
|
245
|
-
useEffect(function()
|
|
246
|
-
if shown then
|
|
247
|
-
setHeld(true)
|
|
248
|
-
end
|
|
249
|
-
end, { shown })
|
|
250
241
|
useEffect(function()
|
|
251
242
|
if loading and open then
|
|
252
243
|
setOpen(false)
|
|
253
244
|
setQuery("")
|
|
254
245
|
end
|
|
255
246
|
end, { loading, open })
|
|
256
|
-
useEffect(function()
|
|
257
|
-
local menu = menuRef.current
|
|
258
|
-
if not menu or not held then
|
|
259
|
-
return nil
|
|
260
|
-
end
|
|
261
|
-
local stop = playProperty(menu, {
|
|
262
|
-
GroupTransparency = if shown then 0 else 1,
|
|
263
|
-
}, 0.12, reducedMotion)
|
|
264
|
-
local seconds = menuHold(shown, reducedMotion)
|
|
265
|
-
if seconds == 0 then
|
|
266
|
-
if not shown then
|
|
267
|
-
setHeld(false)
|
|
268
|
-
end
|
|
269
|
-
return stop
|
|
270
|
-
end
|
|
271
|
-
local wait = task.delay(seconds, function()
|
|
272
|
-
return setHeld(false)
|
|
273
|
-
end)
|
|
274
|
-
return function()
|
|
275
|
-
stop()
|
|
276
|
-
task.cancel(wait)
|
|
277
|
-
end
|
|
278
|
-
end, { shown, held, reducedMotion })
|
|
279
247
|
local _attributes = {}
|
|
280
248
|
local _condition_2 = id
|
|
281
249
|
if not (_condition_2 ~= 0 and _condition_2 == _condition_2 and _condition_2 ~= "" and _condition_2) then
|
|
@@ -360,7 +328,7 @@ local function Select(props)
|
|
|
360
328
|
Position = UDim2.new(1, -theme.padding.calc(1), 0.5, 0),
|
|
361
329
|
},
|
|
362
330
|
})))
|
|
363
|
-
local _condition_3 =
|
|
331
|
+
local _condition_3 = shown
|
|
364
332
|
if _condition_3 then
|
|
365
333
|
local _attributes_5 = {
|
|
366
334
|
key = "Menu",
|
|
@@ -405,11 +373,6 @@ local function Select(props)
|
|
|
405
373
|
onInput = function(input)
|
|
406
374
|
return onKey(input, true)
|
|
407
375
|
end,
|
|
408
|
-
}, React.createElement("canvasgroup", {
|
|
409
|
-
ref = menuRef,
|
|
410
|
-
Size = UDim2.fromScale(1, 1),
|
|
411
|
-
BackgroundTransparency = 1,
|
|
412
|
-
GroupTransparency = 1,
|
|
413
376
|
}, React.createElement("frame", _attributes_5, _exp_3, _exp_4, _exp_5, _exp_6, _condition_4, React.createElement("frame", {
|
|
414
377
|
key = "ListHost",
|
|
415
378
|
Size = UDim2.new(1, 0, 1, if search then -row else 0),
|
|
@@ -469,7 +432,7 @@ local function Select(props)
|
|
|
469
432
|
setmetatable(_attributes_9, nil)
|
|
470
433
|
return React.createElement("textbutton", _attributes_8, React.createElement("uipadding", _attributes_9))
|
|
471
434
|
end,
|
|
472
|
-
})))))
|
|
435
|
+
})))))
|
|
473
436
|
end
|
|
474
437
|
return React.createElement("frame", _attributes, _exp_2, _condition_3)
|
|
475
438
|
end
|
|
@@ -2050,96 +2050,102 @@ local function miscRows()
|
|
|
2050
2050
|
local _Length_52 = #_array_53
|
|
2051
2051
|
table.move(_array_53, 1, _Length_52, _length + 1, _array)
|
|
2052
2052
|
_length += _Length_52
|
|
2053
|
-
local _array_54 = pair("
|
|
2054
|
-
|
|
2053
|
+
local _array_54 = pair("ImageList", "untitled", {
|
|
2054
|
+
text = "",
|
|
2055
2055
|
})
|
|
2056
2056
|
local _Length_53 = #_array_54
|
|
2057
2057
|
table.move(_array_54, 1, _Length_53, _length + 1, _array)
|
|
2058
2058
|
_length += _Length_53
|
|
2059
|
-
local _array_55 = pair("SpeedDial", "
|
|
2060
|
-
open =
|
|
2059
|
+
local _array_55 = pair("SpeedDial", "closed", {
|
|
2060
|
+
open = false,
|
|
2061
2061
|
})
|
|
2062
2062
|
local _Length_54 = #_array_55
|
|
2063
2063
|
table.move(_array_55, 1, _Length_54, _length + 1, _array)
|
|
2064
2064
|
_length += _Length_54
|
|
2065
|
-
local _array_56 = pair("SpeedDial", "
|
|
2066
|
-
open =
|
|
2067
|
-
disabled = true,
|
|
2065
|
+
local _array_56 = pair("SpeedDial", "open", {
|
|
2066
|
+
open = true,
|
|
2068
2067
|
})
|
|
2069
2068
|
local _Length_55 = #_array_56
|
|
2070
2069
|
table.move(_array_56, 1, _Length_55, _length + 1, _array)
|
|
2071
2070
|
_length += _Length_55
|
|
2072
|
-
local _array_57 = pair("SpeedDial", "
|
|
2073
|
-
open =
|
|
2074
|
-
|
|
2071
|
+
local _array_57 = pair("SpeedDial", "disabled", {
|
|
2072
|
+
open = false,
|
|
2073
|
+
disabled = true,
|
|
2075
2074
|
})
|
|
2076
2075
|
local _Length_56 = #_array_57
|
|
2077
2076
|
table.move(_array_57, 1, _Length_56, _length + 1, _array)
|
|
2078
2077
|
_length += _Length_56
|
|
2079
|
-
local _array_58 = pair("
|
|
2080
|
-
|
|
2078
|
+
local _array_58 = pair("SpeedDial", "down", {
|
|
2079
|
+
open = true,
|
|
2080
|
+
variant = "down",
|
|
2081
2081
|
})
|
|
2082
2082
|
local _Length_57 = #_array_58
|
|
2083
2083
|
table.move(_array_58, 1, _Length_57, _length + 1, _array)
|
|
2084
2084
|
_length += _Length_57
|
|
2085
|
-
local _array_59 = pair("FormLabel", "
|
|
2085
|
+
local _array_59 = pair("FormLabel", "default", {
|
|
2086
2086
|
text = "Email",
|
|
2087
|
-
value = true,
|
|
2088
2087
|
})
|
|
2089
2088
|
local _Length_58 = #_array_59
|
|
2090
2089
|
table.move(_array_59, 1, _Length_58, _length + 1, _array)
|
|
2091
2090
|
_length += _Length_58
|
|
2092
|
-
local _array_60 = pair("FormLabel", "
|
|
2091
|
+
local _array_60 = pair("FormLabel", "required", {
|
|
2093
2092
|
text = "Email",
|
|
2094
|
-
|
|
2093
|
+
value = true,
|
|
2095
2094
|
})
|
|
2096
2095
|
local _Length_59 = #_array_60
|
|
2097
2096
|
table.move(_array_60, 1, _Length_59, _length + 1, _array)
|
|
2098
2097
|
_length += _Length_59
|
|
2099
|
-
local _array_61 = pair("
|
|
2100
|
-
text = "
|
|
2098
|
+
local _array_61 = pair("FormLabel", "error", {
|
|
2099
|
+
text = "Email",
|
|
2100
|
+
hasError = true,
|
|
2101
2101
|
})
|
|
2102
2102
|
local _Length_60 = #_array_61
|
|
2103
2103
|
table.move(_array_61, 1, _Length_60, _length + 1, _array)
|
|
2104
2104
|
_length += _Length_60
|
|
2105
|
-
local _array_62 = pair("FormHelperText", "
|
|
2106
|
-
text = "
|
|
2107
|
-
hasError = true,
|
|
2105
|
+
local _array_62 = pair("FormHelperText", "default", {
|
|
2106
|
+
text = "We never share this",
|
|
2108
2107
|
})
|
|
2109
2108
|
local _Length_61 = #_array_62
|
|
2110
2109
|
table.move(_array_62, 1, _Length_61, _length + 1, _array)
|
|
2111
2110
|
_length += _Length_61
|
|
2112
|
-
local _array_63 = pair("
|
|
2113
|
-
|
|
2111
|
+
local _array_63 = pair("FormHelperText", "error", {
|
|
2112
|
+
text = "Required",
|
|
2113
|
+
hasError = true,
|
|
2114
2114
|
})
|
|
2115
2115
|
local _Length_62 = #_array_63
|
|
2116
2116
|
table.move(_array_63, 1, _Length_62, _length + 1, _array)
|
|
2117
2117
|
_length += _Length_62
|
|
2118
|
-
local _array_64 = pair("Menu", "
|
|
2119
|
-
open =
|
|
2118
|
+
local _array_64 = pair("Menu", "closed", {
|
|
2119
|
+
open = false,
|
|
2120
2120
|
})
|
|
2121
2121
|
local _Length_63 = #_array_64
|
|
2122
2122
|
table.move(_array_64, 1, _Length_63, _length + 1, _array)
|
|
2123
2123
|
_length += _Length_63
|
|
2124
|
-
local _array_65 = pair("Menu", "
|
|
2124
|
+
local _array_65 = pair("Menu", "open", {
|
|
2125
2125
|
open = true,
|
|
2126
|
-
options = {},
|
|
2127
2126
|
})
|
|
2128
2127
|
local _Length_64 = #_array_65
|
|
2129
2128
|
table.move(_array_65, 1, _Length_64, _length + 1, _array)
|
|
2130
2129
|
_length += _Length_64
|
|
2131
|
-
local _array_66 = pair("Menu", "
|
|
2130
|
+
local _array_66 = pair("Menu", "empty", {
|
|
2132
2131
|
open = true,
|
|
2133
|
-
|
|
2132
|
+
options = {},
|
|
2134
2133
|
})
|
|
2135
2134
|
local _Length_65 = #_array_66
|
|
2136
2135
|
table.move(_array_66, 1, _Length_65, _length + 1, _array)
|
|
2137
2136
|
_length += _Length_65
|
|
2138
|
-
local _array_67 = pair("Menu", "
|
|
2137
|
+
local _array_67 = pair("Menu", "dense", {
|
|
2138
|
+
open = true,
|
|
2139
|
+
variant = "dense",
|
|
2140
|
+
})
|
|
2141
|
+
local _Length_66 = #_array_67
|
|
2142
|
+
table.move(_array_67, 1, _Length_66, _length + 1, _array)
|
|
2143
|
+
_length += _Length_66
|
|
2144
|
+
local _array_68 = pair("Menu", "selected", {
|
|
2139
2145
|
open = true,
|
|
2140
2146
|
selected = "a",
|
|
2141
2147
|
})
|
|
2142
|
-
table.move(
|
|
2148
|
+
table.move(_array_68, 1, #_array_68, _length + 1, _array)
|
|
2143
2149
|
return _array
|
|
2144
2150
|
end
|
|
2145
2151
|
local function concatRows(...)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rbxts/uiblox",
|
|
3
|
-
"version": "0.2.0-alpha.
|
|
3
|
+
"version": "0.2.0-alpha.22",
|
|
4
4
|
"description": "UI Library and theming for roblox-ts projects",
|
|
5
5
|
"main": "out/init.luau",
|
|
6
6
|
"packageManager": "pnpm@11.3.0",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"build": "rbxtsc",
|
|
9
9
|
"watch": "rbxtsc -w",
|
|
10
10
|
"pack:check": "node scripts/pack-check.mjs",
|
|
11
|
-
"test": "node scripts/no-internal-refs.check.mjs && node scripts/import-case.check.mjs && node --experimental-strip-types scripts/theme-scope.check.mjs && node --experimental-strip-types scripts/style-types.check.mjs && node --experimental-strip-types scripts/style-cache.check.mjs && node --experimental-strip-types scripts/style-variants.check.mjs && node --experimental-strip-types scripts/component-styles.check.mjs && node --experimental-strip-types scripts/interaction-styles.check.mjs && node --experimental-strip-types scripts/resolve-style.check.mjs && node --experimental-strip-types scripts/density.check.mjs && node --experimental-strip-types scripts/styles.check.mjs && node --experimental-strip-types scripts/contrast.check.mjs && node --experimental-strip-types scripts/primitives.check.mjs && node --experimental-strip-types scripts/paper.check.mjs && node --experimental-strip-types scripts/list-item.check.mjs && node --experimental-strip-types scripts/slider.check.mjs && node --experimental-strip-types scripts/input.check.mjs && node --experimental-strip-types scripts/menu.check.mjs && node --experimental-strip-types scripts/guard.check.mjs && node --experimental-strip-types scripts/breakpoints.check.mjs && node --experimental-strip-types scripts/focus-trap.check.mjs && node --experimental-strip-types scripts/select-typeahead.check.mjs && node --experimental-strip-types scripts/select-groups.check.mjs && node --experimental-strip-types scripts/select-multi.check.mjs && node --experimental-strip-types scripts/select-
|
|
11
|
+
"test": "node scripts/no-internal-refs.check.mjs && node scripts/import-case.check.mjs && node --experimental-strip-types scripts/theme-scope.check.mjs && node --experimental-strip-types scripts/style-types.check.mjs && node --experimental-strip-types scripts/style-cache.check.mjs && node --experimental-strip-types scripts/style-variants.check.mjs && node --experimental-strip-types scripts/component-styles.check.mjs && node --experimental-strip-types scripts/interaction-styles.check.mjs && node --experimental-strip-types scripts/resolve-style.check.mjs && node --experimental-strip-types scripts/density.check.mjs && node --experimental-strip-types scripts/styles.check.mjs && node --experimental-strip-types scripts/contrast.check.mjs && node --experimental-strip-types scripts/primitives.check.mjs && node --experimental-strip-types scripts/paper.check.mjs && node --experimental-strip-types scripts/list-item.check.mjs && node --experimental-strip-types scripts/slider.check.mjs && node --experimental-strip-types scripts/input.check.mjs && node --experimental-strip-types scripts/menu.check.mjs && node --experimental-strip-types scripts/guard.check.mjs && node --experimental-strip-types scripts/breakpoints.check.mjs && node --experimental-strip-types scripts/focus-trap.check.mjs && node --experimental-strip-types scripts/select-typeahead.check.mjs && node --experimental-strip-types scripts/select-groups.check.mjs && node --experimental-strip-types scripts/select-multi.check.mjs && node --experimental-strip-types scripts/select-polish.check.mjs && node --experimental-strip-types scripts/reduced-motion.check.mjs && node --experimental-strip-types scripts/card.check.mjs && node --experimental-strip-types scripts/chip.check.mjs && node --experimental-strip-types scripts/badge.check.mjs && node --experimental-strip-types scripts/avatar.check.mjs && node --experimental-strip-types scripts/imageList.check.mjs && node --experimental-strip-types scripts/drawer.check.mjs && node --experimental-strip-types scripts/breadcrumbs.check.mjs && node --experimental-strip-types scripts/pagination.check.mjs && node --experimental-strip-types scripts/stepper.check.mjs && node --experimental-strip-types scripts/accordion.check.mjs && node --experimental-strip-types scripts/snackbar.check.mjs && node --experimental-strip-types scripts/table.check.mjs && node --experimental-strip-types scripts/autocomplete.check.mjs && node --experimental-strip-types scripts/field-loading.check.mjs && node --experimental-strip-types scripts/fab.check.mjs && node --experimental-strip-types scripts/appbar.check.mjs && node --experimental-strip-types scripts/bottom-navigation.check.mjs && node --experimental-strip-types scripts/alert.check.mjs && node --experimental-strip-types scripts/toggle-button.check.mjs && node --experimental-strip-types scripts/link.check.mjs && node --experimental-strip-types scripts/rating.check.mjs && node --experimental-strip-types scripts/stack.check.mjs && node --experimental-strip-types scripts/flex-item.check.mjs && node --experimental-strip-types scripts/grid.check.mjs && node --experimental-strip-types scripts/speed-dial.check.mjs && node --experimental-strip-types scripts/form-text.check.mjs && node --experimental-strip-types scripts/box.check.mjs && node --experimental-strip-types scripts/image-list.check.mjs && node --experimental-strip-types scripts/radio-group.check.mjs && node --experimental-strip-types scripts/container.check.mjs && node --experimental-strip-types scripts/divider.check.mjs && node --experimental-strip-types scripts/switch.check.mjs && node --experimental-strip-types scripts/tabs.check.mjs && node --experimental-strip-types scripts/dialog.check.mjs && node --experimental-strip-types scripts/backdrop.check.mjs && node --experimental-strip-types scripts/cframe-editor.check.mjs && node --experimental-strip-types scripts/enum-picker.check.mjs && node --experimental-strip-types scripts/number-range.check.mjs && node --experimental-strip-types scripts/rect-editor.check.mjs && node --experimental-strip-types scripts/asset-field.check.mjs && node --experimental-strip-types scripts/gradient-editor.check.mjs && node --experimental-strip-types scripts/ray-editor.check.mjs && node --experimental-strip-types scripts/physical-properties.check.mjs && node --experimental-strip-types scripts/brickcolor-picker.check.mjs",
|
|
12
12
|
"prepublishOnly": "pnpm build"
|
|
13
13
|
},
|
|
14
14
|
"keywords": [
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
-- Compiled with roblox-ts v3.0.0
|
|
2
|
-
local SELECT_MENU_SECONDS = 0.12
|
|
3
|
-
local function menuHold(open, reducedMotion)
|
|
4
|
-
if open or reducedMotion == true then
|
|
5
|
-
return 0
|
|
6
|
-
end
|
|
7
|
-
return SELECT_MENU_SECONDS
|
|
8
|
-
end
|
|
9
|
-
return {
|
|
10
|
-
menuHold = menuHold,
|
|
11
|
-
SELECT_MENU_SECONDS = SELECT_MENU_SECONDS,
|
|
12
|
-
}
|