@kosdev-code/base-ui-components 0.1.0-dev.5623 → 0.1.0-dev.5633

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.
@@ -0,0 +1,8 @@
1
+ import { FieldPath, FieldValues } from 'react-hook-form';
2
+
3
+ export interface FormHiddenFieldProps<T extends FieldValues = FieldValues, N extends FieldPath<T> = FieldPath<T>> {
4
+ name: N;
5
+ disabled?: boolean;
6
+ }
7
+ export declare const FormHiddenField: <T extends FieldValues = FieldValues, N extends FieldPath<T> = FieldPath<T>>({ name, disabled, }: FormHiddenFieldProps<T, N>) => null;
8
+ //# sourceMappingURL=form-hidden-field.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form-hidden-field.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/libraries/base-ui-components/src/components/molecules/form/components/form-hidden-field.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAGL,KAAK,SAAS,EACd,KAAK,WAAW,EACjB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,WAAW,oBAAoB,CACnC,CAAC,SAAS,WAAW,GAAG,WAAW,EACnC,CAAC,SAAS,SAAS,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC;IAErC,IAAI,EAAE,CAAC,CAAC;IACR,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,eAAe,oGAMzB,qBAAqB,CAAC,EAAE,CAAC,CAAC,SAO5B,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { FieldPath, FieldValues } from 'react-hook-form';
2
+
3
+ export interface FormStaticFieldProps<T extends FieldValues = FieldValues, N extends FieldPath<T> = FieldPath<T>> {
4
+ name: N;
5
+ label?: string;
6
+ disabled?: boolean;
7
+ }
8
+ export declare const FormStaticField: <T extends FieldValues = FieldValues, N extends FieldPath<T> = FieldPath<T>>({ name, label, disabled, }: FormStaticFieldProps<T, N>) => import("@emotion/react/jsx-runtime").JSX.Element;
9
+ //# sourceMappingURL=form-static-field.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form-static-field.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/libraries/base-ui-components/src/components/molecules/form/components/form-static-field.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,OAAO,EAGL,KAAK,SAAS,EACd,KAAK,WAAW,EACjB,MAAM,iBAAiB,CAAC;AAIzB,MAAM,WAAW,oBAAoB,CACnC,CAAC,SAAS,WAAW,GAAG,WAAW,EACnC,CAAC,SAAS,SAAS,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC;IAErC,IAAI,EAAE,CAAC,CAAC;IACR,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,eAAe,2GAOzB,qBAAqB,CAAC,EAAE,CAAC,CAAC,qDA4B5B,CAAC"}
@@ -11,4 +11,6 @@ export * from './form-name-input';
11
11
  export * from './form-combo-box';
12
12
  export * from './form-file-input';
13
13
  export * from './form-multi-select';
