@rbxts/react-clean-ui 1.0.9 → 1.0.10
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/Components/Input/Button.d.ts +7 -7
- package/out/Components/Input/Button.luau +8 -33
- package/out/Components/Interaction/Tooltip.d.ts +11 -0
- package/out/Components/Interaction/Tooltip.luau +180 -0
- package/out/Components/Interaction/index.d.ts +2 -0
- package/out/Components/Interaction/init.luau +10 -0
- package/out/Components/Typography/Text.d.ts +2 -7
- package/out/Components/Typography/Text.luau +22 -42
- package/out/Components/index.d.ts +2 -3
- package/out/Components/init.luau +4 -7
- package/out/Theme/theme.template.d.ts +6 -0
- package/out/Theme/themes/default.theme.luau +25 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from "@rbxts/react";
|
|
2
2
|
import { BackgroundElementProps, IconElementProps, IntentElementProps, ScalableElementProps, ShadowElementProps, SpacedElementProps, ZIndexElementProps } from "../../Interfaces/";
|
|
3
3
|
import { IconProps } from "../Surface";
|
|
4
4
|
export interface ButtonProps extends SpacedElementProps, ShadowElementProps, ZIndexElementProps, BackgroundElementProps, IntentElementProps, ScalableElementProps, IconElementProps {
|
|
@@ -16,9 +16,9 @@ declare function ButtonText(props: ButtonTextProps): React.JSX.Element;
|
|
|
16
16
|
export interface ButtonIconProps extends IconProps, IntentElementProps {
|
|
17
17
|
}
|
|
18
18
|
declare function ButtonIcon(props: ButtonIconProps): React.JSX.Element;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
export {};
|
|
19
|
+
type ButtonComponent = React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<ImageButton>> & {
|
|
20
|
+
Text: typeof ButtonText;
|
|
21
|
+
Icon: typeof ButtonIcon;
|
|
22
|
+
};
|
|
23
|
+
declare const Button: ButtonComponent;
|
|
24
|
+
export { Button };
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
-- Compiled with roblox-ts v3.0.0
|
|
2
2
|
local TS = _G[script]
|
|
3
|
-
local
|
|
4
|
-
local React = _react
|
|
5
|
-
local Component = _react.Component
|
|
6
|
-
local ReactComponent = _react.ReactComponent
|
|
3
|
+
local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
7
4
|
local CleanThemeContext = TS.import(script, script.Parent.Parent.Parent, "Contexts").CleanThemeContext
|
|
8
5
|
local _Decorator = TS.import(script, script.Parent.Parent, "Decorator")
|
|
9
6
|
local BoxShadow = _Decorator.BoxShadow
|
|
@@ -37,12 +34,14 @@ local function ButtonIcon(props)
|
|
|
37
34
|
color = ColorHelper:getIntentColors(theme, props.intent, "default", theme.components.button.intents).textColor,
|
|
38
35
|
})
|
|
39
36
|
end
|
|
40
|
-
local
|
|
37
|
+
local Button = React.forwardRef(function(props, ref)
|
|
41
38
|
local theme = React.useContext(CleanThemeContext)
|
|
42
39
|
local hover, setHover = React.useState(false)
|
|
43
40
|
local group = React.useContext(GroupContext)
|
|
44
41
|
local padding = SpacingHelper:GetResolvedPadding(theme, props)
|
|
45
|
-
local _attributes = {
|
|
42
|
+
local _attributes = {
|
|
43
|
+
ref = ref,
|
|
44
|
+
}
|
|
46
45
|
local _object = {}
|
|
47
46
|
local _spread = props.Event
|
|
48
47
|
if _spread then
|
|
@@ -127,33 +126,9 @@ local function ButtonRender(props)
|
|
|
127
126
|
intent = props.intent,
|
|
128
127
|
scale = props.scale,
|
|
129
128
|
})), props.children))
|
|
130
|
-
end
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
local super = Component
|
|
134
|
-
Button = setmetatable({}, {
|
|
135
|
-
__tostring = function()
|
|
136
|
-
return "Button"
|
|
137
|
-
end,
|
|
138
|
-
__index = super,
|
|
139
|
-
})
|
|
140
|
-
Button.__index = Button
|
|
141
|
-
function Button.new(...)
|
|
142
|
-
local self = setmetatable({}, Button)
|
|
143
|
-
return self:constructor(...) or self
|
|
144
|
-
end
|
|
145
|
-
function Button:constructor(...)
|
|
146
|
-
super.constructor(self, ...)
|
|
147
|
-
end
|
|
148
|
-
function Button:render()
|
|
149
|
-
local _attributes = table.clone(self.props)
|
|
150
|
-
setmetatable(_attributes, nil)
|
|
151
|
-
return React.createElement(ButtonRender, _attributes)
|
|
152
|
-
end
|
|
153
|
-
Button.Text = ButtonText
|
|
154
|
-
Button.Icon = ButtonIcon
|
|
155
|
-
Button = ReactComponent(Button) or Button
|
|
156
|
-
end
|
|
129
|
+
end)
|
|
130
|
+
Button.Text = ButtonText
|
|
131
|
+
Button.Icon = ButtonIcon
|
|
157
132
|
return {
|
|
158
133
|
Button = Button,
|
|
159
134
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "@rbxts/react";
|
|
2
|
+
import { IntentElementProps } from "../../Interfaces";
|
|
3
|
+
import { BoxProps } from "../Surface";
|
|
4
|
+
type TooltipPlacement = "Top" | "Bottom" | "Left" | "Right";
|
|
5
|
+
interface TooltipProps extends BoxProps, IntentElementProps {
|
|
6
|
+
content: React.ReactNode | string;
|
|
7
|
+
children: React.ReactElement<React.InstanceProps<GuiObject>>;
|
|
8
|
+
placement?: TooltipPlacement;
|
|
9
|
+
}
|
|
10
|
+
export declare function Tooltip(props: TooltipProps): React.JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local TS = _G[script]
|
|
3
|
+
local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
4
|
+
local _Contexts = TS.import(script, script.Parent.Parent.Parent, "Contexts")
|
|
5
|
+
local CleanThemeContext = _Contexts.CleanThemeContext
|
|
6
|
+
local OverlayConsumer = _Contexts.OverlayConsumer
|
|
7
|
+
local Text = TS.import(script, script.Parent.Parent, "Typography").Text
|
|
8
|
+
local ReactRoblox = TS.import(script, TS.getModule(script, "@rbxts", "react-roblox"))
|
|
9
|
+
local _Decorator = TS.import(script, script.Parent.Parent, "Decorator")
|
|
10
|
+
local BoxShadow = _Decorator.BoxShadow
|
|
11
|
+
local Corners = _Decorator.Corners
|
|
12
|
+
local Padding = _Decorator.Padding
|
|
13
|
+
local _Helpers = TS.import(script, script.Parent.Parent.Parent, "Helpers")
|
|
14
|
+
local ColorHelper = _Helpers.ColorHelper
|
|
15
|
+
local CssHelper = _Helpers.CssHelper
|
|
16
|
+
local SpacingHelper = _Helpers.SpacingHelper
|
|
17
|
+
local function TooltipPopup(props)
|
|
18
|
+
local theme = React.useContext(CleanThemeContext)
|
|
19
|
+
local anchor = Vector2.zero
|
|
20
|
+
local _position = props.target.position
|
|
21
|
+
local _absolutePosition = props.overlay.AbsolutePosition
|
|
22
|
+
local position = _position - _absolutePosition
|
|
23
|
+
local _exp = props.placement or "Top"
|
|
24
|
+
repeat
|
|
25
|
+
if _exp == "Top" then
|
|
26
|
+
anchor = Vector2.new(0.5, 1)
|
|
27
|
+
local _position_1 = position
|
|
28
|
+
local _vector2 = Vector2.new(props.target.size.X / 2, 0)
|
|
29
|
+
position = _position_1 + _vector2
|
|
30
|
+
break
|
|
31
|
+
end
|
|
32
|
+
if _exp == "Bottom" then
|
|
33
|
+
anchor = Vector2.new(0.5, 0)
|
|
34
|
+
local _position_1 = position
|
|
35
|
+
local _vector2 = Vector2.new(props.target.size.X / 2, props.target.size.Y)
|
|
36
|
+
position = _position_1 + _vector2
|
|
37
|
+
break
|
|
38
|
+
end
|
|
39
|
+
if _exp == "Left" then
|
|
40
|
+
anchor = Vector2.new(1, 0.5)
|
|
41
|
+
local _position_1 = position
|
|
42
|
+
local _vector2 = Vector2.new(0, props.target.size.Y / 2)
|
|
43
|
+
position = _position_1 + _vector2
|
|
44
|
+
break
|
|
45
|
+
end
|
|
46
|
+
if _exp == "Right" then
|
|
47
|
+
anchor = Vector2.new(0, 0.5)
|
|
48
|
+
local _position_1 = position
|
|
49
|
+
local _vector2 = Vector2.new(props.target.size.X, props.target.size.Y / 2)
|
|
50
|
+
position = _position_1 + _vector2
|
|
51
|
+
break
|
|
52
|
+
end
|
|
53
|
+
until true
|
|
54
|
+
local intent = ColorHelper:getIntentColors(theme, props.intent, "default", theme.components.tooltip.intents)
|
|
55
|
+
local _value = theme.components.tooltip.boxShadow
|
|
56
|
+
local shadow = if _value ~= 0 and _value == _value and _value ~= "" and _value then CssHelper:parseCssShadow(theme.components.tooltip.boxShadow) else nil
|
|
57
|
+
local padding = SpacingHelper:ResolveNumberPadding(SpacingHelper:GetPadding(theme, props.spacing, theme.components.tooltip.spacing))
|
|
58
|
+
local _exp_1 = shadow ~= nil and React.createElement(Padding, {
|
|
59
|
+
resolvedPadding = {
|
|
60
|
+
top = shadow.blurRadius.Offset + shadow.spread.Y.Offset - shadow.offset.Y.Offset,
|
|
61
|
+
bottom = shadow.blurRadius.Offset + shadow.spread.Y.Offset + shadow.offset.Y.Offset,
|
|
62
|
+
left = shadow.blurRadius.Offset + shadow.spread.X.Offset - shadow.offset.X.Offset,
|
|
63
|
+
right = shadow.blurRadius.Offset + shadow.spread.X.Offset + shadow.offset.X.Offset,
|
|
64
|
+
},
|
|
65
|
+
})
|
|
66
|
+
local _attributes = table.clone(props)
|
|
67
|
+
setmetatable(_attributes, nil)
|
|
68
|
+
_attributes.value = theme.components.box.boxShadow
|
|
69
|
+
local _exp_2 = React.createElement(BoxShadow, _attributes)
|
|
70
|
+
local _exp_3 = React.createElement(Corners, {
|
|
71
|
+
radius = theme.components.button.cornerRadius,
|
|
72
|
+
})
|
|
73
|
+
local _attributes_1 = table.clone(props)
|
|
74
|
+
setmetatable(_attributes_1, nil)
|
|
75
|
+
_attributes_1.resolvedPadding = padding
|
|
76
|
+
local _exp_4 = React.createElement(Padding, _attributes_1)
|
|
77
|
+
local _attributes_2 = {}
|
|
78
|
+
local _condition = props["border-thickness"]
|
|
79
|
+
if _condition == nil then
|
|
80
|
+
_condition = theme.components.box.borderThickness
|
|
81
|
+
end
|
|
82
|
+
_attributes_2.Thickness = _condition
|
|
83
|
+
_attributes_2.BorderStrokePosition = Enum.BorderStrokePosition.Inner
|
|
84
|
+
_attributes_2.Color = props["border-color"] or intent.borderColor
|
|
85
|
+
local _exp_5 = React.createElement("uistroke", _attributes_2)
|
|
86
|
+
local _content = props.content
|
|
87
|
+
return React.createElement("canvasgroup", {
|
|
88
|
+
Position = UDim2.fromOffset(position.X, position.Y),
|
|
89
|
+
AnchorPoint = anchor,
|
|
90
|
+
Size = UDim2.fromOffset(0, 0),
|
|
91
|
+
AutomaticSize = Enum.AutomaticSize.XY,
|
|
92
|
+
BackgroundTransparency = 1,
|
|
93
|
+
}, _exp_1, React.createElement("frame", {
|
|
94
|
+
Size = UDim2.fromOffset(0, 0),
|
|
95
|
+
AutomaticSize = Enum.AutomaticSize.XY,
|
|
96
|
+
BackgroundColor3 = intent.backgroundColor,
|
|
97
|
+
BackgroundTransparency = intent.backgroundTransparency,
|
|
98
|
+
}, _exp_2, _exp_3, _exp_4, _exp_5, if type(_content) == "string" then React.createElement(Text, {
|
|
99
|
+
text = props.content,
|
|
100
|
+
TextColor3 = intent.textColor,
|
|
101
|
+
}) else props.content))
|
|
102
|
+
end
|
|
103
|
+
local function Tooltip(props)
|
|
104
|
+
local targetRef = React.useRef()
|
|
105
|
+
local target, setTarget = React.useState()
|
|
106
|
+
local show = function()
|
|
107
|
+
local _result = targetRef.current
|
|
108
|
+
if _result ~= nil then
|
|
109
|
+
_result = _result.AbsolutePosition
|
|
110
|
+
end
|
|
111
|
+
if _result then
|
|
112
|
+
local _object = {}
|
|
113
|
+
local _left = "position"
|
|
114
|
+
local _result_1 = targetRef.current
|
|
115
|
+
if _result_1 ~= nil then
|
|
116
|
+
_result_1 = _result_1.AbsolutePosition
|
|
117
|
+
end
|
|
118
|
+
_object[_left] = _result_1
|
|
119
|
+
local _left_1 = "size"
|
|
120
|
+
local _result_2 = targetRef.current
|
|
121
|
+
if _result_2 ~= nil then
|
|
122
|
+
_result_2 = _result_2.AbsoluteSize
|
|
123
|
+
end
|
|
124
|
+
_object[_left_1] = _result_2
|
|
125
|
+
setTarget(_object)
|
|
126
|
+
end
|
|
127
|
+
end
|
|
128
|
+
local hide = function()
|
|
129
|
+
setTarget(nil)
|
|
130
|
+
end
|
|
131
|
+
local _exp = props.children
|
|
132
|
+
local _object = {
|
|
133
|
+
ref = targetRef,
|
|
134
|
+
}
|
|
135
|
+
local _left = "Event"
|
|
136
|
+
local _object_1 = {}
|
|
137
|
+
local _spread = props.children.props.Event
|
|
138
|
+
if _spread then
|
|
139
|
+
for _k, _v in _spread do
|
|
140
|
+
_object_1[_k] = _v
|
|
141
|
+
end
|
|
142
|
+
end
|
|
143
|
+
_object_1.MouseEnter = function(guiObject, x, y)
|
|
144
|
+
local _result = props.children.props.Event
|
|
145
|
+
if _result ~= nil then
|
|
146
|
+
_result = _result.MouseEnter
|
|
147
|
+
if _result ~= nil then
|
|
148
|
+
_result(guiObject, x, y)
|
|
149
|
+
end
|
|
150
|
+
end
|
|
151
|
+
show()
|
|
152
|
+
end
|
|
153
|
+
_object_1.MouseLeave = function(guiObject, x, y)
|
|
154
|
+
local _result = props.children.props.Event
|
|
155
|
+
if _result ~= nil then
|
|
156
|
+
_result = _result.MouseLeave
|
|
157
|
+
if _result ~= nil then
|
|
158
|
+
_result(guiObject, x, y)
|
|
159
|
+
end
|
|
160
|
+
end
|
|
161
|
+
hide()
|
|
162
|
+
end
|
|
163
|
+
_object[_left] = _object_1
|
|
164
|
+
local child = React.cloneElement(_exp, _object)
|
|
165
|
+
return React.createElement(React.Fragment, nil, child, target ~= nil and (React.createElement(OverlayConsumer, {
|
|
166
|
+
render = function(overlay)
|
|
167
|
+
if overlay == nil then
|
|
168
|
+
return nil
|
|
169
|
+
end
|
|
170
|
+
local _attributes = table.clone(props)
|
|
171
|
+
setmetatable(_attributes, nil)
|
|
172
|
+
_attributes.overlay = overlay
|
|
173
|
+
_attributes.target = target
|
|
174
|
+
return ReactRoblox.createPortal(React.createElement(TooltipPopup, _attributes), overlay)
|
|
175
|
+
end,
|
|
176
|
+
})))
|
|
177
|
+
end
|
|
178
|
+
return {
|
|
179
|
+
Tooltip = Tooltip,
|
|
180
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local TS = _G[script]
|
|
3
|
+
local exports = {}
|
|
4
|
+
for _k, _v in TS.import(script, script, "Toast") or {} do
|
|
5
|
+
exports[_k] = _v
|
|
6
|
+
end
|
|
7
|
+
for _k, _v in TS.import(script, script, "Tooltip") or {} do
|
|
8
|
+
exports[_k] = _v
|
|
9
|
+
end
|
|
10
|
+
return exports
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import { CleanThemeContext } from "../../Contexts";
|
|
1
|
+
import React from "@rbxts/react";
|
|
3
2
|
import { TypographyStyle } from "../../Theme";
|
|
4
3
|
import { TextVariant } from "../../Interfaces/";
|
|
5
4
|
interface TextProps extends React.InstanceProps<TextLabel> {
|
|
@@ -10,9 +9,5 @@ interface TextProps extends React.InstanceProps<TextLabel> {
|
|
|
10
9
|
align?: "Left" | "Right" | "Center";
|
|
11
10
|
TextWrap?: boolean;
|
|
12
11
|
}
|
|
13
|
-
export declare
|
|
14
|
-
static contextType: React.Context<import("../../Theme").CleanTheme>;
|
|
15
|
-
context: React.ContextType<typeof CleanThemeContext>;
|
|
16
|
-
render(): React.ReactNode;
|
|
17
|
-
}
|
|
12
|
+
export declare const Text: React.ForwardRefExoticComponent<Omit<TextProps, "ref"> & React.RefAttributes<TextLabel>>;
|
|
18
13
|
export {};
|
|
@@ -1,48 +1,28 @@
|
|
|
1
1
|
-- Compiled with roblox-ts v3.0.0
|
|
2
2
|
local TS = _G[script]
|
|
3
|
-
local
|
|
4
|
-
local React = _react
|
|
5
|
-
local Component = _react.Component
|
|
6
|
-
local ReactComponent = _react.ReactComponent
|
|
3
|
+
local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
7
4
|
local CleanThemeContext = TS.import(script, script.Parent.Parent.Parent, "Contexts").CleanThemeContext
|
|
8
|
-
local Text
|
|
9
|
-
|
|
10
|
-
local
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
Size = UDim2.fromScale(0, 0),
|
|
30
|
-
AutomaticSize = Enum.AutomaticSize.XY,
|
|
31
|
-
LineHeight = style.lineHeight,
|
|
32
|
-
BackgroundTransparency = 1,
|
|
33
|
-
TextXAlignment = self.props.align or (self.props.TextXAlignment or Enum.TextXAlignment.Left),
|
|
34
|
-
TextColor3 = self.props.TextColor3 or self.context.colors.intents.primary.default.textColor,
|
|
35
|
-
Text = self.props.text,
|
|
36
|
-
TextWrap = self.props.TextWrap == nil or self.props.TextWrap == true,
|
|
37
|
-
FontFace = Font.fromName(style.font.Name, weight),
|
|
38
|
-
FontSize = style.size,
|
|
39
|
-
RichText = true,
|
|
40
|
-
TextScaled = false,
|
|
41
|
-
}, self.props.children)
|
|
42
|
-
end
|
|
43
|
-
Text.contextType = CleanThemeContext
|
|
44
|
-
Text = ReactComponent(Text) or Text
|
|
45
|
-
end
|
|
5
|
+
local Text = React.forwardRef(function(props, ref)
|
|
6
|
+
local theme = React.useContext(CleanThemeContext)
|
|
7
|
+
local style = props.typography or theme.typography[props.variant or "body"]
|
|
8
|
+
local weight = if props.weight == "bold" then Enum.FontWeight.Bold else props.weight or style.weight or Enum.FontWeight.Regular
|
|
9
|
+
return React.createElement("textlabel", {
|
|
10
|
+
ref = ref,
|
|
11
|
+
Size = UDim2.fromScale(0, 0),
|
|
12
|
+
AutomaticSize = Enum.AutomaticSize.XY,
|
|
13
|
+
LineHeight = style.lineHeight,
|
|
14
|
+
BackgroundTransparency = 1,
|
|
15
|
+
TextXAlignment = props.align or (props.TextXAlignment or Enum.TextXAlignment.Left),
|
|
16
|
+
TextColor3 = props.TextColor3 or theme.colors.intents.primary.default.textColor,
|
|
17
|
+
Text = props.text,
|
|
18
|
+
TextWrap = props.TextWrap == nil or props.TextWrap == true,
|
|
19
|
+
FontFace = Font.fromName(style.font.Name, weight),
|
|
20
|
+
FontSize = style.size,
|
|
21
|
+
RichText = true,
|
|
22
|
+
Event = props.Event,
|
|
23
|
+
TextScaled = false,
|
|
24
|
+
}, props.children)
|
|
25
|
+
end)
|
|
46
26
|
return {
|
|
47
27
|
Text = Text,
|
|
48
28
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
export * from './Decorator/
|
|
2
|
-
export * from './Decorator/Corners';
|
|
3
|
-
export * from './Decorator/Padding';
|
|
1
|
+
export * from './Decorator/';
|
|
4
2
|
export * from './Surface/';
|
|
5
3
|
export * from './Layout/';
|
|
6
4
|
export * from './Input/';
|
|
7
5
|
export * from './Typography/Text';
|
|
8
6
|
export * from './Navigation/Menu';
|
|
7
|
+
export * from './Interaction';
|
package/out/Components/init.luau
CHANGED
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
-- Compiled with roblox-ts v3.0.0
|
|
2
2
|
local TS = _G[script]
|
|
3
3
|
local exports = {}
|
|
4
|
-
for _k, _v in TS.import(script, script, "Decorator"
|
|
5
|
-
exports[_k] = _v
|
|
6
|
-
end
|
|
7
|
-
for _k, _v in TS.import(script, script, "Decorator", "Corners") or {} do
|
|
8
|
-
exports[_k] = _v
|
|
9
|
-
end
|
|
10
|
-
for _k, _v in TS.import(script, script, "Decorator", "Padding") or {} do
|
|
4
|
+
for _k, _v in TS.import(script, script, "Decorator") or {} do
|
|
11
5
|
exports[_k] = _v
|
|
12
6
|
end
|
|
13
7
|
for _k, _v in TS.import(script, script, "Surface") or {} do
|
|
@@ -25,4 +19,7 @@ end
|
|
|
25
19
|
for _k, _v in TS.import(script, script, "Navigation", "Menu") or {} do
|
|
26
20
|
exports[_k] = _v
|
|
27
21
|
end
|
|
22
|
+
for _k, _v in TS.import(script, script, "Interaction") or {} do
|
|
23
|
+
exports[_k] = _v
|
|
24
|
+
end
|
|
28
25
|
return exports
|
|
@@ -180,6 +180,12 @@ export interface CleanTheme {
|
|
|
180
180
|
intents?: Partial<Record<Intent, Partial<IntentScheme>>>;
|
|
181
181
|
};
|
|
182
182
|
};
|
|
183
|
+
tooltip: {
|
|
184
|
+
spacing?: ScaleSizeValue<number>;
|
|
185
|
+
boxShadow?: CssShadow;
|
|
186
|
+
cornerRadius: CssSize;
|
|
187
|
+
intents?: Partial<Record<Intent, Partial<IntentScheme>>>;
|
|
188
|
+
};
|
|
183
189
|
};
|
|
184
190
|
icons: Partial<IconSet>;
|
|
185
191
|
iconSize: ScaleSizeValue<number>;
|
|
@@ -441,6 +441,31 @@ local DefaultTheme = {
|
|
|
441
441
|
},
|
|
442
442
|
},
|
|
443
443
|
},
|
|
444
|
+
tooltip = {
|
|
445
|
+
spacing = {
|
|
446
|
+
xs = 2,
|
|
447
|
+
sm = 6,
|
|
448
|
+
md = 10,
|
|
449
|
+
lg = 12,
|
|
450
|
+
xl = 20,
|
|
451
|
+
},
|
|
452
|
+
cornerRadius = 8,
|
|
453
|
+
boxShadow = "2px 2px 2px 2px",
|
|
454
|
+
intents = {
|
|
455
|
+
success = {
|
|
456
|
+
textColor = Color3.fromHex("#FFFFFF"),
|
|
457
|
+
},
|
|
458
|
+
warning = {
|
|
459
|
+
textColor = Color3.fromHex("#75520f"),
|
|
460
|
+
},
|
|
461
|
+
danger = {
|
|
462
|
+
textColor = Color3.fromHex("#731717"),
|
|
463
|
+
},
|
|
464
|
+
info = {
|
|
465
|
+
textColor = Color3.fromHex("#FFFFFF"),
|
|
466
|
+
},
|
|
467
|
+
},
|
|
468
|
+
},
|
|
444
469
|
},
|
|
445
470
|
icons = {
|
|
446
471
|
["shopping-cart"] = 112388431913339,
|