@kakadu/components 0.1.3 → 1.0.0
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/build/aria-text.d.ts +5 -0
- package/build/aria-text.js +1 -0
- package/build/aria-text.mjs +15 -0
- package/build/atom.d.ts +10 -2
- package/build/atom.js +1 -1
- package/build/atom.mjs +10 -3
- package/build/bankid-logo.d.ts +2 -0
- package/build/bankid-logo.js +1 -0
- package/build/bankid-logo.mjs +43 -0
- package/build/box.d.ts +4 -1
- package/build/box.js +1 -1
- package/build/box.mjs +11 -2
- package/build/button-tooltip.d.ts +4 -0
- package/build/button-tooltip.js +1 -0
- package/build/button-tooltip.mjs +11 -0
- package/build/button.d.ts +32 -0
- package/build/button.js +1 -0
- package/build/button.mjs +69 -0
- package/build/card.d.ts +8 -0
- package/build/card.js +1 -0
- package/build/card.mjs +36 -0
- package/build/click-ripples.d.ts +2 -0
- package/build/click-ripples.js +1 -0
- package/build/click-ripples.mjs +60 -0
- package/build/components.css +1 -1
- package/build/datum.d.ts +5 -0
- package/build/datum.js +1 -0
- package/build/datum.mjs +27 -0
- package/build/dnb-logo.d.ts +2 -0
- package/build/dnb-logo.js +1 -0
- package/build/dnb-logo.mjs +31 -0
- package/build/dot.d.ts +2 -0
- package/build/dot.js +1 -0
- package/build/dot.mjs +10 -0
- package/build/flex.d.ts +14 -2
- package/build/flex.js +1 -1
- package/build/flex.mjs +17 -2
- package/build/footer.d.ts +3 -0
- package/build/footer.js +1 -0
- package/build/footer.mjs +65 -0
- package/build/gauge.d.ts +6 -2
- package/build/gauge.js +1 -1
- package/build/gauge.mjs +39 -2
- package/build/gjensidige-logo.d.ts +2 -0
- package/build/gjensidige-logo.js +1 -0
- package/build/gjensidige-logo.mjs +30 -0
- package/build/hooks/use-media-query.d.ts +1 -0
- package/build/hooks/use-media-query.js +1 -0
- package/build/hooks/use-media-query.mjs +20 -0
- package/build/hover-gradient.d.ts +5 -0
- package/build/hover-gradient.js +1 -0
- package/build/hover-gradient.mjs +48 -0
- package/build/icon-button.d.ts +13 -0
- package/build/icon-button.js +1 -0
- package/build/icon-button.mjs +45 -0
- package/build/icon.js +1 -0
- package/build/icon.mjs +50 -0
- package/build/icons/arrow-down.d.ts +2 -0
- package/build/icons/arrow-down.js +1 -0
- package/build/icons/arrow-down.mjs +24 -0
- package/build/icons/caret-down.d.ts +2 -0
- package/build/icons/caret-down.js +1 -0
- package/build/icons/caret-down.mjs +27 -0
- package/build/icons/caret-right.d.ts +2 -0
- package/build/icons/caret-right.js +1 -0
- package/build/icons/caret-right.mjs +27 -0
- package/build/icons/check.d.ts +2 -0
- package/build/icons/check.js +1 -0
- package/build/icons/check.mjs +27 -0
- package/build/icons/chevron-down.d.ts +2 -0
- package/build/icons/chevron-down.js +1 -0
- package/build/icons/chevron-down.mjs +27 -0
- package/build/icons/chevron-up.d.ts +2 -0
- package/build/icons/chevron-up.js +1 -0
- package/build/icons/chevron-up.mjs +27 -0
- package/build/icons/chrome-browser-logo.d.ts +2 -0
- package/build/icons/chrome-browser-logo.js +1 -0
- package/build/icons/chrome-browser-logo.mjs +24 -0
- package/build/icons/copy.d.ts +2 -0
- package/build/icons/copy.js +1 -0
- package/build/icons/copy.mjs +29 -0
- package/build/icons/edge-browser-logo.d.ts +2 -0
- package/build/icons/edge-browser-logo.js +1 -0
- package/build/icons/edge-browser-logo.mjs +24 -0
- package/build/icons/edit.d.ts +2 -0
- package/build/icons/edit.js +1 -0
- package/build/icons/edit.mjs +27 -0
- package/build/icons/exclamation-triangle.d.ts +2 -0
- package/build/icons/exclamation-triangle.js +1 -0
- package/build/icons/exclamation-triangle.mjs +29 -0
- package/build/icons/icon.d.ts +25 -0
- package/build/icons/kakadu-guide-glyph.d.ts +2 -0
- package/build/icons/kakadu-guide-glyph.js +1 -0
- package/build/icons/kakadu-guide-glyph.mjs +24 -0
- package/build/icons/kakadu-guide.d.ts +2 -0
- package/build/icons/kakadu-guide.js +1 -0
- package/build/icons/kakadu-guide.mjs +27 -0
- package/build/icons/menu.d.ts +2 -0
- package/build/icons/menu.js +1 -0
- package/build/icons/menu.mjs +25 -0
- package/build/icons/plus.d.ts +2 -0
- package/build/icons/plus.js +1 -0
- package/build/icons/plus.mjs +27 -0
- package/build/icons/test.d.ts +2 -0
- package/build/icons/test.js +1 -0
- package/build/icons/test.mjs +29 -0
- package/build/icons/times.d.ts +2 -0
- package/build/icons/times.js +1 -0
- package/build/icons/times.mjs +27 -0
- package/build/index.html +0 -0
- package/build/kakadu-guide-icon.d.ts +3 -0
- package/build/kakadu-guide-icon.js +1 -0
- package/build/kakadu-guide-icon.mjs +14 -0
- package/build/kakadu-guide-logo.d.ts +10 -0
- package/build/kakadu-guide-logo.js +1 -0
- package/build/kakadu-guide-logo.mjs +59 -0
- package/build/kakadu-index-logo.d.ts +2 -0
- package/build/kakadu-index-logo.js +1 -0
- package/build/kakadu-index-logo.mjs +66 -0
- package/build/kakadu-logo.d.ts +2 -0
- package/build/kakadu-logo.js +1 -0
- package/build/kakadu-logo.mjs +44 -0
- package/build/modal.d.ts +28 -0
- package/build/modal.js +9 -0
- package/build/modal.mjs +1246 -0
- package/build/moving-gradients.d.ts +9 -0
- package/build/moving-gradients.js +1 -0
- package/build/moving-gradients.mjs +86 -0
- package/build/moving-stars.d.ts +12 -0
- package/build/moving-stars.js +1 -0
- package/build/moving-stars.mjs +90 -0
- package/build/notice.d.ts +12 -0
- package/build/notice.js +1 -0
- package/build/notice.mjs +22 -0
- package/build/notification.d.ts +17 -0
- package/build/notification.js +1 -0
- package/build/notification.mjs +84 -0
- package/build/revealer.d.ts +20 -0
- package/build/revealer.js +1 -0
- package/build/revealer.mjs +76 -0
- package/build/separator.d.ts +5 -0
- package/build/separator.js +1 -0
- package/build/separator.mjs +24 -0
- package/build/skeleton.d.ts +15 -1
- package/build/skeleton.js +1 -1
- package/build/skeleton.mjs +38 -3
- package/build/sparebank1-logo.d.ts +2 -0
- package/build/sparebank1-logo.js +1 -0
- package/build/sparebank1-logo.mjs +61 -0
- package/build/spinner.d.ts +10 -1
- package/build/spinner.js +1 -1
- package/build/spinner.mjs +31 -2
- package/build/sto-logo.d.ts +2 -0
- package/build/sto-logo.js +1 -0
- package/build/sto-logo.mjs +53 -0
- package/build/storebrand-logo.d.ts +2 -0
- package/build/storebrand-logo.js +1 -0
- package/build/storebrand-logo.mjs +46 -0
- package/build/text-button.d.ts +19 -0
- package/build/text-button.js +1 -0
- package/build/text-button.mjs +36 -0
- package/build/text.d.ts +11 -1
- package/build/text.js +1 -1
- package/build/text.mjs +49 -5
- package/build/theme-setter.d.ts +11 -0
- package/build/theme-setter.js +20 -0
- package/build/theme-setter.mjs +79 -0
- package/build/theme.d.ts +4 -0
- package/build/theme.js +1 -1
- package/build/theme.mjs +13 -8
- package/build/utilities/copy-to-clipboard.d.ts +1 -0
- package/build/utilities/copy-to-clipboard.js +1 -0
- package/build/utilities/copy-to-clipboard.mjs +26 -0
- package/build/utilities/generate-random-id.d.ts +1 -0
- package/build/utilities/generate-random-id.js +1 -0
- package/build/utilities/generate-random-id.mjs +14 -0
- package/build/utilities/scale.d.ts +11 -0
- package/build/utilities/scale.js +1 -0
- package/build/utilities/scale.mjs +13 -0
- package/build/veil.d.ts +3 -0
- package/build/veil.js +1 -0
- package/build/veil.mjs +17 -0
- package/package.json +278 -19
- package/readme.md +14 -12
- package/theme.tsx +133 -27
- package/build/atom-B-bW2QKm.js +0 -1
- package/build/atom-CqxGy6PS.mjs +0 -12
- package/build/box-BdUR8k49.js +0 -1
- package/build/box-DmpGO-yx.mjs +0 -13
- package/build/components/atom.d.ts +0 -10
- package/build/components/box.d.ts +0 -4
- package/build/components/flex.d.ts +0 -7
- package/build/components/gauge.d.ts +0 -6
- package/build/components/skeleton.d.ts +0 -13
- package/build/components/spinner.d.ts +0 -5
- package/build/components/text.d.ts +0 -7
- package/build/flex-C4bEYrMM.mjs +0 -16
- package/build/flex-JFSv9GFG.js +0 -1
- package/build/gauge-C1CypvvD.mjs +0 -41
- package/build/gauge-mog6SjVx.js +0 -1
- package/build/index.d.ts +0 -11
- package/build/index.js +0 -1
- package/build/index.mjs +0 -26
- package/build/skeleton-B5bJ732_.js +0 -1
- package/build/skeleton-C593Afco.mjs +0 -48
- package/build/spinner-BWIY_fuB.mjs +0 -14
- package/build/spinner-Ci3vM4Cv.js +0 -1
- package/build/text-BO7Qt7Lj.js +0 -1
- package/build/text-ZYVNxqac.mjs +0 -39
package/theme.tsx
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {css} from '@kuma-ui/core';
|
|
1
|
+
import {css, cx} from '@kuma-ui/core';
|
|
2
2
|
|
|
3
|
+
export const lightBackgroundColor = '#f8fafc';
|
|
4
|
+
export const darkBackgroundColor = '#0c0d12';
|
|
3
5
|
export const greenColor = '#4ca486';
|
|
4
|
-
|
|
5
6
|
export const font = {
|
|
6
|
-
family: '
|
|
7
|
+
family: 'Inter, sans-serif',
|
|
7
8
|
stylesheet:
|
|
8
9
|
'https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap',
|
|
9
10
|
preconnect: [
|
|
@@ -13,31 +14,49 @@ export const font = {
|
|
|
13
14
|
};
|
|
14
15
|
|
|
15
16
|
const theme = css`
|
|
16
|
-
--
|
|
17
|
-
--
|
|
18
|
-
|
|
19
|
-
--
|
|
20
|
-
--
|
|
21
|
-
|
|
22
|
-
--
|
|
23
|
-
--
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
--
|
|
27
|
-
--
|
|
28
|
-
--
|
|
29
|
-
|
|
30
|
-
--
|
|
31
|
-
--
|
|
32
|
-
--
|
|
33
|
-
|
|
34
|
-
--
|
|
17
|
+
--light-color: #f8fafc;
|
|
18
|
+
--dark-color: #0c0d12;
|
|
19
|
+
|
|
20
|
+
--background-color: var(--light-color);
|
|
21
|
+
--foreground-color: var(--dark-color);
|
|
22
|
+
|
|
23
|
+
--red-color: #be354b;
|
|
24
|
+
--red-color-hover: #c73d56;
|
|
25
|
+
--red-color-light: #e8687d;
|
|
26
|
+
|
|
27
|
+
--yellow-color: #c9ac56;
|
|
28
|
+
--yellow-color-hover: #d1b559;
|
|
29
|
+
--yellow-color-light: #edcd71;
|
|
30
|
+
|
|
31
|
+
--green-color: #52a14b;
|
|
32
|
+
--green-color-hover: #5ea957;
|
|
33
|
+
--green-color-light: #6fb86a;
|
|
34
|
+
|
|
35
|
+
--primary-color: var(--green-color);
|
|
36
|
+
--primary-color-hover: var(--green-color-hover);
|
|
37
|
+
|
|
38
|
+
--secondary-color: #175694;
|
|
39
|
+
--secondary-color-hover: #2c6195;
|
|
40
|
+
--secondary-color-1: #222528;
|
|
41
|
+
--secondary-color-2: #112a37;
|
|
42
|
+
--secondary-color-3: #1e2f35;
|
|
43
|
+
--secondary-color-4: #2c3238;
|
|
35
44
|
|
|
36
45
|
--flash-color: rgba(255, 216, 57, 0.5);
|
|
37
46
|
--font-weight-modifier: 50;
|
|
38
47
|
|
|
39
|
-
|
|
48
|
+
&[data-theme='dark'] {
|
|
40
49
|
--font-weight-modifier: 0;
|
|
50
|
+
|
|
51
|
+
--background-color: var(--dark-color);
|
|
52
|
+
--foreground-color: var(--light-color);
|
|
53
|
+
|
|
54
|
+
--secondary-color: #cce0f0;
|
|
55
|
+
--secondary-color-hover: #fff;
|
|
56
|
+
--secondary-color-1: #edf0f2;
|
|
57
|
+
--secondary-color-2: #e2e6eb;
|
|
58
|
+
--secondary-color-3: #cbcdd0;
|
|
59
|
+
--secondary-color-4: #fff;
|
|
41
60
|
}
|
|
42
61
|
|
|
43
62
|
--accent-font-family: 'Inter', -apple-system, helvetica, arial, sans-serif;
|
|
@@ -45,22 +64,48 @@ const theme = css`
|
|
|
45
64
|
|
|
46
65
|
--gap: 16px;
|
|
47
66
|
|
|
67
|
+
--scale-multiplier: 0.6;
|
|
48
68
|
--quarter-gap: calc(var(--gap) / 4);
|
|
49
69
|
--third-gap: calc(var(--gap) / 3);
|
|
50
70
|
--half-gap: calc(var(--gap) / 2);
|
|
51
|
-
--sesquialteral-gap: calc(var(--gap) * 1.5);
|
|
52
|
-
--double-gap: calc(var(--gap) * 2);
|
|
53
|
-
--triple-gap: calc(var(--gap) * 3);
|
|
54
|
-
--quadruple-gap: calc(var(--gap) * 4);
|
|
71
|
+
--sesquialteral-gap: calc(var(--gap) * (1.5 * var(--scale-multiplier)));
|
|
72
|
+
--double-gap: calc(var(--gap) * (2 * var(--scale-multiplier)));
|
|
73
|
+
--triple-gap: calc(var(--gap) * (3 * var(--scale-multiplier)));
|
|
74
|
+
--quadruple-gap: calc(var(--gap) * (4 * var(--scale-multiplier)));
|
|
55
75
|
|
|
56
76
|
--sidebar-z-index: 424242;
|
|
57
77
|
--modal-z-index: 424243;
|
|
58
78
|
|
|
79
|
+
--page-padding: var(--gap);
|
|
80
|
+
|
|
81
|
+
@media (min-width: 460px) {
|
|
82
|
+
--scale-multiplier: 0.7;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
@media (min-width: 580px) {
|
|
86
|
+
--scale-multiplier: 0.8;
|
|
87
|
+
--page-padding: var(--double-gap);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
@media (min-width: 860px) {
|
|
91
|
+
--scale-multiplier: 1;
|
|
92
|
+
--page-padding: var(--triple-gap);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
--page-width: calc(1080px + (var(--page-padding) * 2));
|
|
96
|
+
--text-width: 780px;
|
|
97
|
+
--content-width: 620px;
|
|
98
|
+
|
|
59
99
|
font-family: var(--font-family);
|
|
60
100
|
font-optical-sizing: auto;
|
|
61
101
|
line-height: normal;
|
|
62
102
|
color: var(--foreground-color);
|
|
63
103
|
|
|
104
|
+
:global(:root) {
|
|
105
|
+
background: var(--background-color);
|
|
106
|
+
scroll-padding-top: 101px;
|
|
107
|
+
}
|
|
108
|
+
|
|
64
109
|
--8px: 0.5rem;
|
|
65
110
|
--9px: 0.5625rem;
|
|
66
111
|
--10px: 0.625rem;
|
|
@@ -128,3 +173,64 @@ export const buttonResetStyles = css`
|
|
|
128
173
|
text-align: right;
|
|
129
174
|
}
|
|
130
175
|
`;
|
|
176
|
+
|
|
177
|
+
export const effectStyles = css`
|
|
178
|
+
--soft-shadow-color: rgba(255, 255, 255, 0.375);
|
|
179
|
+
--hard-shadow-color: rgba(0, 0, 0, 0.075);
|
|
180
|
+
--inset-hard-shadow-color: rgba(0, 0, 0, 0.2);
|
|
181
|
+
--box-shadow-outline-color: #fff;
|
|
182
|
+
--box-shadow-color: rgba(0, 0, 0, 0.25);
|
|
183
|
+
--box-shadow-highlight-color: rgba(255, 255, 255, 0.05);
|
|
184
|
+
--box-shadow-top-highlight-color: var(--box-shadow-highlight-color);
|
|
185
|
+
--box-shadow-inset-color: rgba(0, 0, 0, 0.25);
|
|
186
|
+
--bevel-shadow-offset: 4px;
|
|
187
|
+
--bevel-shadow-color: rgba(0, 0, 0, 0.1);
|
|
188
|
+
--outline-color: rgba(0, 0, 0, 0);
|
|
189
|
+
--outline-width: 0px;
|
|
190
|
+
|
|
191
|
+
:where([data-theme='dark']) & {
|
|
192
|
+
--soft-shadow-color: rgba(0, 0, 0, 0.375);
|
|
193
|
+
--hard-shadow-color: rgba(0, 0, 0, 0.4);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
box-shadow:
|
|
197
|
+
0 0 2px var(--soft-shadow-color),
|
|
198
|
+
0 0 0 1px var(--box-shadow-outline-color),
|
|
199
|
+
0 var(--bevel-shadow-offset) 0 var(--hard-shadow-color),
|
|
200
|
+
inset 0 calc(var(--bevel-shadow-offset) * -1) 0 var(--bevel-shadow-color),
|
|
201
|
+
inset 0 calc((var(--bevel-shadow-offset) + 1px) * -1) 0
|
|
202
|
+
var(--box-shadow-highlight-color),
|
|
203
|
+
0 0 0 var(--outline-width) var(--outline-color);
|
|
204
|
+
|
|
205
|
+
&:before {
|
|
206
|
+
content: '';
|
|
207
|
+
width: 100%;
|
|
208
|
+
height: 100%;
|
|
209
|
+
position: absolute;
|
|
210
|
+
border-radius: var(--border-radius);
|
|
211
|
+
top: 0;
|
|
212
|
+
right: 0;
|
|
213
|
+
bottom: 0;
|
|
214
|
+
left: 0;
|
|
215
|
+
mix-blend-mode: overlay;
|
|
216
|
+
|
|
217
|
+
box-shadow:
|
|
218
|
+
inset 0 0 0 1px var(--box-shadow-color),
|
|
219
|
+
inset 0 2px 0 var(--box-shadow-top-highlight-color),
|
|
220
|
+
inset 0 -2px 0 var(--box-shadow-highlight-color),
|
|
221
|
+
inset 0 1px 0 var(--box-shadow-inset-color),
|
|
222
|
+
inset 0 calc(var(--bevel-shadow-offset) * -1) 0
|
|
223
|
+
var(--inset-hard-shadow-color);
|
|
224
|
+
transition: box-shadow 0.37s;
|
|
225
|
+
}
|
|
226
|
+
`;
|
|
227
|
+
|
|
228
|
+
export const nonInteractiveEffectStyles = cx(
|
|
229
|
+
effectStyles,
|
|
230
|
+
css`
|
|
231
|
+
:where([data-theme='dark']) && {
|
|
232
|
+
--box-shadow-outline-color: #07130e;
|
|
233
|
+
--box-shadow-color: rgba(255, 255, 255, 0.2);
|
|
234
|
+
}
|
|
235
|
+
`
|
|
236
|
+
);
|
package/build/atom-B-bW2QKm.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const m=require("react"),e="div";function o({as:t,reference:r,...n}){return m.createElement(t??e,{...n,ref:r})}exports.Atom=o;exports.defaultAtomElementType=e;
|
package/build/atom-CqxGy6PS.mjs
DELETED
package/build/box-BdUR8k49.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const o=require("./jsx-runtime-BB_1_6y_.js"),r=require("@kuma-ui/core"),n=require("./atom-B-bW2QKm.js");function c({as:e,className:s,...t}){return o.jsxRuntimeExports.jsx(n.Atom,{as:e??"div",...t,className:r.cx("kakadu-components-1846349723",s)})}exports.Box=c;
|
package/build/box-DmpGO-yx.mjs
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { j as s } from "./jsx-runtime-B4hRZ52C.mjs";
|
|
2
|
-
import { cx as t } from "@kuma-ui/core";
|
|
3
|
-
import { A as a } from "./atom-CqxGy6PS.mjs";
|
|
4
|
-
function x({
|
|
5
|
-
as: o,
|
|
6
|
-
className: m,
|
|
7
|
-
...r
|
|
8
|
-
}) {
|
|
9
|
-
return /* @__PURE__ */ s.jsx(a, { as: o ?? "div", ...r, className: t("kakadu-components-1846349723", m) });
|
|
10
|
-
}
|
|
11
|
-
export {
|
|
12
|
-
x as B
|
|
13
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type ElementType, type ComponentPropsWithoutRef, type ComponentRef, type Ref } from 'react';
|
|
2
|
-
export declare const defaultAtomElementType = "div";
|
|
3
|
-
export type AtomElementType = ElementType;
|
|
4
|
-
export type DefaultAtomElementType = typeof defaultAtomElementType;
|
|
5
|
-
export type AtomProperties<Type extends ElementType = DefaultAtomElementType> = ComponentPropsWithoutRef<Type> & {
|
|
6
|
-
readonly as?: Type;
|
|
7
|
-
readonly reference?: Ref<ComponentRef<Type>>;
|
|
8
|
-
readonly className?: string;
|
|
9
|
-
};
|
|
10
|
-
export default function Atom<Type extends ElementType = DefaultAtomElementType>({ as, reference, ...properties }: AtomProperties<Type>): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { type AtomElementType, type AtomProperties } from './atom';
|
|
2
|
-
type BoxProperties<Type extends AtomElementType = 'div'> = AtomProperties<Type>;
|
|
3
|
-
export default function Box<Type extends AtomElementType = 'div'>({ as, className, ...properties }: BoxProperties<Type>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { type AtomElementType, type AtomProperties, type DefaultAtomElementType } from './atom';
|
|
2
|
-
export type FlexProperties<Type extends AtomElementType = DefaultAtomElementType> = AtomProperties<Type> & {
|
|
3
|
-
readonly direction?: 'row' | 'column';
|
|
4
|
-
readonly gap?: 0.25 | 0.375 | 0.5 | 1 | 1.5 | 2;
|
|
5
|
-
readonly alignment?: 'start' | 'center' | 'space-between' | 'end';
|
|
6
|
-
};
|
|
7
|
-
export default function Flex<Type extends AtomElementType = DefaultAtomElementType>({ as, direction, alignment, gap, className, ...properties }: FlexProperties<Type>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { type HTMLAttributes } from 'react';
|
|
2
|
-
type SkeletonProperties = {
|
|
3
|
-
readonly width?: string | number;
|
|
4
|
-
readonly height?: string | number;
|
|
5
|
-
readonly className?: string;
|
|
6
|
-
readonly isAnimated?: boolean;
|
|
7
|
-
} & HTMLAttributes<HTMLDivElement>;
|
|
8
|
-
export declare function SkeletonInstance({ width, height, className, children, isAnimated, ...parameters }: SkeletonProperties): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export default function Skeleton({ lines, isAnimated, }: {
|
|
10
|
-
readonly lines?: number;
|
|
11
|
-
readonly isAnimated?: boolean;
|
|
12
|
-
}): import("react/jsx-runtime").JSX.Element | null;
|
|
13
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { type ElementType } from 'react';
|
|
2
|
-
import { type AtomProperties } from './atom';
|
|
3
|
-
export declare function Heading<Type extends ElementType = 'h1'>({ as, className, ...properties }: AtomProperties<Type>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
export declare const spanStyles: string;
|
|
5
|
-
export declare function Paragraph<Type extends ElementType = 'p'>({ as, className, ...properties }: AtomProperties<Type>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
export declare function Span<Type extends ElementType = 'span'>({ as, className, ...properties }: AtomProperties<Type>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export default function Text<Type extends ElementType = 'div'>({ as, className, ...properties }: AtomProperties<Type>): import("react/jsx-runtime").JSX.Element;
|
package/build/flex-C4bEYrMM.mjs
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { j as s } from "./jsx-runtime-B4hRZ52C.mjs";
|
|
2
|
-
import { cx as m } from "@kuma-ui/core";
|
|
3
|
-
import { A as c, d as u } from "./atom-CqxGy6PS.mjs";
|
|
4
|
-
function x({
|
|
5
|
-
as: a,
|
|
6
|
-
direction: e = "column",
|
|
7
|
-
alignment: n,
|
|
8
|
-
gap: o = 1,
|
|
9
|
-
className: t,
|
|
10
|
-
...k
|
|
11
|
-
}) {
|
|
12
|
-
return /* @__PURE__ */ s.jsx(c, { as: a ?? u, ...k, className: m("kakadu-components-1168981339", e === "column" && "kakadu-components-2635417128", n === "start" && "kakadu-components-3787355519", n === "center" && "kakadu-components-2338096059", n === "space-between" && "kakadu-components-3146198284", n === "end" && "kakadu-components-1431148762", o === 0.25 && "kakadu-components-2276234075", o === 0.375 && "kakadu-components-739568937", o === 0.5 && "kakadu-components-3438335458", o === 1 && "kakadu-components-3993051137", o === 1.5 && "kakadu-components-4186556816", o === 2 && "kakadu-components-1435205015", t) });
|
|
13
|
-
}
|
|
14
|
-
export {
|
|
15
|
-
x as F
|
|
16
|
-
};
|
package/build/flex-JFSv9GFG.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const a=require("./jsx-runtime-BB_1_6y_.js"),u=require("@kuma-ui/core"),n=require("./atom-B-bW2QKm.js");function m({as:t,direction:s="column",alignment:e,gap:o=1,className:c,...k}){return a.jsxRuntimeExports.jsx(n.Atom,{as:t??n.defaultAtomElementType,...k,className:u.cx("kakadu-components-1168981339",s==="column"&&"kakadu-components-2635417128",e==="start"&&"kakadu-components-3787355519",e==="center"&&"kakadu-components-2338096059",e==="space-between"&&"kakadu-components-3146198284",e==="end"&&"kakadu-components-1431148762",o===.25&&"kakadu-components-2276234075",o===.375&&"kakadu-components-739568937",o===.5&&"kakadu-components-3438335458",o===1&&"kakadu-components-3993051137",o===1.5&&"kakadu-components-4186556816",o===2&&"kakadu-components-1435205015",c)})}exports.Flex=m;
|
package/build/gauge-C1CypvvD.mjs
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { j as s } from "./jsx-runtime-B4hRZ52C.mjs";
|
|
2
|
-
import { useMemo as n } from "react";
|
|
3
|
-
import { cx as D } from "@kuma-ui/core";
|
|
4
|
-
const m = {
|
|
5
|
-
/* eslint-disable @typescript-eslint/naming-convention */
|
|
6
|
-
0: ["#D60D43"],
|
|
7
|
-
15: ["#D60D43", "#FFCD45"],
|
|
8
|
-
30: ["#D6460D", "#ffda54"],
|
|
9
|
-
50: ["#D6860D", "#F1DC3B", "#CEE838"],
|
|
10
|
-
65: ["#D6BE0D", "#FFD045", "#6DE838"],
|
|
11
|
-
80: ["#D9E838", "#93E838", "#3EE838"],
|
|
12
|
-
100: ["#55EB62", "#38E99A", "#5EEA52"]
|
|
13
|
-
/* eslint-enable @typescript-eslint/naming-convention */
|
|
14
|
-
}, x = Object.keys(m).map((e) => Number.parseInt(e, 10)).sort((e, t) => t - e);
|
|
15
|
-
function v({
|
|
16
|
-
label: e,
|
|
17
|
-
size: t,
|
|
18
|
-
percentage: c = 0
|
|
19
|
-
}) {
|
|
20
|
-
const a = n(() => Math.max(0, Math.min(100, c)), [c]), d = n(() => a / 100, [a]), o = n(() => {
|
|
21
|
-
for (const r of x)
|
|
22
|
-
if (a >= r)
|
|
23
|
-
return m[r];
|
|
24
|
-
return [];
|
|
25
|
-
}, [a]), l = n(() => o.length, [o]), u = n(() => o.at(0), [o]), i = n(() => o.at(-1), [o]), k = n(() => o.map((r, p) => `${r} ${Math.round(p / l * 100)}%`).join(", "), [o, l]);
|
|
26
|
-
return /* @__PURE__ */ s.jsxs("div", { style: {
|
|
27
|
-
"--percentage": `${a}%`,
|
|
28
|
-
"--percentage-factor": d,
|
|
29
|
-
"--gradient": k,
|
|
30
|
-
"--start-color": u,
|
|
31
|
-
"--end-color": i
|
|
32
|
-
}, role: "meter", "aria-valuenow": a, "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": e, className: D("kakadu-components-361702174", t === "small" && "kakadu-components-3162945807", t === "large" && "kakadu-components-2977513648"), children: [
|
|
33
|
-
a > 0 ? /* @__PURE__ */ s.jsx("div", { className: "kakadu-components-707327569" }) : null,
|
|
34
|
-
/* @__PURE__ */ s.jsx("div", { className: "kakadu-components-3185646656", children: /* @__PURE__ */ s.jsx("div", { className: "kakadu-components-257978560" }) }),
|
|
35
|
-
/* @__PURE__ */ s.jsx("div", { className: "kakadu-components-586099934", children: a }),
|
|
36
|
-
a > 0 && a < 100 ? /* @__PURE__ */ s.jsx("div", { className: "kakadu-components-967240013", children: /* @__PURE__ */ s.jsx("div", { className: "kakadu-components-3225063030" }) }) : null
|
|
37
|
-
] });
|
|
38
|
-
}
|
|
39
|
-
export {
|
|
40
|
-
v as G
|
|
41
|
-
};
|
package/build/gauge-mog6SjVx.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const o=require("./jsx-runtime-BB_1_6y_.js"),t=require("react"),p=require("@kuma-ui/core"),m={0:["#D60D43"],15:["#D60D43","#FFCD45"],30:["#D6460D","#ffda54"],50:["#D6860D","#F1DC3B","#CEE838"],65:["#D6BE0D","#FFD045","#6DE838"],80:["#D9E838","#93E838","#3EE838"],100:["#55EB62","#38E99A","#5EEA52"]},E=Object.keys(m).map(a=>Number.parseInt(a,10)).sort((a,n)=>n-a);function j({label:a,size:n,percentage:c=0}){const e=t.useMemo(()=>Math.max(0,Math.min(100,c)),[c]),i=t.useMemo(()=>e/100,[e]),s=t.useMemo(()=>{for(const r of E)if(e>=r)return m[r];return[]},[e]),u=t.useMemo(()=>s.length,[s]),l=t.useMemo(()=>s.at(0),[s]),d=t.useMemo(()=>s.at(-1),[s]),x=t.useMemo(()=>s.map((r,k)=>`${r} ${Math.round(k/u*100)}%`).join(", "),[s,u]);return o.jsxRuntimeExports.jsxs("div",{style:{"--percentage":`${e}%`,"--percentage-factor":i,"--gradient":x,"--start-color":l,"--end-color":d},role:"meter","aria-valuenow":e,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a,className:p.cx("kakadu-components-361702174",n==="small"&&"kakadu-components-3162945807",n==="large"&&"kakadu-components-2977513648"),children:[e>0?o.jsxRuntimeExports.jsx("div",{className:"kakadu-components-707327569"}):null,o.jsxRuntimeExports.jsx("div",{className:"kakadu-components-3185646656",children:o.jsxRuntimeExports.jsx("div",{className:"kakadu-components-257978560"})}),o.jsxRuntimeExports.jsx("div",{className:"kakadu-components-586099934",children:e}),e>0&&e<100?o.jsxRuntimeExports.jsx("div",{className:"kakadu-components-967240013",children:o.jsxRuntimeExports.jsx("div",{className:"kakadu-components-3225063030"})}):null]})}exports.Gauge=j;
|
package/build/index.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export { default as Atom, defaultAtomElementType } from './components/atom';
|
|
2
|
-
export type { AtomProperties, DefaultAtomElementType } from './components/atom';
|
|
3
|
-
export { default as Box } from './components/box';
|
|
4
|
-
export { default as Flex } from './components/flex';
|
|
5
|
-
export type { FlexProperties } from './components/flex';
|
|
6
|
-
export { default as Text, Heading, Paragraph, Span } from './components/text';
|
|
7
|
-
export { default as Gauge } from './components/gauge';
|
|
8
|
-
export type { GaugeProperties } from './components/gauge';
|
|
9
|
-
export { default as Skeleton, SkeletonInstance } from './components/skeleton';
|
|
10
|
-
export { default as Spinner } from './components/spinner';
|
|
11
|
-
export { default as theme, greenColor, overflowProtectionStyles, buttonResetStyles, } from './theme';
|
package/build/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./atom-B-bW2QKm.js"),r=require("./box-BdUR8k49.js"),l=require("./flex-JFSv9GFG.js"),e=require("./text-BO7Qt7Lj.js"),a=require("./gauge-mog6SjVx.js"),n=require("./skeleton-B5bJ732_.js"),s=require("./spinner-Ci3vM4Cv.js"),t=require("./theme.js");exports.Atom=o.Atom;exports.defaultAtomElementType=o.defaultAtomElementType;exports.Box=r.Box;exports.Flex=l.Flex;exports.Heading=e.Heading;exports.Paragraph=e.Paragraph;exports.Span=e.Span;exports.Text=e.Text;exports.Gauge=a.Gauge;exports.Skeleton=n.Skeleton;exports.SkeletonInstance=n.SkeletonInstance;exports.Spinner=s.Spinner;exports.buttonResetStyles=t.buttonResetStyles;exports.greenColor=t.greenColor;exports.overflowProtectionStyles=t.overflowProtectionStyles;exports.theme=t.default;
|
package/build/index.mjs
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { A as t, d as a } from "./atom-CqxGy6PS.mjs";
|
|
2
|
-
import { B as s } from "./box-DmpGO-yx.mjs";
|
|
3
|
-
import { F as n } from "./flex-C4bEYrMM.mjs";
|
|
4
|
-
import { H as f, P as x, S as l, T as S } from "./text-ZYVNxqac.mjs";
|
|
5
|
-
import { G as g } from "./gauge-C1CypvvD.mjs";
|
|
6
|
-
import { S as i, a as y } from "./skeleton-C593Afco.mjs";
|
|
7
|
-
import { S as P } from "./spinner-BWIY_fuB.mjs";
|
|
8
|
-
import { buttonResetStyles as c, greenColor as h, overflowProtectionStyles as k, default as B } from "./theme.mjs";
|
|
9
|
-
export {
|
|
10
|
-
t as Atom,
|
|
11
|
-
s as Box,
|
|
12
|
-
n as Flex,
|
|
13
|
-
g as Gauge,
|
|
14
|
-
f as Heading,
|
|
15
|
-
x as Paragraph,
|
|
16
|
-
i as Skeleton,
|
|
17
|
-
y as SkeletonInstance,
|
|
18
|
-
l as Span,
|
|
19
|
-
P as Spinner,
|
|
20
|
-
S as Text,
|
|
21
|
-
c as buttonResetStyles,
|
|
22
|
-
a as defaultAtomElementType,
|
|
23
|
-
h as greenColor,
|
|
24
|
-
k as overflowProtectionStyles,
|
|
25
|
-
B as theme
|
|
26
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("./jsx-runtime-BB_1_6y_.js"),c=require("react"),a=require("@kuma-ui/core");function o({width:t,height:s,className:u,children:r,isAnimated:n=!0,...x}){return e.jsxRuntimeExports.jsx("span",{...x,"aria-busy":!0,"aria-role":"progressbar",className:a.cx("kakadu-components-3027005914",n&&"kakadu-components-3311350973",u),style:{width:t,height:s},children:r??e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:" "})})}const i="kakadu-components-3140855657";function m({lines:t=1,isAnimated:s=!0}){const u=c.useMemo(()=>{const r=[];if(t<=1)return r;for(let n=1;n<t;n+=1)r.push(e.jsxRuntimeExports.jsx(o,{width:"100%",height:"1em",isAnimated:s,className:i},n));return r},[t,s]);return t<1?null:t===1?e.jsxRuntimeExports.jsx(o,{width:"100%",height:"1em",isAnimated:s,className:i}):e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[u,e.jsxRuntimeExports.jsx(o,{width:"60%",height:"1em",isAnimated:s,className:i})]})}exports.Skeleton=m;exports.SkeletonInstance=o;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { j as e } from "./jsx-runtime-B4hRZ52C.mjs";
|
|
2
|
-
import { useMemo as c } from "react";
|
|
3
|
-
import { cx as l } from "@kuma-ui/core";
|
|
4
|
-
function a({
|
|
5
|
-
width: t,
|
|
6
|
-
height: r,
|
|
7
|
-
className: o,
|
|
8
|
-
children: s,
|
|
9
|
-
isAnimated: n = !0,
|
|
10
|
-
...m
|
|
11
|
-
}) {
|
|
12
|
-
return /* @__PURE__ */ e.jsx(
|
|
13
|
-
"span",
|
|
14
|
-
{
|
|
15
|
-
...m,
|
|
16
|
-
"aria-busy": !0,
|
|
17
|
-
"aria-role": "progressbar",
|
|
18
|
-
className: l("kakadu-components-3027005914", n && "kakadu-components-3311350973", o),
|
|
19
|
-
style: {
|
|
20
|
-
width: t,
|
|
21
|
-
height: r
|
|
22
|
-
},
|
|
23
|
-
children: s ?? /* @__PURE__ */ e.jsx(e.Fragment, { children: " " })
|
|
24
|
-
}
|
|
25
|
-
);
|
|
26
|
-
}
|
|
27
|
-
const u = "kakadu-components-3140855657";
|
|
28
|
-
function x({
|
|
29
|
-
lines: t = 1,
|
|
30
|
-
isAnimated: r = !0
|
|
31
|
-
}) {
|
|
32
|
-
const o = c(() => {
|
|
33
|
-
const s = [];
|
|
34
|
-
if (t <= 1)
|
|
35
|
-
return s;
|
|
36
|
-
for (let n = 1; n < t; n += 1)
|
|
37
|
-
s.push(/* @__PURE__ */ e.jsx(a, { width: "100%", height: "1em", isAnimated: r, className: u }, n));
|
|
38
|
-
return s;
|
|
39
|
-
}, [t, r]);
|
|
40
|
-
return t < 1 ? null : t === 1 ? /* @__PURE__ */ e.jsx(a, { width: "100%", height: "1em", isAnimated: r, className: u }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
41
|
-
o,
|
|
42
|
-
/* @__PURE__ */ e.jsx(a, { width: "60%", height: "1em", isAnimated: r, className: u })
|
|
43
|
-
] });
|
|
44
|
-
}
|
|
45
|
-
export {
|
|
46
|
-
x as S,
|
|
47
|
-
a
|
|
48
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { j as m } from "./jsx-runtime-B4hRZ52C.mjs";
|
|
2
|
-
import { useMemo as r } from "react";
|
|
3
|
-
import { cx as u } from "@kuma-ui/core";
|
|
4
|
-
function l({
|
|
5
|
-
size: o = 18,
|
|
6
|
-
strokeWidth: s = 2.5,
|
|
7
|
-
isAnimated: f = !0
|
|
8
|
-
}) {
|
|
9
|
-
const t = r(() => o / 2, [o]), n = r(() => t - s / 2, [s, t]), e = r(() => 2 * Math.PI * n, [n]), c = r(() => e * 0.33, [e]), a = r(() => e - c, [e, c]), p = r(() => -a / 2, [a]);
|
|
10
|
-
return /* @__PURE__ */ m.jsx("svg", { width: o, height: o, preserveAspectRatio: "xMaxYMax meet", viewBox: `0 0 ${o} ${o}`, fill: "none", className: u("kakadu-components-2940817552", f && "kakadu-components-2073235239"), children: /* @__PURE__ */ m.jsx("circle", { cx: t, cy: t, r: n, stroke: "currentColor", strokeWidth: s, strokeLinecap: "round", strokeDasharray: `${a} ${c}`, strokeDashoffset: p }) });
|
|
11
|
-
}
|
|
12
|
-
export {
|
|
13
|
-
l as S
|
|
14
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const a=require("./jsx-runtime-BB_1_6y_.js"),s=require("react"),x=require("@kuma-ui/core");function p({size:e=18,strokeWidth:t=2.5,isAnimated:i=!0}){const o=s.useMemo(()=>e/2,[e]),n=s.useMemo(()=>o-t/2,[t,o]),r=s.useMemo(()=>2*Math.PI*n,[n]),c=s.useMemo(()=>r*.33,[r]),u=s.useMemo(()=>r-c,[r,c]),m=s.useMemo(()=>-u/2,[u]);return a.jsxRuntimeExports.jsx("svg",{width:e,height:e,preserveAspectRatio:"xMaxYMax meet",viewBox:`0 0 ${e} ${e}`,fill:"none",className:x.cx("kakadu-components-2940817552",i&&"kakadu-components-2073235239"),children:a.jsxRuntimeExports.jsx("circle",{cx:o,cy:o,r:n,stroke:"currentColor",strokeWidth:t,strokeLinecap:"round",strokeDasharray:`${u} ${c}`,strokeDashoffset:m})})}exports.Spinner=p;
|
package/build/text-BO7Qt7Lj.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const n=require("./jsx-runtime-BB_1_6y_.js"),a=require("@kuma-ui/core"),c=require("./theme.js"),o=require("./atom-B-bW2QKm.js");function u({as:s,className:t,...e}){return n.jsxRuntimeExports.jsx(o.Atom,{as:s??"h1",...e,className:a.cx(c.overflowProtectionStyles,"kakadu-components-2934642132",t)})}const r="kakadu-components-1010422083";function m({as:s,className:t,...e}){return n.jsxRuntimeExports.jsx(o.Atom,{as:s??"p",...e,className:a.cx(r,"kakadu-components-2351087175",t)})}function x({as:s,className:t,...e}){return n.jsxRuntimeExports.jsx(o.Atom,{as:s??"span",...e,className:a.cx(r,t)})}function i({as:s,className:t,...e}){return n.jsxRuntimeExports.jsx(o.Atom,{as:s??"div",...e,className:a.cx("kakadu-components-2608978433",t)})}exports.Heading=u;exports.Paragraph=m;exports.Span=x;exports.Text=i;
|
package/build/text-ZYVNxqac.mjs
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { j as n } from "./jsx-runtime-B4hRZ52C.mjs";
|
|
2
|
-
import { cx as t } from "@kuma-ui/core";
|
|
3
|
-
import { overflowProtectionStyles as m } from "./theme.mjs";
|
|
4
|
-
import { A as r } from "./atom-CqxGy6PS.mjs";
|
|
5
|
-
function f({
|
|
6
|
-
as: a,
|
|
7
|
-
className: s,
|
|
8
|
-
...o
|
|
9
|
-
}) {
|
|
10
|
-
return /* @__PURE__ */ n.jsx(r, { as: a ?? "h1", ...o, className: t(m, "kakadu-components-2934642132", s) });
|
|
11
|
-
}
|
|
12
|
-
const e = "kakadu-components-1010422083";
|
|
13
|
-
function x({
|
|
14
|
-
as: a,
|
|
15
|
-
className: s,
|
|
16
|
-
...o
|
|
17
|
-
}) {
|
|
18
|
-
return /* @__PURE__ */ n.jsx(r, { as: a ?? "p", ...o, className: t(e, "kakadu-components-2351087175", s) });
|
|
19
|
-
}
|
|
20
|
-
function k({
|
|
21
|
-
as: a,
|
|
22
|
-
className: s,
|
|
23
|
-
...o
|
|
24
|
-
}) {
|
|
25
|
-
return /* @__PURE__ */ n.jsx(r, { as: a ?? "span", ...o, className: t(e, s) });
|
|
26
|
-
}
|
|
27
|
-
function l({
|
|
28
|
-
as: a,
|
|
29
|
-
className: s,
|
|
30
|
-
...o
|
|
31
|
-
}) {
|
|
32
|
-
return /* @__PURE__ */ n.jsx(r, { as: a ?? "div", ...o, className: t("kakadu-components-2608978433", s) });
|
|
33
|
-
}
|
|
34
|
-
export {
|
|
35
|
-
f as H,
|
|
36
|
-
x as P,
|
|
37
|
-
k as S,
|
|
38
|
-
l as T
|
|
39
|
-
};
|