fictoan-react 1.0.0-alpha.1 → 1.0.0-alpha.2
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/CodeBlock/CodeBlock.cjs +1 -1
- package/dist/components/CodeBlock/CodeBlock.js +3 -3
- package/dist/components/Drawer/Drawer.cjs +1 -1
- package/dist/components/Drawer/Drawer.d.ts +5 -4
- package/dist/components/Drawer/Drawer.js +74 -65
- package/dist/components/Element/Element.cjs +1 -1
- package/dist/components/Element/Element.js +19 -19
- package/dist/components/Element/constants.d.ts +7 -3
- package/dist/components/Form/RadioButton/SlidingSelector.cjs +1 -0
- package/dist/components/Form/RadioButton/SlidingSelector.d.ts +6 -0
- package/dist/components/Form/RadioButton/SlidingSelector.js +41 -0
- package/dist/components/Form/index.cjs +1 -1
- package/dist/components/Form/index.d.ts +1 -0
- package/dist/components/Form/index.js +3 -0
- package/dist/components/HRule/HRule.cjs +1 -1
- package/dist/components/HRule/HRule.d.ts +1 -2
- package/dist/components/HRule/HRule.js +15 -15
- package/dist/components/Row/Row.cjs +1 -1
- package/dist/components/Row/Row.js +19 -19
- package/dist/components/Tabs/Tabs.cjs +1 -1
- package/dist/components/Tabs/Tabs.js +25 -26
- package/dist/components/Tabs/index.cjs +1 -1
- package/dist/components/Tabs/index.js +0 -1
- package/dist/components/index.cjs +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +3 -0
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +2 -1
- package/dist/sliding-selector-k52RqIHf.cjs +1 -0
- package/dist/sliding-selector-w40geAFS.js +1 -0
- package/package.json +75 -75
|
@@ -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");var r=["source","language"];function n(){return n=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},n.apply(this,arguments)}function o(e){return(o="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)}var a=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)}})}))})),c=e.forwardRef((function(c,l){var i=c.
|
|
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");var r=["children","source","language"];function n(){return n=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},n.apply(this,arguments)}function o(e){return(o="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)}var a=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)}})}))})),c=e.forwardRef((function(c,l){var i=c.children,s=c.source,u=c.language,p=void 0===u?"json":u,m=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}(c,r),f="string"==typeof i?i:e.Children.toArray(i).join("");return i||(f="object"===o(s)?JSON.stringify(s,null,2):null!=s?s:""),e.createElement(t.Element,n({"data-code-block":!0,as:"div"},m),e.createElement(e.Suspense,{fallback:e.createElement("pre",{"data-code-block":!0,className:"suspense-fallback"},f)},e.createElement(a,{code:f,language:p,theme:void 0},(function(t){var r=t.className,n=t.tokens,o=t.getLineProps,a=t.getTokenProps;return e.createElement("pre",{ref:l,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=c;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import e, { Suspense as t } from "react";
|
|
2
2
|
import { Element as r } from "../Element/Element.js";
|
|
3
|
-
var n = ["source", "language"];
|
|
3
|
+
var n = ["children", "source", "language"];
|
|
4
4
|
function o() {
|
|
5
5
|
return o = Object.assign ? Object.assign.bind() : function(e2) {
|
|
6
6
|
for (var t2 = 1; t2 < arguments.length; t2++) {
|
|
@@ -47,8 +47,8 @@ var c = /* @__PURE__ */ e.lazy(function() {
|
|
|
47
47
|
} };
|
|
48
48
|
});
|
|
49
49
|
}), i = /* @__PURE__ */ e.forwardRef(function(i2, m) {
|
|
50
|
-
var u = i2.
|
|
51
|
-
return e.createElement(r, o({ "data-code-block": true, as: "div" },
|
|
50
|
+
var u = i2.children, s = i2.source, f = i2.language, p = void 0 === f ? "json" : f, y = l(i2, n), g = "string" == typeof u ? u : e.Children.toArray(u).join("");
|
|
51
|
+
return u || (g = "object" === a(s) ? JSON.stringify(s, null, 2) : null != s ? s : ""), /* @__PURE__ */ e.createElement(r, o({ "data-code-block": true, as: "div" }, y), /* @__PURE__ */ e.createElement(t, { fallback: /* @__PURE__ */ e.createElement("pre", { "data-code-block": true, className: "suspense-fallback" }, g) }, /* @__PURE__ */ e.createElement(c, { code: g, language: p, theme: void 0 }, function(t2) {
|
|
52
52
|
var r2 = t2.className, n2 = t2.tokens, o2 = t2.getLineProps, a2 = t2.getTokenProps;
|
|
53
53
|
return e.createElement("pre", { ref: m, className: r2 }, n2.map(function(t3, r3) {
|
|
54
54
|
return e.createElement("div", o2({ line: t3, key: r3 }), t3.map(function(t4, r4) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=require("../Element/Element.cjs");var n=["children","openWhen","closeWhen","closeOnClickOutside","padding","position","width","bgColor","bgColour","isDismissable","showOverlay"];function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var a=e.forwardRef((function(a,i){var l,c,u=a.children,s=a.openWhen,f=a.closeWhen,d=a.closeOnClickOutside,m=a.padding,p=a.position,v=a.width,b=a.bgColor,y=a.bgColour,h=a.isDismissable,g=void 0===h||h,O=a.showOverlay,w=void 0!==O&&O,E=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(a,n),j=(l=e.useState(s),c=2,function(e){if(Array.isArray(e))return e}(l)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,l=[],c=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(s){u=!0,o=s}finally{try{if(!c&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return l}}(l,c)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(l,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.")}()),C=j[0],S=j[1],A=e.useRef(null),k=i||A;e.useEffect((function(){s&&S(!0)}),[s]);var x=["drawer"];p&&x.push(p),s?x.push("open"):C&&x.push("close");var I=function(){f&&f()};return function(t,n){e.useEffect((function(){var e=function(e){t.current&&!t.current.contains(e.target)&&n(e)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),function(){document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e)}}),[t,n])}(k,d?I:function(){}),v&&x.push("".concat(v)),C?e.createElement(e.Fragment,null,e.createElement(t.Element,r({as:"div","data-drawer":!0,ref:k,classNames:x,onAnimationEnd:function(){s||S(!1)}},E),s&&w&&e.createElement(t.Element,r({as:"div",className:"rest-of-page-overlay ".concat(s?"visible":"")},d?{onClick:I}:{})),e.createElement(t.Element,{as:"div",className:"drawer-content-wrapper",padding:m,bgColor:b,bgColour:y},g&&e.createElement("button",{className:"dismiss-button",onClick:I}),u))):null}));exports.Drawer=a;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { CommonAndHTMLProps } from "../Element/constants";
|
|
2
|
+
import { CommonAndHTMLProps, SpacingTypes } from "../Element/constants";
|
|
3
3
|
export interface DrawerCustomProps {
|
|
4
4
|
position: "top" | "right" | "bottom" | "left";
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
width?: SpacingTypes;
|
|
6
|
+
openWhen?: boolean;
|
|
7
|
+
closeWhen?: () => void;
|
|
7
8
|
closeOnClickOutside?: boolean;
|
|
8
9
|
isDismissable?: boolean;
|
|
10
|
+
showOverlay?: boolean;
|
|
9
11
|
}
|
|
10
12
|
export type DrawerElementType = HTMLDivElement;
|
|
11
13
|
export type DrawerProps = Omit<CommonAndHTMLProps<DrawerElementType>, keyof DrawerCustomProps> & DrawerCustomProps;
|
|
12
14
|
export declare const Drawer: React.ForwardRefExoticComponent<Omit<CommonAndHTMLProps<HTMLDivElement>, keyof DrawerCustomProps> & DrawerCustomProps & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
-
export default Drawer;
|
|
@@ -1,99 +1,108 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Element as
|
|
3
|
-
var
|
|
1
|
+
import e, { useEffect as t, useState as n, useRef as r } from "react";
|
|
2
|
+
import { Element as o } from "../Element/Element.js";
|
|
3
|
+
var i = ["children", "openWhen", "closeWhen", "closeOnClickOutside", "padding", "position", "width", "bgColor", "bgColour", "isDismissable", "showOverlay"];
|
|
4
4
|
function a() {
|
|
5
|
-
return a = Object.assign ? Object.assign.bind() : function(
|
|
6
|
-
for (var
|
|
7
|
-
var
|
|
8
|
-
for (var
|
|
9
|
-
Object.prototype.hasOwnProperty.call(
|
|
5
|
+
return a = Object.assign ? Object.assign.bind() : function(e2) {
|
|
6
|
+
for (var t2 = 1; t2 < arguments.length; t2++) {
|
|
7
|
+
var n2 = arguments[t2];
|
|
8
|
+
for (var r2 in n2)
|
|
9
|
+
Object.prototype.hasOwnProperty.call(n2, r2) && (e2[r2] = n2[r2]);
|
|
10
10
|
}
|
|
11
|
-
return
|
|
11
|
+
return e2;
|
|
12
12
|
}, a.apply(this, arguments);
|
|
13
13
|
}
|
|
14
|
-
function l(
|
|
15
|
-
return function(
|
|
16
|
-
if (Array.isArray(
|
|
17
|
-
return
|
|
18
|
-
}(
|
|
19
|
-
var
|
|
20
|
-
if (null !=
|
|
21
|
-
var
|
|
14
|
+
function l(e2, t2) {
|
|
15
|
+
return function(e3) {
|
|
16
|
+
if (Array.isArray(e3))
|
|
17
|
+
return e3;
|
|
18
|
+
}(e2) || function(e3, t3) {
|
|
19
|
+
var n2 = null == e3 ? null : "undefined" != typeof Symbol && e3[Symbol.iterator] || e3["@@iterator"];
|
|
20
|
+
if (null != n2) {
|
|
21
|
+
var r2, o2, i2, a2, l2 = [], c2 = true, u2 = false;
|
|
22
22
|
try {
|
|
23
|
-
if (
|
|
24
|
-
if (Object(
|
|
23
|
+
if (i2 = (n2 = n2.call(e3)).next, 0 === t3) {
|
|
24
|
+
if (Object(n2) !== n2)
|
|
25
25
|
return;
|
|
26
26
|
c2 = false;
|
|
27
27
|
} else
|
|
28
|
-
for (; !(c2 = (
|
|
28
|
+
for (; !(c2 = (r2 = i2.call(n2)).done) && (l2.push(r2.value), l2.length !== t3); c2 = true)
|
|
29
29
|
;
|
|
30
|
-
} catch (
|
|
31
|
-
|
|
30
|
+
} catch (e4) {
|
|
31
|
+
u2 = true, o2 = e4;
|
|
32
32
|
} finally {
|
|
33
33
|
try {
|
|
34
|
-
if (!c2 && null !=
|
|
34
|
+
if (!c2 && null != n2.return && (a2 = n2.return(), Object(a2) !== a2))
|
|
35
35
|
return;
|
|
36
36
|
} finally {
|
|
37
|
-
if (
|
|
37
|
+
if (u2)
|
|
38
38
|
throw o2;
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
return
|
|
41
|
+
return l2;
|
|
42
42
|
}
|
|
43
|
-
}(
|
|
44
|
-
if (!
|
|
43
|
+
}(e2, t2) || function(e3, t3) {
|
|
44
|
+
if (!e3)
|
|
45
45
|
return;
|
|
46
|
-
if ("string" == typeof
|
|
47
|
-
return
|
|
48
|
-
var
|
|
49
|
-
"Object" ===
|
|
50
|
-
if ("Map" ===
|
|
51
|
-
return Array.from(
|
|
52
|
-
if ("Arguments" ===
|
|
53
|
-
return
|
|
54
|
-
}(
|
|
46
|
+
if ("string" == typeof e3)
|
|
47
|
+
return c(e3, t3);
|
|
48
|
+
var n2 = Object.prototype.toString.call(e3).slice(8, -1);
|
|
49
|
+
"Object" === n2 && e3.constructor && (n2 = e3.constructor.name);
|
|
50
|
+
if ("Map" === n2 || "Set" === n2)
|
|
51
|
+
return Array.from(e3);
|
|
52
|
+
if ("Arguments" === n2 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n2))
|
|
53
|
+
return c(e3, t3);
|
|
54
|
+
}(e2, t2) || function() {
|
|
55
55
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
56
56
|
}();
|
|
57
57
|
}
|
|
58
|
-
function
|
|
59
|
-
(null ==
|
|
60
|
-
for (var
|
|
61
|
-
n2
|
|
62
|
-
return
|
|
58
|
+
function c(e2, t2) {
|
|
59
|
+
(null == t2 || t2 > e2.length) && (t2 = e2.length);
|
|
60
|
+
for (var n2 = 0, r2 = new Array(t2); n2 < t2; n2++)
|
|
61
|
+
r2[n2] = e2[n2];
|
|
62
|
+
return r2;
|
|
63
63
|
}
|
|
64
|
-
function
|
|
65
|
-
if (null ==
|
|
64
|
+
function u(e2, t2) {
|
|
65
|
+
if (null == e2)
|
|
66
66
|
return {};
|
|
67
|
-
var
|
|
68
|
-
if (null ==
|
|
67
|
+
var n2, r2, o2 = function(e3, t3) {
|
|
68
|
+
if (null == e3)
|
|
69
69
|
return {};
|
|
70
|
-
var
|
|
71
|
-
for (
|
|
72
|
-
|
|
70
|
+
var n3, r3, o3 = {}, i3 = Object.keys(e3);
|
|
71
|
+
for (r3 = 0; r3 < i3.length; r3++)
|
|
72
|
+
n3 = i3[r3], t3.indexOf(n3) >= 0 || (o3[n3] = e3[n3]);
|
|
73
73
|
return o3;
|
|
74
|
-
}(
|
|
74
|
+
}(e2, t2);
|
|
75
75
|
if (Object.getOwnPropertySymbols) {
|
|
76
|
-
var
|
|
77
|
-
for (
|
|
78
|
-
|
|
76
|
+
var i2 = Object.getOwnPropertySymbols(e2);
|
|
77
|
+
for (r2 = 0; r2 < i2.length; r2++)
|
|
78
|
+
n2 = i2[r2], t2.indexOf(n2) >= 0 || Object.prototype.propertyIsEnumerable.call(e2, n2) && (o2[n2] = e2[n2]);
|
|
79
79
|
}
|
|
80
80
|
return o2;
|
|
81
81
|
}
|
|
82
|
-
var s = /* @__PURE__ */
|
|
83
|
-
var
|
|
82
|
+
var s = /* @__PURE__ */ e.forwardRef(function(c2, s2) {
|
|
83
|
+
var f = c2.children, d = c2.openWhen, m = c2.closeWhen, p = c2.closeOnClickOutside, v = c2.padding, b = c2.position, h = c2.width, y = c2.bgColor, g = c2.bgColour, O = c2.isDismissable, w = void 0 === O || O, E = c2.showOverlay, j = void 0 !== E && E, C = u(c2, i), A = l(n(d), 2), S = A[0], k = A[1], x = r(null), I = s2 || x;
|
|
84
84
|
t(function() {
|
|
85
|
-
|
|
86
|
-
}, [
|
|
87
|
-
var
|
|
88
|
-
|
|
89
|
-
var
|
|
90
|
-
|
|
85
|
+
d && k(true);
|
|
86
|
+
}, [d]);
|
|
87
|
+
var L = ["drawer"];
|
|
88
|
+
b && L.push(b), d ? L.push("open") : S && L.push("close");
|
|
89
|
+
var N = function() {
|
|
90
|
+
m && m();
|
|
91
91
|
};
|
|
92
|
-
return
|
|
93
|
-
|
|
94
|
-
|
|
92
|
+
return function(e2, n2) {
|
|
93
|
+
t(function() {
|
|
94
|
+
var t2 = function(t3) {
|
|
95
|
+
e2.current && !e2.current.contains(t3.target) && n2(t3);
|
|
96
|
+
};
|
|
97
|
+
return document.addEventListener("mousedown", t2), document.addEventListener("touchstart", t2), function() {
|
|
98
|
+
document.removeEventListener("mousedown", t2), document.removeEventListener("touchstart", t2);
|
|
99
|
+
};
|
|
100
|
+
}, [e2, n2]);
|
|
101
|
+
}(I, p ? N : function() {
|
|
102
|
+
}), h && L.push("".concat(h)), S ? /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(o, a({ as: "div", "data-drawer": true, ref: I, classNames: L, onAnimationEnd: function() {
|
|
103
|
+
d || k(false);
|
|
104
|
+
} }, C), d && j && /* @__PURE__ */ e.createElement(o, a({ as: "div", className: "rest-of-page-overlay ".concat(d ? "visible" : "") }, p ? { onClick: N } : {})), /* @__PURE__ */ e.createElement(o, { as: "div", className: "drawer-content-wrapper", padding: v, bgColor: y, bgColour: g }, w && /* @__PURE__ */ e.createElement("button", { className: "dismiss-button", onClick: N }), f))) : null;
|
|
95
105
|
});
|
|
96
106
|
export {
|
|
97
|
-
s as Drawer
|
|
98
|
-
s as default
|
|
107
|
+
s as Drawer
|
|
99
108
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react");var o=["as","classNames","bgColor","bgColour","borderColor","borderColour","className","columns","fillColor","fillColour","gap","hideOnDesktop","hideOnMobile","hideOnTabletLandscape","hideOnTabletPortrait","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","verticallyCenterItems","verticallyCentreItems","weight"],
|
|
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 i=t.forwardRef((function(i,l){var c=i.as,s=void 0===c?"div":c,d=r(i,o),g=d.classNames,h=void 0===g?[]:g,p=d.bgColor,m=d.bgColour,u=d.borderColor,b=d.borderColour,y=d.className,f=d.columns,O=d.fillColor,C=d.fillColour,v=d.gap,w=d.hideOnDesktop,T=d.hideOnMobile,x=d.hideOnTabletLandscape,k=d.hideOnTabletPortrait,z=d.horizontalMargin,P=d.horizontalPadding,N=d.horizontallyCenterThis,j=d.horizontallyCentreThis,M=d.isFullHeight,L=d.isFullWidth,I=d.layoutAsFlexbox,F=d.layoutAsGrid,E=d.marginLeft,R=d.marginBottom,A=d.margin,B=d.marginRight,D=d.marginTop,S=d.opacity,G=d.paddingBottom,H=d.paddingLeft,W=d.padding,q=d.paddingRight,J=d.paddingTop,K=d.pushItemsToEnds,Q=d.shadow,U=d.shape,V=d.showOnlyOnDesktop,X=d.showOnlyOnMobile,Y=d.showOnlyOnTabletLandscape,Z=d.showOnlyOnTabletPortrait,$=d.size,_=d.strokeColor,tt=d.strokeColour,ot=d.textColor,at=d.textColour,nt=d.verticalMargin,et=d.verticalPadding,rt=d.verticallyCenterItems,it=d.verticallyCentreItems,lt=d.weight,ct=r(d,a);d.className,d.classNames,r(d,n);var st,dt=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:l},ct,{className:(st=[y,p&&"bg-".concat(dt(p)),m&&"bg-".concat(dt(m)),u&&"border-".concat(dt(u)),b&&"border-".concat(dt(b)),O&&"fill-".concat(dt(O)),C&&"fill-".concat(dt(C)),w&&"hide-on-desktop",T&&"hide-on-mobile",x&&"hide-on-tablet-landscape",k&&"hide-on-tablet-portrait",z&&"margin-right-".concat(z," margin-left-").concat(z),P&&"padding-right-".concat(P," padding-left-").concat(P),N&&"horizontally-centre-this",j&&"horizontally-centre-this",M&&"full-height",L&&"full-width",I&&"layout-flexbox",F&&"layout-grid",E&&"margin-left-".concat(E),R&&"margin-bottom-".concat(R),A&&"margin-all-".concat(A),B&&"margin-right-".concat(B),D&&"margin-top-".concat(D),S&&"opacity-".concat(S),G&&"padding-bottom-".concat(G),H&&"padding-left-".concat(H),W&&"padding-all-".concat(W),q&&"padding-right-".concat(q),J&&"padding-top-".concat(J),K&&"push-to-ends",Q&&"shadow-".concat(Q),U&&"shape-".concat(U),V&&"show-only-on-desktop",X&&"show-only-on-mobile",Y&&"show-only-on-tablet-landscape",Z&&"show-only-on-tablet-portrait",$&&"size-".concat($),_&&"stroke-".concat(dt(_)),tt&&"stroke-".concat(dt(tt)),ot&&"text-".concat(dt(ot)),at&&"text-".concat(dt(at)),nt&&"margin-top-".concat(nt," margin-bottom-").concat(nt),et&&"padding-top-".concat(et," padding-bottom-").concat(et),rt&&"vertically-centre-items",it&&"vertically-centre-items",lt&&"weight-".concat(lt)].concat(h),st.filter((function(t){return!!t})).join(" ")),style:F?{gridTemplateColumns:"repeat(".concat(f,", 1fr)"),gap:v}:{gap:v}}))}));exports.Element=i;
|
|
@@ -3,43 +3,43 @@ var o = function(t2) {
|
|
|
3
3
|
return t2.filter(function(t3) {
|
|
4
4
|
return !!t3;
|
|
5
5
|
}).join(" ");
|
|
6
|
-
},
|
|
7
|
-
function
|
|
8
|
-
return
|
|
6
|
+
}, a = ["as"], 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
|
+
function r() {
|
|
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 n2 in
|
|
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);
|
|
16
16
|
}
|
|
17
|
-
function
|
|
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
|
|
23
|
+
var a3, n3, e3 = {}, r3 = Object.keys(t3);
|
|
24
24
|
for (n3 = 0; n3 < r3.length; n3++)
|
|
25
|
-
|
|
26
|
-
return
|
|
25
|
+
a3 = r3[n3], o3.indexOf(a3) >= 0 || (e3[a3] = t3[a3]);
|
|
26
|
+
return e3;
|
|
27
27
|
}(t2, o2);
|
|
28
28
|
if (Object.getOwnPropertySymbols) {
|
|
29
29
|
var r2 = Object.getOwnPropertySymbols(t2);
|
|
30
30
|
for (n2 = 0; n2 < r2.length; n2++)
|
|
31
|
-
|
|
31
|
+
a2 = r2[n2], o2.indexOf(a2) >= 0 || Object.prototype.propertyIsEnumerable.call(t2, a2) && (e2[a2] = t2[a2]);
|
|
32
32
|
}
|
|
33
|
-
return
|
|
33
|
+
return e2;
|
|
34
34
|
}
|
|
35
|
-
var l = /* @__PURE__ */ t.forwardRef(function(l2,
|
|
36
|
-
var s = l2.as,
|
|
37
|
-
|
|
38
|
-
var
|
|
35
|
+
var l = /* @__PURE__ */ t.forwardRef(function(l2, c) {
|
|
36
|
+
var s = l2.as, d = void 0 === s ? "div" : s, g = i(l2, a), h = g.classNames, p = void 0 === h ? [] : h, m = g.bgColor, u = g.bgColour, b = g.borderColor, y = g.borderColour, f = g.className, O = g.columns, C = g.fillColor, v = g.fillColour, w = g.gap, T = g.hideOnDesktop, x = g.hideOnMobile, k = g.hideOnTabletLandscape, z = g.hideOnTabletPortrait, P = g.horizontalMargin, N = g.horizontalPadding, j = g.horizontallyCenterThis, L = g.horizontallyCentreThis, M = g.isFullHeight, I = g.isFullWidth, F = g.layoutAsFlexbox, R = g.layoutAsGrid, A = g.marginLeft, B = g.marginBottom, D = g.margin, E = g.marginRight, G = g.marginTop, H = g.opacity, S = g.paddingBottom, W = g.paddingLeft, q = g.padding, J = g.paddingRight, K = g.paddingTop, Q = g.pushItemsToEnds, U = g.shadow, V = g.shape, X = g.showOnlyOnDesktop, Y = g.showOnlyOnMobile, Z = g.showOnlyOnTabletLandscape, $ = g.showOnlyOnTabletPortrait, _ = g.size, tt = g.strokeColor, ot = g.strokeColour, at = g.textColor, nt = g.textColour, et = g.verticalMargin, rt = g.verticalPadding, it = g.verticallyCenterItems, lt = g.verticallyCentreItems, ct = g.weight, st = i(g, n);
|
|
37
|
+
g.className, g.classNames, i(g, e);
|
|
38
|
+
var dt = function(t2) {
|
|
39
39
|
var o2 = t2.split("-");
|
|
40
40
|
return 2 === o2.length ? "".concat(o2[0], "-light-").concat(100 - Number(o2[1])) : t2;
|
|
41
41
|
};
|
|
42
|
-
return t.createElement(
|
|
42
|
+
return t.createElement(d, r({ ref: c }, st, { className: o([f, m && "bg-".concat(dt(m)), u && "bg-".concat(dt(u)), b && "border-".concat(dt(b)), y && "border-".concat(dt(y)), C && "fill-".concat(dt(C)), v && "fill-".concat(dt(v)), T && "hide-on-desktop", x && "hide-on-mobile", k && "hide-on-tablet-landscape", z && "hide-on-tablet-portrait", P && "margin-right-".concat(P, " margin-left-").concat(P), N && "padding-right-".concat(N, " padding-left-").concat(N), j && "horizontally-centre-this", L && "horizontally-centre-this", M && "full-height", I && "full-width", F && "layout-flexbox", R && "layout-grid", A && "margin-left-".concat(A), B && "margin-bottom-".concat(B), D && "margin-all-".concat(D), E && "margin-right-".concat(E), G && "margin-top-".concat(G), H && "opacity-".concat(H), S && "padding-bottom-".concat(S), W && "padding-left-".concat(W), q && "padding-all-".concat(q), J && "padding-right-".concat(J), K && "padding-top-".concat(K), Q && "push-to-ends", U && "shadow-".concat(U), V && "shape-".concat(V), X && "show-only-on-desktop", Y && "show-only-on-mobile", Z && "show-only-on-tablet-landscape", $ && "show-only-on-tablet-portrait", _ && "size-".concat(_), tt && "stroke-".concat(dt(tt)), ot && "stroke-".concat(dt(ot)), at && "text-".concat(dt(at)), nt && "text-".concat(dt(nt)), et && "margin-top-".concat(et, " margin-bottom-").concat(et), rt && "padding-top-".concat(rt, " padding-bottom-").concat(rt), it && "vertically-centre-items", lt && "vertically-centre-items", ct && "weight-".concat(ct)].concat(p)), style: R ? { gridTemplateColumns: "repeat(".concat(O, ", 1fr)"), gap: w } : { gap: w } }));
|
|
43
43
|
});
|
|
44
44
|
export {
|
|
45
45
|
l as Element
|
|
@@ -29,16 +29,20 @@ export interface CommonProps {
|
|
|
29
29
|
layoutAsGrid?: boolean;
|
|
30
30
|
columns?: string;
|
|
31
31
|
gap?: string;
|
|
32
|
+
margin?: SpacingTypes;
|
|
33
|
+
horizontalMargin?: SpacingTypes;
|
|
34
|
+
verticalMargin?: SpacingTypes;
|
|
32
35
|
marginTop?: SpacingTypes;
|
|
33
36
|
marginRight?: SpacingTypes;
|
|
34
37
|
marginBottom?: SpacingTypes;
|
|
35
38
|
marginLeft?: SpacingTypes;
|
|
36
|
-
|
|
39
|
+
padding?: SpacingTypes;
|
|
40
|
+
horizontalPadding?: SpacingTypes;
|
|
41
|
+
verticalPadding?: SpacingTypes;
|
|
37
42
|
paddingTop?: SpacingTypes;
|
|
38
43
|
paddingRight?: SpacingTypes;
|
|
39
44
|
paddingBottom?: SpacingTypes;
|
|
40
45
|
paddingLeft?: SpacingTypes;
|
|
41
|
-
padding?: SpacingTypes;
|
|
42
46
|
horizontallyCentreThis?: boolean;
|
|
43
47
|
horizontallyCenterThis?: boolean;
|
|
44
48
|
verticallyCentreItems?: boolean;
|
|
@@ -60,7 +64,7 @@ export interface CommonProps {
|
|
|
60
64
|
export interface CommonAndHTMLProps<T extends {}> extends CommonProps, Omit<HTMLProps<T>, "as" | "size" | "ref" | "shape"> {
|
|
61
65
|
}
|
|
62
66
|
export interface ElementProps<T extends {}> extends CommonProps, Omit<HTMLProps<T>, "as" | "ref" | "shape"> {
|
|
63
|
-
as
|
|
67
|
+
as?: ElementType;
|
|
64
68
|
className?: string;
|
|
65
69
|
}
|
|
66
70
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),r=require("../../Element/Element.cjs");require("../../../sliding-selector-k52RqIHf.cjs");var t=["options","onClick"];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 i=e.forwardRef((function(i,l){var o=i.options,a=i.onClick,c=function(e,r){if(null==e)return{};var t,n,i=function(e,r){if(null==e)return{};var t,n,i={},l=Object.keys(e);for(n=0;n<l.length;n++)t=l[n],r.indexOf(t)>=0||(i[t]=e[t]);return i}(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)&&(i[t]=e[t])}return i}(i,t);return e.createElement(r.Element,{as:"div","data-sliding-selector":!0,ref:l,onClick:a},o.map((function(r){return e.createElement(e.Fragment,{key:r.id},e.createElement("input",n({type:"radio",id:r.id,name:r.id,value:r.value},c)),e.createElement("label",{htmlFor:r.id},r.label))})))}));exports.SlidingSelector=i;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { RadioButtonProps, RadioGroupProps } from "./constants";
|
|
3
|
+
export interface SlidingSelectorProps extends RadioButtonProps {
|
|
4
|
+
options: RadioGroupProps[];
|
|
5
|
+
}
|
|
6
|
+
export declare const SlidingSelector: React.ForwardRefExoticComponent<SlidingSelectorProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import e from "react";
|
|
2
|
+
import { Element as r } from "../../Element/Element.js";
|
|
3
|
+
import "../../../sliding-selector-w40geAFS.js";
|
|
4
|
+
var t = ["options", "onClick"];
|
|
5
|
+
function n() {
|
|
6
|
+
return n = Object.assign ? Object.assign.bind() : function(e2) {
|
|
7
|
+
for (var r2 = 1; r2 < arguments.length; r2++) {
|
|
8
|
+
var t2 = arguments[r2];
|
|
9
|
+
for (var n2 in t2)
|
|
10
|
+
Object.prototype.hasOwnProperty.call(t2, n2) && (e2[n2] = t2[n2]);
|
|
11
|
+
}
|
|
12
|
+
return e2;
|
|
13
|
+
}, n.apply(this, arguments);
|
|
14
|
+
}
|
|
15
|
+
function o(e2, r2) {
|
|
16
|
+
if (null == e2)
|
|
17
|
+
return {};
|
|
18
|
+
var t2, n2, o2 = function(e3, r3) {
|
|
19
|
+
if (null == e3)
|
|
20
|
+
return {};
|
|
21
|
+
var t3, n3, o3 = {}, i3 = Object.keys(e3);
|
|
22
|
+
for (n3 = 0; n3 < i3.length; n3++)
|
|
23
|
+
t3 = i3[n3], r3.indexOf(t3) >= 0 || (o3[t3] = e3[t3]);
|
|
24
|
+
return o3;
|
|
25
|
+
}(e2, r2);
|
|
26
|
+
if (Object.getOwnPropertySymbols) {
|
|
27
|
+
var i2 = Object.getOwnPropertySymbols(e2);
|
|
28
|
+
for (n2 = 0; n2 < i2.length; n2++)
|
|
29
|
+
t2 = i2[n2], r2.indexOf(t2) >= 0 || Object.prototype.propertyIsEnumerable.call(e2, t2) && (o2[t2] = e2[t2]);
|
|
30
|
+
}
|
|
31
|
+
return o2;
|
|
32
|
+
}
|
|
33
|
+
var i = /* @__PURE__ */ e.forwardRef(function(i2, l) {
|
|
34
|
+
var a = i2.options, c = i2.onClick, f = o(i2, t);
|
|
35
|
+
return e.createElement(r, { as: "div", "data-sliding-selector": true, ref: l, onClick: c }, a.map(function(r2) {
|
|
36
|
+
return e.createElement(e.Fragment, { key: r2.id }, /* @__PURE__ */ e.createElement("input", n({ type: "radio", id: r2.id, name: r2.id, value: r2.value }, f)), /* @__PURE__ */ e.createElement("label", { htmlFor: r2.id }, r2.label));
|
|
37
|
+
}));
|
|
38
|
+
});
|
|
39
|
+
export {
|
|
40
|
+
i as SlidingSelector
|
|
41
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./FormWrapper/FormWrapper.cjs"),r=require("./FormItem/FormItem.cjs"),o=require("./FormItemGroup/FormItemGroup.cjs"),t=require("./InputField/InputField.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./FormWrapper/FormWrapper.cjs"),r=require("./FormItem/FormItem.cjs"),o=require("./FormItemGroup/FormItemGroup.cjs"),t=require("./InputField/InputField.cjs"),i=require("./TextArea/TextArea.cjs"),u=require("./InputLabel/InputLabel.cjs"),p=require("./Select/Select.cjs"),s=require("./InputField/FileUpload.cjs"),c=require("./RadioButton/RadioGroup.cjs"),a=require("./Range/Range.cjs"),n=require("./RadioButton/RadioButton.cjs"),l=require("./CheckBox/CheckBox.cjs"),m=require("./CheckBox/Switch.cjs"),x=require("./RadioButton/SlidingSelector.cjs");require("react"),require("../Element/Element.cjs"),require("../Callout/Callout.cjs"),require("./FormWrapper/FormGenerator.cjs"),require("../Row/Row.cjs"),require("../Portion/Portion.cjs"),require("./BaseInputComponent/BaseInputComponent.cjs"),require("../../sliding-selector-k52RqIHf.cjs"),exports.FormWrapper=e.FormWrapper,exports.FormItem=r.FormItem,exports.FormItemGroup=o.FormItemGroup,exports.InputField=t.InputField,exports.TextArea=i.TextArea,exports.InputLabel=u.InputLabel,exports.Select=p.Select,exports.FileUpload=s.FileUpload,exports.RadioGroup=c.RadioGroup,exports.Range=a.Range,exports.RadioButton=n.RadioButton,exports.CheckBox=l.CheckBox,exports.Switch=m.Switch,exports.SlidingSelector=x.SlidingSelector;
|
|
@@ -12,3 +12,4 @@ export { Range, type RangeProps } from "./Range";
|
|
|
12
12
|
export { RadioButton } from "./RadioButton/RadioButton";
|
|
13
13
|
export { CheckBox, type CheckboxProps } from "./CheckBox/CheckBox";
|
|
14
14
|
export { Switch, type SwitchProps } from "./CheckBox/Switch";
|
|
15
|
+
export { SlidingSelector, type SlidingSelectorProps } from "./RadioButton/SlidingSelector";
|
|
@@ -11,6 +11,7 @@ import { Range } from "./Range/Range.js";
|
|
|
11
11
|
import { RadioButton } from "./RadioButton/RadioButton.js";
|
|
12
12
|
import { CheckBox } from "./CheckBox/CheckBox.js";
|
|
13
13
|
import { Switch } from "./CheckBox/Switch.js";
|
|
14
|
+
import { SlidingSelector } from "./RadioButton/SlidingSelector.js";
|
|
14
15
|
import "react";
|
|
15
16
|
import "../Element/Element.js";
|
|
16
17
|
import "../Callout/Callout.js";
|
|
@@ -18,6 +19,7 @@ import "./FormWrapper/FormGenerator.js";
|
|
|
18
19
|
import "../Row/Row.js";
|
|
19
20
|
import "../Portion/Portion.js";
|
|
20
21
|
import "./BaseInputComponent/BaseInputComponent.js";
|
|
22
|
+
import "../../sliding-selector-w40geAFS.js";
|
|
21
23
|
export {
|
|
22
24
|
CheckBox,
|
|
23
25
|
FileUpload,
|
|
@@ -30,6 +32,7 @@ export {
|
|
|
30
32
|
RadioGroup,
|
|
31
33
|
Range,
|
|
32
34
|
Select,
|
|
35
|
+
SlidingSelector,
|
|
33
36
|
Switch,
|
|
34
37
|
TextArea
|
|
35
38
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),r=require("../Element/Element.cjs");var t=["kind"
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),r=require("../Element/Element.cjs");var t=["kind"];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 o=e.forwardRef((function(o,a){var l=o.kind,i=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}(o,t),u=[];return l&&u.push(l),e.createElement(r.Element,n({as:"hr",ref:a,classNames:u},i))}));exports.HRule=o;
|
|
@@ -2,8 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { CommonAndHTMLProps } from "../Element/constants";
|
|
3
3
|
export interface HRCustomProps {
|
|
4
4
|
kind?: "primary" | "secondary" | "tertiary";
|
|
5
|
-
sideMargin?: "nano" | "micro" | "tiny" | "small" | "medium" | "large" | "huge";
|
|
6
5
|
}
|
|
7
6
|
export type HRElementType = HTMLHRElement;
|
|
8
7
|
export type HRProps = Omit<CommonAndHTMLProps<HRElementType>, keyof HRCustomProps> & HRCustomProps;
|
|
9
|
-
export declare const HRule: React.ForwardRefExoticComponent<Omit<CommonAndHTMLProps<HTMLHRElement>,
|
|
8
|
+
export declare const HRule: React.ForwardRefExoticComponent<Omit<CommonAndHTMLProps<HTMLHRElement>, "kind"> & HRCustomProps & React.RefAttributes<HTMLHRElement>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import r from "react";
|
|
2
2
|
import { Element as e } from "../Element/Element.js";
|
|
3
|
-
var t = ["kind"
|
|
3
|
+
var t = ["kind"];
|
|
4
4
|
function n() {
|
|
5
5
|
return n = Object.assign ? Object.assign.bind() : function(r2) {
|
|
6
6
|
for (var e2 = 1; e2 < arguments.length; e2++) {
|
|
@@ -11,28 +11,28 @@ function n() {
|
|
|
11
11
|
return r2;
|
|
12
12
|
}, n.apply(this, arguments);
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function o(r2, e2) {
|
|
15
15
|
if (null == r2)
|
|
16
16
|
return {};
|
|
17
|
-
var t2, n2,
|
|
17
|
+
var t2, n2, o2 = function(r3, e3) {
|
|
18
18
|
if (null == r3)
|
|
19
19
|
return {};
|
|
20
|
-
var t3, n3,
|
|
21
|
-
for (n3 = 0; n3 <
|
|
22
|
-
t3 =
|
|
23
|
-
return
|
|
20
|
+
var t3, n3, o3 = {}, a3 = Object.keys(r3);
|
|
21
|
+
for (n3 = 0; n3 < a3.length; n3++)
|
|
22
|
+
t3 = a3[n3], e3.indexOf(t3) >= 0 || (o3[t3] = r3[t3]);
|
|
23
|
+
return o3;
|
|
24
24
|
}(r2, e2);
|
|
25
25
|
if (Object.getOwnPropertySymbols) {
|
|
26
|
-
var
|
|
27
|
-
for (n2 = 0; n2 <
|
|
28
|
-
t2 =
|
|
26
|
+
var a2 = Object.getOwnPropertySymbols(r2);
|
|
27
|
+
for (n2 = 0; n2 < a2.length; n2++)
|
|
28
|
+
t2 = a2[n2], e2.indexOf(t2) >= 0 || Object.prototype.propertyIsEnumerable.call(r2, t2) && (o2[t2] = r2[t2]);
|
|
29
29
|
}
|
|
30
|
-
return
|
|
30
|
+
return o2;
|
|
31
31
|
}
|
|
32
|
-
var
|
|
33
|
-
var
|
|
34
|
-
return
|
|
32
|
+
var a = /* @__PURE__ */ r.forwardRef(function(a2, f) {
|
|
33
|
+
var i = a2.kind, l = o(a2, t), c = [];
|
|
34
|
+
return i && c.push(i), /* @__PURE__ */ r.createElement(e, n({ as: "hr", ref: f, classNames: c }, l));
|
|
35
35
|
});
|
|
36
36
|
export {
|
|
37
|
-
|
|
37
|
+
a as HRule
|
|
38
38
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),e=require("../Element/Element.cjs");var
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),e=require("../Element/Element.cjs");var r=["layout","gutters","retainLayoutOnTabletLandscape","retainLayoutOnTabletPortrait","retainLayoutOnMobile","retainLayoutAlways","equaliseChildren","equalizeChildren"];function a(){return a=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},a.apply(this,arguments)}var n=t.forwardRef((function(n,o){var i=n.layout,l=void 0===i?"grid":i,u=n.gutters,s=n.retainLayoutOnTabletLandscape,y=n.retainLayoutOnTabletPortrait,c=n.retainLayoutOnMobile,p=n.retainLayoutAlways,b=n.equaliseChildren,d=n.equalizeChildren,O=function(t,e){if(null==t)return{};var r,a,n=function(t,e){if(null==t)return{};var r,a,n={},o=Object.keys(t);for(a=0;a<o.length;a++)r=o[a],e.indexOf(r)>=0||(n[r]=t[r]);return n}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(a=0;a<o.length;a++)r=o[a],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}(n,r),f=[];l&&f.push("layout-".concat(l));var h=null!=u?u:"grid"===l?"medium":"none";return h&&f.push("none"===h?"no-gutters":"".concat(h,"-gutters")),(b||d)&&f.push("equalise-children"),s&&f.push("retain-layout-on-tablet-landscape"),y&&f.push("retain-layout-on-tablet-portrait"),c&&f.push("retain-layout-on-mobile"),p&&f.push("retain-layout-on-tablet-landscape retain-layout-on-tablet-portrait retain-layout-on-mobile"),t.createElement(e.Element,a({as:"div","data-row":!0,ref:o,classNames:[f.join(" ")],marginBottom:"tiny"},O))}));exports.Row=n;
|