@korsolutions/ui 0.0.79 → 0.0.81

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.
Files changed (88) hide show
  1. package/dist/module/components/index.js +1 -0
  2. package/dist/module/components/index.js.map +1 -1
  3. package/dist/module/components/menu/index.js +0 -4
  4. package/dist/module/components/menu/index.js.map +1 -1
  5. package/dist/module/components/menu/variants/default.js +0 -6
  6. package/dist/module/components/menu/variants/default.js.map +1 -1
  7. package/dist/module/components/radio-group/components/radio-group-content.js +27 -0
  8. package/dist/module/components/radio-group/components/radio-group-content.js.map +1 -0
  9. package/dist/module/components/radio-group/components/radio-group-description.js +27 -0
  10. package/dist/module/components/radio-group/components/radio-group-description.js.map +1 -0
  11. package/dist/module/components/radio-group/components/radio-group-indicator.js +31 -0
  12. package/dist/module/components/radio-group/components/radio-group-indicator.js.map +1 -0
  13. package/dist/module/components/radio-group/components/radio-group-item.js +56 -0
  14. package/dist/module/components/radio-group/components/radio-group-item.js.map +1 -0
  15. package/dist/module/components/radio-group/components/radio-group-root.js +41 -0
  16. package/dist/module/components/radio-group/components/radio-group-root.js.map +1 -0
  17. package/dist/module/components/radio-group/components/radio-group-title.js +27 -0
  18. package/dist/module/components/radio-group/components/radio-group-title.js.map +1 -0
  19. package/dist/module/components/radio-group/context.js +12 -0
  20. package/dist/module/components/radio-group/context.js.map +1 -0
  21. package/dist/module/components/radio-group/index.js +18 -0
  22. package/dist/module/components/radio-group/index.js.map +1 -0
  23. package/dist/module/components/radio-group/types.js +4 -0
  24. package/dist/module/components/radio-group/types.js.map +1 -0
  25. package/dist/module/components/radio-group/variants/default.js +81 -0
  26. package/dist/module/components/radio-group/variants/default.js.map +1 -0
  27. package/dist/module/components/radio-group/variants/index.js +9 -0
  28. package/dist/module/components/radio-group/variants/index.js.map +1 -0
  29. package/dist/module/components/radio-group/variants/outlined.js +94 -0
  30. package/dist/module/components/radio-group/variants/outlined.js.map +1 -0
  31. package/dist/typescript/src/components/index.d.ts +1 -0
  32. package/dist/typescript/src/components/index.d.ts.map +1 -1
  33. package/dist/typescript/src/components/menu/index.d.ts +0 -6
  34. package/dist/typescript/src/components/menu/index.d.ts.map +1 -1
  35. package/dist/typescript/src/components/menu/types.d.ts +0 -1
  36. package/dist/typescript/src/components/menu/types.d.ts.map +1 -1
  37. package/dist/typescript/src/components/menu/variants/default.d.ts.map +1 -1
  38. package/dist/typescript/src/components/radio-group/components/radio-group-content.d.ts +8 -0
  39. package/dist/typescript/src/components/radio-group/components/radio-group-content.d.ts.map +1 -0
  40. package/dist/typescript/src/components/radio-group/components/radio-group-description.d.ts +8 -0
  41. package/dist/typescript/src/components/radio-group/components/radio-group-description.d.ts.map +1 -0
  42. package/dist/typescript/src/components/radio-group/components/radio-group-indicator.d.ts +8 -0
  43. package/dist/typescript/src/components/radio-group/components/radio-group-indicator.d.ts.map +1 -0
  44. package/dist/typescript/src/components/radio-group/components/radio-group-item.d.ts +18 -0
  45. package/dist/typescript/src/components/radio-group/components/radio-group-item.d.ts.map +1 -0
  46. package/dist/typescript/src/components/radio-group/components/radio-group-root.d.ts +13 -0
  47. package/dist/typescript/src/components/radio-group/components/radio-group-root.d.ts.map +1 -0
  48. package/dist/typescript/src/components/radio-group/components/radio-group-title.d.ts +8 -0
  49. package/dist/typescript/src/components/radio-group/components/radio-group-title.d.ts.map +1 -0
  50. package/dist/typescript/src/components/radio-group/context.d.ts +12 -0
  51. package/dist/typescript/src/components/radio-group/context.d.ts.map +1 -0
  52. package/dist/typescript/src/components/radio-group/index.d.ts +22 -0
  53. package/dist/typescript/src/components/radio-group/index.d.ts.map +1 -0
  54. package/dist/typescript/src/components/radio-group/types.d.ts +13 -0
  55. package/dist/typescript/src/components/radio-group/types.d.ts.map +1 -0
  56. package/dist/typescript/src/components/radio-group/variants/default.d.ts +3 -0
  57. package/dist/typescript/src/components/radio-group/variants/default.d.ts.map +1 -0
  58. package/dist/typescript/src/components/radio-group/variants/index.d.ts +5 -0
  59. package/dist/typescript/src/components/radio-group/variants/index.d.ts.map +1 -0
  60. package/dist/typescript/src/components/radio-group/variants/outlined.d.ts +3 -0
  61. package/dist/typescript/src/components/radio-group/variants/outlined.d.ts.map +1 -0
  62. package/package.json +1 -1
  63. package/src/components/index.ts +1 -0
  64. package/src/components/menu/index.ts +0 -6
  65. package/src/components/menu/types.ts +0 -2
  66. package/src/components/menu/variants/default.tsx +0 -6
  67. package/src/components/radio-group/components/radio-group-content.tsx +23 -0
  68. package/src/components/radio-group/components/radio-group-description.tsx +23 -0
  69. package/src/components/radio-group/components/radio-group-indicator.tsx +24 -0
  70. package/src/components/radio-group/components/radio-group-item.tsx +73 -0
  71. package/src/components/radio-group/components/radio-group-root.tsx +46 -0
  72. package/src/components/radio-group/components/radio-group-title.tsx +23 -0
  73. package/src/components/radio-group/context.ts +20 -0
  74. package/src/components/radio-group/index.ts +23 -0
  75. package/src/components/radio-group/types.ts +14 -0
  76. package/src/components/radio-group/variants/default.tsx +78 -0
  77. package/src/components/radio-group/variants/index.ts +7 -0
  78. package/src/components/radio-group/variants/outlined.tsx +90 -0
  79. package/dist/module/components/menu/components/menu-group.js +0 -18
  80. package/dist/module/components/menu/components/menu-group.js.map +0 -1
  81. package/dist/module/components/menu/components/menu-separator.js +0 -17
  82. package/dist/module/components/menu/components/menu-separator.js.map +0 -1
  83. package/dist/typescript/src/components/menu/components/menu-group.d.ts +0 -9
  84. package/dist/typescript/src/components/menu/components/menu-group.d.ts.map +0 -1
  85. package/dist/typescript/src/components/menu/components/menu-separator.d.ts +0 -8
  86. package/dist/typescript/src/components/menu/components/menu-separator.d.ts.map +0 -1
  87. package/src/components/menu/components/menu-group.tsx +0 -25
  88. package/src/components/menu/components/menu-separator.tsx +0 -22
