@altimateai/ui-components 0.0.9 → 0.0.10-beta.2

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.
package/dist/CoachForm.js CHANGED
@@ -50095,7 +50095,7 @@ ${i}
50095
50095
  availability: [ma.SAAS],
50096
50096
  key: pi.AlertManager,
50097
50097
  displayComponent: eie,
50098
- comingSoon: () => new URLSearchParams(window.location.search).get("am") !== "1"
50098
+ comingSoon: !1
50099
50099
  }
50100
50100
  ], nie = (e) => {
50101
50101
  const t = tie.find((n) => n.key === e.taskLabel);
@@ -2002,15 +2002,45 @@ const Ci = Bt(
2002
2002
  secondary: "al-border-transparent al-bg-secondary al-text-secondary-foreground hover:al-bg-secondary/80",
2003
2003
  destructive: "al-border-transparent al-bg-destructive al-text-destructive-foreground hover:al-bg-destructive/80",
2004
2004
  outline: "al-text-foreground"
2005
+ },
2006
+ interactive: {
2007
+ true: "al-cursor-pointer focus:al-ring-2 focus:al-ring-ring focus:al-ring-offset-2",
2008
+ false: "al-cursor-default"
2005
2009
  }
2006
2010
  },
2007
2011
  defaultVariants: {
2008
- variant: "default"
2012
+ variant: "default",
2013
+ interactive: !1
2009
2014
  }
2010
2015
  }
2011
2016
  );
