@rbxts/uiblox 0.1.35 → 0.1.36

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.
@@ -3,7 +3,8 @@ import { WriteableStyle } from "../interfaces/index";
3
3
  export interface CommonProps<T extends Instance> extends PropsWithChildren {
4
4
  className?: WriteableStyle<T>;
5
5
  component?: T;
6
- key?: React.Key;
6
+ id?: React.Key;
7
+ ref?: React.Ref<T>;
7
8
  }
8
9
  export type BaseDefaultProps<T extends Instance, P> = CommonProps<T> & P;
9
10
  export type BaseCustomizedProps<T extends Instance, P> = BaseDefaultProps<T, P>;
@@ -40,7 +40,8 @@ local function Button(props)
40
40
  local mouseLeave = _binding.mouseLeave
41
41
  local className = _binding.className
42
42
  local children = _binding.children
43
- local key = _binding.key
43
+ local id = _binding.id
44
+ local ref = _binding.ref
44
45
  local _binding_1 = useButtonStyles(props)
45
46
  local root = _binding_1.root
46
47
  local font = _binding_1.font
@@ -48,11 +49,12 @@ local function Button(props)
48
49
  local stroke = _binding_1.stroke
49
50
  local hovering, setHovering = useState(false)
50
51
  local _attributes = {}
51
- local _condition = key
52
+ local _condition = id
52
53
  if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
53
54
  _condition = "Button"
54
55
  end
55
56
  _attributes.key = _condition
57
+ _attributes.ref = ref
56
58
  for _k, _v in root do
57
59
  _attributes[_k] = _v
58
60
  end
@@ -5,15 +5,17 @@ local useDividerStyles = TS.import(script, script.Parent, "Divider.styles").defa
5
5
  local function Divider(props)
6
6
  local _binding = props
7
7
  local className = _binding.className
8
- local key = _binding.key
8
+ local id = _binding.id
9
+ local ref = _binding.ref
9
10
  local _binding_1 = useDividerStyles(props)
10
11
  local root = _binding_1.root
11
12
  local _attributes = {}
12
- local _condition = key
13
+ local _condition = id
13
14
  if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
14
15
  _condition = "Divider"
15
16
  end
16
17
  _attributes.key = _condition
18
+ _attributes.ref = ref
17
19
  for _k, _v in root do
18
20
  _attributes[_k] = _v
19
21
  end
@@ -7,15 +7,17 @@ local function Icon(props)
7
7
  local icon = _binding.icon
8
8
  local tint = _binding.tint
9
9
  local className = _binding.className
10
- local key = _binding.key
10
+ local id = _binding.id
11
+ local ref = _binding.ref
11
12
  local _binding_1 = useIconStyles(props)
12
13
  local container = _binding_1.container
13
14
  local _attributes = {}
14
- local _condition = key
15
+ local _condition = id
15
16
  if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
16
17
  _condition = "Icon"
17
18
  end
18
19
  _attributes.key = _condition
20
+ _attributes.ref = ref
19
21
  for _k, _v in container do
20
22
  _attributes[_k] = _v
21
23
  end
@@ -11,16 +11,18 @@ local function IconButton(props)
11
11
  local tint = _binding.tint
12
12
  local onClick = _binding.onClick
13
13
  local className = _binding.className
14
- local key = _binding.key
14
+ local id = _binding.id
15
+ local ref = _binding.ref
15
16
  local _binding_1 = useIconButtonStyles(props)
16
17
  local container = _binding_1.container
17
18
  local hovering, setHovering = useState(false)
18
19
  local _attributes = {}
19
- local _condition = key
20
+ local _condition = id
20
21
  if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
21
22
  _condition = "IconButton"
22
23
  end
23
24
  _attributes.key = _condition
25
+ _attributes.ref = ref
24
26
  for _k, _v in container do
25
27
  _attributes[_k] = _v
26
28
  end
@@ -33,7 +33,8 @@ local function Input(props)
33
33
  local onBlur = _binding.onBlur
