@tpc-mare/mare-ui-components-react 0.1.22 → 0.1.23

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.
Files changed (29) hide show
  1. package/dist/filter-chip/FilterChip.d.ts +2 -0
  2. package/dist/filter-chip/FilterChip.types.d.ts +40 -0
  3. package/dist/filter-chip/index.d.ts +2 -0
  4. package/dist/filter-chip/index.js +4 -0
  5. package/dist/filter-chip-dropdown-multiple/FilterChipDropdownMultiple.d.ts +9 -0
  6. package/dist/filter-chip-dropdown-multiple/FilterChipDropdownMultiple.types.d.ts +19 -0
  7. package/dist/filter-chip-dropdown-multiple/index.d.ts +2 -0
  8. package/dist/filter-chip-dropdown-multiple/index.js +4 -0
  9. package/dist/filter-chip-dropdown-single/FilterChipDropdownSingle.d.ts +11 -0
  10. package/dist/filter-chip-dropdown-single/FilterChipDropdownSingle.types.d.ts +15 -0
  11. package/dist/filter-chip-dropdown-single/index.d.ts +2 -0
  12. package/dist/filter-chip-dropdown-single/index.js +4 -0
  13. package/dist/filter-chip-group/FilterChipGroup.d.ts +8 -0
  14. package/dist/filter-chip-group/FilterChipGroup.types.d.ts +12 -0
  15. package/dist/filter-chip-group/index.d.ts +2 -0
  16. package/dist/filter-chip-group/index.js +5 -0
  17. package/dist/index/index.d.ts +10 -0
  18. package/dist/index/index.js +97 -87
  19. package/dist/segmented-control/SegmentedControl.d.ts +2 -0
  20. package/dist/segmented-control/SegmentedControl.types.d.ts +54 -0
  21. package/dist/segmented-control/index.d.ts +2 -0
  22. package/dist/segmented-control/index.js +4 -0
  23. package/dist/shared/FilterChip-eECL3oO7.js +71 -0
  24. package/dist/shared/FilterChipDropdownMultiple-D2eMYXyS.js +162 -0
  25. package/dist/shared/FilterChipDropdownSingle-4G5LDRCw.js +135 -0
  26. package/dist/shared/FilterChipGroup-BzE-EQsA.js +19 -0
  27. package/dist/shared/SegmentedControl-BpH7DANc.js +94 -0
  28. package/dist/styles.css +1 -1
  29. package/package.json +1 -1
