@uxf/ui 1.0.0-beta.11 → 1.0.0-beta.16

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 (131) hide show
  1. package/avatar/avatar.d.ts +14 -0
  2. package/avatar/avatar.jsx +10 -0
  3. package/avatar/avatar.stories.d.ts +8 -0
  4. package/avatar/avatar.stories.jsx +29 -0
  5. package/avatar/theme.d.ts +5 -0
  6. package/avatar/theme.js +2 -0
  7. package/{styles → button}/button.css +8 -8
  8. package/button/button.d.ts +1 -0
  9. package/button/button.jsx +17 -0
  10. package/button/button.stories.jsx +59 -0
  11. package/{stories → button}/button.stories.tsx +1 -1
  12. package/button/button.tsx +36 -0
  13. package/button/index.js +0 -1
  14. package/button/index.ts +2 -0
  15. package/button/theme.js +0 -1
  16. package/button/theme.ts +20 -0
  17. package/image-gallery/components/close-button.jsx +13 -0
  18. package/image-gallery/components/close-button.tsx +19 -0
  19. package/image-gallery/components/dot.jsx +12 -0
  20. package/image-gallery/components/dot.tsx +17 -0
  21. package/image-gallery/components/gallery.jsx +74 -0
  22. package/image-gallery/components/gallery.tsx +67 -0
  23. package/image-gallery/components/icon-chevron-left.jsx +12 -0
  24. package/image-gallery/components/icon-chevron-left.tsx +18 -0
  25. package/image-gallery/components/icon-chevron-right.jsx +12 -0
  26. package/image-gallery/components/icon-chevron-right.tsx +18 -0
  27. package/image-gallery/components/icon-close.jsx +12 -0
  28. package/image-gallery/components/icon-close.tsx +22 -0
  29. package/image-gallery/components/next-button.jsx +13 -0
  30. package/image-gallery/components/next-button.tsx +19 -0
  31. package/image-gallery/components/previous-button.jsx +13 -0
  32. package/image-gallery/components/previous-button.tsx +19 -0
  33. package/image-gallery/context.jsx +12 -0
  34. package/image-gallery/context.tsx +17 -0
  35. package/image-gallery/image-gallery.jsx +58 -0
  36. package/image-gallery/image-gallery.stories.jsx +29 -0
  37. package/{stories → image-gallery}/image-gallery.stories.tsx +0 -0
  38. package/image-gallery/image-gallery.tsx +59 -0
  39. package/image-gallery/image.jsx +12 -0
  40. package/image-gallery/image.tsx +19 -0
  41. package/image-gallery/index.js +0 -1
  42. package/image-gallery/index.ts +3 -0
  43. package/image-gallery/types.js +0 -1
  44. package/image-gallery/types.ts +6 -0
  45. package/image-gallery/use-image.js +5 -6
  46. package/image-gallery/use-image.ts +17 -0
  47. package/input/index.d.ts +13 -6
  48. package/input/index.js +14 -14
  49. package/input/index.ts +14 -0
  50. package/input/input-basic.css +18 -0
  51. package/input/input-element.d.ts +8 -0
  52. package/input/input-element.jsx +11 -0
  53. package/input/input-element.tsx +30 -0
  54. package/input/input-left-addon.jsx +10 -0
  55. package/input/input-left-addon.tsx +12 -0
  56. package/input/input-left-element.jsx +10 -0
  57. package/input/input-left-element.tsx +11 -0
  58. package/input/input-right-addon.jsx +10 -0
  59. package/input/input-right-addon.tsx +11 -0
  60. package/input/input-right-element.jsx +10 -0
  61. package/input/input-right-element.tsx +11 -0
  62. package/{styles → input}/input.css +27 -26
  63. package/input/input.d.ts +8 -7
  64. package/input/input.jsx +65 -0
  65. package/input/input.stories.d.ts +9 -4
  66. package/input/input.stories.jsx +78 -0
  67. package/input/input.stories.tsx +79 -0
  68. package/input/input.tsx +70 -0
  69. package/input/theme.js +0 -1
  70. package/input/theme.ts +7 -0
  71. package/package.json +11 -41
  72. package/text-input/index.d.ts +1 -0
  73. package/{storybook → text-input}/index.js +1 -2
  74. package/text-input/index.ts +1 -0
  75. package/text-input/text-input.css +29 -0
  76. package/text-input/text-input.d.ts +22 -0
  77. package/text-input/text-input.jsx +32 -0
  78. package/text-input/text-input.stories.d.ts +9 -0
  79. package/text-input/text-input.stories.jsx +55 -0
  80. package/text-input/text-input.stories.tsx +72 -0
  81. package/text-input/text-input.tsx +99 -0
  82. package/tsconfig.json +7 -0
  83. package/tsconfig.tsbuildinfo +1 -0
  84. package/types/form-control-props.d.ts +1 -1
  85. package/types/form-control-props.js +0 -1
  86. package/types/form-control-props.ts +35 -0
  87. package/types/index.d.ts +1 -0
  88. package/types/index.js +17 -0
  89. package/types/index.ts +1 -0
  90. package/{storybook → utils}/action.d.ts +0 -0
  91. package/utils/action.js +11 -0
  92. package/utils/action.ts +14 -0
  93. package/{styles → utils}/component-structure-analyzer.css +0 -0
  94. package/utils/component-structure-analyzer.jsx +10 -0
  95. package/utils/component-structure-analyzer.tsx +12 -0
  96. package/utils/cx.js +8 -13
  97. package/utils/cx.ts +56 -0
  98. package/utils/forwardRef.js +3 -4
  99. package/utils/forwardRef.ts +30 -0
  100. package/{storybook → utils}/storybook-config.d.ts +1 -1
  101. package/{storybook/storybook-config.js → utils/storybook-config.jsx} +3 -4
  102. package/utils/storybook-config.tsx +42 -0
  103. package/button/button.js +0 -17
  104. package/button/button.stories.js +0 -33
  105. package/image-gallery/components/close-button.js +0 -13
  106. package/image-gallery/components/dot.js +0 -13
  107. package/image-gallery/components/gallery.js +0 -68
  108. package/image-gallery/components/icon-chevron-left.js +0 -12
  109. package/image-gallery/components/icon-chevron-right.js +0 -12
  110. package/image-gallery/components/icon-close.js +0 -12
  111. package/image-gallery/components/next-button.js +0 -13
  112. package/image-gallery/components/previous-button.js +0 -13
  113. package/image-gallery/context.js +0 -13
  114. package/image-gallery/image-gallery.js +0 -87
  115. package/image-gallery/image-gallery.stories.js +0 -27
  116. package/image-gallery/image.js +0 -13
  117. package/input/input-group.d.ts +0 -9
  118. package/input/input-group.js +0 -78
  119. package/input/input-left-addon.js +0 -11
  120. package/input/input-left-element.js +0 -11
  121. package/input/input-right-addon.js +0 -11
  122. package/input/input-right-element.js +0 -11
  123. package/input/input.js +0 -12
  124. package/input/input.stories.js +0 -105
  125. package/stories/input.stories.tsx +0 -101
  126. package/storybook/action.js +0 -41
  127. package/storybook/index.d.ts +0 -1
  128. package/styles/input-basic.css +0 -18
  129. package/types.d.ts +0 -3
  130. package/types.js +0 -3
  131. package/utils/component-structure-analyzer.js +0 -11
