@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
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type SVGProps } from 'react';
|
|
2
|
+
export default function scale({ originalWidth, originalHeight, size, width, height, }: {
|
|
3
|
+
readonly originalWidth: number;
|
|
4
|
+
readonly originalHeight: number;
|
|
5
|
+
readonly size?: number;
|
|
6
|
+
readonly width?: SVGProps<SVGSVGElement>['width'];
|
|
7
|
+
readonly height?: SVGProps<SVGSVGElement>['height'];
|
|
8
|
+
}): {
|
|
9
|
+
width: string | number | undefined;
|
|
10
|
+
height: string | number | undefined;
|
|
11
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function m({originalWidth:u,originalHeight:s,size:n,width:e,height:t}){const o=typeof e=="number"?e:void 0,c=typeof t=="number"?t:void 0,r=o&&!c,b=c&&!o,f=n??(r?e:b&&typeof t=="number"?t/s*u:u),l=n??(r&&typeof e=="number"?e/u*s:b?t:s);return{width:f,height:l}}exports.default=m;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
function r({
|
|
2
|
+
originalWidth: s,
|
|
3
|
+
originalHeight: t,
|
|
4
|
+
size: u,
|
|
5
|
+
width: e,
|
|
6
|
+
height: n
|
|
7
|
+
}) {
|
|
8
|
+
const c = typeof e == "number" ? e : void 0, o = typeof n == "number" ? n : void 0, b = c && !o, f = o && !c, m = u ?? (b ? e : f && typeof n == "number" ? n / t * s : s), p = u ?? (b && typeof e == "number" ? e / s * t : f ? n : t);
|
|
9
|
+
return { width: m, height: p };
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
r as default
|
|
13
|
+
};
|
package/build/veil.d.ts
ADDED
package/build/veil.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./jsx-runtime-BB_1_6y_.js"),u=require("react"),n=require("./moving-gradients.js"),o=require("./moving-stars.js"),i=require("./theme-setter.js");function a({hasMovingStars:r=!0}){const t=u.useRef(null),s=i.useIsDarkMode(t);return e.jsxRuntimeExports.jsxs("div",{ref:t,className:"kakadu-components-4115326614",children:[e.jsxRuntimeExports.jsx(n.default,{opacity:s?.1:.2,className:"kakadu-components-947991810"}),r?e.jsxRuntimeExports.jsx(o.default,{opacity:s?.1:.2}):null]})}exports.default=a;
|
package/build/veil.mjs
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { j as o } from "./jsx-runtime-B4hRZ52C.mjs";
|
|
2
|
+
import { useRef as t } from "react";
|
|
3
|
+
import a from "./moving-gradients.mjs";
|
|
4
|
+
import n from "./moving-stars.mjs";
|
|
5
|
+
import { useIsDarkMode as i } from "./theme-setter.mjs";
|
|
6
|
+
function l({
|
|
7
|
+
hasMovingStars: s = !0
|
|
8
|
+
}) {
|
|
9
|
+
const r = t(null), e = i(r);
|
|
10
|
+
return /* @__PURE__ */ o.jsxs("div", { ref: r, className: "kakadu-components-4115326614", children: [
|
|
11
|
+
/* @__PURE__ */ o.jsx(a, { opacity: e ? 0.1 : 0.2, className: "kakadu-components-947991810" }),
|
|
12
|
+
s ? /* @__PURE__ */ o.jsx(n, { opacity: e ? 0.1 : 0.2 }) : null
|
|
13
|
+
] });
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
l as default
|
|
17
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kakadu/components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Kakadu components library",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -14,12 +14,9 @@
|
|
|
14
14
|
"ui",
|
|
15
15
|
"design-system"
|
|
16
16
|
],
|
|
17
|
-
"main": "./build/index.js",
|
|
18
|
-
"module": "./build/index.mjs",
|
|
19
|
-
"types": "./build/index.d.ts",
|
|
20
17
|
"scripts": {
|
|
21
18
|
"dev": "next dev",
|
|
22
|
-
"build": "rm -rf build && vite build && tsc --project tsconfig.build.json --emitDeclarationOnly --outDir build",
|
|
19
|
+
"build": "rm -rf build && vite build && tsc --project tsconfig.build.json --emitDeclarationOnly --outDir build && node move-types.mjs",
|
|
23
20
|
"build:next": "next build",
|
|
24
21
|
"start": "next start",
|
|
25
22
|
"storybook": "storybook dev -p 6006 --no-open",
|
|
@@ -27,39 +24,167 @@
|
|
|
27
24
|
"fix": "xo --fix --prettier",
|
|
28
25
|
"format": "prettier --write .",
|
|
29
26
|
"lint": "tsc --noEmit && xo --prettier",
|
|
30
|
-
"
|
|
27
|
+
"test": "vitest run",
|
|
28
|
+
"test:watch": "vitest",
|
|
29
|
+
"test:coverage": "vitest run --coverage",
|
|
30
|
+
"prepublishOnly": "npm test && npm run build"
|
|
31
31
|
},
|
|
32
32
|
"exports": {
|
|
33
|
-
".": {
|
|
34
|
-
"types": "./build/index.d.ts",
|
|
35
|
-
"import": "./build/index.mjs",
|
|
36
|
-
"require": "./build/index.js"
|
|
37
|
-
},
|
|
38
33
|
"./atom": {
|
|
39
34
|
"types": "./build/atom.d.ts",
|
|
40
35
|
"import": "./build/atom.mjs",
|
|
41
36
|
"require": "./build/atom.js"
|
|
42
37
|
},
|
|
38
|
+
"./aria-text": {
|
|
39
|
+
"types": "./build/aria-text.d.ts",
|
|
40
|
+
"import": "./build/aria-text.mjs",
|
|
41
|
+
"require": "./build/aria-text.js"
|
|
42
|
+
},
|
|
43
43
|
"./box": {
|
|
44
44
|
"types": "./build/box.d.ts",
|
|
45
45
|
"import": "./build/box.mjs",
|
|
46
46
|
"require": "./build/box.js"
|
|
47
47
|
},
|
|
48
|
+
"./button": {
|
|
49
|
+
"types": "./build/button.d.ts",
|
|
50
|
+
"import": "./build/button.mjs",
|
|
51
|
+
"require": "./build/button.js"
|
|
52
|
+
},
|
|
53
|
+
"./button-tooltip": {
|
|
54
|
+
"types": "./build/button-tooltip.d.ts",
|
|
55
|
+
"import": "./build/button-tooltip.mjs",
|
|
56
|
+
"require": "./build/button-tooltip.js"
|
|
57
|
+
},
|
|
58
|
+
"./card": {
|
|
59
|
+
"types": "./build/card.d.ts",
|
|
60
|
+
"import": "./build/card.mjs",
|
|
61
|
+
"require": "./build/card.js"
|
|
62
|
+
},
|
|
63
|
+
"./click-ripples": {
|
|
64
|
+
"types": "./build/click-ripples.d.ts",
|
|
65
|
+
"import": "./build/click-ripples.mjs",
|
|
66
|
+
"require": "./build/click-ripples.js"
|
|
67
|
+
},
|
|
68
|
+
"./datum": {
|
|
69
|
+
"types": "./build/datum.d.ts",
|
|
70
|
+
"import": "./build/datum.mjs",
|
|
71
|
+
"require": "./build/datum.js"
|
|
72
|
+
},
|
|
73
|
+
"./dot": {
|
|
74
|
+
"types": "./build/dot.d.ts",
|
|
75
|
+
"import": "./build/dot.mjs",
|
|
76
|
+
"require": "./build/dot.js"
|
|
77
|
+
},
|
|
48
78
|
"./flex": {
|
|
49
79
|
"types": "./build/flex.d.ts",
|
|
50
80
|
"import": "./build/flex.mjs",
|
|
51
81
|
"require": "./build/flex.js"
|
|
52
82
|
},
|
|
53
|
-
"./
|
|
54
|
-
"types": "./build/
|
|
55
|
-
"import": "./build/
|
|
56
|
-
"require": "./build/
|
|
83
|
+
"./footer": {
|
|
84
|
+
"types": "./build/footer.d.ts",
|
|
85
|
+
"import": "./build/footer.mjs",
|
|
86
|
+
"require": "./build/footer.js"
|
|
57
87
|
},
|
|
58
88
|
"./gauge": {
|
|
59
89
|
"types": "./build/gauge.d.ts",
|
|
60
90
|
"import": "./build/gauge.mjs",
|
|
61
91
|
"require": "./build/gauge.js"
|
|
62
92
|
},
|
|
93
|
+
"./hover-gradient": {
|
|
94
|
+
"types": "./build/hover-gradient.d.ts",
|
|
95
|
+
"import": "./build/hover-gradient.mjs",
|
|
96
|
+
"require": "./build/hover-gradient.js"
|
|
97
|
+
},
|
|
98
|
+
"./icon-button": {
|
|
99
|
+
"types": "./build/icon-button.d.ts",
|
|
100
|
+
"import": "./build/icon-button.mjs",
|
|
101
|
+
"require": "./build/icon-button.js"
|
|
102
|
+
},
|
|
103
|
+
"./kakadu-guide-icon": {
|
|
104
|
+
"types": "./build/kakadu-guide-icon.d.ts",
|
|
105
|
+
"import": "./build/kakadu-guide-icon.mjs",
|
|
106
|
+
"require": "./build/kakadu-guide-icon.js"
|
|
107
|
+
},
|
|
108
|
+
"./kakadu-guide-logo": {
|
|
109
|
+
"types": "./build/kakadu-guide-logo.d.ts",
|
|
110
|
+
"import": "./build/kakadu-guide-logo.mjs",
|
|
111
|
+
"require": "./build/kakadu-guide-logo.js"
|
|
112
|
+
},
|
|
113
|
+
"./kakadu-logo": {
|
|
114
|
+
"types": "./build/kakadu-logo.d.ts",
|
|
115
|
+
"import": "./build/kakadu-logo.mjs",
|
|
116
|
+
"require": "./build/kakadu-logo.js"
|
|
117
|
+
},
|
|
118
|
+
"./kakadu-index-logo": {
|
|
119
|
+
"types": "./build/kakadu-index-logo.d.ts",
|
|
120
|
+
"import": "./build/kakadu-index-logo.mjs",
|
|
121
|
+
"require": "./build/kakadu-index-logo.js"
|
|
122
|
+
},
|
|
123
|
+
"./bankid-logo": {
|
|
124
|
+
"types": "./build/bankid-logo.d.ts",
|
|
125
|
+
"import": "./build/bankid-logo.mjs",
|
|
126
|
+
"require": "./build/bankid-logo.js"
|
|
127
|
+
},
|
|
128
|
+
"./dnb-logo": {
|
|
129
|
+
"types": "./build/dnb-logo.d.ts",
|
|
130
|
+
"import": "./build/dnb-logo.mjs",
|
|
131
|
+
"require": "./build/dnb-logo.js"
|
|
132
|
+
},
|
|
133
|
+
"./gjensidige-logo": {
|
|
134
|
+
"types": "./build/gjensidige-logo.d.ts",
|
|
135
|
+
"import": "./build/gjensidige-logo.mjs",
|
|
136
|
+
"require": "./build/gjensidige-logo.js"
|
|
137
|
+
},
|
|
138
|
+
"./sparebank1-logo": {
|
|
139
|
+
"types": "./build/sparebank1-logo.d.ts",
|
|
140
|
+
"import": "./build/sparebank1-logo.mjs",
|
|
141
|
+
"require": "./build/sparebank1-logo.js"
|
|
142
|
+
},
|
|
143
|
+
"./sto-logo": {
|
|
144
|
+
"types": "./build/sto-logo.d.ts",
|
|
145
|
+
"import": "./build/sto-logo.mjs",
|
|
146
|
+
"require": "./build/sto-logo.js"
|
|
147
|
+
},
|
|
148
|
+
"./storebrand-logo": {
|
|
149
|
+
"types": "./build/storebrand-logo.d.ts",
|
|
150
|
+
"import": "./build/storebrand-logo.mjs",
|
|
151
|
+
"require": "./build/storebrand-logo.js"
|
|
152
|
+
},
|
|
153
|
+
"./modal": {
|
|
154
|
+
"types": "./build/modal.d.ts",
|
|
155
|
+
"import": "./build/modal.mjs",
|
|
156
|
+
"require": "./build/modal.js"
|
|
157
|
+
},
|
|
158
|
+
"./moving-gradients": {
|
|
159
|
+
"types": "./build/moving-gradients.d.ts",
|
|
160
|
+
"import": "./build/moving-gradients.mjs",
|
|
161
|
+
"require": "./build/moving-gradients.js"
|
|
162
|
+
},
|
|
163
|
+
"./moving-stars": {
|
|
164
|
+
"types": "./build/moving-stars.d.ts",
|
|
165
|
+
"import": "./build/moving-stars.mjs",
|
|
166
|
+
"require": "./build/moving-stars.js"
|
|
167
|
+
},
|
|
168
|
+
"./notice": {
|
|
169
|
+
"types": "./build/notice.d.ts",
|
|
170
|
+
"import": "./build/notice.mjs",
|
|
171
|
+
"require": "./build/notice.js"
|
|
172
|
+
},
|
|
173
|
+
"./notification": {
|
|
174
|
+
"types": "./build/notification.d.ts",
|
|
175
|
+
"import": "./build/notification.mjs",
|
|
176
|
+
"require": "./build/notification.js"
|
|
177
|
+
},
|
|
178
|
+
"./revealer": {
|
|
179
|
+
"types": "./build/revealer.d.ts",
|
|
180
|
+
"import": "./build/revealer.mjs",
|
|
181
|
+
"require": "./build/revealer.js"
|
|
182
|
+
},
|
|
183
|
+
"./separator": {
|
|
184
|
+
"types": "./build/separator.d.ts",
|
|
185
|
+
"import": "./build/separator.mjs",
|
|
186
|
+
"require": "./build/separator.js"
|
|
187
|
+
},
|
|
63
188
|
"./skeleton": {
|
|
64
189
|
"types": "./build/skeleton.d.ts",
|
|
65
190
|
"import": "./build/skeleton.mjs",
|
|
@@ -70,6 +195,26 @@
|
|
|
70
195
|
"import": "./build/spinner.mjs",
|
|
71
196
|
"require": "./build/spinner.js"
|
|
72
197
|
},
|
|
198
|
+
"./text": {
|
|
199
|
+
"types": "./build/text.d.ts",
|
|
200
|
+
"import": "./build/text.mjs",
|
|
201
|
+
"require": "./build/text.js"
|
|
202
|
+
},
|
|
203
|
+
"./text-button": {
|
|
204
|
+
"types": "./build/text-button.d.ts",
|
|
205
|
+
"import": "./build/text-button.mjs",
|
|
206
|
+
"require": "./build/text-button.js"
|
|
207
|
+
},
|
|
208
|
+
"./theme-setter": {
|
|
209
|
+
"types": "./build/theme-setter.d.ts",
|
|
210
|
+
"import": "./build/theme-setter.mjs",
|
|
211
|
+
"require": "./build/theme-setter.js"
|
|
212
|
+
},
|
|
213
|
+
"./veil": {
|
|
214
|
+
"types": "./build/veil.d.ts",
|
|
215
|
+
"import": "./build/veil.mjs",
|
|
216
|
+
"require": "./build/veil.js"
|
|
217
|
+
},
|
|
73
218
|
"./theme": {
|
|
74
219
|
"types": "./build/theme.d.ts",
|
|
75
220
|
"import": "./build/theme.mjs",
|
|
@@ -80,6 +225,116 @@
|
|
|
80
225
|
"import": "./build/theme.mjs",
|
|
81
226
|
"require": "./build/theme.js"
|
|
82
227
|
},
|
|
228
|
+
"./icon": {
|
|
229
|
+
"types": "./build/icon.d.ts",
|
|
230
|
+
"import": "./build/icon.mjs",
|
|
231
|
+
"require": "./build/icon.js"
|
|
232
|
+
},
|
|
233
|
+
"./icons/kakadu-guide": {
|
|
234
|
+
"types": "./build/icons/kakadu-guide.d.ts",
|
|
235
|
+
"import": "./build/icons/kakadu-guide.mjs",
|
|
236
|
+
"require": "./build/icons/kakadu-guide.js"
|
|
237
|
+
},
|
|
238
|
+
"./icons/kakadu-guide-glyph": {
|
|
239
|
+
"types": "./build/icons/kakadu-guide-glyph.d.ts",
|
|
240
|
+
"import": "./build/icons/kakadu-guide-glyph.mjs",
|
|
241
|
+
"require": "./build/icons/kakadu-guide-glyph.js"
|
|
242
|
+
},
|
|
243
|
+
"./icons/check": {
|
|
244
|
+
"types": "./build/icons/check.d.ts",
|
|
245
|
+
"import": "./build/icons/check.mjs",
|
|
246
|
+
"require": "./build/icons/check.js"
|
|
247
|
+
},
|
|
248
|
+
"./icons/plus": {
|
|
249
|
+
"types": "./build/icons/plus.d.ts",
|
|
250
|
+
"import": "./build/icons/plus.mjs",
|
|
251
|
+
"require": "./build/icons/plus.js"
|
|
252
|
+
},
|
|
253
|
+
"./icons/times": {
|
|
254
|
+
"types": "./build/icons/times.d.ts",
|
|
255
|
+
"import": "./build/icons/times.mjs",
|
|
256
|
+
"require": "./build/icons/times.js"
|
|
257
|
+
},
|
|
258
|
+
"./icons/chevron-down": {
|
|
259
|
+
"types": "./build/icons/chevron-down.d.ts",
|
|
260
|
+
"import": "./build/icons/chevron-down.mjs",
|
|
261
|
+
"require": "./build/icons/chevron-down.js"
|
|
262
|
+
},
|
|
263
|
+
"./icons/chevron-up": {
|
|
264
|
+
"types": "./build/icons/chevron-up.d.ts",
|
|
265
|
+
"import": "./build/icons/chevron-up.mjs",
|
|
266
|
+
"require": "./build/icons/chevron-up.js"
|
|
267
|
+
},
|
|
268
|
+
"./icons/caret-down": {
|
|
269
|
+
"types": "./build/icons/caret-down.d.ts",
|
|
270
|
+
"import": "./build/icons/caret-down.mjs",
|
|
271
|
+
"require": "./build/icons/caret-down.js"
|
|
272
|
+
},
|
|
273
|
+
"./icons/caret-right": {
|
|
274
|
+
"types": "./build/icons/caret-right.d.ts",
|
|
275
|
+
"import": "./build/icons/caret-right.mjs",
|
|
276
|
+
"require": "./build/icons/caret-right.js"
|
|
277
|
+
},
|
|
278
|
+
"./icons/arrow-down": {
|
|
279
|
+
"types": "./build/icons/arrow-down.d.ts",
|
|
280
|
+
"import": "./build/icons/arrow-down.mjs",
|
|
281
|
+
"require": "./build/icons/arrow-down.js"
|
|
282
|
+
},
|
|
283
|
+
"./icons/edit": {
|
|
284
|
+
"types": "./build/icons/edit.d.ts",
|
|
285
|
+
"import": "./build/icons/edit.mjs",
|
|
286
|
+
"require": "./build/icons/edit.js"
|
|
287
|
+
},
|
|
288
|
+
"./icons/copy": {
|
|
289
|
+
"types": "./build/icons/copy.d.ts",
|
|
290
|
+
"import": "./build/icons/copy.mjs",
|
|
291
|
+
"require": "./build/icons/copy.js"
|
|
292
|
+
},
|
|
293
|
+
"./icons/test": {
|
|
294
|
+
"types": "./build/icons/test.d.ts",
|
|
295
|
+
"import": "./build/icons/test.mjs",
|
|
296
|
+
"require": "./build/icons/test.js"
|
|
297
|
+
},
|
|
298
|
+
"./icons/exclamation-triangle": {
|
|
299
|
+
"types": "./build/icons/exclamation-triangle.d.ts",
|
|
300
|
+
"import": "./build/icons/exclamation-triangle.mjs",
|
|
301
|
+
"require": "./build/icons/exclamation-triangle.js"
|
|
302
|
+
},
|
|
303
|
+
"./icons/chrome-browser-logo": {
|
|
304
|
+
"types": "./build/icons/chrome-browser-logo.d.ts",
|
|
305
|
+
"import": "./build/icons/chrome-browser-logo.mjs",
|
|
306
|
+
"require": "./build/icons/chrome-browser-logo.js"
|
|
307
|
+
},
|
|
308
|
+
"./icons/edge-browser-logo": {
|
|
309
|
+
"types": "./build/icons/edge-browser-logo.d.ts",
|
|
310
|
+
"import": "./build/icons/edge-browser-logo.mjs",
|
|
311
|
+
"require": "./build/icons/edge-browser-logo.js"
|
|
312
|
+
},
|
|
313
|
+
"./icons/menu": {
|
|
314
|
+
"types": "./build/icons/menu.d.ts",
|
|
315
|
+
"import": "./build/icons/menu.mjs",
|
|
316
|
+
"require": "./build/icons/menu.js"
|
|
317
|
+
},
|
|
318
|
+
"./hooks/use-media-query": {
|
|
319
|
+
"types": "./build/hooks/use-media-query.d.ts",
|
|
320
|
+
"import": "./build/hooks/use-media-query.mjs",
|
|
321
|
+
"require": "./build/hooks/use-media-query.js"
|
|
322
|
+
},
|
|
323
|
+
"./utilities/copy-to-clipboard": {
|
|
324
|
+
"types": "./build/utilities/copy-to-clipboard.d.ts",
|
|
325
|
+
"import": "./build/utilities/copy-to-clipboard.mjs",
|
|
326
|
+
"require": "./build/utilities/copy-to-clipboard.js"
|
|
327
|
+
},
|
|
328
|
+
"./utilities/generate-random-id": {
|
|
329
|
+
"types": "./build/utilities/generate-random-id.d.ts",
|
|
330
|
+
"import": "./build/utilities/generate-random-id.mjs",
|
|
331
|
+
"require": "./build/utilities/generate-random-id.js"
|
|
332
|
+
},
|
|
333
|
+
"./utilities/scale": {
|
|
334
|
+
"types": "./build/utilities/scale.d.ts",
|
|
335
|
+
"import": "./build/utilities/scale.mjs",
|
|
336
|
+
"require": "./build/utilities/scale.js"
|
|
337
|
+
},
|
|
83
338
|
"./components.css": "./build/components.css"
|
|
84
339
|
},
|
|
85
340
|
"files": [
|
|
@@ -93,22 +348,25 @@
|
|
|
93
348
|
"**/*.css"
|
|
94
349
|
],
|
|
95
350
|
"peerDependencies": {
|
|
96
|
-
"@kuma-ui/core": "^1.6.
|
|
351
|
+
"@kuma-ui/core": "^1.6.3",
|
|
97
352
|
"react": "^19.0.0",
|
|
98
353
|
"react-dom": "^19.0.0"
|
|
99
354
|
},
|
|
100
355
|
"dependencies": {
|
|
101
|
-
"@kuma-ui/vite": "^1.5.
|
|
356
|
+
"@kuma-ui/vite": "^1.5.1",
|
|
357
|
+
"focus-trap-react": "^11.0.6",
|
|
102
358
|
"next": "^16.0.1"
|
|
103
359
|
},
|
|
104
360
|
"devDependencies": {
|
|
105
361
|
"@chromatic-com/storybook": "^4.1.2",
|
|
106
|
-
"@kuma-ui/core": "^1.6.
|
|
362
|
+
"@kuma-ui/core": "^1.6.3",
|
|
107
363
|
"@storybook/addon-a11y": "^10.0.0",
|
|
108
364
|
"@storybook/addon-docs": "^10.0.0",
|
|
109
|
-
"@storybook/addon-onboarding": "^10.0.0",
|
|
110
365
|
"@storybook/addon-vitest": "^10.0.0",
|
|
111
366
|
"@storybook/nextjs-vite": "^10.0.0",
|
|
367
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
368
|
+
"@testing-library/react": "^16.3.0",
|
|
369
|
+
"@testing-library/user-event": "^14.6.1",
|
|
112
370
|
"@types/node": "^20",
|
|
113
371
|
"@types/react": "^19",
|
|
114
372
|
"@types/react-dom": "^19",
|
|
@@ -118,6 +376,7 @@
|
|
|
118
376
|
"dotenv": "^17.2.3",
|
|
119
377
|
"eslint-config-xo-react": "^0.27.0",
|
|
120
378
|
"eslint-plugin-storybook": "^10.0.0",
|
|
379
|
+
"jsdom": "^27.2.0",
|
|
121
380
|
"playwright": "^1.56.1",
|
|
122
381
|
"prettier": "^3.6.2",
|
|
123
382
|
"react": "^19.2.0",
|
package/readme.md
CHANGED
|
@@ -1,34 +1,36 @@
|
|
|
1
1
|
# Kakadu Components
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/@kakadu/components)
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
7
|
Install the package via npm:
|
|
8
8
|
|
|
9
|
-
```
|
|
9
|
+
```bash
|
|
10
10
|
npm install @kakadu/components
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
Next, import the base stylesheet in your application’s entry point (for example `_app.jsx`):
|
|
14
14
|
|
|
15
|
-
```
|
|
15
|
+
```tsx
|
|
16
16
|
import '@kakadu/components/components.css';
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
Finally, wrap your application with the `theme`. You can start using components right away:
|
|
19
|
+
Finally, wrap your application with the `theme`, and render the `ThemeSetter`. You can start using components right away:
|
|
20
20
|
|
|
21
|
-
```
|
|
21
|
+
```tsx
|
|
22
22
|
import theme from '@kakadu/components/theme';
|
|
23
|
+
import ThemeSetter from '@kakadu/components/theme-setter';
|
|
23
24
|
import Box from '@kakadu/components/box';
|
|
24
25
|
|
|
25
26
|
export default function Wrapper({children}) {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
return (
|
|
28
|
+
<div className={theme}>
|
|
29
|
+
<Box>Hello!</Box>
|
|
30
|
+
{children}
|
|
31
|
+
<ThemeSetter />
|
|
32
|
+
</div>
|
|
33
|
+
);
|
|
32
34
|
}
|
|
33
35
|
```
|
|
34
36
|
|
|
@@ -47,5 +49,5 @@ Once started, open [http://localhost:6006](http://localhost:6006) in your browse
|
|
|
47
49
|
## Publishing and release
|
|
48
50
|
|
|
49
51
|
1. Commit your changes.
|
|
50
|
-
2. Depending on the changeset, run `npm version major|minor|patch`.
|
|
52
|
+
2. Depending on the changeset, run `npm version major|minor|patch`.
|
|
51
53
|
3. Run `npm publish`.
|