@@ -0,0 +1,2 @@
1
+ import { FilterChipProperties } from './FilterChip.types';
2
+ export declare function FilterChip({ value, size, disabled, dropdown, selected: selectedProp, onSelectedChange, dropdownOpen, onDropdownOpenChange, onToggleDropdown, children, }: FilterChipProperties): import("react").JSX.Element;
@@ -0,0 +1,40 @@
1
+ import { MouseEvent, ReactNode } from 'react';
2
+ import { FilterChipSize } from '@tpc-development/mare-ui-components-core/filter-chip';
3
+ export type { FilterChipSize } from '@tpc-development/mare-ui-components-core/filter-chip';
4
+ export interface FilterChipProperties {
5
+ /**
6
+ * Identity within a FilterChipGroup. Falls back to `children` when
7
+ * omitted and children is a plain string.
8
+ */
9
+ value?: string;
10
+ /** @default 'medium' */
11
+ size?: FilterChipSize;
12
+ /** Blocks the click entirely, not just the styling. @default false */
13
+ disabled?: boolean;
14
+ /**
15
+ * Switches the chip from "removable filter" mode to "dropdown trigger"
16
+ * mode: shows a chevron instead of a remove icon, and click toggles
17
+ * `dropdownOpen` (firing onToggleDropdown) instead of the selection.
18
+ * Takes priority over a FilterChipGroup context — a dropdown chip inside
19
+ * a group does not participate in that group's selection.
20
+ * @default false
21
+ */
22
+ dropdown?: boolean;
23
+ /** Standalone selected state. Ignored when inside a FilterChipGroup —
24
+ * there the group controls selection. */
25
+ selected?: boolean;
26
+ onSelectedChange?: (selected: boolean) => void;
27
+ /**
28
+ * Only relevant when dropdown is true: whether the chevron points up
29
+ * (open) or down (closed). FilterChip renders no panel of its own — this
30
+ * exists so the consumer can sync their own popover with the chevron.
31
+ * @default false
32
+ */
33
+ dropdownOpen?: boolean;
34
+ onDropdownOpenChange?: (open: boolean) => void;
35
+ /** Fires on click while dropdown is true. `target` is the chip button —
36
+ * useful to position a consumer-owned panel/popover; FilterChip includes
37
+ * none itself. */
38
+ onToggleDropdown?: (event: MouseEvent<HTMLButtonElement>, target: HTMLElement) => void;
39
+ children?: ReactNode;
40
+ }
@@ -0,0 +1,2 @@
1
+ export { FilterChip } from './FilterChip';
2
+ export type { FilterChipProperties, FilterChipSize } from './FilterChip.types';
@@ -0,0 +1,4 @@
1
+ import { F as i } from "../shared/FilterChip-eECL3oO7.js";
2
+ export {
3
+ i as FilterChip
4
+ };
@@ -0,0 +1,9 @@
1
+ import { ReactNode } from 'react';
2
+ import { FilterChipDropdownMultipleProperties, FilterChipOptionItem } from './FilterChipDropdownMultiple.types';
3
+ interface FilterChipDropdownMultipleReactProperties extends FilterChipDropdownMultipleProperties {
4
+ value?: string[];
5
+ onValueChange?: (value: string[]) => void;
6
+ renderOption?: (option: FilterChipOptionItem) => ReactNode;
7
+ }
8
+ export declare function FilterChipDropdownMultiple({ value, onValueChange, options, placeholder, size, disabled, invalid, filter, headerLabel, hasCheckbox, showToggleAll, renderOption, }: FilterChipDropdownMultipleReactProperties): import("react").JSX.Element;
9
+ export {};
@@ -0,0 +1,19 @@
1
+ import { FilterChipDropdownSize, FilterChipOptionItem } from '@tpc-development/mare-ui-components-core/filter-chip-dropdown-multiple';
2
+ export type { FilterChipDropdownSize, FilterChipOptionItem, } from '@tpc-development/mare-ui-components-core/filter-chip-dropdown-multiple';
3
+ export interface FilterChipDropdownMultipleProperties {
4
+ options: FilterChipOptionItem[];
5
+ /** @default 'Select…' */
6
+ placeholder?: string;
7
+ /** @default 'medium' */
8
+ size?: FilterChipDropdownSize;
9
+ disabled?: boolean;
10
+ invalid?: boolean;
11
+ /** Shows a search field inside the panel. @default false */
12
+ filter?: boolean;
13
+ /** Text shown in the panel header, above the option list. */
14
+ headerLabel?: string;
15
+ /** Shows a checkbox next to each option (and in the header, when showToggleAll is on). @default true */
16
+ hasCheckbox?: boolean;
17
+ /** Shows the "select all" header row. @default false */
18
+ showToggleAll?: boolean;
19
+ }
@@ -0,0 +1,2 @@
1
+ export { FilterChipDropdownMultiple } from './FilterChipDropdownMultiple';
2
+ export type { FilterChipDropdownMultipleProperties, FilterChipDropdownSize, FilterChipOptionItem, } from './FilterChipDropdownMultiple.types';
@@ -0,0 +1,4 @@
1
+ import { F as r } from "../shared/FilterChipDropdownMultiple-D2eMYXyS.js";
2
+ export {
3
+ r as FilterChipDropdownMultiple
4
+ };
@@ -0,0 +1,11 @@
1
+ import { ReactNode } from 'react';
2
+ import { FilterChipDropdownSingleProperties, FilterChipOptionItem } from './FilterChipDropdownSingle.types';
3
+ interface FilterChipDropdownSingleReactProperties extends FilterChipDropdownSingleProperties {
4
+ value?: string | null;
5
+ onValueChange?: (value: string | null) => void;
6
+ renderOption?: (option: FilterChipOptionItem) => ReactNode;
7
+ checkIcon?: ReactNode;
8
+ clearIcon?: ReactNode;
9
+ }
10
+ export declare function FilterChipDropdownSingle({ value, onValueChange, options, placeholder, size, disabled, invalid, filter, clearable, renderOption, checkIcon, clearIcon, }: FilterChipDropdownSingleReactProperties): import("react").JSX.Element;
11
+ export {};
@@ -0,0 +1,15 @@
1
+ import { FilterChipDropdownSize, FilterChipOptionItem } from '@tpc-development/mare-ui-components-core/filter-chip-dropdown-single';
2
+ export type { FilterChipDropdownSize, FilterChipOptionItem, } from '@tpc-development/mare-ui-components-core/filter-chip-dropdown-single';
3
+ export interface FilterChipDropdownSingleProperties {
4
+ options: FilterChipOptionItem[];
5
+ /** @default 'Select…' */
6
+ placeholder?: string;
7
+ /** @default 'medium' */
8
+ size?: FilterChipDropdownSize;
9
+ disabled?: boolean;
10
+ invalid?: boolean;
11
+ /** Shows a search field inside the panel. @default false */
12
+ filter?: boolean;
13
+ /** Shows a '×' button in the trigger to clear the selected value. @default false */
14
+ clearable?: boolean;
15
+ }
@@ -0,0 +1,2 @@
1
+ export { FilterChipDropdownSingle } from './FilterChipDropdownSingle';
2
+ export type { FilterChipDropdownSingleProperties, FilterChipDropdownSize, FilterChipOptionItem, } from './FilterChipDropdownSingle.types';
@@ -0,0 +1,4 @@
1
+ import { F as e } from "../shared/FilterChipDropdownSingle-4G5LDRCw.js";
2
+ export {
3
+ e as FilterChipDropdownSingle
4
+ };
@@ -0,0 +1,8 @@
1
+ import { FilterChipGroupProperties } from './FilterChipGroup.types';
2
+ interface FilterChipGroupContextValue {
3
+ isSelected: (value: string) => boolean;
4
+ toggle: (value: string) => void;
5
+ }
6
+ export declare const FilterChipGroupContext: import('react').Context<FilterChipGroupContextValue | null>;
7
+ export declare function FilterChipGroup({ multiple, value, onValueChange, children, }: FilterChipGroupProperties): import("react").JSX.Element;
8
+ export {};
@@ -0,0 +1,12 @@
1
+ import { ReactNode } from 'react';
2
+ import { FilterChipGroupValue } from '@tpc-development/mare-ui-components-core/filter-chip-group';
3
+ export type { FilterChipGroupValue } from '@tpc-development/mare-ui-components-core/filter-chip-group';
4
+ export interface FilterChipGroupProperties {
5
+ /** @default false */
6
+ multiple?: boolean;
7
+ /** String (or undefined) when multiple is false; string[] when multiple is true. */
8
+ value?: FilterChipGroupValue;
9
+ onValueChange?: (value: FilterChipGroupValue) => void;
10
+ /** The FilterChip children. Each needs a distinct `value` (or string children) to be identified within the group. */
11
+ children?: ReactNode;
12
+ }
@@ -0,0 +1,2 @@
1
+ export { FilterChipGroup, FilterChipGroupContext } from './FilterChipGroup';
2
+ export type { FilterChipGroupProperties, FilterChipGroupValue, } from './FilterChipGroup.types';
@@ -0,0 +1,5 @@
1
+ import { F as p, a as t } from "../shared/FilterChipGroup-BzE-EQsA.js";
2
+ export {
3
+ p as FilterChipGroup,
4
+ t as FilterChipGroupContext
5
+ };
@@ -10,6 +10,14 @@ export { Tag } from '../tag';
10
10
  export type { TagProperties, TagSeverity, TagSize } from '../tag';
