@pluralsight/react
Advanced tools
Comparing version 0.4.1-next-19aa37 to 0.4.1-next-1f30d3
@@ -22,2 +22,24 @@ function ownKeys(object, enumerableOnly) { | ||
} | ||
function _classCallCheck(instance, Constructor) { | ||
if (!(instance instanceof Constructor)) { | ||
throw new TypeError("Cannot call a class as a function"); | ||
} | ||
} | ||
function _defineProperties(target, props) { | ||
for (var i = 0; i < props.length; i++) { | ||
var descriptor = props[i]; | ||
descriptor.enumerable = descriptor.enumerable || false; | ||
descriptor.configurable = true; | ||
if ("value" in descriptor) descriptor.writable = true; | ||
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); | ||
} | ||
} | ||
function _createClass(Constructor, protoProps, staticProps) { | ||
if (protoProps) _defineProperties(Constructor.prototype, protoProps); | ||
if (staticProps) _defineProperties(Constructor, staticProps); | ||
Object.defineProperty(Constructor, "prototype", { | ||
writable: false | ||
}); | ||
return Constructor; | ||
} | ||
function _defineProperty(obj, key, value) { | ||
@@ -37,2 +59,42 @@ key = _toPropertyKey(key); | ||
} | ||
function _inherits(subClass, superClass) { | ||
if (typeof superClass !== "function" && superClass !== null) { | ||
throw new TypeError("Super expression must either be null or a function"); | ||
} | ||
subClass.prototype = Object.create(superClass && superClass.prototype, { | ||
constructor: { | ||
value: subClass, | ||
writable: true, | ||
configurable: true | ||
} | ||
}); | ||
Object.defineProperty(subClass, "prototype", { | ||
writable: false | ||
}); | ||
if (superClass) _setPrototypeOf(subClass, superClass); | ||
} | ||
function _getPrototypeOf(o) { | ||
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { | ||
return o.__proto__ || Object.getPrototypeOf(o); | ||
}; | ||
return _getPrototypeOf(o); | ||
} | ||
function _setPrototypeOf(o, p) { | ||
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { | ||
o.__proto__ = p; | ||
return o; | ||
}; | ||
return _setPrototypeOf(o, p); | ||
} | ||
function _isNativeReflectConstruct() { | ||
if (typeof Reflect === "undefined" || !Reflect.construct) return false; | ||
if (Reflect.construct.sham) return false; | ||
if (typeof Proxy === "function") return true; | ||
try { | ||
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); | ||
return true; | ||
} catch (e) { | ||
return false; | ||
} | ||
} | ||
function _objectWithoutPropertiesLoose(source, excluded) { | ||
@@ -65,2 +127,30 @@ if (source == null) return {}; | ||
} | ||
function _assertThisInitialized(self) { | ||
if (self === void 0) { | ||
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | ||
} | ||
return self; | ||
} | ||
function _possibleConstructorReturn(self, call) { | ||
if (call && (typeof call === "object" || typeof call === "function")) { | ||
return call; | ||
} else if (call !== void 0) { | ||
throw new TypeError("Derived constructors may only return object or undefined"); | ||
} | ||
return _assertThisInitialized(self); | ||
} | ||
function _createSuper(Derived) { | ||
var hasNativeReflectConstruct = _isNativeReflectConstruct(); | ||
return function _createSuperInternal() { | ||
var Super = _getPrototypeOf(Derived), | ||
result; | ||
if (hasNativeReflectConstruct) { | ||
var NewTarget = _getPrototypeOf(this).constructor; | ||
result = Reflect.construct(Super, arguments, NewTarget); | ||
} else { | ||
result = Super.apply(this, arguments); | ||
} | ||
return _possibleConstructorReturn(this, result); | ||
}; | ||
} | ||
function _toPrimitive(input, hint) { | ||
@@ -81,3 +171,3 @@ if (typeof input !== "object" || input === null) return input; | ||
export { _defineProperty as defineProperty, _objectSpread2 as objectSpread2, _objectWithoutProperties as objectWithoutProperties, _objectWithoutPropertiesLoose as objectWithoutPropertiesLoose, _toPrimitive as toPrimitive, _toPropertyKey as toPropertyKey }; | ||
export { _assertThisInitialized as assertThisInitialized, _classCallCheck as classCallCheck, _createClass as createClass, _createSuper as createSuper, _defineProperty as defineProperty, _getPrototypeOf as getPrototypeOf, _inherits as inherits, _isNativeReflectConstruct as isNativeReflectConstruct, _objectSpread2 as objectSpread2, _objectWithoutProperties as objectWithoutProperties, _objectWithoutPropertiesLoose as objectWithoutPropertiesLoose, _possibleConstructorReturn as possibleConstructorReturn, _setPrototypeOf as setPrototypeOf, _toPrimitive as toPrimitive, _toPropertyKey as toPropertyKey }; | ||
//# sourceMappingURL=_rollupPluginBabelHelpers.js.map |
export { Admonition as unsafe_Admonition, AdmonitionHeading as unsafe_AdmonitionHeading, AdmonitionText as unsafe_AdmonitionText } from './src/components/Admonition.js'; | ||
export { Avatar as unsafe_Avatar } from './src/components/Avatar.js'; | ||
export { Badge as unsafe_Badge } from './src/components/Badge.js'; | ||
export { Button as unsafe_Button } from './src/components/Button.js'; | ||
export { CircularProgress as unsafe_CircularProgress } from './src/components/CircularProgress.js'; | ||
//# sourceMappingURL=index.js.map |
import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2 } from '../../_virtual/_rollupPluginBabelHelpers.js'; | ||
import { forwardRef } from 'react'; | ||
import { getAdmonitionProps, splitClassNameProp, getAdmonitionHeadingProps, getAdmonitionTextProps, getIconProps, getAdmonitionIconProps, getIconButtonProps, getAdmonitionCloseButtonProps } from '@pluralsight/headless-styles'; | ||
@@ -36,5 +37,5 @@ import { InfoCircleIcon, CheckCircleIcon, DangerDiamondIcon, WarningTriangleIcon, CloseIcon } from '@pluralsight/icons'; | ||
// Public API | ||
// <Admonition /> | ||
function Admonition(props) { | ||
function AdmonitionEl(props, ref) { | ||
var sentiment = props.sentiment, | ||
@@ -50,2 +51,3 @@ children = props.children, | ||
return /*#__PURE__*/jsxs("div", _objectSpread2(_objectSpread2(_objectSpread2({}, admonition.wrapper), nativeDivProps), {}, { | ||
ref: ref, | ||
children: [/*#__PURE__*/jsx("span", _objectSpread2(_objectSpread2({}, admonition.iconWrapper), {}, { | ||
@@ -62,3 +64,6 @@ children: /*#__PURE__*/jsx(MatchIcon, { | ||
} | ||
function AdmonitionHeading(props) { | ||
// <AdmonitionHeading /> | ||
function AdmonitionHeadingEl(props, ref) { | ||
var children = props.children, | ||
@@ -69,2 +74,3 @@ className = props.className, | ||
return /*#__PURE__*/jsx("p", _objectSpread2(_objectSpread2(_objectSpread2({}, heading), nativeProps), {}, { | ||
ref: ref, | ||
children: /*#__PURE__*/jsx("strong", { | ||
@@ -75,3 +81,6 @@ children: children | ||
} | ||
function AdmonitionText(props) { | ||
// <AdmonitionText /> | ||
function AdmonitionTextEl(props, ref) { | ||
var children = props.children, | ||
@@ -82,2 +91,3 @@ className = props.className, | ||
return /*#__PURE__*/jsx("small", _objectSpread2(_objectSpread2(_objectSpread2({}, text), nativeProps), {}, { | ||
ref: ref, | ||
children: children | ||
@@ -87,3 +97,9 @@ })); | ||
// public exports | ||
var Admonition = /*#__PURE__*/forwardRef(AdmonitionEl); | ||
var AdmonitionHeading = /*#__PURE__*/forwardRef(AdmonitionHeadingEl); | ||
var AdmonitionText = /*#__PURE__*/forwardRef(AdmonitionTextEl); | ||
export { Admonition, AdmonitionHeading, AdmonitionText }; | ||
//# sourceMappingURL=Admonition.js.map |
@@ -26,2 +26,24 @@ 'use strict'; | ||
} | ||
function _classCallCheck(instance, Constructor) { | ||
if (!(instance instanceof Constructor)) { | ||
throw new TypeError("Cannot call a class as a function"); | ||
} | ||
} | ||
function _defineProperties(target, props) { | ||
for (var i = 0; i < props.length; i++) { | ||
var descriptor = props[i]; | ||
descriptor.enumerable = descriptor.enumerable || false; | ||
descriptor.configurable = true; | ||
if ("value" in descriptor) descriptor.writable = true; | ||
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); | ||
} | ||
} | ||
function _createClass(Constructor, protoProps, staticProps) { | ||
if (protoProps) _defineProperties(Constructor.prototype, protoProps); | ||
if (staticProps) _defineProperties(Constructor, staticProps); | ||
Object.defineProperty(Constructor, "prototype", { | ||
writable: false | ||
}); | ||
return Constructor; | ||
} | ||
function _defineProperty(obj, key, value) { | ||
@@ -41,2 +63,42 @@ key = _toPropertyKey(key); | ||
} | ||
function _inherits(subClass, superClass) { | ||
if (typeof superClass !== "function" && superClass !== null) { | ||
throw new TypeError("Super expression must either be null or a function"); | ||
} | ||
subClass.prototype = Object.create(superClass && superClass.prototype, { | ||
constructor: { | ||
value: subClass, | ||
writable: true, | ||
configurable: true | ||
} | ||
}); | ||
Object.defineProperty(subClass, "prototype", { | ||
writable: false | ||
}); | ||
if (superClass) _setPrototypeOf(subClass, superClass); | ||
} | ||
function _getPrototypeOf(o) { | ||
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { | ||
return o.__proto__ || Object.getPrototypeOf(o); | ||
}; | ||
return _getPrototypeOf(o); | ||
} | ||
function _setPrototypeOf(o, p) { | ||
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { | ||
o.__proto__ = p; | ||
return o; | ||
}; | ||
return _setPrototypeOf(o, p); | ||
} | ||
function _isNativeReflectConstruct() { | ||
if (typeof Reflect === "undefined" || !Reflect.construct) return false; | ||
if (Reflect.construct.sham) return false; | ||
if (typeof Proxy === "function") return true; | ||
try { | ||
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); | ||
return true; | ||
} catch (e) { | ||
return false; | ||
} | ||
} | ||
function _objectWithoutPropertiesLoose(source, excluded) { | ||
@@ -69,2 +131,30 @@ if (source == null) return {}; | ||
} | ||
function _assertThisInitialized(self) { | ||
if (self === void 0) { | ||
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | ||
} | ||
return self; | ||
} | ||
function _possibleConstructorReturn(self, call) { | ||
if (call && (typeof call === "object" || typeof call === "function")) { | ||
return call; | ||
} else if (call !== void 0) { | ||
throw new TypeError("Derived constructors may only return object or undefined"); | ||
} | ||
return _assertThisInitialized(self); | ||
} | ||
function _createSuper(Derived) { | ||
var hasNativeReflectConstruct = _isNativeReflectConstruct(); | ||
return function _createSuperInternal() { | ||
var Super = _getPrototypeOf(Derived), | ||
result; | ||
if (hasNativeReflectConstruct) { | ||
var NewTarget = _getPrototypeOf(this).constructor; | ||
result = Reflect.construct(Super, arguments, NewTarget); | ||
} else { | ||
result = Super.apply(this, arguments); | ||
} | ||
return _possibleConstructorReturn(this, result); | ||
}; | ||
} | ||
function _toPrimitive(input, hint) { | ||
@@ -85,8 +175,17 @@ if (typeof input !== "object" || input === null) return input; | ||
exports.assertThisInitialized = _assertThisInitialized; | ||
exports.classCallCheck = _classCallCheck; | ||
exports.createClass = _createClass; | ||
exports.createSuper = _createSuper; | ||
exports.defineProperty = _defineProperty; | ||
exports.getPrototypeOf = _getPrototypeOf; | ||
exports.inherits = _inherits; | ||
exports.isNativeReflectConstruct = _isNativeReflectConstruct; | ||
exports.objectSpread2 = _objectSpread2; | ||
exports.objectWithoutProperties = _objectWithoutProperties; | ||
exports.objectWithoutPropertiesLoose = _objectWithoutPropertiesLoose; | ||
exports.possibleConstructorReturn = _possibleConstructorReturn; | ||
exports.setPrototypeOf = _setPrototypeOf; | ||
exports.toPrimitive = _toPrimitive; | ||
exports.toPropertyKey = _toPropertyKey; | ||
//# sourceMappingURL=_rollupPluginBabelHelpers.js.map |
@@ -6,2 +6,6 @@ 'use strict'; | ||
const Admonition = require('./src/components/Admonition.js'); | ||
const Avatar = require('./src/components/Avatar.js'); | ||
const Badge = require('./src/components/Badge.js'); | ||
const Button = require('./src/components/Button.js'); | ||
const CircularProgress = require('./src/components/CircularProgress.js'); | ||
@@ -13,2 +17,6 @@ | ||
exports.unsafe_AdmonitionText = Admonition.AdmonitionText; | ||
exports.unsafe_Avatar = Avatar.Avatar; | ||
exports.unsafe_Badge = Badge.Badge; | ||
exports.unsafe_Button = Button.Button; | ||
exports.unsafe_CircularProgress = CircularProgress.CircularProgress; | ||
//# sourceMappingURL=index.js.map |
@@ -6,2 +6,3 @@ 'use strict'; | ||
const _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js'); | ||
const react = require('react'); | ||
const headlessStyles = require('@pluralsight/headless-styles'); | ||
@@ -41,5 +42,5 @@ const icons = require('@pluralsight/icons'); | ||
// Public API | ||
// <Admonition /> | ||
function Admonition(props) { | ||
function AdmonitionEl(props, ref) { | ||
var sentiment = props.sentiment, | ||
@@ -55,2 +56,3 @@ children = props.children, | ||
return /*#__PURE__*/jsxRuntime.jsxs("div", _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, admonition.wrapper), nativeDivProps), {}, { | ||
ref: ref, | ||
children: [/*#__PURE__*/jsxRuntime.jsx("span", _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, admonition.iconWrapper), {}, { | ||
@@ -67,3 +69,6 @@ children: /*#__PURE__*/jsxRuntime.jsx(MatchIcon, { | ||
} | ||
function AdmonitionHeading(props) { | ||
// <AdmonitionHeading /> | ||
function AdmonitionHeadingEl(props, ref) { | ||
var children = props.children, | ||
@@ -74,2 +79,3 @@ className = props.className, | ||
return /*#__PURE__*/jsxRuntime.jsx("p", _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, heading), nativeProps), {}, { | ||
ref: ref, | ||
children: /*#__PURE__*/jsxRuntime.jsx("strong", { | ||
@@ -80,3 +86,6 @@ children: children | ||
} | ||
function AdmonitionText(props) { | ||
// <AdmonitionText /> | ||
function AdmonitionTextEl(props, ref) { | ||
var children = props.children, | ||
@@ -87,2 +96,3 @@ className = props.className, | ||
return /*#__PURE__*/jsxRuntime.jsx("small", _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, text), nativeProps), {}, { | ||
ref: ref, | ||
children: children | ||
@@ -92,2 +102,8 @@ })); | ||
// public exports | ||
var Admonition = /*#__PURE__*/react.forwardRef(AdmonitionEl); | ||
var AdmonitionHeading = /*#__PURE__*/react.forwardRef(AdmonitionHeadingEl); | ||
var AdmonitionText = /*#__PURE__*/react.forwardRef(AdmonitionTextEl); | ||
exports.Admonition = Admonition; | ||
@@ -94,0 +110,0 @@ exports.AdmonitionHeading = AdmonitionHeading; |
@@ -1,2 +0,2 @@ | ||
import { type MouseEventHandler, type PropsWithChildren, type HTMLAttributes } from 'react'; | ||
import { type MouseEventHandler, type HTMLAttributes } from 'react'; | ||
import type { AdmonitionOptions } from '@pluralsight/headless-styles/types'; | ||
@@ -6,7 +6,7 @@ interface AdmonitionProps extends HTMLAttributes<HTMLDivElement>, AdmonitionOptions { | ||
} | ||
export declare function Admonition(props: PropsWithChildren<AdmonitionProps>): JSX.Element; | ||
type AdmonitionHeadingProps = HTMLAttributes<HTMLParagraphElement>; | ||
export declare function AdmonitionHeading(props: PropsWithChildren<AdmonitionHeadingProps>): JSX.Element; | ||
type AdmonitionTextProps = HTMLAttributes<HTMLParagraphElement>; | ||
export declare function AdmonitionText(props: PropsWithChildren<AdmonitionTextProps>): JSX.Element; | ||
export declare const Admonition: import("react").ForwardRefExoticComponent<AdmonitionProps & import("react").RefAttributes<HTMLDivElement>>; | ||
export declare const AdmonitionHeading: import("react").ForwardRefExoticComponent<AdmonitionHeadingProps & import("react").RefAttributes<HTMLParagraphElement>>; | ||
export declare const AdmonitionText: import("react").ForwardRefExoticComponent<AdmonitionTextProps & import("react").RefAttributes<HTMLParagraphElement>>; | ||
export {}; |
export { Admonition, AdmonitionHeading, AdmonitionText, } from './components/Admonition.tsx'; | ||
export { Avatar } from './components/Avatar.tsx'; | ||
export { Badge } from './components/Badge.tsx'; | ||
export { Button } from './components/Button.tsx'; | ||
export { CircularProgress } from './components/CircularProgress.tsx'; |
{ | ||
"name": "@pluralsight/react", | ||
"version": "0.4.1-next-19aa37", | ||
"version": "0.4.1-next-1f30d3", | ||
"description": "A React component library for Pando.", | ||
@@ -51,4 +51,5 @@ "main": "npm/node/index.js", | ||
"dependencies": { | ||
"@pluralsight/headless-styles": "0.4.1-next-ca5e08", | ||
"@pluralsight/icons": "0.4.1-next-ca5e08", | ||
"@pluralsight/headless-styles": "0.4.1-next-635f81", | ||
"@pluralsight/icons": "0.4.1-next-635f81", | ||
"@pluralsight/react-utils": "0.4.1-next-635f81", | ||
"tslib": "latest" | ||
@@ -65,3 +66,3 @@ }, | ||
"@rollup/plugin-commonjs": "^23.0.0", | ||
"@rollup/plugin-node-resolve": "^15.0.0", | ||
"@rollup/plugin-node-resolve": "^15.0.2", | ||
"@rollup/plugin-replace": "^5.0.0", | ||
@@ -68,0 +69,0 @@ "@testing-library/dom": "^8.17.1", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
229028
38
1077
6
+ Added@pluralsight/headless-styles@0.4.1-next-635f81(transitive)
+ Added@pluralsight/icons@0.4.1-next-635f81(transitive)
+ Added@pluralsight/react-utils@0.4.1-next-635f81(transitive)
- Removed@pluralsight/headless-styles@0.4.1-next-ca5e08(transitive)
- Removed@pluralsight/icons@0.4.1-next-ca5e08(transitive)