2012
- function ud({ className: e, variant: o, ...t }) {
2013
- return /* @__PURE__ */ r.jsx("div", { className: I(Ci({ variant: o }), e), ...t });
2017
+ function ud({
2018
+ className: e,
2019
+ variant: o,
2020
+ interactive: t = !0,
2021
+ onAction: n,
2022
+ children: a,
2023
+ role: l = "status",
2024
+ tabIndex: i,
2025
+ onKeyDown: c,
2026
+ ...d
2027
+ }) {
2028
+ const u = (f) => {
2029
+ t && n && (f.key === "Enter" || f.key === " ") && (f.preventDefault(), n()), c == null || c(f);
2030
+ };
2031
+ return /* @__PURE__ */ r.jsx(
2032
+ "div",
2033
+ {
2034
+ className: I(Ci({ variant: o, interactive: t }), e),
2035
+ role: t ? "button" : l,
2036
+ tabIndex: t ? 0 : i,
2037
+ onKeyDown: u,
2038
+ onClick: t ? n : void 0,
2039
+ "aria-disabled": t && !n,
2040
+ ...d,
2041
+ children: a
2042
+ }
2043
+ );
2014
2044
  }
2015
2045
  var lo = "Collapsible", [_i, ua] = ue(lo), [Ni, io] = _i(lo), pa = s.forwardRef(
2016
2046
  (e, o) => {
package/dist/index.css CHANGED
@@ -1 +1 @@
1
- div[data-radix-popper-content-wrapper]{z-index:100!important}
1
+ div[data-radix-popper-content-wrapper]{z-index:1000!important}
@@ -1,4 +1,5 @@
1
1
  import * as React$1 from 'react';
2
+ import { ReactNode } from 'react';
2
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
4
 
4
5
  declare const VIEWS_TYPE_COLOR: {
@@ -34,6 +35,11 @@ interface Table {
34
35
  interface ColumnMeta {
35
36
  [key: string]: string | number | boolean | null | undefined;
36
37
  }
38
+ interface Tag {
39
+ name: string;
40
+ rk?: string;
41
+ description: string;
42
+ }
37
43
  interface Column {
38
44
  name: string;
39
45
  table: string;
@@ -42,6 +48,7 @@ interface Column {
42
48
  is_transformation?: boolean;
43
49
  description: string;
44
50
  meta?: Map<string, ColumnMeta>;
51
+ tags?: Tag[];
45
52
  }
46
53
  interface Columns {
47
54
  id: string;
@@ -179,6 +186,10 @@ interface LineageProviderProps {
179
186
  lineageType: LineageType;
180
187
  allowSyncColumnsWithDB?: boolean;
181
188
  externalSidePanel?: boolean;
189
+ renderTags?: (entity: {
190
+ column: Column;
191
+ table_rk: string;
192
+ }) => ReactNode;
182
193
  }
183
194
  interface LineageRef {
184
195
  rerender: () => void;
@@ -210,4 +221,4 @@ declare const ViewsTypeBadge: ({ viewsType }: {
210
221
  viewsType: string;
211
222
  }) => react_jsx_runtime.JSX.Element;
212
223
 
213
- export { CLL, CllEvents, type CollectColumn, type Column, type ColumnLineage, type ColumnMeta, type Columns, type Confidence, type Details, type ExportFinalLineageArgs, type ExposureMetaData, _default as Lineage, type LineageRef, type ModalArgs, NodeIcon, type OpNodeArgs, type SelectedColumn, type SnowflakeStageMetadata, type StaticLineage, type StaticLineageDetails, type Table, type TableMeta, type ViewsCodeModalArgs, ViewsTypeBadge };
224
+ export { CLL, CllEvents, type CollectColumn, type Column, type ColumnLineage, type ColumnMeta, type Columns, type Confidence, type Details, type ExportFinalLineageArgs, type ExposureMetaData, _default as Lineage, type LineageRef, type ModalArgs, NodeIcon, type OpNodeArgs, type SelectedColumn, type SnowflakeStageMetadata, type StaticLineage, type StaticLineageDetails, type Table, type TableMeta, type Tag, type ViewsCodeModalArgs, ViewsTypeBadge };
@@ -492,6 +492,7 @@ const p5 = {
492
492
  errors: {},
493
493
  lightdashEnabled: !1,
494
494
  showCodeModal: !1,
495
+ renderTags: void 0,
495
496
  config: { exportFinalLineage: !1 }
496
497
  }, yt = Zr({
497
498
  name: "lineageState",
@@ -606,6 +607,9 @@ const p5 = {
606
607
  setShowCodeModal: (e, t) => {
607
608
  e.showCodeModal = t.payload;
608
609
  },
610
+ setRenderTags: (e, t) => {
611
+ e.renderTags = t.payload;
612
+ },
609
613
  setConfig: (e, t) => {
610
614
  e.config = t.payload;
611
615
  }
@@ -641,6 +645,7 @@ const p5 = {
641
645
  setErrors: So,
642
646
  setLightdashEnabled: L5,
643
647
  setShowCodeModal: N5,
648
+ setRenderTags: P4,
644
649
  setConfig: M5
645
650
  } = yt.actions;
646
651
  function Ee(e) {
@@ -5211,8 +5216,8 @@ const Ka = "_component_13r39_1", Ya = "_spin_13r39_1", Xa = {
5211
5216
  /* @__PURE__ */ a.jsx("div", { className: Q(I.column_card), children: /* @__PURE__ */ a.jsx("div", { className: "font-normal fs-xxs", children: e }) })
5212
5217
  ] }) }) }), Ws = ({ column: e, handleClick: t, selected: n, isSelectable: o }) => {
5213
5218
  const {
5214
- state: { theme: s, config: r },
5215
- dispatch: i
5219
+ state: { theme: s, config: r, renderTags: i },
5220
+ dispatch: l
5216
5221
  } = je(h1);
5217
5222
  return /* @__PURE__ */ a.jsxs(
5218
5223
  "div",
@@ -5233,8 +5238,8 @@ const Ka = "_component_13r39_1", Ya = "_spin_13r39_1", Xa = {
5233
5238
  fo,
5234
5239
  {
5235
5240
  className: "al-w-8 al-h-8",
5236
- onClick: async (l) => {
5237
- l.stopPropagation(), i(
5241
+ onClick: async (c) => {
5242
+ c.stopPropagation(), l(
5238
5243
  c1({
5239
5244
  type: "export_final_lineage",
5240
5245
  args: { table: e.table, column: e.name }
@@ -5248,6 +5253,7 @@ const Ka = "_component_13r39_1", Ya = "_spin_13r39_1", Xa = {
5248
5253
  e.datatype && /* @__PURE__ */ a.jsx(Ja, { label: e.datatype })
5249
5254
  ] }),
5250
5255
  e.description && /* @__PURE__ */ a.jsx("div", { className: "d-flex flex-column", children: /* @__PURE__ */ a.jsx("div", { className: "font-normal fs-xxs text-grey", children: e.description }) }),
5256
+ i && i({ column: e, table_rk: e.table }),
5251
5257
  e.code && /* @__PURE__ */ a.jsx(At, { code: e.code, language: "sql", editorTheme: "tomorrow", theme: s })
5252
5258
  ]
5253
5259
  }
@@ -6721,54 +6727,56 @@ const cn = () => {
6721
6727
  dynamicLineage: o,
6722
6728
  staticLineage: s,
6723
6729
  allowSyncColumnsWithDB: r,
6724
- externalSidePanel: i = !1
6725
- }, l) => {
6726
- const [c, h] = Dr(yt.reducer, {
6730
+ externalSidePanel: i = !1,
6731
+ renderTags: l
6732
+ }, c) => {
6733
+ const [h, f] = Dr(yt.reducer, {
6727
6734
  ...yt.getInitialState(),
6728
6735
  theme: e,
6729
6736
  lineageType: t,
6730
6737
  sqlLineage: n,
6731
6738
  allowSyncColumnsWithDB: r,
6732
- externalSidePanel: i
6733
- }), f = X(), [u, m] = se(0), C = oe(() => m((E) => (E + 1) % 100), []);
6739
+ externalSidePanel: i,
6740
+ renderTags: l
6741
+ }), u = X(), [m, C] = se(0), x = oe(() => C((_) => (_ + 1) % 100), []);
6734
6742
  Y(() => {
6735
- var E;
6736
- (E = f.current) == null || E.fitView({});
6737
- }, [u]), Ir(l, () => ({
6738
- rerender: C
6743
+ var _;
6744
+ (_ = u.current) == null || _.fitView({});
6745
+ }, [m]), Ir(c, () => ({
6746
+ rerender: x
6739
6747
  })), Y(() => {
6740
- h(y5(e));
6748
+ f(y5(e));
6741
6749
  }, [e]);
6742
- const x = ge(
6750
+ const E = ge(
6743
6751
  () => ({
6744
- state: c,
6745
- dispatch: h,
6746
- rerender: C
6752
+ state: h,
6753
+ dispatch: f,
6754
+ rerender: x
6747
6755
  }),
6748
- [c, h, C]
6756
+ [h, f, x]
6749
6757
  );
6750
- return /* @__PURE__ */ a.jsx(h1.Provider, { value: x, children: /* @__PURE__ */ a.jsxs("div", { className: "lineage-component", children: [
6758
+ return /* @__PURE__ */ a.jsx(h1.Provider, { value: E, children: /* @__PURE__ */ a.jsxs("div", { className: "lineage-component", children: [
6751
6759
  t === "sql" && n && /* @__PURE__ */ a.jsx(
6752
6760
  N4,
6753
6761
  {
6754
- flow: f,
6762
+ flow: u,
6755
6763
  details: n.details,
6756
6764
  tableEdges: n.tableEdges,
6757
6765
  nodePositions: n.nodePositions
6758
6766
  }
6759
6767
  ),
6760
- t === "dynamic" && o && /* @__PURE__ */ a.jsx(v4, { flow: f, theme: e }),
6761
- t === "static" && s && /* @__PURE__ */ a.jsx(b4, { flow: f, ...s }),
6768
+ t === "dynamic" && o && /* @__PURE__ */ a.jsx(v4, { flow: u, theme: e }),
6769
+ t === "static" && s && /* @__PURE__ */ a.jsx(b4, { flow: u, ...s }),
6762
6770
  /* @__PURE__ */ a.jsx("div", { id: "lineage-sidebar" })
6763
6771
  ] }) });
6764
- }, P4 = L2(M4), ue = () => je(h1), pe = () => {
6772
+ }, O4 = L2(M4), ue = () => je(h1), pe = () => {
6765
6773
  const { dispatch: e } = je(h1);
6766
6774
  return e;
6767
6775
  };
6768
6776
  export {
6769
6777
  he as CLL,
6770
6778
  Aa as CllEvents,
6771
- P4 as Lineage,
6779
+ O4 as Lineage,
6772
6780
  Q2 as NodeIcon,
6773
6781
  Bt as ViewsTypeBadge
6774
6782
  };
@@ -10062,7 +10062,7 @@ const _a = "_codeblock_19tsp_1", Ma = "_dark_19tsp_1", Qn = {
10062
10062
  }
10063
10063
  ), xs = zt(function({
10064
10064
  children: o,
10065
- wrap: n = !1,
10065
+ wrap: n = !0,
10066
10066
  justify: r,
10067
10067
  align: t,
10068
10068
  flex: a,
@@ -224,10 +224,19 @@ declare const Tooltip: ({ children, title, ...props }: TooltipPrimitive.TooltipP
224
224
 
225
225
  declare const badgeVariants: (props?: ({
226
226
  variant?: "default" | "destructive" | "outline" | "secondary" | null | undefined;
227
+ interactive?: boolean | null | undefined;
227
228
  } & class_variance_authority_types.ClassProp) | undefined) => string;
228
229
  interface BadgeProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
230
+ /**
231
+ * If true, the badge will be focusable and handle keyboard events
232
+ */
233
+ interactive?: boolean;
234
+ /**
235
+ * Optional click handler for interactive badges
236
+ */
237
+ onAction?: () => void;
229
238
  }
230
- declare function Badge({ className, variant, ...props }: BadgeProps): react_jsx_runtime.JSX.Element;
239
+ declare function Badge({ className, variant, interactive, onAction, children, role, tabIndex, onKeyDown, ...props }: BadgeProps): react_jsx_runtime.JSX.Element;
231
240
 
232
241
  declare const Accordion: React$1.ForwardRefExoticComponent<(AccordionPrimitive.AccordionSingleProps | AccordionPrimitive.AccordionMultipleProps) & React$1.RefAttributes<HTMLDivElement>>;
233
242
  declare const AccordionItem: React$1.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
@@ -753,7 +753,7 @@ const Dl = jl, Mr = c.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */
753
753
  {
754
754
  ref: a,
755
755
  className: w(
756
- "al-fixed al-top-0 al-z-[100] al-flex al-max-h-screen al-w-full al-flex-col-reverse al-p-4 sm:al-bottom-0 sm:al-right-0 sm:al-top-auto sm:al-flex-col md:al-max-w-[420px]",
756
+ "al-fixed al-top-0 al-z-[1000] al-flex al-max-h-screen al-w-full al-flex-col-reverse al-p-4 sm:al-bottom-0 sm:al-right-0 sm:al-top-auto sm:al-flex-col md:al-max-w-[420px]",
757
757
  e
758
758
  ),
759
759
  role: "region",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@altimateai/ui-components",
3
- "version": "0.0.9",
3
+ "version": "0.0.10-beta.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/AltimateAI/altimate-components.git"