11
11
  export { TagChip } from '../tag-chip';
12
12
  export type { TagChipProperties, TagChipSeverity, TagChipSize, } from '../tag-chip';
13
+ export { FilterChip } from '../filter-chip';
14
+ export type { FilterChipProperties, FilterChipSize, } from '../filter-chip';
15
+ export { FilterChipGroup } from '../filter-chip-group';
16
+ export type { FilterChipGroupProperties, FilterChipGroupValue, } from '../filter-chip-group';
17
+ export { FilterChipDropdownSingle } from '../filter-chip-dropdown-single';
18
+ export type { FilterChipDropdownSingleProperties, FilterChipDropdownSize as FilterChipDropdownSingleSize, FilterChipOptionItem as FilterChipDropdownSingleOptionItem, } from '../filter-chip-dropdown-single';
19
+ export { FilterChipDropdownMultiple } from '../filter-chip-dropdown-multiple';
20
+ export type { FilterChipDropdownMultipleProperties, FilterChipDropdownSize as FilterChipDropdownMultipleSize, FilterChipOptionItem as FilterChipDropdownMultipleOptionItem, } from '../filter-chip-dropdown-multiple';
13
21
  export { Banner } from '../banner';
14
22
  export type { BannerProperties, BannerSeverity } from '../banner';
