@kwiz/fluentui 1.0.15 → 1.0.19

Sign up to get free protection for your applications and to get access to all the features.
Files changed (131) hide show
  1. package/.github/workflows/npm-publish.yml +34 -0
  2. package/LICENSE +21 -21
  3. package/README.md +26 -26
  4. package/package.json +72 -72
  5. package/src/_modules/config.ts +9 -9
  6. package/src/_modules/constants.ts +3 -3
  7. package/src/controls/accordion.tsx +48 -0
  8. package/src/controls/button.tsx +169 -169
  9. package/src/controls/centered.tsx +22 -22
  10. package/src/controls/date.tsx +39 -39
  11. package/src/controls/dropdown.tsx +51 -51
  12. package/src/controls/error-boundary.tsx +41 -41
  13. package/src/controls/field-editor.tsx +40 -40
  14. package/src/controls/file-upload.tsx +67 -67
  15. package/src/controls/horizontal.tsx +34 -34
  16. package/src/controls/input.tsx +60 -60
  17. package/src/controls/kwizoverflow.tsx +103 -102
  18. package/src/controls/list.tsx +117 -117
  19. package/src/controls/loading.tsx +10 -10
  20. package/src/controls/please-wait.tsx +32 -32
  21. package/src/controls/prompt.tsx +96 -96
  22. package/src/controls/search.tsx +65 -65
  23. package/src/controls/section.tsx +51 -51
  24. package/src/controls/svg.tsx +120 -120
  25. package/src/controls/toolbar.tsx +48 -48
  26. package/src/controls/vertical-content.tsx +49 -49
  27. package/src/controls/vertical.tsx +34 -34
  28. package/src/helpers/context.ts +39 -39
  29. package/src/helpers/hooks.tsx +335 -335
  30. package/src/index.ts +26 -25
  31. package/src/styles/styles.ts +87 -87
  32. package/src/styles/theme.ts +90 -90
  33. package/dist/_modules/build.d.ts +0 -2
  34. package/dist/_modules/build.js +0 -3
  35. package/dist/_modules/build.js.map +0 -1
  36. package/dist/_modules/config.d.ts +0 -1
  37. package/dist/_modules/config.js +0 -9
  38. package/dist/_modules/config.js.map +0 -1
  39. package/dist/_modules/constants.d.ts +0 -2
  40. package/dist/_modules/constants.js +0 -3
  41. package/dist/_modules/constants.js.map +0 -1
  42. package/dist/_modules/exports-index.d.ts +0 -1
  43. package/dist/_modules/exports-index.js +0 -2
  44. package/dist/_modules/exports-index.js.map +0 -1
  45. package/dist/controls/button.d.ts +0 -28
  46. package/dist/controls/button.js +0 -113
  47. package/dist/controls/button.js.map +0 -1
  48. package/dist/controls/centered.d.ts +0 -5
  49. package/dist/controls/centered.js +0 -14
  50. package/dist/controls/centered.js.map +0 -1
  51. package/dist/controls/date.d.ts +0 -8
  52. package/dist/controls/date.js +0 -32
  53. package/dist/controls/date.js.map +0 -1
  54. package/dist/controls/dropdown.d.ts +0 -29
  55. package/dist/controls/dropdown.js +0 -27
  56. package/dist/controls/dropdown.js.map +0 -1
  57. package/dist/controls/error-boundary.d.ts +0 -23
  58. package/dist/controls/error-boundary.js +0 -33
  59. package/dist/controls/error-boundary.js.map +0 -1
  60. package/dist/controls/exports-index.d.ts +0 -17
  61. package/dist/controls/exports-index.js +0 -18
  62. package/dist/controls/exports-index.js.map +0 -1
  63. package/dist/controls/field-editor.d.ts +0 -13
  64. package/dist/controls/field-editor.js +0 -15
  65. package/dist/controls/field-editor.js.map +0 -1
  66. package/dist/controls/file-upload.d.ts +0 -18
  67. package/dist/controls/file-upload.js +0 -41
  68. package/dist/controls/file-upload.js.map +0 -1
  69. package/dist/controls/horizontal.d.ts +0 -8
  70. package/dist/controls/horizontal.js +0 -23
  71. package/dist/controls/horizontal.js.map +0 -1
  72. package/dist/controls/input.d.ts +0 -13
  73. package/dist/controls/input.js +0 -43
  74. package/dist/controls/input.js.map +0 -1
  75. package/dist/controls/kwizoverflow.d.ts +0 -13
  76. package/dist/controls/kwizoverflow.js +0 -45
  77. package/dist/controls/kwizoverflow.js.map +0 -1
  78. package/dist/controls/list.d.ts +0 -21
  79. package/dist/controls/list.js +0 -72
  80. package/dist/controls/list.js.map +0 -1
  81. package/dist/controls/loading copy.d.ts +0 -5
  82. package/dist/controls/loading copy.js +0 -7
  83. package/dist/controls/loading copy.js.map +0 -1
  84. package/dist/controls/loading.d.ts +0 -5
  85. package/dist/controls/loading.js +0 -7
  86. package/dist/controls/loading.js.map +0 -1
  87. package/dist/controls/please-wait.d.ts +0 -18
  88. package/dist/controls/please-wait.js +0 -16
  89. package/dist/controls/please-wait.js.map +0 -1
  90. package/dist/controls/prompt.d.ts +0 -32
  91. package/dist/controls/prompt.js +0 -31
  92. package/dist/controls/prompt.js.map +0 -1
  93. package/dist/controls/search.d.ts +0 -13
  94. package/dist/controls/search.js +0 -47
  95. package/dist/controls/search.js.map +0 -1
  96. package/dist/controls/section.d.ts +0 -14
  97. package/dist/controls/section.js +0 -27
  98. package/dist/controls/section.js.map +0 -1
  99. package/dist/controls/svg.d.ts +0 -23
  100. package/dist/controls/svg.js +0 -45
  101. package/dist/controls/svg.js.map +0 -1
  102. package/dist/controls/toolbar.d.ts +0 -12
  103. package/dist/controls/toolbar.js +0 -23
  104. package/dist/controls/toolbar.js.map +0 -1
  105. package/dist/controls/vertical-content.d.ts +0 -6
  106. package/dist/controls/vertical-content.js +0 -37
  107. package/dist/controls/vertical-content.js.map +0 -1
  108. package/dist/controls/vertical.d.ts +0 -8
  109. package/dist/controls/vertical.js +0 -23
  110. package/dist/controls/vertical.js.map +0 -1
  111. package/dist/exports-index.d.ts +0 -3
  112. package/dist/exports-index.js +0 -4
  113. package/dist/exports-index.js.map +0 -1
  114. package/dist/helpers/context.d.ts +0 -26
  115. package/dist/helpers/context.js +0 -15
  116. package/dist/helpers/context.js.map +0 -1
  117. package/dist/helpers/hooks.d.ts +0 -62
  118. package/dist/helpers/hooks.js +0 -287
  119. package/dist/helpers/hooks.js.map +0 -1
  120. package/dist/index.d.ts +0 -24
  121. package/dist/index.js +0 -24
  122. package/dist/index.js.map +0 -1
  123. package/dist/styles/exports-index.d.ts +0 -2
  124. package/dist/styles/exports-index.js +0 -3
  125. package/dist/styles/exports-index.js.map +0 -1
  126. package/dist/styles/styles.d.ts +0 -19
  127. package/dist/styles/styles.js +0 -79
  128. package/dist/styles/styles.js.map +0 -1
  129. package/dist/styles/theme.d.ts +0 -6
  130. package/dist/styles/theme.js +0 -77
  131. package/dist/styles/theme.js.map +0 -1
