@kakadu/components 0.1.4 → 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 -1
- 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 -1
- 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 -1
- 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 -3
- 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 +265 -18
- package/readme.md +3 -1
- package/theme.tsx +133 -27
- package/build/atom-B-bW2QKm.js +0 -1
- package/build/atom-CqxGy6PS.mjs +0 -12
- package/build/box-4_-REPb0.js +0 -1
- package/build/box-Cf22bdCb.mjs +0 -13
- package/build/components/aria-text.d.ts +0 -5
- 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 -10
- 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 -10
- package/build/index.js +0 -1
- package/build/index.mjs +0 -39
- package/build/skeleton-B5bJ732_.js +0 -1
- package/build/skeleton-C593Afco.mjs +0 -48
- package/build/spinner-DE_Y3sKH.mjs +0 -33
- package/build/spinner-DFfE6tSd.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",
|
|
@@ -33,11 +30,6 @@
|
|
|
33
30
|
"prepublishOnly": "npm test && npm run build"
|
|
34
31
|
},
|
|
35
32
|
"exports": {
|
|
36
|
-
".": {
|
|
37
|
-
"types": "./build/index.d.ts",
|
|
38
|
-
"import": "./build/index.mjs",
|
|
39
|
-
"require": "./build/index.js"
|
|
40
|
-
},
|
|
41
33
|
"./atom": {
|
|
42
34
|
"types": "./build/atom.d.ts",
|
|
43
35
|
"import": "./build/atom.mjs",
|
|
@@ -53,21 +45,146 @@
|
|
|
53
45
|
"import": "./build/box.mjs",
|
|
54
46
|
"require": "./build/box.js"
|
|
55
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
|
+
},
|
|
56
78
|
"./flex": {
|
|
57
79
|
"types": "./build/flex.d.ts",
|
|
58
80
|
"import": "./build/flex.mjs",
|
|
59
81
|
"require": "./build/flex.js"
|
|
60
82
|
},
|
|
61
|
-
"./
|
|
62
|
-
"types": "./build/
|
|
63
|
-
"import": "./build/
|
|
64
|
-
"require": "./build/
|
|
83
|
+
"./footer": {
|
|
84
|
+
"types": "./build/footer.d.ts",
|
|
85
|
+
"import": "./build/footer.mjs",
|
|
86
|
+
"require": "./build/footer.js"
|
|
65
87
|
},
|
|
66
88
|
"./gauge": {
|
|
67
89
|
"types": "./build/gauge.d.ts",
|
|
68
90
|
"import": "./build/gauge.mjs",
|
|
69
91
|
"require": "./build/gauge.js"
|
|
70
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
|
+
},
|
|
71
188
|
"./skeleton": {
|
|
72
189
|
"types": "./build/skeleton.d.ts",
|
|
73
190
|
"import": "./build/skeleton.mjs",
|
|
@@ -78,6 +195,26 @@
|
|
|
78
195
|
"import": "./build/spinner.mjs",
|
|
79
196
|
"require": "./build/spinner.js"
|
|
80
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
|
+
},
|
|
81
218
|
"./theme": {
|
|
82
219
|
"types": "./build/theme.d.ts",
|
|
83
220
|
"import": "./build/theme.mjs",
|
|
@@ -88,6 +225,116 @@
|
|
|
88
225
|
"import": "./build/theme.mjs",
|
|
89
226
|
"require": "./build/theme.js"
|
|
90
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
|
+
},
|
|
91
338
|
"./components.css": "./build/components.css"
|
|
92
339
|
},
|
|
93
340
|
"files": [
|
|
@@ -101,20 +348,20 @@
|
|
|
101
348
|
"**/*.css"
|
|
102
349
|
],
|
|
103
350
|
"peerDependencies": {
|
|
104
|
-
"@kuma-ui/core": "^1.6.
|
|
351
|
+
"@kuma-ui/core": "^1.6.3",
|
|
105
352
|
"react": "^19.0.0",
|
|
106
353
|
"react-dom": "^19.0.0"
|
|
107
354
|
},
|
|
108
355
|
"dependencies": {
|
|
109
|
-
"@kuma-ui/vite": "^1.5.
|
|
356
|
+
"@kuma-ui/vite": "^1.5.1",
|
|
357
|
+
"focus-trap-react": "^11.0.6",
|
|
110
358
|
"next": "^16.0.1"
|
|
111
359
|
},
|
|
112
360
|
"devDependencies": {
|
|
113
361
|
"@chromatic-com/storybook": "^4.1.2",
|
|
114
|
-
"@kuma-ui/core": "^1.6.
|
|
362
|
+
"@kuma-ui/core": "^1.6.3",
|
|
115
363
|
"@storybook/addon-a11y": "^10.0.0",
|
|
116
364
|
"@storybook/addon-docs": "^10.0.0",
|
|
117
|
-
"@storybook/addon-onboarding": "^10.0.0",
|
|
118
365
|
"@storybook/addon-vitest": "^10.0.0",
|
|
119
366
|
"@storybook/nextjs-vite": "^10.0.0",
|
|
120
367
|
"@testing-library/jest-dom": "^6.9.1",
|
package/readme.md
CHANGED
|
@@ -16,10 +16,11 @@ Next, import the base stylesheet in your application’s entry point (for exampl
|
|
|
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}) {
|
|
@@ -27,6 +28,7 @@ export default function Wrapper({children}) {
|
|
|
27
28
|
<div className={theme}>
|
|
28
29
|
<Box>Hello!</Box>
|
|
29
30
|
{children}
|
|
31
|
+
<ThemeSetter />
|
|
30
32
|
</div>
|
|
31
33
|
);
|
|
32
34
|
}
|
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-4_-REPb0.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const n=require("./jsx-runtime-BB_1_6y_.js"),r=require("@kuma-ui/core"),e=require("./atom-B-bW2QKm.js");function u({as:t,className:o,...s}){return n.jsxRuntimeExports.jsx(e.Atom,{as:t??e.defaultAtomElementType,...s,className:r.cx("kakadu-components-1846349723",o)})}exports.Box=u;
|
package/build/box-Cf22bdCb.mjs
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { j as s } from "./jsx-runtime-B4hRZ52C.mjs";
|
|
2
|
-
import { cx as a } from "@kuma-ui/core";
|
|
3
|
-
import { A as r, d as e } from "./atom-CqxGy6PS.mjs";
|
|
4
|
-
function f({
|
|
5
|
-
as: o,
|
|
6
|
-
className: t,
|
|
7
|
-
...m
|
|
8
|
-
}) {
|
|
9
|
-
return /* @__PURE__ */ s.jsx(r, { as: o ?? e, ...m, className: a("kakadu-components-1846349723", t) });
|
|
10
|
-
}
|
|
11
|
-
export {
|
|
12
|
-
f as B
|
|
13
|
-
};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { type AtomElementType, type AtomProperties } from './atom';
|
|
2
|
-
export declare const ariaTextStyles: string;
|
|
3
|
-
type AriaTextProperties<Type extends AtomElementType = 'span'> = AtomProperties<Type>;
|
|
4
|
-
export default function AriaText<Type extends AtomElementType = 'span'>({ as, className, ...properties }: AriaTextProperties<Type>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
export {};
|