15
23
  export { Message } from '../message';
@@ -74,6 +82,8 @@ export { ImageItem } from '../image-item';
74
82
  export type { ImageItemProperties, ImageItemRatio, } from '../image-item';
75
83
  export { ImageSlider } from '../image-slider';
76
84
  export type { ImageSliderProperties } from '../image-slider';
85
+ export { SegmentedControl } from '../segmented-control';
86
+ export type { SegmentedControlProperties, SegmentedControlSize, SegmentedControlOptionWidth, SegmentedControlOptionItem, } from '../segmented-control';
77
87
  export { Skeleton } from '../skeleton';
78
88
  export type { SkeletonProperties, SkeletonShape } from '../skeleton';
79
89
  export { Slider } from '../slider';
@@ -2,96 +2,106 @@ import { A as e } from "../shared/Accordion-BLQ1mWZZ.js";
2
2
  import { A as t } from "../shared/Avatar-D3QlO3Tz.js";
3
3
  import { B as p } from "../shared/Badge-WC6my4Aw.js";
4
4
  import { O as x } from "../shared/OverlayBadge-jHzuklUb.js";
5
- import { T as n } from "../shared/Tag-BtbmgIwL.js";
6
- import { T as l } from "../shared/TagChip-Bs7srjIL.js";
7
- import { B as d } from "../shared/Banner-DXftmx9P.js";
8
- import { M as g } from "../shared/Message-BjC8CCSI.js";
9
- import { B as u } from "../shared/Button-AfMqNCme.js";
10
- import { B as I } from "../shared/Breadcrumbs-Cqr3Jitd.js";
11
- import { S as b } from "../shared/SelectField-CvKaukCG.js";
12
- import { C as F } from "../shared/Combobox-SkrEe5He.js";
13
- import { M } from "../shared/MultiSelect-DtsCymNB.js";
14
- import { T as h } from "../shared/Tabs-BqIorZYD.js";
15
- import { P as A } from "../shared/ProgressSpinner-B-lrS-tu.js";
16
- import { P as v } from "../shared/ProgressBar-Dxm0L3-R.js";
17
- import { I as E, a as R } from "../shared/IconField-Dh6j6SL1.js";
18
- import { C as G, F as L, a as N, H as j } from "../shared/HelperText-CVWWvLCI.js";
19
- import { T as z } from "../shared/Textarea-iJhYTZos.js";
20
- import { S as K } from "../shared/SearchField-DjJHDaR4.js";
21
- import { P as U, a as V } from "../shared/Password-BMKy8dAy.js";
22
- import { I as X } from "../shared/InputNumber-D48wsE-o.js";
23
- import { I as Z } from "../shared/InputOtp-CUXXVP2E.js";
24
- import { C as $ } from "../shared/Counter-DpOtUolN.js";
25
- import { E as or } from "../shared/ExpandableCounter-BEMcnTGQ.js";
26
- import { C as ar } from "../shared/Checkbox-BXnSN2vK.js";
27
- import { R as sr } from "../shared/RadioGroup-lw27DCoV.js";
28
- import { S as mr } from "../shared/Switch-D6E2OmgE.js";
29
- import { D as fr, a as nr } from "../shared/DialogFooter-DyltZzK-.js";
30
- import { D as lr } from "../shared/DialogHeader-RzfQm-pi.js";
31
- import { C as dr } from "../shared/ConfirmDialog-Bvk8KZ0M.js";
32
- import { D as gr, a as Dr, b as ur } from "../shared/DrawerFooter-BxOEFQ-W.js";
33
- import { M as Ir } from "../shared/Menu-Cv9dU1iA.js";
34
- import { P as br } from "../shared/PanelMenu-BpjNM7O_.js";
35
- import { S as Fr, c as Tr } from "../shared/Snackbar-C29nLHO9.js";
36
- import { S as wr } from "../shared/Stepper-By8M5bs0.js";
37
- import { D as kr } from "../shared/DatePicker-CwAISvNc.js";
38
- import { P as Hr } from "../shared/Paginator-Bp2nghqW.js";
39
- import { I as Or } from "../shared/ImageItem-BBy5fOl3.js";
40
- import { I as Rr } from "../shared/ImageSlider-Bgb1kNQ4.js";
41
- import { S as Gr } from "../shared/Skeleton-CAjoF-T2.js";
42
- import { S as Nr } from "../shared/Slider-CXFkperZ.js";
43
- import { D as qr } from "../shared/Divider-UgKI7dtK.js";
5
+ import { T as i } from "../shared/Tag-BtbmgIwL.js";
6
+ import { T as n } from "../shared/TagChip-Bs7srjIL.js";
7
+ import { F as d } from "../shared/FilterChip-eECL3oO7.js";
8
+ import { F } from "../shared/FilterChipGroup-BzE-EQsA.js";
9
+ import { F as D } from "../shared/FilterChipDropdownSingle-4G5LDRCw.js";
10
+ import { F as u } from "../shared/FilterChipDropdownMultiple-D2eMYXyS.js";
11
+ import { B as P } from "../shared/Banner-DXftmx9P.js";
12
+ import { M as B } from "../shared/Message-BjC8CCSI.js";
13
+ import { B as h } from "../shared/Button-AfMqNCme.js";
14
+ import { B as M } from "../shared/Breadcrumbs-Cqr3Jitd.js";
15
+ import { S as A } from "../shared/SelectField-CvKaukCG.js";
16
+ import { C as v } from "../shared/Combobox-SkrEe5He.js";
17
+ import { M as E } from "../shared/MultiSelect-DtsCymNB.js";
18
+ import { T as R } from "../shared/Tabs-BqIorZYD.js";
19
+ import { P as L } from "../shared/ProgressSpinner-B-lrS-tu.js";
20
+ import { P as j } from "../shared/ProgressBar-Dxm0L3-R.js";
21
+ import { I as z, a as J } from "../shared/IconField-Dh6j6SL1.js";
22
+ import { C as Q, F as U, a as V, H as W } from "../shared/HelperText-CVWWvLCI.js";
23
+ import { T as Y } from "../shared/Textarea-iJhYTZos.js";
24
+ import { S as _ } from "../shared/SearchField-DjJHDaR4.js";
25
+ import { P as rr, a as or } from "../shared/Password-BMKy8dAy.js";
26
+ import { I as ar } from "../shared/InputNumber-D48wsE-o.js";
27
+ import { I as sr } from "../shared/InputOtp-CUXXVP2E.js";
28
+ import { C as mr } from "../shared/Counter-DpOtUolN.js";
29
+ import { E as fr } from "../shared/ExpandableCounter-BEMcnTGQ.js";
30
+ import { C as lr } from "../shared/Checkbox-BXnSN2vK.js";
31
+ import { R as Sr } from "../shared/RadioGroup-lw27DCoV.js";
32
+ import { S as Cr } from "../shared/Switch-D6E2OmgE.js";
33
+ import { D as gr, a as Dr } from "../shared/DialogFooter-DyltZzK-.js";
34
+ import { D as ur } from "../shared/DialogHeader-RzfQm-pi.js";
35
+ import { C as Pr } from "../shared/ConfirmDialog-Bvk8KZ0M.js";
36
+ import { D as Br, a as Tr, b as hr } from "../shared/DrawerFooter-BxOEFQ-W.js";
37
+ import { M as Mr } from "../shared/Menu-Cv9dU1iA.js";
38
+ import { P as Ar } from "../shared/PanelMenu-BpjNM7O_.js";
39
+ import { S as vr, c as Or } from "../shared/Snackbar-C29nLHO9.js";
40
+ import { S as Gr } from "../shared/Stepper-By8M5bs0.js";
41
+ import { D as yr } from "../shared/DatePicker-CwAISvNc.js";
42
+ import { P as Nr } from "../shared/Paginator-Bp2nghqW.js";
43
+ import { I as qr } from "../shared/ImageItem-BBy5fOl3.js";
44
+ import { I as Jr } from "../shared/ImageSlider-Bgb1kNQ4.js";
45
+ import { S as Qr } from "../shared/SegmentedControl-BpH7DANc.js";
46
+ import { S as Vr } from "../shared/Skeleton-CAjoF-T2.js";
47
+ import { S as Xr } from "../shared/Slider-CXFkperZ.js";
48
+ import { D as Zr } from "../shared/Divider-UgKI7dtK.js";
44
49
  export {
45
50
  e as Accordion,
46
51
  t as Avatar,
47
52
  p as Badge,
48
- d as Banner,
49
- I as Breadcrumbs,
50
- u as Button,
51
- G as CharacterCount,
52
- ar as Checkbox,
53
- F as Combobox,
54
- dr as ConfirmDialog,
55
- $ as Counter,
56
- kr as DatePicker,
57
- fr as Dialog,
58
- nr as DialogFooter,
59
- lr as DialogHeader,
60
- qr as Divider,
61
- gr as Drawer,
62
- Dr as DrawerFooter,
63
- ur as DrawerHeader,
64
- or as ExpandableCounter,
65
- L as FloatLabel,
66
- N as FormField,
67
- j as HelperText,
68
- E as IconField,
69
- Or as ImageItem,
70
- Rr as ImageSlider,
71
- X as InputNumber,
72
- Z as InputOtp,
73
- R as InputText,
74
- Ir as Menu,
75
- g as Message,
76
- M as MultiSelect,
53
+ P as Banner,
54
+ M as Breadcrumbs,
55
+ h as Button,
56
+ Q as CharacterCount,
57
+ lr as Checkbox,
58
+ v as Combobox,
59
+ Pr as ConfirmDialog,
60
+ mr as Counter,
61
+ yr as DatePicker,
62
+ gr as Dialog,
63
+ Dr as DialogFooter,
64
+ ur as DialogHeader,
65
+ Zr as Divider,
66
+ Br as Drawer,
67
+ Tr as DrawerFooter,
68
+ hr as DrawerHeader,
69
+ fr as ExpandableCounter,
70
+ d as FilterChip,
71
+ u as FilterChipDropdownMultiple,
72
+ D as FilterChipDropdownSingle,
73
+ F as FilterChipGroup,
74
+ U as FloatLabel,
75
+ V as FormField,
76
+ W as HelperText,
77
+ z as IconField,
78
+ qr as ImageItem,
79
+ Jr as ImageSlider,
80
+ ar as InputNumber,
81
+ sr as InputOtp,
82
+ J as InputText,
83
+ Mr as Menu,
84
+ B as Message,
85
+ E as MultiSelect,
77
86
  x as OverlayBadge,
78
- Hr as Paginator,
79
- br as PanelMenu,
80
- U as Password,
81
- V as PasswordFooterItem,
82
- v as ProgressBar,
83
- A as ProgressSpinner,
84
- sr as RadioGroup,
85
- K as SearchField,
86
- b as SelectField,
87
- Gr as Skeleton,
88
- Nr as Slider,
89
- Fr as Snackbar,
90
- wr as Stepper,
91
- mr as Switch,
92
- h as Tabs,
93
- n as Tag,
94
- l as TagChip,
95
- z as Textarea,
96
- Tr as createSnackbar
87
+ Nr as Paginator,
88
+ Ar as PanelMenu,
89
+ rr as Password,
90
+ or as PasswordFooterItem,
91
+ j as ProgressBar,
92
+ L as ProgressSpinner,
93
+ Sr as RadioGroup,
94
+ _ as SearchField,
95
+ Qr as SegmentedControl,
96
+ A as SelectField,
97
+ Vr as Skeleton,
98
+ Xr as Slider,
99
+ vr as Snackbar,
100
+ Gr as Stepper,
101
+ Cr as Switch,
102
+ R as Tabs,
103
+ i as Tag,
104
+ n as TagChip,
105
+ Y as Textarea,
106
+ Or as createSnackbar
97
107
  };
