@konstructio/ui 0.1.2-alpha.67 → 0.1.2-alpha.69

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 (47) hide show
  1. package/dist/AdditionalOptions-C2FDVZhu.js +45 -0
  2. package/dist/Modal-BGcucTHv.js +120 -0
  3. package/dist/assets/icons/components/CloudLockOutline.d.ts +3 -0
  4. package/dist/assets/icons/components/CloudLockOutline.js +28 -0
  5. package/dist/assets/icons/components/index.d.ts +1 -0
  6. package/dist/assets/icons/components/index.js +106 -104
  7. package/dist/assets/icons/index.js +106 -104
  8. package/dist/components/ButtonGroup/ButtonGroup.js +65 -61
  9. package/dist/components/ButtonGroup/ButtonGroup.types.d.ts +6 -0
  10. package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.js +32 -30
  11. package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.types.d.ts +3 -1
  12. package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.variants.d.ts +4 -1
  13. package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.variants.js +37 -17
  14. package/dist/components/DateRangePicker/components/CalendarPanel/components/IndependentModeCalendar/IndependentModeCalendar.js +1 -1
  15. package/dist/components/DateRangePicker/components/CalendarPanel/components/TogetherModeCalendar/TogetherModeCalendar.js +1 -1
  16. package/dist/components/Modal/Modal.js +1 -1
  17. package/dist/components/Modal/Modal.types.d.ts +7 -2
  18. package/dist/components/Modal/components/Wrapper/Wrapper.js +3 -2
  19. package/dist/components/Modal/components/Wrapper/Wrapper.types.d.ts +3 -0
  20. package/dist/components/Modal/components/Wrapper/Wrapper.variants.js +2 -2
  21. package/dist/components/Modal/components/index.js +1 -1
  22. package/dist/components/Select/Select.d.ts +1 -0
  23. package/dist/components/Select/Select.js +65 -42
  24. package/dist/components/Select/Select.types.d.ts +18 -2
  25. package/dist/components/Select/Select.variants.js +1 -1
  26. package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.d.ts +3 -0
  27. package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.js +11 -0
  28. package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.types.d.ts +4 -0
  29. package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.variants.d.ts +1 -0
  30. package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.variants.js +26 -0
  31. package/dist/components/Select/components/List/List.js +131 -132
  32. package/dist/components/Select/components/List/List.types.d.ts +1 -0
  33. package/dist/components/Select/components/List/List.variants.d.ts +1 -0
  34. package/dist/components/Select/components/List/List.variants.js +18 -3
  35. package/dist/components/Select/components/Wrapper.d.ts +3 -1
  36. package/dist/components/Select/components/Wrapper.js +65 -63
  37. package/dist/components/Select/components/index.d.ts +1 -0
  38. package/dist/components/Select/components/index.js +8 -6
  39. package/dist/components/index.js +1 -1
  40. package/dist/icons.d.ts +1 -1
  41. package/dist/icons.js +106 -104
  42. package/dist/index.js +1 -1
  43. package/dist/package.json +3 -3
  44. package/dist/{proxy-BIRlSMN_.js → proxy-CngVm5qA.js} +1834 -1852
  45. package/dist/styles.css +1 -1
  46. package/package.json +3 -3
  47. package/dist/Modal--z642-Wv.js +0 -112
@@ -4,65 +4,66 @@ import { AlertOutlineIcon as p } from "./components/AlertOutline.js";
4
4
  import { AppRepoIcon as f } from "./components/AppRepo.js";
5
5
  import { AppsIcon as x } from "./components/Apps.js";
6
6
  import { ArchivesIcon as l } from "./components/Archives.js";
7
- import { ArrowDownIcon as s } from "./components/ArrowDown.js";
7
+ import { ArrowDownIcon as C } from "./components/ArrowDown.js";
8
8
  import { ArrowLeftIcon as u } from "./components/ArrowLeft.js";