14
+ export * from './form-hidden-field';
15
+ export * from './form-static-field';
14
16
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/libraries/base-ui-components/src/components/molecules/form/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/libraries/base-ui-components/src/components/molecules/form/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC"}
@@ -0,0 +1,74 @@
1
+ import { AsyncListProps } from './async-list';
2
+ import { ListItem } from '../common/types';
3
+ import { ReactElement } from 'react';
4
+
5
+ /**
6
+ * Selection props for AsyncSelectViewList.
7
+ */
8
+ export interface AsyncSelectViewListSelectionProps {
9
+ /** Currently selected item IDs */
10
+ selected: string[];
11
+ /**
12
+ * Called when an item's selection is toggled (e.g., radio button click).
13
+ * The consumer is responsible for updating the `selected` array.
14
+ */
15
+ onSelect: (itemId: string) => void;
16
+ /** Whether selection is disabled */
17
+ disabled?: boolean;
18
+ }
19
+ /**
20
+ * Optional view action props for AsyncSelectViewList.
21
+ * When provided, enables the "view" action on items (e.g., body/chevron click).
22
+ */
23
+ export interface AsyncSelectViewListViewProps {
24
+ /** ID of the item currently being viewed (for visual highlighting) */
25
+ viewing?: string;
26
+ /**
27
+ * Called when an item's "view" action is triggered (e.g., clicking the body/chevron).
28
+ * Distinct from selection — this typically shows item details in another panel.
29
+ */
30
+ onItemView: (itemId: string) => void;
31
+ }
32
+ /**
33
+ * Props for AsyncSelectViewList.
34
+ * Combines AsyncList props with selection and optional view action props.
35
+ */
36
+ export type AsyncSelectViewListProps<I extends Record<string, any> = Record<string, any>, T extends ListItem = ListItem> = AsyncListProps<I, T> & AsyncSelectViewListSelectionProps & {
37
+ /** Optional view action configuration. When provided, wraps with ViewActionContext. */
38
+ viewAction?: AsyncSelectViewListViewProps;
39
+ };
40
+ /**
41
+ * AsyncList with built-in selection and optional view action support.
42
+ *
43
+ * Reduces boilerplate by internally creating and providing SelectListContext
44
+ * and (optionally) ViewActionContext. Pair with `StudioSelectViewListItem`
45
+ * for dual-action list items (radio select + body/chevron view).
46
+ *
47
+ * @example Selection only
48
+ * ```tsx
49
+ * <AsyncSelectViewList
50
+ * dataProvider={provider}
51
+ * ItemTemplate={StudioNamedListItem}
52
+ * selected={[selectedId]}
53
+ * onSelect={handleSelect}
54
+ * />
55
+ * ```
56
+ *
57
+ * @example Selection + view action (split-action pattern)
58
+ * ```tsx
59
+ * <AsyncSelectViewList
60
+ * dataProvider={provider}
61
+ * ItemTemplate={StudioSelectViewListItem}
62
+ * selected={[selectedId]}
63
+ * onSelect={handleSelect}
64
+ * viewAction={{
65
+ * viewing: viewingId,
66
+ * onItemView: handleItemView,
67
+ * }}
68
+ * />
69
+ * ```
70
+ */
71
+ export declare const AsyncSelectViewList: (<I extends Record<string, any>, T extends ListItem>({ selected, onSelect, disabled, viewAction, ...asyncListProps }: AsyncSelectViewListProps<I, T>) => ReactElement | null) & {
72
+ displayName: string;
73
+ };
74
+ //# sourceMappingURL=async-select-view-list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"async-select-view-list.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/libraries/base-ui-components/src/components/molecules/list/async-list/async-select-view-list.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAO1C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9D;;GAEG;AACH,MAAM,WAAW,iCAAiC;IAChD,kCAAkC;IAClC,QAAQ,EAAE,MAAM,EAAE,CAAC;IAEnB;;;OAGG;IACH,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAEnC,oCAAoC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,WAAW,4BAA4B;IAC3C,sEAAsE;IACtE,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CACtC;AAED;;;GAGG;AACH,MAAM,MAAM,wBAAwB,CAClC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACnD,CAAC,SAAS,QAAQ,GAAG,QAAQ,IAC3B,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,GACtB,iCAAiC,GAAG;IAClC,uFAAuF;IACvF,UAAU,CAAC,EAAE,4BAA4B,CAAC;CAC3C,CAAC;AAEJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,eAAO,MAAM,mBAAmB,wHAO3B,yBAAyB,CAAC,EAAE,CAAC,CAAC,KAAG,YAAY,GAAG,IAAI;;CAoCxD,CAAC"}
@@ -2,8 +2,10 @@
2
2
  * (C) Copyright 2025, TCCC, All rights reserved.
3
3
  */
4
4
  export * from './async-list';
5
+ export * from './async-select-view-list';
5
6
  export * from './async-list-group-header';
6
7
  export * from './types';
7
8
  export * from './item-action-bar';
8
9
  export * from './templates/studio-named-list-item';
