@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.
Files changed (210) hide show
  1. package/build/aria-text.d.ts +5 -1
  2. package/build/aria-text.js +1 -0
  3. package/build/aria-text.mjs +15 -0
  4. package/build/atom.d.ts +10 -2
  5. package/build/atom.js +1 -1
  6. package/build/atom.mjs +10 -3
  7. package/build/bankid-logo.d.ts +2 -0
  8. package/build/bankid-logo.js +1 -0
  9. package/build/bankid-logo.mjs +43 -0
  10. package/build/box.d.ts +4 -1
  11. package/build/box.js +1 -1
  12. package/build/box.mjs +11 -2
  13. package/build/button-tooltip.d.ts +4 -0
  14. package/build/button-tooltip.js +1 -0
  15. package/build/button-tooltip.mjs +11 -0
  16. package/build/button.d.ts +32 -0
  17. package/build/button.js +1 -0
  18. package/build/button.mjs +69 -0
  19. package/build/card.d.ts +8 -0
  20. package/build/card.js +1 -0
  21. package/build/card.mjs +36 -0
  22. package/build/click-ripples.d.ts +2 -0
  23. package/build/click-ripples.js +1 -0
  24. package/build/click-ripples.mjs +60 -0
  25. package/build/components.css +1 -1
  26. package/build/datum.d.ts +5 -0
  27. package/build/datum.js +1 -0
  28. package/build/datum.mjs +27 -0
  29. package/build/dnb-logo.d.ts +2 -0
  30. package/build/dnb-logo.js +1 -0
  31. package/build/dnb-logo.mjs +31 -0
  32. package/build/dot.d.ts +2 -0
  33. package/build/dot.js +1 -0
  34. package/build/dot.mjs +10 -0
  35. package/build/flex.d.ts +14 -1
  36. package/build/flex.js +1 -1
  37. package/build/flex.mjs +17 -2
  38. package/build/footer.d.ts +3 -0
  39. package/build/footer.js +1 -0
  40. package/build/footer.mjs +65 -0
  41. package/build/gauge.d.ts +6 -1
  42. package/build/gauge.js +1 -1
  43. package/build/gauge.mjs +39 -2
  44. package/build/gjensidige-logo.d.ts +2 -0
  45. package/build/gjensidige-logo.js +1 -0
  46. package/build/gjensidige-logo.mjs +30 -0
  47. package/build/hooks/use-media-query.d.ts +1 -0
  48. package/build/hooks/use-media-query.js +1 -0
  49. package/build/hooks/use-media-query.mjs +20 -0
  50. package/build/hover-gradient.d.ts +5 -0
  51. package/build/hover-gradient.js +1 -0
  52. package/build/hover-gradient.mjs +48 -0
  53. package/build/icon-button.d.ts +13 -0
  54. package/build/icon-button.js +1 -0
  55. package/build/icon-button.mjs +45 -0
  56. package/build/icon.js +1 -0
  57. package/build/icon.mjs +50 -0
  58. package/build/icons/arrow-down.d.ts +2 -0
  59. package/build/icons/arrow-down.js +1 -0
  60. package/build/icons/arrow-down.mjs +24 -0
  61. package/build/icons/caret-down.d.ts +2 -0
  62. package/build/icons/caret-down.js +1 -0
  63. package/build/icons/caret-down.mjs +27 -0
  64. package/build/icons/caret-right.d.ts +2 -0
  65. package/build/icons/caret-right.js +1 -0
  66. package/build/icons/caret-right.mjs +27 -0
  67. package/build/icons/check.d.ts +2 -0
  68. package/build/icons/check.js +1 -0
  69. package/build/icons/check.mjs +27 -0
  70. package/build/icons/chevron-down.d.ts +2 -0
  71. package/build/icons/chevron-down.js +1 -0
  72. package/build/icons/chevron-down.mjs +27 -0
  73. package/build/icons/chevron-up.d.ts +2 -0
  74. package/build/icons/chevron-up.js +1 -0
  75. package/build/icons/chevron-up.mjs +27 -0
  76. package/build/icons/chrome-browser-logo.d.ts +2 -0
  77. package/build/icons/chrome-browser-logo.js +1 -0
  78. package/build/icons/chrome-browser-logo.mjs +24 -0
  79. package/build/icons/copy.d.ts +2 -0
  80. package/build/icons/copy.js +1 -0
  81. package/build/icons/copy.mjs +29 -0
  82. package/build/icons/edge-browser-logo.d.ts +2 -0
  83. package/build/icons/edge-browser-logo.js +1 -0
  84. package/build/icons/edge-browser-logo.mjs +24 -0
  85. package/build/icons/edit.d.ts +2 -0
  86. package/build/icons/edit.js +1 -0
  87. package/build/icons/edit.mjs +27 -0
  88. package/build/icons/exclamation-triangle.d.ts +2 -0
  89. package/build/icons/exclamation-triangle.js +1 -0
  90. package/build/icons/exclamation-triangle.mjs +29 -0
  91. package/build/icons/icon.d.ts +25 -0
  92. package/build/icons/kakadu-guide-glyph.d.ts +2 -0
  93. package/build/icons/kakadu-guide-glyph.js +1 -0
  94. package/build/icons/kakadu-guide-glyph.mjs +24 -0
  95. package/build/icons/kakadu-guide.d.ts +2 -0
  96. package/build/icons/kakadu-guide.js +1 -0
  97. package/build/icons/kakadu-guide.mjs +27 -0
  98. package/build/icons/menu.d.ts +2 -0
  99. package/build/icons/menu.js +1 -0
  100. package/build/icons/menu.mjs +25 -0
  101. package/build/icons/plus.d.ts +2 -0
  102. package/build/icons/plus.js +1 -0
  103. package/build/icons/plus.mjs +27 -0
  104. package/build/icons/test.d.ts +2 -0
  105. package/build/icons/test.js +1 -0
  106. package/build/icons/test.mjs +29 -0
  107. package/build/icons/times.d.ts +2 -0
  108. package/build/icons/times.js +1 -0
  109. package/build/icons/times.mjs +27 -0
  110. package/build/index.html +0 -0
  111. package/build/kakadu-guide-icon.d.ts +3 -0
  112. package/build/kakadu-guide-icon.js +1 -0
  113. package/build/kakadu-guide-icon.mjs +14 -0
  114. package/build/kakadu-guide-logo.d.ts +10 -0
  115. package/build/kakadu-guide-logo.js +1 -0
  116. package/build/kakadu-guide-logo.mjs +59 -0
  117. package/build/kakadu-index-logo.d.ts +2 -0
  118. package/build/kakadu-index-logo.js +1 -0
  119. package/build/kakadu-index-logo.mjs +66 -0
  120. package/build/kakadu-logo.d.ts +2 -0
  121. package/build/kakadu-logo.js +1 -0
  122. package/build/kakadu-logo.mjs +44 -0
  123. package/build/modal.d.ts +28 -0
  124. package/build/modal.js +9 -0
  125. package/build/modal.mjs +1246 -0
  126. package/build/moving-gradients.d.ts +9 -0
  127. package/build/moving-gradients.js +1 -0
  128. package/build/moving-gradients.mjs +86 -0
  129. package/build/moving-stars.d.ts +12 -0
  130. package/build/moving-stars.js +1 -0
  131. package/build/moving-stars.mjs +90 -0
  132. package/build/notice.d.ts +12 -0
  133. package/build/notice.js +1 -0
  134. package/build/notice.mjs +22 -0
  135. package/build/notification.d.ts +17 -0
  136. package/build/notification.js +1 -0
  137. package/build/notification.mjs +84 -0
  138. package/build/revealer.d.ts +20 -0
  139. package/build/revealer.js +1 -0
  140. package/build/revealer.mjs +76 -0
  141. package/build/separator.d.ts +5 -0
  142. package/build/separator.js +1 -0
  143. package/build/separator.mjs +24 -0
  144. package/build/skeleton.d.ts +15 -1
  145. package/build/skeleton.js +1 -1
  146. package/build/skeleton.mjs +38 -3
  147. package/build/sparebank1-logo.d.ts +2 -0
  148. package/build/sparebank1-logo.js +1 -0
  149. package/build/sparebank1-logo.mjs +61 -0
  150. package/build/spinner.d.ts +10 -1
  151. package/build/spinner.js +1 -1
  152. package/build/spinner.mjs +31 -3
  153. package/build/sto-logo.d.ts +2 -0
  154. package/build/sto-logo.js +1 -0
  155. package/build/sto-logo.mjs +53 -0
  156. package/build/storebrand-logo.d.ts +2 -0
  157. package/build/storebrand-logo.js +1 -0
  158. package/build/storebrand-logo.mjs +46 -0
  159. package/build/text-button.d.ts +19 -0
  160. package/build/text-button.js +1 -0
  161. package/build/text-button.mjs +36 -0
  162. package/build/text.d.ts +11 -1
  163. package/build/text.js +1 -1
  164. package/build/text.mjs +49 -5
  165. package/build/theme-setter.d.ts +11 -0
  166. package/build/theme-setter.js +20 -0
  167. package/build/theme-setter.mjs +79 -0
  168. package/build/theme.d.ts +4 -0
  169. package/build/theme.js +1 -1
  170. package/build/theme.mjs +13 -8
  171. package/build/utilities/copy-to-clipboard.d.ts +1 -0
  172. package/build/utilities/copy-to-clipboard.js +1 -0
  173. package/build/utilities/copy-to-clipboard.mjs +26 -0
  174. package/build/utilities/generate-random-id.d.ts +1 -0
  175. package/build/utilities/generate-random-id.js +1 -0
  176. package/build/utilities/generate-random-id.mjs +14 -0
  177. package/build/utilities/scale.d.ts +11 -0
  178. package/build/utilities/scale.js +1 -0
  179. package/build/utilities/scale.mjs +13 -0
  180. package/build/veil.d.ts +3 -0
  181. package/build/veil.js +1 -0
  182. package/build/veil.mjs +17 -0
  183. package/package.json +265 -18
  184. package/readme.md +3 -1
  185. package/theme.tsx +133 -27
  186. package/build/atom-B-bW2QKm.js +0 -1
  187. package/build/atom-CqxGy6PS.mjs +0 -12
  188. package/build/box-4_-REPb0.js +0 -1
  189. package/build/box-Cf22bdCb.mjs +0 -13
  190. package/build/components/aria-text.d.ts +0 -5
  191. package/build/components/atom.d.ts +0 -10
  192. package/build/components/box.d.ts +0 -4
  193. package/build/components/flex.d.ts +0 -7
  194. package/build/components/gauge.d.ts +0 -6
  195. package/build/components/skeleton.d.ts +0 -13
  196. package/build/components/spinner.d.ts +0 -10
  197. package/build/components/text.d.ts +0 -7
  198. package/build/flex-C4bEYrMM.mjs +0 -16
  199. package/build/flex-JFSv9GFG.js +0 -1
  200. package/build/gauge-C1CypvvD.mjs +0 -41
  201. package/build/gauge-mog6SjVx.js +0 -1
  202. package/build/index.d.ts +0 -10
  203. package/build/index.js +0 -1
  204. package/build/index.mjs +0 -39
  205. package/build/skeleton-B5bJ732_.js +0 -1
  206. package/build/skeleton-C593Afco.mjs +0 -48
  207. package/build/spinner-DE_Y3sKH.mjs +0 -33
  208. package/build/spinner-DFfE6tSd.js +0 -1
  209. package/build/text-BO7Qt7Lj.js +0 -1
  210. package/build/text-ZYVNxqac.mjs +0 -39