34
34
  local onEnterPressed = _binding.onEnterPressed
35
35
  local className = _binding.className
36
- local key = _binding.key
36
+ local id = _binding.id
37
+ local ref = _binding.ref
37
38
  local _binding_1 = useInputStyles(props)
38
39
  local root = _binding_1.root
39
40
  local font = _binding_1.font
@@ -51,11 +52,12 @@ local function Input(props)
51
52
  end
52
53
  local input, setInput = useState(_condition)
53
54
  local _attributes = {}
54
- local _condition_1 = key
55
+ local _condition_1 = id
55
56
  if not (_condition_1 ~= 0 and _condition_1 == _condition_1 and _condition_1 ~= "" and _condition_1) then
56
57
  _condition_1 = "Input"
57
58
  end
58
59
  _attributes.key = _condition_1
60
+ _attributes.ref = ref
59
61
  for _k, _v in root do
60
62
  _attributes[_k] = _v
61
63
  end
@@ -60,7 +60,8 @@ local function Grid(props)
60
60
  end
61
61
  local className = _binding.className
62
62
  local children = _binding.children
63
- local key = _binding.key
63
+ local id = _binding.id
64
+ local ref = _binding.ref
64
65
  local _binding_1 = useGridStyles({
65
66
  cellPadding = cellPadding,
66
67
  cellSize = cellSize,
@@ -74,11 +75,12 @@ local function Grid(props)
74
75
  local baseGrid = _binding_1.baseGrid
75
76
  local baseLayout = _binding_1.baseLayout
76
77
  local _attributes = {}
77
- local _condition = key
78
+ local _condition = id
78
79
  if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
79
80
  _condition = "Grid"
80
81
  end
81
82
  _attributes.key = _condition
83
+ _attributes.ref = ref
82
84
  for _k, _v in baseGrid do
83
85
  _attributes[_k] = _v
84
86
  end
@@ -60,7 +60,8 @@ local function List(props)
60
60
  end
61
61
  local className = _binding.className
62
62
  local children = _binding.children
63
- local key = _binding.key
63
+ local id = _binding.id
64
+ local ref = _binding.ref
64
65
  local _binding_1 = useListStyles({
65
66
  padding = padding,
66
67
  fillDirection = fillDirection,
@@ -74,11 +75,12 @@ local function List(props)
74
75
  local baseList = _binding_1.baseList
75
76
  local baseLayout = _binding_1.baseLayout
76
77
  local _attributes = {}
77
- local _condition = key
78
+ local _condition = id
78
79
  if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
79
80
  _condition = "List"
80
81
  end
81
82
  _attributes.key = _condition
83
+ _attributes.ref = ref
82
84
  for _k, _v in baseList do
83
85
  _attributes[_k] = _v
84
86
  end
@@ -34,7 +34,8 @@ local function Preloader(props)
34
34
  local Adornment = _binding.adornment
35
35
  local className = _binding.className
36
36
  local children = _binding.children
37
- local key = _binding.key
37
+ local id = _binding.id
38
+ local ref = _binding.ref
38
39
  local percentage, setPercentage = useState(0)
39
40
  local loaded, setLoaded = useState(false)
40
41
  local _binding_1 = usePreloaderStyles(props)
@@ -102,11 +103,12 @@ local function Preloader(props)
102
103
  })
103
104
  else
104
105
  local _attributes = {}
105
- local _condition = key
106
+ local _condition = id
106
107
  if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
107
108
  _condition = "Preloader"
108
109
  end
109
110
  _attributes.key = _condition
111
+ _attributes.ref = ref
110
112
  for _k, _v in container do
111
113
  _attributes[_k] = _v
112
114
  end
@@ -6,7 +6,8 @@ local function ProgressBar(props)
6
6
  local _binding = props
7
7
  local progress = _binding.progress
8
8
  local className = _binding.className
9
- local key = _binding.key
9
+ local id = _binding.id
10
+ local ref = _binding.ref
10
11
  local _binding_1 = useProgressBarStyles()
11
12
  local container = _binding_1.container
12
13
  local outer = _binding_1.outer
@@ -15,11 +16,12 @@ local function ProgressBar(props)
15
16
  local fill = _binding_1.fill
16
17
  local corner = _binding_1.corner
17
18
  local _attributes = {}
18
- local _condition = key
19
+ local _condition = id
19
20
  if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
20
21
  _condition = "ProgressBar"
21
22
  end
22
23
  _attributes.key = _condition
24
+ _attributes.ref = ref
23
25
  for _k, _v in container do
24
26
  _attributes[_k] = _v
25
27
  end
@@ -6,16 +6,18 @@ local function Sidebar(props)
6
6
  local _binding = props
7
7
  local className = _binding.className
8
8
  local children = _binding.children
9
- local key = _binding.key
9
+ local id = _binding.id
10
+ local ref = _binding.ref
10
11
  local _binding_1 = useSidebarStyles(props)
11
12
  local root = _binding_1.root
12
13
  local container = _binding_1.container
13
14
  local _attributes = {}
14
- local _condition = key
15
+ local _condition = id
15
16
  if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
16
17
  _condition = "Sidebar"
17
18
  end
18
19
  _attributes.key = _condition
20
+ _attributes.ref = ref
19
21
  for _k, _v in root do
20
22
  _attributes[_k] = _v
21
23
  end
@@ -19,7 +19,8 @@ local function Toast(props)
19
19
  duration = 4
20
20
  end
21
21
  local className = _binding.className
22
- local key = _binding.key
22
+ local id = _binding.id
23
+ local ref = _binding.ref
23
24
  local _binding_1 = useToastStyles(props)
24
25
  local container = _binding_1.container
25
26
  local label = _binding_1.label
@@ -56,7 +57,7 @@ local function Toast(props)
56
57
  end
57
58
  end, {})
58
59
  local _attributes = {}
59
- local _condition = key
60
+ local _condition = id
60
61
  if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
61
62
  _condition = "Toast"
62
63
  end
@@ -16,7 +16,8 @@ local function TreeView(props)
16
16
  local icon = _binding.icon
17
17
  local filter = _binding.filter
18
18
  local className = _binding.className
19
- local key = _binding.key
19
+ local id = _binding.id
20
+ local ref = _binding.ref
20
21
  local _binding_1 = useTreeViewStyles()
21
22
  local root = _binding_1.root
22
23
  local header = _binding_1.header
@@ -135,11 +136,12 @@ local function TreeView(props)
135
136
  setExpanded(newExpanded)
136
137
  end, { tree, filter })