package/src/index.ts CHANGED
@@ -1,25 +1,26 @@
1
- export * from './controls/button';
2
- export * from './controls/centered';
3
- export * from './controls/date';
4
- export * from './controls/dropdown';
5
- export * from './controls/error-boundary';
6
- export * from './controls/field-editor';
7
- export * from './controls/file-upload';
8
- export * from './controls/horizontal';
9
- export * from './controls/input';
10
- export * from './controls/kwizoverflow';
11
- export * from './controls/list';
12
- export * from './controls/loading';
13
- export * from './controls/please-wait';
14
- export * from './controls/prompt';
15
- export * from './controls/search';
16
- export * from './controls/section';
17
- export * from './controls/svg';
18
- export * from './controls/toolbar';
19
- export * from './controls/vertical';
20
- export * from './controls/vertical-content';
21
- export { KWIZFluentContext, useKWIZFluentContext } from './helpers/context';
22
- export type { iKWIZFluentContext } from './helpers/context';
23
- export * from './helpers/hooks';
24
- export { KnownClassNames } from './styles/styles';
25
-
1
+ export * from './controls/accordion';
2
+ export * from './controls/button';
3
+ export * from './controls/centered';
4
+ export * from './controls/date';
5
+ export * from './controls/dropdown';
6
+ export * from './controls/error-boundary';
7
+ export * from './controls/field-editor';
8
+ export * from './controls/file-upload';
9
+ export * from './controls/horizontal';
10
+ export * from './controls/input';
11
+ export * from './controls/kwizoverflow';
12
+ export * from './controls/list';
13
+ export * from './controls/loading';
14
+ export * from './controls/please-wait';
15
+ export * from './controls/prompt';
16
+ export * from './controls/search';
17
+ export * from './controls/section';
18
+ export * from './controls/svg';
19
+ export * from './controls/toolbar';
20
+ export * from './controls/vertical';
21
+ export * from './controls/vertical-content';
22
+ export { KWIZFluentContext, useKWIZFluentContext } from './helpers/context';
23
+ export type { iKWIZFluentContext } from './helpers/context';
24
+ export * from './helpers/hooks';
25
+ export { KnownClassNames } from './styles/styles';
26
+
@@ -1,87 +1,87 @@
1
- import { GriffelStyle, makeStyles, tokens } from "@fluentui/react-components";
2
-
3
- export module mixins {
4
- export const main: GriffelStyle = {
5
- flexShrink: 1,
6
- flexGrow: 1
7
- };
8
- export const clickable: GriffelStyle = {
9
- cursor: "pointer",
10
- ['& label']: {
11
- cursor: "pointer"
12
- }
13
- }
14
- const box: GriffelStyle = {
15
- padding: tokens.spacingHorizontalM,
16
- borderRadius: tokens.borderRadiusMedium,
17
- boxShadow: tokens.shadow4,
18
- margin: tokens.spacingHorizontalXXS
19
- }
20
- export const float: GriffelStyle = {
21
- ...box,
22
- /** make buttons work */
23
- position: "relative",
24
- /** make buttons work */
25
- maxWidth: "33%",
26
- /** stop bleeding into page */
27
- overflowX: "hidden",
28
-
29
- ['& img']: {
30
- maxWidth: "100%"
31
- }
32
- }
33
-
34
- export const flex: GriffelStyle = {
35
- display: 'flex',
36
- flexWrap: 'nowrap',
37
- rowGap: tokens.spacingVerticalM,
38
- columnGap: tokens.spacingVerticalM,
39
- }
40
-
41
- export const wrap: GriffelStyle = {
42
- flexWrap: "wrap"
43
- }
44
- export const nogap: GriffelStyle = {
45
- rowGap: 0,
46
- columnGap: 0
47
- }
48
- export const ellipsis: GriffelStyle = {
49
- whiteSpace: 'nowrap',
50
- display: 'block',
51
- overflow: 'hidden',
52
- textOverflow: 'ellipsis'
53
- }
54
-
55
- // export const box: GriffelStyle = {
56
- // }
57
- }
58
-
59
- export const KnownClassNames = {
60
- print: 'print-root',
61
- section: 'kfui-section',
62
- vertical: 'kfui-vertical',
63
- horizontal: 'kfui-horizontal',
64
- list: 'kfui-list'
65
- }
66
- export const useCommonStyles = makeStyles({
67
- printShow: {
68
- display: 'none',
69
- [`:global(body.${KnownClassNames.print})`]: {
70
- display: 'unset',
71
- },
72
- '@media print': {
73
- display: 'unset',
74
- }
75
- },
76
- printHide: {
77
- [`:global(body.${KnownClassNames.print})`]: {
78
- display: 'none !important'
79
- },
80
- '@media print': {
81
- display: 'none !important'
82
- }
83
- },
84
- })
85
-
86
- export const widthMedium = 360;
87
- //export const widthWide = 520;
1
+ import { GriffelStyle, makeStyles, tokens } from "@fluentui/react-components";
2
+
3
+ export module mixins {
4
+ export const main: GriffelStyle = {
5
+ flexShrink: 1,
6
+ flexGrow: 1
7
+ };
8
+ export const clickable: GriffelStyle = {
9
+ cursor: "pointer",
10
+ ['& label']: {
11
+ cursor: "pointer"
12
+ }
13
+ }
14
+ const box: GriffelStyle = {
15
+ padding: tokens.spacingHorizontalM,
16
+ borderRadius: tokens.borderRadiusMedium,
17
+ boxShadow: tokens.shadow4,
18
+ margin: tokens.spacingHorizontalXXS
19
+ }
20
+ export const float: GriffelStyle = {
21
+ ...box,
22
+ /** make buttons work */
23
+ position: "relative",
24
+ /** make buttons work */
25
+ maxWidth: "33%",
26
+ /** stop bleeding into page */
27
+ overflowX: "hidden",
28
+
29
+ ['& img']: {
30
+ maxWidth: "100%"
31
+ }
32
+ }
33
+
34
+ export const flex: GriffelStyle = {
35
+ display: 'flex',
36
+ flexWrap: 'nowrap',
37
+ rowGap: tokens.spacingVerticalM,
38
+ columnGap: tokens.spacingVerticalM,
39
+ }
40
+
41
+ export const wrap: GriffelStyle = {
42
+ flexWrap: "wrap"
43
+ }
44
+ export const nogap: GriffelStyle = {
45
+ rowGap: 0,
46
+ columnGap: 0
47
+ }
48
+ export const ellipsis: GriffelStyle = {
49
+ whiteSpace: 'nowrap',
50
+ display: 'block',
51
+ overflow: 'hidden',
52
+ textOverflow: 'ellipsis'
53
+ }
54
+
55
+ // export const box: GriffelStyle = {
56
+ // }
57
+ }
58
+
59
+ export const KnownClassNames = {
60
+ print: 'print-root',
61
+ section: 'kfui-section',
62
+ vertical: 'kfui-vertical',
63
+ horizontal: 'kfui-horizontal',
64
+ list: 'kfui-list'
65
+ }
66
+ export const useCommonStyles = makeStyles({
67
+ printShow: {
68
+ display: 'none',
69
+ [`:global(body.${KnownClassNames.print})`]: {
70
+ display: 'unset',
71
+ },
72
+ '@media print': {
73
+ display: 'unset',
74
+ }
75
+ },
76
+ printHide: {
77
+ [`:global(body.${KnownClassNames.print})`]: {
78
+ display: 'none !important'
79
+ },
80
+ '@media print': {
81
+ display: 'none !important'
82
+ }
83
+ },
84
+ })
85
+
86
+ export const widthMedium = 360;
87
+ //export const widthWide = 520;
@@ -1,91 +1,91 @@
1
- import { BrandVariants, Theme, createDarkTheme, createLightTheme, teamsDarkTheme, teamsLightTheme } from "@fluentui/react-components";
2
-
3
- export interface iThemeContext {
4
- teams?: boolean;
5
- dark?: boolean;
6
- }
7
-
8
- export function getTheme(ctx: iThemeContext, t: BrandVariants = kThemeDefault) {
9
- return ctx.dark
10
- ? getDarkTheme(ctx, t)
11
- : getLightTheme(ctx, t);
12
- }
13
-
14
-
15
- const kThemeDefault: BrandVariants = {
16
- 10: "#04010A",
17
- 20: "#16103B",
18
- 30: "#17176F",
19
- 40: "#0F1D9A",
20
- 50: "#2F2AA1",
21
- 60: "#4338A8",
22
- 70: "#5546AF",
23
- 80: "#6555B6",
24
- 90: "#7563BD",
25
- 100: "#8472C4",
26
- 110: "#9282CB",
27
- 120: "#A191D2",
28
- 130: "#AFA1D9",
29
- 140: "#BDB1E0",
30
- 150: "#CBC1E7",
31
- 160: "#D9D2EE"
32
- };
33
-
34
- const kThemeOrange: BrandVariants = {
35
- 10: "#040301",
36
- 20: "#1E170A",
37
- 30: "#312610",
38
- 40: "#403112",
39
- 50: "#503D14",
40
- 60: "#604915",
41
- 70: "#705516",
42
- 80: "#816216",
43
- 90: "#926E16",
44
- 100: "#A37B15",
45
- 110: "#B58914",
46
- 120: "#C79612",
47
- 130: "#DAA40E",
48
- 140: "#EDB208",
49
- 150: "#FFC001",
50
- 160: "#FFD47F"
51
- };
52
-
53
- const kThemeSecondary: BrandVariants = {
54
- 10: "#020304",
55
- 20: "#101A1D",
56
- 30: "#162B32",
57
- 40: "#1A3742",
58
- 50: "#1D4552",
59
- 60: "#1F5363",
60
- 70: "#216175",
61
- 80: "#227087",
62
- 90: "#227F9A",
63
- 100: "#208EAD",
64
- 110: "#1E9EC0",
65
- 120: "#1AADD4",
66
- 130: "#12BEE8",
67
- 140: "#02CEFD",
68
- 150: "#6BDAFF",
69
- 160: "#A0E5FF"
70
- };
71
-
72
- function getLightTheme(ctx: iThemeContext, t: BrandVariants = kThemeDefault) {
73
- if (ctx.teams) return teamsLightTheme;
74
- //return jsonClone(webLightTheme);
75
- const lightTheme: Theme = {
76
- ...createLightTheme(t),
77
- };
78
- return lightTheme;
79
- }
80
-
81
- function getDarkTheme(ctx: iThemeContext, t: BrandVariants = kThemeDefault) {
82
- if (ctx.teams) return teamsDarkTheme;
83
- //return jsonClone(webDarkTheme);
84
- const darkTheme: Theme = {
85
- ...createDarkTheme(t),
86
- };
87
-
88
- darkTheme.colorBrandForeground1 = t[110];
89
- darkTheme.colorBrandForeground2 = t[120];
90
- return darkTheme;
1
+ import { BrandVariants, Theme, createDarkTheme, createLightTheme, teamsDarkTheme, teamsLightTheme } from "@fluentui/react-components";
2
+
3
+ export interface iThemeContext {
4
+ teams?: boolean;
5
+ dark?: boolean;
6
+ }
7
+
8
+ export function getTheme(ctx: iThemeContext, t: BrandVariants = kThemeDefault) {
9
+ return ctx.dark
10
+ ? getDarkTheme(ctx, t)
11
+ : getLightTheme(ctx, t);
12
+ }
13
+
14
+
15
+ const kThemeDefault: BrandVariants = {
16
+ 10: "#04010A",
17
+ 20: "#16103B",
18
+ 30: "#17176F",
19
+ 40: "#0F1D9A",
20
+ 50: "#2F2AA1",
21
+ 60: "#4338A8",
22
+ 70: "#5546AF",
23
+ 80: "#6555B6",
24
+ 90: "#7563BD",
25
+ 100: "#8472C4",
26
+ 110: "#9282CB",
27
+ 120: "#A191D2",
28
+ 130: "#AFA1D9",
29
+ 140: "#BDB1E0",
30
+ 150: "#CBC1E7",
31
+ 160: "#D9D2EE"
32
+ };
33
+
34
+ const kThemeOrange: BrandVariants = {
35
+ 10: "#040301",
36
+ 20: "#1E170A",
37
+ 30: "#312610",
38
+ 40: "#403112",
39
+ 50: "#503D14",
40
+ 60: "#604915",
41
+ 70: "#705516",
42
+ 80: "#816216",
43
+ 90: "#926E16",
44
+ 100: "#A37B15",
45
+ 110: "#B58914",
46
+ 120: "#C79612",
47
+ 130: "#DAA40E",
48
+ 140: "#EDB208",
49
+ 150: "#FFC001",
50
+ 160: "#FFD47F"
51
+ };
52
+
53
+ const kThemeSecondary: BrandVariants = {
54
+ 10: "#020304",
55
+ 20: "#101A1D",
56
+ 30: "#162B32",
57
+ 40: "#1A3742",
58
+ 50: "#1D4552",
59
+ 60: "#1F5363",
60
+ 70: "#216175",
61
+ 80: "#227087",
62
+ 90: "#227F9A",
63
+ 100: "#208EAD",
64
+ 110: "#1E9EC0",
65
+ 120: "#1AADD4",
66
+ 130: "#12BEE8",
67
+ 140: "#02CEFD",
68
+ 150: "#6BDAFF",
69
+ 160: "#A0E5FF"
70
+ };
71
+
72
+ function getLightTheme(ctx: iThemeContext, t: BrandVariants = kThemeDefault) {
73
+ if (ctx.teams) return teamsLightTheme;
74
+ //return jsonClone(webLightTheme);
75
+ const lightTheme: Theme = {
76
+ ...createLightTheme(t),
77
+ };
78
+ return lightTheme;
79
+ }
80
+
81
+ function getDarkTheme(ctx: iThemeContext, t: BrandVariants = kThemeDefault) {
82
+ if (ctx.teams) return teamsDarkTheme;
83
+ //return jsonClone(webDarkTheme);
84
+ const darkTheme: Theme = {
85
+ ...createDarkTheme(t),
86
+ };
87
+
88
+ darkTheme.colorBrandForeground1 = t[110];
89
+ darkTheme.colorBrandForeground2 = t[120];
90
+ return darkTheme;
91
91
  }
@@ -1,2 +0,0 @@
1
- export declare const $build = "local-build";
2
- export declare const $release = "dev";
@@ -1,3 +0,0 @@
1
- export const $build = 'local-build';
2
- export const $release = 'dev';
3
- //# sourceMappingURL=build.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"build.js","sourceRoot":"","sources":["../../src/_modules/build.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,MAAM,GAAG,aAAa,CAAC;AACpC,MAAM,CAAC,MAAM,QAAQ,GAAG,KAAK,CAAC"}
@@ -1 +0,0 @@
1
- export declare const GetLogger: (name: string) => import("@kwiz/common").ConsoleLogger;
@@ -1,9 +0,0 @@
1
- import { config } from "@kwiz/common";
2
- import { BuildNumber, ReleaseStatus } from "./constants";
3
- export const { logger: GetLogger } = config({
4
- BuildNumber: BuildNumber,
5
- IsLocalDev: false,
6
- ReleaseStatus: ReleaseStatus,
7
- ProjectName: "[fluentui]"
8
- });
9
- //# sourceMappingURL=config.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/_modules/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEzD,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC;IACxC,WAAW,EAAE,WAAW;IACxB,UAAU,EAAE,KAAK;IACjB,aAAa,EAAE,aAAa;IAC5B,WAAW,EAAE,YAAY;CAC5B,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare var BuildNumber: string;
2
- export declare const ReleaseStatus = "npm";
@@ -1,3 +0,0 @@
1
- export var BuildNumber = 'unset';
2
- export const ReleaseStatus = "npm";
3
- //# sourceMappingURL=constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/_modules/constants.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,IAAI,WAAW,GAAG,OAAO,CAAC;AACjC,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,CAAC"}
@@ -1 +0,0 @@
1
- export * from './config';
@@ -1,2 +0,0 @@
1
- export * from './config';
2
- //# sourceMappingURL=exports-index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"exports-index.js","sourceRoot":"","sources":["../../src/_modules/exports-index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
@@ -1,28 +0,0 @@
1
- import { ButtonProps, CompoundButtonProps } from '@fluentui/react-components';
2
- import React from 'react';
3
- interface IProps {
4
- title: string;
5
- showTitleWithIcon?: boolean;
6
- dontStretch?: boolean;
7
- hideOnPrint?: boolean;
8
- dontCenterText?: boolean;
9
- hoverIcon?: JSX.Element;
10
- hoverTitle?: string;
11
- }
12
- interface IPropsCompound extends IProps {
13
- width?: string | number;
14
- }
15
- export type ButtonEXProps = IProps & ButtonProps;
16
- export type CompoundButtonEXProps = IPropsCompound & CompoundButtonProps;
17
- export declare const ButtonEX: React.ForwardRefExoticComponent<ButtonEXProps & React.RefAttributes<HTMLButtonElement>>;
18
- export declare const ButtonEXSecondary: React.ForwardRefExoticComponent<ButtonEXProps & React.RefAttributes<HTMLButtonElement>>;
19
- export declare const ButtonEXPrimary: React.ForwardRefExoticComponent<ButtonEXProps & React.RefAttributes<HTMLButtonElement>>;
20
- export declare const ButtonEXDanger: React.ForwardRefExoticComponent<ButtonEXProps & React.RefAttributes<HTMLButtonElement>>;
21
- export declare const ButtonEXSuccess: React.ForwardRefExoticComponent<ButtonEXProps & React.RefAttributes<HTMLButtonElement>>;
22
- export declare const ButtonEXPrimarySubtle: React.ForwardRefExoticComponent<ButtonEXProps & React.RefAttributes<HTMLButtonElement>>;
23
- export declare const ButtonEXDangerSubtle: React.ForwardRefExoticComponent<ButtonEXProps & React.RefAttributes<HTMLButtonElement>>;
24
- export declare const CompoundButtonEX: React.ForwardRefExoticComponent<CompoundButtonEXProps & React.RefAttributes<HTMLButtonElement>>;
25
- export declare const CompoundButtonEXSecondary: React.ForwardRefExoticComponent<CompoundButtonEXProps & React.RefAttributes<HTMLButtonElement>>;
26
- export declare const CompoundButtonEXPrimary: React.ForwardRefExoticComponent<CompoundButtonEXProps & React.RefAttributes<HTMLButtonElement>>;
27
- export declare const CompoundButtonEXDanger: React.ForwardRefExoticComponent<CompoundButtonEXProps & React.RefAttributes<HTMLButtonElement>>;
28
- export {};
@@ -1,113 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Button, CompoundButton, compoundButtonClassNames, makeStyles, mergeClasses, tokens, Tooltip } from '@fluentui/react-components';
3
- import { capitalizeFirstLetter, isFunction, isNullOrEmptyString, isNullOrUndefined, isString, PushNoDuplicate } from '@kwiz/common';
4
- import React from 'react';
5
- import { useKWIZFluentContext } from '../helpers/context';
6
- import { useCommonStyles, widthMedium } from '../styles/styles';
7
- const useStyles = makeStyles({
8
- buttonNoCenter: {
9
- justifyContent: 'flex-start',
10
- '& *': {
11
- /* a button with no center that has content of a vertical, or multiple labels */
12
- alignItems: 'flex-start'
13
- }
14
- },
15
- danger: {
16
- backgroundColor: tokens.colorStatusDangerBackground1,
17
- color: tokens.colorStatusWarningForeground2,
18
- [`& .${compoundButtonClassNames.secondaryContent}`]: {
19
- color: tokens.colorStatusWarningForeground1
20
- }
21
- },
22
- success: {
23
- color: tokens.colorStatusSuccessForeground1,
24
- [`& .${compoundButtonClassNames.secondaryContent}`]: {
25
- color: tokens.colorStatusSuccessForeground1,
26
- }
27
- },
28
- primarySubtle: {
29
- color: tokens.colorBrandForeground1,
30
- [`& .${compoundButtonClassNames.secondaryContent}`]: {
31
- color: tokens.colorBrandForeground1,
32
- }
33
- },
34
- dangerSubtle: {
35
- color: tokens.colorStatusWarningForeground2,
36
- [`& .${compoundButtonClassNames.secondaryContent}`]: {
37
- color: tokens.colorStatusWarningForeground1
38
- }
39
- }
40
- });
41
- export const ButtonEX = React.forwardRef((props, ref) => {
42
- const [hover, setHover] = React.useState(false);
43
- const trackHover = !isNullOrEmptyString(props.hoverTitle) || !isNullOrUndefined(props.hoverIcon);
44
- const title = hover && !isNullOrEmptyString(props.hoverTitle) ? props.hoverTitle
45
- : props.title || props['aria-label'];
46
- const icon = hover && !isNullOrUndefined(props.hoverIcon) ? props.hoverIcon : props.icon;
47
- let hasIcon = !isNullOrUndefined(icon);
48
- let hasText = props.children || !hasIcon || (hasIcon && props.showTitleWithIcon === true);
49
- const commonCssNames = useCommonStyles();
50
- const cssNames = useStyles();
51
- let css = [];
52
- if (props.hideOnPrint)
53
- PushNoDuplicate(css, commonCssNames.printHide);
54
- if (props.dontCenterText)
55
- PushNoDuplicate(css, cssNames.buttonNoCenter);
56
- if (!isNullOrEmptyString(props.className))
57
- css.push(...props.className.split(' '));
58
- let btn = _jsx(Button, Object.assign({ ref: ref, appearance: 'subtle' }, props, { className: mergeClasses(...css), "aria-label": title, title: undefined, icon: icon, onMouseEnter: trackHover ? (e) => {
59
- setHover(true);
60
- if (isFunction(props.onMouseEnter))
61
- props.onMouseEnter(e);
62
- } : props.onMouseEnter, onMouseLeave: trackHover ? (e) => {
63
- setHover(false);
64
- if (isFunction(props.onMouseLeave))
65
- props.onMouseLeave(e);
66
- } : props.onMouseLeave, children: props.children ||
67
- //no icon? will show the title by default
68
- (hasText && capitalizeFirstLetter(title)) }));
69
- if (!hasText || props.children) //icon only or when content is different than props.title
70
- btn = _jsx(Tooltip, { showDelay: 1000, relationship: 'label', withArrow: true, appearance: 'inverted', content: title, children: btn });
71
- return (props.dontStretch ? _jsx("div", { children: btn }) : btn);
72
- });
73
- export const ButtonEXSecondary = React.forwardRef((props, ref) => {
74
- const ctx = useKWIZFluentContext();
75
- return (_jsx(ButtonEX, Object.assign({ ref: ref, appearance: 'secondary', shape: ctx.buttonShape }, props)));
76
- });
77
- export const ButtonEXPrimary = React.forwardRef((props, ref) => {
78
- return (_jsx(ButtonEXSecondary, Object.assign({ ref: ref, appearance: 'primary' }, props, { children: props.children })));
79
- });
80
- export const ButtonEXDanger = React.forwardRef((props, ref) => {
81
- const cssNames = useStyles();
82
- return (_jsx(ButtonEXSecondary, Object.assign({ ref: ref, className: props.disabled ? undefined : cssNames.danger }, props, { children: props.children })));
83
- });
84
- export const ButtonEXSuccess = React.forwardRef((props, ref) => {
85
- const cssNames = useStyles();
86
- return (_jsx(ButtonEX, Object.assign({ ref: ref, className: cssNames.success }, props, { children: props.children })));
87
- });
88
- export const ButtonEXPrimarySubtle = React.forwardRef((props, ref) => {
89
- const cssNames = useStyles();
90
- return (_jsx(ButtonEX, Object.assign({ ref: ref, className: props.disabled ? undefined : cssNames.primarySubtle }, props, { children: props.children })));
91
- });
92
- export const ButtonEXDangerSubtle = React.forwardRef((props, ref) => {
93
- const cssNames = useStyles();
94
- return (_jsx(ButtonEX, Object.assign({ ref: ref, className: props.disabled ? undefined : cssNames.dangerSubtle }, props, { children: props.children })));
95
- });
96
- export const CompoundButtonEX = React.forwardRef((props, ref) => {
97
- let title = props.title || props['aria-label'];
98
- let tooltip = isString(props.secondaryContent) ? props.secondaryContent : title;
99
- let max = typeof (props.width) === "undefined" ? widthMedium : props.width;
100
- return (_jsx(Tooltip, { showDelay: 1000, relationship: 'label', withArrow: true, appearance: 'inverted', content: tooltip, children: _jsx(CompoundButton, Object.assign({ ref: ref, appearance: 'subtle', style: { justifyContent: "flex-start", maxWidth: max } }, props, { "aria-label": tooltip, title: undefined, children: props.children || capitalizeFirstLetter(title) })) }));
101
- });
102
- export const CompoundButtonEXSecondary = React.forwardRef((props, ref) => {
103
- const ctx = useKWIZFluentContext();
104
- return (_jsx(CompoundButtonEX, Object.assign({ ref: ref, appearance: 'secondary', shape: ctx.buttonShape }, props)));
105
- });
106
- export const CompoundButtonEXPrimary = React.forwardRef((props, ref) => {
107
- return (_jsx(CompoundButtonEXSecondary, Object.assign({ ref: ref, appearance: 'primary' }, props, { children: props.children })));
108
- });
109
- export const CompoundButtonEXDanger = React.forwardRef((props, ref) => {
110
- const cssNames = useStyles();
111
- return (_jsx(CompoundButtonEXSecondary, Object.assign({ ref: ref, className: cssNames.danger }, props, { children: props.children })));
112
- });
113
- //# sourceMappingURL=button.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"button.js","sourceRoot":"","sources":["../../src/controls/button.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAe,cAAc,EAAE,wBAAwB,EAAuB,UAAU,EAAE,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAC3K,OAAO,EAAE,qBAAqB,EAAE,UAAU,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,QAAQ,EAAE,e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
2
- interface IProps {
3
- }
4
- export declare const Centered: React.FunctionComponent<React.PropsWithChildren<IProps>>;
5
- export {};
@@ -1,14 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { makeStyles } from '@fluentui/react-components';
3
- import { Horizontal } from './horizontal';
4
- import { Vertical } from './vertical';
5
- const useStyles = makeStyles({
6
- center: {
7
- justifyContent: 'center'
8
- },
9
- });
10
- export const Centered = (props) => {
11
- const cssNames = useStyles();
12
- return (_jsx(Vertical, { main: true, css: [cssNames.center], children: _jsx(Horizontal, { css: [cssNames.center], children: props.children }) }));
13
- };
14
- //# sourceMappingURL=centered.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"centered.js","sourceRoot":"","sources":["../../src/controls/centered.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAExD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,MAAM,SAAS,GAAG,UAAU,CAAC;IACzB,MAAM,EAAE;QACJ,cAAc,EAAE,QAAQ;KAC3B;CACJ,CAAC,CAAA;AAIF,MAAM,CAAC,MAAM,QAAQ,GAA6D,CAAC,KAAK,EAAE,EAAE;IACxF,MAAM,QAAQ,GAAG,SAAS,EAAE,CAAC;IAC7B,OAAO,CACH,KAAC,QAAQ,IAAC,IAAI,QAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,YACjC,KAAC,UAAU,IAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,YAC7B,KAAK,CAAC,QAAQ,GACN,GACN,CACd,CAAC;AACN,CAAC,CAAA"}