@teamturing/react-kit 2.53.8 → 2.55.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/dist/core/CheckboxGroup/CheckboxGroupOption.d.ts +44 -0
- package/dist/core/CheckboxGroup/index.d.ts +48 -0
- package/dist/core/CheckboxOrRadioGroupFormControl/CheckboxOrRadioGroupFormControlCaption.d.ts +5 -0
- package/dist/core/CheckboxOrRadioGroupFormControl/CheckboxOrRadioGroupFormControlErrorMessage.d.ts +5 -0
- package/dist/core/CheckboxOrRadioGroupFormControl/CheckboxOrRadioGroupFormControlLabel.d.ts +8 -0
- package/dist/core/CheckboxOrRadioGroupFormControl/CheckboxOrRadioGroupFormControlSuccessMessage.d.ts +5 -0
- package/dist/core/CheckboxOrRadioGroupFormControl/CheckboxOrRadioGroupFormControlTooltipIcon.d.ts +7 -0
- package/dist/core/CheckboxOrRadioGroupFormControl/index.d.ts +61 -0
- package/dist/core/RadioGroup/RadioGroupOption.d.ts +44 -0
- package/dist/core/RadioGroup/index.d.ts +48 -0
- package/dist/core/Spinner/index.d.ts +7 -484
- package/dist/index.d.ts +6 -0
- package/dist/index.js +3675 -3168
- package/dist/theme/index.d.ts +15 -0
- package/dist/utils/createSafeContext.d.ts +6 -0
- package/esm/core/CheckboxGroup/CheckboxGroupOption.js +56 -0
- package/esm/core/CheckboxGroup/index.js +54 -0
- package/esm/core/CheckboxOrRadioGroupFormControl/CheckboxOrRadioGroupFormControlCaption.js +21 -0
- package/esm/core/CheckboxOrRadioGroupFormControl/CheckboxOrRadioGroupFormControlErrorMessage.js +34 -0
- package/esm/core/CheckboxOrRadioGroupFormControl/CheckboxOrRadioGroupFormControlLabel.js +92 -0
- package/esm/core/CheckboxOrRadioGroupFormControl/CheckboxOrRadioGroupFormControlSuccessMessage.js +34 -0
- package/esm/core/CheckboxOrRadioGroupFormControl/CheckboxOrRadioGroupFormControlTooltipIcon.js +25 -0
- package/esm/core/CheckboxOrRadioGroupFormControl/index.js +98 -0
- package/esm/core/FormControl/index.js +2 -2
- package/esm/core/RadioGroup/RadioGroupOption.js +54 -0
- package/esm/core/RadioGroup/index.js +54 -0
- package/esm/core/Spinner/index.js +30 -7
- package/esm/index.js +3 -0
- package/esm/theme/index.js +18 -3
- package/esm/utils/createSafeContext.js +25 -0
- package/package.json +2 -2
package/esm/theme/index.js
CHANGED
|
@@ -10,15 +10,30 @@ const theme = {
|
|
|
10
10
|
colors: color,
|
|
11
11
|
gradients: gradient,
|
|
12
12
|
shadows: elevation,
|
|
13
|
-
opacity
|
|
13
|
+
opacity,
|
|
14
|
+
components: {
|
|
15
|
+
spinner: {
|
|
16
|
+
defaultVariant: 'progress-gradient'
|
|
17
|
+
}
|
|
18
|
+
}
|
|
14
19
|
};
|
|
15
20
|
const gpaiLightTheme = {
|
|
16
21
|
...theme,
|
|
17
|
-
colors: gpaiLightColor
|
|
22
|
+
colors: gpaiLightColor,
|
|
23
|
+
components: {
|
|
24
|
+
spinner: {
|
|
25
|
+
defaultVariant: 'progress-line'
|
|
26
|
+
}
|
|
27
|
+
}
|
|
18
28
|
};
|
|
19
29
|
const gpaiDarkTheme = {
|
|
20
30
|
...theme,
|
|
21
|
-
colors: gpaiDarkColor
|
|
31
|
+
colors: gpaiDarkColor,
|
|
32
|
+
components: {
|
|
33
|
+
spinner: {
|
|
34
|
+
defaultVariant: 'progress-line'
|
|
35
|
+
}
|
|
36
|
+
}
|
|
22
37
|
};
|
|
23
38
|
|
|
24
39
|
export { theme as default, gpaiDarkTheme, gpaiLightTheme };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { useContext, createContext } from 'react';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
function createSafeContext({
|
|
5
|
+
errorMessage
|
|
6
|
+
}) {
|
|
7
|
+
const Context = /*#__PURE__*/createContext(null);
|
|
8
|
+
const useSafeContext = () => {
|
|
9
|
+
const ctx = useContext(Context);
|
|
10
|
+
if (ctx === null) {
|
|
11
|
+
throw new Error(errorMessage);
|
|
12
|
+
}
|
|
13
|
+
return ctx;
|
|
14
|
+
};
|
|
15
|
+
const Provider = ({
|
|
16
|
+
children,
|
|
17
|
+
value
|
|
18
|
+
}) => /*#__PURE__*/jsx(Context.Provider, {
|
|
19
|
+
value: value,
|
|
20
|
+
children: children
|
|
21
|
+
});
|
|
22
|
+
return [Provider, useSafeContext];
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export { createSafeContext };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teamturing/react-kit",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.55.0",
|
|
4
4
|
"description": "React components, hooks for create teamturing web application",
|
|
5
5
|
"author": "Sungchang Park <psch300@gmail.com> (https://github.com/psch300)",
|
|
6
6
|
"homepage": "https://github.com/weareteamturing/bombe#readme",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"react-textarea-autosize": "^8.5.3",
|
|
67
67
|
"styled-system": "^5.1.5"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "73b98bed5075b0007554e7f1d56a763b0c48f381"
|
|
70
70
|
}
|