@gobolt/genesis 0.2.20 → 0.2.21

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.
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  var _commonjsHelpers = require("./_commonjsHelpers.cjs");
3
- var index = require("../node_modules/debounce/index.cjs");
4
- var debounceExports = /* @__PURE__ */ index.__require();
5
- var debounce = /* @__PURE__ */ _commonjsHelpers.getDefaultExportFromCjs(debounceExports);
6
- module.exports = debounce;
3
+ var index = require("../node_modules/copy-to-clipboard/index.cjs");
4
+ var copyToClipboardExports = index.__require();
5
+ var copy = /* @__PURE__ */ _commonjsHelpers.getDefaultExportFromCjs(copyToClipboardExports);
6
+ module.exports = copy;
@@ -1,7 +1,7 @@
1
1
  import { getDefaultExportFromCjs } from "./_commonjsHelpers.js";
2
- import { __require as requireDebounce } from "../node_modules/debounce/index.js";
3
- var debounceExports = /* @__PURE__ */ requireDebounce();
4
- var debounce = /* @__PURE__ */ getDefaultExportFromCjs(debounceExports);
2
+ import { __require as requireCopyToClipboard } from "../node_modules/copy-to-clipboard/index.js";
3
+ var copyToClipboardExports = requireCopyToClipboard();
4
+ var copy = /* @__PURE__ */ getDefaultExportFromCjs(copyToClipboardExports);
5
5
  export {
6
- debounce as default
6
+ copy as default
7
7
  };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  var _commonjsHelpers = require("./_commonjsHelpers.cjs");
3
- var index = require("../node_modules/copy-to-clipboard/index.cjs");
4
- var copyToClipboardExports = index.__require();
5
- var copy = /* @__PURE__ */ _commonjsHelpers.getDefaultExportFromCjs(copyToClipboardExports);
6
- module.exports = copy;
3
+ var index = require("../node_modules/debounce/index.cjs");
4
+ var debounceExports = /* @__PURE__ */ index.__require();
5
+ var debounce = /* @__PURE__ */ _commonjsHelpers.getDefaultExportFromCjs(debounceExports);
6
+ module.exports = debounce;
@@ -1,7 +1,7 @@
1
1
  import { getDefaultExportFromCjs } from "./_commonjsHelpers.js";
2
- import { __require as requireCopyToClipboard } from "../node_modules/copy-to-clipboard/index.js";
3
- var copyToClipboardExports = requireCopyToClipboard();
4
- var copy = /* @__PURE__ */ getDefaultExportFromCjs(copyToClipboardExports);
2
+ import { __require as requireDebounce } from "../node_modules/debounce/index.js";
3
+ var debounceExports = /* @__PURE__ */ requireDebounce();
4
+ var debounce = /* @__PURE__ */ getDefaultExportFromCjs(debounceExports);
5
5
  export {
6
- copy as default
6
+ debounce as default
7
7
  };