9
- import { ArrowRightIcon as h } from "./components/ArrowRight.js";
10
- import { ArrowUpIcon as d } from "./components/ArrowUp.js";
11
- import { BarChartIcon as P } from "./components/BarChart.js";
9
+ import { ArrowRightIcon as d } from "./components/ArrowRight.js";
10
+ import { ArrowUpIcon as A } from "./components/ArrowUp.js";
11
+ import { BarChartIcon as O } from "./components/BarChart.js";
12
12
  import { BookOpenIcon as k } from "./components/BookOpen.js";
13
- import { CalendarMonthIcon as v } from "./components/CalendarMonth.js";
14
- import { CheckCircleIcon as L } from "./components/CheckCircle.js";
13
+ import { CalendarMonthIcon as S } from "./components/CalendarMonth.js";
14
+ import { CheckCircleIcon as E } from "./components/CheckCircle.js";
15
15
  import { CheckIcon as b } from "./components/Check.js";
16
16
  import { ClockAlertIcon as y } from "./components/ClockAlert.js";
17
17
  import { ClockOutlineIcon as G } from "./components/ClockOutline.js";
18
18
  import { CloseIcon as N } from "./components/Close.js";
19
19
  import { CloudIcon as K } from "./components/Cloud.js";
20
- import { ClustersIcon as U } from "./components/Clusters.js";
21
- import { CogOutlineIcon as W } from "./components/CogOutline.js";
22
- import { CopyIcon as j } from "./components/Copy.js";
23
- import { CpuIcon as z } from "./components/Cpu.js";
24
- import { CubeIcon as J } from "./components/Cube.js";
25
- import { DatacenterIcon as Y } from "./components/Datacenter.js";
26
- import { DeleteIcon as _ } from "./components/Delete.js";
27
- import { DollarSignIcon as oo } from "./components/DollarSign.js";
28
- import { DownloadIcon as eo } from "./components/Download.js";
29
- import { EditIcon as no } from "./components/Edit.js";
30
- import { EllipsesIcon as po } from "./components/Ellipses.js";
31
- import { EnvironmentsIcon as fo } from "./components/Environments.js";
32
- import { ErrorIcon as xo } from "./components/Error.js";
33
- import { ErrorOutlineIcon as lo } from "./components/ErrorOutline.js";
34
- import { ExclamationIcon as so } from "./components/Exclamation.js";
35
- import { GitIcon as uo } from "./components/Git.js";
36
- import { GitOpsCatalogIcon as ho } from "./components/GitOpsCatalog.js";
37
- import { GridViewIcon as go } from "./components/GridView.js";
38
- import { HelpIcon as Oo } from "./components/Help.js";
39
- import { HideOutlineIcon as So } from "./components/HideOutline.js";
40
- import { HomeIcon as Eo } from "./components/Home.js";
41
- import { IdIcon as Do } from "./components/Id.js";
42
- import { InformationOutlineIcon as Ro } from "./components/InformationOutline.js";
43
- import { InvoiceListIcon as Bo } from "./components/InvoiceList.js";
44
- import { KeyIcon as Ho } from "./components/Key.js";
45
- import { LightBulbIcon as To } from "./components/LightBulb.js";
46
- import { LoaderIcon as Mo } from "./components/Loader.js";
47
- import { NetworkIcon as Vo } from "./components/Network.js";
48
- import { PagesStackIcon as Xo } from "./components/PagesStack.js";
49
- import { PageviewIcon as qo } from "./components/Pageview.js";
50
- import { PeopleIcon as Fo } from "./components/People.js";
51
- import { PhotoLibraryIcon as Qo } from "./components/PhotoLibrary.js";
52
- import { PipelineIcon as Zo } from "./components/Pipeline.js";
53
- import { PlusIcon as $o } from "./components/Plus.js";
54
- import { PowerSettingsIcon as rr } from "./components/PowerSettings.js";
55
- import { PreviewIcon as tr } from "./components/Preview.js";
56
- import { ReceiptLongIcon as cr } from "./components/ReceiptLong.js";
57
- import { RefreshIcon as mr } from "./components/Refresh.js";
58
- import { ScatterPlotIcon as Ir } from "./components/ScatterPlot.js";
59
- import { SearchIcon as ir } from "./components/Search.js";
60
- import { ServerIcon as ar } from "./components/Server.js";
61
- import { StartIcon as Cr } from "./components/Start.js";
62
- import { TabNewIcon as wr } from "./components/TabNew.js";
63
- import { TeamsIcon as Ar } from "./components/Teams.js";
64
- import { WarningIcon as gr } from "./components/Warning.js";
65
- import { XIcon as Or } from "./components/X.js";
20
+ import { CloudLockOutlineIcon as U } from "./components/CloudLockOutline.js";
21
+ import { ClustersIcon as W } from "./components/Clusters.js";
22
+ import { CogOutlineIcon as j } from "./components/CogOutline.js";
23
+ import { CopyIcon as z } from "./components/Copy.js";
24
+ import { CpuIcon as J } from "./components/Cpu.js";
25
+ import { CubeIcon as Y } from "./components/Cube.js";
26
+ import { DatacenterIcon as _ } from "./components/Datacenter.js";
27
+ import { DeleteIcon as oo } from "./components/Delete.js";
28
+ import { DollarSignIcon as eo } from "./components/DollarSign.js";
29
+ import { DownloadIcon as no } from "./components/Download.js";
30
+ import { EditIcon as po } from "./components/Edit.js";
31
+ import { EllipsesIcon as fo } from "./components/Ellipses.js";
32
+ import { EnvironmentsIcon as xo } from "./components/Environments.js";
33
+ import { ErrorIcon as lo } from "./components/Error.js";
34
+ import { ErrorOutlineIcon as Co } from "./components/ErrorOutline.js";
35
+ import { ExclamationIcon as uo } from "./components/Exclamation.js";
36
+ import { GitIcon as ho } from "./components/Git.js";
37
+ import { GitOpsCatalogIcon as go } from "./components/GitOpsCatalog.js";
38
+ import { GridViewIcon as Po } from "./components/GridView.js";
39
+ import { HelpIcon as Lo } from "./components/Help.js";
40
+ import { HideOutlineIcon as vo } from "./components/HideOutline.js";
41
+ import { HomeIcon as Do } from "./components/Home.js";
42
+ import { IdIcon as Ro } from "./components/Id.js";
43
+ import { InformationOutlineIcon as Bo } from "./components/InformationOutline.js";
44
+ import { InvoiceListIcon as Ho } from "./components/InvoiceList.js";
45
+ import { KeyIcon as To } from "./components/Key.js";
46
+ import { LightBulbIcon as Mo } from "./components/LightBulb.js";
47
+ import { LoaderIcon as Vo } from "./components/Loader.js";
48
+ import { NetworkIcon as Xo } from "./components/Network.js";
49
+ import { PagesStackIcon as qo } from "./components/PagesStack.js";
50
+ import { PageviewIcon as Fo } from "./components/Pageview.js";
51
+ import { PeopleIcon as Qo } from "./components/People.js";
52
+ import { PhotoLibraryIcon as Zo } from "./components/PhotoLibrary.js";
53
+ import { PipelineIcon as $o } from "./components/Pipeline.js";
54
+ import { PlusIcon as rr } from "./components/Plus.js";
55
+ import { PowerSettingsIcon as tr } from "./components/PowerSettings.js";
56
+ import { PreviewIcon as cr } from "./components/Preview.js";
57
+ import { ReceiptLongIcon as mr } from "./components/ReceiptLong.js";
58
+ import { RefreshIcon as Ir } from "./components/Refresh.js";
59
+ import { ScatterPlotIcon as ir } from "./components/ScatterPlot.js";
60
+ import { SearchIcon as ar } from "./components/Search.js";
61
+ import { ServerIcon as sr } from "./components/Server.js";
62
+ import { StartIcon as wr } from "./components/Start.js";
63
+ import { TabNewIcon as hr } from "./components/TabNew.js";
64
+ import { TeamsIcon as gr } from "./components/Teams.js";
65
+ import { WarningIcon as Pr } from "./components/Warning.js";
66
+ import { XIcon as Lr } from "./components/X.js";
66
67
  export {
67
68
  e as AccountsIcon,
68
69
  n as AddChartIcon,
@@ -70,63 +71,64 @@ export {
70
71
  f as AppRepoIcon,
71
72
  x as AppsIcon,
72
73
  l as ArchivesIcon,
73
- s as ArrowDownIcon,
74
+ C as ArrowDownIcon,
74
75
  u as ArrowLeftIcon,
75
- h as ArrowRightIcon,
76
- d as ArrowUpIcon,
77
- P as BarChartIcon,
76
+ d as ArrowRightIcon,
77
+ A as ArrowUpIcon,
78
+ O as BarChartIcon,
78
79
  k as BookOpenIcon,
79
- v as CalendarMonthIcon,
80
- L as CheckCircleIcon,
80
+ S as CalendarMonthIcon,
81
+ E as CheckCircleIcon,
81
82
  b as CheckIcon,
82
83
  y as ClockAlertIcon,
83
84
  G as ClockOutlineIcon,
84
85
  N as CloseIcon,
85
86
  K as CloudIcon,
86
- U as ClustersIcon,
87
- W as CogOutlineIcon,
88
- j as CopyIcon,
89
- z as CpuIcon,
90
- J as CubeIcon,
91
- Y as DatacenterIcon,
92
- _ as DeleteIcon,
93
- oo as DollarSignIcon,
94
- eo as DownloadIcon,
95
- no as EditIcon,
96
- po as EllipsesIcon,
97
- fo as EnvironmentsIcon,
98
- xo as ErrorIcon,
99
- lo as ErrorOutlineIcon,
100
- so as ExclamationIcon,
101
- uo as GitIcon,
102
- ho as GitOpsCatalogIcon,
103
- go as GridViewIcon,
104
- Oo as HelpIcon,
105
- So as HideOutlineIcon,
106
- Eo as HomeIcon,
107
- Do as IdIcon,
108
- Ro as InformationOutlineIcon,
109
- Bo as InvoiceListIcon,
110
- Ho as KeyIcon,
111
- To as LightBulbIcon,
112
- Mo as LoaderIcon,
113
- Vo as NetworkIcon,
114
- Xo as PagesStackIcon,
115
- qo as PageviewIcon,
116
- Fo as PeopleIcon,
117
- Qo as PhotoLibraryIcon,
118
- Zo as PipelineIcon,
119
- $o as PlusIcon,
120
- rr as PowerSettingsIcon,
121
- tr as PreviewIcon,
122
- cr as ReceiptLongIcon,
123
- mr as RefreshIcon,
124
- Ir as ScatterPlotIcon,
125
- ir as SearchIcon,
126
- ar as ServerIcon,
127
- Cr as StartIcon,
128
- wr as TabNewIcon,
129
- Ar as TeamsIcon,
130
- gr as WarningIcon,
131
- Or as XIcon
87
+ U as CloudLockOutlineIcon,
88
+ W as ClustersIcon,
89
+ j as CogOutlineIcon,
90
+ z as CopyIcon,
91
+ J as CpuIcon,
92
+ Y as CubeIcon,
93
+ _ as DatacenterIcon,
94
+ oo as DeleteIcon,
95
+ eo as DollarSignIcon,
96
+ no as DownloadIcon,
97
+ po as EditIcon,
98
+ fo as EllipsesIcon,
99
+ xo as EnvironmentsIcon,
100
+ lo as ErrorIcon,
101
+ Co as ErrorOutlineIcon,
102
+ uo as ExclamationIcon,
103
+ ho as GitIcon,
104
+ go as GitOpsCatalogIcon,
105
+ Po as GridViewIcon,
106
+ Lo as HelpIcon,
107
+ vo as HideOutlineIcon,
108
+ Do as HomeIcon,
109
+ Ro as IdIcon,
110
+ Bo as InformationOutlineIcon,
111
+ Ho as InvoiceListIcon,
112
+ To as KeyIcon,
113
+ Mo as LightBulbIcon,
114
+ Vo as LoaderIcon,
115
+ Xo as NetworkIcon,
116
+ qo as PagesStackIcon,
117
+ Fo as PageviewIcon,
118
+ Qo as PeopleIcon,
119
+ Zo as PhotoLibraryIcon,
120
+ $o as PipelineIcon,
121
+ rr as PlusIcon,
122
+ tr as PowerSettingsIcon,
123
+ cr as PreviewIcon,
124
+ mr as ReceiptLongIcon,
125
+ Ir as RefreshIcon,
126
+ ir as ScatterPlotIcon,
127
+ ar as SearchIcon,
128
+ sr as ServerIcon,
129
+ wr as StartIcon,
130
+ hr as TabNewIcon,
131
+ gr as TeamsIcon,
132
+ Pr as WarningIcon,
133
+ Lr as XIcon
132
134
  };
@@ -1,83 +1,85 @@
1
1
  import { jsxs as d, jsx as a } from "react/jsx-runtime";
2
- import { useMemo as W } from "react";
2
+ import { useMemo as q } from "react";
3
3
  import { cn as n } from "../../utils/index.js";
4
- import { buttonGroupPillVariants as k, buttonGroupVariants as q, buttonGroupWrapperVariants as z } from "./ButtonGroup.variants.js";
5
- import { useButtonGroup as A } from "./hooks/useButtonGroup.js";
6
- import { ButtonGroupLabel as E } from "./components/ButtonGroupLabel/ButtonGroupLabel.js";
7
- import { m as H } from "../../proxy-BIRlSMN_.js";
8
- import { ButtonGroupItem as J } from "./components/ButtonGroupItem/ButtonGroupItem.js";
9
- import { ButtonGroupMessage as Q } from "./components/ButtonGroupMessage/ButtonGroupMessage.js";
10
- const T = ({
4
+ import { buttonGroupPillVariants as z, buttonGroupVariants as A, buttonGroupWrapperVariants as E } from "./ButtonGroup.variants.js";
5
+ import { useButtonGroup as H } from "./hooks/useButtonGroup.js";
6
+ import { ButtonGroupLabel as J } from "./components/ButtonGroupLabel/ButtonGroupLabel.js";
7
+ import { m as Q } from "../../proxy-CngVm5qA.js";
8
+ import { ButtonGroupItem as T } from "./components/ButtonGroupItem/ButtonGroupItem.js";
9
+ import { ButtonGroupMessage as U } from "./components/ButtonGroupMessage/ButtonGroupMessage.js";
10
+ const X = ({
11
11
  className: p,
12
12
  contentClassName: f,
13
13
  defaultValue: h,
14
- descriptionClassName: v,
14
+ descriptionAlign: v,
15
+ descriptionClassName: G,
15
16
  disabled: o,
16
17
  duration: l,
17
- error: G,
18
- errorClassName: b,
19
- helperText: N,
20
- helperTextClassName: y,
21
- isRequired: B,
22
- itemClassName: D,
23
- itemLabelClassName: g,
18
+ error: b,
19
+ errorClassName: N,
20
+ helperText: y,
21
+ helperTextClassName: B,
22
+ isRequired: D,
23
+ itemClassName: g,
24
+ itemLabelClassName: x,
24
25
  label: s,
25
- labelClassName: x,
26
- name: w,
26
+ labelAlign: w,
27
+ labelClassName: I,
28
+ name: K,
27
29
  options: t,
28
- pillClassName: I,
29
- requiredClassName: K,
30
- theme: S,
31
- value: V,
32
- wrapperClassName: $,
33
- onValueChange: j
30
+ pillClassName: S,
31
+ requiredClassName: V,
32
+ theme: $,
33
+ value: j,
34
+ wrapperClassName: F,
35
+ onValueChange: L
34
36
  }) => {
35
37
  const {
36
- animationDirection: F,
37
- groupRef: L,
38
+ animationDirection: M,
39
+ groupRef: C,
38
40
  id: m,
39
41
  selected: r,
40
- handleKeyDown: M,
41
- handleSelect: C
42
- } = A({
42
+ handleKeyDown: O,
43
+ handleSelect: P
44
+ } = H({
43
45
  defaultValue: h,
44
46
  disabled: o ?? void 0,
45
47
  options: t,
46
- value: V,
47
- onValueChange: j
48
- }), u = t.length, c = W(
48
+ value: j,
49
+ onValueChange: L
50
+ }), u = t.length, c = q(
49
51
  () => t.findIndex((e) => e.value === r),
50
52
  [t, r]
51
53
  );
52
54
  return /* @__PURE__ */ d(
53
55
  "div",
54
56
  {
55
- className: n(z(), $),
56
- "data-theme": S,
57
+ className: n(E(), F),
58
+ "data-theme": $,
57
59
  children: [
58
60
  s && /* @__PURE__ */ a(
59
- E,
61
+ J,
60
62
  {
61
- className: x,
63
+ className: I,
62
64
  htmlFor: m,
63
- isRequired: B,
65
+ isRequired: D,
64
66
  label: s,
65
- requiredClassName: K
67
+ requiredClassName: V
66
68
  }
67
69
  ),
68
70
  /* @__PURE__ */ d(
69
71
  "div",
70
72
  {
71
- ref: L,
73
+ ref: C,
72
74
  role: "radiogroup",
73
75
  "aria-labelledby": s ? m : void 0,
74
- className: n(q({ disabled: o }), p),
76
+ className: n(A({ disabled: o }), p),
75
77
  children: [
76
78
  c >= 0 && /* @__PURE__ */ a(
77
- H.div,
79
+ Q.div,
78
80
  {
79
81
  "aria-hidden": "true",
80
- className: n(k(), I),
82
+ className: n(z(), S),
81
83
  initial: !1,
82
84
  animate: {
83
85
  left: `calc(${c} * (100% / ${u}) + 8px)`,
@@ -91,26 +93,28 @@ const T = ({
91
93
  }
92
94
  ),
93
95
  t.map((e, i) => {
94
- const O = r === e.value, P = o || e.disabled, R = !!e.description;
96
+ const R = r === e.value, W = o || e.disabled, k = !!e.description;
95
97
  return /* @__PURE__ */ a(
96
- J,
98
+ T,
97
99
  {
98
- animationDirection: F,
99
- className: D,
100
+ animationDirection: M,
101
+ className: g,
100
102
  contentClassName: f,
101
- descriptionClassName: v,
103
+ descriptionAlign: v,
104
+ descriptionClassName: G,
102
105
  duration: l,
103
- hasDescription: R,
106
+ hasDescription: k,
104
107
  index: i,
105
- isDisabled: !!P,
108
+ isDisabled: !!W,
106
109
  isFirst: i === 0,
107
110
  isLast: i === t.length - 1,
108
- isSelected: O,
109
- labelClassName: g,
111
+ isSelected: R,
112
+ labelAlign: w,
113
+ labelClassName: x,
110
114
  option: e,
111
115
  value: e.value,
112
- onKeyDown: M,
113
- onSelect: C
116
+ onKeyDown: O,
117
+ onSelect: P
114
118
  },
115
119
  e.value
116
120
  );
@@ -118,21 +122,21 @@ const T = ({
118
122
  ]
119
123
  }
120
124
  ),
121
- /* @__PURE__ */ a("input", { type: "hidden", name: w, value: r ?? "" }),
125
+ /* @__PURE__ */ a("input", { type: "hidden", name: K, value: r ?? "" }),
122
126
  /* @__PURE__ */ a(
123
- Q,
127
+ U,
124
128
  {
125
- error: G,
126
- errorClassName: b,
127
- helperText: N,
128
- helperTextClassName: y
129
+ error: b,
130
+ errorClassName: N,
131
+ helperText: y,
132
+ helperTextClassName: B
129
133
  }
130
134
  )
131
135
  ]
132
136
  }
133
137
  );
134
138
  };
135
- T.displayName = "KonstructButtonGroup";
139
+ X.displayName = "KonstructButtonGroup";
136
140
  export {
137
- T as ButtonGroup
141
+ X as ButtonGroup
138
142
  };
@@ -2,6 +2,8 @@ import { ReactNode } from 'react';
2
2
  import { VariantProps } from 'class-variance-authority';
3
3
  import { Theme } from '../../domain/theme';
4
4
  import { buttonGroupVariants } from './ButtonGroup.variants';
5
+ /** Horizontal text alignment for label and description */
6
+ export type TextAlign = 'left' | 'center' | 'right';
5
7
  /**
6
8
  * Configuration for a single button option in the ButtonGroup.
7
9
  */
@@ -53,6 +55,8 @@ export type Props = VariantProps<typeof buttonGroupVariants> & {
53
55
  contentClassName?: string;
54
56
  /** Initially selected value (uncontrolled mode) */
55
57
  defaultValue?: string;
58
+ /** Horizontal alignment of the description text (default: 'left') */
59
+ descriptionAlign?: TextAlign;
56
60
  /** CSS classes for description text */
57
61
  descriptionClassName?: string;
58
62
  /** Animation duration in seconds (default: 0.3) */
@@ -71,6 +75,8 @@ export type Props = VariantProps<typeof buttonGroupVariants> & {
71
75
  itemClassName?: string;
72
76
  /** CSS classes for the label text inside items */
73
77
  itemLabelClassName?: string;
78
+ /** Horizontal alignment of the label text (default: 'left') */
79
+ labelAlign?: TextAlign;
74
80
  /** Label displayed above the button group */
75
81
  label?: string | ReactNode;
76
82
  /** CSS classes for the label */
@@ -1,26 +1,28 @@
1
1
  import { jsx as s, jsxs as a } from "react/jsx-runtime";
2
- import { memo as x } from "react";
2
+ import { memo as L } from "react";
3
3
  import { cn as t } from "../../../../utils/index.js";
4
- import { buttonGroupLabelVariants as o, buttonGroupDescriptionVariants as I, buttonGroupItemContentVariants as L, buttonGroupItemVariants as g } from "./ButtonGroupItem.variants.js";
5
- import { m as V } from "../../../../proxy-BIRlSMN_.js";
6
- const w = (r, n) => n === "none" ? r ? "inset(0 0 0 0)" : "inset(0 100% 0 0)" : r ? "inset(0 0 0 0)" : n === "right" ? "inset(0 0 0 100%)" : "inset(0 100% 0 0)", j = x(
4
+ import { buttonGroupLabelVariants as u, buttonGroupDescriptionVariants as V, buttonGroupItemContentVariants as g, buttonGroupItemVariants as w } from "./ButtonGroupItem.variants.js";
5
+ import { m as j } from "../../../../proxy-CngVm5qA.js";
6
+ const k = (r, n) => n === "none" ? r ? "inset(0 0 0 0)" : "inset(0 100% 0 0)" : r ? "inset(0 0 0 0)" : n === "right" ? "inset(0 0 0 100%)" : "inset(0 100% 0 0)", B = L(
7
7
  ({
8
8
  animationDirection: r,
9
9
  className: n,
10
- contentClassName: u,
11
- descriptionClassName: d,
12
- duration: p = 0.3,
13
- hasDescription: h,
10
+ contentClassName: d,
11
+ descriptionAlign: p,
12
+ descriptionClassName: h,
13
+ duration: b = 0.3,
14
+ hasDescription: f,
14
15
  index: c,
15
16
  isDisabled: l,
16
- isFirst: b,
17
- isLast: f,
17
+ isFirst: y,
18
+ isLast: N,
18
19
  isSelected: i,
19
- labelClassName: m,
20
+ labelAlign: m,
21
+ labelClassName: o,
20
22
  option: e,
21
- value: y,
22
- onKeyDown: N,
23
- onSelect: v
23
+ value: v,
24
+ onKeyDown: G,
25
+ onSelect: x
24
26
  }) => /* @__PURE__ */ s(
25
27
  "button",
26
28
  {
@@ -30,10 +32,10 @@ const w = (r, n) => n === "none" ? r ? "inset(0 0 0 0)" : "inset(0 100% 0 0)" :
30
32
  "data-value": e.value,
31
33
  disabled: l,
32
34
  tabIndex: i || c === 0 ? 0 : -1,
33
- onClick: () => !l && v(y),
34
- onKeyDown: (G) => N(G, c),
35
+ onClick: () => !l && x(v),
36
+ onKeyDown: (I) => G(I, c),
35
37
  className: t(
36
- g({ disabled: l, isFirst: b, isLast: f }),
38
+ w({ disabled: l, isFirst: y, isLast: N }),
37
39
  "relative",
38
40
  n
39
41
  ),
@@ -41,9 +43,9 @@ const w = (r, n) => n === "none" ? r ? "inset(0 0 0 0)" : "inset(0 100% 0 0)" :
41
43
  "div",
42
44
  {
43
45
  className: t(
44
- L({ hasDescription: h }),
46
+ g({ hasDescription: f }),
45
47
  "relative",
46
- u
48
+ d
47
49
  ),
48
50
  children: [
49
51
  /* @__PURE__ */ a("span", { className: "relative w-full", children: [
@@ -51,8 +53,8 @@ const w = (r, n) => n === "none" ? r ? "inset(0 0 0 0)" : "inset(0 100% 0 0)" :
51
53
  "span",
52
54
  {
53
55
  className: t(
54
- o({ selected: !1 }),
55
- m
56
+ u({ selected: !1, labelAlign: m }),
57
+ o
56
58
  ),
57
59
  children: [
58
60
  /* @__PURE__ */ a("span", { className: "flex items-center gap-2", children: [
@@ -64,22 +66,22 @@ const w = (r, n) => n === "none" ? r ? "inset(0 0 0 0)" : "inset(0 100% 0 0)" :
64
66
  }
65
67
  ),
66
68
  /* @__PURE__ */ a(
67
- V.span,
69
+ j.span,
68
70
  {
69
71
  className: t(
70
- o({ selected: !0 }),
72
+ u({ selected: !0, labelAlign: m }),
71
73
  "absolute inset-0",
72
- m
74
+ o
73
75
  ),
74
76
  "aria-hidden": "true",
75
77
  initial: !1,
76
78
  animate: {
77
- clipPath: w(i, r)
79
+ clipPath: k(i, r)
78
80
  },
79
81
  transition: {
80
82
  type: "tween",
81
83
  ease: "linear",
82
- duration: p
84
+ duration: b
83
85
  },
84
86
  children: [
85
87
  /* @__PURE__ */ a("span", { className: "flex items-center gap-2", children: [
@@ -95,8 +97,8 @@ const w = (r, n) => n === "none" ? r ? "inset(0 0 0 0)" : "inset(0 100% 0 0)" :
95
97
  "span",
96
98
  {
97
99
  className: t(
98
- I(),
99
- d
100
+ V({ descriptionAlign: p }),
101
+ h
100
102
  ),
101
103
  children: e.description
102
104
  }
@@ -108,7 +110,7 @@ const w = (r, n) => n === "none" ? r ? "inset(0 0 0 0)" : "inset(0 100% 0 0)" :
108
110
  e.value
109
111
  )
110
112
  );
111
- j.displayName = "KonstructButtonGroupItem";
113
+ B.displayName = "KonstructButtonGroupItem";
112
114
  export {
113
- j as ButtonGroupItem
115
+ B as ButtonGroupItem
114
116
  };
@@ -1,12 +1,14 @@
1
1
  import { KeyboardEvent } from 'react';
2
- import { ButtonGroupOption } from '../../ButtonGroup.types';
2
+ import { ButtonGroupOption, TextAlign } from '../../ButtonGroup.types';
3
3
  import { AnimationDirection } from '../../hooks';
4
4
  export type Props = {
5
5
  animationDirection: AnimationDirection;
6
6
  className?: string;
7
7
  contentClassName?: string;
8
+ descriptionAlign?: TextAlign;
8
9
  descriptionClassName?: string;
9
10
  duration?: number;
11
+ labelAlign?: TextAlign;
10
12
  hasDescription: boolean;
11
13
  index: number;
12
14
  isDisabled: boolean;
@@ -17,8 +17,11 @@ export declare const buttonGroupItemContentVariants: (props?: ({
17
17
  */
18
18
  export declare const buttonGroupLabelVariants: (props?: ({
19
19
  selected?: boolean | null | undefined;
20
+ labelAlign?: "center" | "left" | "right" | null | undefined;
20
21
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
21
22
  /**
22
23
  * Description text variants inside button item
23
24
  */
24
- export declare const buttonGroupDescriptionVariants: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
25
+ export declare const buttonGroupDescriptionVariants: (props?: ({
26
+ descriptionAlign?: "center" | "left" | "right" | null | undefined;
27
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;