jy-headless 0.0.7 → 0.0.9

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.
@@ -0,0 +1,3 @@
1
+ import type { StorybookConfig } from '@storybook/react-vite';
2
+ declare const config: StorybookConfig;
3
+ export default config;
@@ -0,0 +1,3 @@
1
+ import type { Preview } from '@storybook/react';
2
+ declare const preview: Preview;
3
+ export default preview;
package/dist/index.css ADDED
@@ -0,0 +1 @@
1
+ @keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}
@@ -0,0 +1 @@
1
+ @keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}
package/dist/index.esm.js CHANGED
@@ -1,9 +1,126 @@
1
1
  import React from 'react';
2
2
 
3
+ /******************************************************************************
4
+ Copyright (c) Microsoft Corporation.
5
+
6
+ Permission to use, copy, modify, and/or distribute this software for any
7
+ purpose with or without fee is hereby granted.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
10
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
12
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
14
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15
+ PERFORMANCE OF THIS SOFTWARE.
16
+ ***************************************************************************** */
17
+ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
18
+
19
+
20
+ var __assign = function() {
21
+ __assign = Object.assign || function __assign(t) {
22
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
23
+ s = arguments[i];
24
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
25
+ }
26
+ return t;
27
+ };
28
+ return __assign.apply(this, arguments);
29
+ };
30
+
31
+ function __rest(s, e) {
32
+ var t = {};
33
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
34
+ t[p] = s[p];
35
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
36
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
37
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
38
+ t[p[i]] = s[p[i]];
39
+ }
40
+ return t;
41
+ }
42
+
43
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
44
+ var e = new Error(message);
45
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
46
+ };
47
+
48
+ var Spinner = function (_a) {
49
+ var color = _a.color, size = _a.size, spinTime = _a.spinTime;
50
+ return (React.createElement(React.Fragment, null,
51
+ React.createElement("span", { style: { animation: "spin ".concat(spinTime || '2s', " 0s linear infinite") } },
52
+ React.createElement("svg", { viewBox: "0 0 20 20", version: "1.1", xmlns: "http://www.w3.org/2000/svg", width: size || '30px', height: size || '30px', xmlnsXlink: "http://www.w3.org/1999/xlink", fill: color || 'black' },
53
+ React.createElement("g", { id: "SVGRepo_bgCarrier", strokeWidth: "0" }),
54
+ React.createElement("g", { id: "SVGRepo_tracerCarrier", strokeLinecap: "round", strokeLinejoin: "round" }),
55
+ React.createElement("g", { id: "SVGRepo_iconCarrier" },
56
+ React.createElement("title", null, "ic_fluent_spinner_ios_20_filled"),
57
+ React.createElement("desc", null, "Created with Sketch."),
58
+ React.createElement("g", { id: "\uD83D\uDD0D-System-Icons", stroke: "none", strokeWidth: "1", fill: "none", fillRule: "evenodd" },
59
+ React.createElement("g", { id: "ic_fluent_spinner_ios_20_filled", fill: "#212121", fillRule: "nonzero" },
60
+ React.createElement("path", { d: "M10,3.5 C6.41015,3.5 3.5,6.41015 3.5,10 C3.5,10.4142 3.16421,10.75 2.75,10.75 C2.33579,10.75 2,10.4142 2,10 C2,5.58172 5.58172,2 10,2 C14.4183,2 18,5.58172 18,10 C18,14.4183 14.4183,18 10,18 C9.58579,18 9.25,17.6642 9.25,17.25 C9.25,16.8358 9.58579,16.5 10,16.5 C13.5899,16.5 16.5,13.5899 16.5,10 C16.5,6.41015 13.5899,3.5 10,3.5 Z", id: "\uD83C\uDFA8-Color" }))))))));
61
+ };
62
+
3
63
  var Button = function (_a) {
4
- var label = _a.label;
5
- return React.createElement("button", null, label);
64
+ var prefixElement = _a.prefixElement, suffixElement = _a.suffixElement, children = _a.children, _b = _a.loading, loading = _b === undefined ? false : _b, _c = _a.spinner, spinner = _c === undefined ? React.createElement(Spinner, { color: 'black', size: '9px' }) : _c, style = _a.style, restProps = __rest(_a, ["prefixElement", "suffixElement", "children", "loading", "spinner", "style"]);
65
+ return (React.createElement("button", __assign({}, restProps, { style: __assign({ display: 'inline-flex', justifyContent: 'space-between', alignItems: 'center', paddingRight: '4px', paddingLeft: '4px' }, style) }),
66
+ prefixElement,
67
+ loading ? spinner : children,
68
+ suffixElement));
69
+ };
70
+
71
+ var Input = function (_a) {
72
+ var prefixElement = _a.prefixElement, suffixElement = _a.suffixElement, className = _a.className, style = _a.style, containerStyle = _a.containerStyle, containerClassName = _a.containerClassName, restProps = __rest(_a, ["prefixElement", "suffixElement", "className", "style", "containerStyle", "containerClassName"]);
73
+ return (React.createElement("span", { className: containerClassName, style: __assign({ display: 'inline-flex', justifyContent: 'space-between', alignItems: 'center', paddingRight: '4px', paddingLeft: '4px' }, containerStyle) },
74
+ prefixElement,
75
+ React.createElement("input", __assign({}, restProps, { className: className, style: __assign({ outline: 'none', border: 'none', flex: 1 }, style) })),
76
+ suffixElement));
77
+ };
78
+
79
+ var CloseIcon = function (_a) {
80
+ var _b = _a.color, color = _b === undefined ? '#000' : _b, _c = _a.size, size = _c === undefined ? '20px' : _c, _d = _a.bgColor, bgColor = _d === undefined ? 'transparent' : _d;
81
+ return (React.createElement("svg", { viewBox: "0 0 24 24", width: size, height: size, fill: "none", style: { backgroundColor: bgColor }, xmlns: "http://www.w3.org/2000/svg" },
82
+ React.createElement("g", { id: "SVGRepo_bgCarrier", strokeWidth: "0" }),
83
+ React.createElement("g", { id: "SVGRepo_tracerCarrier", strokeLinecap: "round", strokeLinejoin: "round" }),
84
+ React.createElement("g", { id: "SVGRepo_iconCarrier" },
85
+ React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M5.29289 5.29289C5.68342 4.90237 6.31658 4.90237 6.70711 5.29289L12 10.5858L17.2929 5.29289C17.6834 4.90237 18.3166 4.90237 18.7071 5.29289C19.0976 5.68342 19.0976 6.31658 18.7071 6.70711L13.4142 12L18.7071 17.2929C19.0976 17.6834 19.0976 18.3166 18.7071 18.7071C18.3166 19.0976 17.6834 19.0976 17.2929 18.7071L12 13.4142L6.70711 18.7071C6.31658 19.0976 5.68342 19.0976 5.29289 18.7071C4.90237 18.3166 4.90237 17.6834 5.29289 17.2929L10.5858 12L5.29289 6.70711C4.90237 6.31658 4.90237 5.68342 5.29289 5.29289Z", fill: color }))));
86
+ };
87
+ // COLLECTION: Wave Oval Interface Icons
88
+ // LICENSE: PD License
89
+ // AUTHOR: Arthur Kazais
90
+ // https://www.svgrepo.com/svg/499592/close-x
91
+
92
+ var CallIcon = function (_a) {
93
+ var _b = _a.color, color = _b === undefined ? '#000' : _b, _c = _a.size, size = _c === undefined ? '20px' : _c, _d = _a.bgColor, bgColor = _d === undefined ? 'transparent' : _d, _e = _a.fill, fill = _e === undefined ? 'none' : _e;
94
+ return (React.createElement("svg", { viewBox: "0 -0.5 25 25", width: size, height: size, fill: fill, style: { backgroundColor: bgColor }, xmlns: "http://www.w3.org/2000/svg" },
95
+ React.createElement("g", { id: "SVGRepo_bgCarrier", strokeWidth: "0" }),
96
+ React.createElement("g", { id: "SVGRepo_tracerCarrier", strokeLinecap: "round", strokeLinejoin: "round" }),
97
+ React.createElement("g", { id: "SVGRepo_iconCarrier" },
98
+ React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M6.36343 6.36195C7.24343 5.43495 7.55443 5.17495 7.92943 5.05395C8.18895 4.98595 8.46112 4.98217 8.72243 5.04295C9.06643 5.14295 9.15743 5.21895 10.2854 6.34295C11.2764 7.32995 11.3754 7.43695 11.4704 7.62995C11.6521 7.96873 11.6805 8.36894 11.5484 8.72995C11.4484 9.00495 11.3064 9.18695 10.7054 9.78995L10.3134 10.183C10.2105 10.2876 10.1863 10.4464 10.2534 10.577C11.1244 12.0628 12.36 13.3019 13.8434 14.177C14.0142 14.2684 14.2245 14.2389 14.3634 14.104L14.7404 13.733C14.9734 13.4941 15.2202 13.2691 15.4794 13.059C15.8866 12.809 16.3939 12.7867 16.8214 13C17.0304 13.1 17.0994 13.162 18.1214 14.182C19.1754 15.233 19.2054 15.266 19.3214 15.507C19.5397 15.9059 19.5374 16.3891 19.3154 16.786C19.2024 17.01 19.1334 17.091 18.5404 17.697C18.1824 18.063 17.8454 18.397 17.7914 18.446C17.3022 18.851 16.6746 19.0497 16.0414 19C14.883 18.8944 13.7617 18.5363 12.7564 17.951C10.5296 16.7711 8.63383 15.0521 7.24243 12.951C6.93937 12.5112 6.66994 12.0492 6.43643 11.569C5.81001 10.4953 5.48653 9.27189 5.50043 8.02895C5.54825 7.37871 5.86008 6.77637 6.36343 6.36195Z", stroke: color, strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }))));
99
+ };
100
+ // COLLECTION: Xnix Circular Interface Icons
101
+ // LICENSE: CC Attribution License
102
+ // AUTHOR: Ankush Syal
103
+ // https://www.svgrepo.com/svg/520583/call
104
+
105
+ var HomeIcon = function (_a) {
106
+ var _b = _a.color, color = _b === undefined ? '#000' : _b, _c = _a.size, size = _c === undefined ? '20px' : _c, _d = _a.bgColor, bgColor = _d === undefined ? 'transparent' : _d, _e = _a.fill, fill = _e === undefined ? 'none' : _e;
107
+ return (React.createElement("svg", { viewBox: "0 -0.5 25 25", width: size, height: size, fill: fill, style: { backgroundColor: bgColor }, xmlns: "http://www.w3.org/2000/svg" },
108
+ React.createElement("g", { id: "SVGRepo_bgCarrier", "stroke-width": "0" }),
109
+ React.createElement("g", { id: "SVGRepo_tracerCarrier", "stroke-linecap": "round", "stroke-linejoin": "round" }),
110
+ React.createElement("g", { id: "SVGRepo_iconCarrier" },
111
+ React.createElement("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M18.867 15.8321L18.873 10.0391L14.75 5.92908C13.5057 4.69031 11.4942 4.69031 10.25 5.92908L6.13599 10.0291V15.8291C6.1393 17.5833 7.56377 19.0028 9.31799 19.0001H15.685C17.438 19.0029 18.862 17.5851 18.867 15.8321Z", stroke: color, "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }),
112
+ React.createElement("path", { d: "M19.624 6.01807C19.624 5.60385 19.2882 5.26807 18.874 5.26807C18.4598 5.26807 18.124 5.60385 18.124 6.01807H19.624ZM18.874 10.0391H18.124C18.124 10.2384 18.2033 10.4295 18.3445 10.5702L18.874 10.0391ZM19.9705 12.1912C20.2638 12.4837 20.7387 12.4829 21.0311 12.1896C21.3236 11.8962 21.3229 11.4214 21.0295 11.1289L19.9705 12.1912ZM6.66552 10.5602C6.95886 10.2678 6.95959 9.79289 6.66714 9.49955C6.3747 9.20621 5.89982 9.20548 5.60648 9.49793L6.66552 10.5602ZM3.97048 11.1289C3.67714 11.4214 3.67641 11.8962 3.96886 12.1896C4.2613 12.4829 4.73618 12.4837 5.02952 12.1912L3.97048 11.1289ZM13.75 19.0001C13.75 19.4143 14.0858 19.7501 14.5 19.7501C14.9142 19.7501 15.25 19.4143 15.25 19.0001H13.75ZM9.75 19.0001C9.75 19.4143 10.0858 19.7501 10.5 19.7501C10.9142 19.7501 11.25 19.4143 11.25 19.0001H9.75ZM18.124 6.01807V10.0391H19.624V6.01807H18.124ZM18.3445 10.5702L19.9705 12.1912L21.0295 11.1289L19.4035 9.50792L18.3445 10.5702ZM5.60648 9.49793L3.97048 11.1289L5.02952 12.1912L6.66552 10.5602L5.60648 9.49793ZM15.25 19.0001V17.2201H13.75V19.0001H15.25ZM15.25 17.2201C15.25 15.7013 14.0188 14.4701 12.5 14.4701V15.9701C13.1904 15.9701 13.75 16.5297 13.75 17.2201H15.25ZM12.5 14.4701C10.9812 14.4701 9.75 15.7013 9.75 17.2201H11.25C11.25 16.5297 11.8096 15.9701 12.5 15.9701V14.4701ZM9.75 17.2201V19.0001H11.25V17.2201H9.75Z", fill: color }))));
113
+ };
114
+ // COLLECTION: Xnix Circular Interface Icons
115
+ // LICENSE: CC Attribution License
116
+ // AUTHOR: Ankush Syal
117
+ // https://www.svgrepo.com/svg/520794/home-20
118
+
119
+ var Icons = {
120
+ CloseIcon: CloseIcon,
121
+ HomeIcon: HomeIcon,
122
+ CallIcon: CallIcon,
6
123
  };
7
124
 
8
- export { Button };
125
+ export { Button, Icons, Input };
9
126
  //# sourceMappingURL=index.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
1
+ {"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/index.js CHANGED
@@ -2,10 +2,129 @@
2
2
 
3
3
  var React = require('react');
4
4
 
5
+ /******************************************************************************
6
+ Copyright (c) Microsoft Corporation.
7
+
8
+ Permission to use, copy, modify, and/or distribute this software for any
9
+ purpose with or without fee is hereby granted.
10
+
11
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
12
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
13
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
14
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
15
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
16
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17
+ PERFORMANCE OF THIS SOFTWARE.
18
+ ***************************************************************************** */
19
+ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
20
+
21
+
22
+ var __assign = function() {
23
+ __assign = Object.assign || function __assign(t) {
24
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
25
+ s = arguments[i];
26
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
27
+ }
28
+ return t;
29
+ };
30
+ return __assign.apply(this, arguments);
31
+ };
32
+
33
+ function __rest(s, e) {
34
+ var t = {};
35
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
36
+ t[p] = s[p];
37
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
38
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
39
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
40
+ t[p[i]] = s[p[i]];
41
+ }
42
+ return t;
43
+ }
44
+
45
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
46
+ var e = new Error(message);
47
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
48
+ };
49
+
50
+ var Spinner = function (_a) {
51
+ var color = _a.color, size = _a.size, spinTime = _a.spinTime;
52
+ return (React.createElement(React.Fragment, null,
53
+ React.createElement("span", { style: { animation: "spin ".concat(spinTime || '2s', " 0s linear infinite") } },
54
+ React.createElement("svg", { viewBox: "0 0 20 20", version: "1.1", xmlns: "http://www.w3.org/2000/svg", width: size || '30px', height: size || '30px', xmlnsXlink: "http://www.w3.org/1999/xlink", fill: color || 'black' },
55
+ React.createElement("g", { id: "SVGRepo_bgCarrier", strokeWidth: "0" }),
56
+ React.createElement("g", { id: "SVGRepo_tracerCarrier", strokeLinecap: "round", strokeLinejoin: "round" }),
57
+ React.createElement("g", { id: "SVGRepo_iconCarrier" },
58
+ React.createElement("title", null, "ic_fluent_spinner_ios_20_filled"),
59
+ React.createElement("desc", null, "Created with Sketch."),
60
+ React.createElement("g", { id: "\uD83D\uDD0D-System-Icons", stroke: "none", strokeWidth: "1", fill: "none", fillRule: "evenodd" },
61
+ React.createElement("g", { id: "ic_fluent_spinner_ios_20_filled", fill: "#212121", fillRule: "nonzero" },
62
+ React.createElement("path", { d: "M10,3.5 C6.41015,3.5 3.5,6.41015 3.5,10 C3.5,10.4142 3.16421,10.75 2.75,10.75 C2.33579,10.75 2,10.4142 2,10 C2,5.58172 5.58172,2 10,2 C14.4183,2 18,5.58172 18,10 C18,14.4183 14.4183,18 10,18 C9.58579,18 9.25,17.6642 9.25,17.25 C9.25,16.8358 9.58579,16.5 10,16.5 C13.5899,16.5 16.5,13.5899 16.5,10 C16.5,6.41015 13.5899,3.5 10,3.5 Z", id: "\uD83C\uDFA8-Color" }))))))));
63
+ };
64
+
5
65
  var Button = function (_a) {
6
- var label = _a.label;
7
- return React.createElement("button", null, label);
66
+ var prefixElement = _a.prefixElement, suffixElement = _a.suffixElement, children = _a.children, _b = _a.loading, loading = _b === undefined ? false : _b, _c = _a.spinner, spinner = _c === undefined ? React.createElement(Spinner, { color: 'black', size: '9px' }) : _c, style = _a.style, restProps = __rest(_a, ["prefixElement", "suffixElement", "children", "loading", "spinner", "style"]);
67
+ return (React.createElement("button", __assign({}, restProps, { style: __assign({ display: 'inline-flex', justifyContent: 'space-between', alignItems: 'center', paddingRight: '4px', paddingLeft: '4px' }, style) }),
68
+ prefixElement,
69
+ loading ? spinner : children,
70
+ suffixElement));
71
+ };
72
+
73
+ var Input = function (_a) {
74
+ var prefixElement = _a.prefixElement, suffixElement = _a.suffixElement, className = _a.className, style = _a.style, containerStyle = _a.containerStyle, containerClassName = _a.containerClassName, restProps = __rest(_a, ["prefixElement", "suffixElement", "className", "style", "containerStyle", "containerClassName"]);
75
+ return (React.createElement("span", { className: containerClassName, style: __assign({ display: 'inline-flex', justifyContent: 'space-between', alignItems: 'center', paddingRight: '4px', paddingLeft: '4px' }, containerStyle) },
76
+ prefixElement,
77
+ React.createElement("input", __assign({}, restProps, { className: className, style: __assign({ outline: 'none', border: 'none', flex: 1 }, style) })),
78
+ suffixElement));
79
+ };
80
+
81
+ var CloseIcon = function (_a) {
82
+ var _b = _a.color, color = _b === undefined ? '#000' : _b, _c = _a.size, size = _c === undefined ? '20px' : _c, _d = _a.bgColor, bgColor = _d === undefined ? 'transparent' : _d;
83
+ return (React.createElement("svg", { viewBox: "0 0 24 24", width: size, height: size, fill: "none", style: { backgroundColor: bgColor }, xmlns: "http://www.w3.org/2000/svg" },
84
+ React.createElement("g", { id: "SVGRepo_bgCarrier", strokeWidth: "0" }),
85
+ React.createElement("g", { id: "SVGRepo_tracerCarrier", strokeLinecap: "round", strokeLinejoin: "round" }),
86
+ React.createElement("g", { id: "SVGRepo_iconCarrier" },
87
+ React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M5.29289 5.29289C5.68342 4.90237 6.31658 4.90237 6.70711 5.29289L12 10.5858L17.2929 5.29289C17.6834 4.90237 18.3166 4.90237 18.7071 5.29289C19.0976 5.68342 19.0976 6.31658 18.7071 6.70711L13.4142 12L18.7071 17.2929C19.0976 17.6834 19.0976 18.3166 18.7071 18.7071C18.3166 19.0976 17.6834 19.0976 17.2929 18.7071L12 13.4142L6.70711 18.7071C6.31658 19.0976 5.68342 19.0976 5.29289 18.7071C4.90237 18.3166 4.90237 17.6834 5.29289 17.2929L10.5858 12L5.29289 6.70711C4.90237 6.31658 4.90237 5.68342 5.29289 5.29289Z", fill: color }))));
88
+ };
89
+ // COLLECTION: Wave Oval Interface Icons
90
+ // LICENSE: PD License
91
+ // AUTHOR: Arthur Kazais
92
+ // https://www.svgrepo.com/svg/499592/close-x
93
+
94
+ var CallIcon = function (_a) {
95
+ var _b = _a.color, color = _b === undefined ? '#000' : _b, _c = _a.size, size = _c === undefined ? '20px' : _c, _d = _a.bgColor, bgColor = _d === undefined ? 'transparent' : _d, _e = _a.fill, fill = _e === undefined ? 'none' : _e;
96
+ return (React.createElement("svg", { viewBox: "0 -0.5 25 25", width: size, height: size, fill: fill, style: { backgroundColor: bgColor }, xmlns: "http://www.w3.org/2000/svg" },
97
+ React.createElement("g", { id: "SVGRepo_bgCarrier", strokeWidth: "0" }),
98
+ React.createElement("g", { id: "SVGRepo_tracerCarrier", strokeLinecap: "round", strokeLinejoin: "round" }),
99
+ React.createElement("g", { id: "SVGRepo_iconCarrier" },
100
+ React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M6.36343 6.36195C7.24343 5.43495 7.55443 5.17495 7.92943 5.05395C8.18895 4.98595 8.46112 4.98217 8.72243 5.04295C9.06643 5.14295 9.15743 5.21895 10.2854 6.34295C11.2764 7.32995 11.3754 7.43695 11.4704 7.62995C11.6521 7.96873 11.6805 8.36894 11.5484 8.72995C11.4484 9.00495 11.3064 9.18695 10.7054 9.78995L10.3134 10.183C10.2105 10.2876 10.1863 10.4464 10.2534 10.577C11.1244 12.0628 12.36 13.3019 13.8434 14.177C14.0142 14.2684 14.2245 14.2389 14.3634 14.104L14.7404 13.733C14.9734 13.4941 15.2202 13.2691 15.4794 13.059C15.8866 12.809 16.3939 12.7867 16.8214 13C17.0304 13.1 17.0994 13.162 18.1214 14.182C19.1754 15.233 19.2054 15.266 19.3214 15.507C19.5397 15.9059 19.5374 16.3891 19.3154 16.786C19.2024 17.01 19.1334 17.091 18.5404 17.697C18.1824 18.063 17.8454 18.397 17.7914 18.446C17.3022 18.851 16.6746 19.0497 16.0414 19C14.883 18.8944 13.7617 18.5363 12.7564 17.951C10.5296 16.7711 8.63383 15.0521 7.24243 12.951C6.93937 12.5112 6.66994 12.0492 6.43643 11.569C5.81001 10.4953 5.48653 9.27189 5.50043 8.02895C5.54825 7.37871 5.86008 6.77637 6.36343 6.36195Z", stroke: color, strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }))));
101
+ };
102
+ // COLLECTION: Xnix Circular Interface Icons
103
+ // LICENSE: CC Attribution License
104
+ // AUTHOR: Ankush Syal
105
+ // https://www.svgrepo.com/svg/520583/call
106
+
107
+ var HomeIcon = function (_a) {
108
+ var _b = _a.color, color = _b === undefined ? '#000' : _b, _c = _a.size, size = _c === undefined ? '20px' : _c, _d = _a.bgColor, bgColor = _d === undefined ? 'transparent' : _d, _e = _a.fill, fill = _e === undefined ? 'none' : _e;
109
+ return (React.createElement("svg", { viewBox: "0 -0.5 25 25", width: size, height: size, fill: fill, style: { backgroundColor: bgColor }, xmlns: "http://www.w3.org/2000/svg" },
110
+ React.createElement("g", { id: "SVGRepo_bgCarrier", "stroke-width": "0" }),
111
+ React.createElement("g", { id: "SVGRepo_tracerCarrier", "stroke-linecap": "round", "stroke-linejoin": "round" }),
112
+ React.createElement("g", { id: "SVGRepo_iconCarrier" },
113
+ React.createElement("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M18.867 15.8321L18.873 10.0391L14.75 5.92908C13.5057 4.69031 11.4942 4.69031 10.25 5.92908L6.13599 10.0291V15.8291C6.1393 17.5833 7.56377 19.0028 9.31799 19.0001H15.685C17.438 19.0029 18.862 17.5851 18.867 15.8321Z", stroke: color, "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }),
114
+ React.createElement("path", { d: "M19.624 6.01807C19.624 5.60385 19.2882 5.26807 18.874 5.26807C18.4598 5.26807 18.124 5.60385 18.124 6.01807H19.624ZM18.874 10.0391H18.124C18.124 10.2384 18.2033 10.4295 18.3445 10.5702L18.874 10.0391ZM19.9705 12.1912C20.2638 12.4837 20.7387 12.4829 21.0311 12.1896C21.3236 11.8962 21.3229 11.4214 21.0295 11.1289L19.9705 12.1912ZM6.66552 10.5602C6.95886 10.2678 6.95959 9.79289 6.66714 9.49955C6.3747 9.20621 5.89982 9.20548 5.60648 9.49793L6.66552 10.5602ZM3.97048 11.1289C3.67714 11.4214 3.67641 11.8962 3.96886 12.1896C4.2613 12.4829 4.73618 12.4837 5.02952 12.1912L3.97048 11.1289ZM13.75 19.0001C13.75 19.4143 14.0858 19.7501 14.5 19.7501C14.9142 19.7501 15.25 19.4143 15.25 19.0001H13.75ZM9.75 19.0001C9.75 19.4143 10.0858 19.7501 10.5 19.7501C10.9142 19.7501 11.25 19.4143 11.25 19.0001H9.75ZM18.124 6.01807V10.0391H19.624V6.01807H18.124ZM18.3445 10.5702L19.9705 12.1912L21.0295 11.1289L19.4035 9.50792L18.3445 10.5702ZM5.60648 9.49793L3.97048 11.1289L5.02952 12.1912L6.66552 10.5602L5.60648 9.49793ZM15.25 19.0001V17.2201H13.75V19.0001H15.25ZM15.25 17.2201C15.25 15.7013 14.0188 14.4701 12.5 14.4701V15.9701C13.1904 15.9701 13.75 16.5297 13.75 17.2201H15.25ZM12.5 14.4701C10.9812 14.4701 9.75 15.7013 9.75 17.2201H11.25C11.25 16.5297 11.8096 15.9701 12.5 15.9701V14.4701ZM9.75 17.2201V19.0001H11.25V17.2201H9.75Z", fill: color }))));
115
+ };
116
+ // COLLECTION: Xnix Circular Interface Icons
117
+ // LICENSE: CC Attribution License
118
+ // AUTHOR: Ankush Syal
119
+ // https://www.svgrepo.com/svg/520794/home-20
120
+
121
+ var Icons = {
122
+ CloseIcon: CloseIcon,
123
+ HomeIcon: HomeIcon,
124
+ CallIcon: CallIcon,
8
125
  };
9
126
 
10
127
  exports.Button = Button;
128
+ exports.Icons = Icons;
129
+ exports.Input = Input;
11
130
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,9 @@
1
+ import React, { ButtonHTMLAttributes, ReactNode } from 'react';
2
+ interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
3
+ loading?: boolean;
4
+ spinner?: ReactNode;
5
+ prefixElement?: ReactNode;
6
+ suffixElement?: ReactNode;
7
+ }
8
+ declare const Button: React.FC<ButtonProps>;
9
+ export default Button;
@@ -0,0 +1,4 @@
1
+ import { IconProps } from './index';
2
+ import React from 'react';
3
+ declare const CallIcon: React.FC<IconProps>;
4
+ export default CallIcon;
@@ -0,0 +1,4 @@
1
+ import { IconProps } from './index';
2
+ import React from 'react';
3
+ declare const CloseIcon: React.FC<IconProps>;
4
+ export default CloseIcon;
@@ -0,0 +1,4 @@
1
+ import { IconProps } from './index';
2
+ import React from 'react';
3
+ declare const HomeIcon: React.FC<IconProps>;
4
+ export default HomeIcon;
@@ -0,0 +1,4 @@
1
+ import { IconProps } from './index';
2
+ import React from 'react';
3
+ declare const SearchIcon: React.FC<IconProps>;
4
+ export default SearchIcon;
@@ -0,0 +1,10 @@
1
+ export { default as CloseIcon } from './CloseIcon';
2
+ export { default as CallIcon } from './CallIcon';
3
+ export { default as HomeIcon } from './HomeIcon';
4
+ export { default as SearchIcon } from './SearchIcon';
5
+ export interface IconProps {
6
+ color?: string;
7
+ size?: string;
8
+ fill?: string;
9
+ bgColor?: string;
10
+ }
@@ -0,0 +1,10 @@
1
+ import React, { CSSProperties, InputHTMLAttributes, ReactNode } from 'react';
2
+ interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
3
+ clearable?: boolean;
4
+ containerStyle?: CSSProperties;
5
+ containerClassName?: string;
6
+ prefixElement?: ReactNode;
7
+ suffixElement?: ReactNode;
8
+ }
9
+ declare const Input: React.FC<InputProps>;
10
+ export default Input;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import '../style.css';
3
+ interface SpinnerProps {
4
+ color?: string;
5
+ size?: string;
6
+ spinTime?: string;
7
+ className?: string;
8
+ }
9
+ declare const Spinner: React.FC<SpinnerProps>;
10
+ export default Spinner;
@@ -0,0 +1,8 @@
1
+ import Button from './components/button/Button';
2
+ import Input from './components/input/Input';
3
+ declare const Icons: {
4
+ CloseIcon: import("react").FC<import("./components/icons").IconProps>;
5
+ HomeIcon: import("react").FC<import("./components/icons").IconProps>;
6
+ CallIcon: import("react").FC<import("./components/icons").IconProps>;
7
+ };
8
+ export { Button, Input, Icons };
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+ import { Meta } from '@storybook/react';
3
+ import Button from '../src/components/button/Button';
4
+ declare const meta: Meta<typeof Button>;
5
+ export default meta;
6
+ export declare const Default: {
7
+ args: {
8
+ children: string;
9
+ };
10
+ };
11
+ export declare const Loading: {
12
+ args: {
13
+ children: string;
14
+ loading: boolean;
15
+ };
16
+ };
17
+ export declare const WithPrefix: {
18
+ args: {
19
+ prefixElement: React.JSX.Element;
20
+ children: string;
21
+ };
22
+ };
23
+ export declare const WithSuffix: {
24
+ args: {
25
+ suffixElement: React.JSX.Element;
26
+ children: string;
27
+ };
28
+ };
@@ -0,0 +1,7 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import Input from '../src/components/input/Input';
3
+ declare const meta: Meta<typeof Input>;
4
+ export default meta;
5
+ export declare const Default: StoryObj<typeof Input>;
6
+ export declare const WithPrefix: StoryObj<typeof Input>;
7
+ export declare const WithSuffix: StoryObj<typeof Input>;
@@ -0,0 +1,9 @@
1
+ import { Meta } from '@storybook/react';
2
+ import Spinner from '../src/components/spinner/Spinner';
3
+ declare const meta: Meta<typeof Spinner>;
4
+ export default meta;
5
+ export declare const Default: {
6
+ args: {
7
+ size: string;
8
+ };
9
+ };
package/package.json CHANGED
@@ -1,26 +1,55 @@
1
1
  {
2
2
  "name": "jy-headless",
3
- "version": "0.0.7",
3
+ "version": "0.0.9",
4
4
  "description": "",
5
- "main": "dist/index.js",
5
+ "main": "dist/index.cjs",
6
+ "typings": "dist/index.d.ts",
6
7
  "module": "dist/index.esm.js",
7
- "types": "dist/types/index.d.ts",
8
8
  "scripts": {
9
- "build": "rollup -c"
9
+ "build": " rollup -c",
10
+ "storybook": "storybook dev -p 6006",
11
+ "build-storybook": "storybook build"
12
+ },
13
+ "files": [
14
+ "dist"
15
+ ],
16
+ "exports": {
17
+ "types": {
18
+ "import": "./dist/index.d.ts",
19
+ "require": "./dist/index.d.cts"
20
+ },
21
+ "import": "./dist/index.esm.js",
22
+ "require": "./dist/index.cjs"
10
23
  },
11
24
  "keywords": [],
12
25
  "author": "",
13
26
  "license": "ISC",
14
27
  "type": "module",
15
28
  "devDependencies": {
29
+ "@chromatic-com/storybook": "3.2.4",
16
30
  "@rollup/plugin-commonjs": "^28.0.2",
17
31
  "@rollup/plugin-node-resolve": "^16.0.0",
32
+ "@storybook/addon-essentials": "8.5.0",
33
+ "@storybook/addon-interactions": "8.5.0",
34
+ "@storybook/addon-onboarding": "8.5.0",
35
+ "@storybook/addon-postcss": "^2.0.0",
36
+ "@storybook/blocks": "8.5.0",
37
+ "@storybook/react": "8.5.0",
38
+ "@storybook/react-vite": "8.5.0",
39
+ "@storybook/test": "8.5.0",
18
40
  "@types/react": "^19.0.7",
19
41
  "@types/react-dom": "^19.0.3",
42
+ "postcss": "^8.5.1",
43
+ "prettier": "^3.4.2",
20
44
  "react": "^19.0.0",
21
45
  "react-dom": "^19.0.0",
22
46
  "rollup": "^4.31.0",
47
+ "rollup-plugin-postcss": "^4.0.2",
23
48
  "rollup-plugin-typescript2": "^0.36.0",
49
+ "storybook": "8.5.0",
24
50
  "typescript": "^5.7.3"
51
+ },
52
+ "dependencies": {
53
+ "tslib": "^2.8.1"
25
54
  }
26
55
  }
package/.idea/aws.xml DELETED
@@ -1,11 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="accountSettings">
4
- <option name="activeRegion" value="us-east-1" />
5
- <option name="recentlyUsedRegions">
6
- <list>
7
- <option value="us-east-1" />
8
- </list>
9
- </option>
10
- </component>
11
- </project>
@@ -1,15 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="GitToolBoxProjectSettings">
4
- <option name="commitMessageIssueKeyValidationOverride">
5
- <BoolValueOverride>
6
- <option name="enabled" value="true" />
7
- </BoolValueOverride>
8
- </option>
9
- <option name="commitMessageValidationEnabledOverride">
10
- <BoolValueOverride>
11
- <option name="enabled" value="true" />
12
- </BoolValueOverride>
13
- </option>
14
- </component>
15
- </project>
@@ -1,6 +0,0 @@
1
- <component name="InspectionProjectProfileManager">
2
- <profile version="1.0">
3
- <option name="myName" value="Project Default" />
4
- <inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
5
- </profile>
6
- </component>
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="JpaBuddyIdeaProjectConfig">
4
- <option name="renamerInitialized" value="true" />
5
- </component>
6
- </project>
@@ -1,9 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <module type="JAVA_MODULE" version="4">
3
- <component name="NewModuleRootManager" inherit-compiler-output="true">
4
- <exclude-output />
5
- <content url="file://$MODULE_DIR$" />
6
- <orderEntry type="inheritedJdk" />
7
- <orderEntry type="sourceFolder" forTests="false" />
8
- </component>
9
- </module>
package/.idea/misc.xml DELETED
@@ -1,9 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="openjdk-21" project-jdk-type="JavaSDK">
4
- <output url="file://$PROJECT_DIR$/out" />
5
- </component>
6
- <component name="ProjectType">
7
- <option name="id" value="jpab" />
8
- </component>
9
- </project>
package/.idea/modules.xml DELETED
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectModuleManager">
4
- <modules>
5
- <module fileurl="file://$PROJECT_DIR$/.idea/jy-headless.iml" filepath="$PROJECT_DIR$/.idea/jy-headless.iml" />
6
- </modules>
7
- </component>
8
- </project>
package/.idea/vcs.xml DELETED
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="VcsDirectoryMappings">
4
- <mapping directory="$PROJECT_DIR$" vcs="Git" />
5
- </component>
6
- </project>
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- interface ButtonProps {
3
- label: string;
4
- }
5
- declare const Button: React.FC<ButtonProps>;
6
- export default Button;
package/dist/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- import Button from './components/button/Button';
2
- export { Button };
package/rollup.config.mjs DELETED
@@ -1,27 +0,0 @@
1
- import typescript from 'rollup-plugin-typescript2';
2
- import resolve from '@rollup/plugin-node-resolve';
3
- import commonjs from '@rollup/plugin-commonjs';
4
-
5
- export default {
6
- input: 'src/index.tsx',
7
- output: [
8
- {
9
- file: 'dist/index.js',
10
- format: 'cjs',
11
- sourcemap: true,
12
- },
13
- {
14
- file: 'dist/index.esm.js',
15
- format: 'esm',
16
- sourcemap: true,
17
- },
18
- ],
19
- plugins: [
20
- resolve(),
21
- commonjs(),
22
- typescript({
23
- tsconfig: './tsconfig.json',
24
- }),
25
- ],
26
- external: ['react', 'react-dom'],
27
- };
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
-
3
- interface ButtonProps {
4
- label: string;
5
- }
6
-
7
- const Button: React.FC<ButtonProps> = ({ label }) => {
8
- return <button>{label}</button>;
9
- };
10
-
11
- export default Button;
package/src/index.tsx DELETED
@@ -1,3 +0,0 @@
1
- import Button from './components/button/Button';
2
-
3
- export { Button };
package/tsconfig.json DELETED
@@ -1,15 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES5",
4
- "module": "ESNext",
5
- "moduleResolution": "Node",
6
- "jsx": "react",
7
- "declaration": true,
8
- "declarationDir": "dist/types",
9
- "outDir": "dist",
10
- "esModuleInterop": true,
11
- "skipLibCheck": true,
12
- "forceConsistentCasingInFileNames": true
13
- },
14
- "include": ["src/**/*"]
15
- }