@adamjanicki/ui 1.5.6 → 1.5.8

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.
Files changed (53) hide show
  1. package/components/Accordion/Accordion.d.ts +45 -0
  2. package/components/Accordion/Accordion.js +47 -0
  3. package/components/Accordion/index.d.ts +2 -0
  4. package/components/Accordion/index.js +2 -0
  5. package/components/Alert/Alert.d.ts +3 -2
  6. package/components/Alert/Alert.js +3 -2
  7. package/components/Animated/Animated.d.ts +3 -2
  8. package/components/Animated/Animated.js +3 -2
  9. package/components/Badge/Badge.d.ts +3 -2
  10. package/components/Badge/Badge.js +2 -1
  11. package/components/Banner/Banner.d.ts +3 -2
  12. package/components/Banner/Banner.js +2 -1
  13. package/components/Box/Box.d.ts +15 -0
  14. package/components/Box/Box.js +66 -0
  15. package/components/Box/index.d.ts +2 -0
  16. package/components/Box/index.js +2 -0
  17. package/components/Button/Button.d.ts +1 -9
  18. package/components/Button/Button.js +3 -7
  19. package/components/Button/index.d.ts +2 -2
  20. package/components/Button/index.js +2 -2
  21. package/components/Carousel/Carousel.d.ts +4 -3
  22. package/components/Carousel/Carousel.js +9 -7
  23. package/components/Hamburger/Hamburger.d.ts +1 -1
  24. package/components/Icon/Icon.d.ts +14 -0
  25. package/components/Icon/Icon.js +33 -0
  26. package/components/Icon/icons.d.ts +9 -0
  27. package/components/Icon/icons.js +26 -0
  28. package/components/Icon/index.d.ts +2 -0
  29. package/components/Icon/index.js +2 -0
  30. package/components/Input/IconInput.d.ts +1 -1
  31. package/components/Input/IconInput.js +2 -1
  32. package/components/Input/Input.d.ts +1 -1
  33. package/components/Input/Input.js +1 -1
  34. package/components/Input/TextArea.d.ts +1 -1
  35. package/components/Input/TextArea.js +1 -1
  36. package/components/Layer/Layer.d.ts +2 -2
  37. package/components/Layer/Layer.js +2 -1
  38. package/components/Link/Link.js +2 -2
  39. package/components/Select/Select.d.ts +1 -1
  40. package/components/Select/Select.js +3 -1
  41. package/components/Spinner/Spinner.d.ts +1 -1
  42. package/components/Spinner/Spinner.js +1 -1
  43. package/index.d.ts +3 -2
  44. package/index.js +3 -3
  45. package/package.json +3 -2
  46. package/style.css +355 -211
  47. package/utils/types.d.ts +62 -0
  48. package/components/InlineCode/InlineCode.d.ts +0 -13
  49. package/components/InlineCode/InlineCode.js +0 -50
  50. package/components/InlineCode/index.d.ts +0 -2
  51. package/components/InlineCode/index.js +0 -2
  52. package/types/index.d.ts +0 -17
  53. /package/{types/index.js → utils/types.js} +0 -0
@@ -29,10 +29,10 @@ var DefaultLinkElement = forwardRef(function (_a, ref) {
29
29
  });
30
30
  export var UnstyledLink = forwardRef(function (_a, ref) {
31
31
  var _b = _a.LinkElement, LinkElement = _b === void 0 ? DefaultLinkElement : _b, className = _a.className, props = __rest(_a, ["LinkElement", "className"]);
32
- return (_jsx(LinkElement, __assign({}, props, { className: classNames("ajui-action", className), ref: ref })));
32
+ return (_jsx(LinkElement, __assign({}, props, { className: classNames("aui-action", className), ref: ref })));
33
33
  });