10
+ export * from './templates/studio-select-view-list-item';
9
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/libraries/base-ui-components/src/components/molecules/list/async-list/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,cAAc,CAAC;AAC7B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC;AAClC,cAAc,oCAAoC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/libraries/base-ui-components/src/components/molecules/list/async-list/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,cAAc,CAAC;AAC7B,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC;AAClC,cAAc,oCAAoC,CAAC;AACnD,cAAc,0CAA0C,CAAC"}
@@ -0,0 +1,33 @@
1
+ import { ResolvedAction, ResolvedDecorator } from '../types';
2
+ import { ListItem } from '../../common/types';
3
+ import { IconColors, IconIds } from '../../../../atoms';
4
+ import { ReactNode } from 'react';
5
+
6
+ /**
7
+ * Studio 2.0 list item template with dual-action support:
8
+ * - Radio button click: toggles selection via SelectListContext
9
+ * - Body/chevron click: triggers "view" action via ViewActionContext
10
+ *
11
+ * This template combines the selection pattern from SelectViewListItem
12
+ * with the decoration capabilities of StudioNamedListItem, making it
13
+ * compatible with AsyncList and the declarative framework.
14
+ *
15
+ * @category Components
16
+ * @version 2.0.0
17
+ */
18
+ export interface StudioSelectViewListItemProps extends ListItem {
19
+ /** Optional subtitle (only used when children not provided) */
20
+ subText?: string;
21
+ /** Custom content - when provided, replaces name/subText rendering */
22
+ children?: ReactNode;
23
+ iconId?: IconIds;
24
+ iconColor?: IconColors;
25
+ actions?: ResolvedAction[];
26
+ decorators?: ResolvedDecorator[];
27
+ className?: string;
28
+ disabled?: boolean;
29
+ "data-depth"?: number;
30
+ "data-indent-size"?: number;
31
+ }
32
+ export declare const StudioSelectViewListItem: import('react').FunctionComponent<StudioSelectViewListItemProps>;
33
+ //# sourceMappingURL=studio-select-view-list-item.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"studio-select-view-list-item.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/libraries/base-ui-components/src/components/molecules/list/async-list/templates/studio-select-view-list-item.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAO7D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnD,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAOlE;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,6BAA8B,SAAQ,QAAQ;IAC7D,+DAA+D;IAC/D,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,sEAAsE;IACtE,QAAQ,CAAC,EAAE,SAAS,CAAC;IAGrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,UAAU,CAAC;IACvB,OAAO,CAAC,EAAE,cAAc,EAAE,CAAC;IAC3B,UAAU,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAGjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAGnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,eAAO,MAAM,wBAAwB,kEAuHlC,CAAC"}
@@ -1,3 +1,4 @@
1
1
  export * from './select-list-context';
2
2
  export * from './list-context';
3
+ export * from './view-action-context';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/libraries/base-ui-components/src/components/molecules/list/common/contexts/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/libraries/base-ui-components/src/components/molecules/list/common/contexts/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * (C) Copyright 2025, TCCC, All rights reserved.
3
+ */
4
+ /// <reference types="react" />
5
+ export interface ViewActionContextValue {
6
+ /** The ID of the item currently being viewed (for visual highlighting) */
7
+ viewing: string | undefined;
8
+ /** Callback to trigger the "view" action on an item */
9
+ onItemView: (itemId: string) => void;
10
+ }
11
+ export declare const ViewActionContext: import('react').Context<ViewActionContextValue | undefined>;
12
+ export declare const useViewActionContext: () => ViewActionContextValue;
13
+ //# sourceMappingURL=view-action-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"view-action-context.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/libraries/base-ui-components/src/components/molecules/list/common/contexts/view-action-context.tsx"],"names":[],"mappings":"AAAA;;GAEG;;AAKH,MAAM,WAAW,sBAAsB;IACrC,0EAA0E;IAC1E,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,uDAAuD;IACvD,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CACtC;AAED,eAAO,MAAM,iBAAiB,6DAK5B,CAAC;AAEH,eAAO,MAAM,oBAAoB,8BAWhC,CAAC"}