@dnanpm/ui-components 0.1.0 → 0.2.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/README.md +2 -2
- package/dist/components/Accordion/Accordion.cjs +9 -3
- package/dist/components/Accordion/Accordion.cjs.map +1 -1
- package/dist/components/Accordion/Accordion.d.ts +1 -1
- package/dist/components/Accordion/Accordion.d.ts.map +1 -1
- package/dist/components/Accordion/Accordion.js +10 -4
- package/dist/components/Accordion/Accordion.js.map +1 -1
- package/dist/components/Accordion/Accordion.types.d.ts +2 -2
- package/dist/components/Accordion/Accordion.types.d.ts.map +1 -1
- package/dist/components/AccordionItem/AccordionItem.cjs +43 -43
- package/dist/components/AccordionItem/AccordionItem.cjs.map +1 -1
- package/dist/components/AccordionItem/AccordionItem.css +19 -19
- package/dist/components/AccordionItem/AccordionItem.d.ts +1 -1
- package/dist/components/AccordionItem/AccordionItem.d.ts.map +1 -1
- package/dist/components/AccordionItem/AccordionItem.js +43 -43
- package/dist/components/AccordionItem/AccordionItem.js.map +1 -1
- package/dist/components/AccordionItem/AccordionItem.module.css.cjs +11 -11
- package/dist/components/AccordionItem/AccordionItem.module.css.js +11 -11
- package/dist/components/AccordionItem/AccordionItem.types.d.ts +2 -2
- package/dist/components/AccordionItem/AccordionItem.types.d.ts.map +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.cjs +4 -5
- package/dist/components/Breadcrumb/Breadcrumb.cjs.map +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.css +15 -14
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.d.ts.map +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.js +4 -5
- package/dist/components/Breadcrumb/Breadcrumb.js.map +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.module.css.cjs +6 -6
- package/dist/components/Breadcrumb/Breadcrumb.module.css.js +6 -6
- package/dist/components/Breadcrumb/Breadcrumb.types.d.ts +1 -5
- package/dist/components/Breadcrumb/Breadcrumb.types.d.ts.map +1 -1
- package/dist/components/Button/Button.cjs +104 -0
- package/dist/components/Button/Button.cjs.map +1 -0
- package/dist/components/Button/Button.css +182 -0
- package/dist/components/Button/Button.d.ts +3 -0
- package/dist/components/Button/Button.d.ts.map +1 -0
- package/dist/components/Button/Button.js +104 -0
- package/dist/components/Button/Button.js.map +1 -0
- package/dist/components/Button/Button.module.css.cjs +24 -0
- package/dist/components/Button/Button.module.css.cjs.map +1 -0
- package/dist/components/Button/Button.module.css.js +24 -0
- package/dist/components/Button/Button.module.css.js.map +1 -0
- package/dist/components/Button/Button.types.d.ts +84 -0
- package/dist/components/Button/Button.types.d.ts.map +1 -0
- package/dist/components/Button/index.d.ts +3 -0
- package/dist/components/Button/index.d.ts.map +1 -0
- package/dist/components/ColorScheme/ColorScheme.cjs +9 -0
- package/dist/components/ColorScheme/ColorScheme.cjs.map +1 -0
- package/dist/components/ColorScheme/ColorScheme.d.ts +3 -0
- package/dist/components/ColorScheme/ColorScheme.d.ts.map +1 -0
- package/dist/components/ColorScheme/ColorScheme.js +9 -0
- package/dist/components/ColorScheme/ColorScheme.js.map +1 -0
- package/dist/components/ColorScheme/ColorScheme.types.d.ts +10 -0
- package/dist/components/ColorScheme/ColorScheme.types.d.ts.map +1 -0
- package/dist/components/ColorScheme/index.d.ts +3 -0
- package/dist/components/ColorScheme/index.d.ts.map +1 -0
- package/dist/components/Label/Label.cjs +2 -4
- package/dist/components/Label/Label.cjs.map +1 -1
- package/dist/components/Label/Label.css +15 -17
- package/dist/components/Label/Label.d.ts +1 -1
- package/dist/components/Label/Label.d.ts.map +1 -1
- package/dist/components/Label/Label.js +2 -4
- package/dist/components/Label/Label.js.map +1 -1
- package/dist/components/Label/Label.module.css.cjs +7 -7
- package/dist/components/Label/Label.module.css.js +7 -7
- package/dist/components/Label/Label.types.d.ts +1 -5
- package/dist/components/Label/Label.types.d.ts.map +1 -1
- package/dist/components/Notification/Notification.cjs +5 -6
- package/dist/components/Notification/Notification.cjs.map +1 -1
- package/dist/components/Notification/Notification.css +18 -19
- package/dist/components/Notification/Notification.d.ts +1 -1
- package/dist/components/Notification/Notification.d.ts.map +1 -1
- package/dist/components/Notification/Notification.js +5 -6
- package/dist/components/Notification/Notification.js.map +1 -1
- package/dist/components/Notification/Notification.module.css.cjs +9 -9
- package/dist/components/Notification/Notification.module.css.js +9 -9
- package/dist/components/Notification/Notification.types.d.ts +1 -1
- package/dist/components/Notification/Notification.types.d.ts.map +1 -1
- package/dist/components/Spinner/Spinner.cjs +62 -0
- package/dist/components/Spinner/Spinner.cjs.map +1 -0
- package/dist/components/Spinner/Spinner.css +116 -0
- package/dist/components/Spinner/Spinner.d.ts +3 -0
- package/dist/components/Spinner/Spinner.d.ts.map +1 -0
- package/dist/components/Spinner/Spinner.js +62 -0
- package/dist/components/Spinner/Spinner.js.map +1 -0
- package/dist/components/Spinner/Spinner.module.css.cjs +26 -0
- package/dist/components/Spinner/Spinner.module.css.cjs.map +1 -0
- package/dist/components/Spinner/Spinner.module.css.js +26 -0
- package/dist/components/Spinner/Spinner.module.css.js.map +1 -0
- package/dist/components/Spinner/Spinner.types.d.ts +41 -0
- package/dist/components/Spinner/Spinner.types.d.ts.map +1 -0
- package/dist/components/Spinner/index.d.ts +3 -0
- package/dist/components/Spinner/index.d.ts.map +1 -0
- package/dist/index.cjs +6 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/styles/utils/elevation.css +7 -7
- package/dist/styles/utils/elevation.module.css.cjs +1 -1
- package/dist/styles/utils/elevation.module.css.js +1 -1
- package/dist/styles/utils/focus.css +34 -13
- package/dist/styles/utils/focus.module.css.cjs +3 -3
- package/dist/styles/utils/focus.module.css.js +3 -3
- package/dist/styles.css +330 -171
- package/package.json +3 -3
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from "react";
|
|
3
2
|
import { Error, Warning, Check, Info, Close } from "@dnanpm/icons";
|
|
4
3
|
import focusStyles from "../../styles/utils/focus.module.css.js";
|
|
5
4
|
import styles from "./Notification.module.css.js";
|
|
@@ -16,24 +15,25 @@ const variantRoles = {
|
|
|
16
15
|
warning: "alert",
|
|
17
16
|
error: "alert"
|
|
18
17
|
};
|
|
19
|
-
const Notification =
|
|
18
|
+
const Notification = ({
|
|
20
19
|
variant,
|
|
21
20
|
children,
|
|
22
21
|
closable = false,
|
|
23
22
|
onClose,
|
|
24
23
|
closeLabel = "Sulje ilmoitus",
|
|
25
24
|
className,
|
|
25
|
+
ref,
|
|
26
26
|
...props
|
|
27
|
-
}
|
|
27
|
+
}) => {
|
|
28
28
|
const Icon = variantIcons[variant];
|
|
29
29
|
const role = variantRoles[variant];
|
|
30
30
|
return /* @__PURE__ */ jsxs(
|
|
31
31
|
"div",
|
|
32
32
|
{
|
|
33
|
+
...props,
|
|
33
34
|
ref,
|
|
34
35
|
role,
|
|
35
36
|
className: cn(styles.notification, styles[`notification--${variant}`], className),
|
|
36
|
-
...props,
|
|
37
37
|
children: [
|
|
38
38
|
/* @__PURE__ */ jsx("div", { className: styles["notification__icon-container"], children: /* @__PURE__ */ jsx(Icon, { className: styles.notification__icon, "aria-hidden": "true" }) }),
|
|
39
39
|
/* @__PURE__ */ jsx("div", { className: styles.notification__content, children }),
|
|
@@ -50,8 +50,7 @@ const Notification = forwardRef(function Notification2({
|
|
|
50
50
|
]
|
|
51
51
|
}
|
|
52
52
|
);
|
|
53
|
-
}
|
|
54
|
-
Notification.displayName = "Notification";
|
|
53
|
+
};
|
|
55
54
|
export {
|
|
56
55
|
Notification
|
|
57
56
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Notification.js","sources":["../../../src/components/Notification/Notification.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"Notification.js","sources":["../../../src/components/Notification/Notification.tsx"],"sourcesContent":["import type { ComponentType, SVGProps } from 'react';\nimport { Check, Close, Error as ErrorIcon, Info, Warning } from '@dnanpm/icons';\nimport { cn } from '../../utils/cn';\nimport focusStyles from '../../styles/utils/focus.module.css';\nimport styles from './Notification.module.css';\nimport type { NotificationProps, NotificationVariant } from './Notification.types';\n\nconst variantIcons: Record<NotificationVariant, ComponentType<SVGProps<SVGSVGElement>>> = {\n info: Info,\n success: Check,\n warning: Warning,\n error: ErrorIcon,\n};\n\nconst variantRoles: Record<NotificationVariant, 'status' | 'alert'> = {\n info: 'status',\n success: 'status',\n warning: 'alert',\n error: 'alert',\n};\n\nexport const Notification = ({\n variant,\n children,\n closable = false,\n onClose,\n closeLabel = 'Sulje ilmoitus',\n className,\n ref,\n ...props\n}: NotificationProps) => {\n const Icon = variantIcons[variant];\n const role = variantRoles[variant];\n\n return (\n <div\n {...props}\n ref={ref}\n role={role}\n className={cn(styles.notification, styles[`notification--${variant}`], className)}\n >\n <div className={styles['notification__icon-container']}>\n <Icon className={styles.notification__icon} aria-hidden=\"true\" />\n </div>\n <div className={styles.notification__content}>{children}</div>\n {closable && (\n <button\n type=\"button\"\n className={cn(styles.notification__close, focusStyles.focusable)}\n onClick={onClose}\n aria-label={closeLabel}\n >\n <Close aria-hidden=\"true\" />\n </button>\n )}\n </div>\n );\n};\n"],"names":["ErrorIcon"],"mappings":";;;;;AAOA,MAAM,eAAoF;AAAA,EACtF,MAAM;AAAA,EACN,SAAS;AAAA,EACT,SAAS;AAAA,EACT,OAAOA;AACX;AAEA,MAAM,eAAgE;AAAA,EAClE,MAAM;AAAA,EACN,SAAS;AAAA,EACT,SAAS;AAAA,EACT,OAAO;AACX;AAEO,MAAM,eAAe,CAAC;AAAA,EACzB;AAAA,EACA;AAAA,EACA,WAAW;AAAA,EACX;AAAA,EACA,aAAa;AAAA,EACb;AAAA,EACA;AAAA,EACA,GAAG;AACP,MAAyB;AACrB,QAAM,OAAO,aAAa,OAAO;AACjC,QAAM,OAAO,aAAa,OAAO;AAEjC,SACI;AAAA,IAAC;AAAA,IAAA;AAAA,MACI,GAAG;AAAA,MACJ;AAAA,MACA;AAAA,MACA,WAAW,GAAG,OAAO,cAAc,OAAO,iBAAiB,OAAO,EAAE,GAAG,SAAS;AAAA,MAEhF,UAAA;AAAA,QAAA,oBAAC,OAAA,EAAI,WAAW,OAAO,8BAA8B,GACjD,UAAA,oBAAC,MAAA,EAAK,WAAW,OAAO,oBAAoB,eAAY,OAAA,CAAO,GACnE;AAAA,QACA,oBAAC,OAAA,EAAI,WAAW,OAAO,uBAAwB,UAAS;AAAA,QACvD,YACG;AAAA,UAAC;AAAA,UAAA;AAAA,YACG,MAAK;AAAA,YACL,WAAW,GAAG,OAAO,qBAAqB,YAAY,SAAS;AAAA,YAC/D,SAAS;AAAA,YACT,cAAY;AAAA,YAEZ,UAAA,oBAAC,OAAA,EAAM,eAAY,OAAA,CAAO;AAAA,UAAA;AAAA,QAAA;AAAA,MAC9B;AAAA,IAAA;AAAA,EAAA;AAIhB;"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
require('./Notification.css');
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
4
|
-
const notification = "
|
|
5
|
-
const notification__icon = "
|
|
6
|
-
const notification__content = "
|
|
7
|
-
const notification__close = "
|
|
4
|
+
const notification = "_notification_5h3rs_8";
|
|
5
|
+
const notification__icon = "_notification__icon_5h3rs_36";
|
|
6
|
+
const notification__content = "_notification__content_5h3rs_59";
|
|
7
|
+
const notification__close = "_notification__close_5h3rs_69";
|
|
8
8
|
const styles = {
|
|
9
9
|
notification,
|
|
10
|
-
"notification--info": "_notification--
|
|
11
|
-
"notification--success": "_notification--
|
|
12
|
-
"notification--warning": "_notification--
|
|
13
|
-
"notification--error": "_notification--
|
|
14
|
-
"notification__icon-container": "_notification__icon-
|
|
10
|
+
"notification--info": "_notification--info_5h3rs_19",
|
|
11
|
+
"notification--success": "_notification--success_5h3rs_23",
|
|
12
|
+
"notification--warning": "_notification--warning_5h3rs_27",
|
|
13
|
+
"notification--error": "_notification--error_5h3rs_31",
|
|
14
|
+
"notification__icon-container": "_notification__icon-container_5h3rs_36",
|
|
15
15
|
notification__icon,
|
|
16
16
|
notification__content,
|
|
17
17
|
notification__close
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import './Notification.css';
|
|
2
|
-
const notification = "
|
|
3
|
-
const notification__icon = "
|
|
4
|
-
const notification__content = "
|
|
5
|
-
const notification__close = "
|
|
2
|
+
const notification = "_notification_5h3rs_8";
|
|
3
|
+
const notification__icon = "_notification__icon_5h3rs_36";
|
|
4
|
+
const notification__content = "_notification__content_5h3rs_59";
|
|
5
|
+
const notification__close = "_notification__close_5h3rs_69";
|
|
6
6
|
const styles = {
|
|
7
7
|
notification,
|
|
8
|
-
"notification--info": "_notification--
|
|
9
|
-
"notification--success": "_notification--
|
|
10
|
-
"notification--warning": "_notification--
|
|
11
|
-
"notification--error": "_notification--
|
|
12
|
-
"notification__icon-container": "_notification__icon-
|
|
8
|
+
"notification--info": "_notification--info_5h3rs_19",
|
|
9
|
+
"notification--success": "_notification--success_5h3rs_23",
|
|
10
|
+
"notification--warning": "_notification--warning_5h3rs_27",
|
|
11
|
+
"notification--error": "_notification--error_5h3rs_31",
|
|
12
|
+
"notification__icon-container": "_notification__icon-container_5h3rs_36",
|
|
13
13
|
notification__icon,
|
|
14
14
|
notification__content,
|
|
15
15
|
notification__close
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type * as React from 'react';
|
|
2
2
|
export type NotificationVariant = 'info' | 'success' | 'warning' | 'error';
|
|
3
|
-
interface NotificationBaseProps extends Omit<React.
|
|
3
|
+
interface NotificationBaseProps extends Omit<React.ComponentPropsWithRef<'div'>, 'children'> {
|
|
4
4
|
/**
|
|
5
5
|
* Visual variant determining the color and icon.
|
|
6
6
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Notification.types.d.ts","sourceRoot":"","sources":["../../../src/components/Notification/Notification.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAEpC,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AAE3E,UAAU,qBAAsB,SAAQ,IAAI,CAAC,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"Notification.types.d.ts","sourceRoot":"","sources":["../../../src/components/Notification/Notification.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAEpC,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AAE3E,UAAU,qBAAsB,SAAQ,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC;IACxF;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,mBAAmB,CAAC;IACtC;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CACtC;AAED,UAAU,yBAA0B,SAAQ,qBAAqB;IAC7D;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC;IACxB;;;;OAIG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC;IAC7B;;OAEG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,UAAU,uBAAwB,SAAQ,qBAAqB;IAC3D;;;OAGG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC;IAC1B,QAAQ,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC;IACzB,QAAQ,CAAC,UAAU,CAAC,EAAE,KAAK,CAAC;CAC/B;AAED,MAAM,MAAM,iBAAiB,GAAG,yBAAyB,GAAG,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const Spinner_module = require("./Spinner.module.css.cjs");
|
|
5
|
+
const cn = require("../../utils/cn/cn.cjs");
|
|
6
|
+
const CAR_DASH = "71 212";
|
|
7
|
+
const Spinner = ({
|
|
8
|
+
color = "primary",
|
|
9
|
+
size = "m",
|
|
10
|
+
className,
|
|
11
|
+
ref,
|
|
12
|
+
role = "status",
|
|
13
|
+
"aria-label": ariaLabel = "Ladataan",
|
|
14
|
+
...props
|
|
15
|
+
}) => {
|
|
16
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
17
|
+
"svg",
|
|
18
|
+
{
|
|
19
|
+
...props,
|
|
20
|
+
ref,
|
|
21
|
+
viewBox: "0 0 100 100",
|
|
22
|
+
role,
|
|
23
|
+
"aria-label": ariaLabel,
|
|
24
|
+
className: cn.cn(
|
|
25
|
+
Spinner_module.default.spinner,
|
|
26
|
+
Spinner_module.default[`spinner--${color}`],
|
|
27
|
+
Spinner_module.default[`spinner--${size}`],
|
|
28
|
+
className
|
|
29
|
+
),
|
|
30
|
+
children: [
|
|
31
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
32
|
+
"circle",
|
|
33
|
+
{
|
|
34
|
+
className: Spinner_module.default.spinner__track,
|
|
35
|
+
cx: "50",
|
|
36
|
+
cy: "50",
|
|
37
|
+
r: "45",
|
|
38
|
+
fill: "none",
|
|
39
|
+
stroke: "currentColor",
|
|
40
|
+
strokeWidth: "10"
|
|
41
|
+
}
|
|
42
|
+
),
|
|
43
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
44
|
+
"circle",
|
|
45
|
+
{
|
|
46
|
+
className: Spinner_module.default.spinner__car,
|
|
47
|
+
cx: "50",
|
|
48
|
+
cy: "50",
|
|
49
|
+
r: "45",
|
|
50
|
+
fill: "none",
|
|
51
|
+
stroke: "currentColor",
|
|
52
|
+
strokeWidth: "10",
|
|
53
|
+
strokeDasharray: CAR_DASH,
|
|
54
|
+
strokeLinecap: "round"
|
|
55
|
+
}
|
|
56
|
+
)
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
};
|
|
61
|
+
exports.Spinner = Spinner;
|
|
62
|
+
//# sourceMappingURL=Spinner.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Spinner.cjs","sources":["../../../src/components/Spinner/Spinner.tsx"],"sourcesContent":["import { cn } from '../../utils/cn';\nimport styles from './Spinner.module.css';\nimport type { SpinnerProps } from './Spinner.types';\n\n/**\n * Circumference of a circle with r=45 in a 100×100 viewBox: 2π × 45 ≈ 282.74.\n * The \"car\" arc covers ~25 % of the circumference (~70.69); the gap fills the rest (~212.06).\n */\nconst CAR_DASH = '71 212';\n\nexport const Spinner = ({\n color = 'primary',\n size = 'm',\n className,\n ref,\n role = 'status',\n 'aria-label': ariaLabel = 'Ladataan',\n ...props\n}: SpinnerProps) => {\n return (\n <svg\n {...props}\n ref={ref}\n viewBox=\"0 0 100 100\"\n role={role}\n aria-label={ariaLabel}\n className={cn(\n styles.spinner,\n styles[`spinner--${color}`],\n styles[`spinner--${size}`],\n className,\n )}\n >\n {/* Track: full ring at 40 % opacity */}\n <circle\n className={styles.spinner__track}\n cx=\"50\"\n cy=\"50\"\n r=\"45\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"10\"\n />\n {/* Car: partial arc that rotates continuously */}\n <circle\n className={styles.spinner__car}\n cx=\"50\"\n cy=\"50\"\n r=\"45\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"10\"\n strokeDasharray={CAR_DASH}\n strokeLinecap=\"round\"\n />\n </svg>\n );\n};\n"],"names":["jsxs","cn","styles","jsx"],"mappings":";;;;;AAQA,MAAM,WAAW;AAEV,MAAM,UAAU,CAAC;AAAA,EACpB,QAAQ;AAAA,EACR,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP,cAAc,YAAY;AAAA,EAC1B,GAAG;AACP,MAAoB;AAChB,SACIA,2BAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACI,GAAG;AAAA,MACJ;AAAA,MACA,SAAQ;AAAA,MACR;AAAA,MACA,cAAY;AAAA,MACZ,WAAWC,GAAAA;AAAAA,QACPC,eAAAA,QAAO;AAAA,QACPA,eAAAA,QAAO,YAAY,KAAK,EAAE;AAAA,QAC1BA,eAAAA,QAAO,YAAY,IAAI,EAAE;AAAA,QACzB;AAAA,MAAA;AAAA,MAIJ,UAAA;AAAA,QAAAC,2BAAAA;AAAAA,UAAC;AAAA,UAAA;AAAA,YACG,WAAWD,eAAAA,QAAO;AAAA,YAClB,IAAG;AAAA,YACH,IAAG;AAAA,YACH,GAAE;AAAA,YACF,MAAK;AAAA,YACL,QAAO;AAAA,YACP,aAAY;AAAA,UAAA;AAAA,QAAA;AAAA,QAGhBC,2BAAAA;AAAAA,UAAC;AAAA,UAAA;AAAA,YACG,WAAWD,eAAAA,QAAO;AAAA,YAClB,IAAG;AAAA,YACH,IAAG;AAAA,YACH,GAAE;AAAA,YACF,MAAK;AAAA,YACL,QAAO;AAAA,YACP,aAAY;AAAA,YACZ,iBAAiB;AAAA,YACjB,eAAc;AAAA,UAAA;AAAA,QAAA;AAAA,MAClB;AAAA,IAAA;AAAA,EAAA;AAGZ;;"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
@layer dna-design-system {/* ─────────────────────────────────────────────────────────────
|
|
2
|
+
Spinner — base
|
|
3
|
+
───────────────────────────────────────────────────────────── */
|
|
4
|
+
|
|
5
|
+
._spinner_j28th_5 {
|
|
6
|
+
/*
|
|
7
|
+
* Internal custom property that carries the animation duration.
|
|
8
|
+
* Each size class below overrides it; the .car rule consumes it.
|
|
9
|
+
* The default matches the medium (m) size.
|
|
10
|
+
*/
|
|
11
|
+
--_spinner-duration: 0.8s;
|
|
12
|
+
|
|
13
|
+
display: inline-block;
|
|
14
|
+
flex-shrink: 0;
|
|
15
|
+
overflow: visible;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/* ─────────────────────────────────────────────────────────────
|
|
19
|
+
Color variants
|
|
20
|
+
Token: foreground color of both the track and the car.
|
|
21
|
+
The track uses the same color at 40 % opacity (see .track).
|
|
22
|
+
───────────────────────────────────────────────────────────── */
|
|
23
|
+
|
|
24
|
+
._spinner--primary_j28th_24 {
|
|
25
|
+
color: var(--color-semantic-foreground-primary-strong);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
._spinner--secondary_j28th_28 {
|
|
29
|
+
color: var(--color-semantic-foreground-secondary-strong);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
._spinner--inverse_j28th_32 {
|
|
33
|
+
color: var(--color-semantic-foreground-inverse);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
._spinner--inherit_j28th_36 {
|
|
37
|
+
color: inherit;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* ─────────────────────────────────────────────────────────────
|
|
41
|
+
Size variants
|
|
42
|
+
XS → 0.6 s | S → 0.7 s | M → 0.8 s | L → 0.9 s | XL → 1.0 s
|
|
43
|
+
───────────────────────────────────────────────────────────── */
|
|
44
|
+
|
|
45
|
+
._spinner--xs_j28th_45 {
|
|
46
|
+
width: 20px;
|
|
47
|
+
height: 20px;
|
|
48
|
+
--_spinner-duration: 0.6s;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
._spinner--s_j28th_28 {
|
|
52
|
+
width: 24px;
|
|
53
|
+
height: 24px;
|
|
54
|
+
--_spinner-duration: 0.7s;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
._spinner--m_j28th_57 {
|
|
58
|
+
width: 40px;
|
|
59
|
+
height: 40px;
|
|
60
|
+
--_spinner-duration: 0.8s;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
._spinner--l_j28th_63 {
|
|
64
|
+
width: 64px;
|
|
65
|
+
height: 64px;
|
|
66
|
+
--_spinner-duration: 0.9s;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
._spinner--xl_j28th_69 {
|
|
70
|
+
width: 80px;
|
|
71
|
+
height: 80px;
|
|
72
|
+
--_spinner-duration: 1s;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* ─────────────────────────────────────────────────────────────
|
|
76
|
+
Track — the background ring
|
|
77
|
+
Rendered at 40 % opacity of currentColor.
|
|
78
|
+
───────────────────────────────────────────────────────────── */
|
|
79
|
+
|
|
80
|
+
._spinner__track_j28th_80 {
|
|
81
|
+
opacity: 0.4;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/* ─────────────────────────────────────────────────────────────
|
|
85
|
+
Car — the animated arc that travels around the track
|
|
86
|
+
───────────────────────────────────────────────────────────── */
|
|
87
|
+
|
|
88
|
+
._spinner__car_j28th_88 {
|
|
89
|
+
/*
|
|
90
|
+
* transform-box: fill-box makes transform-origin relative to the
|
|
91
|
+
* element's own bounding box, so "center" correctly refers to the
|
|
92
|
+
* centre of the circle rather than the SVG viewport.
|
|
93
|
+
*/
|
|
94
|
+
transform-box: fill-box;
|
|
95
|
+
transform-origin: center;
|
|
96
|
+
animation: _spinner-rotate_j28th_1 var(--_spinner-duration) linear infinite;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
@keyframes _spinner-rotate_j28th_1 {
|
|
100
|
+
to {
|
|
101
|
+
transform: rotate(360deg);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/* ─────────────────────────────────────────────────────────────
|
|
106
|
+
Reduced-motion preference
|
|
107
|
+
Slow the animation significantly instead of stopping it entirely,
|
|
108
|
+
so the loading state remains perceptible without causing discomfort.
|
|
109
|
+
───────────────────────────────────────────────────────────── */
|
|
110
|
+
|
|
111
|
+
@media (prefers-reduced-motion: reduce) {
|
|
112
|
+
._spinner__car_j28th_88 {
|
|
113
|
+
animation-duration: 3s;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Spinner.d.ts","sourceRoot":"","sources":["../../../src/components/Spinner/Spinner.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAQpD,eAAO,MAAM,OAAO,GAAI,0EAQrB,YAAY,4CAuCd,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import styles from "./Spinner.module.css.js";
|
|
3
|
+
import { cn } from "../../utils/cn/cn.js";
|
|
4
|
+
const CAR_DASH = "71 212";
|
|
5
|
+
const Spinner = ({
|
|
6
|
+
color = "primary",
|
|
7
|
+
size = "m",
|
|
8
|
+
className,
|
|
9
|
+
ref,
|
|
10
|
+
role = "status",
|
|
11
|
+
"aria-label": ariaLabel = "Ladataan",
|
|
12
|
+
...props
|
|
13
|
+
}) => {
|
|
14
|
+
return /* @__PURE__ */ jsxs(
|
|
15
|
+
"svg",
|
|
16
|
+
{
|
|
17
|
+
...props,
|
|
18
|
+
ref,
|
|
19
|
+
viewBox: "0 0 100 100",
|
|
20
|
+
role,
|
|
21
|
+
"aria-label": ariaLabel,
|
|
22
|
+
className: cn(
|
|
23
|
+
styles.spinner,
|
|
24
|
+
styles[`spinner--${color}`],
|
|
25
|
+
styles[`spinner--${size}`],
|
|
26
|
+
className
|
|
27
|
+
),
|
|
28
|
+
children: [
|
|
29
|
+
/* @__PURE__ */ jsx(
|
|
30
|
+
"circle",
|
|
31
|
+
{
|
|
32
|
+
className: styles.spinner__track,
|
|
33
|
+
cx: "50",
|
|
34
|
+
cy: "50",
|
|
35
|
+
r: "45",
|
|
36
|
+
fill: "none",
|
|
37
|
+
stroke: "currentColor",
|
|
38
|
+
strokeWidth: "10"
|
|
39
|
+
}
|
|
40
|
+
),
|
|
41
|
+
/* @__PURE__ */ jsx(
|
|
42
|
+
"circle",
|
|
43
|
+
{
|
|
44
|
+
className: styles.spinner__car,
|
|
45
|
+
cx: "50",
|
|
46
|
+
cy: "50",
|
|
47
|
+
r: "45",
|
|
48
|
+
fill: "none",
|
|
49
|
+
stroke: "currentColor",
|
|
50
|
+
strokeWidth: "10",
|
|
51
|
+
strokeDasharray: CAR_DASH,
|
|
52
|
+
strokeLinecap: "round"
|
|
53
|
+
}
|
|
54
|
+
)
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
};
|
|
59
|
+
export {
|
|
60
|
+
Spinner
|
|
61
|
+
};
|
|
62
|
+
//# sourceMappingURL=Spinner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Spinner.js","sources":["../../../src/components/Spinner/Spinner.tsx"],"sourcesContent":["import { cn } from '../../utils/cn';\nimport styles from './Spinner.module.css';\nimport type { SpinnerProps } from './Spinner.types';\n\n/**\n * Circumference of a circle with r=45 in a 100×100 viewBox: 2π × 45 ≈ 282.74.\n * The \"car\" arc covers ~25 % of the circumference (~70.69); the gap fills the rest (~212.06).\n */\nconst CAR_DASH = '71 212';\n\nexport const Spinner = ({\n color = 'primary',\n size = 'm',\n className,\n ref,\n role = 'status',\n 'aria-label': ariaLabel = 'Ladataan',\n ...props\n}: SpinnerProps) => {\n return (\n <svg\n {...props}\n ref={ref}\n viewBox=\"0 0 100 100\"\n role={role}\n aria-label={ariaLabel}\n className={cn(\n styles.spinner,\n styles[`spinner--${color}`],\n styles[`spinner--${size}`],\n className,\n )}\n >\n {/* Track: full ring at 40 % opacity */}\n <circle\n className={styles.spinner__track}\n cx=\"50\"\n cy=\"50\"\n r=\"45\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"10\"\n />\n {/* Car: partial arc that rotates continuously */}\n <circle\n className={styles.spinner__car}\n cx=\"50\"\n cy=\"50\"\n r=\"45\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"10\"\n strokeDasharray={CAR_DASH}\n strokeLinecap=\"round\"\n />\n </svg>\n );\n};\n"],"names":[],"mappings":";;;AAQA,MAAM,WAAW;AAEV,MAAM,UAAU,CAAC;AAAA,EACpB,QAAQ;AAAA,EACR,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP,cAAc,YAAY;AAAA,EAC1B,GAAG;AACP,MAAoB;AAChB,SACI;AAAA,IAAC;AAAA,IAAA;AAAA,MACI,GAAG;AAAA,MACJ;AAAA,MACA,SAAQ;AAAA,MACR;AAAA,MACA,cAAY;AAAA,MACZ,WAAW;AAAA,QACP,OAAO;AAAA,QACP,OAAO,YAAY,KAAK,EAAE;AAAA,QAC1B,OAAO,YAAY,IAAI,EAAE;AAAA,QACzB;AAAA,MAAA;AAAA,MAIJ,UAAA;AAAA,QAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACG,WAAW,OAAO;AAAA,YAClB,IAAG;AAAA,YACH,IAAG;AAAA,YACH,GAAE;AAAA,YACF,MAAK;AAAA,YACL,QAAO;AAAA,YACP,aAAY;AAAA,UAAA;AAAA,QAAA;AAAA,QAGhB;AAAA,UAAC;AAAA,UAAA;AAAA,YACG,WAAW,OAAO;AAAA,YAClB,IAAG;AAAA,YACH,IAAG;AAAA,YACH,GAAE;AAAA,YACF,MAAK;AAAA,YACL,QAAO;AAAA,YACP,aAAY;AAAA,YACZ,iBAAiB;AAAA,YACjB,eAAc;AAAA,UAAA;AAAA,QAAA;AAAA,MAClB;AAAA,IAAA;AAAA,EAAA;AAGZ;"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
require('./Spinner.css');
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
4
|
+
const spinner = "_spinner_j28th_5";
|
|
5
|
+
const spinner__track = "_spinner__track_j28th_80";
|
|
6
|
+
const spinner__car = "_spinner__car_j28th_88";
|
|
7
|
+
const styles = {
|
|
8
|
+
spinner,
|
|
9
|
+
"spinner--primary": "_spinner--primary_j28th_24",
|
|
10
|
+
"spinner--secondary": "_spinner--secondary_j28th_28",
|
|
11
|
+
"spinner--inverse": "_spinner--inverse_j28th_32",
|
|
12
|
+
"spinner--inherit": "_spinner--inherit_j28th_36",
|
|
13
|
+
"spinner--xs": "_spinner--xs_j28th_45",
|
|
14
|
+
"spinner--s": "_spinner--s_j28th_28",
|
|
15
|
+
"spinner--m": "_spinner--m_j28th_57",
|
|
16
|
+
"spinner--l": "_spinner--l_j28th_63",
|
|
17
|
+
"spinner--xl": "_spinner--xl_j28th_69",
|
|
18
|
+
spinner__track,
|
|
19
|
+
spinner__car,
|
|
20
|
+
"spinner-rotate": "_spinner-rotate_j28th_1"
|
|
21
|
+
};
|
|
22
|
+
exports.default = styles;
|
|
23
|
+
exports.spinner = spinner;
|
|
24
|
+
exports.spinner__car = spinner__car;
|
|
25
|
+
exports.spinner__track = spinner__track;
|
|
26
|
+
//# sourceMappingURL=Spinner.module.css.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Spinner.module.css.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import './Spinner.css';
|
|
2
|
+
const spinner = "_spinner_j28th_5";
|
|
3
|
+
const spinner__track = "_spinner__track_j28th_80";
|
|
4
|
+
const spinner__car = "_spinner__car_j28th_88";
|
|
5
|
+
const styles = {
|
|
6
|
+
spinner,
|
|
7
|
+
"spinner--primary": "_spinner--primary_j28th_24",
|
|
8
|
+
"spinner--secondary": "_spinner--secondary_j28th_28",
|
|
9
|
+
"spinner--inverse": "_spinner--inverse_j28th_32",
|
|
10
|
+
"spinner--inherit": "_spinner--inherit_j28th_36",
|
|
11
|
+
"spinner--xs": "_spinner--xs_j28th_45",
|
|
12
|
+
"spinner--s": "_spinner--s_j28th_28",
|
|
13
|
+
"spinner--m": "_spinner--m_j28th_57",
|
|
14
|
+
"spinner--l": "_spinner--l_j28th_63",
|
|
15
|
+
"spinner--xl": "_spinner--xl_j28th_69",
|
|
16
|
+
spinner__track,
|
|
17
|
+
spinner__car,
|
|
18
|
+
"spinner-rotate": "_spinner-rotate_j28th_1"
|
|
19
|
+
};
|
|
20
|
+
export {
|
|
21
|
+
styles as default,
|
|
22
|
+
spinner,
|
|
23
|
+
spinner__car,
|
|
24
|
+
spinner__track
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=Spinner.module.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Spinner.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ComponentPropsWithRef } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Color variant of the Spinner.
|
|
4
|
+
*
|
|
5
|
+
* - `primary` — Primary brand color. Use on light backgrounds.
|
|
6
|
+
* - `secondary` — Secondary brand color. Use on light backgrounds.
|
|
7
|
+
* - `inverse` — Inverse color. Use on dark or colored backgrounds.
|
|
8
|
+
* - `inherit` — Inherit the current text color from the parent.
|
|
9
|
+
*/
|
|
10
|
+
export type SpinnerColor = 'primary' | 'secondary' | 'inverse' | 'inherit';
|
|
11
|
+
/**
|
|
12
|
+
* Size variant of the Spinner following the T-shirt sizing scale.
|
|
13
|
+
*
|
|
14
|
+
* - `xs` — 20 × 20 px
|
|
15
|
+
* - `s` — 24 × 24 px
|
|
16
|
+
* - `m` — 40 × 40 px
|
|
17
|
+
* - `l` — 64 × 64 px
|
|
18
|
+
* - `xl` — 80 × 80 px
|
|
19
|
+
*/
|
|
20
|
+
export type SpinnerSize = 'xs' | 's' | 'm' | 'l' | 'xl';
|
|
21
|
+
export interface SpinnerProps extends ComponentPropsWithRef<'svg'> {
|
|
22
|
+
/**
|
|
23
|
+
* Color variant determining which design token is used for the spinner color.
|
|
24
|
+
* Use `inherit` to follow the parent's `currentColor`.
|
|
25
|
+
* @default 'primary'
|
|
26
|
+
*/
|
|
27
|
+
readonly color?: SpinnerColor;
|
|
28
|
+
/**
|
|
29
|
+
* Size variant following the T-shirt sizing scale.
|
|
30
|
+
* @default 'm'
|
|
31
|
+
*/
|
|
32
|
+
readonly size?: SpinnerSize;
|
|
33
|
+
/**
|
|
34
|
+
* Accessible label announced to screen readers.
|
|
35
|
+
* Defaults to the Finnish word for "Loading" per the design system convention
|
|
36
|
+
* (ADR-002). Override with a locale-appropriate string when needed.
|
|
37
|
+
* @default 'Ladataan'
|
|
38
|
+
*/
|
|
39
|
+
readonly 'aria-label'?: string;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=Spinner.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Spinner.types.d.ts","sourceRoot":"","sources":["../../../src/components/Spinner/Spinner.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,OAAO,CAAC;AAEnD;;;;;;;GAOG;AACH,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,SAAS,CAAC;AAE3E;;;;;;;;GAQG;AACH,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC;AAExD,MAAM,WAAW,YAAa,SAAQ,qBAAqB,CAAC,KAAK,CAAC;IAC9D;;;;OAIG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,YAAY,CAAC;IAC9B;;;OAGG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,WAAW,CAAC;IAC5B;;;;;OAKG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;CAClC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Spinner/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC"}
|
package/dist/index.cjs
CHANGED
|
@@ -4,13 +4,19 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
4
4
|
const Accordion = require("./components/Accordion/Accordion.cjs");
|
|
5
5
|
const AccordionItem = require("./components/AccordionItem/AccordionItem.cjs");
|
|
6
6
|
const Breadcrumb = require("./components/Breadcrumb/Breadcrumb.cjs");
|
|
7
|
+
const Button = require("./components/Button/Button.cjs");
|
|
8
|
+
const ColorScheme = require("./components/ColorScheme/ColorScheme.cjs");
|
|
7
9
|
const Label = require("./components/Label/Label.cjs");
|
|
8
10
|
const Notification = require("./components/Notification/Notification.cjs");
|
|
11
|
+
const Spinner = require("./components/Spinner/Spinner.cjs");
|
|
9
12
|
const cn = require("./utils/cn/cn.cjs");
|
|
10
13
|
exports.Accordion = Accordion.Accordion;
|
|
11
14
|
exports.AccordionItem = AccordionItem.AccordionItem;
|
|
12
15
|
exports.Breadcrumb = Breadcrumb.Breadcrumb;
|
|
16
|
+
exports.Button = Button.Button;
|
|
17
|
+
exports.ColorScheme = ColorScheme.ColorScheme;
|
|
13
18
|
exports.Label = Label.Label;
|
|
14
19
|
exports.Notification = Notification.Notification;
|
|
20
|
+
exports.Spinner = Spinner.Spinner;
|
|
15
21
|
exports.cn = cn.cn;
|
|
16
22
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
export { Accordion } from './components/Accordion';
|
|
2
2
|
export { AccordionItem } from './components/AccordionItem';
|
|
3
3
|
export { Breadcrumb } from './components/Breadcrumb';
|
|
4
|
+
export { Button } from './components/Button';
|
|
5
|
+
export { ColorScheme } from './components/ColorScheme';
|
|
4
6
|
export { Notification } from './components/Notification';
|
|
5
7
|
export { Label } from './components/Label';
|
|
8
|
+
export { Spinner } from './components/Spinner';
|
|
6
9
|
export type { AccordionProps } from './components/Accordion';
|
|
7
10
|
export type { AccordionItemProps } from './components/AccordionItem';
|
|
8
11
|
export type { BreadcrumbItem, BreadcrumbLinkProps, BreadcrumbProps } from './components/Breadcrumb';
|
|
12
|
+
export type { ButtonProps, ButtonLinkProps, ButtonVariant, ButtonSize } from './components/Button';
|
|
13
|
+
export type { ColorSchemeProps, ColorSchemeValue } from './components/ColorScheme';
|
|
9
14
|
export type { NotificationProps, NotificationVariant } from './components/Notification';
|
|
10
15
|
export type { LabelProps, LabelVariant } from './components/Label';
|
|
16
|
+
export type { SpinnerColor, SpinnerProps, SpinnerSize } from './components/Spinner';
|
|
11
17
|
export { cn } from './utils';
|
|
12
18
|
export type { CnDictionary, CnInput } from './utils';
|
|
13
19
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC;AAG5B,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC;AAG5B,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE/C,YAAY,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,YAAY,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACrE,YAAY,EAAE,cAAc,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AACpG,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACnG,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACnF,YAAY,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AACxF,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACnE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEpF,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAC7B,YAAY,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -2,15 +2,21 @@
|
|
|
2
2
|
import { Accordion } from "./components/Accordion/Accordion.js";
|
|
3
3
|
import { AccordionItem } from "./components/AccordionItem/AccordionItem.js";
|
|
4
4
|
import { Breadcrumb } from "./components/Breadcrumb/Breadcrumb.js";
|
|
5
|
+
import { Button } from "./components/Button/Button.js";
|
|
6
|
+
import { ColorScheme } from "./components/ColorScheme/ColorScheme.js";
|
|
5
7
|
import { Label } from "./components/Label/Label.js";
|
|
6
8
|
import { Notification } from "./components/Notification/Notification.js";
|
|
9
|
+
import { Spinner } from "./components/Spinner/Spinner.js";
|
|
7
10
|
import { cn } from "./utils/cn/cn.js";
|
|
8
11
|
export {
|
|
9
12
|
Accordion,
|
|
10
13
|
AccordionItem,
|
|
11
14
|
Breadcrumb,
|
|
15
|
+
Button,
|
|
16
|
+
ColorScheme,
|
|
12
17
|
Label,
|
|
13
18
|
Notification,
|
|
19
|
+
Spinner,
|
|
14
20
|
cn
|
|
15
21
|
};
|
|
16
22
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
|
|
@@ -3,25 +3,25 @@
|
|
|
3
3
|
* with official design tokens once elevation tokens are added to the design token set
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
.
|
|
6
|
+
._elevationLow_4gnft_6 {
|
|
7
7
|
--_elevation-semantic-low: 0px 2px 16px 0px rgba(18, 18, 18, 0.06);
|
|
8
8
|
--_elevation-style: var(--_elevation-semantic-low);
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
.
|
|
11
|
+
._elevationHigh_4gnft_11 {
|
|
12
12
|
--_elevation-semantic-high: 0px 4px 24px 0px rgba(18, 18, 18, 0.08);
|
|
13
13
|
--_elevation-style: var(--_elevation-semantic-high);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
.
|
|
16
|
+
._elevationExtraHigh_4gnft_16 {
|
|
17
17
|
--_elevation-semantic-extra-high: 0px 8px 64px 0px rgba(18, 18, 18, 0.16);
|
|
18
18
|
--_elevation-style: var(--_elevation-semantic-extra-high);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
.
|
|
22
|
-
.
|
|
23
|
-
.
|
|
24
|
-
border: var(--borderwidth-semantic-xs) solid var(--
|
|
21
|
+
._elevationLow_4gnft_6,
|
|
22
|
+
._elevationHigh_4gnft_11,
|
|
23
|
+
._elevationExtraHigh_4gnft_16 {
|
|
24
|
+
border: var(--borderwidth-semantic-xs) solid var(--color-semantic-border-neutral-base);
|
|
25
25
|
box-shadow: var(--_elevation-style);
|
|
26
26
|
border-radius: var(--radius-semantic-md);
|
|
27
27
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require('./elevation.css');
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
4
|
-
const elevationLow = "
|
|
4
|
+
const elevationLow = "_elevationLow_4gnft_6";
|
|
5
5
|
const elevationStyles = {
|
|
6
6
|
elevationLow
|
|
7
7
|
};
|