34
34
  var Link = forwardRef(function (_a, ref) {
35
35
  var className = _a.className, props = __rest(_a, ["className"]);
36
- return (_jsx(UnstyledLink, __assign({}, props, { className: classNames("ajui-link-default", className), ref: ref })));
36
+ return (_jsx(UnstyledLink, __assign({}, props, { className: classNames("aui-link-default", className), ref: ref })));
37
37
  });
38
38
  export default Link;
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import type { CornerType } from "../../types";
2
+ import type { CornerType } from "../../utils/types";
3
3
  type Props = React.DetailedHTMLProps<React.SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement> & {
4
4
  /**
5
5
  * Array of options to display in the select
@@ -23,8 +23,10 @@ var __rest = (this && this.__rest) || function (s, e) {
23
23
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
24
24
  import { forwardRef } from "react";
25
25
  import classNames from "../../functions/classNames";
26
+ import Box from "../Box";
27
+ import Icon from "../Icon";
26
28
  var Select = function (_a, ref) {
27
29
  var className = _a.className, options = _a.options, getOptionLabel = _a.getOptionLabel, _b = _a.corners, corners = _b === void 0 ? "rounded" : _b, style = _a.style, disabled = _a.disabled, props = __rest(_a, ["className", "options", "getOptionLabel", "corners", "style", "disabled"]);
28
- return (_jsxs("div", { className: classNames("ajui-select-container", "ajui-corners--".concat(corners), disabled ? "ajui-select-disabled" : undefined, className), style: style, children: [_jsx("select", __assign({}, props, { ref: ref, className: "ajui-select-base ajui-corners--".concat(corners), disabled: disabled, children: options.map(function (option, index) { return (_jsx("option", { value: option, children: (getOptionLabel === null || getOptionLabel === void 0 ? void 0 : getOptionLabel(option)) || option }, index)); }) })), _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 64 64", className: "ajui-select-triangle", "aria-hidden": "true", children: _jsx("path", { fill: "currentColor", d: "M 29.175781 50.824219 C 30.738281 52.386719 33.273438 52.386719 34.835938 50.824219 L 58.835938 26.824219 C 60.398438 25.261719 60.398438 22.726562 58.835938 21.164062 C 57.273438 19.601562 54.738281 19.601562 53.175781 21.164062 L 32 42.335938 L 10.824219 21.175781 C 9.261719 19.613281 6.726562 19.613281 5.164062 21.175781 C 3.601562 22.738281 3.601562 25.273438 5.164062 26.835938 L 29.164062 50.835938 Z M 29.175781 50.824219" }) })] }));
30
+ return (_jsxs(Box, { className: classNames("aui-select-container", "aui-corners--".concat(corners), disabled ? "aui-select-disabled" : undefined, className), style: style, children: [_jsx("select", __assign({}, props, { ref: ref, className: "aui-select-base aui-corners--".concat(corners), disabled: disabled, children: options.map(function (option, index) { return (_jsx("option", { value: option, children: (getOptionLabel === null || getOptionLabel === void 0 ? void 0 : getOptionLabel(option)) || option }, index)); }) })), _jsx(Icon, { icon: "down", className: "aui-select-icon", "aria-hidden": true })] }));
29
31
  };
30
32
  export default forwardRef(Select);
@@ -1,4 +1,4 @@
1
- import type { Style } from "../../types";
1
+ import type { Style } from "../../utils/types";
2
2
  type Props = {
3
3
  /**
4
4
  * [Optional] Additional class names to apply to the spinner.
@@ -26,6 +26,6 @@ var Spinner = function (_a) {
26
26
  var className = _a.className, props = __rest(_a, ["className"]);
27
27
  return (
28
28
  // Designed on 2023-08-18
29
- _jsx("svg", __assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", className: classNames("ajui-spinner", className) }, props, { children: _jsx("path", { fill: "currentColor", d: "M256,0C114.62,0,0,114.62,0,256S114.62,512,256,512c70.64,0,134.59-28.61,180.91-74.88l-31.11-31.11c-38.35,38.3-91.31,61.99-149.8,61.99-117.08,0-212-94.92-212-212S138.92,44,256,44V0Z" }) })));
29
+ _jsx("svg", __assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", className: classNames("aui-spinner", className) }, props, { children: _jsx("path", { fill: "currentColor", d: "M256,0C114.62,0,0,114.62,0,256S114.62,512,256,512c70.64,0,134.59-28.61,180.91-74.88l-31.11-31.11c-38.35,38.3-91.31,61.99-149.8,61.99-117.08,0-212-94.92-212-212S138.92,44,256,44V0Z" }) })));
30
30
  };
31
31
  export default Spinner;
package/index.d.ts CHANGED
@@ -1,14 +1,16 @@
1
+ export { default as Accordion } from "./components/Accordion";
1
2
  export { default as Alert } from "./components/Alert";
2
3
  export { default as Animated } from "./components/Animated";
3
4
  export { default as Badge } from "./components/Badge";
4
5
  export { default as Banner } from "./components/Banner";
6
+ export { default as Box } from "./components/Box";
5
7
  export { default as Button } from "./components/Button";
6
8
  export * from "./components/Button";
7
9
  export { default as Carousel } from "./components/Carousel";
8
10
  export { default as ClickOutside } from "./components/ClickOutside";
9
11
  export { default as Hamburger } from "./components/Hamburger";
10
12
  export * from "./components/Hamburger";
11
- export { default as InlineCode } from "./components/InlineCode";
13
+ export { default as Icon } from "./components/Icon";
12
14
  export { default as Input } from "./components/Input";
13
15
  export * from "./components/Input";
14
16
  export { default as Layer } from "./components/Layer";
@@ -18,4 +20,3 @@ export { default as Select } from "./components/Select";
18
20
  export { default as Spinner } from "./components/Spinner";
19
21
  export * from "./hooks";
20
22
  export * from "./functions";
21
- export * from "./types";
package/index.js CHANGED
@@ -1,15 +1,17 @@
1
1
  // Components
2
+ export { default as Accordion } from "./components/Accordion";
2
3
  export { default as Alert } from "./components/Alert";
3
4
  export { default as Animated } from "./components/Animated";
4
5
  export { default as Badge } from "./components/Badge";
5
6
  export { default as Banner } from "./components/Banner";
7
+ export { default as Box } from "./components/Box";
6
8
  export { default as Button } from "./components/Button";
7
9
  export * from "./components/Button";
8
10
  export { default as Carousel } from "./components/Carousel";
9
11
  export { default as ClickOutside } from "./components/ClickOutside";
10
12
  export { default as Hamburger } from "./components/Hamburger";
11
13
  export * from "./components/Hamburger";
12
- export { default as InlineCode } from "./components/InlineCode";
14
+ export { default as Icon } from "./components/Icon";
13
15
  export { default as Input } from "./components/Input";
14
16
  export * from "./components/Input";
15
17
  export { default as Layer } from "./components/Layer";
@@ -21,5 +23,3 @@ export { default as Spinner } from "./components/Spinner";
21
23
  export * from "./hooks";
22
24
  // Functions
23
25
  export * from "./functions";
24
- // Types
25
- export * from "./types";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adamjanicki/ui",
3
- "version": "1.5.6",
3
+ "version": "1.5.8",
4
4
  "description": "Basic UI components and hooks for React in TypeScript",
5
5
  "type": "module",
6
6
  "main": "./index.js",
@@ -15,7 +15,8 @@
15
15
  "clean": "./clean.sh",
16
16
  "lint": "eslint src --max-warnings=0",
17
17
  "build": "npm run clean && npm run lint && tsc; cp src/style.css ./style.css",
18
- "prepare": "npm run build"
18
+ "prepare": "npm run build",
19
+ "dryrun": "npm publish --dry-run"
19
20
  },
20
21
  "peerDependencies": {
21
22
  "react": ">=18",