@@ -1,101 +0,0 @@
1
- import React, { useState } from "react";
2
- import Input from "@uxf/ui/input/input";
3
- import InputLeftAddon from "@uxf/ui/input/input-left-addon";
4
- import InputRightAddon from "@uxf/ui/input/input-right-addon";
5
- import InputGroup from "@uxf/ui/input/input-group";
6
- import ComponentStructureAnalyzer from "@uxf/ui/utils/component-structure-analyzer";
7
- import InputLeftElement from "@uxf/ui/input/input-left-element";
8
- import InputRightElement from "@uxf/ui/input/input-right-element";
9
- import { action } from "@uxf/ui/storybook/action";
10
-
11
- export default {
12
- title: "UI/Input",
13
- component: InputGroup,
14
- };
15
-
16
- export function ComponentStructure() {
17
- const [value, onChange] = useState("");
18
- return (
19
- <>
20
- <h2>Full example</h2>
21
- <ComponentStructureAnalyzer>
22
- <InputGroup>
23
- <InputLeftAddon>Left addon</InputLeftAddon>
24
- <InputLeftElement>Left element</InputLeftElement>
25
- <Input value={value} onChange={onChange} />
26
- <InputRightElement>Right element</InputRightElement>
27
- <InputRightAddon>Right addon</InputRightAddon>
28
- </InputGroup>
29
- </ComponentStructureAnalyzer>
30
- <h2>Only input elements</h2>
31
- <ComponentStructureAnalyzer>
32
- <InputGroup>
33
- <InputLeftElement>Left element</InputLeftElement>
34
- <Input value={value} onChange={onChange} />
35
- <InputRightElement>Right element</InputRightElement>
36
- </InputGroup>
37
- </ComponentStructureAnalyzer>
38
- <h2>Only addons</h2>
39
- <ComponentStructureAnalyzer>
40
- <InputGroup>
41
- <Input value={value} onChange={onChange} />
42
- </InputGroup>
43
- </ComponentStructureAnalyzer>
44
- </>
45
- );
46
- }
47
-
48
- export function Default() {
49
- const [value, onChange] = useState("");
50
- const [isInvalid, setInvalid] = useState(false);
51
-
52
- return (
53
- <div className="space-y-2">
54
- <input
55
- type="checkbox"
56
- checked={isInvalid}
57
- onChange={(e) => setInvalid(e.target.checked)}
58
- />
59
- <InputGroup>
60
- <InputLeftAddon>InputLeftAddon</InputLeftAddon>
61
- <InputLeftElement>InputLeftElement</InputLeftElement>
62
- <Input
63
- value={value}
64
- onChange={action("onChange", onChange)}
65
- placeholder="Placeholder"
66
- isInvalid={isInvalid}
67
- />
68
- <InputRightElement>InputRightElement</InputRightElement>
69
- <InputRightAddon>InputRightAddon</InputRightAddon>
70
- </InputGroup>
71
- <InputGroup>
72
- <InputLeftAddon>https://</InputLeftAddon>
73
- <Input
74
- value={value}
75
- onChange={action("onChange", onChange)}
76
- placeholder="Placeholder"
77
- isInvalid={isInvalid}
78
- />
79
- <InputRightAddon>.uxf.cz</InputRightAddon>
80
- </InputGroup>
81
- <InputGroup>
82
- <InputLeftElement>🌷</InputLeftElement>
83
- <Input
84
- value={value}
85
- onChange={action("onChange", onChange)}
86
- placeholder="Placeholder"
87
- isInvalid={isInvalid}
88
- />
89
- <InputRightElement>🔔</InputRightElement>
90
- </InputGroup>
91
- <InputGroup>
92
- <Input
93
- value={value}
94
- onChange={action("onChange", onChange)}
95
- placeholder="Placeholder"
96
- isInvalid={isInvalid}
97
- />
98
- </InputGroup>
99
- </div>
100
- );
101
- }
@@ -1,41 +0,0 @@
1
- "use strict";
2
- var __read = (this && this.__read) || function (o, n) {
3
- var m = typeof Symbol === "function" && o[Symbol.iterator];
4
- if (!m) return o;
5
- var i = m.call(o), r, ar = [], e;
6
- try {
7
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
8
- }
9
- catch (error) { e = { error: error }; }
10
- finally {
11
- try {
12
- if (r && !r.done && (m = i["return"])) m.call(i);
13
- }
14
- finally { if (e) throw e.error; }
15
- }
16
- return ar;
17
- };
18
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
19
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
20
- if (ar || !(i in from)) {
21
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
22
- ar[i] = from[i];
23
- }
24
- }
25
- return to.concat(ar || Array.prototype.slice.call(from));
26
- };
27
- Object.defineProperty(exports, "__esModule", { value: true });
28
- exports.action = void 0;
29
- var addon_actions_1 = require("@storybook/addon-actions");
30
- function action(name, handler) {
31
- return function () {
32
- var args = [];
33
- for (var _i = 0; _i < arguments.length; _i++) {
34
- args[_i] = arguments[_i];
35
- }
36
- (0, addon_actions_1.action)(name).apply(void 0, __spreadArray([], __read(args), false));
37
- handler.apply(void 0, __spreadArray([], __read(args), false));
38
- };
39
- }
40
- exports.action = action;
41
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWN0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3N0b3J5Ym9vay9hY3Rpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUFBLDBEQUdrQztBQUVsQyxTQUFnQixNQUFNLENBQ3BCLElBQVksRUFDWixPQUF3QjtJQUV4QixPQUFPO1FBQVUsY0FBTzthQUFQLFVBQU8sRUFBUCxxQkFBTyxFQUFQLElBQU87WUFBUCx5QkFBTzs7UUFDdEIsSUFBQSxzQkFBZSxFQUFDLElBQUksQ0FBQyx3Q0FBSSxJQUFJLFdBQUU7UUFDL0IsT0FBTyx3Q0FBSSxJQUFJLFdBQUU7SUFDbkIsQ0FBQyxDQUFDO0FBQ0osQ0FBQztBQVJELHdCQVFDIn0=
@@ -1 +0,0 @@
1
- export * from "./storybook-config";
@@ -1,18 +0,0 @@
1
- .uxf-input-group {
2
- @apply flex flex-row;
3
-
4
- .uxf-input-wrapper {
5
- @apply flex w-full flex-row;
6
- }
7
-
8
- .uxf-input {
9
- @apply w-full px-2;
10
- }
11
-
12
- .uxf-input-left-element,
13
- .uxf-input-right-element,
14
- .uxf-input-left-addon,
15
- .uxf-input-right-addon {
16
- @apply flex flex-row items-center whitespace-nowrap;
17
- }
18
- }
package/types.d.ts DELETED
@@ -1,3 +0,0 @@
1
- export declare type Classes<T extends string> = {
2
- [key in T]: string;
3
- };
package/types.js DELETED
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvdHlwZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
@@ -1,11 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- var react_1 = __importDefault(require("react"));
7
- function ComponentStructureAnalyzer(props) {
8
- return (react_1.default.createElement("div", { className: "uxf-component-structure-analyzer" }, props.children));
9
- }
10
- exports.default = ComponentStructureAnalyzer;
11
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tcG9uZW50LXN0cnVjdHVyZS1hbmFseXplci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlscy9jb21wb25lbnQtc3RydWN0dXJlLWFuYWx5emVyLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLGdEQUF5QztBQUt6QyxTQUFTLDBCQUEwQixDQUFDLEtBQXNDO0lBQ3hFLE9BQU8sQ0FDTCx1Q0FBSyxTQUFTLEVBQUMsa0NBQWtDLElBQUUsS0FBSyxDQUFDLFFBQVEsQ0FBTyxDQUN6RSxDQUFDO0FBQ0osQ0FBQztBQUVELGtCQUFlLDBCQUEwQixDQUFDIn0=