@harnessio/ui 1.3.38 → 1.3.40
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/components.d.ts +2 -0
- package/dist/components.js +2 -2
- package/dist/context.js +2 -2
- package/dist/index-BsBLJbCa.js +1726 -0
- package/dist/index-BsBLJbCa.js.map +1 -0
- package/dist/{index-Bupls3Z8.js → index-CPm0MUOd.js} +4760 -4763
- package/dist/{index-Bupls3Z8.js.map → index-CPm0MUOd.js.map} +1 -1
- package/dist/{index-DDv28P8G.js → index-DaGamPgj.js} +2 -2
- package/dist/{index-DDv28P8G.js.map → index-DaGamPgj.js.map} +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -2
- package/package.json +3 -3
- package/dist/index-Bi2OwTYu.js +0 -1729
- package/dist/index-Bi2OwTYu.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { G as c, H as v, u as g, a as P } from "./button-CezSXouO.js";
|
|
2
2
|
import { R as T, u as w } from "./use-resize-observer-DNQ1lBLF.js";
|
|
3
|
-
import { E, f as b, v as h, w as y, g as D, x as S, q as _, e as j, u as M } from "./index-
|
|
3
|
+
import { E, f as b, v as h, w as y, g as D, x as S, q as _, e as j, u as M } from "./index-BsBLJbCa.js";
|
|
4
4
|
import { jsx as i, jsxs as O } from "react/jsx-runtime";
|
|
5
5
|
import { createContext as u, useContext as C, useState as a, useCallback as R, useMemo as k } from "react";
|
|
6
6
|
import { a as q, C as z, M as B, l as G, k as H } from "./types-DuzuERyI.js";
|
|
@@ -78,4 +78,4 @@ export {
|
|
|
78
78
|
L as m,
|
|
79
79
|
W as u
|
|
80
80
|
};
|
|
81
|
-
//# sourceMappingURL=index-
|
|
81
|
+
//# sourceMappingURL=index-DaGamPgj.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-DaGamPgj.js","sources":["../src/context/theme/migrate-persisted-theme.ts","../src/context/component-context.tsx","../src/context/exit-confirm-context.tsx"],"sourcesContent":["import { FullTheme } from './types'\n\n/** Rewrite deprecated dimmer/low contrast themes to standard contrast. */\nexport function migrateLowContrastTheme(theme?: FullTheme): FullTheme | undefined {\n if (theme?.endsWith('-low')) {\n return theme.replace(/-low$/, '-std') as FullTheme\n }\n\n return theme\n}\n","// ComponentContext.tsx\n\nimport React, { createContext, ReactNode, RefAttributes, useContext } from 'react'\n\nimport { RbacButtonProps, RbacMoreActionsTooltipProps, RbacSplitButtonProps } from '@components/rbac'\n\ninterface ComponentContextValue {\n RbacButton: React.ComponentType<RbacButtonProps & RefAttributes<HTMLButtonElement>>\n RbacSplitButton: <T extends string>(props: RbacSplitButtonProps<T>) => JSX.Element\n RbacMoreActionsTooltip: React.ForwardRefExoticComponent<\n RbacMoreActionsTooltipProps & RefAttributes<HTMLButtonElement>\n >\n}\n\nconst ComponentContext = createContext<ComponentContextValue | undefined>(undefined)\n\nexport const ComponentProvider = ({\n components,\n children\n}: {\n components: ComponentContextValue\n children: ReactNode\n}) => {\n return <ComponentContext.Provider value={components}>{children}</ComponentContext.Provider>\n}\n\nexport const useComponents = () => {\n const ctx = useContext(ComponentContext)\n if (!ctx) throw new Error('useComponents must be used within ComponentProvider')\n return ctx\n}\n","import { createContext, useCallback, useContext, useMemo, useState } from 'react'\n\nimport { ExitConfirmDialog, ExitConfirmOptions } from '../components/dialogs/exit-confirm-dialog'\n\nexport interface ExitConfirmContextType {\n show: (options: ExitConfirmOptions) => void\n}\n\nexport const ExitConfirmContext = createContext<ExitConfirmContextType>({\n show: (_options: ExitConfirmOptions) => undefined\n})\n\nexport function ExitConfirmProvider({ children }: { children: React.ReactNode }) {\n const [confirm, setConfirm] = useState<ExitConfirmOptions>()\n const [open, setOpen] = useState(false)\n\n const show = useCallback(\n (confirmOptions?: ExitConfirmOptions) => {\n setConfirm(confirmOptions)\n setOpen(true)\n },\n [setOpen]\n )\n\n const onConfirm = () => {\n confirm?.onConfirm?.()\n setOpen(false)\n }\n\n const onCancel = () => {\n confirm?.onCancel?.()\n setOpen(false)\n }\n\n const value = useMemo(() => ({ show }), [show])\n\n return (\n <ExitConfirmContext.Provider value={value}>\n {children}\n <ExitConfirmDialog {...confirm} onCancel={onCancel} onConfirm={onConfirm} open={open} />\n </ExitConfirmContext.Provider>\n )\n}\n\nexport const useExitConfirm = () => {\n const context = useContext(ExitConfirmContext)\n if (!context) {\n throw new Error('useExitConfirm must be used within a ExitConfirmProvider')\n }\n return context\n}\n"],"names":["migrateLowContrastTheme","theme","ComponentContext","createContext","ComponentProvider","components","children","useComponents","ctx","useContext","ExitConfirmContext","_options","ExitConfirmProvider","confirm","setConfirm","useState","open","setOpen","show","useCallback","confirmOptions","onConfirm","_a","onCancel","value","useMemo","jsxs","ExitConfirmDialog","useExitConfirm","context"],"mappings":";;;;;;AAGO,SAASA,EAAwBC,GAA0C;AAC5E,SAAAA,KAAA,QAAAA,EAAO,SAAS,UACXA,EAAM,QAAQ,SAAS,MAAM,IAG/BA;AACT;ACKA,MAAMC,IAAmBC,EAAiD,MAAS,GAEtEC,IAAoB,CAAC;AAAA,EAChC,YAAAC;AAAA,EACA,UAAAC;AACF,wBAIUJ,EAAiB,UAAjB,EAA0B,OAAOG,GAAa,UAAAC,GAAS,GAGpDC,IAAgB,MAAM;AAC3B,QAAAC,IAAMC,EAAWP,CAAgB;AACvC,MAAI,CAACM,EAAW,OAAA,IAAI,MAAM,qDAAqD;AACxE,SAAAA;AACT,GCtBaE,IAAqBP,EAAsC;AAAA,EACtE,MAAM,CAACQ,MAAiC;AAAA;AAC1C,CAAC;AAEe,SAAAC,EAAoB,EAAE,UAAAN,KAA2C;AAC/E,QAAM,CAACO,GAASC,CAAU,IAAIC,EAA6B,GACrD,CAACC,GAAMC,CAAO,IAAIF,EAAS,EAAK,GAEhCG,IAAOC;AAAA,IACX,CAACC,MAAwC;AACvC,MAAAN,EAAWM,CAAc,GACzBH,EAAQ,EAAI;AAAA,IACd;AAAA,IACA,CAACA,CAAO;AAAA,EACV,GAEMI,IAAY,MAAM;;AACtB,KAAAC,IAAAT,KAAA,gBAAAA,EAAS,cAAT,QAAAS,EAAA,KAAAT,IACAI,EAAQ,EAAK;AAAA,EACf,GAEMM,IAAW,MAAM;;AACrB,KAAAD,IAAAT,KAAA,gBAAAA,EAAS,aAAT,QAAAS,EAAA,KAAAT,IACAI,EAAQ,EAAK;AAAA,EACf,GAEMO,IAAQC,EAAQ,OAAO,EAAE,MAAAP,MAAS,CAACA,CAAI,CAAC;AAE9C,SACG,gBAAAQ,EAAAhB,EAAmB,UAAnB,EAA4B,OAAAc,GAC1B,UAAA;AAAA,IAAAlB;AAAA,sBACAqB,GAAmB,EAAA,GAAGd,GAAS,UAAAU,GAAoB,WAAAF,GAAsB,MAAAL,EAAY,CAAA;AAAA,EAAA,GACxF;AAEJ;AAEO,MAAMY,IAAiB,MAAM;AAC5B,QAAAC,IAAUpB,EAAWC,CAAkB;AAC7C,MAAI,CAACmB;AACG,UAAA,IAAI,MAAM,0DAA0D;AAErE,SAAAA;AACT;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -4943,6 +4943,7 @@ declare const LogoNameMapV2: {
|
|
|
4943
4943
|
alpine: FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
4944
4944
|
anchore: FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
4945
4945
|
android: FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
4946
|
+
ansible: FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
4946
4947
|
'app-dynamics': FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
4947
4948
|
apple: FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
4948
4949
|
approval: FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
@@ -7979,6 +7980,7 @@ declare const SymbolNameMap: {
|
|
|
7979
7980
|
alpine: FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
7980
7981
|
anchore: FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
7981
7982
|
android: FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
7983
|
+
ansible: FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
7982
7984
|
'app-dynamics': FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
7983
7985
|
apple: FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
7984
7986
|
approval: FunctionComponent<SVGProps<SVGSVGElement>>;
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as s } from "./index-DlSn4SRO.js";
|
|
2
|
-
import { i as e } from "./index-
|
|
3
|
-
import { i as a } from "./index-
|
|
2
|
+
import { i as e } from "./index-CPm0MUOd.js";
|
|
3
|
+
import { i as a } from "./index-DaGamPgj.js";
|
|
4
4
|
import { i as m } from "./index-C4bDY5-3.js";
|
|
5
5
|
import { i as f } from "./index-DchZrYRY.js";
|
|
6
6
|
import { i as l } from "./index-MR6ZbDFl.js";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@harnessio/ui",
|
|
3
3
|
"description": "Harness Canary UI component library",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.40",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -123,9 +123,9 @@
|
|
|
123
123
|
"vaul": "^1.1.2",
|
|
124
124
|
"yaml": "^2.7.0",
|
|
125
125
|
"zod": "^4.0.0",
|
|
126
|
-
"@harnessio/
|
|
126
|
+
"@harnessio/core-design-system": "0.0.1",
|
|
127
127
|
"@harnessio/yaml-editor": "0.26.1",
|
|
128
|
-
"@harnessio/
|
|
128
|
+
"@harnessio/pipeline-graph": "1.9.7"
|
|
129
129
|
},
|
|
130
130
|
"peerDependencies": {
|
|
131
131
|
"react": "^17.0.2",
|