@@ -0,0 +1,2 @@
1
+ import { SegmentedControlProperties } from './SegmentedControl.types';
2
+ export declare function SegmentedControl({ items, value, defaultValue, onValueChange, size, optionWidth, disabled, renderOption, name, form, id, }: SegmentedControlProperties): import("react").JSX.Element;
@@ -0,0 +1,54 @@
1
+ import { ReactNode } from 'react';
2
+ import { SegmentedControlSize, SegmentedControlOptionWidth, SegmentedControlOptionItem } from '@tpc-development/mare-ui-components-core/segmented-control';
3
+ export type { SegmentedControlSize, SegmentedControlOptionWidth, SegmentedControlOptionItem, } from '@tpc-development/mare-ui-components-core/segmented-control';
4
+ export interface SegmentedControlProperties {
5
+ /**
6
+ * The available segments.
7
+ */
8
+ items: SegmentedControlOptionItem[];
9
+ /**
10
+ * The controlled selected value.
11
+ */
12
+ value?: string;
13
+ /**
14
+ * Initial selected value (uncontrolled mode).
15
+ */
16
+ defaultValue?: string;
17
+ /**
18
+ * Handler called when the selected segment changes.
19
+ */
20
+ onValueChange?: (value: string) => void;
21
+ /**
22
+ * Size variant.
23
+ * @default 'small'
24
+ */
25
+ size?: SegmentedControlSize;
26
+ /**
27
+ * With 'equal', every segment takes up the same width (flex-1). Own Mare
28
+ * prop, not present in PrimeVue.
29
+ * @default 'auto'
30
+ */
31
+ optionWidth?: SegmentedControlOptionWidth;
32
+ /**
33
+ * Disables the entire group.
34
+ * @default false
35
+ */
36
+ disabled?: boolean;
37
+ /**
38
+ * Replaces a segment's default text content — e.g. to add a leading
39
+ * icon. Receives the raw item.
40
+ */
41
+ renderOption?: (item: SegmentedControlOptionItem) => ReactNode;
42
+ /**
43
+ * The name attribute for form submission.
44
+ */
45
+ name?: string;
46
+ /**
47
+ * ID of an associated form element.
48
+ */
49
+ form?: string;
50
+ /**
51
+ * Unique identifier for the group.
52
+ */
53
+ id?: string;
54
+ }
@@ -0,0 +1,2 @@
1
+ export { SegmentedControl } from './SegmentedControl';
2
+ export type { SegmentedControlProperties, SegmentedControlSize, SegmentedControlOptionWidth, SegmentedControlOptionItem, } from './SegmentedControl.types';
@@ -0,0 +1,4 @@
1
+ import { S as r } from "../shared/SegmentedControl-BpH7DANc.js";
2
+ export {
3
+ r as SegmentedControl
4
+ };
@@ -0,0 +1,71 @@
1
+ import { jsxs as g, jsx as a } from "react/jsx-runtime";
2
+ import { useContext as v } from "react";
3
+ import { a as h } from "./FilterChipGroup-BzE-EQsA.js";
4
+ import { c as x } from "./createReactComponent-Cb6Pzf10.js";
5
+ import { I as C } from "./IconChevronDown-ev2ML7Ex.js";
6
+ const z = [["path", { d: "M6 15l6 -6l6 6", key: "svg-0" }]], y = x("outline", "chevron-up", "ChevronUp", z), k = `
7
+ mare:group mare:relative mare:inline-flex mare:items-center mare:gap-1.5
8
+ mare:rounded-full mare:border mare:cursor-pointer mare:select-none
9
+ mare:tpc-typography-body-s mare:transition-colors mare:duration-150
10
+
11
+ mare:data-size-medium:h-10 mare:data-size-medium:px-3.5
12
+ mare:data-size-large:h-12 mare:data-size-large:px-4
13
+
14
+ mare:not-data-selected:bg-default mare:not-data-selected:text-default mare:not-data-selected:border-default
15
+ mare:not-data-selected:not-p-disabled:hover:bg-hover
16
+
17
+ mare:data-selected:bg-accent-weak mare:data-selected:text-accent mare:data-selected:border-transparent
18
+ mare:data-selected:outline-solid mare:data-selected:outline-2 mare:data-selected:outline-accent mare:data-selected:-outline-offset-2
19
+
20
+ mare:focus-visible:outline-solid mare:focus-visible:outline-2 mare:focus-visible:outline-accent mare:focus-visible:-outline-offset-2
21
+
22
+ mare:p-disabled:cursor-not-allowed mare:p-disabled:text-disabled mare:p-disabled:border-disabled-default
23
+ mare:p-disabled:bg-transparent mare:p-disabled:hover:bg-transparent
24
+ `, N = "mare:truncate mare:px-0.5", F = "mare:flex mare:items-center mare:shrink-0 mare:[&>svg]:size-4 mare:cursor-pointer";
25
+ function M({
26
+ value: d,
27
+ size: c = "medium",
28
+ disabled: t = !1,
29
+ dropdown: e = !1,
30
+ selected: u = !1,
31
+ onSelectedChange: p,
32
+ dropdownOpen: r = !1,
33
+ onDropdownOpenChange: f,
34
+ onToggleDropdown: b,
35
+ children: s
36
+ }) {
37
+ const i = v(h), l = d ?? (typeof s == "string" ? s : ""), m = !!i && !e, o = e ? !1 : m ? i.isSelected(l) : u;
38
+ return /* @__PURE__ */ g(
39
+ "button",
40
+ {
41
+ type: "button",
42
+ className: k,
43
+ "data-size": c,
44
+ "data-selected": o ? "true" : void 0,
45
+ "data-disabled": t ? "true" : void 0,
46
+ disabled: t,
47
+ "aria-pressed": e ? void 0 : o,
48
+ "aria-expanded": e ? r : void 0,
49
+ onClick: (n) => {
50
+ if (!t) {
51
+ if (e) {
52
+ f?.(!r), b?.(n, n.currentTarget);
53
+ return;
54
+ }
55
+ if (m) {
56
+ i.toggle(l);
57
+ return;
58
+ }
59
+ p?.(!o);
60
+ }
61
+ },
62
+ children: [
63
+ /* @__PURE__ */ a("span", { className: N, children: s }),
64
+ e && /* @__PURE__ */ a("span", { className: F, children: r ? /* @__PURE__ */ a(y, { size: "1em" }) : /* @__PURE__ */ a(C, { size: "1em" }) })
65
+ ]
66
+ }
67
+ );
68
+ }
69
+ export {
70
+ M as F
71
+ };