@fpkit/acss 0.4.19 → 0.5.2
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/libs/chunk-TBM2QIVT.js +8 -0
- package/libs/chunk-TBM2QIVT.js.map +1 -0
- package/libs/chunk-VAH6X2DZ.cjs +31 -0
- package/libs/chunk-VAH6X2DZ.cjs.map +1 -0
- package/libs/components/badge/badge.css +1 -1
- package/libs/components/badge/badge.css.map +1 -1
- package/libs/components/badge/badge.min.css +2 -2
- package/libs/components/buttons/button.css +1 -1
- package/libs/components/buttons/button.css.map +1 -1
- package/libs/components/buttons/button.min.css +2 -2
- package/libs/components/cards/card.css +1 -1
- package/libs/components/cards/card.css.map +1 -1
- package/libs/components/cards/card.min.css +2 -2
- package/libs/components/details/details.css +1 -1
- package/libs/components/details/details.css.map +1 -1
- package/libs/components/details/details.min.css +2 -2
- package/libs/components/icons/icon.css +1 -1
- package/libs/components/icons/icon.css.map +1 -1
- package/libs/components/icons/icon.min.css +2 -2
- package/libs/{icons-1f5afc0c.d.ts → icons-2f29127c.d.ts} +32 -1
- package/libs/icons.cjs +2 -2
- package/libs/icons.d.cts +1 -1
- package/libs/icons.d.ts +1 -1
- package/libs/icons.js +1 -1
- package/libs/index.cjs +37 -37
- package/libs/index.cjs.map +1 -1
- package/libs/index.css +1 -1
- package/libs/index.css.map +1 -1
- package/libs/index.d.cts +8 -5
- package/libs/index.d.ts +8 -5
- package/libs/index.js +6 -6
- package/libs/index.js.map +1 -1
- package/package.json +3 -2
- package/src/components/badge/badge.scss +1 -0
- package/src/components/badge/badge.stories.tsx +3 -3
- package/src/components/breadcrumbs/breadcrumb.stories.tsx +26 -10
- package/src/components/breadcrumbs/breadcrumb.tsx +48 -40
- package/src/components/buttons/button.scss +3 -4
- package/src/components/buttons/button.stories.tsx +50 -28
- package/src/components/buttons/button.test.tsx +1 -1
- package/src/components/buttons/button.tsx +31 -4
- package/src/components/cards/card.scss +5 -3
- package/src/components/cards/card.stories.tsx +4 -4
- package/src/components/cards/card.tsx +0 -1
- package/src/components/details/details.scss +12 -3
- package/src/components/details/details.stories.tsx +20 -4
- package/src/components/details/details.tsx +2 -1
- package/src/components/form/form.stories.tsx +2 -2
- package/src/components/form/input.stories.tsx +2 -2
- package/src/components/form/select.stories.tsx +2 -2
- package/src/components/form/select.tsx +23 -33
- package/src/components/fp.test.tsx +1 -1
- package/src/components/heading/heading.stories.tsx +2 -2
- package/src/components/heading/heading.tsx +2 -2
- package/src/components/icons/components/svg.tsx +1 -0
- package/src/components/icons/icon.scss +2 -0
- package/src/components/icons/icon.stories.tsx +23 -3
- package/src/components/icons/icon.tsx +11 -0
- package/src/components/icons/types.ts +1 -1
- package/src/components/images/figure.stories.tsx +3 -6
- package/src/components/images/img.stories.tsx +3 -3
- package/src/components/layout/footer.stories.tsx +2 -2
- package/src/components/layout/landmarks.stories.tsx +2 -2
- package/src/components/layout/main.stories.tsx +2 -2
- package/src/components/link/link.stories.tsx +2 -2
- package/src/components/list/list.stories.tsx +7 -2
- package/src/components/nav/nav.stories.tsx +4 -3
- package/src/components/popover/popover.stories.tsx +2 -2
- package/src/components/progress/progress.stories.tsx +2 -2
- package/src/components/tag/tag.stories.tsx +3 -3
- package/src/components/text/text.stories.tsx +6 -6
- package/src/patterns/page/page-header.stories.tsx +2 -2
- package/src/sass/_globals.scss +9 -7
- package/src/styles/badge/badge.css +1 -0
- package/src/styles/badge/badge.css.map +1 -1
- package/src/styles/buttons/button.css +3 -3
- package/src/styles/buttons/button.css.map +1 -1
- package/src/styles/cards/card.css +2 -3
- package/src/styles/cards/card.css.map +1 -1
- package/src/styles/details/details.css +11 -3
- package/src/styles/details/details.css.map +1 -1
- package/src/styles/icons/icon.css +2 -0
- package/src/styles/icons/icon.css.map +1 -1
- package/src/styles/index.css +26 -16
- package/src/styles/index.css.map +1 -1
- package/LICENSE +0 -21
- package/dist/chunk-77CZU5XZ.cjs +0 -9
- package/dist/chunk-77CZU5XZ.cjs.map +0 -1
- package/dist/chunk-D43FJIRQ.cjs +0 -31
- package/dist/chunk-D43FJIRQ.cjs.map +0 -1
- package/dist/chunk-GJWMCDFS.js +0 -9
- package/dist/chunk-GJWMCDFS.js.map +0 -1
- package/dist/chunk-PCDUGD3C.js +0 -5
- package/dist/chunk-PCDUGD3C.js.map +0 -1
- package/dist/hooks.cjs +0 -10
- package/dist/hooks.cjs.map +0 -1
- package/dist/hooks.d.cts +0 -32
- package/dist/hooks.d.ts +0 -32
- package/dist/hooks.js +0 -8
- package/dist/hooks.js.map +0 -1
- package/dist/icon-e6044c73.d.ts +0 -227
- package/dist/icons.cjs +0 -73
- package/dist/icons.cjs.map +0 -1
- package/dist/icons.d.cts +0 -252
- package/dist/icons.d.ts +0 -252
- package/dist/icons.js +0 -4
- package/dist/icons.js.map +0 -1
- package/dist/index.cjs +0 -59
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -566
- package/dist/index.d.ts +0 -566
- package/dist/index.js +0 -11
- package/dist/index.js.map +0 -1
- package/libs/chunk-QHIABQNQ.js +0 -8
- package/libs/chunk-QHIABQNQ.js.map +0 -1
- package/libs/chunk-ZOHIKF6I.cjs +0 -31
- package/libs/chunk-ZOHIKF6I.cjs.map +0 -1
- package/src/components/popover/node_modules/.vitest/results.json +0 -1
- package/src/hooks/popover/node_modules/.vitest/results.json +0 -1
package/dist/icons.d.ts
DELETED
|
@@ -1,252 +0,0 @@
|
|
|
1
|
-
import { a as IconProps } from './icon-e6044c73.js';
|
|
2
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
-
import 'react';
|
|
4
|
-
export { I as Icon, b as IconProps, d as defaultStyles } from './icon-e6044c73.js';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Renders a code icon.
|
|
8
|
-
*
|
|
9
|
-
* @param {string} strokeColor - The color of the icon's stroke.
|
|
10
|
-
* @param {string} fill - The color of the icon's fill.
|
|
11
|
-
* @param {string} size - The size of the icon.
|
|
12
|
-
* @param {string} viewBox - The viewBox of the icon.
|
|
13
|
-
* @param {React.CSSProperties} styles - The default styles of the icon.
|
|
14
|
-
* @param {IconProps} props - Additional props to apply to the icon.
|
|
15
|
-
* @returns {JSX.Element} - A React component that renders an SVG icon.
|
|
16
|
-
*/
|
|
17
|
-
declare const Code: {
|
|
18
|
-
({ strokeColor, fill, size, styles, role, alt, ...props }?: Pick<IconProps, 'strokeColor' | 'fill' | 'styles' | 'size' | 'role' | 'alt'>): react_jsx_runtime.JSX.Element;
|
|
19
|
-
styles: {
|
|
20
|
-
fill: string;
|
|
21
|
-
stroke: string;
|
|
22
|
-
display: string;
|
|
23
|
-
alignItems: string;
|
|
24
|
-
width: string;
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Renders a home icon.
|
|
30
|
-
*
|
|
31
|
-
* @param {string} strokeColor - The color of the icon's stroke.
|
|
32
|
-
* @param {string} fill - The color of the icon's fill.
|
|
33
|
-
* @param {string} size - The size of the icon.
|
|
34
|
-
* @param {string} viewBox - The viewBox of the icon.
|
|
35
|
-
* @param {string} name - The name of the icon.
|
|
36
|
-
* @param {Object} styles - The styles of the icon.
|
|
37
|
-
* @param {Object} props - The props of the icon.
|
|
38
|
-
* @returns {JSX.Element} - A home icon.
|
|
39
|
-
*/
|
|
40
|
-
declare const Home: {
|
|
41
|
-
({ strokeColor, fill, size, styles, role, alt, ...props }: Pick<IconProps, 'strokeColor' | 'fill' | 'styles' | 'size' | 'role' | 'alt'>): react_jsx_runtime.JSX.Element;
|
|
42
|
-
displayName: string;
|
|
43
|
-
styles: {
|
|
44
|
-
fill: string;
|
|
45
|
-
stroke: string;
|
|
46
|
-
display: string;
|
|
47
|
-
alignItems: string;
|
|
48
|
-
width: string;
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Add Icon component
|
|
54
|
-
* @param {string} fill - Icon fill color (default: 'currentColor')
|
|
55
|
-
* @param {string} size - Icon size (default: '24')
|
|
56
|
-
* @param {IconProps} props - Other icon properties
|
|
57
|
-
* @returns {JSX.Element} - Rendered component
|
|
58
|
-
*/
|
|
59
|
-
declare const Add: {
|
|
60
|
-
({ fill, size, role, alt, ...props }: Pick<IconProps, 'strokeColor' | 'fill' | 'styles' | 'size' | 'role' | 'alt'>): JSX.Element;
|
|
61
|
-
styles: {
|
|
62
|
-
fill: string;
|
|
63
|
-
display: string;
|
|
64
|
-
alignItems: string;
|
|
65
|
-
width: string;
|
|
66
|
-
};
|
|
67
|
-
displayName: string;
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* Renders an arrow pointing to the left.
|
|
72
|
-
*
|
|
73
|
-
* @param {string} strokeColor - The color of the arrow's stroke.
|
|
74
|
-
* @param {string} fill - The fill color of the arrow.
|
|
75
|
-
* @param {string} size - The size of the arrow.
|
|
76
|
-
* @param {object} styles - The styles to apply to the arrow.
|
|
77
|
-
* @param {object} props - The additional props to pass to the SVG element.
|
|
78
|
-
* @returns {JSX.Element} - A React component that renders an arrow pointing to the left.
|
|
79
|
-
*/
|
|
80
|
-
declare const ArrowLeft: {
|
|
81
|
-
({ strokeColor, fill, size, styles, role, alt, ...props }: Pick<IconProps, 'strokeColor' | 'fill' | 'styles' | 'size' | 'role' | 'alt'>): react_jsx_runtime.JSX.Element;
|
|
82
|
-
styles: {
|
|
83
|
-
display: string;
|
|
84
|
-
alignItems: string;
|
|
85
|
-
width: string;
|
|
86
|
-
};
|
|
87
|
-
displayName: string;
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* @param {string} size - The width and height of the icon in pixels. Defaults to 24.
|
|
92
|
-
* @param {string} strokeColor - The color of the icon stroke. Defaults to 'currentcolor'.
|
|
93
|
-
* @param {React.CSSProperties} styles - Additional CSS styles to apply to the icon.
|
|
94
|
-
* @param {IconProps} props - Additional props to pass to the SVG element.
|
|
95
|
-
* @returns {JSX.Element} - A chat icon component that displays a speech bubble with lines representing text.
|
|
96
|
-
*/
|
|
97
|
-
declare const Chat: {
|
|
98
|
-
({ size, strokeColor, styles, role, alt, ...props }: Pick<IconProps, 'strokeColor' | 'fill' | 'styles' | 'size' | 'role' | 'alt'>): JSX.Element;
|
|
99
|
-
styles: {
|
|
100
|
-
display: string;
|
|
101
|
-
alignItems: string;
|
|
102
|
-
width: string;
|
|
103
|
-
};
|
|
104
|
-
displayName: string;
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* ArrowDown icon component
|
|
109
|
-
* @param fill - Icon fill color
|
|
110
|
-
* @param strokeColor - Icon stroke color
|
|
111
|
-
* @param styles - Icon styles
|
|
112
|
-
* @param size - Icon size
|
|
113
|
-
*/
|
|
114
|
-
declare const ArrowDown: {
|
|
115
|
-
({ fill, strokeColor, styles, size, role, alt, ...props }: Pick<IconProps, 'strokeColor' | 'fill' | 'styles' | 'size' | 'role' | 'alt'>): react_jsx_runtime.JSX.Element;
|
|
116
|
-
styles: {
|
|
117
|
-
display: string;
|
|
118
|
-
alignItems: string;
|
|
119
|
-
width: string;
|
|
120
|
-
};
|
|
121
|
-
displayName: string;
|
|
122
|
-
};
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* ArrowUp icon component
|
|
126
|
-
* @param fill - Icon fill color
|
|
127
|
-
* @param strokeColor - Icon stroke color
|
|
128
|
-
* @param styles - Icon styles
|
|
129
|
-
* @param size - Icon size
|
|
130
|
-
*/
|
|
131
|
-
declare const ArrowUp: {
|
|
132
|
-
({ fill, strokeColor, styles, size, role, alt, ...props }: Pick<IconProps, 'strokeColor' | 'fill' | 'styles' | 'size' | 'role' | 'alt'>): react_jsx_runtime.JSX.Element;
|
|
133
|
-
displayName: string;
|
|
134
|
-
style: {
|
|
135
|
-
fill: string;
|
|
136
|
-
stroke: string;
|
|
137
|
-
display: string;
|
|
138
|
-
alignItems: string;
|
|
139
|
-
width: string;
|
|
140
|
-
};
|
|
141
|
-
};
|
|
142
|
-
|
|
143
|
-
declare const ArrowRight: {
|
|
144
|
-
({ size, fill, strokeColor, styles, role, alt, ...props }: Pick<IconProps, 'strokeColor' | 'fill' | 'styles' | 'size' | 'role' | 'alt'>): react_jsx_runtime.JSX.Element;
|
|
145
|
-
displayName: string;
|
|
146
|
-
};
|
|
147
|
-
|
|
148
|
-
declare const User: {
|
|
149
|
-
({ size, fill, strokeColor, styles, alt, role, ...props }: Pick<IconProps, 'strokeColor' | 'fill' | 'styles' | 'size' | 'role' | 'alt'>): react_jsx_runtime.JSX.Element;
|
|
150
|
-
styles: {
|
|
151
|
-
fill: string;
|
|
152
|
-
stroke: string;
|
|
153
|
-
display: string;
|
|
154
|
-
alignItems: string;
|
|
155
|
-
width: string;
|
|
156
|
-
};
|
|
157
|
-
displayName: string;
|
|
158
|
-
};
|
|
159
|
-
|
|
160
|
-
/**
|
|
161
|
-
* Renders a right arrow icon.
|
|
162
|
-
*
|
|
163
|
-
* @param {string} size - The size of the icon.
|
|
164
|
-
* @param {string} fill - The fill color of the icon.
|
|
165
|
-
* @param {React.CSSProperties} styles - The styles to apply to the icon.
|
|
166
|
-
* @param {IconProps} props - The props to pass down to the icon.
|
|
167
|
-
* @returns {JSX.Element} - A right arrow icon.
|
|
168
|
-
*/
|
|
169
|
-
declare const Right: {
|
|
170
|
-
({ size, fill, styles, role, alt, ...props }: Pick<IconProps, 'strokeColor' | 'fill' | 'styles' | 'size' | 'role' | 'alt'>): react_jsx_runtime.JSX.Element;
|
|
171
|
-
displayName: string;
|
|
172
|
-
styles: {
|
|
173
|
-
fill: string;
|
|
174
|
-
};
|
|
175
|
-
};
|
|
176
|
-
|
|
177
|
-
/**
|
|
178
|
-
* Left arrow icon
|
|
179
|
-
* @param {string} fill - Icon fill color (default: 'currentColor')
|
|
180
|
-
* @param {string} size - Icon size (default: '24')
|
|
181
|
-
* @param {React.CSSProperties} styles - Icon styles (default: {})
|
|
182
|
-
* @param {IconProps} props - Any other valid props for an SVG element
|
|
183
|
-
* @returns {JSX.Element} - Rendered icon component
|
|
184
|
-
*/
|
|
185
|
-
declare const Left: {
|
|
186
|
-
({ fill, size, styles, role, alt, ...props }: Pick<IconProps, 'strokeColor' | 'fill' | 'styles' | 'size' | 'role' | 'alt'>): react_jsx_runtime.JSX.Element;
|
|
187
|
-
displayName: string;
|
|
188
|
-
styles: {
|
|
189
|
-
fill: string;
|
|
190
|
-
display: string;
|
|
191
|
-
alignItems: string;
|
|
192
|
-
width: string;
|
|
193
|
-
};
|
|
194
|
-
};
|
|
195
|
-
|
|
196
|
-
/**
|
|
197
|
-
* Minus icon component
|
|
198
|
-
* @param {string} size - Icon size (default: 24)
|
|
199
|
-
* @param {string} fill - Icon fill color (default: 'currentColor')
|
|
200
|
-
* @param {object} styles - Inline styles for the SVG element
|
|
201
|
-
* @param {object} props - Any other SVG attributes
|
|
202
|
-
* @returns {JSX.Element} - Rendered Minus icon component
|
|
203
|
-
*/
|
|
204
|
-
declare const Minus: {
|
|
205
|
-
({ size, fill, styles, role, alt, ...props }: Pick<IconProps, 'strokeColor' | 'fill' | 'styles' | 'size' | 'role' | 'alt'>): react_jsx_runtime.JSX.Element;
|
|
206
|
-
displayName: string;
|
|
207
|
-
styles: {
|
|
208
|
-
fill: string;
|
|
209
|
-
};
|
|
210
|
-
};
|
|
211
|
-
|
|
212
|
-
/**
|
|
213
|
-
* Remove icon component
|
|
214
|
-
* @param {string} size - The size of the icon
|
|
215
|
-
* @param {string} fill - The fill color of the icon
|
|
216
|
-
* @param {object} styles - The styles to apply to the icon
|
|
217
|
-
* @param {object} props - The additional props to pass to the icon
|
|
218
|
-
* @returns {JSX.Element} - The Remove icon component
|
|
219
|
-
*/
|
|
220
|
-
declare const Remove: {
|
|
221
|
-
({ size, fill, styles, role, alt, ...props }: Pick<IconProps, 'strokeColor' | 'fill' | 'styles' | 'size' | 'role' | 'alt'>): react_jsx_runtime.JSX.Element;
|
|
222
|
-
displayName: string;
|
|
223
|
-
styles: {
|
|
224
|
-
fill: string;
|
|
225
|
-
};
|
|
226
|
-
};
|
|
227
|
-
|
|
228
|
-
/**
|
|
229
|
-
* Copy icon component
|
|
230
|
-
* @param {string} size - The width and height of the icon
|
|
231
|
-
* @param {string} strokeColor - The color of the icon stroke
|
|
232
|
-
* @param {IconProps} props - The icon component props
|
|
233
|
-
* @returns {JSX.Element} - A react JSX element representing the copy icon
|
|
234
|
-
*/
|
|
235
|
-
declare const Copy: {
|
|
236
|
-
({ size, strokeColor, styles, role, alt, ...props }: Pick<IconProps, 'strokeColor' | 'fill' | 'styles' | 'size' | 'role' | 'alt'>): JSX.Element;
|
|
237
|
-
displayName: string;
|
|
238
|
-
styles: {
|
|
239
|
-
stroke: string;
|
|
240
|
-
display: string;
|
|
241
|
-
alignItems: string;
|
|
242
|
-
width: string; /**
|
|
243
|
-
* Copy icon component
|
|
244
|
-
* @param {string} size - The width and height of the icon
|
|
245
|
-
* @param {string} strokeColor - The color of the icon stroke
|
|
246
|
-
* @param {IconProps} props - The icon component props
|
|
247
|
-
* @returns {JSX.Element} - A react JSX element representing the copy icon
|
|
248
|
-
*/
|
|
249
|
-
};
|
|
250
|
-
};
|
|
251
|
-
|
|
252
|
-
export { Add, ArrowDown, ArrowLeft, ArrowRight, ArrowUp, Chat, Code, Copy, Home, Left, Minus, Remove, Right, User };
|
package/dist/icons.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import './chunk-PCDUGD3C.js';
|
|
2
|
-
export { d as Add, g as ArrowDown, e as ArrowLeft, i as ArrowRight, h as ArrowUp, f as Chat, b as Code, o as Copy, c as Home, q as Icon, l as Left, m as Minus, n as Remove, k as Right, j as User, p as defaultStyles } from './chunk-GJWMCDFS.js';
|
|
3
|
-
// # sourceMappingURL=out.js.map
|
|
4
|
-
// # sourceMappingURL=icons.js.map
|
package/dist/icons.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":""}
|
package/dist/index.cjs
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunkD43FJIRQ_cjs = require('./chunk-D43FJIRQ.cjs');
|
|
4
|
-
var chunk77CZU5XZ_cjs = require('./chunk-77CZU5XZ.cjs');
|
|
5
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
-
var Se = require('react');
|
|
7
|
-
|
|
8
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
-
|
|
10
|
-
var Se__default = /*#__PURE__*/_interopDefault(Se);
|
|
11
|
-
|
|
12
|
-
var ae={paddingInline:"var(--badge-px, 0.7rem)",paddingBlock:"var(--badge-py, 0.2rem)",color:"var(--badge-cl, black)",fontSize:"var(--badge-fs, 0.8rem)",fontWeight:"var(--badge-fw, normal)",fontFamily:"var(--badge-ff, sans-serif)",border:"var(--badge-brd, none)",borderRadius:"var(--badge-rds, 99rem)",backgroundColor:'var(--badge-bg, "blue")',textDecoration:"var(--badge-decoration, none)",textTransform:"var(--badge-tt, var(--tt))"},D=i=>{var m=i,{elm:o="span",role:t,children:r,renderStyles:e=!0,styles:a={}}=m,p=chunk77CZU5XZ_cjs.c(m,["elm","role","children","renderStyles","styles"]);return jsxRuntime.jsx(chunkD43FJIRQ_cjs.a,chunk77CZU5XZ_cjs.b(chunk77CZU5XZ_cjs.a({as:o,role:t,styles:a},p),{children:r}))};D.styles=ae;D.displayName="Badge";var se={paddingInline:"var(--btn-px, 1.4rem)",paddingBlock:"var(--btn-py, 0.8rem)",display:"var(--btn-dsp, inline-flex)",placeItems:"var(--btn-place, center)",justifyContent:"var(--btn-justify, center)",cursor:"var(--btn-cursor, pointer)",border:"var(--btn-border, none)",color:"var(--btn-color, white)",backgroundColor:"var(--btn-bg, royalblue)",borderRadius:"var(--btn-radius, 0.2rem)"},E=c=>{var f=c,{type:o="button",children:t,styles:r,disabled:e,classes:a,pointerDown:p,pointerOver:i,pointerLeave:m}=f,y=chunk77CZU5XZ_cjs.c(f,["type","children","styles","disabled","classes","pointerDown","pointerOver","pointerLeave"]);return jsxRuntime.jsx("button",chunk77CZU5XZ_cjs.b(chunk77CZU5XZ_cjs.a({type:o,onPointerOver:v=>{e||i==null||i(v);},onPointerDown:v=>{e||p==null||p(v);},onPointerLeave:v=>{e||m==null||m(v);},style:r,"aria-disabled":e},y),{children:t}))};E.styles=se;E.displayName="Button";var pe={padding:"var(--card-p, 2rem)",backgroundColor:"var(--card-bg, white)",boxShadow:"var(--card-shadow, 0 0 0.5rem 0.1rem rgba(0, 0, 0, 0.1))",borderRadius:"var(--card-rds, 0.2\xDFrem)",border:"var(--card-brd, none)",color:"var(--card-cl, black)"},A=m=>{var y=m,{elm:o="div",styles:t,children:r,renderStyles:e=!0,dataStyle:a,id:p}=y,i=chunk77CZU5XZ_cjs.c(y,["elm","styles","children","renderStyles","dataStyle","id"]);return jsxRuntime.jsx(chunkD43FJIRQ_cjs.a,chunk77CZU5XZ_cjs.b(chunk77CZU5XZ_cjs.a({as:o,id:p,styles:t,renderStyles:e,"data-card":a},i),{children:r}))};A.styles=pe;A.displayName="Card";var L=p=>{var i=p,{id:o,children:t,modalRef:r,openOnMount:e}=i,a=chunk77CZU5XZ_cjs.c(i,["id","children","modalRef","openOnMount"]);return jsxRuntime.jsx(chunkD43FJIRQ_cjs.a,chunk77CZU5XZ_cjs.b(chunk77CZU5XZ_cjs.a({as:"dialog",id:o,ref:r,open:e,onClick:y=>{y.currentTarget===y.target&&y.currentTarget.close();}},a),{children:t}))};L.displayName="Dialog";var me={padding:"var(--card-p, 1.2rem)",backgroundColor:"var(--card-bg, white)"},F=i=>{var m=i,{title:o,children:t,styles:r,renderStyles:e=!0,onToggle:a}=m;chunk77CZU5XZ_cjs.c(m,["title","children","styles","renderStyles","onToggle"]);return jsxRuntime.jsx(chunkD43FJIRQ_cjs.a,{as:"details",title:o,onToggle:c=>{a==null||a(c);},styles:r,children:t})};F.styles=me;F.displayName="Details";var ye={listStyle:"none",justifyContent:"var(--summary-justify, space-between)",color:"var(--summary-color, currentColor)",cursor:"var(--detail-cursor, pointer)"},N=a=>{var p=a,{children:o,styles:t,renderStyles:r=!0}=p,e=chunk77CZU5XZ_cjs.c(p,["children","styles","renderStyles"]);return jsxRuntime.jsx(chunkD43FJIRQ_cjs.a,chunk77CZU5XZ_cjs.b(chunk77CZU5XZ_cjs.a({as:"summary",styles:t},e),{children:o}))};N.styles=ye;N.displayName="Summary";var ue={display:"flex",placeContent:"flex-start",placeItems:"center",gap:".7rem",border:"var(--summary-border, solid 1px #ccc)",transition:"all 0.2s ease",backgroundColor:"var(--summary-bg, whitesmoke)",padding:"var(--details-pd, 1.2rem)",minWidth:"var(--summary-min-w, 80vw)",maxWidth:"var(--summary-min-w, 80vw)"},M=i=>{var m=i,{styles:o,children:t,summary:r,toggle:e,renderStyles:a=!0}=m,p=chunk77CZU5XZ_cjs.c(m,["styles","children","summary","toggle","renderStyles"]);return jsxRuntime.jsxs(F,chunk77CZU5XZ_cjs.b(chunk77CZU5XZ_cjs.a({styles:o,onToggle:e},p),{children:[jsxRuntime.jsx(N,{children:r}),t]}))};M.styles=ue;M.Summary=N;M.Details=F;M.displayName="Dropdown";var xe={},O=p=>{var i=p,{labelFor:o,styles:t,label:r,children:e}=i;chunk77CZU5XZ_cjs.c(i,["labelFor","styles","label","children"]);return jsxRuntime.jsxs(chunkD43FJIRQ_cjs.a,{as:"div",styles:t,"data-style":"fields",children:[jsxRuntime.jsx("label",{htmlFor:o,children:r}),e]})};O.styles=xe;O.displayName="Field";var V=e=>{var a=e,{children:o,styles:t={}}=a,r=chunk77CZU5XZ_cjs.c(a,["children","styles"]);return jsxRuntime.jsx(chunkD43FJIRQ_cjs.a,chunk77CZU5XZ_cjs.b(chunk77CZU5XZ_cjs.a({as:"header"},r),{styles:t,children:jsxRuntime.jsx(chunkD43FJIRQ_cjs.a,{as:"section",children:o})}))},X=e=>{var a=e,{children:o,styles:t={}}=a,r=chunk77CZU5XZ_cjs.c(a,["children","styles"]);return jsxRuntime.jsx(chunkD43FJIRQ_cjs.a,chunk77CZU5XZ_cjs.b(chunk77CZU5XZ_cjs.a({as:"main",styles:t},r),{children:o}))},_=e=>{var a=e,{children:o,styles:t={}}=a,r=chunk77CZU5XZ_cjs.c(a,["children","styles"]);return jsxRuntime.jsx(chunkD43FJIRQ_cjs.a,chunk77CZU5XZ_cjs.b(chunk77CZU5XZ_cjs.a({as:"footer",styles:t},r),{children:jsxRuntime.jsx(chunkD43FJIRQ_cjs.a,{as:"section",children:o||"Copyright \xA9 2022"})}))},G=e=>{var a=e,{children:o,styles:t={}}=a,r=chunk77CZU5XZ_cjs.c(a,["children","styles"]);return jsxRuntime.jsx(chunkD43FJIRQ_cjs.a,chunk77CZU5XZ_cjs.b(chunk77CZU5XZ_cjs.a({as:"aside",styles:t},r),{children:jsxRuntime.jsx(chunkD43FJIRQ_cjs.a,{as:"section",children:o})}))},Q=e=>{var a=e,{children:o,styles:t={}}=a,r=chunk77CZU5XZ_cjs.c(a,["children","styles"]);return jsxRuntime.jsx(chunkD43FJIRQ_cjs.a,chunk77CZU5XZ_cjs.b(chunk77CZU5XZ_cjs.a({as:"section",styles:t},r),{children:o}))},U=e=>{var a=e,{children:o,styles:t={}}=a,r=chunk77CZU5XZ_cjs.c(a,["children","styles"]);return jsxRuntime.jsx(chunkD43FJIRQ_cjs.a,chunk77CZU5XZ_cjs.b(chunk77CZU5XZ_cjs.a({as:"article",styles:t},r),{children:o}))};V.displayName="Header";X.displayName="Main";_.displayName="Footer";G.displayName="Aside";Q.displayName="Section";U.displayName="Article";var he={maxWidth:"var(--img-w, 100%)",height:"var(--img-h, auto)",objectFit:"var(--img-obj-fit, cover)",objectPosition:"var(--img-position, center center)",aspectRatio:"var(--img-ratio, auto 2/3)",display:"var(--img-display, initial)"},K=b=>{var P=b,{src:o,alt:t,width:r=480,height:e,styles:a,loading:p="lazy",placeholder:i=`https://via.placeholder.com/${r}?text=PLACEHOLDER`,fetchpriority:m="low",decoding:y="auto",imgLoaded:c,imgError:f}=P,u=chunk77CZU5XZ_cjs.c(P,["src","alt","width","height","styles","loading","placeholder","fetchpriority","decoding","imgLoaded","imgError"]);return jsxRuntime.jsx(chunkD43FJIRQ_cjs.a,chunk77CZU5XZ_cjs.a({as:"img",src:o,alt:t,width:r,height:e||"auto",loading:p,style:a,onError:x=>{if(f){f==null||f(x);return}x.currentTarget.src!==i&&(x.currentTarget.src=i);},onLoad:x=>{c==null||c(x);}},u))};K.styles=he;K.displayName="Img";var Re={minWidth:"var(--input-min-w, 60%)"},W=k=>{var x=k,{type:o="text",name:t,value:r,placeholder:e,id:a,styles:p,classes:i,isDisabled:m,readonly:y,required:c,inputRef:f,inputChange:u,inputBlur:b,inputDown:P}=x,v=chunk77CZU5XZ_cjs.c(x,["type","name","value","placeholder","id","styles","classes","isDisabled","readonly","required","inputRef","inputChange","inputBlur","inputDown"]);return jsxRuntime.jsx(chunkD43FJIRQ_cjs.a,chunk77CZU5XZ_cjs.a({as:"input",id:a,type:o,placeholder:e,className:i,styles:p,onChange:C=>{u&&!m&&(u==null||u(C));},onBlur:C=>{b&&!m&&(b==null||b(C));},onKeyDown:C=>{P&&!m&&(C.preventDefault(),P==null||P(C));},value:r,name:t,ref:f,"aria-disabled":m,"tab-index":m?-1:void 0,"aria-readonly":y,readOnly:y},v))};W.styles=Re;W.displayName="Input";var q=y=>{var c=y,{href:o,target:t,rel:r,children:e,styles:a={},prefetch:p=!0,onPointerDown:i}=c,m=chunk77CZU5XZ_cjs.c(c,["href","target","rel","children","styles","prefetch","onPointerDown"]);let f=r;return t==="_blank"&&(f=`noopener noreferrer ${p?"prefetch":""}`),jsxRuntime.jsx(chunkD43FJIRQ_cjs.a,chunk77CZU5XZ_cjs.b(chunk77CZU5XZ_cjs.a({as:"a",href:o,target:t,styles:a,rel:f,onPointerDown:b=>{i&&(i==null||i(b));}},m),{children:e!=null?e:"Link"}))},Ee=q;q.displayName="Link";var Ne=i=>{var m=i,{children:o,classes:t,type:r="ul",variant:e,styles:a}=m,p=chunk77CZU5XZ_cjs.c(m,["children","classes","type","variant","styles"]);return jsxRuntime.jsx(chunkD43FJIRQ_cjs.a,chunk77CZU5XZ_cjs.b(chunk77CZU5XZ_cjs.a({as:r,"data-variant":e,className:t,style:a},p),{children:o}))};var Y=m=>{var y=m,{openChild:o,closeChild:t,modalHeader:r,modalFooter:e,children:a,showOpen:p=!1}=y,i=chunk77CZU5XZ_cjs.c(y,["openChild","closeChild","modalHeader","modalFooter","children","showOpen"]);let c=Se__default.default.useRef(null),f=()=>{c.current&&(p?c.current.show():c.current.showModal());},u=()=>{c.current&&c.current.close();};return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(L,chunk77CZU5XZ_cjs.b(chunk77CZU5XZ_cjs.a({modalRef:c,openOnMount:p},i),{children:jsxRuntime.jsxs("section",{children:[r,a,e!=null?e:jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx(E,{type:"button",pointerDown:()=>{u();},children:t||"Close"})," "]})]})})),!p&&jsxRuntime.jsx(E,{type:"button",pointerDown:f,children:o||"Open Modal"})]})};Y.displayName="Modal";var H=r=>{var e=r,{children:o}=e,t=chunk77CZU5XZ_cjs.c(e,["children"]);return jsxRuntime.jsx(chunkD43FJIRQ_cjs.a,chunk77CZU5XZ_cjs.b(chunk77CZU5XZ_cjs.a({as:"caption"},t),{children:o}))},I=r=>{var e=r,{children:o}=e,t=chunk77CZU5XZ_cjs.c(e,["children"]);return jsxRuntime.jsx(chunkD43FJIRQ_cjs.a,chunk77CZU5XZ_cjs.b(chunk77CZU5XZ_cjs.a({as:"thead"},t),{children:o}))},S=r=>{var e=r,{children:o}=e,t=chunk77CZU5XZ_cjs.c(e,["children"]);return jsxRuntime.jsx(chunkD43FJIRQ_cjs.a,chunk77CZU5XZ_cjs.b(chunk77CZU5XZ_cjs.a({as:"tbody"},t),{children:o}))},w=r=>{var e=r,{children:o}=e,t=chunk77CZU5XZ_cjs.c(e,["children"]);return jsxRuntime.jsx(chunkD43FJIRQ_cjs.a,chunk77CZU5XZ_cjs.b(chunk77CZU5XZ_cjs.a({as:"tr"},t),{children:o}))},Z=r=>{var e=r,{children:o}=e,t=chunk77CZU5XZ_cjs.c(e,["children"]);return jsxRuntime.jsx(chunkD43FJIRQ_cjs.a,chunk77CZU5XZ_cjs.b(chunk77CZU5XZ_cjs.a({as:"td"},t),{children:o}))},B=a=>{var p=a,{id:o,dataStyle:t,children:r}=p,e=chunk77CZU5XZ_cjs.c(p,["id","dataStyle","children"]);return jsxRuntime.jsx(chunkD43FJIRQ_cjs.a,chunk77CZU5XZ_cjs.b(chunk77CZU5XZ_cjs.a({as:"section",id:o},e),{"data-style":"table-wrapper",children:jsxRuntime.jsx("table",{children:r})}))};B.displayName="Table";H.displayName="Caption";I.displayName="Thead";S.displayName="Tbody";w.displayName="Tr";Z.displayName="Td";var j=({tblBody:o,tblCaption:t,tblHead:r})=>jsxRuntime.jsxs(B,{children:[t&&jsxRuntime.jsx(H,{children:t}),jsxRuntime.jsx(I,{children:jsxRuntime.jsx(w,{children:r})}),jsxRuntime.jsx(S,{children:o})]});j.displayName="TBL";var ee=p=>{var i=p,{elm:o="p",text:t,styles:r,children:e}=i,a=chunk77CZU5XZ_cjs.c(i,["elm","text","styles","children"]);return jsxRuntime.jsx(chunkD43FJIRQ_cjs.a,chunk77CZU5XZ_cjs.b(chunk77CZU5XZ_cjs.a({as:o,styles:r},a),{children:e||t}))},te=a=>{var p=a,{elm:o="h3",children:t,styles:r}=p,e=chunk77CZU5XZ_cjs.c(p,["elm","children","styles"]);return jsxRuntime.jsx(chunkD43FJIRQ_cjs.a,chunk77CZU5XZ_cjs.b(chunk77CZU5XZ_cjs.a({as:o,styles:r},e),{children:t}))};ee.displayName="Text";te.displayName="Title";var ke={},oe=b=>{var P=b,{value:o,rows:t,cols:r,id:e,required:a,disabled:p,readonly:i,textareaBlur:m,textareaChange:y,textareaDown:c,textareaRef:f}=P,u=chunk77CZU5XZ_cjs.c(P,["value","rows","cols","id","required","disabled","readonly","textareaBlur","textareaChange","textareaDown","textareaRef"]);let v=R=>{y&&!p&&y(R);},k=R=>{m&&!p&&(m==null||m(R));},x=R=>{c&&!p&&(c==null||c(R));};return jsxRuntime.jsx(chunkD43FJIRQ_cjs.a,chunk77CZU5XZ_cjs.a({as:"textarea",ref:f,rows:t,cols:r,styles:chunk77CZU5XZ_cjs.a({},ke),"data-style":"textarea",id:e,required:a,value:o,"aria-disabled":p,readOnly:i,onChange:v,onBlur:k,onKeyDown:x},u))};oe.displayName="Textarea";
|
|
13
|
-
|
|
14
|
-
Object.defineProperty(exports, 'Box', {
|
|
15
|
-
enumerable: true,
|
|
16
|
-
get: function () { return chunkD43FJIRQ_cjs.a; }
|
|
17
|
-
});
|
|
18
|
-
Object.defineProperty(exports, 'FP', {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function () { return chunkD43FJIRQ_cjs.a; }
|
|
21
|
-
});
|
|
22
|
-
Object.defineProperty(exports, 'Icon', {
|
|
23
|
-
enumerable: true,
|
|
24
|
-
get: function () { return chunkD43FJIRQ_cjs.q; }
|
|
25
|
-
});
|
|
26
|
-
Object.defineProperty(exports, 'Tag', {
|
|
27
|
-
enumerable: true,
|
|
28
|
-
get: function () { return chunkD43FJIRQ_cjs.a; }
|
|
29
|
-
});
|
|
30
|
-
exports.Article = U;
|
|
31
|
-
exports.Aside = G;
|
|
32
|
-
exports.Badge = D;
|
|
33
|
-
exports.Button = E;
|
|
34
|
-
exports.Caption = H;
|
|
35
|
-
exports.Card = A;
|
|
36
|
-
exports.Dialog = L;
|
|
37
|
-
exports.Dropdown = M;
|
|
38
|
-
exports.Field = O;
|
|
39
|
-
exports.Footer = _;
|
|
40
|
-
exports.Header = V;
|
|
41
|
-
exports.Img = K;
|
|
42
|
-
exports.Input = W;
|
|
43
|
-
exports.Link = q;
|
|
44
|
-
exports.List = Ne;
|
|
45
|
-
exports.Main = X;
|
|
46
|
-
exports.Modal = Y;
|
|
47
|
-
exports.Section = Q;
|
|
48
|
-
exports.TBL = j;
|
|
49
|
-
exports.Table = B;
|
|
50
|
-
exports.Tbody = S;
|
|
51
|
-
exports.Td = Z;
|
|
52
|
-
exports.Text = ee;
|
|
53
|
-
exports.Textarea = oe;
|
|
54
|
-
exports.Thead = I;
|
|
55
|
-
exports.Title = te;
|
|
56
|
-
exports.To = Ee;
|
|
57
|
-
exports.Tr = w;
|
|
58
|
-
//# sourceMappingURL=out.js.map
|
|
59
|
-
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/badge/fp-badge.tsx","../src/components/buttons/button.tsx","../src/components/cards/card.tsx","../src/components/modal/dialog.tsx","../src/components/dropdowns/dropdown-details.tsx","../src/components/dropdowns/dropdown-summary.tsx","../src/components/dropdowns/dropdown.tsx","../src/components/form/fields.tsx","../src/components/layout/landmarks.tsx","../src/components/images/img.tsx","../src/components/form/inputs.tsx","../src/components/link/link.tsx","../src/components/list/list.tsx","../src/components/modal/modal.tsx","../src/components/tables/table-elements.tsx","../src/components/tables/table.tsx","../src/components/text/text.tsx","../src/components/form/textarea.tsx"],"names":["jsx","defStyles","Badge","_a","_b","elm","role","children","renderStyles","styles","props","__objRest","fp_default","__spreadProps","__spreadValues","Button","type","disabled","classes","pointerDown","pointerOver","pointerLeave","e","defaultStyles","Card","dataStyle","id","Dialog","modalRef","openOnMount","Details","title","onToggle","Summary","jsxs","Dropdown","summary","toggle","Field","labelFor","label","Header","Main","Footer","Aside","Section","Article","Img","src","alt","width","height","loading","placeholder","fetchpriority","decoding","imgLoaded","imgError","Input","name","value","isDisabled","readonly","required","inputRef","inputChange","inputBlur","inputDown","Link","href","target","rel","prefetch","onPointerDown","relValue","link_default","List","variant","React","Fragment","Modal","openChild","closeChild","modalHeader","modalFooter","showOpen","dialogRef","openModal","closeModal","Caption","Thead","Tbody","Tr","Td","Table","RenderHead","data","head","item","index","RenderBody","rec","RenderTable","tblBody","tblCaption","tblHead","Text","text","Span","Title","Textarea","rows","cols","textareaBlur","textareaChange","textareaDown","textareaRef","handleChange","handleBlur","handleKeyDown"],"mappings":"wGA4CI,cAAAA,OAAA,oBAjCJ,IAAMC,GAAY,CAChB,cAAe,0BACf,aAAc,0BACd,MAAO,yBACP,SAAU,0BACV,WAAY,0BACZ,WAAY,8BACZ,OAAQ,yBACR,aAAc,0BACd,gBAAiB,0BACjB,eAAgB,gCAChB,cAAe,4BACjB,EAYaC,EAASC,GAOF,CAPE,IAAAC,EAAAD,EACpB,KAAAE,EAAM,OACN,KAAAC,EACA,SAAAC,EACA,aAAAC,EAAe,GACf,OAAAC,EAAS,CAAC,CAxCZ,EAmCsBL,EAMjBM,EAAAC,EANiBP,EAMjB,CALH,MACA,OACA,WACA,eACA,WAGA,OACEJ,GAACY,EAAAC,EAAAC,EAAA,CAAG,GAAIT,EAAK,KAAMC,EAAM,OAAQG,GAAYC,GAA5C,CACE,SAAAH,GACH,CAEJ,EAEAL,EAAM,OAASD,GACfC,EAAM,YAAc,QC8EhB,cAAAF,OAAA,oBA/DG,IAAMC,GAAY,CACvB,cAAe,wBACf,aAAc,wBACd,QAAS,8BACT,WAAY,2BACZ,eAAgB,6BAChB,OAAQ,6BACR,OAAQ,0BACR,MAAO,0BACP,gBAAiB,2BACjB,aAAc,2BAChB,EAqBac,EAAUZ,GAUJ,CAVI,IAAAC,EAAAD,EACrB,MAAAa,EAAO,SACP,SAAAT,EACA,OAAAE,EACA,SAAAQ,EACA,QAAAC,EACA,YAAAC,EACA,YAAAC,EACA,aAAAC,CA1GF,EAkGuBjB,EASlBM,EAAAC,EATkBP,EASlB,CARH,OACA,WACA,SACA,WACA,UACA,cACA,cACA,iBAsBA,OACEJ,GAAC,SAAAa,EAAAC,EAAA,CACC,KAAME,EACN,cAhBuBM,GAA6C,CACjEL,GACHG,GAAA,MAAAA,EAAcE,EAElB,EAaI,cAvBuBA,GAA6C,CACjEL,GACHE,G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C,EAAAD,EACpB,KAAAE,EAAM,KACN,SAAAE,EACA,OAAAE,CAxEF,EAqEsBL,EAIjBM,EAAAC,EAJiBP,EAIjB,CAHH,MACA,WACA,WAGA,OACEJ,EAACY,EAAAC,EAAAC,EAAA,CAAG,GAAIT,EAAK,OAAQI,GAAYC,GAAhC,CACE,SAAAH,GACH,CAEJ,EAIAmG,GAAK,YAAc,OACnBG,GAAM,YAAc,QACpBD,GAAK,YAAc,OCpBf,cAAA5G,OAAA,oBAnCG,IAAMuB,GAAgB,CAAC,EAEjBuF,GAAY3G,GAaJ,CAbI,IAAAC,EAAAD,EACvB,OAAAyD,EACA,KAAAmD,EACA,KAAAC,EACA,GAAAtF,EACA,SAAAqC,EACA,SAAA9C,EACA,SAAA6C,EACA,aAAAmD,EACA,eAAAC,EACA,aAAAC,EACA,YAAAC,CA5CF,EAiCyBhH,EAYpBM,EAAAC,EAZoBP,EAYpB,CAXH,QACA,OACA,OACA,KACA,WACA,WACA,WACA,eACA,iBACA,eACA,gBAGA,IAAMiH,EAAgB/F,GAA8C,CAC9D4F,GAAkB,CAACjG,GACrBiG,EAAe5F,CAAC,CAEpB,EAEMgG,EAAchG,GAA6C,CAC3D2F,GAAgB,CAAChG,IACnBgG,GAAA,MAAAA,EAAe3F,GAEnB,EAEMiG,EAAiBjG,GAAgD,CACjE6F,GAAgB,CAAClG,IACnBkG,GAAA,MAAAA,EAAe7F,GAEnB,EAEA,OACEtB,GAACY,EAAAE,EAAA,CACC,GAAG,WACH,IAAKsG,EACL,KAAML,EACN,KAAMC,EACN,OAAQlG,EAAA,GAAKS,IACb,aAAW,WACX,GAAIG,EACJ,SAAUqC,EACV,MAAOH,EACP,gBAAe3C,EACf,SAAU6C,EACV,SAAUuD,EACV,OAAQC,EACR,UAAWC,GACP7G,EACN,CAEJ,EAEAoG,GAAS,YAAc","sourcesContent":["import FP from '#components/fp'\nimport React from 'react'\n\nexport interface FpBadgeProps {\n elm?: 'span' | 'p'\n children: React.ReactNode\n role: 'note' | 'alert' | 'status'\n renderStyles?: boolean\n styles?: {}\n}\n\nconst defStyles = {\n paddingInline: 'var(--badge-px, 0.7rem)',\n paddingBlock: 'var(--badge-py, 0.2rem)',\n color: 'var(--badge-cl, black)',\n fontSize: 'var(--badge-fs, 0.8rem)',\n fontWeight: 'var(--badge-fw, normal)',\n fontFamily: 'var(--badge-ff, sans-serif)',\n border: 'var(--badge-brd, none)',\n borderRadius: 'var(--badge-rds, 99rem)',\n backgroundColor: 'var(--badge-bg, \"blue\")',\n textDecoration: 'var(--badge-decoration, none)',\n textTransform: 'var(--badge-tt, var(--tt))',\n}\n\n/**\n * @description Creates a Badge component that wraps a child element with a badge.\n * @param {string} elm - element type to render\n * @param {string} role - aria role\n * @param {any} children - child element to render\n * @param {boolean} renderStyles - whether or not to render the default styles\n * @param {object} styles - styles to pass to the FP component\n * @param {object} props - additional props to pass to the FP component\n * @returns {any} - returns the Badge component\n */\nexport const Badge = ({\n elm = 'span',\n role,\n children,\n renderStyles = true,\n styles = {},\n ...props\n}: FpBadgeProps) => {\n return (\n <FP as={elm} role={role} styles={styles} {...props}>\n {children}\n </FP>\n )\n}\n\nBadge.styles = defStyles\nBadge.displayName = 'Badge'\n","import { ComponentProps } from '#/types'\n// import React from 'react'\nimport FP from '#components/fp'\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n /**\n * The type of the button.\n */\n type: 'button' | 'submit' | 'reset'\n\n /**\n * Button label/content\n */\n children: React.ReactNode\n\n /**\n * Button styles and props\n */\n styles?: object\n\n /**\n * button classes\n */\n classes?: string\n\n /**\n * @deprecated import styles Button.styles\n * default button styles\n */\n defaultStyles?: boolean\n\n /**\n * Button pointer-down event (pointerOver, pointerLeave)\n */\n pointerDown?: (e: React.PointerEvent) => void\n\n /**\n * Button pointer-down event (pointerOver, pointerLeave)\n */\n pointerOver?: (e: React.PointerEvent) => void\n\n /**\n * Pointer leave event handler for the Button component.\n *\n * @param {React.PointerEvent} e - The pointer event\n */\n pointerLeave?: (e: React.PointerEvent) => void\n}\n\n/**\n * Default styles object for the Button component.\n *\n * Defines CSS custom properties used for styling buttons.\n *\n * @property {string} --btn-px - Padding left/right\n * @property {string} --btn-py - Padding top/bottom\n * @property {string} --btn-dsp - Display value\n * @property {string} --btn-place - place-items value\n * @property {string} --btn-justify - justify-content value\n * @property {string} --btn-cursor - Cursor value\n * @property {string} --btn-border - Border value\n * @property {string} --btn-color - Text color\n * @property {string} --btn-bg - Background color\n * @property {string} --btn-radius - Border radius\n */\nexport const defStyles = {\n paddingInline: 'var(--btn-px, 1.4rem)',\n paddingBlock: 'var(--btn-py, 0.8rem)',\n display: 'var(--btn-dsp, inline-flex)',\n placeItems: 'var(--btn-place, center)',\n justifyContent: 'var(--btn-justify, center)',\n cursor: 'var(--btn-cursor, pointer)',\n border: 'var(--btn-border, none)',\n color: 'var(--btn-color, white)',\n backgroundColor: 'var(--btn-bg, royalblue)',\n borderRadius: 'var(--btn-radius, 0.2rem)',\n}\n\n/*\n * Button component\n *\n * Renders a <button> element with custom props.\n *\n * @param {ButtonProps} props - The component props\n * @param {\"button\" | \"submit\" | \"reset\"} [props.type=\"button\"] - The button type\n * @param {ReactNode} props.children - The button label/content\n * @param {Object} [props.styles] - Custom CSS styles\n * @param {boolean} [props.disabled=false] - Whether the button is disabled\n * @param {string} [props.classes] - Custom CSS classes\n * @param {function} [props.pointerDown] - Pointer down event handler\n * @param {function} [props.pointerOver] - Pointer over event handler\n * @param {function} [props.pointerLeave] - Pointer leave event handler\n * @param {boolean} [props.defaultStyles=false] - Whether to apply default styles\n *\n * @returns {JSX.Element} The rendered <button> element\n */\n\nexport const Button = ({\n type = 'button',\n children,\n styles,\n disabled,\n classes,\n pointerDown,\n pointerOver,\n pointerLeave,\n ...props\n}: ButtonProps) => {\n const handlePointerDown = (e: React.PointerEvent<HTMLButtonElement>) => {\n if (!disabled) {\n pointerDown?.(e)\n }\n }\n\n const handlePointerOver = (e: React.PointerEvent<HTMLButtonElement>) => {\n if (!disabled) {\n pointerOver?.(e)\n }\n }\n\n const handlePointerLeave = (e: React.PointerEvent<HTMLButtonElement>) => {\n if (!disabled) {\n pointerLeave?.(e)\n }\n }\n\n /* Returning a button element. */\n return (\n <button\n type={type}\n onPointerOver={handlePointerOver}\n onPointerDown={handlePointerDown}\n onPointerLeave={handlePointerLeave}\n style={styles}\n aria-disabled={disabled}\n {...props}\n >\n {children}\n </button>\n )\n //\n}\n\nexport default Button\nButton.styles = defStyles\nButton.displayName = 'Button'\n","import FP from '../fp'\nimport { ComponentProps } from '../../types'\n\n/*\n * CardProps interface\n *\n * Extends ComponentProps. Defines props for the Card component.\n *\n * @property {('div' | 'aside' | 'section' | 'article')} [elm='div'] - HTML element to render as\n */\nexport interface CardProps extends ComponentProps {\n elm?: 'div' | 'aside' | 'section' | 'article'\n}\n\n/*\n * Default styles for the Card component.\n *\n * Defines CSS custom properties for styling cards.\n *\n * @property {string} --card-p - Padding\n * @property {string} --card-bg - Background color\n * @property {string} --card-shadow - Box shadow\n * @property {string} --card-rds - Border radius\n * @property {string} --card-brd - Border\n * @property {string} --card-cl - Text color\n */\nexport const defaultStyles = {\n padding: 'var(--card-p, 2rem)',\n backgroundColor: 'var(--card-bg, white)',\n boxShadow: 'var(--card-shadow, 0 0 0.5rem 0.1rem rgba(0, 0, 0, 0.1))',\n borderRadius: 'var(--card-rds, 0.2ßrem)',\n border: 'var(--card-brd, none)',\n color: 'var(--card-cl, black)',\n}\n\n/*\n * Card component\n *\n * Renders a card container.\n *\n * @param {CardProps} props - Component props\n * @param {('div' | 'aside' | 'section' | 'article')} [props.elm='div'] - Element to render as\n * @param {Object} [props.styles] - CSS styles to apply\n * @param {ReactNode} props.children - Card content\n * @param {boolean} [props.renderStyles=true] - Whether to render default styles\n * @param {string} [props.dataStyle] - data-card attribute value\n * @param {string} [props.id] - Unique ID\n *\n * @returns {ReactElement} Card component\n */\nexport const Card = ({\n elm = 'div',\n styles,\n children,\n renderStyles = true,\n dataStyle,\n id,\n ...props\n}: CardProps) => {\n return (\n <FP\n as={elm}\n id={id}\n styles={styles}\n renderStyles={renderStyles}\n data-card={dataStyle}\n {...props}\n >\n {children}\n </FP>\n )\n}\n\nCard.styles = defaultStyles\n\nCard.displayName = 'Card'\n","import FP from '../fp'\nimport { ComponentProps } from '../../types'\nimport { Button } from '../buttons/button'\nimport React, { MouseEventHandler, useEffect } from 'react'\n\nexport interface DialogProps extends ComponentProps {\n /**\n * React ref for dialog element\n */\n modalRef: React.RefObject<HTMLDialogElement>\n /**\n * Handle close modal event\n */\n closeModal?: (e: React.SyntheticEvent<HTMLDialogElement>) => void\n /**\n * open modal on mount\n */\n openOnMount?: boolean\n}\n/**\n * Dialog component\n */\nexport const Dialog = ({\n id,\n children,\n modalRef,\n openOnMount,\n ...props\n}: DialogProps) => {\n\n const handleCloseModal = (e: React.SyntheticEvent<HTMLDialogElement>) => {\n if (e.currentTarget === e.target) {\n e.currentTarget.close()\n }\n }\n\n return (\n <FP\n as=\"dialog\"\n id={id}\n ref={modalRef}\n open={openOnMount}\n onClick={handleCloseModal}\n {...props}\n >\n {children}\n </FP>\n )\n}\n\nDialog.displayName = 'Dialog'\n","import FP from '../fp'\nimport { ComponentProps } from '../../types'\nexport interface DropdownProps extends ComponentProps {\n elm?: 'div' | 'aside'\n title: string\n children: React.ReactNode\n onToggle?: (e: React.SyntheticEvent) => void\n}\n\nexport const defaultStyles = {\n padding: 'var(--card-p, 1.2rem)',\n backgroundColor: 'var(--card-bg, white)',\n}\n\nexport const Details = ({\n title,\n children,\n styles,\n renderStyles = true,\n onToggle,\n ...props\n}: DropdownProps) => {\n const handleToggle = (e: React.SyntheticEvent) => {\n onToggle?.(e)\n }\n return (\n <FP as=\"details\" title={title} onToggle={handleToggle} styles={styles}>\n {children}\n </FP>\n )\n}\nDetails.styles = defaultStyles\nexport default Details\nDetails.displayName = 'Details'\n","// import { defStyles } from \"@fpkit/fp-button/lib/components/button\"\nimport FP from '../fp'\n\nexport interface SummaryPros {\n children: React.ReactNode\n styles?: {}\n renderStyles?: boolean\n}\n\nexport const defaultStyles = {\n listStyle: 'none',\n justifyContent: 'var(--summary-justify, space-between)',\n color: 'var(--summary-color, currentColor)',\n cursor: 'var(--detail-cursor, pointer)',\n}\n\nexport const Summary = ({\n children,\n styles,\n renderStyles = true,\n ...props\n}: SummaryPros) => {\n return (\n <FP as=\"summary\" styles={styles} {...props}>\n {children}\n </FP>\n )\n}\n\nSummary.styles = defaultStyles\nSummary.displayName = 'Summary'\nexport default Summary\n","import { ComponentProps } from '../../types'\nimport { Details } from './dropdown-details'\nimport { Summary } from './dropdown-summary'\n\nexport interface DropdownProps extends ComponentProps {\n title: string\n summary: React.ReactNode\n toggle?: (e: React.SyntheticEvent) => void\n}\n\nconst defaultStyles = {\n display: 'flex',\n placeContent: 'flex-start',\n placeItems: 'center',\n gap: '.7rem',\n border: 'var(--summary-border, solid 1px #ccc)',\n transition: 'all 0.2s ease',\n backgroundColor: 'var(--summary-bg, whitesmoke)',\n padding: 'var(--details-pd, 1.2rem)',\n minWidth: 'var(--summary-min-w, 80vw)',\n maxWidth: 'var(--summary-min-w, 80vw)',\n}\n\nexport const Dropdown = ({\n styles,\n children,\n summary,\n toggle,\n renderStyles = true,\n ...props\n}: DropdownProps) => {\n return (\n <Details styles={styles} onToggle={toggle} {...props}>\n <Summary>{summary}</Summary>\n {children}\n </Details>\n )\n}\n\nDropdown.styles = defaultStyles\nDropdown.Summary = Summary\nDropdown.Details = Details\n\nexport default Dropdown\nDropdown.displayName = 'Dropdown'\n","import FP from '../fp'\nimport { ComponentProps } from '../../types'\n\nexport interface FieldProps extends ComponentProps {\n /**\n * Defines the for attribute of the label element\n */\n labelFor: string\n /**\n * The label content\n */\n label: React.ReactNode\n}\n\nexport const defaultStyles = {}\n\n/**\n * Field component that renders a label and children wrapped in a div element.\n * @param labelFor Defines the for attribute of the label element\n * @param styles Custom styles to be applied to the component\n * @param label The label content\n * @param children The children to be rendered inside the component\n * @param props Additional props to be spread to the component\n */\nexport const Field = ({\n labelFor,\n styles,\n label,\n children,\n ...props\n}: FieldProps) => {\n return (\n <FP as=\"div\" styles={styles} data-style=\"fields\">\n <label htmlFor={labelFor}>{label}</label>\n {children}\n </FP>\n )\n}\n\nField.styles = defaultStyles\n\nField.displayName = 'Field'\n","/**\n * @fileoverview Landmarks components\n */\n\nimport FP from '../fp'\nimport { ComponentProps } from '../../types'\n\nexport const Header = ({ children, styles = {}, ...props }: ComponentProps) => {\n return (\n <FP as=\"header\" {...props} styles={styles}>\n <FP as=\"section\">{children}</FP>\n </FP>\n )\n}\n\nexport const Main = ({ children, styles = {}, ...props }: ComponentProps) => {\n return (\n <FP as=\"main\" styles={styles} {...props}>\n {children}\n </FP>\n )\n}\n\nexport const Footer = ({ children, styles = {}, ...props }: ComponentProps) => {\n return (\n <FP as=\"footer\" styles={styles} {...props}>\n <FP as=\"section\">{children || 'Copyright © 2022'}</FP>\n </FP>\n )\n}\n\nexport const Aside = ({ children, styles = {}, ...props }: ComponentProps) => {\n return (\n <FP as=\"aside\" styles={styles} {...props}>\n <FP as=\"section\">{children}</FP>\n </FP>\n )\n}\n\nexport const Section = ({\n children,\n styles = {},\n ...props\n}: ComponentProps) => {\n return (\n <FP as=\"section\" styles={styles} {...props}>\n {children}\n </FP>\n )\n}\n\nexport const Article = ({\n children,\n styles = {},\n ...props\n}: ComponentProps) => {\n return (\n <FP as=\"article\" styles={styles} {...props}>\n {children}\n </FP>\n )\n}\n\nHeader.displayName = 'Header'\nMain.displayName = 'Main'\nFooter.displayName = 'Footer'\nAside.displayName = 'Aside'\nSection.displayName = 'Section'\nArticle.displayName = 'Article'\n","import FP from '../fp'\nimport { ComponentProps } from 'src/types'\n\n/*\n * ImageProps interface\n *\n * Extends ComponentProps and defines additional props for the Img component.\n *\n * @property {string} [src] - The image source URL\n * @property {string} alt - Required alt text for image accessibility\n * @property {number} width - Required width of image\n * @property {number} [height] - Optional height of image\n * @property {\"eager\" | \"lazy\"} [loading=\"lazy\"] - Loading behavior\n * @property {string} [placeholder] - Fallback placeholder image\n * @property {\"high\" | \"low\"} [fetchpriority=\"low\"] - Image fetch priority\n * @property {\"sync\" | \"async\" | \"auto\"} [decoding=\"auto\"] - Decode setting\n * @property {function} [imgError] - Error callback\n * @property {function} [imgLoaded] - Loaded callback\n */\n\nexport interface ImageProps extends ComponentProps {\n alt: string\n src?: string\n width?: number\n height?: number\n loading?: 'eager' | 'lazy'\n placeholder?: string\n fetchpriority?: 'high' | 'low'\n decoding?: 'sync' | 'async' | 'auto'\n imgError?: (e: React.SyntheticEvent<HTMLImageElement, Event>) => void\n imgLoaded?: (e: React.SyntheticEvent<HTMLImageElement, Event>) => void\n}\n\n/*\n * Default styles object for the Img component.\n *\n * @property {string} maxWidth - Sets the max-width CSS property. Default is 'var(--img-w, 100%)'.\n * @property {string} height - Sets the height CSS property. Default is 'var(--img-h, auto)'.\n * @property {string} objectFit - Sets the object-fit CSS property. Default is 'var(--img-obj-fit, cover)'.\n * @property {string} objectPosition - Sets the object-position CSS property. Default is 'var(--img-position, center center)'.\n * @property {string} aspectRatio - Sets the aspect-ratio CSS property. Default is 'var(--img-ratio, auto 2/3)'.\n */\n\nexport const defaultStyles = {\n maxWidth: 'var(--img-w, 100%)',\n height: 'var(--img-h, auto)',\n objectFit: 'var(--img-obj-fit, cover)',\n objectPosition: 'var(--img-position, center center)',\n aspectRatio: 'var(--img-ratio, auto 2/3)',\n display: 'var(--img-display, initial)',\n}\n\n/*\n * Img component\n *\n * Renders an <img> element with custom props.\n *\n * @param {string} src - The image source URL.\n * @param {string} alt - The alt text for the image.\n * @param {number} [width=480] - The width of the image.\n * @param {number} [height] - The height of the image.\n * @param {Object} [styles] - Additional CSS styles to apply.\n * @param {boolean} [renderStyles=true] - Whether to render the default styles.\n * @param {\"eager\" | \"lazy\"} [loading=\"lazy\"] - The loading attribute.\n * @param {string} [placeholder] - A placeholder image URL.\n * @param {\"high\" | \"low\"} [fetchpriority=\"low\"] - The fetchpriority attribute.\n * @param {\"sync\" | \"async\" | \"auto\"} [decoding=\"auto\"] - The decoding attribute.\n * @param {function} [imgLoaded] - Callback when image loads successfully.\n * @param {function} [imgError] - Callback when image errors.\n *\n * @returns {JSX.Element} The Img component.\n */\nexport const Img = ({\n src,\n alt,\n width = 480,\n height,\n styles,\n loading = 'lazy',\n placeholder = `https://via.placeholder.com/${width}?text=PLACEHOLDER`,\n fetchpriority = 'low',\n decoding = 'auto',\n imgLoaded,\n imgError,\n ...props\n}: ImageProps) => {\n const handleImgError = (\n e: React.SyntheticEvent<HTMLImageElement, Event>,\n ): void => {\n if (imgError) {\n imgError?.(e)\n return\n }\n if (e.currentTarget.src !== placeholder) {\n e.currentTarget.src = placeholder\n }\n }\n\n const handleImgLoad = (\n e: React.SyntheticEvent<HTMLImageElement, Event>,\n ): void => {\n imgLoaded?.(e)\n }\n\n return (\n <FP\n as=\"img\"\n src={src}\n alt={alt}\n width={width}\n height={height || 'auto'}\n loading={loading}\n style={styles}\n onError={handleImgError}\n onLoad={handleImgLoad}\n {...props}\n />\n )\n}\nImg.styles = defaultStyles\nImg.displayName = 'Img'\n","import FP from '../fp'\nimport { ComponentProps } from '../../types'\n\n// import\n\nexport interface InputProps extends Omit<ComponentProps, 'children'> {\n /**\n * The type of the input.\n */\n type?: 'text' | 'password' | 'email' | 'number' | 'tel' | 'url' | 'search'\n /**\n * The input name\n */\n name?: string\n /**\n * The input value\n */\n value?: string\n /**\n * The input placeholder\n */\n placeholder?: string\n /**\n * Pass a function to handle input change events\n */\n inputChange?: (e: React.ChangeEvent<HTMLInputElement>) => void\n /**\n * Pass a function to handle input focus events\n */\n inputBlur?: (e: React.FocusEvent<HTMLInputElement>) => void\n /**\n * Function prop to handle input keydown events\n */\n inputDown?: (e: React.KeyboardEvent<HTMLInputElement>) => void\n /**\n * Input is required or not\n */\n required?: boolean\n /**\n * Input id attribute\n */\n id: string\n /**\n * Set the element as disabled\n */\n isDisabled?: boolean\n /**\n * Set the element as readonly\n */\n readonly?: boolean\n /**\n * ref to the input element\n */\n inputRef?: React.RefObject<HTMLInputElement>\n /**\n * Input styles\n */\n styles?: {}\n /**\n * input classes\n */\n classes?: string\n}\n\nexport const defaultStyles = {\n minWidth: 'var(--input-min-w, 60%)',\n}\n\n/**\n * Input component that renders an HTML input element.\n * @param {InputProps} props - The input component props.\n * @returns {JSX.Element} - The input component.\n */\nexport const Input = ({\n type = 'text',\n name,\n value,\n placeholder,\n id,\n styles,\n classes,\n isDisabled,\n readonly,\n required,\n inputRef,\n inputChange,\n inputBlur,\n inputDown,\n ...props\n}: InputProps): JSX.Element => {\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n if (inputChange && !isDisabled) {\n inputChange?.(e)\n }\n }\n\n const handleBlur = (e: React.FocusEvent<HTMLInputElement>) => {\n if (inputBlur && !isDisabled) {\n inputBlur?.(e)\n }\n }\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {\n if (inputDown && !isDisabled) {\n e.preventDefault()\n inputDown?.(e)\n }\n }\n\n return (\n <FP\n as=\"input\"\n id={id}\n type={type}\n placeholder={placeholder}\n className={classes}\n styles={styles}\n onChange={handleChange}\n onBlur={handleBlur}\n onKeyDown={handleKeyDown}\n value={value}\n name={name}\n ref={inputRef}\n aria-disabled={isDisabled}\n tab-index={isDisabled ? -1 : undefined}\n aria-readonly={readonly}\n readOnly={readonly}\n {...props}\n />\n )\n}\nInput.styles = defaultStyles\nInput.displayName = 'Input'\n","import FP from '../fp'\nimport { ComponentProps } from '../../types'\n\nexport type LinkProps = Partial<ComponentProps> & {\n href: string\n target?: string\n rel?: string\n children: React.ReactNode\n prefetch?: boolean\n onPointerDown?: (e: React.PointerEvent<HTMLAnchorElement>) => void\n}\n\nexport const Link = ({\n href,\n target,\n rel,\n children,\n styles = {},\n prefetch = true,\n onPointerDown,\n ...props\n}: LinkProps) => {\n let relValue = rel\n\n if (target === '_blank')\n relValue = `noopener noreferrer ${!!prefetch ? 'prefetch' : ''}`\n\n const handleOnpointerDown = (e: React.PointerEvent<HTMLAnchorElement>) => {\n if (onPointerDown) onPointerDown?.(e)\n }\n\n return (\n <FP\n as=\"a\"\n href={href}\n target={target}\n styles={styles}\n rel={relValue}\n onPointerDown={handleOnpointerDown}\n {...props}\n >\n {children ?? 'Link'}\n </FP>\n )\n}\n\nexport default Link\nLink.displayName = 'Link'\n","import * as React from 'react'\nimport FP from '../fp'\n\nexport interface ListProps {\n styles?: {}\n classes?: string\n children: React.ReactNode\n type: 'ul' | 'ol' | 'dl'\n variant: string\n}\n\nexport const List = ({\n children,\n classes,\n type = 'ul',\n variant,\n styles,\n ...props\n}: ListProps) => {\n return (\n <FP\n as={type}\n data-variant={variant}\n className={classes}\n style={styles}\n {...props}\n >\n {children}\n </FP>\n )\n}\n\nexport default List\n","import React from 'react'\nimport { ComponentProps } from '../../types'\nimport { Button } from '../buttons/button'\nimport { Dialog } from './dialog'\n\nexport interface ModalProps extends ComponentProps {\n /**\n * The child component/content for open button\n */\n openChild?: React.ReactNode\n /**\n * The child component/content for close button\n */\n closeChild?: React.ReactNode\n /**\n * The child component/content for modal header\n */\n modalHeader?: React.ReactNode\n /**\n * The child component/content for modal footer\n */\n modalFooter?: React.ReactNode\n /**\n * The child component/content for modal body\n */\n children: React.ReactNode\n /**\n * Open modal on mount when set to true\n */\n showOpen?: boolean\n}\nexport const Modal = ({\n openChild,\n closeChild,\n modalHeader,\n modalFooter,\n children,\n showOpen = false,\n ...props\n}: ModalProps) => {\n const dialogRef = React.useRef<HTMLDialogElement>(null)\n const openModal = (): void => {\n if (dialogRef.current) {\n if(showOpen)\n dialogRef.current.show()\n else\n dialogRef.current.showModal()\n }\n }\n const closeModal = () => {\n if (dialogRef.current) {\n dialogRef.current.close()\n }\n }\n\n return (\n <>\n <Dialog modalRef={dialogRef} openOnMount={showOpen} {...props}>\n <section>\n {modalHeader}\n {children}\n {modalFooter ?? (\n <div>\n <Button\n type=\"button\"\n pointerDown={() => {\n closeModal()\n }}\n >\n {closeChild || 'Close'}\n </Button>{' '}\n </div>\n )}\n </section>\n </Dialog>\n { !showOpen && (\n <Button type=\"button\" pointerDown={openModal}>\n {openChild || 'Open Modal'}\n </Button>\n )}\n </>\n )\n}\n\nModal.displayName = 'Modal'\n","import FP from '../fp'\nimport { ComponentProps } from '../../types'\nimport React from 'react'\n\n\nexport const Caption = ({ children, ...props }: ComponentProps) => {\n return (\n <FP as=\"caption\" {...props}>\n {children}\n </FP>\n )\n}\n\nexport const Thead = ({ children, ...props }: ComponentProps) => (\n <FP as=\"thead\" {...props}>\n {children}\n </FP>\n)\n\nexport const Tbody = ({ children, ...props }: ComponentProps) => (\n <FP as=\"tbody\" {...props}>\n {children}\n </FP>\n)\n\nexport const Tr = ({ children, ...props }: ComponentProps) => (\n <FP as=\"tr\" {...props}>\n {children}\n </FP>\n)\n\nexport const Td = ({ children, ...props }: ComponentProps) => (\n <FP as=\"td\" {...props}>\n {children}\n </FP>\n)\n\nexport const Table = ({ id, dataStyle, children, ...props }: ComponentProps) => {\n return (\n <FP\n as=\"section\"\n id={id}\n {...props}\n data-style=\"table-wrapper\"\n >\n <table>{children}</table>\n </FP>\n )\n}\n\nTable.displayName = 'Table'\nCaption.displayName = 'Caption'\nThead.displayName = 'Thead'\nTbody.displayName = 'Tbody'\nTr.displayName = 'Tr'\nTd.displayName = 'Td'\n\n","import { Table, Caption, Thead, Tbody, Td, Tr } from \"./table-elements\"\nimport { ComponentProps } from '../../types'\n\nexport interface TableProps extends ComponentProps {\n tblHead: React.ReactNode\n tblBody: React.ReactNode\n tblCaption?: React.ReactNode\n}\n\nexport type dataType = {id: number, items: string[]}[]\n\n/**\n * Render the `thead` by passing an array of names\n */\nexport const RenderHead = (data: []) => {\n const head = data.map((item, index) => {\n return <th key={index}>{item}</th>\n })\n return (\n <tr>\n {head}\n </tr>\n )\n}\n\n/**\n * Render the table body `tr`, `td` with the data provided\n */\nexport const RenderBody = (data: {}[]) => {\n const rec = data.map((item, index) => {\n return (\n <tr key={index}>\n {/* <td>{item?.id}</td>\n <td>{item?.items}</td> */}\n </tr>\n )\n })\n return (<Tbody>{rec}</Tbody>)\n}\n\n/**\n * Render the table placing `caption`, `thead` and `tbody` in the correct order\n * caption is optional\n */\nexport const RenderTable = ({tblBody, tblCaption, tblHead}: TableProps) => {\n return (\n <Table>\n {tblCaption && <Caption>{tblCaption}</Caption>}\n <Thead>\n <Tr>\n {tblHead}\n </Tr>\n </Thead>\n <Tbody>\n {tblBody}\n </Tbody>\n </Table>\n )\n}\n\nRenderTable.displayName = 'TBL'\nRenderBody.displayName = 'renderBody'\nRenderHead.displayName = 'renderHead'\n","import FP from '../fp'\nimport React from 'react'\n\nexport type TextElements =\n | 'p'\n | 'span'\n | 'a'\n | 'strong'\n | 'em'\n | 'small'\n | 's'\n | 'cite'\n | 'time'\n | 'code'\n | 'kbd'\n | 'sub'\n | 'sup'\n | 'i'\n | 'b'\n | 'u'\n | 'mark'\n | 'span'\n | 'blockquote'\nexport interface TextProps {\n /**\n * HTML element\n */\n elm?: TextElements\n children?: React.ReactNode\n text?: String\n styles?: {}\n}\n\nexport const Text = ({\n elm = 'p',\n text,\n styles,\n children,\n ...props\n}: TextProps) => {\n return (\n <FP as={elm} styles={styles} {...props}>\n {children || text}\n </FP>\n )\n}\n\nexport const Span = ({\n elm = 'span',\n children,\n styles,\n ...props\n}: TextProps) => {\n return (\n <FP as={elm} styles={styles} {...props}>\n {children}\n </FP>\n )\n}\n\nexport interface TitleProps {\n /**\n * HTML headings\n */\n elm?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'\n children?: React.ReactNode\n styles?: {}\n}\n\nexport const Title = ({\n elm = 'h3',\n children,\n styles,\n ...props\n}: TitleProps) => {\n return (\n <FP as={elm} styles={styles} {...props}>\n {children}\n </FP>\n )\n}\n\nexport default Text\n\nText.displayName = 'Text'\nTitle.displayName = 'Title'\nSpan.displayName = 'Span'\n","import FP from '../fp'\nimport { InputProps } from './inputs'\nimport { SharedInputProps } from '../../types'\n\nexport interface TextareaProps extends SharedInputProps {\n /**\n * The number of lines in textarea\n */\n rows?: number\n /**\n * The number of columns in textarea\n */\n cols?: number\n /**\n * Textarea react ref\n */\n textareaRef?: React.RefObject<HTMLTextAreaElement>\n /**\n * Textarea change event handler\n */\n textareaChange?: (e: React.ChangeEvent<HTMLTextAreaElement>) => void\n /**\n * Textarea area blur event handler\n */\n textareaBlur?: (e: React.FocusEvent<HTMLTextAreaElement>) => void\n /**\n * Textarea keydown event handler\n */\n textareaDown?: (e: React.KeyboardEvent<HTMLTextAreaElement>) => void\n}\n\nexport const defaultStyles = {}\n\nexport const Textarea = ({\n value,\n rows,\n cols,\n id,\n required,\n disabled,\n readonly,\n textareaBlur,\n textareaChange,\n textareaDown,\n textareaRef,\n ...props\n}: TextareaProps) => {\n const handleChange = (e: React.ChangeEvent<HTMLTextAreaElement>) => {\n if (textareaChange && !disabled) {\n textareaChange(e)\n }\n }\n\n const handleBlur = (e: React.FocusEvent<HTMLTextAreaElement>) => {\n if (textareaBlur && !disabled) {\n textareaBlur?.(e)\n }\n }\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLTextAreaElement>) => {\n if (textareaDown && !disabled) {\n textareaDown?.(e)\n }\n }\n\n return (\n <FP\n as=\"textarea\"\n ref={textareaRef}\n rows={rows}\n cols={cols}\n styles={{ ...defaultStyles }}\n data-style=\"textarea\"\n id={id}\n required={required}\n value={value}\n aria-disabled={disabled}\n readOnly={readonly}\n onChange={handleChange}\n onBlur={handleBlur}\n onKeyDown={handleKeyDown}\n {...props}\n />\n )\n}\n\nTextarea.displayName = 'Textarea'\n"]}
|