@gobolt/genesis 0.4.45 → 0.5.0

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,12 +1,8 @@
1
1
  import { Change } from '../Table';
2
2
  import { InfiniteScrollChangeEvent } from '../InfiniteScrollTable/types';
3
3
  import * as React from "react";
4
- type Item = {
5
- label: string;
6
- value: unknown;
7
- };
8
4
  export type Groups = {
9
- [key: string]: string[] | Item[];
5
+ [key: string]: string[];
10
6
  };
11
7
  export interface SecondaryTableControlsRowProps {
12
8
  groups: Groups | null;
@@ -1,12 +1,6 @@
1
1
  import { PrimaryTableControlsRowProps } from './PrimaryTableControlsRow';
2
2
  import { SecondaryTableControlsRowProps } from './SecondaryTableControlsRow';
3
3
  import { ActionEvent, TableEventPayload } from '../../../types/events';
4
- export declare const TABLE_CONTROLS_EVENTS: {
5
- GROUP_ITEM_CLICK: string;
6
- ORDER_CLICK: string;
7
- PRIMARY_SORT_CHANGE: string;
8
- INPUT_CHANGE: string;
9
- };
10
4
  export type TableControlsData = {
11
5
  primaryTableRowData: PrimaryTableControlsRowProps;
12
6
  secondaryTableRowData?: SecondaryTableControlsRowProps;
@@ -1,2 +1,2 @@
1
- export { default, TABLE_CONTROLS_EVENTS } from './TableControls';
1
+ export { default } from './TableControls';
2
2
  export type { TableControlsProps } from './TableControls';
@@ -68,7 +68,6 @@ export type { TableWithControlsProps } from './TableWithControls';
68
68
  export { useTable } from './Table';
69
69
  export { useTableWithControls } from './TableWithControls';
70
70
  export type { UseTableConfig } from './Table';
71
- export { TABLE_CONTROLS_EVENTS } from './Table/TableControls';
72
71
  export { default as Tabs } from './Tabs';
73
72
  export type { TabsProps } from './Tabs';
74
73
  export { default as Tile } from './Tile';
package/dist/index.cjs CHANGED
@@ -74768,53 +74768,6 @@ const Solid = (properties) => /* @__PURE__ */ jsxRuntime.jsx(
74768
74768
  const UnitNumber = ({ variant }) => {
74769
74769
  return variant === "outline" ? /* @__PURE__ */ jsxRuntime.jsx(Outline, {}) : /* @__PURE__ */ jsxRuntime.jsx(Solid, {});
74770
74770
  };
74771
- const StyledFormInput = styled(Input2)`
74772
- /* Ensure the border color matches regular Input using Genesis theme token */
74773
- &.ant-input,
74774
- .ant-input-group .ant-input {
74775
- border-color: ${({ theme }) => theme.colors.inputs.surface.border} !important;
74776
- }
74777
-
74778
- /* Input group wrapper styling - most specific selector for addon scenarios */
74779
- &.ant-input-group-wrapper .ant-input-group {
74780
- .ant-input {
74781
- border-color: ${({ theme }) => theme.colors.inputs.surface.border} !important;
74782
- }
74783
-
74784
- .ant-input-group-addon {
74785
- border-color: ${({ theme }) => theme.colors.inputs.surface.border} !important;
74786
- background-color: #f5f5f5;
74787
- }
74788
- }
74789
-
74790
- /* When input is in a group wrapper */
74791
- .ant-input-group-wrapper & {
74792
- border-color: ${({ theme }) => theme.colors.inputs.surface.border} !important;
74793
- }
74794
-
74795
- /* Direct targeting of input group elements */
74796
- .ant-input-group .ant-input {
74797
- border-color: ${({ theme }) => theme.colors.inputs.surface.border} !important;
74798
- }
74799
-
74800
- .ant-input-group-addon {
74801
- border-color: ${({ theme }) => theme.colors.inputs.surface.border} !important;
74802
- }
74803
-
74804
- /* Hover and focus states should maintain the correct colors */
74805
- &.ant-input:hover,
74806
- &.ant-input:focus,
74807
- .ant-input-group .ant-input:hover,
74808
- .ant-input-group .ant-input:focus,
74809
- .ant-input-group-wrapper .ant-input-group:hover .ant-input,
74810
- .ant-input-group-wrapper .ant-input-group:focus-within .ant-input,
74811
- .ant-input-group-wrapper .ant-input-group:hover .ant-input-group-addon,
74812
- .ant-input-group-wrapper
74813
- .ant-input-group:focus-within
74814
- .ant-input-group-addon {
74815
- border-color: ${({ theme }) => theme.colors.inputs.surface.border} !important;
74816
- }
74817
- `;
74818
74771
  const defaultValidator = (_rule, value2) => {
74819
74772
  console.log(`Validating value: ${value2}, Type: ${typeof value2}`);
74820
74773
  if (!value2 || /^\d+$/.test(value2)) {
@@ -74835,7 +74788,7 @@ const FormInput = React.forwardRef((props, ref) => {
74835
74788
  const { addonBefore, addonAfter, placeholder } = inputProps;
74836
74789
  if (addonBefore && !addonAfter) {
74837
74790
  return /* @__PURE__ */ jsxRuntime.jsx(
74838
- StyledFormInput,
74791
+ Input2,
74839
74792
  {
74840
74793
  ...inputProps,
74841
74794
  ref,
@@ -74849,7 +74802,7 @@ const FormInput = React.forwardRef((props, ref) => {
74849
74802
  }
74850
74803
  if (addonAfter && !addonBefore) {
74851
74804
  return /* @__PURE__ */ jsxRuntime.jsx(
74852
- StyledFormInput,
74805
+ Input2,
74853
74806
  {
74854
74807
  ...inputProps,
74855
74808
  ref,
@@ -74862,7 +74815,7 @@ const FormInput = React.forwardRef((props, ref) => {
74862
74815
  );
74863
74816
  }
74864
74817
  return /* @__PURE__ */ jsxRuntime.jsx(
74865
- StyledFormInput,
74818
+ Input2,
74866
74819
  {
74867
74820
  ...inputProps,
74868
74821
  ref,
@@ -82571,7 +82524,6 @@ const TypographyWideFontSizeBody1 = 16;
82571
82524
  const TypographyMediumFontSizeBody1 = 16;
82572
82525
  const TypographyWideFontSizeHeading3 = Size4;
82573
82526
  const TypographyWideFontSizeSubHeading1 = 20;
82574
- const TypographyWideFontSizeSubHeading2 = 16;
82575
82527
  const TypographyWideFontSizeSubHeading3 = 14;
82576
82528
  const TypographyWideFontSizeBody2 = 14;
82577
82529
  const TypographyWideFontSizeBody3 = 12;
@@ -82770,9 +82722,9 @@ const wideTypography = {
82770
82722
  letterSpacing: "0"
82771
82723
  },
82772
82724
  subHeading2: {
82773
- fontSize: TypographyWideFontSizeSubHeading2,
82774
- lineHeight: "1.25rem",
82775
- fontWeight: 600,
82725
+ fontSize: "24px",
82726
+ lineHeight: "32px",
82727
+ fontWeight: 400,
82776
82728
  letterSpacing: "0"
82777
82729
  },
82778
82730
  subHeading3: {
@@ -85792,7 +85744,7 @@ const GroupItem = ({
85792
85744
  onGroupItemClick,
85793
85745
  getCustomIcon
85794
85746
  }) => {
85795
- if (!items || items?.length === 0) return null;
85747
+ if (items.length === 0) return null;
85796
85748
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
85797
85749
  /* @__PURE__ */ jsxRuntime.jsx(Tooltip2, { tip: title, isAbsolutePositioned: false, children: /* @__PURE__ */ jsxRuntime.jsx(
85798
85750
  "div",
@@ -85807,21 +85759,18 @@ const GroupItem = ({
85807
85759
  children: getCustomIcon ? getCustomIcon(title) : getIcon$1(title)
85808
85760
  }
85809
85761
  ) }),
85810
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", gap: 4 }, children: items?.map((item) => {
85811
- const isObjectItem = typeof item === "object" && item !== null && "label" in item && "value" in item;
85812
- return /* @__PURE__ */ jsxRuntime.jsx(
85813
- Badge$1,
85814
- {
85815
- label: isObjectItem ? item.label : item?.toString() || "Undefined",
85816
- hasClose: true,
85817
- hasIcon: false,
85818
- state: "generic",
85819
- size: "small",
85820
- onClick: () => onGroupItemClick(title, item)
85821
- },
85822
- !item ? "Undefined" : item?.toString()
85823
- );
85824
- }) })
85762
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", gap: 4 }, children: items.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
85763
+ Badge$1,
85764
+ {
85765
+ label: item,
85766
+ hasClose: true,
85767
+ hasIcon: false,
85768
+ state: "generic",
85769
+ size: "small",
85770
+ onClick: () => onGroupItemClick(title, item)
85771
+ },
85772
+ item.toString()
85773
+ )) })
85825
85774
  ] });
85826
85775
  };
85827
85776
  const GroupsRow = ({
@@ -85838,7 +85787,7 @@ const GroupsRow = ({
85838
85787
  GroupItem,
85839
85788
  {
85840
85789
  title: group.title,
85841
- items: group?.items,
85790
+ items: group.items,
85842
85791
  onGroupItemClick,
85843
85792
  getCustomIcon
85844
85793
  },
@@ -85939,12 +85888,6 @@ const SecondaryTableControlsRow = ({
85939
85888
  }
85940
85889
  );
85941
85890
  };
85942
- const TABLE_CONTROLS_EVENTS = {
85943
- GROUP_ITEM_CLICK: "groupItemClick",
85944
- ORDER_CLICK: "orderClick",
85945
- PRIMARY_SORT_CHANGE: "primarySortChange",
85946
- INPUT_CHANGE: "inputChange"
85947
- };
85948
85891
  const TableControls = ({
85949
85892
  primaryTableRowData,
85950
85893
  secondaryTableRowData,
@@ -87444,7 +87387,6 @@ exports.SegmentedControls = SegmentedControls;
87444
87387
  exports.Select = Select;
87445
87388
  exports.Shapes = Shapes;
87446
87389
  exports.Switch = Switch;
87447
- exports.TABLE_CONTROLS_EVENTS = TABLE_CONTROLS_EVENTS;
87448
87390
  exports.Table = TablePagination;
87449
87391
  exports.TableWithControls = TableWithControls;
87450
87392
  exports.Tabs = Tabs;
package/dist/index.js CHANGED
@@ -74750,53 +74750,6 @@ const Solid = (properties) => /* @__PURE__ */ jsx(
74750
74750
  const UnitNumber = ({ variant }) => {
74751
74751
  return variant === "outline" ? /* @__PURE__ */ jsx(Outline, {}) : /* @__PURE__ */ jsx(Solid, {});
74752
74752
  };
74753
- const StyledFormInput = styled(Input2)`
74754
- /* Ensure the border color matches regular Input using Genesis theme token */
74755
- &.ant-input,
74756
- .ant-input-group .ant-input {
74757
- border-color: ${({ theme }) => theme.colors.inputs.surface.border} !important;
74758
- }
74759
-
74760
- /* Input group wrapper styling - most specific selector for addon scenarios */
74761
- &.ant-input-group-wrapper .ant-input-group {
74762
- .ant-input {
74763
- border-color: ${({ theme }) => theme.colors.inputs.surface.border} !important;
74764
- }
74765
-
74766
- .ant-input-group-addon {
74767
- border-color: ${({ theme }) => theme.colors.inputs.surface.border} !important;
74768
- background-color: #f5f5f5;
74769
- }
74770
- }
74771
-
74772
- /* When input is in a group wrapper */
74773
- .ant-input-group-wrapper & {
74774
- border-color: ${({ theme }) => theme.colors.inputs.surface.border} !important;
74775
- }
74776
-
74777
- /* Direct targeting of input group elements */
74778
- .ant-input-group .ant-input {
74779
- border-color: ${({ theme }) => theme.colors.inputs.surface.border} !important;
74780
- }
74781
-
74782
- .ant-input-group-addon {
74783
- border-color: ${({ theme }) => theme.colors.inputs.surface.border} !important;
74784
- }
74785
-
74786
- /* Hover and focus states should maintain the correct colors */
74787
- &.ant-input:hover,
74788
- &.ant-input:focus,
74789
- .ant-input-group .ant-input:hover,
74790
- .ant-input-group .ant-input:focus,
74791
- .ant-input-group-wrapper .ant-input-group:hover .ant-input,
74792
- .ant-input-group-wrapper .ant-input-group:focus-within .ant-input,
74793
- .ant-input-group-wrapper .ant-input-group:hover .ant-input-group-addon,
74794
- .ant-input-group-wrapper
74795
- .ant-input-group:focus-within
74796
- .ant-input-group-addon {
74797
- border-color: ${({ theme }) => theme.colors.inputs.surface.border} !important;
74798
- }
74799
- `;
74800
74753
  const defaultValidator = (_rule, value2) => {
74801
74754
  console.log(`Validating value: ${value2}, Type: ${typeof value2}`);
74802
74755
  if (!value2 || /^\d+$/.test(value2)) {
@@ -74817,7 +74770,7 @@ const FormInput = React__default.forwardRef((props, ref) => {
74817
74770
  const { addonBefore, addonAfter, placeholder } = inputProps;
74818
74771
  if (addonBefore && !addonAfter) {
74819
74772
  return /* @__PURE__ */ jsx(
74820
- StyledFormInput,
74773
+ Input2,
74821
74774
  {
74822
74775
  ...inputProps,
74823
74776
  ref,
@@ -74831,7 +74784,7 @@ const FormInput = React__default.forwardRef((props, ref) => {
74831
74784
  }
74832
74785
  if (addonAfter && !addonBefore) {
74833
74786
  return /* @__PURE__ */ jsx(
74834
- StyledFormInput,
74787
+ Input2,
74835
74788
  {
74836
74789
  ...inputProps,
74837
74790
  ref,
@@ -74844,7 +74797,7 @@ const FormInput = React__default.forwardRef((props, ref) => {
74844
74797
  );
74845
74798
  }
74846
74799
  return /* @__PURE__ */ jsx(
74847
- StyledFormInput,
74800
+ Input2,
74848
74801
  {
74849
74802
  ...inputProps,
74850
74803
  ref,
@@ -82553,7 +82506,6 @@ const TypographyWideFontSizeBody1 = 16;
82553
82506
  const TypographyMediumFontSizeBody1 = 16;
82554
82507
  const TypographyWideFontSizeHeading3 = Size4;
82555
82508
  const TypographyWideFontSizeSubHeading1 = 20;
82556
- const TypographyWideFontSizeSubHeading2 = 16;
82557
82509
  const TypographyWideFontSizeSubHeading3 = 14;
82558
82510
  const TypographyWideFontSizeBody2 = 14;
82559
82511
  const TypographyWideFontSizeBody3 = 12;
@@ -82752,9 +82704,9 @@ const wideTypography = {
82752
82704
  letterSpacing: "0"
82753
82705
  },
82754
82706
  subHeading2: {
82755
- fontSize: TypographyWideFontSizeSubHeading2,
82756
- lineHeight: "1.25rem",
82757
- fontWeight: 600,
82707
+ fontSize: "24px",
82708
+ lineHeight: "32px",
82709
+ fontWeight: 400,
82758
82710
  letterSpacing: "0"
82759
82711
  },
82760
82712
  subHeading3: {
@@ -85774,7 +85726,7 @@ const GroupItem = ({
85774
85726
  onGroupItemClick,
85775
85727
  getCustomIcon
85776
85728
  }) => {
85777
- if (!items || items?.length === 0) return null;
85729
+ if (items.length === 0) return null;
85778
85730
  return /* @__PURE__ */ jsxs(Fragment, { children: [
85779
85731
  /* @__PURE__ */ jsx(Tooltip2, { tip: title, isAbsolutePositioned: false, children: /* @__PURE__ */ jsx(
85780
85732
  "div",
@@ -85789,21 +85741,18 @@ const GroupItem = ({
85789
85741
  children: getCustomIcon ? getCustomIcon(title) : getIcon$1(title)
85790
85742
  }
85791
85743
  ) }),
85792
- /* @__PURE__ */ jsx("div", { style: { display: "flex", gap: 4 }, children: items?.map((item) => {
85793
- const isObjectItem = typeof item === "object" && item !== null && "label" in item && "value" in item;
85794
- return /* @__PURE__ */ jsx(
85795
- Badge$1,
85796
- {
85797
- label: isObjectItem ? item.label : item?.toString() || "Undefined",
85798
- hasClose: true,
85799
- hasIcon: false,
85800
- state: "generic",
85801
- size: "small",
85802
- onClick: () => onGroupItemClick(title, item)
85803
- },
85804
- !item ? "Undefined" : item?.toString()
85805
- );
85806
- }) })
85744
+ /* @__PURE__ */ jsx("div", { style: { display: "flex", gap: 4 }, children: items.map((item) => /* @__PURE__ */ jsx(
85745
+ Badge$1,
85746
+ {
85747
+ label: item,
85748
+ hasClose: true,
85749
+ hasIcon: false,
85750
+ state: "generic",
85751
+ size: "small",
85752
+ onClick: () => onGroupItemClick(title, item)
85753
+ },
85754
+ item.toString()
85755
+ )) })
85807
85756
  ] });
85808
85757
  };
85809
85758
  const GroupsRow = ({
@@ -85820,7 +85769,7 @@ const GroupsRow = ({
85820
85769
  GroupItem,
85821
85770
  {
85822
85771
  title: group.title,
85823
- items: group?.items,
85772
+ items: group.items,
85824
85773
  onGroupItemClick,
85825
85774
  getCustomIcon
85826
85775
  },
@@ -85921,12 +85870,6 @@ const SecondaryTableControlsRow = ({
85921
85870
  }
85922
85871
  );
85923
85872
  };
85924
- const TABLE_CONTROLS_EVENTS = {
85925
- GROUP_ITEM_CLICK: "groupItemClick",
85926
- ORDER_CLICK: "orderClick",
85927
- PRIMARY_SORT_CHANGE: "primarySortChange",
85928
- INPUT_CHANGE: "inputChange"
85929
- };
85930
85873
  const TableControls = ({
85931
85874
  primaryTableRowData,
85932
85875
  secondaryTableRowData,
@@ -87427,7 +87370,6 @@ export {
87427
87370
  Select,
87428
87371
  Shapes,
87429
87372
  Switch,
87430
- TABLE_CONTROLS_EVENTS,
87431
87373
  TablePagination as Table,
87432
87374
  TableWithControls,
87433
87375
  Tabs,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gobolt/genesis",
3
- "version": "0.4.45",
3
+ "version": "0.5.0",
4
4
  "description": "genesis design system",
5
5
  "author": "gobolt",
6
6
  "license": "MIT",
@@ -150,7 +150,7 @@
150
150
  },
151
151
  "dependencies": {
152
152
  "@ant-design/icons": "^5.5.2",
153
- "@gobolt/genesis-tokens": "^0.0.9",
153
+ "@gobolt/genesis-tokens": "^0.0.10",
154
154
  "@mdx-js/react": "^3.0.1",
155
155
  "@secondcloset/types": "^3.4.6",
156
156
  "@types/d3": "^7.4.3",
@@ -1,3 +0,0 @@
1
- export declare const StyledFormInput: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<Omit<import('..').InputProps & import('react').RefAttributes<import('rc-input').InputRef>, "ref"> & {
2
- ref?: ((instance: import('rc-input').InputRef | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import('react').RefObject<import('rc-input').InputRef> | null | undefined;
3
- }, never>> & string & Omit<import('react').ForwardRefExoticComponent<import('..').InputProps & import('react').RefAttributes<import('rc-input').InputRef>>, keyof import('react').Component<any, {}, any>>;