@@ -0,0 +1,78 @@
1
+ import { useThemedStyles } from "../../../utils/use-themed-styles";
2
+ import type { RadioGroupStyles } from "../types";
3
+
4
+ export const useRadioGroupVariantDefault = (): RadioGroupStyles => {
5
+ return useThemedStyles(
6
+ ({ colors, fontFamily, fontSize }): RadioGroupStyles => ({
7
+ root: {
8
+ default: {
9
+ gap: 8,
10
+ },
11
+ },
12
+ item: {
13
+ default: {
14
+ flexDirection: "row",
15
+ alignItems: "flex-start",
16
+ gap: 12,
17
+ },
18
+ disabled: {
19
+ opacity: 0.5,
20
+ },
21
+ },
22
+ indicator: {
23
+ default: {
24
+ width: 20,
25
+ height: 20,
26
+ borderRadius: 10,
27
+ borderWidth: 2,
28
+ borderColor: colors.border,
29
+ backgroundColor: colors.background,
30
+ marginTop: 2,
31
+ alignItems: "center",
32
+ justifyContent: "center",
33
+ },
34
+ selected: {
35
+ borderColor: colors.primary,
36
+ },
37
+ disabled: {
38
+ opacity: 0.5,
39
+ },
40
+ },
41
+ dot: {
42
+ default: {
43
+ width: 8,
44
+ height: 8,
45
+ borderRadius: 4,
46
+ backgroundColor: colors.primary,
47
+ },
48
+ },
49
+ content: {
50
+ default: {
51
+ flex: 1,
52
+ },
53
+ },
54
+ title: {
55
+ default: {
56
+ color: colors.foreground,
57
+ fontSize,
58
+ fontFamily,
59
+ fontWeight: "500",
60
+ },
61
+ disabled: {
62
+ color: colors.mutedForeground,
63
+ },
64
+ },
65
+ description: {
66
+ default: {
67
+ color: colors.mutedForeground,
68
+ fontSize: fontSize * 0.875,
69
+ fontFamily,
70
+ marginTop: 2,
71
+ },
72
+ disabled: {
73
+ opacity: 0.7,
74
+ },
75
+ },
76
+ }),
77
+ );
78
+ };
@@ -0,0 +1,7 @@
1
+ import { useRadioGroupVariantDefault } from "./default";
2
+ import { useRadioGroupVariantOutlined } from "./outlined";
3
+
4
+ export const RadioGroupVariants = {
5
+ default: useRadioGroupVariantDefault,
6
+ outlined: useRadioGroupVariantOutlined,
7
+ };
@@ -0,0 +1,90 @@
1
+ import { useThemedStyles } from "../../../utils/use-themed-styles";
2
+ import type { RadioGroupStyles } from "../types";
3
+
4
+ export const useRadioGroupVariantOutlined = (): RadioGroupStyles => {
5
+ return useThemedStyles(
6
+ ({ colors, radius, fontFamily, fontSize }): RadioGroupStyles => ({
7
+ root: {
8
+ default: {
9
+ gap: 8,
10
+ },
11
+ },
12
+ item: {
13
+ default: {
14
+ flexDirection: "row",
15
+ alignItems: "flex-start",
16
+ gap: 12,
17
+ borderWidth: 1,
18
+ borderColor: colors.border,
19
+ borderRadius: radius,
20
+ padding: 16,
21
+ backgroundColor: colors.background,
22
+ },
23
+ hovered: {
24
+ backgroundColor: colors.muted,
25
+ borderColor: colors.primary,
26
+ },
27
+ selected: {
28
+ borderColor: colors.primary,
29
+ },
30
+ disabled: {
31
+ opacity: 0.5,
32
+ },
33
+ },
34
+ indicator: {
35
+ default: {
36
+ width: 20,
37
+ height: 20,
38
+ borderRadius: 10,
39
+ borderWidth: 2,
40
+ borderColor: colors.border,
41
+ backgroundColor: colors.background,
42
+ marginTop: 2,
43
+ alignItems: "center",
44
+ justifyContent: "center",
45
+ },
46
+ selected: {
47
+ borderColor: colors.primary,
48
+ },
49
+ disabled: {
50
+ opacity: 0.5,
51
+ },
52
+ },
53
+ dot: {
54
+ default: {
55
+ width: 8,
56
+ height: 8,
57
+ borderRadius: 4,
58
+ backgroundColor: colors.primary,
59
+ },
60
+ },
61
+ content: {
62
+ default: {
63
+ flex: 1,
64
+ },
65
+ },
66
+ title: {
67
+ default: {
68
+ color: colors.foreground,
69
+ fontSize,
70
+ fontFamily,
71
+ fontWeight: "500",
72
+ },
73
+ disabled: {
74
+ color: colors.mutedForeground,
75
+ },
76
+ },
77
+ description: {
78
+ default: {
79
+ color: colors.mutedForeground,
80
+ fontSize: fontSize * 0.875,
81
+ fontFamily,
82
+ marginTop: 2,
83
+ },
84
+ disabled: {
85
+ opacity: 0.7,
86
+ },
87
+ },
88
+ }),
89
+ );
90
+ };
@@ -1,18 +0,0 @@
1
- "use strict";
2
-
3
- import React from "react";
4
- import { View } from "react-native";
5
- import { useMenu } from "../context.js";
6
- import { jsx as _jsx } from "react/jsx-runtime";
7
- export function MenuGroup(props) {
8
- const menu = useMenu();
9
- const composedStyle = [menu.styles?.group, props.style];
10
- const Component = props.render ?? View;
11
- return /*#__PURE__*/_jsx(Component, {
12
- ...props,
13
- role: "group",
14
- style: composedStyle,
15
- children: props.children
16
- });
17
- }
18
- //# sourceMappingURL=menu-group.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","View","useMenu","jsx","_jsx","MenuGroup","props","menu","composedStyle","styles","group","style","Component","render","role","children"],"sourceRoot":"../../../../../src","sources":["components/menu/components/menu-group.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAwC,cAAc;AACnE,SAASC,OAAO,QAAQ,eAAY;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAQrC,OAAO,SAASC,SAASA,CAACC,KAAqB,EAAE;EAC/C,MAAMC,IAAI,GAAGL,OAAO,CAAC,CAAC;EACtB,MAAMM,aAAa,GAAG,CAACD,IAAI,CAACE,MAAM,EAAEC,KAAK,EAAEJ,KAAK,CAACK,KAAK,CAAC;EAEvD,MAAMC,SAAS,GAAGN,KAAK,CAACO,MAAM,IAAIZ,IAAI;EACtC,oBACEG,IAAA,CAACQ,SAAS;IAAA,GACJN,KAAK;IACTQ,IAAI,EAAC,OAAO;IACZH,KAAK,EAAEH,aAAc;IAAAO,QAAA,EAEpBT,KAAK,CAACS;EAAQ,CACN,CAAC;AAEhB","ignoreList":[]}
@@ -1,17 +0,0 @@
1
- "use strict";
2
-
3
- import React from "react";
4
- import { View } from "react-native";
5
- import { useMenu } from "../context.js";
6
- import { jsx as _jsx } from "react/jsx-runtime";
7
- export function MenuSeparator(props) {
8
- const menu = useMenu();
9
- const composedStyle = [menu.styles?.separator, props.style];
10
- const Component = props.render ?? View;
11
- return /*#__PURE__*/_jsx(Component, {
12
- ...props,
13
- role: "separator",
14
- style: composedStyle
15
- });
16
- }
17
- //# sourceMappingURL=menu-separator.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","View","useMenu","jsx","_jsx","MenuSeparator","props","menu","composedStyle","styles","separator","style","Component","render","role"],"sourceRoot":"../../../../../src","sources":["components/menu/components/menu-separator.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAwC,cAAc;AACnE,SAASC,OAAO,QAAQ,eAAY;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAOrC,OAAO,SAASC,aAAaA,CAACC,KAAyB,EAAE;EACvD,MAAMC,IAAI,GAAGL,OAAO,CAAC,CAAC;EACtB,MAAMM,aAAa,GAAG,CAACD,IAAI,CAACE,MAAM,EAAEC,SAAS,EAAEJ,KAAK,CAACK,KAAK,CAAC;EAE3D,MAAMC,SAAS,GAAGN,KAAK,CAACO,MAAM,IAAIZ,IAAI;EACtC,oBACEG,IAAA,CAACQ,SAAS;IAAA,GACJN,KAAK;IACTQ,IAAI,EAAC,WAAW;IAChBH,KAAK,EAAEH;EAAc,CACtB,CAAC;AAEN","ignoreList":[]}
@@ -1,9 +0,0 @@
1
- import React from "react";
2
- import { type StyleProp, type ViewStyle } from "react-native";
3
- export interface MenuGroupProps {
4
- children?: React.ReactNode;
5
- render?: (props: MenuGroupProps) => React.ReactNode;
6
- style?: StyleProp<ViewStyle>;
7
- }
8
- export declare function MenuGroup(props: MenuGroupProps): React.JSX.Element;
9
- //# sourceMappingURL=menu-group.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"menu-group.d.ts","sourceRoot":"","sources":["../../../../../../src/components/menu/components/menu-group.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAQ,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAGpE,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,KAAK,CAAC,SAAS,CAAC;IACpD,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,qBAc9C"}
@@ -1,8 +0,0 @@
1
- import React from "react";
2
- import { type StyleProp, type ViewStyle } from "react-native";
3
- export interface MenuSeparatorProps {
4
- render?: (props: MenuSeparatorProps) => React.ReactNode;
5
- style?: StyleProp<ViewStyle>;
6
- }
7
- export declare function MenuSeparator(props: MenuSeparatorProps): React.JSX.Element;
8
- //# sourceMappingURL=menu-separator.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"menu-separator.d.ts","sourceRoot":"","sources":["../../../../../../src/components/menu/components/menu-separator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAQ,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAGpE,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,KAAK,CAAC,SAAS,CAAC;IACxD,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,qBAYtD"}
@@ -1,25 +0,0 @@
1
- import React from "react";
2
- import { View, type StyleProp, type ViewStyle } from "react-native";
3
- import { useMenu } from "../context";
4
-
5
- export interface MenuGroupProps {
6
- children?: React.ReactNode;
7
- render?: (props: MenuGroupProps) => React.ReactNode;
8
- style?: StyleProp<ViewStyle>;
9
- }
10
-
11
- export function MenuGroup(props: MenuGroupProps) {
12
- const menu = useMenu();
13
- const composedStyle = [menu.styles?.group, props.style];
14
-
15
- const Component = props.render ?? View;
16
- return (
17
- <Component
18
- {...props}
19
- role="group"
20
- style={composedStyle}
21
- >
22
- {props.children}
23
- </Component>
24
- );
25
- }
@@ -1,22 +0,0 @@
1
- import React from "react";
2
- import { View, type StyleProp, type ViewStyle } from "react-native";
3
- import { useMenu } from "../context";
4
-
5
- export interface MenuSeparatorProps {
6
- render?: (props: MenuSeparatorProps) => React.ReactNode;
7
- style?: StyleProp<ViewStyle>;
8
- }
9
-
10
- export function MenuSeparator(props: MenuSeparatorProps) {
11
- const menu = useMenu();
12
- const composedStyle = [menu.styles?.separator, props.style];
13
-
14
- const Component = props.render ?? View;
15
- return (
16
- <Component
17
- {...props}
18
- role="separator"
19
- style={composedStyle}
20
- />
21
- );
22
- }