@@ -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 DefaultAtomElementType, type AtomElementType, type AtomProperties } from './atom';
2
- type BoxProperties<Type extends AtomElementType = DefaultAtomElementType> = AtomProperties<Type>;
3
- export default function Box<Type extends AtomElementType = DefaultAtomElementType>({ 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,6 +0,0 @@
1
- export type GaugeProperties = {
2
- readonly label: string;
3
- readonly size?: 'small' | 'medium' | 'large';
4
- readonly percentage?: number;
5
- };
6
- export default function Gauge({ label, size, percentage }: GaugeProperties): 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,10 +0,0 @@
1
- type SpinnerProperties = {
2
- readonly size?: number;
3
- readonly strokeWidth?: number;
4
- readonly isAnimated?: boolean;
5
- };
6
- export default function Spinner({ size, strokeWidth, isAnimated, }: SpinnerProperties): import("react/jsx-runtime").JSX.Element;
7
- export declare function RevealSpinner({ isVisible, ...properties }: {
8
- readonly isVisible?: boolean;
9
- } & Omit<SpinnerProperties, 'isAnimated'>): import("react/jsx-runtime").JSX.Element;
10
- 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;
@@ -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
- };
@@ -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;
@@ -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
- };
@@ -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,10 +0,0 @@
1
- export { default as Atom, defaultAtomElementType } from './components/atom';
2
- export type { AtomProperties, DefaultAtomElementType } from './components/atom';
3
- export { default as AriaText } from './components/aria-text';
4
- export { default as Box } from './components/box';
5
- export { default as Flex } from './components/flex';
6
- export { default as Text, Heading, Paragraph, Span } from './components/text';
7
- export { default as Gauge } from './components/gauge';
8
- export { default as Skeleton, SkeletonInstance } from './components/skeleton';
9
- export { default as Spinner, RevealSpinner } from './components/spinner';
10
- 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 n=require("./atom-B-bW2QKm.js"),l=require("./jsx-runtime-BB_1_6y_.js"),u=require("@kuma-ui/core"),c=require("./box-4_-REPb0.js"),x=require("./flex-JFSv9GFG.js"),e=require("./text-BO7Qt7Lj.js"),S=require("./gauge-mog6SjVx.js"),o=require("./skeleton-B5bJ732_.js"),r=require("./spinner-DFfE6tSd.js"),t=require("./theme.js"),m="kakadu-components-3440084244";function p({as:a,className:s,...i}){return l.jsxRuntimeExports.jsx(n.Atom,{as:a??"span",...i,className:u.cx(m,s)})}exports.Atom=n.Atom;exports.defaultAtomElementType=n.defaultAtomElementType;exports.Box=c.Box;exports.Flex=x.Flex;exports.Heading=e.Heading;exports.Paragraph=e.Paragraph;exports.Span=e.Span;exports.Text=e.Text;exports.Gauge=S.Gauge;exports.Skeleton=o.Skeleton;exports.SkeletonInstance=o.SkeletonInstance;exports.RevealSpinner=r.RevealSpinner;exports.Spinner=r.Spinner;exports.buttonResetStyles=t.buttonResetStyles;exports.greenColor=t.greenColor;exports.overflowProtectionStyles=t.overflowProtectionStyles;exports.theme=t.default;exports.AriaText=p;
package/build/index.mjs DELETED
@@ -1,39 +0,0 @@
1
- import { A as r } from "./atom-CqxGy6PS.mjs";
2
- import { d as S } from "./atom-CqxGy6PS.mjs";
3
- import { j as a } from "./jsx-runtime-B4hRZ52C.mjs";
4
- import { cx as s } from "@kuma-ui/core";
5
- import { B as c } from "./box-Cf22bdCb.mjs";
6
- import { F as T } from "./flex-C4bEYrMM.mjs";
7
- import { H as k, P as y, S as A, T as R } from "./text-ZYVNxqac.mjs";
8
- import { G as P } from "./gauge-C1CypvvD.mjs";
9
- import { S as v, a as B } from "./skeleton-C593Afco.mjs";
10
- import { R as F, S as G } from "./spinner-DE_Y3sKH.mjs";
11
- import { buttonResetStyles as b, greenColor as w, overflowProtectionStyles as C, default as I } from "./theme.mjs";
12
- const n = "kakadu-components-3440084244";
13
- function f({
14
- as: e,
15
- className: o,
16
- ...t
17
- }) {
18
- return /* @__PURE__ */ a.jsx(r, { as: e ?? "span", ...t, className: s(n, o) });
19
- }
20
- export {
21
- f as AriaText,
22
- r as Atom,
23
- c as Box,
24
- T as Flex,
25
- P as Gauge,
26
- k as Heading,
27
- y as Paragraph,
28
- F as RevealSpinner,
29
- v as Skeleton,
30
- B as SkeletonInstance,
31
- A as Span,
32
- G as Spinner,
33
- R as Text,
34
- b as buttonResetStyles,
35
- S as defaultAtomElementType,
36
- w as greenColor,
37
- C as overflowProtectionStyles,
38
- I as theme
39
- };
@@ -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,33 +0,0 @@
1
- import { j as a } from "./jsx-runtime-B4hRZ52C.mjs";
2
- import { useMemo as o, useState as x, useEffect as d } from "react";
3
- import { cx as f } from "@kuma-ui/core";
4
- function i({
5
- size: e = 18,
6
- strokeWidth: n = 2.5,
7
- isAnimated: c = !0
8
- }) {
9
- const t = o(() => e / 2, [e]), r = o(() => t - n / 2, [n, t]), s = o(() => 2 * Math.PI * r, [r]), u = o(() => s * 0.33, [s]), m = o(() => s - u, [s, u]), p = o(() => -m / 2, [m]);
10
- return /* @__PURE__ */ a.jsx("svg", { width: e, height: e, preserveAspectRatio: "xMaxYMax meet", viewBox: `0 0 ${e} ${e}`, fill: "none", className: f("kakadu-components-2940817552", c && "kakadu-components-2073235239"), children: /* @__PURE__ */ a.jsx("circle", { cx: t, cy: t, r, stroke: "currentColor", strokeWidth: n, strokeLinecap: "round", strokeDasharray: `${m} ${u}`, strokeDashoffset: p }) });
11
- }
12
- function j({
13
- isVisible: e,
14
- ...n
15
- }) {
16
- const [c, t] = x(e);
17
- return d(() => {
18
- if (e)
19
- t(!0);
20
- else {
21
- const r = setTimeout(() => {
22
- t(!1);
23
- }, 370);
24
- return () => {
25
- clearTimeout(r);
26
- };
27
- }
28
- }, [e]), /* @__PURE__ */ a.jsx("div", { className: f("kakadu-components-833895784", e && "kakadu-components-640347989"), children: /* @__PURE__ */ a.jsx(i, { isAnimated: c, ...n }) });
29
- }
30
- export {
31
- j as R,
32
- i as S
33
- };
@@ -1 +0,0 @@
1
- "use strict";const c=require("./jsx-runtime-BB_1_6y_.js"),t=require("react"),i=require("@kuma-ui/core");function x({size:e=18,strokeWidth:s=2.5,isAnimated:u=!0}){const n=t.useMemo(()=>e/2,[e]),o=t.useMemo(()=>n-s/2,[s,n]),r=t.useMemo(()=>2*Math.PI*o,[o]),a=t.useMemo(()=>r*.33,[r]),m=t.useMemo(()=>r-a,[r,a]),p=t.useMemo(()=>-m/2,[m]);return c.jsxRuntimeExports.jsx("svg",{width:e,height:e,preserveAspectRatio:"xMaxYMax meet",viewBox:`0 0 ${e} ${e}`,fill:"none",className:i.cx("kakadu-components-2940817552",u&&"kakadu-components-2073235239"),children:c.jsxRuntimeExports.jsx("circle",{cx:n,cy:n,r:o,stroke:"currentColor",strokeWidth:s,strokeLinecap:"round",strokeDasharray:`${m} ${a}`,strokeDashoffset:p})})}function f({isVisible:e,...s}){const[u,n]=t.useState(e);return t.useEffect(()=>{if(e)n(!0);else{const o=setTimeout(()=>{n(!1)},370);return()=>{clearTimeout(o)}}},[e]),c.jsxRuntimeExports.jsx("div",{className:i.cx("kakadu-components-833895784",e&&"kakadu-components-640347989"),children:c.jsxRuntimeExports.jsx(x,{isAnimated:u,...s})})}exports.RevealSpinner=f;exports.Spinner=x;
@@ -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;
@@ -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
- };