fictoan-react 1.2.0 → 1.2.3
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/dist/components/Accordion/Accordion.cjs +1 -1
- package/dist/components/Accordion/Accordion.js +83 -26
- package/dist/components/Breadcrumbs/BreadcrumbItem/BreadcrumbItem.cjs +1 -1
- package/dist/components/Breadcrumbs/BreadcrumbItem/BreadcrumbItem.d.ts +4 -1
- package/dist/components/Breadcrumbs/BreadcrumbItem/BreadcrumbItem.js +31 -15
- package/dist/components/Breadcrumbs/Breadcrumbs/Breadcrumbs.cjs +1 -1
- package/dist/components/Breadcrumbs/Breadcrumbs/Breadcrumbs.d.ts +5 -3
- package/dist/components/Breadcrumbs/Breadcrumbs/Breadcrumbs.js +31 -15
- package/dist/components/Breadcrumbs/index.d.ts +1 -1
- package/dist/components/CodeBlock/CodeBlock.cjs +1 -1
- package/dist/components/CodeBlock/CodeBlock.js +20 -19
- package/dist/components/CodeBlock/index.cjs +1 -1
- package/dist/components/CodeBlock/index.js +1 -0
- package/dist/components/Element/Element.cjs +1 -1
- package/dist/components/Element/Element.js +18 -18
- package/dist/components/Element/constants.d.ts +1 -0
- package/dist/components/Form/Range/Range.cjs +1 -1
- package/dist/components/Form/Range/Range.d.ts +4 -3
- package/dist/components/Form/Range/Range.js +18 -15
- package/dist/components/Form/Range/index.cjs +1 -1
- package/dist/components/Form/Range/index.js +3 -0
- package/dist/components/Meter/Meter.cjs +1 -1
- package/dist/components/Meter/Meter.d.ts +2 -1
- package/dist/components/Meter/Meter.js +18 -18
- package/dist/components/Table/TablePagination/TablePagination.cjs +1 -1
- package/dist/components/Table/TablePagination/TablePagination.js +2 -2
- package/dist/components/Typography/Heading.cjs +1 -1
- package/dist/components/Typography/Heading.d.ts +10 -4
- package/dist/components/Typography/Heading.js +41 -24
- package/dist/components/Typography/Heading.stories.d.ts +3 -3
- package/dist/components/Typography/index.cjs +1 -1
- package/dist/components/Typography/index.d.ts +1 -1
- package/dist/components/Typography/index.js +7 -2
- package/dist/components/index.cjs +1 -1
- package/dist/components/index.d.ts +2 -2
- package/dist/components/index.js +7 -2
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +7 -2
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),r=require("../Element/Element.cjs"),t=require("../Typography/Text.cjs");var n=["summary","children"];function
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),r=require("../Element/Element.cjs"),t=require("../Typography/Text.cjs");var n=["summary","children","open"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},o.apply(this,arguments)}function a(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}var i=e.forwardRef((function(i,l){var u,c,f=i.summary,s=i.children,y=i.open,p=void 0!==y&&y,b=function(e,r){if(null==e)return{};var t,n,o=function(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],r.indexOf(t)>=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}(i,n),d=(u=e.useState(p),c=2,function(e){if(Array.isArray(e))return e}(u)||function(e,r){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,o,a,i,l=[],u=!0,c=!1;try{if(a=(t=t.call(e)).next,0===r){if(Object(t)!==t)return;u=!1}else for(;!(u=(n=a.call(t)).done)&&(l.push(n.value),l.length!==r);u=!0);}catch(f){c=!0,o=f}finally{try{if(!u&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(c)throw o}}return l}}(u,c)||function(e,r){if(e){if("string"==typeof e)return a(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?a(e,r):void 0}}(u,c)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),m=d[0],g=d[1],v=function(){return g(!m)};return e.useEffect((function(){l&&"current"in l&&l.current&&l.current.setAttribute("aria-expanded",m.toString())}),[m,l]),e.createElement(r.Element,o({as:"details","data-expandable-content":!0,ref:l},b,{open:m,role:"region","aria-labelledby":"accordion-summary"}),e.createElement("summary",{role:"button",tabIndex:0,"aria-controls":"accordion-content","aria-expanded":m,onClick:v,onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),v())}},"string"==typeof f?e.createElement(t.Text,{margin:"none"},f):f),s)}));exports.Accordion=i;
|
|
@@ -1,39 +1,96 @@
|
|
|
1
|
-
import r from "react";
|
|
2
|
-
import { Element as
|
|
3
|
-
import { Text as
|
|
4
|
-
var
|
|
5
|
-
function
|
|
6
|
-
return
|
|
7
|
-
for (var
|
|
8
|
-
var
|
|
9
|
-
for (var n2 in
|
|
10
|
-
Object.prototype.hasOwnProperty.call(
|
|
1
|
+
import r, { useState as t, useEffect as e } from "react";
|
|
2
|
+
import { Element as n } from "../Element/Element.js";
|
|
3
|
+
import { Text as o } from "../Typography/Text.js";
|
|
4
|
+
var a = ["summary", "children", "open"];
|
|
5
|
+
function i() {
|
|
6
|
+
return i = Object.assign ? Object.assign.bind() : function(r2) {
|
|
7
|
+
for (var t2 = 1; t2 < arguments.length; t2++) {
|
|
8
|
+
var e2 = arguments[t2];
|
|
9
|
+
for (var n2 in e2)
|
|
10
|
+
Object.prototype.hasOwnProperty.call(e2, n2) && (r2[n2] = e2[n2]);
|
|
11
11
|
}
|
|
12
12
|
return r2;
|
|
13
|
-
},
|
|
13
|
+
}, i.apply(this, arguments);
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function l(r2, t2) {
|
|
16
|
+
return function(r3) {
|
|
17
|
+
if (Array.isArray(r3))
|
|
18
|
+
return r3;
|
|
19
|
+
}(r2) || function(r3, t3) {
|
|
20
|
+
var e2 = null == r3 ? null : "undefined" != typeof Symbol && r3[Symbol.iterator] || r3["@@iterator"];
|
|
21
|
+
if (null != e2) {
|
|
22
|
+
var n2, o2, a2, i2, l2 = [], u2 = true, c2 = false;
|
|
23
|
+
try {
|
|
24
|
+
if (a2 = (e2 = e2.call(r3)).next, 0 === t3) {
|
|
25
|
+
if (Object(e2) !== e2)
|
|
26
|
+
return;
|
|
27
|
+
u2 = false;
|
|
28
|
+
} else
|
|
29
|
+
for (; !(u2 = (n2 = a2.call(e2)).done) && (l2.push(n2.value), l2.length !== t3); u2 = true)
|
|
30
|
+
;
|
|
31
|
+
} catch (r4) {
|
|
32
|
+
c2 = true, o2 = r4;
|
|
33
|
+
} finally {
|
|
34
|
+
try {
|
|
35
|
+
if (!u2 && null != e2.return && (i2 = e2.return(), Object(i2) !== i2))
|
|
36
|
+
return;
|
|
37
|
+
} finally {
|
|
38
|
+
if (c2)
|
|
39
|
+
throw o2;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return l2;
|
|
43
|
+
}
|
|
44
|
+
}(r2, t2) || function(r3, t3) {
|
|
45
|
+
if (!r3)
|
|
46
|
+
return;
|
|
47
|
+
if ("string" == typeof r3)
|
|
48
|
+
return u(r3, t3);
|
|
49
|
+
var e2 = Object.prototype.toString.call(r3).slice(8, -1);
|
|
50
|
+
"Object" === e2 && r3.constructor && (e2 = r3.constructor.name);
|
|
51
|
+
if ("Map" === e2 || "Set" === e2)
|
|
52
|
+
return Array.from(r3);
|
|
53
|
+
if ("Arguments" === e2 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e2))
|
|
54
|
+
return u(r3, t3);
|
|
55
|
+
}(r2, t2) || function() {
|
|
56
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
57
|
+
}();
|
|
58
|
+
}
|
|
59
|
+
function u(r2, t2) {
|
|
60
|
+
(null == t2 || t2 > r2.length) && (t2 = r2.length);
|
|
61
|
+
for (var e2 = 0, n2 = new Array(t2); e2 < t2; e2++)
|
|
62
|
+
n2[e2] = r2[e2];
|
|
63
|
+
return n2;
|
|
64
|
+
}
|
|
65
|
+
function c(r2, t2) {
|
|
16
66
|
if (null == r2)
|
|
17
67
|
return {};
|
|
18
|
-
var
|
|
68
|
+
var e2, n2, o2 = function(r3, t3) {
|
|
19
69
|
if (null == r3)
|
|
20
70
|
return {};
|
|
21
|
-
var
|
|
22
|
-
for (n3 = 0; n3 <
|
|
23
|
-
|
|
24
|
-
return
|
|
25
|
-
}(r2,
|
|
71
|
+
var e3, n3, o3 = {}, a3 = Object.keys(r3);
|
|
72
|
+
for (n3 = 0; n3 < a3.length; n3++)
|
|
73
|
+
e3 = a3[n3], t3.indexOf(e3) >= 0 || (o3[e3] = r3[e3]);
|
|
74
|
+
return o3;
|
|
75
|
+
}(r2, t2);
|
|
26
76
|
if (Object.getOwnPropertySymbols) {
|
|
27
|
-
var
|
|
28
|
-
for (n2 = 0; n2 <
|
|
29
|
-
|
|
77
|
+
var a2 = Object.getOwnPropertySymbols(r2);
|
|
78
|
+
for (n2 = 0; n2 < a2.length; n2++)
|
|
79
|
+
e2 = a2[n2], t2.indexOf(e2) >= 0 || Object.prototype.propertyIsEnumerable.call(r2, e2) && (o2[e2] = r2[e2]);
|
|
30
80
|
}
|
|
31
|
-
return
|
|
81
|
+
return o2;
|
|
32
82
|
}
|
|
33
|
-
var
|
|
34
|
-
var
|
|
35
|
-
|
|
83
|
+
var f = /* @__PURE__ */ r.forwardRef(function(u2, f2) {
|
|
84
|
+
var y = u2.summary, p = u2.children, s = u2.open, m = void 0 !== s && s, b = c(u2, a), d = l(t(m), 2), g = d[0], v = d[1], h = function() {
|
|
85
|
+
return v(!g);
|
|
86
|
+
};
|
|
87
|
+
e(function() {
|
|
88
|
+
f2 && "current" in f2 && f2.current && f2.current.setAttribute("aria-expanded", g.toString());
|
|
89
|
+
}, [g, f2]);
|
|
90
|
+
return r.createElement(n, i({ as: "details", "data-expandable-content": true, ref: f2 }, b, { open: g, role: "region", "aria-labelledby": "accordion-summary" }), /* @__PURE__ */ r.createElement("summary", { role: "button", tabIndex: 0, "aria-controls": "accordion-content", "aria-expanded": g, onClick: h, onKeyDown: function(r2) {
|
|
91
|
+
"Enter" !== r2.key && " " !== r2.key || (r2.preventDefault(), h());
|
|
92
|
+
} }, "string" == typeof y ? /* @__PURE__ */ r.createElement(o, { margin: "none" }, y) : y), p);
|
|
36
93
|
});
|
|
37
94
|
export {
|
|
38
|
-
|
|
95
|
+
f as Accordion
|
|
39
96
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react"),e=require("../../Element/Element.cjs");var t=["children","current"];function n(){return n=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},n.apply(this,arguments)}var a=r.forwardRef((function(a,o){var i=a.children,c=a.current,l=function(r,e){if(null==r)return{};var t,n,a=function(r,e){if(null==r)return{};var t,n,a={},o=Object.keys(r);for(n=0;n<o.length;n++)t=o[n],e.indexOf(t)>=0||(a[t]=r[t]);return a}(r,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);for(n=0;n<o.length;n++)t=o[n],e.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(r,t)&&(a[t]=r[t])}return a}(a,t);return r.createElement(e.Element,n({as:"li","data-breadcrumb-item":!0,ref:o},l,{"aria-current":c?"page":void 0,className:c?"current":void 0,role:"navigation","aria-label":"List of breadcrumbs"}),i)}));exports.BreadcrumbItem=a;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { CommonAndHTMLProps } from "../../Element/constants";
|
|
3
3
|
export type BreadcrumbItemElementType = HTMLLIElement;
|
|
4
|
-
export
|
|
4
|
+
export interface BreadcrumbItemProps extends CommonAndHTMLProps<BreadcrumbItemElementType> {
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
current?: boolean;
|
|
7
|
+
}
|
|
5
8
|
export declare const BreadcrumbItem: React.ForwardRefExoticComponent<BreadcrumbItemProps & React.RefAttributes<HTMLLIElement>>;
|
|
@@ -1,22 +1,38 @@
|
|
|
1
1
|
import r from "react";
|
|
2
|
-
import { Element as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
import { Element as e } from "../../Element/Element.js";
|
|
3
|
+
var t = ["children", "current"];
|
|
4
|
+
function n() {
|
|
5
|
+
return n = Object.assign ? Object.assign.bind() : function(r2) {
|
|
6
|
+
for (var e2 = 1; e2 < arguments.length; e2++) {
|
|
7
|
+
var t2 = arguments[e2];
|
|
8
|
+
for (var n2 in t2)
|
|
9
|
+
Object.prototype.hasOwnProperty.call(t2, n2) && (r2[n2] = t2[n2]);
|
|
9
10
|
}
|
|
10
11
|
return r2;
|
|
11
|
-
},
|
|
12
|
+
}, n.apply(this, arguments);
|
|
12
13
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
function a(r2, e2) {
|
|
15
|
+
if (null == r2)
|
|
16
|
+
return {};
|
|
17
|
+
var t2, n2, a2 = function(r3, e3) {
|
|
18
|
+
if (null == r3)
|
|
19
|
+
return {};
|
|
20
|
+
var t3, n3, a3 = {}, o3 = Object.keys(r3);
|
|
21
|
+
for (n3 = 0; n3 < o3.length; n3++)
|
|
22
|
+
t3 = o3[n3], e3.indexOf(t3) >= 0 || (a3[t3] = r3[t3]);
|
|
23
|
+
return a3;
|
|
24
|
+
}(r2, e2);
|
|
25
|
+
if (Object.getOwnPropertySymbols) {
|
|
26
|
+
var o2 = Object.getOwnPropertySymbols(r2);
|
|
27
|
+
for (n2 = 0; n2 < o2.length; n2++)
|
|
28
|
+
t2 = o2[n2], e2.indexOf(t2) >= 0 || Object.prototype.propertyIsEnumerable.call(r2, t2) && (a2[t2] = r2[t2]);
|
|
29
|
+
}
|
|
30
|
+
return a2;
|
|
31
|
+
}
|
|
32
|
+
var o = /* @__PURE__ */ r.forwardRef(function(o2, i) {
|
|
33
|
+
var c = o2.children, l = o2.current, u = a(o2, t);
|
|
34
|
+
return r.createElement(e, n({ as: "li", "data-breadcrumb-item": true, ref: i }, u, { "aria-current": l ? "page" : void 0, className: l ? "current" : void 0, role: "navigation", "aria-label": "List of breadcrumbs" }), c);
|
|
19
35
|
});
|
|
20
36
|
export {
|
|
21
|
-
|
|
37
|
+
o as BreadcrumbItem
|
|
22
38
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),r=require("../../Element/Element.cjs");var t=["children"];function n(){return n=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},n.apply(this,arguments)}var a=e.forwardRef((function(a,l){var o=a.children,c=function(e,r){if(null==e)return{};var t,n,a=function(e,r){if(null==e)return{};var t,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)t=l[n],r.indexOf(t)>=0||(a[t]=e[t]);return a}(e,r);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)t=l[n],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}(a,t);return e.createElement("nav",n({"aria-label":"Breadcrumb",ref:l},c),e.createElement(r.Element,{as:"ul","data-breadcrumbs-wrapper":!0},o))}));exports.Breadcrumbs=a;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { CommonAndHTMLProps } from "../../Element/constants";
|
|
3
|
-
export type
|
|
4
|
-
export
|
|
5
|
-
|
|
3
|
+
export type BreadcrumbsElementType = HTMLDivElement;
|
|
4
|
+
export interface BreadcrumbsProps extends CommonAndHTMLProps<BreadcrumbsElementType> {
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare const Breadcrumbs: React.ForwardRefExoticComponent<BreadcrumbsProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,22 +1,38 @@
|
|
|
1
1
|
import r from "react";
|
|
2
|
-
import { Element as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
import { Element as e } from "../../Element/Element.js";
|
|
3
|
+
var t = ["children"];
|
|
4
|
+
function n() {
|
|
5
|
+
return n = Object.assign ? Object.assign.bind() : function(r2) {
|
|
6
|
+
for (var e2 = 1; e2 < arguments.length; e2++) {
|
|
7
|
+
var t2 = arguments[e2];
|
|
8
|
+
for (var n2 in t2)
|
|
9
|
+
Object.prototype.hasOwnProperty.call(t2, n2) && (r2[n2] = t2[n2]);
|
|
9
10
|
}
|
|
10
11
|
return r2;
|
|
11
|
-
},
|
|
12
|
+
}, n.apply(this, arguments);
|
|
12
13
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
function a(r2, e2) {
|
|
15
|
+
if (null == r2)
|
|
16
|
+
return {};
|
|
17
|
+
var t2, n2, a2 = function(r3, e3) {
|
|
18
|
+
if (null == r3)
|
|
19
|
+
return {};
|
|
20
|
+
var t3, n3, a3 = {}, o3 = Object.keys(r3);
|
|
21
|
+
for (n3 = 0; n3 < o3.length; n3++)
|
|
22
|
+
t3 = o3[n3], e3.indexOf(t3) >= 0 || (a3[t3] = r3[t3]);
|
|
23
|
+
return a3;
|
|
24
|
+
}(r2, e2);
|
|
25
|
+
if (Object.getOwnPropertySymbols) {
|
|
26
|
+
var o2 = Object.getOwnPropertySymbols(r2);
|
|
27
|
+
for (n2 = 0; n2 < o2.length; n2++)
|
|
28
|
+
t2 = o2[n2], e2.indexOf(t2) >= 0 || Object.prototype.propertyIsEnumerable.call(r2, t2) && (a2[t2] = r2[t2]);
|
|
29
|
+
}
|
|
30
|
+
return a2;
|
|
31
|
+
}
|
|
32
|
+
var o = /* @__PURE__ */ r.forwardRef(function(o2, l) {
|
|
33
|
+
var c = o2.children, i = a(o2, t);
|
|
34
|
+
return r.createElement("nav", n({ "aria-label": "Breadcrumb", ref: l }, i), /* @__PURE__ */ r.createElement(e, { as: "ul", "data-breadcrumbs-wrapper": true }, c));
|
|
19
35
|
});
|
|
20
36
|
export {
|
|
21
|
-
|
|
37
|
+
o as Breadcrumbs
|
|
22
38
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Breadcrumbs, type
|
|
1
|
+
export { Breadcrumbs, type BreadcrumbsProps } from "../Breadcrumbs/Breadcrumbs/Breadcrumbs";
|
|
2
2
|
export { BreadcrumbItem, type BreadcrumbItemProps } from "./BreadcrumbItem/BreadcrumbItem";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.create,Object.defineProperty,Object.getOwnPropertyDescriptor,Object.getOwnPropertyNames,Object.getPrototypeOf,Object.prototype.hasOwnProperty;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=require("../Element/Element.cjs"),r=require("../Button/Button.cjs");var
|
|
1
|
+
"use strict";Object.create,Object.defineProperty,Object.getOwnPropertyDescriptor,Object.getOwnPropertyNames,Object.getPrototypeOf,Object.prototype.hasOwnProperty;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=require("../Element/Element.cjs"),r=require("../Button/Button.cjs"),n=require("../Badge/Badge.cjs");var o=["children","source","language","showCopyButton"];function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},a.apply(this,arguments)}function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var i=e.lazy((function(){return import("prism-react-renderer").then((function(t){return t.Highlight?{default:t.Highlight}:(console.log("FICTOAN : [35mLooking[33m for[32m syntax[34m highlighting[36m?[31m\n╭──────────────────────────────────────────────────────────────────────────────────────────────────╮\n│ Please install the prism-react-renderer (https://www.npmjs.com/package/prism-react-renderer) │\n│ package to have syntax highlighting in the CodeBlock component. │\n│ For example: [46m[30myarn add prism-react-renderer[0m[31m │\n╰──────────────────────────────────────────────────────────────────────────────────────────────────╯"),{default:function(t){var r=t.code;return e.createElement("pre",{"data-code-block":!0,className:"module-fallback"},r)}})}))})),u=e.forwardRef((function(u,s){var p,f,y=u.children,m=u.source,d=u.language,b=void 0===d?"json":d,g=u.showCopyButton,h=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(u,o),O=(p=e.useState(!1),f=2,function(e){if(Array.isArray(e))return e}(p)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,l,c=[],i=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;i=!1}else for(;!(i=(n=a.call(r)).done)&&(c.push(n.value),c.length!==t);i=!0);}catch(s){u=!0,o=s}finally{try{if(!i&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(u)throw o}}return c}}(p,f)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}(p,f)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),j=O[0],v=O[1],k="string"==typeof y?y:e.Children.toArray(y).join("");return y||(k="object"===l(m)?JSON.stringify(m,null,2):null!=m?m:""),e.createElement(t.Element,a({"data-code-block":!0,as:"div"},h),g?j?e.createElement(n.Badge,{className:"code-block-copy-button",size:"tiny",shape:"rounded",bgColor:"green-light-80",borderColour:"green-dark-20",textColour:"green-dark-20"},"COPIED!"):e.createElement(r.Button,{type:"button",className:"code-block-copy-button",size:"tiny",shape:"rounded",bgColor:"transparent",borderColour:"blue-light-40",textColour:"blue",onClick:function(){navigator.clipboard.writeText(k).then((function(){v(!0),setTimeout((function(){return v(!1)}),3e3)})).catch((function(e){console.error("Could not copy text: ",e)}))}},"Copy"):null,e.createElement(e.Suspense,{fallback:e.createElement("pre",{"data-code-block":!0,className:"suspense-fallback"},k)},e.createElement(i,{code:k,language:b,theme:void 0},(function(t){var r=t.className,n=t.tokens,o=t.getLineProps,a=t.getTokenProps;return e.createElement("pre",{ref:s,className:r},n.map((function(t,r){return e.createElement("div",o({line:t,key:r}),t.map((function(t,r){return e.createElement("span",a({token:t,key:r}))})))})))}))))}));exports.CodeBlock=u;
|
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
import e, { useState as t, Suspense as r } from "react";
|
|
2
2
|
import { Element as n } from "../Element/Element.js";
|
|
3
3
|
import { Button as o } from "../Button/Button.js";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
import { Badge as a } from "../Badge/Badge.js";
|
|
5
|
+
var l = ["children", "source", "language", "showCopyButton"];
|
|
6
|
+
function c() {
|
|
7
|
+
return c = Object.assign ? Object.assign.bind() : function(e2) {
|
|
7
8
|
for (var t2 = 1; t2 < arguments.length; t2++) {
|
|
8
9
|
var r2 = arguments[t2];
|
|
9
10
|
for (var n2 in r2)
|
|
10
11
|
Object.prototype.hasOwnProperty.call(r2, n2) && (e2[n2] = r2[n2]);
|
|
11
12
|
}
|
|
12
13
|
return e2;
|
|
13
|
-
},
|
|
14
|
+
}, c.apply(this, arguments);
|
|
14
15
|
}
|
|
15
|
-
function
|
|
16
|
-
return (
|
|
16
|
+
function i(e2) {
|
|
17
|
+
return (i = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e3) {
|
|
17
18
|
return typeof e3;
|
|
18
19
|
} : function(e3) {
|
|
19
20
|
return e3 && "function" == typeof Symbol && e3.constructor === Symbol && e3 !== Symbol.prototype ? "symbol" : typeof e3;
|
|
20
21
|
})(e2);
|
|
21
22
|
}
|
|
22
|
-
function
|
|
23
|
+
function u(e2, t2) {
|
|
23
24
|
return function(e3) {
|
|
24
25
|
if (Array.isArray(e3))
|
|
25
26
|
return e3;
|
|
@@ -52,24 +53,24 @@ function i(e2, t2) {
|
|
|
52
53
|
if (!e3)
|
|
53
54
|
return;
|
|
54
55
|
if ("string" == typeof e3)
|
|
55
|
-
return
|
|
56
|
+
return f(e3, t3);
|
|
56
57
|
var r2 = Object.prototype.toString.call(e3).slice(8, -1);
|
|
57
58
|
"Object" === r2 && e3.constructor && (r2 = e3.constructor.name);
|
|
58
59
|
if ("Map" === r2 || "Set" === r2)
|
|
59
60
|
return Array.from(e3);
|
|
60
61
|
if ("Arguments" === r2 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r2))
|
|
61
|
-
return
|
|
62
|
+
return f(e3, t3);
|
|
62
63
|
}(e2, t2) || function() {
|
|
63
64
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
64
65
|
}();
|
|
65
66
|
}
|
|
66
|
-
function
|
|
67
|
+
function f(e2, t2) {
|
|
67
68
|
(null == t2 || t2 > e2.length) && (t2 = e2.length);
|
|
68
69
|
for (var r2 = 0, n2 = new Array(t2); r2 < t2; r2++)
|
|
69
70
|
n2[r2] = e2[r2];
|
|
70
71
|
return n2;
|
|
71
72
|
}
|
|
72
|
-
function
|
|
73
|
+
function s(e2, t2) {
|
|
73
74
|
if (null == e2)
|
|
74
75
|
return {};
|
|
75
76
|
var r2, n2, o2 = function(e3, t3) {
|
|
@@ -87,7 +88,7 @@ function f(e2, t2) {
|
|
|
87
88
|
}
|
|
88
89
|
return o2;
|
|
89
90
|
}
|
|
90
|
-
var
|
|
91
|
+
var m = /* @__PURE__ */ e.lazy(function() {
|
|
91
92
|
return import("prism-react-renderer").then(function(t2) {
|
|
92
93
|
if (t2.Highlight)
|
|
93
94
|
return { default: t2.Highlight };
|
|
@@ -97,19 +98,19 @@ var s = /* @__PURE__ */ e.lazy(function() {
|
|
|
97
98
|
return e.createElement("pre", { "data-code-block": true, className: "module-fallback" }, r2);
|
|
98
99
|
} };
|
|
99
100
|
});
|
|
100
|
-
}),
|
|
101
|
-
var
|
|
102
|
-
return
|
|
103
|
-
navigator.clipboard.writeText(
|
|
101
|
+
}), p = /* @__PURE__ */ e.forwardRef(function(f2, p2) {
|
|
102
|
+
var y = f2.children, d = f2.source, b = f2.language, g = void 0 === b ? "json" : b, h = f2.showCopyButton, v = s(f2, l), k = u(t(false), 2), j = k[0], O = k[1], C = "string" == typeof y ? y : e.Children.toArray(y).join("");
|
|
103
|
+
return y || (C = "object" === i(d) ? JSON.stringify(d, null, 2) : null != d ? d : ""), /* @__PURE__ */ e.createElement(n, c({ "data-code-block": true, as: "div" }, v), h ? j ? /* @__PURE__ */ e.createElement(a, { className: "code-block-copy-button", size: "tiny", shape: "rounded", bgColor: "green-light-80", borderColour: "green-dark-20", textColour: "green-dark-20" }, "COPIED!") : /* @__PURE__ */ e.createElement(o, { type: "button", className: "code-block-copy-button", size: "tiny", shape: "rounded", bgColor: "transparent", borderColour: "blue-light-40", textColour: "blue", onClick: function() {
|
|
104
|
+
navigator.clipboard.writeText(C).then(function() {
|
|
104
105
|
O(true), setTimeout(function() {
|
|
105
106
|
return O(false);
|
|
106
107
|
}, 3e3);
|
|
107
108
|
}).catch(function(e2) {
|
|
108
109
|
console.error("Could not copy text: ", e2);
|
|
109
110
|
});
|
|
110
|
-
} }, "Copy") : null, /* @__PURE__ */ e.createElement(r, { fallback: /* @__PURE__ */ e.createElement("pre", { "data-code-block": true, className: "suspense-fallback" },
|
|
111
|
+
} }, "Copy") : null, /* @__PURE__ */ e.createElement(r, { fallback: /* @__PURE__ */ e.createElement("pre", { "data-code-block": true, className: "suspense-fallback" }, C) }, /* @__PURE__ */ e.createElement(m, { code: C, language: g, theme: void 0 }, function(t2) {
|
|
111
112
|
var r2 = t2.className, n2 = t2.tokens, o2 = t2.getLineProps, a2 = t2.getTokenProps;
|
|
112
|
-
return e.createElement("pre", { ref:
|
|
113
|
+
return e.createElement("pre", { ref: p2, className: r2 }, n2.map(function(t3, r3) {
|
|
113
114
|
return e.createElement("div", o2({ line: t3, key: r3 }), t3.map(function(t4, r4) {
|
|
114
115
|
return e.createElement("span", a2({ token: t4, key: r4 }));
|
|
115
116
|
}));
|
|
@@ -117,5 +118,5 @@ var s = /* @__PURE__ */ e.lazy(function() {
|
|
|
117
118
|
})));
|
|
118
119
|
});
|
|
119
120
|
export {
|
|
120
|
-
|
|
121
|
+
p as CodeBlock
|
|
121
122
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./CodeBlock.cjs");require("react"),require("../Element/Element.cjs"),require("../Button/Button.cjs"),exports.CodeBlock=e.CodeBlock;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./CodeBlock.cjs");require("react"),require("../Element/Element.cjs"),require("../Button/Button.cjs"),require("../Badge/Badge.cjs"),exports.CodeBlock=e.CodeBlock;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react");var o=["as"],a=["classNames","bgColor","bgColour","borderColor","borderColour","className","columns","fillColor","fillColour","gap","hideOnDesktop","hideOnMobile","hideOnTabletLandscape","hideOnTabletPortrait","horizontalMargin","horizontalPadding","horizontallyCenterThis","horizontallyCentreThis","isFullHeight","isFullWidth","layoutAsFlexbox","layoutAsGrid","marginLeft","marginBottom","margin","marginRight","marginTop","opacity","paddingBottom","paddingLeft","padding","paddingRight","paddingTop","pushItemsToEnds","shadow","shape","showOnlyOnDesktop","showOnlyOnMobile","showOnlyOnTabletLandscape","showOnlyOnTabletPortrait","size","strokeColor","strokeColour","textColor","textColour","verticalMargin","verticalPadding","verticallyCenterItems","verticallyCentreItems","weight"],n=["className","classNames"];function e(){return e=Object.assign?Object.assign.bind():function(t){for(var o=1;o<arguments.length;o++){var a=arguments[o];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n])}return t},e.apply(this,arguments)}function r(t,o){if(null==t)return{};var a,n,e=function(t,o){if(null==t)return{};var a,n,e={},r=Object.keys(t);for(n=0;n<r.length;n++)a=r[n],o.indexOf(a)>=0||(e[a]=t[a]);return e}(t,o);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(n=0;n<r.length;n++)a=r[n],o.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(t,a)&&(e[a]=t[a])}return e}var
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react");var o=["as","role","ariaLabel","tabIndex","onKeyDown"],a=["classNames","bgColor","bgColour","borderColor","borderColour","className","columns","fillColor","fillColour","gap","hideOnDesktop","hideOnMobile","hideOnTabletLandscape","hideOnTabletPortrait","horizontalMargin","horizontalPadding","horizontallyCenterThis","horizontallyCentreThis","isFullHeight","isFullWidth","layoutAsFlexbox","layoutAsGrid","marginLeft","marginBottom","margin","marginRight","marginTop","opacity","paddingBottom","paddingLeft","padding","paddingRight","paddingTop","pushItemsToEnds","shadow","shape","showOnlyOnDesktop","showOnlyOnMobile","showOnlyOnTabletLandscape","showOnlyOnTabletPortrait","size","strokeColor","strokeColour","textColor","textColour","verticalMargin","verticalPadding","verticallyCenterItems","verticallyCentreItems","weight"],n=["className","classNames"];function e(){return e=Object.assign?Object.assign.bind():function(t){for(var o=1;o<arguments.length;o++){var a=arguments[o];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n])}return t},e.apply(this,arguments)}function r(t,o){if(null==t)return{};var a,n,e=function(t,o){if(null==t)return{};var a,n,e={},r=Object.keys(t);for(n=0;n<r.length;n++)a=r[n],o.indexOf(a)>=0||(e[a]=t[a]);return e}(t,o);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(n=0;n<r.length;n++)a=r[n],o.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(t,a)&&(e[a]=t[a])}return e}var l=t.forwardRef((function(l,i){var c=l.as,s=void 0===c?"div":c,d=l.role,g=l.ariaLabel,h=l.tabIndex,p=l.onKeyDown,b=r(l,o),m=b.classNames,u=void 0===m?[]:m,y=b.bgColor,f=b.bgColour,O=b.borderColor,C=b.borderColour,v=b.className;b.columns;var w=b.fillColor,x=b.fillColour;b.gap;var T=b.hideOnDesktop,k=b.hideOnMobile,z=b.hideOnTabletLandscape,P=b.hideOnTabletPortrait,I=b.horizontalMargin,L=b.horizontalPadding,N=b.horizontallyCenterThis,j=b.horizontallyCentreThis,M=b.isFullHeight,D=b.isFullWidth,F=b.layoutAsFlexbox,E=b.layoutAsGrid,R=b.marginLeft,A=b.marginBottom,B=b.margin,S=b.marginRight,K=b.marginTop,G=b.opacity,H=b.paddingBottom,W=b.paddingLeft,q=b.padding,J=b.paddingRight,Q=b.paddingTop,U=b.pushItemsToEnds,V=b.shadow,X=b.shape,Y=b.showOnlyOnDesktop,Z=b.showOnlyOnMobile,$=b.showOnlyOnTabletLandscape,_=b.showOnlyOnTabletPortrait,tt=b.size,ot=b.strokeColor,at=b.strokeColour,nt=b.textColor,et=b.textColour,rt=b.verticalMargin,lt=b.verticalPadding,it=b.verticallyCenterItems,ct=b.verticallyCentreItems,st=b.weight,dt=r(b,a);b.className,b.classNames,r(b,n);var gt,ht=function(t){var o=t.split("-");return 2===o.length?"".concat(o[0],"-light-").concat(100-Number(o[1])):t};return t.createElement(s,e({ref:i,role:d,"aria-label":g,tabIndex:h,onKeyDown:p},dt,{className:(gt=[v,y&&"bg-".concat(ht(y)),f&&"bg-".concat(ht(f)),O&&"border-".concat(ht(O)),C&&"border-".concat(ht(C)),w&&"fill-".concat(ht(w)),x&&"fill-".concat(ht(x)),T&&"hide-on-desktop",k&&"hide-on-mobile",z&&"hide-on-tablet-landscape",P&&"hide-on-tablet-portrait",I&&"margin-right-".concat(I," margin-left-").concat(I),L&&"padding-right-".concat(L," padding-left-").concat(L),N&&"horizontally-centre-this",j&&"horizontally-centre-this",M&&"full-height",D&&"full-width",F&&"layout-flexbox",E&&"layout-grid",R&&"margin-left-".concat(R),A&&"margin-bottom-".concat(A),B&&"margin-all-".concat(B),S&&"margin-right-".concat(S),K&&"margin-top-".concat(K),G&&"opacity-".concat(G),H&&"padding-bottom-".concat(H),W&&"padding-left-".concat(W),q&&"padding-all-".concat(q),J&&"padding-right-".concat(J),Q&&"padding-top-".concat(Q),U&&"push-to-ends",V&&"shadow-".concat(V),X&&"shape-".concat(X),Y&&"show-only-on-desktop",Z&&"show-only-on-mobile",$&&"show-only-on-tablet-landscape",_&&"show-only-on-tablet-portrait",tt&&"size-".concat(tt),ot&&"stroke-".concat(ht(ot)),at&&"stroke-".concat(ht(at)),nt&&"text-".concat(ht(nt)),et&&"text-".concat(ht(et)),rt&&"margin-top-".concat(rt," margin-bottom-").concat(rt),lt&&"padding-top-".concat(lt," padding-bottom-").concat(lt),it&&"vertically-centre-items",ct&&"vertically-centre-items",st&&"weight-".concat(st)].concat(u),gt.filter((function(t){return!!t})).join(" "))}))}));exports.Element=l;
|
|
@@ -3,13 +3,13 @@ var o = function(t2) {
|
|
|
3
3
|
return t2.filter(function(t3) {
|
|
4
4
|
return !!t3;
|
|
5
5
|
}).join(" ");
|
|
6
|
-
},
|
|
6
|
+
}, a = ["as", "role", "ariaLabel", "tabIndex", "onKeyDown"], n = ["classNames", "bgColor", "bgColour", "borderColor", "borderColour", "className", "columns", "fillColor", "fillColour", "gap", "hideOnDesktop", "hideOnMobile", "hideOnTabletLandscape", "hideOnTabletPortrait", "horizontalMargin", "horizontalPadding", "horizontallyCenterThis", "horizontallyCentreThis", "isFullHeight", "isFullWidth", "layoutAsFlexbox", "layoutAsGrid", "marginLeft", "marginBottom", "margin", "marginRight", "marginTop", "opacity", "paddingBottom", "paddingLeft", "padding", "paddingRight", "paddingTop", "pushItemsToEnds", "shadow", "shape", "showOnlyOnDesktop", "showOnlyOnMobile", "showOnlyOnTabletLandscape", "showOnlyOnTabletPortrait", "size", "strokeColor", "strokeColour", "textColor", "textColour", "verticalMargin", "verticalPadding", "verticallyCenterItems", "verticallyCentreItems", "weight"], e = ["className", "classNames"];
|
|
7
7
|
function r() {
|
|
8
8
|
return r = Object.assign ? Object.assign.bind() : function(t2) {
|
|
9
9
|
for (var o2 = 1; o2 < arguments.length; o2++) {
|
|
10
|
-
var
|
|
11
|
-
for (var
|
|
12
|
-
Object.prototype.hasOwnProperty.call(
|
|
10
|
+
var a2 = arguments[o2];
|
|
11
|
+
for (var n2 in a2)
|
|
12
|
+
Object.prototype.hasOwnProperty.call(a2, n2) && (t2[n2] = a2[n2]);
|
|
13
13
|
}
|
|
14
14
|
return t2;
|
|
15
15
|
}, r.apply(this, arguments);
|
|
@@ -17,33 +17,33 @@ function r() {
|
|
|
17
17
|
function i(t2, o2) {
|
|
18
18
|
if (null == t2)
|
|
19
19
|
return {};
|
|
20
|
-
var
|
|
20
|
+
var a2, n2, e2 = function(t3, o3) {
|
|
21
21
|
if (null == t3)
|
|
22
22
|
return {};
|
|
23
|
-
var
|
|
24
|
-
for (
|
|
25
|
-
|
|
23
|
+
var a3, n3, e3 = {}, r3 = Object.keys(t3);
|
|
24
|
+
for (n3 = 0; n3 < r3.length; n3++)
|
|
25
|
+
a3 = r3[n3], o3.indexOf(a3) >= 0 || (e3[a3] = t3[a3]);
|
|
26
26
|
return e3;
|
|
27
27
|
}(t2, o2);
|
|
28
28
|
if (Object.getOwnPropertySymbols) {
|
|
29
29
|
var r2 = Object.getOwnPropertySymbols(t2);
|
|
30
|
-
for (
|
|
31
|
-
|
|
30
|
+
for (n2 = 0; n2 < r2.length; n2++)
|
|
31
|
+
a2 = r2[n2], o2.indexOf(a2) >= 0 || Object.prototype.propertyIsEnumerable.call(t2, a2) && (e2[a2] = t2[a2]);
|
|
32
32
|
}
|
|
33
33
|
return e2;
|
|
34
34
|
}
|
|
35
35
|
var l = /* @__PURE__ */ t.forwardRef(function(l2, c) {
|
|
36
|
-
var s = l2.as, d = void 0 === s ? "div" : s, g = i(l2,
|
|
37
|
-
|
|
38
|
-
var
|
|
39
|
-
|
|
40
|
-
var
|
|
41
|
-
|
|
42
|
-
var
|
|
36
|
+
var s = l2.as, d = void 0 === s ? "div" : s, g = l2.role, h = l2.ariaLabel, p = l2.tabIndex, b = l2.onKeyDown, m = i(l2, a), u = m.classNames, y = void 0 === u ? [] : u, f = m.bgColor, O = m.bgColour, C = m.borderColor, v = m.borderColour, w = m.className;
|
|
37
|
+
m.columns;
|
|
38
|
+
var x = m.fillColor, T = m.fillColour;
|
|
39
|
+
m.gap;
|
|
40
|
+
var k = m.hideOnDesktop, z = m.hideOnMobile, P = m.hideOnTabletLandscape, I = m.hideOnTabletPortrait, L = m.horizontalMargin, N = m.horizontalPadding, j = m.horizontallyCenterThis, M = m.horizontallyCentreThis, D = m.isFullHeight, F = m.isFullWidth, R = m.layoutAsFlexbox, A = m.layoutAsGrid, B = m.marginLeft, E = m.marginBottom, K = m.margin, G = m.marginRight, H = m.marginTop, S = m.opacity, W = m.paddingBottom, q = m.paddingLeft, J = m.padding, Q = m.paddingRight, U = m.paddingTop, V = m.pushItemsToEnds, X = m.shadow, Y = m.shape, Z = m.showOnlyOnDesktop, $ = m.showOnlyOnMobile, _ = m.showOnlyOnTabletLandscape, tt = m.showOnlyOnTabletPortrait, ot = m.size, at = m.strokeColor, nt = m.strokeColour, et = m.textColor, rt = m.textColour, it = m.verticalMargin, lt = m.verticalPadding, ct = m.verticallyCenterItems, st = m.verticallyCentreItems, dt = m.weight, gt = i(m, n);
|
|
41
|
+
m.className, m.classNames, i(m, e);
|
|
42
|
+
var ht = function(t2) {
|
|
43
43
|
var o2 = t2.split("-");
|
|
44
44
|
return 2 === o2.length ? "".concat(o2[0], "-light-").concat(100 - Number(o2[1])) : t2;
|
|
45
45
|
};
|
|
46
|
-
return t.createElement(d, r({ ref: c },
|
|
46
|
+
return t.createElement(d, r({ ref: c, role: g, "aria-label": h, tabIndex: p, onKeyDown: b }, gt, { className: o([w, f && "bg-".concat(ht(f)), O && "bg-".concat(ht(O)), C && "border-".concat(ht(C)), v && "border-".concat(ht(v)), x && "fill-".concat(ht(x)), T && "fill-".concat(ht(T)), k && "hide-on-desktop", z && "hide-on-mobile", P && "hide-on-tablet-landscape", I && "hide-on-tablet-portrait", L && "margin-right-".concat(L, " margin-left-").concat(L), N && "padding-right-".concat(N, " padding-left-").concat(N), j && "horizontally-centre-this", M && "horizontally-centre-this", D && "full-height", F && "full-width", R && "layout-flexbox", A && "layout-grid", B && "margin-left-".concat(B), E && "margin-bottom-".concat(E), K && "margin-all-".concat(K), G && "margin-right-".concat(G), H && "margin-top-".concat(H), S && "opacity-".concat(S), W && "padding-bottom-".concat(W), q && "padding-left-".concat(q), J && "padding-all-".concat(J), Q && "padding-right-".concat(Q), U && "padding-top-".concat(U), V && "push-to-ends", X && "shadow-".concat(X), Y && "shape-".concat(Y), Z && "show-only-on-desktop", $ && "show-only-on-mobile", _ && "show-only-on-tablet-landscape", tt && "show-only-on-tablet-portrait", ot && "size-".concat(ot), at && "stroke-".concat(ht(at)), nt && "stroke-".concat(ht(nt)), et && "text-".concat(ht(et)), rt && "text-".concat(ht(rt)), it && "margin-top-".concat(it, " margin-bottom-").concat(it), lt && "padding-top-".concat(lt, " padding-bottom-").concat(lt), ct && "vertically-centre-items", st && "vertically-centre-items", dt && "weight-".concat(dt)].concat(y)) }));
|
|
47
47
|
});
|
|
48
48
|
export {
|
|
49
49
|
l as Element
|
|
@@ -67,5 +67,6 @@ export interface CommonAndHTMLProps<T extends {}> extends CommonProps, Omit<HTML
|
|
|
67
67
|
export interface ElementProps<T extends {}> extends CommonProps, Omit<HTMLProps<T>, "as" | "ref" | "shape"> {
|
|
68
68
|
as?: ElementType;
|
|
69
69
|
className?: string;
|
|
70
|
+
ariaLabel?: string;
|
|
70
71
|
}
|
|
71
72
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),r=require("../../Element/Element.cjs"),t=require("../../Element/Tags.cjs"),n=require("../../Typography/Text.cjs");var
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),r=require("../../Element/Element.cjs"),t=require("../../Element/Tags.cjs"),n=require("../BaseInputComponent/BaseInputComponent.cjs"),a=require("../InputLabel/InputLabel.cjs"),l=require("../../Typography/Text.cjs");require("../FormItem/FormItem.cjs");var u=["label","value","suffix"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},o.apply(this,arguments)}var s=e.forwardRef((function(s,c){var i=s.label,p=s.value,m=s.suffix,f=function(e,r){if(null==e)return{};var t,n,a=function(e,r){if(null==e)return{};var t,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)t=l[n],r.indexOf(t)>=0||(a[t]=e[t]);return a}(e,r);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)t=l[n],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}(s,u);return e.createElement(r.Element,{"data-range":!0,ref:c},i&&e.createElement(t.Div,{"data-range-meta":!0},e.createElement(a.InputLabel,{className:"range-label",label:i,htmlFor:f.id}),e.createElement(l.Text,{className:"range-value"},p,m&&m)),e.createElement(n.BaseInputComponent,o({as:"input",type:"range",value:p},f)))}));exports.Range=s;
|