@radui/ui 0.0.10 → 0.0.12
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/shards/AccordionContent.d.ts +10 -0
- package/dist/components/Accordion/shards/AccordionContent.d.ts.map +1 -0
- package/dist/components/Accordion/shards/AccordionHeader.d.ts +8 -0
- package/dist/components/Accordion/shards/AccordionHeader.d.ts.map +1 -0
- package/dist/components/Accordion/shards/AccordionItem.d.ts +9 -0
- package/dist/components/Accordion/shards/AccordionItem.d.ts.map +1 -0
- package/dist/components/Accordion/shards/AccordionRoot.d.ts +8 -0
- package/dist/components/Accordion/shards/AccordionRoot.d.ts.map +1 -0
- package/dist/components/Accordion/shards/AccordionTrigger.d.ts +11 -0
- package/dist/components/Accordion/shards/AccordionTrigger.d.ts.map +1 -0
- package/dist/components/Accordion.js +1 -81
- package/dist/components/Avatar/shards/AvatarFallback.d.ts.map +1 -0
- package/dist/components/Avatar/shards/AvatarImage.d.ts.map +1 -0
- package/dist/components/Avatar/shards/AvatarRoot.d.ts.map +1 -0
- package/dist/components/Avatar.js +1 -165
- package/dist/components/Badge.js +1 -80
- package/dist/components/BlockQuote.js +1 -75
- package/dist/components/Button.js +1 -69
- package/dist/components/Callout.js +1 -95
- package/dist/components/Code.js +1 -11
- package/dist/components/Dropdown.js +1 -1809
- package/dist/components/Em.js +1 -75
- package/dist/components/Heading.js +1 -80
- package/dist/components/Kbd.js +1 -74
- package/dist/components/Link.js +1 -81
- package/dist/components/Quote.js +1 -75
- package/dist/components/Separator.js +1 -33
- package/dist/components/Strong.js +1 -7
- package/dist/components/Tabs.js +1 -231
- package/dist/components/Text.js +1 -80
- package/dist/components/TextArea.js +1 -9
- package/dist/components/Tooltip.js +1 -58
- package/package.json +14 -3
- package/dist/components/AvatarFallback.d.ts.map +0 -1
- package/dist/components/AvatarImage.d.ts.map +0 -1
- package/dist/components/AvatarRoot.d.ts.map +0 -1
- /package/dist/components/{AvatarFallback.d.ts → Avatar/shards/AvatarFallback.d.ts} +0 -0
- /package/dist/components/{AvatarImage.d.ts → Avatar/shards/AvatarImage.d.ts} +0 -0
- /package/dist/components/{AvatarRoot.d.ts → Avatar/shards/AvatarRoot.d.ts} +0 -0
|
@@ -1,95 +1 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
function _extends() {
|
|
3
|
-
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
4
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
5
|
-
var source = arguments[i];
|
|
6
|
-
for (var key in source) {
|
|
7
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
8
|
-
target[key] = source[key];
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
return target;
|
|
13
|
-
};
|
|
14
|
-
return _extends.apply(this, arguments);
|
|
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
|
-
}
|
|
43
|
-
|
|
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] : '';
|
|
47
|
-
// applies a custom root class the user provides, else applies the default rad-ui classes to the component
|
|
48
|
-
// rad ui's classes are based on this logic
|
|
49
|
-
|
|
50
|
-
// add dashes between capitalized words
|
|
51
|
-
var componentClassName = componentName.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();
|
|
52
|
-
if (customRootClass) return customRootClass;
|
|
53
|
-
if (componentName) return "".concat(RAD_UI_CLASS_PREFIX, "-").concat(componentClassName);
|
|
54
|
-
return '';
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
var _excluded = ["children", "className", "color", "customRootClass"];
|
|
58
|
-
var COMPONENT_NAME = 'Callout';
|
|
59
|
-
var InfoIcon = function InfoIcon() {
|
|
60
|
-
return /*#__PURE__*/React.createElement("svg", {
|
|
61
|
-
width: "18",
|
|
62
|
-
height: "18",
|
|
63
|
-
viewBox: "0 0 15 15",
|
|
64
|
-
fill: "none",
|
|
65
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
66
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
67
|
-
d: "M7.49991 0.876892C3.84222 0.876892 0.877075 3.84204 0.877075 7.49972C0.877075 11.1574 3.84222 14.1226 7.49991 14.1226C11.1576 14.1226 14.1227 11.1574 14.1227 7.49972C14.1227 3.84204 11.1576 0.876892 7.49991 0.876892ZM1.82707 7.49972C1.82707 4.36671 4.36689 1.82689 7.49991 1.82689C10.6329 1.82689 13.1727 4.36671 13.1727 7.49972C13.1727 10.6327 10.6329 13.1726 7.49991 13.1726C4.36689 13.1726 1.82707 10.6327 1.82707 7.49972ZM8.24992 4.49999C8.24992 4.9142 7.91413 5.24999 7.49992 5.24999C7.08571 5.24999 6.74992 4.9142 6.74992 4.49999C6.74992 4.08577 7.08571 3.74999 7.49992 3.74999C7.91413 3.74999 8.24992 4.08577 8.24992 4.49999ZM6.00003 5.99999H6.50003H7.50003C7.77618 5.99999 8.00003 6.22384 8.00003 6.49999V9.99999H8.50003H9.00003V11H8.50003H7.50003H6.50003H6.00003V9.99999H6.50003H7.00003V6.99999H6.50003H6.00003V5.99999Z",
|
|
68
|
-
fill: "currentColor",
|
|
69
|
-
"fill-rule": "evenodd",
|
|
70
|
-
"clip-rule": "evenodd"
|
|
71
|
-
}));
|
|
72
|
-
};
|
|
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);
|
|
83
|
-
if (color) {
|
|
84
|
-
restOfTheProps['data-accent-color'] = color;
|
|
85
|
-
}
|
|
86
|
-
|
|
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
|
|
88
|
-
|
|
89
|
-
return /*#__PURE__*/React.createElement("div", _extends({
|
|
90
|
-
className: "".concat(rootClass, " ").concat(className)
|
|
91
|
-
}, restOfTheProps), /*#__PURE__*/React.createElement(InfoIcon, null), " ", children);
|
|
92
|
-
};
|
|
93
|
-
Callout.displayName = COMPONENT_NAME;
|
|
94
|
-
|
|
95
|
-
export { Callout as default };
|
|
1
|
+
'use client';function e(){return e=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},e.apply(this,arguments)}function t(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}var r=["children","className","color","customRootClass"],n="Callout",o=function(){return React.createElement("svg",{width:"18",height:"18",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("path",{d:"M7.49991 0.876892C3.84222 0.876892 0.877075 3.84204 0.877075 7.49972C0.877075 11.1574 3.84222 14.1226 7.49991 14.1226C11.1576 14.1226 14.1227 11.1574 14.1227 7.49972C14.1227 3.84204 11.1576 0.876892 7.49991 0.876892ZM1.82707 7.49972C1.82707 4.36671 4.36689 1.82689 7.49991 1.82689C10.6329 1.82689 13.1727 4.36671 13.1727 7.49972C13.1727 10.6327 10.6329 13.1726 7.49991 13.1726C4.36689 13.1726 1.82707 10.6327 1.82707 7.49972ZM8.24992 4.49999C8.24992 4.9142 7.91413 5.24999 7.49992 5.24999C7.08571 5.24999 6.74992 4.9142 6.74992 4.49999C6.74992 4.08577 7.08571 3.74999 7.49992 3.74999C7.91413 3.74999 8.24992 4.08577 8.24992 4.49999ZM6.00003 5.99999H6.50003H7.50003C7.77618 5.99999 8.00003 6.22384 8.00003 6.49999V9.99999H8.50003H9.00003V11H8.50003H7.50003H6.50003H6.00003V9.99999H6.50003H7.00003V6.99999H6.50003H6.00003V5.99999Z",fill:"currentColor","fill-rule":"evenodd","clip-rule":"evenodd"}))},a=function(a){var l=a.children,c=a.className,i=void 0===c?"":c,s=a.color,u=void 0===s?void 0:s,d=a.customRootClass,f=void 0===d?"":d,v=t(a,r),C=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return e||(t?"".concat("rad-ui","-").concat(r):"")}(f,n);return u&&(v["data-accent-color"]=u),React.createElement("div",e({className:"".concat(C," ").concat(i)},v),React.createElement(o,null)," ",l)};a.displayName=n;export{a as default};
|
package/dist/components/Code.js
CHANGED
|
@@ -1,11 +1 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
|
|
4
|
-
var Code = function Code(_ref) {
|
|
5
|
-
var children = _ref.children;
|
|
6
|
-
return /*#__PURE__*/React.createElement("code", {
|
|
7
|
-
className: "rui-code-root"
|
|
8
|
-
}, children);
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export { Code as default };
|
|
1
|
+
'use client';import e from"react";var r=function(r){var t=r.children;return e.createElement("code",{className:"rui-code-root"},t)};export{r as default};
|