@@ -34,7 +34,7 @@ const Badge = ({
34
34
  style: {
35
35
  padding: "4px 4px"
36
36
  },
37
- hasHover,
37
+ $hasHover: hasHover,
38
38
  ...rest,
39
39
  children: /* @__PURE__ */ jsxRuntime.jsx(
40
40
  "div",
@@ -65,8 +65,8 @@ const Badge = ({
65
65
  state,
66
66
  disabled: isDisabled,
67
67
  style: { cursor: role === "button" ? "pointer" : "default" },
68
- backgroundColor,
69
- hasHover,
68
+ $backgroundColor: backgroundColor,
69
+ $hasHover: hasHover,
70
70
  ...rest,
71
71
  children: [
72
72
  iconUtil.getBadgeStateIcon(
@@ -33,7 +33,7 @@ const Badge = ({
33
33
  style: {
34
34
  padding: "4px 4px"
35
35
  },
36
- hasHover,
36
+ $hasHover: hasHover,
37
37
  ...rest,
38
38
  children: /* @__PURE__ */ jsx(
39
39
  "div",
@@ -64,8 +64,8 @@ const Badge = ({
64
64
  state,
65
65
  disabled: isDisabled,
66
66
  style: { cursor: role === "button" ? "pointer" : "default" },
67
- backgroundColor,
68
- hasHover,
67
+ $backgroundColor: backgroundColor,
68
+ $hasHover: hasHover,
69
69
  ...rest,
70
70
  children: [
71
71
  getBadgeStateIcon(
@@ -6,8 +6,8 @@ const getBorderColor = (theme, state) => {
6
6
  }
7
7
  return theme.colors.status[state].surface;
8
8
  };
9
- const getGenesisClass = (theme, state, label, disabled, backgroundColor, textColor, hasHover) => `
10
- display: flex;
9
+ const getGenesisClass = (theme, state, label, disabled, $backgroundColor, $hasHover) => `
10
+ display: inline-flex; // inline-flex is used to prevent the badge from taking up the full width of the container
11
11
  gap: 4px;
12
12
  justify-content: center;
13
13
  align-items: center;
@@ -18,10 +18,10 @@ const getGenesisClass = (theme, state, label, disabled, backgroundColor, textCol
18
18
  padding-right: ${theme.components.badge["right-padding"]}px;
19
19
  border-radius: ${theme.components.badge.radius}px;
20
20
  border: 1px solid ${getBorderColor(theme, state)};
21
- background-color: ${backgroundColor || theme.colors.status[state].surface};
21
+ background-color: ${$backgroundColor || theme.colors.status[state].surface};
22
22
 
23
23
  &:not(:disabled):hover {
24
- ${hasHover ? `background-color: ${theme.colors.status[state]["surface-hover"]};` : ""}
24
+ ${$hasHover ? `background-color: ${theme.colors.status[state]["surface-hover"]};` : ""}
25
25
  }
26
26
 
27
27
  ${disabled ? `
@@ -41,18 +41,16 @@ const Badge = styled.div`
41
41
  state,
42
42
  label,
43
43
  disabled,
44
- backgroundColor,
45
- textColor,
46
- hasHover
44
+ $backgroundColor,
45
+ $hasHover
47
46
  }) => {
48
47
  return getGenesisClass(
49
48
  theme,
50
49
  state,
51
50
  label,
52
51
  disabled,
53
- backgroundColor,
54
- textColor,
55
- hasHover
52
+ $backgroundColor,
53
+ $hasHover
56
54
  );
57
55
  }}
58
56
  `;
@@ -5,10 +5,9 @@ interface StyledBadgeProps {
5
5
  state?: State;
6
6
  label?: string;
7
7
  disabled?: boolean;
8
- backgroundColor?: string;
9
- textColor?: string;
10
- hasHover?: boolean;
8
+ $backgroundColor?: string;
9
+ $hasHover?: boolean;
11
10
  }
12
- export declare const getGenesisClass: (theme: GenesisTheme, state: State, label?: string, disabled?: boolean, backgroundColor?: string, textColor?: string, hasHover?: boolean) => string;
11
+ export declare const getGenesisClass: (theme: GenesisTheme, state: State, label?: string, disabled?: boolean, $backgroundColor?: string, $hasHover?: boolean) => string;
13
12
  export declare const Badge: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledBadgeProps>> & string;
14
13
  export {};
@@ -5,8 +5,8 @@ const getBorderColor = (theme, state) => {
5
5
  }
6
6
  return theme.colors.status[state].surface;
7
7
  };
8
- const getGenesisClass = (theme, state, label, disabled, backgroundColor, textColor, hasHover) => `
9
- display: flex;
8
+ const getGenesisClass = (theme, state, label, disabled, $backgroundColor, $hasHover) => `
9
+ display: inline-flex; // inline-flex is used to prevent the badge from taking up the full width of the container
10
10
  gap: 4px;
11
11
  justify-content: center;
12
12
  align-items: center;
@@ -17,10 +17,10 @@ const getGenesisClass = (theme, state, label, disabled, backgroundColor, textCol
17
17
  padding-right: ${theme.components.badge["right-padding"]}px;
18
18
  border-radius: ${theme.components.badge.radius}px;
19
19
  border: 1px solid ${getBorderColor(theme, state)};
20
- background-color: ${backgroundColor || theme.colors.status[state].surface};
20
+ background-color: ${$backgroundColor || theme.colors.status[state].surface};
21
21
 
22
22
  &:not(:disabled):hover {
23
- ${hasHover ? `background-color: ${theme.colors.status[state]["surface-hover"]};` : ""}
23
+ ${$hasHover ? `background-color: ${theme.colors.status[state]["surface-hover"]};` : ""}
24
24
  }
25
25
 
26
26
  ${disabled ? `
@@ -40,18 +40,16 @@ const Badge = styled.div`
40
40
  state,
41
41
  label,
42
42
  disabled,
43
- backgroundColor,
44
- textColor,
45
- hasHover
43
+ $backgroundColor,
44
+ $hasHover
46
45
  }) => {
47
46
  return getGenesisClass(
48
47
  theme,
49
48
  state,
50
49
  label,
51
50
  disabled,
52
- backgroundColor,
53
- textColor,
54
- hasHover
51
+ $backgroundColor,
52
+ $hasHover
55
53
  );
56
54
  }}
57
55
  `;
@@ -3,7 +3,7 @@ var jsxRuntime = require("react/jsx-runtime");
3
3
  var index$1 = require("../../../node_modules/react-icons/hi2/index.cjs");
4
4
  var index = require("../../../node_modules/react-icons/hi/index.cjs");
5
5
  var index$2 = require("../../../node_modules/react-icons/fi/index.cjs");
6
- var index$3 = require("../../../_virtual/index5.cjs");
6
+ var index$3 = require("../../../_virtual/index6.cjs");
7
7
  var Input = require("../../Input/Input.cjs");
8
8
  var UtilityButton = require("../../Button/UtilityButton.cjs");
9
9
  var Typography = require("../../Typography/Typography.cjs");
@@ -2,7 +2,7 @@ import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { HiMiniAdjustmentsVertical } from "../../../node_modules/react-icons/hi2/index.js";
3
3
  import { HiSearch, HiOutlineSortDescending, HiOutlineSortAscending } from "../../../node_modules/react-icons/hi/index.js";
4
4
  import { FiSettings } from "../../../node_modules/react-icons/fi/index.js";
5
- import debounce from "../../../_virtual/index5.js";
5
+ import debounce from "../../../_virtual/index6.js";
6
6
  import Input from "../../Input/Input.js";
7
7
  import UtilityButton from "../../Button/UtilityButton.js";
8
8
  import Typography from "../../Typography/Typography.js";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  var React = require("react");
3
- var index = require("../../../../../_virtual/index6.cjs");
3
+ var index = require("../../../../../_virtual/index5.cjs");
4
4
  var useEvent = require("../../../../rc-util/es/hooks/useEvent.cjs");
5
5
  var toList = require("../../_util/toList.cjs");
6
6
  function _interopNamespaceDefault(e) {
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import copy from "../../../../../_virtual/index6.js";
2
+ import copy from "../../../../../_virtual/index5.js";
3
3
  import useEvent from "../../../../rc-util/es/hooks/useEvent.js";
4
4
  import toList from "../../_util/toList.js";
5
5
  var __awaiter = function(thisArg, _arguments, P, generator) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gobolt/genesis",
3
- "version": "0.2.20",
3
+ "version": "0.2.21",
4
4
  "description": "genesis design system",
5
5
  "author": "gobolt",
6
6
  "license": "MIT",