137
138
  local _attributes = {}
138
- local _condition = key
139
+ local _condition = id
139
140
  if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
140
141
  _condition = "TreeView"
141
142
  end
142
143
  _attributes.key = _condition
144
+ _attributes.ref = ref
143
145
  for _k, _v in root do
144
146
  _attributes[_k] = _v
145
147
  end
@@ -10,16 +10,18 @@ local function Typography(props)
10
10
  end
11
11
  local className = _binding.className
12
12
  local children = _binding.children
13
- local key = _binding.key
13
+ local id = _binding.id
14
+ local ref = _binding.ref
14
15
  local _binding_1 = useTypographyStyles(props)
15
16
  local root = _binding_1.root
16
17
  local variantToken = _binding_1.variantToken
17
18
  local _attributes = {}
18
- local _condition = key
19
+ local _condition = id
19
20
  if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
20
21
  _condition = "Typography"
21
22
  end
22
23
  _attributes.key = _condition
24
+ _attributes.ref = ref
23
25
  for _k, _v in root do
24
26
  _attributes[_k] = _v
25
27
  end
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rbxts/uiblox",
3
- "version": "0.1.35",
3
+ "version": "0.1.36",
4
4
  "description": "UI Library and theming for roblox-ts projects",
5
5
  "main": "out/init.lua",
6
6
  "scripts": {