@radui/ui 0.0.4 → 0.0.6

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.
@@ -13,22 +13,50 @@ function _extends() {
13
13
  };
14
14
  return _extends.apply(this, arguments);
15
15
  }
16
+ function _objectWithoutPropertiesLoose(source, excluded) {
17
+ if (source == null) return {};
18
+ var target = {};
19
+ var sourceKeys = Object.keys(source);
20
+ var key, i;
21
+ for (i = 0; i < sourceKeys.length; i++) {
22
+ key = sourceKeys[i];
23
+ if (excluded.indexOf(key) >= 0) continue;
24
+ target[key] = source[key];
25
+ }
26
+ return target;
27
+ }
28
+ function _objectWithoutProperties(source, excluded) {
29
+ if (source == null) return {};
30
+ var target = _objectWithoutPropertiesLoose(source, excluded);
31
+ var key, i;
32
+ if (Object.getOwnPropertySymbols) {
33
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
34
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
35
+ key = sourceSymbolKeys[i];
36
+ if (excluded.indexOf(key) >= 0) continue;
37
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
38
+ target[key] = source[key];
39
+ }
40
+ }
41
+ return target;
42
+ }
16
43
 
17
- const RAD_UI_CLASS_PREFIX = 'rad-ui';
18
- const customClassSwitcher = function (customRootClass) {
19
- let componentName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
44
+ var RAD_UI_CLASS_PREFIX = 'rad-ui';
45
+ var customClassSwitcher = function customClassSwitcher(customRootClass) {
46
+ var componentName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
20
47
  // applies a custom root class the user provides, else applies the default rad-ui classes to the component
21
48
  // rad ui's classes are based on this logic
22
49
 
23
50
  // add dashes between capitalized words
24
- const componentClassName = componentName.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();
51
+ var componentClassName = componentName.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();
25
52
  if (customRootClass) return customRootClass;
26
- if (componentName) return `${RAD_UI_CLASS_PREFIX}-${componentClassName}`;
53
+ if (componentName) return "".concat(RAD_UI_CLASS_PREFIX, "-").concat(componentClassName);
27
54
  return '';
28
55
  };
29
56
 
30
- const COMPONENT_NAME = 'Callout';
31
- const InfoIcon = () => {
57
+ var _excluded = ["children", "className", "color", "customRootClass"];
58
+ var COMPONENT_NAME = 'Callout';
59
+ var InfoIcon = function InfoIcon() {
32
60
  return /*#__PURE__*/React.createElement("svg", {
33
61
  width: "18",
34
62
  height: "18",
@@ -42,15 +70,16 @@ const InfoIcon = () => {
42
70
  "clip-rule": "evenodd"
43
71
  }));
44
72
  };
45
- const Callout = _ref => {
46
- let {
47
- children,
48
- className = '',
49
- color = undefined,
50
- customRootClass = '',
51
- ...restOfTheProps
52
- } = _ref;
53
- const rootClass = customClassSwitcher(customRootClass, COMPONENT_NAME);
73
+ var Callout = function Callout(_ref) {
74
+ var children = _ref.children,
75
+ _ref$className = _ref.className,
76
+ className = _ref$className === void 0 ? '' : _ref$className,
77
+ _ref$color = _ref.color,
78
+ color = _ref$color === void 0 ? undefined : _ref$color,
79
+ _ref$customRootClass = _ref.customRootClass,
80
+ customRootClass = _ref$customRootClass === void 0 ? '' : _ref$customRootClass,
81
+ restOfTheProps = _objectWithoutProperties(_ref, _excluded);
82
+ var rootClass = customClassSwitcher(customRootClass, COMPONENT_NAME);
54
83
  if (color) {
55
84
  restOfTheProps['data-accent-color'] = color;
56
85
  }
@@ -58,7 +87,7 @@ const Callout = _ref => {
58
87
  // TODO: if children is a string then wrap it in a Text component, else return the children as is - need to add this to core logic helpers
59
88
 
60
89
  return /*#__PURE__*/React.createElement("div", _extends({
61
- className: `${rootClass} ${className}`
90
+ className: "".concat(rootClass, " ").concat(className)
62
91
  }, restOfTheProps), /*#__PURE__*/React.createElement(InfoIcon, null), " ", children);
63
92
  };
64
93
  Callout.displayName = COMPONENT_NAME;
@@ -1,10 +1,8 @@
1
1
  'use client';
2
2
  import React from 'react';
3
3
 
4
- const Code = _ref => {
5
- let {
6
- children
7
- } = _ref;
4
+ var Code = function Code(_ref) {
5
+ var children = _ref.children;
8
6
  return /*#__PURE__*/React.createElement("code", {
9
7
  className: "rui-code-root"
10
8
  }, children);
@@ -3,6 +3,56 @@ import * as React$1 from 'react';
3
3
  import { useLayoutEffect, useEffect, useState } from 'react';
4
4
  import * as ReactDOM from 'react-dom';
5
5
 
6
+ function _iterableToArrayLimit(r, l) {
7
+ var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
8
+ if (null != t) {
9
+ var e,
10
+ n,
11
+ i,
12
+ u,
13
+ a = [],
14
+ f = !0,
15
+ o = !1;
16
+ try {
17
+ if (i = (t = t.call(r)).next, 0 === l) {
18
+ if (Object(t) !== t) return;
19
+ f = !1;
20
+ } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
21
+ } catch (r) {
22
+ o = !0, n = r;
23
+ } finally {
24
+ try {
25
+ if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
26
+ } finally {
27
+ if (o) throw n;
28
+ }
29
+ }
30
+ return a;
31
+ }
32
+ }
33
+ function _slicedToArray(arr, i) {
34
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
35
+ }
36
+ function _arrayWithHoles(arr) {
37
+ if (Array.isArray(arr)) return arr;
38
+ }
39
+ function _unsupportedIterableToArray(o, minLen) {
40
+ if (!o) return;
41
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
42
+ var n = Object.prototype.toString.call(o).slice(8, -1);
43
+ if (n === "Object" && o.constructor) n = o.constructor.name;
44
+ if (n === "Map" || n === "Set") return Array.from(o);
45
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
46
+ }
47
+ function _arrayLikeToArray(arr, len) {
48
+ if (len == null || len > arr.length) len = arr.length;
49
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
50
+ return arr2;
51
+ }
52
+ function _nonIterableRest() {
53
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
54
+ }
55
+
6
56
  function getNodeName(node) {
7
57
  if (isNode(node)) {
8
58
  return (node.nodeName || '').toLowerCase();
@@ -1736,15 +1786,23 @@ function useFloating(options) {
1736
1786
  }), [position, refs, elements, context]);
1737
1787
  }
1738
1788
 
1739
- const Dropdown = _ref => {
1740
- const [isOpen, setIsOpen] = useState(false);
1789
+ var Dropdown = function Dropdown(_ref) {
1790
+ _ref.list;
1791
+ _ref.selected;
1792
+ var _useState = useState(false),
1793
+ _useState2 = _slicedToArray(_useState, 2),
1794
+ isOpen = _useState2[0],
1795
+ setIsOpen = _useState2[1];
1741
1796
  // todo
1742
- useFloating({
1743
- open: isOpen,
1744
- onOpenChange: setIsOpen,
1745
- middleware: [offset(10), flip(), shift()],
1746
- whileElementsMounted: autoUpdate
1747
- });
1797
+ var _useFloating = useFloating({
1798
+ open: isOpen,
1799
+ onOpenChange: setIsOpen,
1800
+ middleware: [offset(10), flip(), shift()],
1801
+ whileElementsMounted: autoUpdate
1802
+ });
1803
+ _useFloating.refs;
1804
+ _useFloating.floatingStyles;
1805
+ _useFloating.context;
1748
1806
  return /*#__PURE__*/React.createElement("div", null, "Dropdown");
1749
1807
  };
1750
1808
 
@@ -15,31 +15,59 @@ function _extends() {
15
15
  };
16
16
  return _extends.apply(this, arguments);
17
17
  }
18
+ function _objectWithoutPropertiesLoose(source, excluded) {
19
+ if (source == null) return {};
20
+ var target = {};
21
+ var sourceKeys = Object.keys(source);
22
+ var key, i;
23
+ for (i = 0; i < sourceKeys.length; i++) {
24
+ key = sourceKeys[i];
25
+ if (excluded.indexOf(key) >= 0) continue;
26
+ target[key] = source[key];
27
+ }
28
+ return target;
29
+ }
30
+ function _objectWithoutProperties(source, excluded) {
31
+ if (source == null) return {};
32
+ var target = _objectWithoutPropertiesLoose(source, excluded);
33
+ var key, i;
34
+ if (Object.getOwnPropertySymbols) {
35
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
36
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
37
+ key = sourceSymbolKeys[i];
38
+ if (excluded.indexOf(key) >= 0) continue;
39
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
40
+ target[key] = source[key];
41
+ }
42
+ }
43
+ return target;
44
+ }
18
45
 
19
- const RAD_UI_CLASS_PREFIX = 'rad-ui';
20
- const customClassSwitcher = function (customRootClass) {
21
- let componentName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
46
+ var RAD_UI_CLASS_PREFIX = 'rad-ui';
47
+ var customClassSwitcher = function customClassSwitcher(customRootClass) {
48
+ var componentName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
22
49
  // applies a custom root class the user provides, else applies the default rad-ui classes to the component
23
50
  // rad ui's classes are based on this logic
24
51
 
25
52
  // add dashes between capitalized words
26
- const componentClassName = componentName.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();
53
+ var componentClassName = componentName.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();
27
54
  if (customRootClass) return customRootClass;
28
- if (componentName) return `${RAD_UI_CLASS_PREFIX}-${componentClassName}`;
55
+ if (componentName) return "".concat(RAD_UI_CLASS_PREFIX, "-").concat(componentClassName);
29
56
  return '';
30
57
  };
31
58
 
32
- const COMPONENT_NAME = 'Em';
33
- const Em = _ref => {
34
- let {
35
- children,
36
- customRootClass = '',
37
- className = '',
38
- ...props
39
- } = _ref;
40
- const rootClass = customClassSwitcher(customRootClass, COMPONENT_NAME);
59
+ var _excluded = ["children", "customRootClass", "className"];
60
+ var COMPONENT_NAME = 'Em';
61
+ var Em = function Em(_ref) {
62
+ var children = _ref.children,
63
+ _ref$customRootClass = _ref.customRootClass,
64
+ customRootClass = _ref$customRootClass === void 0 ? '' : _ref$customRootClass,
65
+ _ref$className = _ref.className,
66
+ className = _ref$className === void 0 ? '' : _ref$className,
67
+ props = _objectWithoutProperties(_ref, _excluded);
68
+ var rootClass = customClassSwitcher(customRootClass, COMPONENT_NAME);
41
69
  return /*#__PURE__*/React.createElement("em", _extends({
42
- className: `${rootClass} ${className}`
70
+ className: "".concat(rootClass, " ").concat(className)
43
71
  }, props), children);
44
72
  };
45
73
  Em.displayName = COMPONENT_NAME;
@@ -16,20 +16,20 @@ function _extends() {
16
16
  return _extends.apply(this, arguments);
17
17
  }
18
18
 
19
- const RAD_UI_CLASS_PREFIX = 'rad-ui';
20
- const customClassSwitcher = function (customRootClass) {
21
- let componentName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
19
+ var RAD_UI_CLASS_PREFIX = 'rad-ui';
20
+ var customClassSwitcher = function customClassSwitcher(customRootClass) {
21
+ var componentName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
22
22
  // applies a custom root class the user provides, else applies the default rad-ui classes to the component
23
23
  // rad ui's classes are based on this logic
24
24
 
25
25
  // add dashes between capitalized words
26
- const componentClassName = componentName.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();
26
+ var componentClassName = componentName.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();
27
27
  if (customRootClass) return customRootClass;
28
- if (componentName) return `${RAD_UI_CLASS_PREFIX}-${componentClassName}`;
28
+ if (componentName) return "".concat(RAD_UI_CLASS_PREFIX, "-").concat(componentClassName);
29
29
  return '';
30
30
  };
31
31
 
32
- const RENDER_AS_ENUMS = [{
32
+ var RENDER_AS_ENUMS = [{
33
33
  label: 'H1',
34
34
  tag: 'h1'
35
35
  }, {
@@ -48,27 +48,31 @@ const RENDER_AS_ENUMS = [{
48
48
  label: 'H6',
49
49
  tag: 'h6'
50
50
  }];
51
- const Heading = function (_ref) {
52
- let {
53
- children,
54
- as = undefined,
55
- customRootClass = '',
56
- className = ''
57
- } = _ref;
58
- const rootClass = customClassSwitcher(customRootClass, as || 'h1');
51
+ var Heading = function Heading(_ref) {
52
+ var children = _ref.children,
53
+ _ref$as = _ref.as,
54
+ as = _ref$as === void 0 ? undefined : _ref$as,
55
+ _ref$customRootClass = _ref.customRootClass,
56
+ customRootClass = _ref$customRootClass === void 0 ? '' : _ref$customRootClass,
57
+ _ref$className = _ref.className,
58
+ className = _ref$className === void 0 ? '' : _ref$className;
59
+ var rootClass = customClassSwitcher(customRootClass, as || 'h1');
59
60
  for (var _len = arguments.length, props = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
60
61
  props[_key - 1] = arguments[_key];
61
62
  }
62
- if (as !== undefined && RENDER_AS_ENUMS.find(item => item.tag === as)) {
63
- const {
64
- tag: Tag
65
- } = RENDER_AS_ENUMS.find(item => item.tag === as);
63
+ if (as !== undefined && RENDER_AS_ENUMS.find(function (item) {
64
+ return item.tag === as;
65
+ })) {
66
+ var _RENDER_AS_ENUMS$find = RENDER_AS_ENUMS.find(function (item) {
67
+ return item.tag === as;
68
+ }),
69
+ Tag = _RENDER_AS_ENUMS$find.tag;
66
70
  return /*#__PURE__*/React.createElement(Tag, _extends({
67
- className: `${rootClass} ${className}`
71
+ className: "".concat(rootClass, " ").concat(className)
68
72
  }, props), children);
69
73
  }
70
74
  return /*#__PURE__*/React.createElement("h1", _extends({
71
- className: `${rootClass} ${className}`
75
+ className: "".concat(rootClass, " ").concat(className)
72
76
  }, props), children);
73
77
  };
74
78
  Heading.displayName = 'Heading';
@@ -15,31 +15,59 @@ function _extends() {
15
15
  };
16
16
  return _extends.apply(this, arguments);
17
17
  }
18
+ function _objectWithoutPropertiesLoose(source, excluded) {
19
+ if (source == null) return {};
20
+ var target = {};
21
+ var sourceKeys = Object.keys(source);
22
+ var key, i;
23
+ for (i = 0; i < sourceKeys.length; i++) {
24
+ key = sourceKeys[i];
25
+ if (excluded.indexOf(key) >= 0) continue;
26
+ target[key] = source[key];
27
+ }
28
+ return target;
29
+ }
30
+ function _objectWithoutProperties(source, excluded) {
31
+ if (source == null) return {};
32
+ var target = _objectWithoutPropertiesLoose(source, excluded);
33
+ var key, i;
34
+ if (Object.getOwnPropertySymbols) {
35
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
36
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
37
+ key = sourceSymbolKeys[i];
38
+ if (excluded.indexOf(key) >= 0) continue;
39
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
40
+ target[key] = source[key];
41
+ }
42
+ }
43
+ return target;
44
+ }
18
45
 
19
- const RAD_UI_CLASS_PREFIX = 'rad-ui';
20
- const customClassSwitcher = function (customRootClass) {
21
- let componentName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
46
+ var RAD_UI_CLASS_PREFIX = 'rad-ui';
47
+ var customClassSwitcher = function customClassSwitcher(customRootClass) {
48
+ var componentName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
22
49
  // applies a custom root class the user provides, else applies the default rad-ui classes to the component
23
50
  // rad ui's classes are based on this logic
24
51
 
25
52
  // add dashes between capitalized words
26
- const componentClassName = componentName.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();
53
+ var componentClassName = componentName.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();
27
54
  if (customRootClass) return customRootClass;
28
- if (componentName) return `${RAD_UI_CLASS_PREFIX}-${componentClassName}`;
55
+ if (componentName) return "".concat(RAD_UI_CLASS_PREFIX, "-").concat(componentClassName);
29
56
  return '';
30
57
  };
31
58
 
32
- const COMPONENT_NAME = 'Kbd';
33
- const Kbd = _ref => {
34
- let {
35
- children,
36
- customRootClass = '',
37
- className = '',
38
- ...rest
39
- } = _ref;
40
- const rootClass = customClassSwitcher(customRootClass, COMPONENT_NAME);
59
+ var _excluded = ["children", "customRootClass", "className"];
60
+ var COMPONENT_NAME = 'Kbd';
61
+ var Kbd = function Kbd(_ref) {
62
+ var children = _ref.children,
63
+ _ref$customRootClass = _ref.customRootClass,
64
+ customRootClass = _ref$customRootClass === void 0 ? '' : _ref$customRootClass,
65
+ _ref$className = _ref.className,
66
+ className = _ref$className === void 0 ? '' : _ref$className,
67
+ rest = _objectWithoutProperties(_ref, _excluded);
68
+ var rootClass = customClassSwitcher(customRootClass, COMPONENT_NAME);
41
69
  return /*#__PURE__*/React.createElement("kbd", _extends({
42
- className: `${rootClass} ${className}`
70
+ className: "".concat(rootClass, " ").concat(className)
43
71
  }, rest), children);
44
72
  };
45
73
 
@@ -15,35 +15,65 @@ function _extends() {
15
15
  };
16
16
  return _extends.apply(this, arguments);
17
17
  }
18
+ function _objectWithoutPropertiesLoose(source, excluded) {
19
+ if (source == null) return {};
20
+ var target = {};
21
+ var sourceKeys = Object.keys(source);
22
+ var key, i;
23
+ for (i = 0; i < sourceKeys.length; i++) {
24
+ key = sourceKeys[i];
25
+ if (excluded.indexOf(key) >= 0) continue;
26
+ target[key] = source[key];
27
+ }
28
+ return target;
29
+ }
30
+ function _objectWithoutProperties(source, excluded) {
31
+ if (source == null) return {};
32
+ var target = _objectWithoutPropertiesLoose(source, excluded);
33
+ var key, i;
34
+ if (Object.getOwnPropertySymbols) {
35
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
36
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
37
+ key = sourceSymbolKeys[i];
38
+ if (excluded.indexOf(key) >= 0) continue;
39
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
40
+ target[key] = source[key];
41
+ }
42
+ }
43
+ return target;
44
+ }
18
45
 
19
- const RAD_UI_CLASS_PREFIX = 'rad-ui';
20
- const customClassSwitcher = function (customRootClass) {
21
- let componentName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
46
+ var RAD_UI_CLASS_PREFIX = 'rad-ui';
47
+ var customClassSwitcher = function customClassSwitcher(customRootClass) {
48
+ var componentName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
22
49
  // applies a custom root class the user provides, else applies the default rad-ui classes to the component
23
50
  // rad ui's classes are based on this logic
24
51
 
25
52
  // add dashes between capitalized words
26
- const componentClassName = componentName.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();
53
+ var componentClassName = componentName.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();
27
54
  if (customRootClass) return customRootClass;
28
- if (componentName) return `${RAD_UI_CLASS_PREFIX}-${componentClassName}`;
55
+ if (componentName) return "".concat(RAD_UI_CLASS_PREFIX, "-").concat(componentClassName);
29
56
  return '';
30
57
  };
31
58
 
32
- const COMPONENT_NAME = 'Link';
33
- const Link = _ref => {
34
- let {
35
- children,
36
- href = '#',
37
- alt = '',
38
- customRootClass = '',
39
- className = '',
40
- ...props
41
- } = _ref;
42
- const rootClass = customClassSwitcher(customRootClass, COMPONENT_NAME);
59
+ var _excluded = ["children", "href", "alt", "customRootClass", "className"];
60
+ var COMPONENT_NAME = 'Link';
61
+ var Link = function Link(_ref) {
62
+ var children = _ref.children,
63
+ _ref$href = _ref.href,
64
+ href = _ref$href === void 0 ? '#' : _ref$href,
65
+ _ref$alt = _ref.alt,
66
+ alt = _ref$alt === void 0 ? '' : _ref$alt,
67
+ _ref$customRootClass = _ref.customRootClass,
68
+ customRootClass = _ref$customRootClass === void 0 ? '' : _ref$customRootClass,
69
+ _ref$className = _ref.className,
70
+ className = _ref$className === void 0 ? '' : _ref$className,
71
+ props = _objectWithoutProperties(_ref, _excluded);
72
+ var rootClass = customClassSwitcher(customRootClass, COMPONENT_NAME);
43
73
  return /*#__PURE__*/React.createElement("a", _extends({
44
74
  href: href,
45
75
  alt: alt,
46
- className: `${rootClass} ${className}`
76
+ className: "".concat(rootClass, " ").concat(className)
47
77
  }, props), children);
48
78
  };
49
79
  Link.displayName = COMPONENT_NAME;
@@ -15,31 +15,59 @@ function _extends() {
15
15
  };
16
16
  return _extends.apply(this, arguments);
17
17
  }
18
+ function _objectWithoutPropertiesLoose(source, excluded) {
19
+ if (source == null) return {};
20
+ var target = {};
21
+ var sourceKeys = Object.keys(source);
22
+ var key, i;
23
+ for (i = 0; i < sourceKeys.length; i++) {
24
+ key = sourceKeys[i];
25
+ if (excluded.indexOf(key) >= 0) continue;
26
+ target[key] = source[key];
27
+ }
28
+ return target;
29
+ }
30
+ function _objectWithoutProperties(source, excluded) {
31
+ if (source == null) return {};
32
+ var target = _objectWithoutPropertiesLoose(source, excluded);
33
+ var key, i;
34
+ if (Object.getOwnPropertySymbols) {
35
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
36
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
37
+ key = sourceSymbolKeys[i];
38
+ if (excluded.indexOf(key) >= 0) continue;
39
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
40
+ target[key] = source[key];
41
+ }
42
+ }
43
+ return target;
44
+ }
18
45
 
19
- const RAD_UI_CLASS_PREFIX = 'rad-ui';
20
- const customClassSwitcher = function (customRootClass) {
21
- let componentName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
46
+ var RAD_UI_CLASS_PREFIX = 'rad-ui';
47
+ var customClassSwitcher = function customClassSwitcher(customRootClass) {
48
+ var componentName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
22
49
  // applies a custom root class the user provides, else applies the default rad-ui classes to the component
23
50
  // rad ui's classes are based on this logic
24
51
 
25
52
  // add dashes between capitalized words
26
- const componentClassName = componentName.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();
53
+ var componentClassName = componentName.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();
27
54
  if (customRootClass) return customRootClass;
28
- if (componentName) return `${RAD_UI_CLASS_PREFIX}-${componentClassName}`;
55
+ if (componentName) return "".concat(RAD_UI_CLASS_PREFIX, "-").concat(componentClassName);
29
56
  return '';
30
57
  };
31
58
 
32
- const COMPONENT_NAME = 'Quote';
33
- const Quote = _ref => {
34
- let {
35
- children,
36
- customRootClass = '',
37
- className = '',
38
- ...props
39
- } = _ref;
40
- const rootClass = customClassSwitcher(customRootClass, COMPONENT_NAME);
59
+ var _excluded = ["children", "customRootClass", "className"];
60
+ var COMPONENT_NAME = 'Quote';
61
+ var Quote = function Quote(_ref) {
62
+ var children = _ref.children,
63
+ _ref$customRootClass = _ref.customRootClass,
64
+ customRootClass = _ref$customRootClass === void 0 ? '' : _ref$customRootClass,
65
+ _ref$className = _ref.className,
66
+ className = _ref$className === void 0 ? '' : _ref$className,
67
+ props = _objectWithoutProperties(_ref, _excluded);
68
+ var rootClass = customClassSwitcher(customRootClass, COMPONENT_NAME);
41
69
  return /*#__PURE__*/React.createElement("q", _extends({
42
- className: `${rootClass} ${className}`
70
+ className: "".concat(rootClass, " ").concat(className)
43
71
  }, props), children);
44
72
  };
45
73
  Quote.displayName = COMPONENT_NAME;
@@ -1,30 +1,31 @@
1
1
  'use client';
2
2
  import React from 'react';
3
3
 
4
- const RAD_UI_CLASS_PREFIX = 'rad-ui';
5
- const customClassSwitcher = function (customRootClass) {
6
- let componentName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
4
+ var RAD_UI_CLASS_PREFIX = 'rad-ui';
5
+ var customClassSwitcher = function customClassSwitcher(customRootClass) {
6
+ var componentName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
7
7
  // applies a custom root class the user provides, else applies the default rad-ui classes to the component
8
8
  // rad ui's classes are based on this logic
9
9
 
10
10
  // add dashes between capitalized words
11
- const componentClassName = componentName.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();
11
+ var componentClassName = componentName.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();
12
12
  if (customRootClass) return customRootClass;
13
- if (componentName) return `${RAD_UI_CLASS_PREFIX}-${componentClassName}`;
13
+ if (componentName) return "".concat(RAD_UI_CLASS_PREFIX, "-").concat(componentClassName);
14
14
  return '';
15
15
  };
16
16
 
17
- const COMPONENT_NAME = 'Separator';
18
- const Separator = _ref => {
19
- let {
20
- orientation = 'horizontal',
21
- className = '',
22
- customRootClass = ''
23
- } = _ref;
24
- const rootClass = customClassSwitcher(customRootClass, COMPONENT_NAME);
25
- const orientationClass = orientation === 'vertical' ? `${rootClass}-vertical` : `${rootClass}-horizontal`;
17
+ var COMPONENT_NAME = 'Separator';
18
+ var Separator = function Separator(_ref) {
19
+ var _ref$orientation = _ref.orientation,
20
+ orientation = _ref$orientation === void 0 ? 'horizontal' : _ref$orientation,
21
+ _ref$className = _ref.className,
22
+ className = _ref$className === void 0 ? '' : _ref$className,
23
+ _ref$customRootClass = _ref.customRootClass,
24
+ customRootClass = _ref$customRootClass === void 0 ? '' : _ref$customRootClass;
25
+ var rootClass = customClassSwitcher(customRootClass, COMPONENT_NAME);
26
+ var orientationClass = orientation === 'vertical' ? "".concat(rootClass, "-vertical") : "".concat(rootClass, "-horizontal");
26
27
  return /*#__PURE__*/React.createElement("div", {
27
- className: `${rootClass} ${orientationClass} ${className}`
28
+ className: "".concat(rootClass, " ").concat(orientationClass, " ").concat(className)
28
29
  });
29
30
  };
30
31
  Separator.displayName = COMPONENT_NAME;
@@ -1,8 +1,6 @@
1
1
  'use client';
2
- const Strong = _ref => {
3
- let {
4
- children
5
- } = _ref;
2
+ var Strong = function Strong(_ref) {
3
+ var children = _ref.children;
6
4
  return /*#__PURE__*/React.createElement("strong", null, children);
7
5
  };
8
6