@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.
- package/avatar/avatar.d.ts +14 -0
- package/avatar/avatar.jsx +10 -0
- package/avatar/avatar.stories.d.ts +8 -0
- package/avatar/avatar.stories.jsx +29 -0
- package/avatar/theme.d.ts +5 -0
- package/avatar/theme.js +2 -0
- package/{styles → button}/button.css +8 -8
- package/button/button.d.ts +1 -0
- package/button/button.jsx +17 -0
- package/button/button.stories.jsx +59 -0
- package/{stories → button}/button.stories.tsx +1 -1
- package/button/button.tsx +36 -0
- package/button/index.js +0 -1
- package/button/index.ts +2 -0
- package/button/theme.js +0 -1
- package/button/theme.ts +20 -0
- package/image-gallery/components/close-button.jsx +13 -0
- package/image-gallery/components/close-button.tsx +19 -0
- package/image-gallery/components/dot.jsx +12 -0
- package/image-gallery/components/dot.tsx +17 -0
- package/image-gallery/components/gallery.jsx +74 -0
- package/image-gallery/components/gallery.tsx +67 -0
- package/image-gallery/components/icon-chevron-left.jsx +12 -0
- package/image-gallery/components/icon-chevron-left.tsx +18 -0
- package/image-gallery/components/icon-chevron-right.jsx +12 -0
- package/image-gallery/components/icon-chevron-right.tsx +18 -0
- package/image-gallery/components/icon-close.jsx +12 -0
- package/image-gallery/components/icon-close.tsx +22 -0
- package/image-gallery/components/next-button.jsx +13 -0
- package/image-gallery/components/next-button.tsx +19 -0
- package/image-gallery/components/previous-button.jsx +13 -0
- package/image-gallery/components/previous-button.tsx +19 -0
- package/image-gallery/context.jsx +12 -0
- package/image-gallery/context.tsx +17 -0
- package/image-gallery/image-gallery.jsx +58 -0
- package/image-gallery/image-gallery.stories.jsx +29 -0
- package/{stories → image-gallery}/image-gallery.stories.tsx +0 -0
- package/image-gallery/image-gallery.tsx +59 -0
- package/image-gallery/image.jsx +12 -0
- package/image-gallery/image.tsx +19 -0
- package/image-gallery/index.js +0 -1
- package/image-gallery/index.ts +3 -0
- package/image-gallery/types.js +0 -1
- package/image-gallery/types.ts +6 -0
- package/image-gallery/use-image.js +5 -6
- package/image-gallery/use-image.ts +17 -0
- package/input/index.d.ts +13 -6
- package/input/index.js +14 -14
- package/input/index.ts +14 -0
- package/input/input-basic.css +18 -0
- package/input/input-element.d.ts +8 -0
- package/input/input-element.jsx +11 -0
- package/input/input-element.tsx +30 -0
- package/input/input-left-addon.jsx +10 -0
- package/input/input-left-addon.tsx +12 -0
- package/input/input-left-element.jsx +10 -0
- package/input/input-left-element.tsx +11 -0
- package/input/input-right-addon.jsx +10 -0
- package/input/input-right-addon.tsx +11 -0
- package/input/input-right-element.jsx +10 -0
- package/input/input-right-element.tsx +11 -0
- package/{styles → input}/input.css +27 -26
- package/input/input.d.ts +8 -7
- package/input/input.jsx +65 -0
- package/input/input.stories.d.ts +9 -4
- package/input/input.stories.jsx +78 -0
- package/input/input.stories.tsx +79 -0
- package/input/input.tsx +70 -0
- package/input/theme.js +0 -1
- package/input/theme.ts +7 -0
- package/package.json +11 -41
- package/text-input/index.d.ts +1 -0
- package/{storybook → text-input}/index.js +1 -2
- package/text-input/index.ts +1 -0
- package/text-input/text-input.css +29 -0
- package/text-input/text-input.d.ts +22 -0
- package/text-input/text-input.jsx +32 -0
- package/text-input/text-input.stories.d.ts +9 -0
- package/text-input/text-input.stories.jsx +55 -0
- package/text-input/text-input.stories.tsx +72 -0
- package/text-input/text-input.tsx +99 -0
- package/tsconfig.json +7 -0
- package/tsconfig.tsbuildinfo +1 -0
- package/types/form-control-props.d.ts +1 -1
- package/types/form-control-props.js +0 -1
- package/types/form-control-props.ts +35 -0
- package/types/index.d.ts +1 -0
- package/types/index.js +17 -0
- package/types/index.ts +1 -0
- package/{storybook → utils}/action.d.ts +0 -0
- package/utils/action.js +11 -0
- package/utils/action.ts +14 -0
- package/{styles → utils}/component-structure-analyzer.css +0 -0
- package/utils/component-structure-analyzer.jsx +10 -0
- package/utils/component-structure-analyzer.tsx +12 -0
- package/utils/cx.js +8 -13
- package/utils/cx.ts +56 -0
- package/utils/forwardRef.js +3 -4
- package/utils/forwardRef.ts +30 -0
- package/{storybook → utils}/storybook-config.d.ts +1 -1
- package/{storybook/storybook-config.js → utils/storybook-config.jsx} +3 -4
- package/utils/storybook-config.tsx +42 -0
- package/button/button.js +0 -17
- package/button/button.stories.js +0 -33
- package/image-gallery/components/close-button.js +0 -13
- package/image-gallery/components/dot.js +0 -13
- package/image-gallery/components/gallery.js +0 -68
- package/image-gallery/components/icon-chevron-left.js +0 -12
- package/image-gallery/components/icon-chevron-right.js +0 -12
- package/image-gallery/components/icon-close.js +0 -12
- package/image-gallery/components/next-button.js +0 -13
- package/image-gallery/components/previous-button.js +0 -13
- package/image-gallery/context.js +0 -13
- package/image-gallery/image-gallery.js +0 -87
- package/image-gallery/image-gallery.stories.js +0 -27
- package/image-gallery/image.js +0 -13
- package/input/input-group.d.ts +0 -9
- package/input/input-group.js +0 -78
- package/input/input-left-addon.js +0 -11
- package/input/input-left-element.js +0 -11
- package/input/input-right-addon.js +0 -11
- package/input/input-right-element.js +0 -11
- package/input/input.js +0 -12
- package/input/input.stories.js +0 -105
- package/stories/input.stories.tsx +0 -101
- package/storybook/action.js +0 -41
- package/storybook/index.d.ts +0 -1
- package/styles/input-basic.css +0 -18
- package/types.d.ts +0 -3
- package/types.js +0 -3
- 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
|
-
}
|
package/storybook/action.js
DELETED
|
@@ -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=
|
package/storybook/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./storybook-config";
|
package/styles/input-basic.css
DELETED
|
@@ -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
package/types.js
DELETED
|
@@ -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=
|