@harnessio/ui 1.2.8 → 1.2.10
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 +28 -2
- package/dist/components.js +2 -2
- package/dist/context.js +2 -2
- package/dist/index-DIh_ttog.js +1717 -0
- package/dist/index-DIh_ttog.js.map +1 -0
- package/dist/{index-B7QwmAgJ.js → index-Dq2oaTcj.js} +8860 -8849
- package/dist/{index-B7QwmAgJ.js.map → index-Dq2oaTcj.js.map} +1 -1
- package/dist/{index-DyWaEvn_.js → index-Dri0EuQC.js} +2 -2
- package/dist/{index-DyWaEvn_.js.map → index-Dri0EuQC.js.map} +1 -1
- package/dist/index.d.ts +29 -2
- package/dist/index.js +2 -2
- package/package.json +1 -1
- package/dist/index-Bmj1KvsW.js +0 -1711
- package/dist/index-Bmj1KvsW.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-D7Vweq01.js";
|
|
2
2
|
import { R as T, u as w } from "./use-resize-observer-DNQ1lBLF.js";
|
|
3
|
-
import { E, e as b, v as h, w as y, f as D, x as S, q as _, d as j, u as M } from "./index-
|
|
3
|
+
import { E, e as b, v as h, w as y, f as D, x as S, q as _, d as j, u as M } from "./index-DIh_ttog.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-Dri0EuQC.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-Dri0EuQC.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
|
@@ -1450,6 +1450,7 @@ declare namespace components {
|
|
|
1450
1450
|
FilterSelect,
|
|
1451
1451
|
FiltersField as FilterField,
|
|
1452
1452
|
FilterBoxWrapper,
|
|
1453
|
+
FilterFieldTriggerVariant,
|
|
1453
1454
|
DateRangeCalendarProps,
|
|
1454
1455
|
Parser,
|
|
1455
1456
|
FilterFieldTypes,
|
|
@@ -2730,7 +2731,7 @@ declare interface FileViewerControlBarProps {
|
|
|
2730
2731
|
isGitLfsObject?: boolean;
|
|
2731
2732
|
}
|
|
2732
2733
|
|
|
2733
|
-
declare const FilterBoxWrapper: ({ handleRemoveFilter, defaultOpen, children, filterLabel, isOpen, setIsOpen, valueLabel, tooltipContent, onOpenChange, contentClassName }: FiltersProps) => JSX_2.Element;
|
|
2734
|
+
declare const FilterBoxWrapper: ({ handleRemoveFilter, defaultOpen, children, filterLabel, isOpen, setIsOpen, valueLabel, tooltipContent, onOpenChange, contentClassName, variant }: FiltersProps) => JSX_2.Element;
|
|
2734
2735
|
|
|
2735
2736
|
declare const filterChildrenByDisplayNames: (children: ReactNode, displayNames: string[], exclude?: true) => ReactElement[];
|
|
2736
2737
|
|
|
@@ -2739,6 +2740,8 @@ declare interface FilterFieldConfig<T = string | number> {
|
|
|
2739
2740
|
value?: T;
|
|
2740
2741
|
}
|
|
2741
2742
|
|
|
2743
|
+
declare type FilterFieldTriggerVariant = 'secondary' | 'outline';
|
|
2744
|
+
|
|
2742
2745
|
declare enum FilterFieldTypes {
|
|
2743
2746
|
Calendar = "calendar",
|
|
2744
2747
|
DateRange = "daterange",
|
|
@@ -2767,7 +2770,7 @@ declare const FilterSelect: {
|
|
|
2767
2770
|
displayName: string;
|
|
2768
2771
|
};
|
|
2769
2772
|
|
|
2770
|
-
declare const FiltersField: <T extends string, V extends FilterValueTypes, CustomValue = Record<string, unknown>>({ filterOption, removeFilter, shouldOpenFilter, dropdownContentClassName, onOpenChange, onChange, value }: FiltersFieldProps<T, V, CustomValue>) => JSX_2.Element;
|
|
2773
|
+
declare const FiltersField: <T extends string, V extends FilterValueTypes, CustomValue = Record<string, unknown>>({ filterOption, removeFilter, shouldOpenFilter, dropdownContentClassName, onOpenChange, onChange, value, variant }: FiltersFieldProps<T, V, CustomValue>) => JSX_2.Element;
|
|
2771
2774
|
|
|
2772
2775
|
declare interface FiltersFieldProps<T extends string, V extends FilterValueTypes, CustomValue = Record<string, unknown>> {
|
|
2773
2776
|
filterOption: FilterOptionConfig<T, CustomValue>;
|
|
@@ -2778,6 +2781,11 @@ declare interface FiltersFieldProps<T extends string, V extends FilterValueTypes
|
|
|
2778
2781
|
onOpenChange?: (open: boolean) => void;
|
|
2779
2782
|
onChange: (selectedValues: V) => void;
|
|
2780
2783
|
value?: V;
|
|
2784
|
+
/**
|
|
2785
|
+
* Trigger button look. Defaults to `secondary`.
|
|
2786
|
+
* Pass `outline` for standalone filters (no filter group).
|
|
2787
|
+
*/
|
|
2788
|
+
variant?: FilterFieldTriggerVariant;
|
|
2781
2789
|
}
|
|
2782
2790
|
|
|
2783
2791
|
declare interface FiltersProps {
|
|
@@ -2790,6 +2798,11 @@ declare interface FiltersProps {
|
|
|
2790
2798
|
valueLabel?: ReactNode;
|
|
2791
2799
|
tooltipContent?: ReactNode;
|
|
2792
2800
|
contentClassName?: string;
|
|
2801
|
+
/**
|
|
2802
|
+
* Trigger button look. Defaults to `secondary` so existing filter groups stay unchanged.
|
|
2803
|
+
* Use `outline` for standalone filters that should match other outline filter controls.
|
|
2804
|
+
*/
|
|
2805
|
+
variant?: FilterFieldTriggerVariant;
|
|
2793
2806
|
children?: ReactNode;
|
|
2794
2807
|
}
|
|
2795
2808
|
|
|
@@ -4379,10 +4392,15 @@ declare const LogoNameMapV2: {
|
|
|
4379
4392
|
'armore-code': FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
4380
4393
|
artifactory: FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
4381
4394
|
'auto-scaler': FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
4395
|
+
'aws-asg': FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
4396
|
+
'aws-ebs': FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
4382
4397
|
'aws-ec2': FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
4398
|
+
'aws-ecs': FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
4383
4399
|
'aws-elasticache': FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
4384
4400
|
'aws-rds': FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
4401
|
+
'aws-redshift': FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
4385
4402
|
aws: FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
4403
|
+
'azure-vm': FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
4386
4404
|
azure: FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
4387
4405
|
background: FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
4388
4406
|
bamboo: FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
@@ -4418,6 +4436,7 @@ declare const LogoNameMapV2: {
|
|
|
4418
4436
|
databricks: FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
4419
4437
|
debian: FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
4420
4438
|
'default-secret-manager': FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
4439
|
+
devin: FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
4421
4440
|
docker: FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
4422
4441
|
dynatrace: FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
4423
4442
|
elastic: FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
@@ -4994,6 +5013,8 @@ declare interface PageHeaderV2Props_2 {
|
|
|
4994
5013
|
tabs?: HeaderV2TabItem[];
|
|
4995
5014
|
/** `ghost` renders tabs inline in the title row; `underlined` (default) renders below. */
|
|
4996
5015
|
tabsVariant?: HeaderV2TabsVariant;
|
|
5016
|
+
/** Optional className passed to the `Tabs.List` element. */
|
|
5017
|
+
tabsClassName?: string;
|
|
4997
5018
|
contentTabs?: boolean;
|
|
4998
5019
|
children?: ReactNode;
|
|
4999
5020
|
className?: string;
|
|
@@ -7279,10 +7300,15 @@ declare const SymbolNameMap: {
|
|
|
7279
7300
|
'armore-code': FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
7280
7301
|
artifactory: FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
7281
7302
|
'auto-scaler': FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
7303
|
+
'aws-asg': FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
7304
|
+
'aws-ebs': FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
7282
7305
|
'aws-ec2': FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
7306
|
+
'aws-ecs': FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
7283
7307
|
'aws-elasticache': FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
7284
7308
|
'aws-rds': FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
7309
|
+
'aws-redshift': FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
7285
7310
|
aws: FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
7311
|
+
'azure-vm': FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
7286
7312
|
azure: FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
7287
7313
|
background: FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
7288
7314
|
bamboo: FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
@@ -7318,6 +7344,7 @@ declare const SymbolNameMap: {
|
|
|
7318
7344
|
databricks: FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
7319
7345
|
debian: FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
7320
7346
|
'default-secret-manager': FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
7347
|
+
devin: FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
7321
7348
|
docker: FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
7322
7349
|
dynatrace: FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
7323
7350
|
elastic: FunctionComponent<SVGProps<SVGSVGElement>>;
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as s } from "./index-CdF49wK7.js";
|
|
2
|
-
import { i as e } from "./index-
|
|
3
|
-
import { i as a } from "./index-
|
|
2
|
+
import { i as e } from "./index-Dq2oaTcj.js";
|
|
3
|
+
import { i as a } from "./index-Dri0EuQC.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-Bvis3lzj.js";
|