@planningcenter/doxy-web
Advanced tools
Comparing version 2.5.0-rc.0 to 2.5.0
import React from "react"; | ||
import { BadgeSizes, BadgeThemes } from "./types"; | ||
export interface BadgeProps { | ||
size?: "md" | "sm"; | ||
size?: BadgeSizes; | ||
text: string; | ||
theme?: "default" | "error" | "success" | "warning" | "featured"; | ||
theme?: BadgeThemes; | ||
} | ||
export declare const Badge: ({ size, text, theme }: BadgeProps) => React.JSX.Element; | ||
declare const Badge: { | ||
({ size, text, theme }: BadgeProps): React.JSX.Element; | ||
Featured: { | ||
({ size }: import("./Featured").FeaturedBadgeProps): React.JSX.Element; | ||
displayName: string; | ||
}; | ||
}; | ||
export { Badge }; |
import React from "react"; | ||
import { Rounded } from "./types"; | ||
export interface ImageProps { | ||
aspectRatio?: `${number}/${number}` | `${number}` | "auto"; | ||
aspectRatio?: "auto" | "16/9" | "4/3" | "1/1"; | ||
alt: string; | ||
@@ -6,0 +6,0 @@ rounded?: Rounded; |
@@ -16,2 +16,13 @@ import React, { useRef, useEffect, useState, forwardRef } from 'react'; | ||
const BadgeWrapper = _ref => { | ||
let { | ||
size, | ||
theme, | ||
children | ||
} = _ref; | ||
return /*#__PURE__*/React.createElement("span", { | ||
className: classnames("badge", `${theme}-badge`, `${size}-badge`) | ||
}, children); | ||
}; | ||
const FeaturedBadgeIcon = _ref => { | ||
@@ -38,14 +49,27 @@ let { | ||
}; | ||
const Badge = _ref2 => { | ||
const Featured = _ref2 => { | ||
let { | ||
size = "md" | ||
} = _ref2; | ||
return /*#__PURE__*/React.createElement(BadgeWrapper, { | ||
size: size, | ||
theme: "featured" | ||
}, /*#__PURE__*/React.createElement(FeaturedBadgeIcon, { | ||
iconSize: size === "sm" ? 10 : 14 | ||
}), "Featured"); | ||
}; | ||
Featured.displayName = "Badge.Featured"; | ||
const Badge = _ref => { | ||
let { | ||
size = "md", | ||
text, | ||
theme = "default" | ||
} = _ref2; | ||
return /*#__PURE__*/React.createElement("span", { | ||
className: classnames("badge", `${theme}-badge`, `${size}-badge`) | ||
}, theme === "featured" && /*#__PURE__*/React.createElement(FeaturedBadgeIcon, { | ||
iconSize: size === "sm" ? 10 : 14 | ||
}), text); | ||
} = _ref; | ||
return /*#__PURE__*/React.createElement(BadgeWrapper, { | ||
size: size, | ||
theme: theme | ||
}, text); | ||
}; | ||
Badge.Featured = Featured; | ||
@@ -259,3 +283,2 @@ const Button = _ref => { | ||
}; | ||
const getColorClasses$1 = color => `c-${color}`; | ||
@@ -434,7 +457,7 @@ const getFontSizeClasses = (level, size) => HEADING_SIZE_CLASSES[size || level]; | ||
} = _ref3; | ||
return /*#__PURE__*/React.createElement(React.Fragment, null, label && /*#__PURE__*/React.createElement("label", { | ||
return /*#__PURE__*/React.createElement(React.Fragment, null, label && ( /*#__PURE__*/React.createElement("label", { | ||
htmlFor: id | ||
}, label, required ? /*#__PURE__*/React.createElement("span", { | ||
className: "c-ruby ml-4p" | ||
}, "*") : null), /*#__PURE__*/React.createElement("select", { | ||
}, "*") : null)), /*#__PURE__*/React.createElement("select", { | ||
"aria-label": ariaLabel, | ||
@@ -505,7 +528,7 @@ className: classnames("select", `${size}-select`), | ||
} = _ref; | ||
return /*#__PURE__*/React.createElement(React.Fragment, null, label && /*#__PURE__*/React.createElement("label", { | ||
return /*#__PURE__*/React.createElement(React.Fragment, null, label && ( /*#__PURE__*/React.createElement("label", { | ||
htmlFor: id | ||
}, label, required && /*#__PURE__*/React.createElement("span", { | ||
className: "c-ruby" | ||
}, " *")), /*#__PURE__*/React.createElement("input", { | ||
}, " *"))), /*#__PURE__*/React.createElement("input", { | ||
className: classnames("text-input", size == "sm" && "sm-input", readOnly && "pe-n"), | ||
@@ -512,0 +535,0 @@ autoComplete: autoComplete, |
@@ -25,2 +25,13 @@ 'use strict'; | ||
const BadgeWrapper = _ref => { | ||
let { | ||
size, | ||
theme, | ||
children | ||
} = _ref; | ||
return /*#__PURE__*/React__default["default"].createElement("span", { | ||
className: classnames__default["default"]("badge", `${theme}-badge`, `${size}-badge`) | ||
}, children); | ||
}; | ||
const FeaturedBadgeIcon = _ref => { | ||
@@ -47,14 +58,27 @@ let { | ||
}; | ||
const Badge = _ref2 => { | ||
const Featured = _ref2 => { | ||
let { | ||
size = "md" | ||
} = _ref2; | ||
return /*#__PURE__*/React__default["default"].createElement(BadgeWrapper, { | ||
size: size, | ||
theme: "featured" | ||
}, /*#__PURE__*/React__default["default"].createElement(FeaturedBadgeIcon, { | ||
iconSize: size === "sm" ? 10 : 14 | ||
}), "Featured"); | ||
}; | ||
Featured.displayName = "Badge.Featured"; | ||
const Badge = _ref => { | ||
let { | ||
size = "md", | ||
text, | ||
theme = "default" | ||
} = _ref2; | ||
return /*#__PURE__*/React__default["default"].createElement("span", { | ||
className: classnames__default["default"]("badge", `${theme}-badge`, `${size}-badge`) | ||
}, theme === "featured" && /*#__PURE__*/React__default["default"].createElement(FeaturedBadgeIcon, { | ||
iconSize: size === "sm" ? 10 : 14 | ||
}), text); | ||
} = _ref; | ||
return /*#__PURE__*/React__default["default"].createElement(BadgeWrapper, { | ||
size: size, | ||
theme: theme | ||
}, text); | ||
}; | ||
Badge.Featured = Featured; | ||
@@ -268,3 +292,2 @@ const Button = _ref => { | ||
}; | ||
const getColorClasses$1 = color => `c-${color}`; | ||
@@ -443,7 +466,7 @@ const getFontSizeClasses = (level, size) => HEADING_SIZE_CLASSES[size || level]; | ||
} = _ref3; | ||
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, label && /*#__PURE__*/React__default["default"].createElement("label", { | ||
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, label && ( /*#__PURE__*/React__default["default"].createElement("label", { | ||
htmlFor: id | ||
}, label, required ? /*#__PURE__*/React__default["default"].createElement("span", { | ||
className: "c-ruby ml-4p" | ||
}, "*") : null), /*#__PURE__*/React__default["default"].createElement("select", { | ||
}, "*") : null)), /*#__PURE__*/React__default["default"].createElement("select", { | ||
"aria-label": ariaLabel, | ||
@@ -514,7 +537,7 @@ className: classnames__default["default"]("select", `${size}-select`), | ||
} = _ref; | ||
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, label && /*#__PURE__*/React__default["default"].createElement("label", { | ||
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, label && ( /*#__PURE__*/React__default["default"].createElement("label", { | ||
htmlFor: id | ||
}, label, required && /*#__PURE__*/React__default["default"].createElement("span", { | ||
className: "c-ruby" | ||
}, " *")), /*#__PURE__*/React__default["default"].createElement("input", { | ||
}, " *"))), /*#__PURE__*/React__default["default"].createElement("input", { | ||
className: classnames__default["default"]("text-input", size == "sm" && "sm-input", readOnly && "pe-n"), | ||
@@ -521,0 +544,0 @@ autoComplete: autoComplete, |
{ | ||
"name": "@planningcenter/doxy-web", | ||
"version": "2.5.0-rc.0", | ||
"version": "2.5.0", | ||
"description": "Doxy for Church Center Web", | ||
@@ -51,15 +51,15 @@ "main": "dist/index.js", | ||
"@rollup/plugin-typescript": "^9.0.2", | ||
"@storybook/addon-actions": "^7.4.0", | ||
"@storybook/addon-docs": "^7.4.0", | ||
"@storybook/addon-essentials": "^7.4.0", | ||
"@storybook/addon-interactions": "^7.4.0", | ||
"@storybook/addon-links": "^7.4.0", | ||
"@storybook/addon-mdx-gfm": "^7.4.0", | ||
"@storybook/addon-postcss": "^2.0.0", | ||
"@storybook/addon-actions": "^7.6.3", | ||
"@storybook/addon-docs": "^7.6.3", | ||
"@storybook/addon-essentials": "^7.6.3", | ||
"@storybook/addon-interactions": "^7.6.3", | ||
"@storybook/addon-links": "^7.6.3", | ||
"@storybook/addon-mdx-gfm": "^7.6.3", | ||
"@storybook/addon-styling": "^1.3.7", | ||
"@storybook/addons": "^7.4.0", | ||
"@storybook/client-api": "^7.4.0", | ||
"@storybook/react": "^7.4.0", | ||
"@storybook/react-webpack5": "^7.4.0", | ||
"@storybook/testing-library": "^0.2.0", | ||
"@storybook/addons": "^7.6.3", | ||
"@storybook/client-api": "^7.6.3", | ||
"@storybook/react": "^7.6.3", | ||
"@storybook/react-webpack5": "^7.6.3", | ||
"@storybook/testing-library": "^0.2.2", | ||
"@storybook/theming": "^7.6.3", | ||
"@testing-library/dom": "^8.19.0", | ||
@@ -80,3 +80,3 @@ "@testing-library/jest-dom": "^5.16.5", | ||
"eslint-plugin-promise": "^5.0.0", | ||
"eslint-plugin-storybook": "^0.6.13", | ||
"eslint-plugin-storybook": "^0.6.15", | ||
"gh-pages": "^4.0.0", | ||
@@ -100,4 +100,4 @@ "identity-obj-proxy": "^3.0.0", | ||
"sass-loader": "^13.2.2", | ||
"storybook": "^7.4.0", | ||
"storybook-dark-mode": "^3.0.1", | ||
"storybook": "^7.6.3", | ||
"storybook-dark-mode": "^3.0.3", | ||
"tailwindcss": "^3.2.4", | ||
@@ -119,2 +119,2 @@ "ts-jest": "^29.0.3", | ||
] | ||
} | ||
} |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
612065
45
11920
0