@invergent/ui-sdk 2.19.0 → 2.19.2

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 (112) hide show
  1. package/README.md +11 -2
  2. package/dist/badge.d.cts +1 -1
  3. package/dist/badge.d.ts +1 -1
  4. package/dist/button-group.cjs +80 -0
  5. package/dist/button-group.cjs.map +1 -0
  6. package/dist/button-group.d.cts +17 -0
  7. package/dist/button-group.d.ts +17 -0
  8. package/dist/button-group.js +75 -0
  9. package/dist/button-group.js.map +1 -0
  10. package/dist/button.d.cts +1 -1
  11. package/dist/button.d.ts +1 -1
  12. package/dist/chip.cjs +3 -3
  13. package/dist/chip.cjs.map +1 -1
  14. package/dist/chip.d.cts +2 -4
  15. package/dist/chip.d.ts +2 -4
  16. package/dist/chip.js +3 -3
  17. package/dist/chip.js.map +1 -1
  18. package/dist/{chunk-IVMZANP7.cjs → chunk-ILCP5QXL.cjs} +6 -3
  19. package/dist/chunk-ILCP5QXL.cjs.map +1 -0
  20. package/dist/chunk-NSK344BJ.js +80 -0
  21. package/dist/chunk-NSK344BJ.js.map +1 -0
  22. package/dist/chunk-PH733KDD.js +141 -0
  23. package/dist/chunk-PH733KDD.js.map +1 -0
  24. package/dist/chunk-QEBQ5NUN.cjs +148 -0
  25. package/dist/chunk-QEBQ5NUN.cjs.map +1 -0
  26. package/dist/chunk-UXSDDJXM.cjs +88 -0
  27. package/dist/chunk-UXSDDJXM.cjs.map +1 -0
  28. package/dist/{chunk-CPAFEXKR.js → chunk-WO2SXSNH.js} +6 -3
  29. package/dist/chunk-WO2SXSNH.js.map +1 -0
  30. package/dist/collapsible-header.cjs +14 -3
  31. package/dist/collapsible-header.cjs.map +1 -1
  32. package/dist/collapsible-header.d.cts +4 -1
  33. package/dist/collapsible-header.d.ts +4 -1
  34. package/dist/collapsible-header.js +14 -3
  35. package/dist/collapsible-header.js.map +1 -1
  36. package/dist/command.cjs +177 -0
  37. package/dist/command.cjs.map +1 -0
  38. package/dist/command.d.cts +22 -0
  39. package/dist/command.d.ts +22 -0
  40. package/dist/command.js +167 -0
  41. package/dist/command.js.map +1 -0
  42. package/dist/confirm-dialog.cjs +5 -3
  43. package/dist/confirm-dialog.cjs.map +1 -1
  44. package/dist/confirm-dialog.d.cts +4 -1
  45. package/dist/confirm-dialog.d.ts +4 -1
  46. package/dist/confirm-dialog.js +5 -3
  47. package/dist/confirm-dialog.js.map +1 -1
  48. package/dist/field.cjs +1 -1
  49. package/dist/field.js +1 -1
  50. package/dist/hover-card.cjs +43 -0
  51. package/dist/hover-card.cjs.map +1 -0
  52. package/dist/hover-card.d.cts +9 -0
  53. package/dist/hover-card.d.ts +9 -0
  54. package/dist/hover-card.js +39 -0
  55. package/dist/hover-card.js.map +1 -0
  56. package/dist/input-group.cjs +30 -142
  57. package/dist/input-group.cjs.map +1 -1
  58. package/dist/input-group.js +5 -139
  59. package/dist/input-group.js.map +1 -1
  60. package/dist/item.cjs +196 -0
  61. package/dist/item.cjs.map +1 -0
  62. package/dist/item.d.cts +28 -0
  63. package/dist/item.d.ts +28 -0
  64. package/dist/item.js +185 -0
  65. package/dist/item.js.map +1 -0
  66. package/dist/popover.cjs +31 -82
  67. package/dist/popover.cjs.map +1 -1
  68. package/dist/popover.js +2 -78
  69. package/dist/popover.js.map +1 -1
  70. package/dist/progress-bar.cjs +22 -10
  71. package/dist/progress-bar.cjs.map +1 -1
  72. package/dist/progress-bar.d.cts +2 -1
  73. package/dist/progress-bar.d.ts +2 -1
  74. package/dist/progress-bar.js +22 -10
  75. package/dist/progress-bar.js.map +1 -1
  76. package/dist/rabbit-mark.cjs +30 -0
  77. package/dist/rabbit-mark.cjs.map +1 -0
  78. package/dist/rabbit-mark.d.cts +16 -0
  79. package/dist/rabbit-mark.d.ts +16 -0
  80. package/dist/rabbit-mark.js +26 -0
  81. package/dist/rabbit-mark.js.map +1 -0
  82. package/dist/responsive-panel.cjs +85 -0
  83. package/dist/responsive-panel.cjs.map +1 -0
  84. package/dist/responsive-panel.d.cts +33 -0
  85. package/dist/responsive-panel.d.ts +33 -0
  86. package/dist/responsive-panel.js +83 -0
  87. package/dist/responsive-panel.js.map +1 -0
  88. package/dist/tab-strip.cjs +74 -0
  89. package/dist/tab-strip.cjs.map +1 -0
  90. package/dist/tab-strip.d.cts +22 -0
  91. package/dist/tab-strip.d.ts +22 -0
  92. package/dist/tab-strip.js +71 -0
  93. package/dist/tab-strip.js.map +1 -0
  94. package/dist/tabs.d.cts +1 -1
  95. package/dist/tabs.d.ts +1 -1
  96. package/dist/timeline.cjs +171 -0
  97. package/dist/timeline.cjs.map +1 -0
  98. package/dist/timeline.d.cts +28 -0
  99. package/dist/timeline.d.ts +28 -0
  100. package/dist/timeline.js +162 -0
  101. package/dist/timeline.js.map +1 -0
  102. package/dist/toggle-group.cjs +4 -2
  103. package/dist/toggle-group.cjs.map +1 -1
  104. package/dist/toggle-group.js +3 -1
  105. package/dist/toggle-group.js.map +1 -1
  106. package/dist/toggle.cjs +4 -4
  107. package/dist/toggle.d.cts +1 -1
  108. package/dist/toggle.d.ts +1 -1
  109. package/dist/toggle.js +1 -1
  110. package/package.json +2 -1
  111. package/dist/chunk-CPAFEXKR.js.map +0 -1
  112. package/dist/chunk-IVMZANP7.cjs.map +0 -1
@@ -0,0 +1,141 @@
1
+ import { Textarea } from './chunk-5CRE35VX.js';
2
+ import { Input } from './chunk-6JCVTRUK.js';
3
+ import { Button } from './chunk-A44JJ6NH.js';
4
+ import { cn } from './chunk-LZGII7SX.js';
5
+ import { cva } from 'class-variance-authority';
6
+ import { jsx } from 'react/jsx-runtime';
7
+
8
+ function InputGroup({ className, ...props }) {
9
+ return /* @__PURE__ */ jsx(
10
+ "div",
11
+ {
12
+ "data-slot": "input-group",
13
+ role: "group",
14
+ className: cn(
15
+ "group/input-group relative flex h-10 w-full min-w-0 items-center rounded-[10px] border border-foreground/10 bg-foreground/[0.04] transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:border-foreground/20 has-[[data-slot][aria-invalid=true]]:border-destructive has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:has-[[data-slot][aria-invalid=true]]:border-destructive/50 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3",
16
+ className
17
+ ),
18
+ ...props
19
+ }
20
+ );
21
+ }
22
+ var inputGroupAddonVariants = cva(
23
+ "flex h-auto cursor-text items-center justify-center gap-2 py-2 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 **:data-[slot=kbd]:rounded-none **:data-[slot=kbd]:bg-muted-foreground/10 **:data-[slot=kbd]:px-1.5 [&>svg:not([class*='size-'])]:size-3.5",
24
+ {
25
+ variants: {
26
+ align: {
27
+ "inline-start": "order-first",
28
+ "inline-end": "order-last",
29
+ "block-start": "order-first w-full justify-start pt-3 group-has-[>input]/input-group:pt-3.5 [.border-b]:pb-3.5",
30
+ "block-end": "order-last w-full justify-start pb-3 group-has-[>input]/input-group:pb-3.5 [.border-t]:pt-3.5"
31
+ }
32
+ },
33
+ defaultVariants: {
34
+ align: "inline-start"
35
+ }
36
+ }
37
+ );
38
+ function InputGroupAddon({
39
+ className,
40
+ align = "inline-start",
41
+ ...props
42
+ }) {
43
+ return /* @__PURE__ */ jsx(
44
+ "div",
45
+ {
46
+ role: "group",
47
+ "data-slot": "input-group-addon",
48
+ "data-align": align,
49
+ className: cn(inputGroupAddonVariants({ align }), className),
50
+ onClick: (e) => {
51
+ if (e.target.closest("button")) {
52
+ return;
53
+ }
54
+ e.currentTarget.parentElement?.querySelector("input")?.focus();
55
+ },
56
+ ...props
57
+ }
58
+ );
59
+ }
60
+ var inputGroupButtonVariants = cva(
61
+ "flex items-center gap-2 rounded-none text-sm shadow-none",
62
+ {
63
+ variants: {
64
+ size: {
65
+ xs: "h-6 gap-1 rounded-none px-1.5 text-xs [&>svg:not([class*='size-'])]:size-3.5",
66
+ sm: "",
67
+ "icon-xs": "size-6 p-0 text-xs has-[>svg]:p-0",
68
+ "icon-sm": "size-8 p-0 has-[>svg]:p-0"
69
+ }
70
+ },
71
+ defaultVariants: {
72
+ size: "xs"
73
+ }
74
+ }
75
+ );
76
+ function InputGroupButton({
77
+ className,
78
+ type = "button",
79
+ variant = "ghost",
80
+ size = "xs",
81
+ ...props
82
+ }) {
83
+ return /* @__PURE__ */ jsx(
84
+ Button,
85
+ {
86
+ type,
87
+ "data-size": size,
88
+ variant,
89
+ className: cn(inputGroupButtonVariants({ size }), className),
90
+ ...props
91
+ }
92
+ );
93
+ }
94
+ function InputGroupText({ className, ...props }) {
95
+ return /* @__PURE__ */ jsx(
96
+ "span",
97
+ {
98
+ className: cn(
99
+ "flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-3.5",
100
+ className
101
+ ),
102
+ ...props
103
+ }
104
+ );
105
+ }
106
+ function InputGroupInput({
107
+ className,
108
+ ...props
109
+ }) {
110
+ return /* @__PURE__ */ jsx(
111
+ Input,
112
+ {
113
+ "data-slot": "input-group-control",
114
+ className: cn(
115
+ "flex-1 border-0 bg-transparent ring-0 group-has-[>[data-align=inline-end]]/input-group:pr-2 group-has-[>[data-align=inline-start]]/input-group:pl-2 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",
116
+ className
117
+ ),
118
+ ...props
119
+ }
120
+ );
121
+ }
122
+ function InputGroupTextarea({
123
+ className,
124
+ ...props
125
+ }) {
126
+ return /* @__PURE__ */ jsx(
127
+ Textarea,
128
+ {
129
+ "data-slot": "input-group-control",
130
+ className: cn(
131
+ "flex-1 resize-none border-0 bg-transparent py-2.5 ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",
132
+ className
133
+ ),
134
+ ...props
135
+ }
136
+ );
137
+ }
138
+
139
+ export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea };
140
+ //# sourceMappingURL=chunk-PH733KDD.js.map
141
+ //# sourceMappingURL=chunk-PH733KDD.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/input-group.tsx"],"names":[],"mappings":"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","file":"chunk-PH733KDD.js","sourcesContent":["import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"./lib/utils\"\nimport { Button } from \"./button\"\nimport { Input } from \"./input\"\nimport { Textarea } from \"./textarea\"\n\nfunction InputGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"input-group\"\n role=\"group\"\n className={cn(\n \"group/input-group relative flex h-10 w-full min-w-0 items-center rounded-[10px] border border-foreground/10 bg-foreground/[0.04] transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:border-foreground/20 has-[[data-slot][aria-invalid=true]]:border-destructive has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:has-[[data-slot][aria-invalid=true]]:border-destructive/50 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3\",\n className\n )}\n {...props}\n />\n )\n}\n\nconst inputGroupAddonVariants = cva(\n \"flex h-auto cursor-text items-center justify-center gap-2 py-2 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 **:data-[slot=kbd]:rounded-none **:data-[slot=kbd]:bg-muted-foreground/10 **:data-[slot=kbd]:px-1.5 [&>svg:not([class*='size-'])]:size-3.5\",\n {\n variants: {\n align: {\n \"inline-start\": \"order-first\",\n \"inline-end\": \"order-last\",\n \"block-start\":\n \"order-first w-full justify-start pt-3 group-has-[>input]/input-group:pt-3.5 [.border-b]:pb-3.5\",\n \"block-end\":\n \"order-last w-full justify-start pb-3 group-has-[>input]/input-group:pb-3.5 [.border-t]:pt-3.5\",\n },\n },\n defaultVariants: {\n align: \"inline-start\",\n },\n }\n)\n\nfunction InputGroupAddon({\n className,\n align = \"inline-start\",\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps<typeof inputGroupAddonVariants>) {\n return (\n <div\n role=\"group\"\n data-slot=\"input-group-addon\"\n data-align={align}\n className={cn(inputGroupAddonVariants({ align }), className)}\n onClick={(e) => {\n if ((e.target as HTMLElement).closest(\"button\")) {\n return\n }\n e.currentTarget.parentElement?.querySelector(\"input\")?.focus()\n }}\n {...props}\n />\n )\n}\n\nconst inputGroupButtonVariants = cva(\n \"flex items-center gap-2 rounded-none text-sm shadow-none\",\n {\n variants: {\n size: {\n xs: \"h-6 gap-1 rounded-none px-1.5 text-xs [&>svg:not([class*='size-'])]:size-3.5\",\n sm: \"\",\n \"icon-xs\": \"size-6 p-0 text-xs has-[>svg]:p-0\",\n \"icon-sm\": \"size-8 p-0 has-[>svg]:p-0\",\n },\n },\n defaultVariants: {\n size: \"xs\",\n },\n }\n)\n\nfunction InputGroupButton({\n className,\n type = \"button\",\n variant = \"ghost\",\n size = \"xs\",\n ...props\n}: Omit<React.ComponentProps<typeof Button>, \"size\"> &\n VariantProps<typeof inputGroupButtonVariants>) {\n return (\n <Button\n type={type}\n data-size={size}\n variant={variant}\n className={cn(inputGroupButtonVariants({ size }), className)}\n {...props}\n />\n )\n}\n\nfunction InputGroupText({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n <span\n className={cn(\n \"flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-3.5\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction InputGroupInput({\n className,\n ...props\n}: React.ComponentProps<\"input\">) {\n return (\n <Input\n data-slot=\"input-group-control\"\n className={cn(\n \"flex-1 border-0 bg-transparent ring-0 group-has-[>[data-align=inline-end]]/input-group:pr-2 group-has-[>[data-align=inline-start]]/input-group:pl-2 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction InputGroupTextarea({\n className,\n ...props\n}: React.ComponentProps<\"textarea\">) {\n return (\n <Textarea\n data-slot=\"input-group-control\"\n className={cn(\n \"flex-1 resize-none border-0 bg-transparent py-2.5 ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupText,\n InputGroupInput,\n InputGroupTextarea,\n}\n"]}
@@ -0,0 +1,148 @@
1
+ 'use strict';
2
+
3
+ var chunkUOUXW63J_cjs = require('./chunk-UOUXW63J.cjs');
4
+ var chunkRVX6SN4U_cjs = require('./chunk-RVX6SN4U.cjs');
5
+ var chunkVBICNC43_cjs = require('./chunk-VBICNC43.cjs');
6
+ var chunk6YHDDRIM_cjs = require('./chunk-6YHDDRIM.cjs');
7
+ var classVarianceAuthority = require('class-variance-authority');
8
+ var jsxRuntime = require('react/jsx-runtime');
9
+
10
+ function InputGroup({ className, ...props }) {
11
+ return /* @__PURE__ */ jsxRuntime.jsx(
12
+ "div",
13
+ {
14
+ "data-slot": "input-group",
15
+ role: "group",
16
+ className: chunk6YHDDRIM_cjs.cn(
17
+ "group/input-group relative flex h-10 w-full min-w-0 items-center rounded-[10px] border border-foreground/10 bg-foreground/[0.04] transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:border-foreground/20 has-[[data-slot][aria-invalid=true]]:border-destructive has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:has-[[data-slot][aria-invalid=true]]:border-destructive/50 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3",
18
+ className
19
+ ),
20
+ ...props
21
+ }
22
+ );
23
+ }
24
+ var inputGroupAddonVariants = classVarianceAuthority.cva(
25
+ "flex h-auto cursor-text items-center justify-center gap-2 py-2 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 **:data-[slot=kbd]:rounded-none **:data-[slot=kbd]:bg-muted-foreground/10 **:data-[slot=kbd]:px-1.5 [&>svg:not([class*='size-'])]:size-3.5",
26
+ {
27
+ variants: {
28
+ align: {
29
+ "inline-start": "order-first",
30
+ "inline-end": "order-last",
31
+ "block-start": "order-first w-full justify-start pt-3 group-has-[>input]/input-group:pt-3.5 [.border-b]:pb-3.5",
32
+ "block-end": "order-last w-full justify-start pb-3 group-has-[>input]/input-group:pb-3.5 [.border-t]:pt-3.5"
33
+ }
34
+ },
35
+ defaultVariants: {
36
+ align: "inline-start"
37
+ }
38
+ }
39
+ );
40
+ function InputGroupAddon({
41
+ className,
42
+ align = "inline-start",
43
+ ...props
44
+ }) {
45
+ return /* @__PURE__ */ jsxRuntime.jsx(
46
+ "div",
47
+ {
48
+ role: "group",
49
+ "data-slot": "input-group-addon",
50
+ "data-align": align,
51
+ className: chunk6YHDDRIM_cjs.cn(inputGroupAddonVariants({ align }), className),
52
+ onClick: (e) => {
53
+ if (e.target.closest("button")) {
54
+ return;
55
+ }
56
+ e.currentTarget.parentElement?.querySelector("input")?.focus();
57
+ },
58
+ ...props
59
+ }
60
+ );
61
+ }
62
+ var inputGroupButtonVariants = classVarianceAuthority.cva(
63
+ "flex items-center gap-2 rounded-none text-sm shadow-none",
64
+ {
65
+ variants: {
66
+ size: {
67
+ xs: "h-6 gap-1 rounded-none px-1.5 text-xs [&>svg:not([class*='size-'])]:size-3.5",
68
+ sm: "",
69
+ "icon-xs": "size-6 p-0 text-xs has-[>svg]:p-0",
70
+ "icon-sm": "size-8 p-0 has-[>svg]:p-0"
71
+ }
72
+ },
73
+ defaultVariants: {
74
+ size: "xs"
75
+ }
76
+ }
77
+ );
78
+ function InputGroupButton({
79
+ className,
80
+ type = "button",
81
+ variant = "ghost",
82
+ size = "xs",
83
+ ...props
84
+ }) {
85
+ return /* @__PURE__ */ jsxRuntime.jsx(
86
+ chunkVBICNC43_cjs.Button,
87
+ {
88
+ type,
89
+ "data-size": size,
90
+ variant,
91
+ className: chunk6YHDDRIM_cjs.cn(inputGroupButtonVariants({ size }), className),
92
+ ...props
93
+ }
94
+ );
95
+ }
96
+ function InputGroupText({ className, ...props }) {
97
+ return /* @__PURE__ */ jsxRuntime.jsx(
98
+ "span",
99
+ {
100
+ className: chunk6YHDDRIM_cjs.cn(
101
+ "flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-3.5",
102
+ className
103
+ ),
104
+ ...props
105
+ }
106
+ );
107
+ }
108
+ function InputGroupInput({
109
+ className,
110
+ ...props
111
+ }) {
112
+ return /* @__PURE__ */ jsxRuntime.jsx(
113
+ chunkRVX6SN4U_cjs.Input,
114
+ {
115
+ "data-slot": "input-group-control",
116
+ className: chunk6YHDDRIM_cjs.cn(
117
+ "flex-1 border-0 bg-transparent ring-0 group-has-[>[data-align=inline-end]]/input-group:pr-2 group-has-[>[data-align=inline-start]]/input-group:pl-2 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",
118
+ className
119
+ ),
120
+ ...props
121
+ }
122
+ );
123
+ }
124
+ function InputGroupTextarea({
125
+ className,
126
+ ...props
127
+ }) {
128
+ return /* @__PURE__ */ jsxRuntime.jsx(
129
+ chunkUOUXW63J_cjs.Textarea,
130
+ {
131
+ "data-slot": "input-group-control",
132
+ className: chunk6YHDDRIM_cjs.cn(
133
+ "flex-1 resize-none border-0 bg-transparent py-2.5 ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",
134
+ className
135
+ ),
136
+ ...props
137
+ }
138
+ );
139
+ }
140
+
141
+ exports.InputGroup = InputGroup;
142
+ exports.InputGroupAddon = InputGroupAddon;
143
+ exports.InputGroupButton = InputGroupButton;
144
+ exports.InputGroupInput = InputGroupInput;
145
+ exports.InputGroupText = InputGroupText;
146
+ exports.InputGroupTextarea = InputGroupTextarea;
147
+ //# sourceMappingURL=chunk-QEBQ5NUN.cjs.map
148
+ //# sourceMappingURL=chunk-QEBQ5NUN.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/input-group.tsx"],"names":["jsx","cn","cva","Button","Input","Textarea"],"mappings":"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","file":"chunk-QEBQ5NUN.cjs","sourcesContent":["import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"./lib/utils\"\nimport { Button } from \"./button\"\nimport { Input } from \"./input\"\nimport { Textarea } from \"./textarea\"\n\nfunction InputGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"input-group\"\n role=\"group\"\n className={cn(\n \"group/input-group relative flex h-10 w-full min-w-0 items-center rounded-[10px] border border-foreground/10 bg-foreground/[0.04] transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:border-foreground/20 has-[[data-slot][aria-invalid=true]]:border-destructive has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:has-[[data-slot][aria-invalid=true]]:border-destructive/50 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3\",\n className\n )}\n {...props}\n />\n )\n}\n\nconst inputGroupAddonVariants = cva(\n \"flex h-auto cursor-text items-center justify-center gap-2 py-2 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 **:data-[slot=kbd]:rounded-none **:data-[slot=kbd]:bg-muted-foreground/10 **:data-[slot=kbd]:px-1.5 [&>svg:not([class*='size-'])]:size-3.5\",\n {\n variants: {\n align: {\n \"inline-start\": \"order-first\",\n \"inline-end\": \"order-last\",\n \"block-start\":\n \"order-first w-full justify-start pt-3 group-has-[>input]/input-group:pt-3.5 [.border-b]:pb-3.5\",\n \"block-end\":\n \"order-last w-full justify-start pb-3 group-has-[>input]/input-group:pb-3.5 [.border-t]:pt-3.5\",\n },\n },\n defaultVariants: {\n align: \"inline-start\",\n },\n }\n)\n\nfunction InputGroupAddon({\n className,\n align = \"inline-start\",\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps<typeof inputGroupAddonVariants>) {\n return (\n <div\n role=\"group\"\n data-slot=\"input-group-addon\"\n data-align={align}\n className={cn(inputGroupAddonVariants({ align }), className)}\n onClick={(e) => {\n if ((e.target as HTMLElement).closest(\"button\")) {\n return\n }\n e.currentTarget.parentElement?.querySelector(\"input\")?.focus()\n }}\n {...props}\n />\n )\n}\n\nconst inputGroupButtonVariants = cva(\n \"flex items-center gap-2 rounded-none text-sm shadow-none\",\n {\n variants: {\n size: {\n xs: \"h-6 gap-1 rounded-none px-1.5 text-xs [&>svg:not([class*='size-'])]:size-3.5\",\n sm: \"\",\n \"icon-xs\": \"size-6 p-0 text-xs has-[>svg]:p-0\",\n \"icon-sm\": \"size-8 p-0 has-[>svg]:p-0\",\n },\n },\n defaultVariants: {\n size: \"xs\",\n },\n }\n)\n\nfunction InputGroupButton({\n className,\n type = \"button\",\n variant = \"ghost\",\n size = \"xs\",\n ...props\n}: Omit<React.ComponentProps<typeof Button>, \"size\"> &\n VariantProps<typeof inputGroupButtonVariants>) {\n return (\n <Button\n type={type}\n data-size={size}\n variant={variant}\n className={cn(inputGroupButtonVariants({ size }), className)}\n {...props}\n />\n )\n}\n\nfunction InputGroupText({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n <span\n className={cn(\n \"flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-3.5\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction InputGroupInput({\n className,\n ...props\n}: React.ComponentProps<\"input\">) {\n return (\n <Input\n data-slot=\"input-group-control\"\n className={cn(\n \"flex-1 border-0 bg-transparent ring-0 group-has-[>[data-align=inline-end]]/input-group:pr-2 group-has-[>[data-align=inline-start]]/input-group:pl-2 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction InputGroupTextarea({\n className,\n ...props\n}: React.ComponentProps<\"textarea\">) {\n return (\n <Textarea\n data-slot=\"input-group-control\"\n className={cn(\n \"flex-1 resize-none border-0 bg-transparent py-2.5 ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupText,\n InputGroupInput,\n InputGroupTextarea,\n}\n"]}
@@ -0,0 +1,88 @@
1
+ 'use strict';
2
+
3
+ var chunk6YHDDRIM_cjs = require('./chunk-6YHDDRIM.cjs');
4
+ var radixUi = require('radix-ui');
5
+ var jsxRuntime = require('react/jsx-runtime');
6
+
7
+ function Popover({
8
+ ...props
9
+ }) {
10
+ return /* @__PURE__ */ jsxRuntime.jsx(radixUi.Popover.Root, { "data-slot": "popover", ...props });
11
+ }
12
+ function PopoverTrigger({
13
+ ...props
14
+ }) {
15
+ return /* @__PURE__ */ jsxRuntime.jsx(radixUi.Popover.Trigger, { "data-slot": "popover-trigger", ...props });
16
+ }
17
+ function PopoverContent({
18
+ className,
19
+ align = "center",
20
+ sideOffset = 4,
21
+ ...props
22
+ }) {
23
+ return /* @__PURE__ */ jsxRuntime.jsx(radixUi.Popover.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
24
+ radixUi.Popover.Content,
25
+ {
26
+ "data-slot": "popover-content",
27
+ align,
28
+ sideOffset,
29
+ className: chunk6YHDDRIM_cjs.cn(
30
+ // The surface of Work's menus, at panel padding.
31
+ "z-50 flex w-72 origin-(--radix-popover-content-transform-origin) flex-col gap-4 rounded-[12px] border border-foreground/10 bg-popover p-4 text-sm text-popover-foreground shadow-[0px_10px_24px_0px_rgba(0,0,0,0.12)] outline-hidden duration-100 dark:shadow-[0px_10px_24px_0px_rgba(0,0,0,0.5)] data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
32
+ className
33
+ ),
34
+ ...props
35
+ }
36
+ ) });
37
+ }
38
+ function PopoverAnchor({
39
+ ...props
40
+ }) {
41
+ return /* @__PURE__ */ jsxRuntime.jsx(radixUi.Popover.Anchor, { "data-slot": "popover-anchor", ...props });
42
+ }
43
+ function PopoverHeader({ className, ...props }) {
44
+ return /* @__PURE__ */ jsxRuntime.jsx(
45
+ "div",
46
+ {
47
+ "data-slot": "popover-header",
48
+ className: chunk6YHDDRIM_cjs.cn("flex flex-col gap-1 text-sm", className),
49
+ ...props
50
+ }
51
+ );
52
+ }
53
+ function PopoverTitle({ className, ...props }) {
54
+ return /* @__PURE__ */ jsxRuntime.jsx(
55
+ "div",
56
+ {
57
+ "data-slot": "popover-title",
58
+ className: chunk6YHDDRIM_cjs.cn("text-[13px] font-semibold text-foreground", className),
59
+ ...props
60
+ }
61
+ );
62
+ }
63
+ function PopoverDescription({
64
+ className,
65
+ ...props
66
+ }) {
67
+ return /* @__PURE__ */ jsxRuntime.jsx(
68
+ "p",
69
+ {
70
+ "data-slot": "popover-description",
71
+ className: chunk6YHDDRIM_cjs.cn(
72
+ "text-[12.5px] leading-relaxed text-muted-foreground",
73
+ className
74
+ ),
75
+ ...props
76
+ }
77
+ );
78
+ }
79
+
80
+ exports.Popover = Popover;
81
+ exports.PopoverAnchor = PopoverAnchor;
82
+ exports.PopoverContent = PopoverContent;
83
+ exports.PopoverDescription = PopoverDescription;
84
+ exports.PopoverHeader = PopoverHeader;
85
+ exports.PopoverTitle = PopoverTitle;
86
+ exports.PopoverTrigger = PopoverTrigger;
87
+ //# sourceMappingURL=chunk-UXSDDJXM.cjs.map
88
+ //# sourceMappingURL=chunk-UXSDDJXM.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/popover.tsx"],"names":["PopoverPrimitive","jsx","cn"],"mappings":";;;;;;AAKA,SAAS,OAAA,CAAQ;AAAA,EACf,GAAG;AACL,CAAA,EAAuD;AACrD,EAAA,sCAAQA,eAAA,CAAiB,IAAA,EAAjB,EAAsB,WAAA,EAAU,SAAA,EAAW,GAAG,KAAA,EAAO,CAAA;AAC/D;AAEA,SAAS,cAAA,CAAe;AAAA,EACtB,GAAG;AACL,CAAA,EAA0D;AACxD,EAAA,sCAAQA,eAAA,CAAiB,OAAA,EAAjB,EAAyB,WAAA,EAAU,iBAAA,EAAmB,GAAG,KAAA,EAAO,CAAA;AAC1E;AAEA,SAAS,cAAA,CAAe;AAAA,EACtB,SAAA;AAAA,EACA,KAAA,GAAQ,QAAA;AAAA,EACR,UAAA,GAAa,CAAA;AAAA,EACb,GAAG;AACL,CAAA,EAA0D;AACxD,EAAA,uBACEC,cAAA,CAACD,eAAA,CAAiB,MAAA,EAAjB,EACC,QAAA,kBAAAC,cAAA;AAAA,IAACD,eAAA,CAAiB,OAAA;AAAA,IAAjB;AAAA,MACC,WAAA,EAAU,iBAAA;AAAA,MACV,KAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA,EAAWE,oBAAA;AAAA;AAAA,QAET,okBAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG;AAAA;AAAA,GACN,EACF,CAAA;AAEJ;AAEA,SAAS,aAAA,CAAc;AAAA,EACrB,GAAG;AACL,CAAA,EAAyD;AACvD,EAAA,sCAAQF,eAAA,CAAiB,MAAA,EAAjB,EAAwB,WAAA,EAAU,gBAAA,EAAkB,GAAG,KAAA,EAAO,CAAA;AACxE;AAEA,SAAS,aAAA,CAAc,EAAE,SAAA,EAAW,GAAG,OAAM,EAAgC;AAC3E,EAAA,uBACEC,cAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,WAAA,EAAU,gBAAA;AAAA,MACV,SAAA,EAAWC,oBAAA,CAAG,6BAAA,EAA+B,SAAS,CAAA;AAAA,MACrD,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,SAAS,YAAA,CAAa,EAAE,SAAA,EAAW,GAAG,OAAM,EAA+B;AACzE,EAAA,uBACED,cAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,WAAA,EAAU,eAAA;AAAA,MACV,SAAA,EAAWC,oBAAA,CAAG,2CAAA,EAA6C,SAAS,CAAA;AAAA,MACnE,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,SAAS,kBAAA,CAAmB;AAAA,EAC1B,SAAA;AAAA,EACA,GAAG;AACL,CAAA,EAA8B;AAC5B,EAAA,uBACED,cAAA;AAAA,IAAC,GAAA;AAAA,IAAA;AAAA,MACC,WAAA,EAAU,qBAAA;AAAA,MACV,SAAA,EAAWC,oBAAA;AAAA,QACT,qDAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG;AAAA;AAAA,GACN;AAEJ","file":"chunk-UXSDDJXM.cjs","sourcesContent":["import * as React from \"react\"\nimport { Popover as PopoverPrimitive } from \"radix-ui\"\n\nimport { cn } from \"./lib/utils\"\n\nfunction Popover({\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Root>) {\n return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />\n}\n\nfunction PopoverTrigger({\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {\n return <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />\n}\n\nfunction PopoverContent({\n className,\n align = \"center\",\n sideOffset = 4,\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Content>) {\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n data-slot=\"popover-content\"\n align={align}\n sideOffset={sideOffset}\n className={cn(\n // The surface of Work's menus, at panel padding.\n \"z-50 flex w-72 origin-(--radix-popover-content-transform-origin) flex-col gap-4 rounded-[12px] border border-foreground/10 bg-popover p-4 text-sm text-popover-foreground shadow-[0px_10px_24px_0px_rgba(0,0,0,0.12)] outline-hidden duration-100 dark:shadow-[0px_10px_24px_0px_rgba(0,0,0,0.5)] data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95\",\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n )\n}\n\nfunction PopoverAnchor({\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {\n return <PopoverPrimitive.Anchor data-slot=\"popover-anchor\" {...props} />\n}\n\nfunction PopoverHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"popover-header\"\n className={cn(\"flex flex-col gap-1 text-sm\", className)}\n {...props}\n />\n )\n}\n\nfunction PopoverTitle({ className, ...props }: React.ComponentProps<\"h2\">) {\n return (\n <div\n data-slot=\"popover-title\"\n className={cn(\"text-[13px] font-semibold text-foreground\", className)}\n {...props}\n />\n )\n}\n\nfunction PopoverDescription({\n className,\n ...props\n}: React.ComponentProps<\"p\">) {\n return (\n <p\n data-slot=\"popover-description\"\n className={cn(\n \"text-[12.5px] leading-relaxed text-muted-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n Popover,\n PopoverAnchor,\n PopoverContent,\n PopoverDescription,\n PopoverHeader,\n PopoverTitle,\n PopoverTrigger,\n}\n"]}
@@ -14,7 +14,10 @@ var toggleVariants = cva(
14
14
  size: {
15
15
  default: "min-h-10 px-3 text-[13px] pointer-fine:min-h-8",
16
16
  sm: "min-h-9 px-3 text-[12px] pointer-fine:min-h-7",
17
- lg: "min-h-11 px-4 text-sm pointer-fine:min-h-9"
17
+ lg: "min-h-11 px-4 text-sm pointer-fine:min-h-9",
18
+ // Square, as the Button's icon sizes: 44px on touch.
19
+ icon: "size-9 min-h-11 min-w-11 px-0 pointer-fine:min-h-0 pointer-fine:min-w-0",
20
+ "icon-xs": "size-7 min-h-11 min-w-11 px-0 pointer-fine:min-h-0 pointer-fine:min-w-0"
18
21
  }
19
22
  },
20
23
  defaultVariants: {
@@ -59,5 +62,5 @@ function FilterPill({
59
62
  }
60
63
 
61
64
  export { FilterPill, Toggle, toggleVariants };
62
- //# sourceMappingURL=chunk-CPAFEXKR.js.map
63
- //# sourceMappingURL=chunk-CPAFEXKR.js.map
65
+ //# sourceMappingURL=chunk-WO2SXSNH.js.map
66
+ //# sourceMappingURL=chunk-WO2SXSNH.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/toggle.tsx"],"names":["TogglePrimitive"],"mappings":";;;;;AAWA,IAAM,cAAA,GAAiB,GAAA;AAAA,EACrB,oVAAA;AAAA,EACA;AAAA,IACE,QAAA,EAAU;AAAA,MACR,OAAA,EAAS;AAAA,QACP,OAAA,EACE,6NAAA;AAAA,QACF,OAAA,EACE;AAAA,OACJ;AAAA,MACA,IAAA,EAAM;AAAA,QACJ,OAAA,EAAS,gDAAA;AAAA,QACT,EAAA,EAAI,+CAAA;AAAA,QACJ,EAAA,EAAI,4CAAA;AAAA;AAAA,QAEJ,IAAA,EAAM,yEAAA;AAAA,QACN,SAAA,EACE;AAAA;AACJ,KACF;AAAA,IACA,eAAA,EAAiB;AAAA,MACf,OAAA,EAAS,SAAA;AAAA,MACT,IAAA,EAAM;AAAA;AACR;AAEJ;AAEA,SAAS,MAAA,CAAO;AAAA,EACd,SAAA;AAAA,EACA,OAAA,GAAU,SAAA;AAAA,EACV,IAAA,GAAO,SAAA;AAAA,EACP,GAAG;AACL,CAAA,EACuC;AACrC,EAAA,uBACE,GAAA;AAAA,IAACA,QAAA,CAAgB,IAAA;AAAA,IAAhB;AAAA,MACC,WAAA,EAAU,QAAA;AAAA,MACV,SAAA,EAAW,GAAG,cAAA,CAAe,EAAE,SAAS,IAAA,EAAM,SAAA,EAAW,CAAC,CAAA;AAAA,MACzD,GAAG;AAAA;AAAA,GACN;AAEJ;AAMA,SAAS,UAAA,CAAW;AAAA,EAClB,EAAA;AAAA,EACA,OAAA;AAAA,EACA,GAAA;AAAA,EACA,SAAA;AAAA,EACA,GAAG;AACL,CAAA,EAQG;AACD,EAAA,uBACE,GAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,OAAA,EAAQ,SAAA;AAAA,MACR,IAAA,EAAK,IAAA;AAAA,MACL,OAAA,EAAS,EAAA;AAAA,MACT,eAAA,EAAiB,MAAM,OAAA,EAAQ;AAAA,MAC/B,WAAW,EAAA,CAAG,GAAA,IAAO,CAAC,EAAA,IAAM,cAAc,SAAS,CAAA;AAAA,MAClD,GAAG;AAAA;AAAA,GACN;AAEJ","file":"chunk-WO2SXSNH.js","sourcesContent":["import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { Toggle as TogglePrimitive } from \"radix-ui\"\n\nimport { cn } from \"./lib/utils\"\n\n// The Work console's pressed-state toggles. `default` is the 9px chip its\n// forms use for a choice that is on or off (Once / Repeating, the days of the\n// week): a faint box, amber-tinted once pressed. `outline` is its filter\n// pill: round, bordered, a neutral fill once on. Muted text brightens on\n// hover. Touch keeps 40px or more, a mouse the compact height.\nconst toggleVariants = cva(\n \"group/toggle inline-flex shrink-0 items-center justify-center gap-1.5 border whitespace-nowrap transition-colors outline-none focus-visible:ring-2 focus-visible:ring-ring/40 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5\",\n {\n variants: {\n variant: {\n default:\n \"rounded-[9px] border-foreground/[0.08] bg-foreground/[0.04] font-medium text-muted-foreground hover:text-foreground data-[state=on]:border-amber-500/40 data-[state=on]:bg-amber-500/[0.12] data-[state=on]:text-foreground\",\n outline:\n \"rounded-full border-foreground/10 text-muted-foreground hover:text-foreground data-[state=on]:border-foreground/30 data-[state=on]:bg-foreground/[0.08] data-[state=on]:font-medium data-[state=on]:text-foreground\",\n },\n size: {\n default: \"min-h-10 px-3 text-[13px] pointer-fine:min-h-8\",\n sm: \"min-h-9 px-3 text-[12px] pointer-fine:min-h-7\",\n lg: \"min-h-11 px-4 text-sm pointer-fine:min-h-9\",\n // Square, as the Button's icon sizes: 44px on touch.\n icon: \"size-9 min-h-11 min-w-11 px-0 pointer-fine:min-h-0 pointer-fine:min-w-0\",\n \"icon-xs\":\n \"size-7 min-h-11 min-w-11 px-0 pointer-fine:min-h-0 pointer-fine:min-w-0\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nfunction Toggle({\n className,\n variant = \"default\",\n size = \"default\",\n ...props\n}: React.ComponentProps<typeof TogglePrimitive.Root> &\n VariantProps<typeof toggleVariants>) {\n return (\n <TogglePrimitive.Root\n data-slot=\"toggle\"\n className={cn(toggleVariants({ variant, size, className }))}\n {...props}\n />\n )\n}\n\n/**\n * The Work filter pill (a row of them filters a list: \"All channels\",\n * \"Slack 3\"…). An empty filter stays clickable, just quieter.\n */\nfunction FilterPill({\n on,\n onClick,\n dim,\n className,\n ...props\n}: Omit<\n React.ComponentProps<typeof TogglePrimitive.Root>,\n \"pressed\" | \"onPressedChange\" | \"onClick\"\n> & {\n on: boolean\n onClick: () => void\n /** Nothing behind it yet: still clickable, just quieter. */\n dim?: boolean\n}) {\n return (\n <Toggle\n variant=\"outline\"\n size=\"sm\"\n pressed={on}\n onPressedChange={() => onClick()}\n className={cn(dim && !on && \"opacity-55\", className)}\n {...props}\n />\n )\n}\n\nexport { Toggle, FilterPill, toggleVariants }\n"]}
@@ -13,14 +13,22 @@ var collapsibleHeaderVariants = classVarianceAuthority.cva(
13
13
  variant: {
14
14
  nav: "gap-2.25 rounded-[7px] px-2 py-1.75 text-[13px] font-normal text-foreground/80 hover:bg-foreground/6 hover:text-foreground pointer-coarse:min-h-11 pointer-coarse:gap-2.5 pointer-coarse:rounded-lg pointer-coarse:px-2.5 pointer-coarse:text-[14px]",
15
15
  section: "min-h-11 gap-2 rounded-[10px] px-3 text-[13px] font-medium text-foreground"
16
+ },
17
+ size: {
18
+ default: "",
19
+ sm: ""
16
20
  }
17
21
  },
18
- defaultVariants: { variant: "nav" }
22
+ compoundVariants: [
23
+ { variant: "section", size: "sm", className: "gap-1.5 px-2.5 pointer-fine:min-h-8" }
24
+ ],
25
+ defaultVariants: { variant: "nav", size: "default" }
19
26
  }
20
27
  );
21
28
  function CollapsibleHeader({
22
29
  icon: Icon,
23
30
  variant = "nav",
31
+ size = "default",
24
32
  className,
25
33
  children,
26
34
  ...props
@@ -30,7 +38,7 @@ function CollapsibleHeader({
30
38
  {
31
39
  "data-slot": "collapsible-header",
32
40
  "data-variant": variant,
33
- className: chunk6YHDDRIM_cjs.cn(collapsibleHeaderVariants({ variant }), className),
41
+ className: chunk6YHDDRIM_cjs.cn(collapsibleHeaderVariants({ variant, size }), className),
34
42
  ...props,
35
43
  children: [
36
44
  Icon && /* @__PURE__ */ jsxRuntime.jsx(
@@ -52,7 +60,10 @@ function CollapsibleHeader({
52
60
  lucideReact.ChevronDown,
53
61
  {
54
62
  "aria-hidden": true,
55
- className: "size-4 shrink-0 text-muted-foreground transition-transform group-aria-expanded/collapsible-header:rotate-180"
63
+ className: chunk6YHDDRIM_cjs.cn(
64
+ "shrink-0 text-muted-foreground transition-transform group-aria-expanded/collapsible-header:rotate-180",
65
+ size === "sm" ? "size-3.5" : "size-4"
66
+ )
56
67
  }
57
68
  )
58
69
  ]
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/collapsible-header.tsx"],"names":["cva","jsxs","CollapsiblePrimitive","cn","jsx","ChevronRight","ChevronDown"],"mappings":";;;;;;;;AAiBA,IAAM,yBAAA,GAA4BA,0BAAA;AAAA,EAChC,6LAAA;AAAA,EACA;AAAA,IACE,QAAA,EAAU;AAAA,MACR,OAAA,EAAS;AAAA,QACP,GAAA,EAAK,sPAAA;AAAA,QACL,OAAA,EACE;AAAA;AACJ,KACF;AAAA,IACA,eAAA,EAAiB,EAAE,OAAA,EAAS,KAAA;AAAM;AAEtC;AAEA,SAAS,iBAAA,CAAkB;AAAA,EACzB,IAAA,EAAM,IAAA;AAAA,EACN,OAAA,GAAU,KAAA;AAAA,EACV,SAAA;AAAA,EACA,QAAA;AAAA,EACA,GAAG;AACL,CAAA,EAGG;AACD,EAAA,uBACEC,eAAA;AAAA,IAACC,mBAAA,CAAqB,kBAAA;AAAA,IAArB;AAAA,MACC,WAAA,EAAU,oBAAA;AAAA,MACV,cAAA,EAAc,OAAA;AAAA,MACd,WAAWC,oBAAA,CAAG,yBAAA,CAA0B,EAAE,OAAA,EAAS,GAAG,SAAS,CAAA;AAAA,MAC9D,GAAG,KAAA;AAAA,MAEH,QAAA,EAAA;AAAA,QAAA,IAAA,oBACCC,cAAA;AAAA,UAAC,IAAA;AAAA,UAAA;AAAA,YACC,SAAA,EAAU,+DAAA;AAAA,YACV,WAAA,EAAa;AAAA;AAAA,SACf;AAAA,wBAEFA,cAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,0BAAA,EAA4B,QAAA,EAAS,CAAA;AAAA,QACpD,YAAY,KAAA,mBACXA,cAAA;AAAA,UAACC,wBAAA;AAAA,UAAA;AAAA,YACC,aAAA,EAAa,IAAA;AAAA,YACb,SAAA,EAAU,qIAAA;AAAA,YACV,WAAA,EAAa;AAAA;AAAA,SACf,mBAEAD,cAAA;AAAA,UAACE,uBAAA;AAAA,UAAA;AAAA,YACC,aAAA,EAAa,IAAA;AAAA,YACb,SAAA,EAAU;AAAA;AAAA;AACZ;AAAA;AAAA,GAEJ;AAEJ","file":"collapsible-header.cjs","sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { cva } from \"class-variance-authority\"\nimport { Collapsible as CollapsiblePrimitive } from \"radix-ui\"\nimport { ChevronDown, ChevronRight, type LucideIcon } from \"lucide-react\"\n\nimport { cn } from \"./lib/utils\"\n\n// The Work console's two collapsible headers, as a styled CollapsibleTrigger\n// (put it inside a `Collapsible`, above its `CollapsibleContent`):\n// nav — a group in a list of rows (\"Sessions\" under an expanded agent):\n// the row's own shape, a right chevron that turns down when open.\n// section — a disclosure on a settings page (\"What the agent knows about\n// them\"): a 44px 13px header with a down chevron that flips.\n// Sits in a bordered box (`rounded-[10px] border\n// border-foreground/[0.08]`) whose content has a top rule.\nconst collapsibleHeaderVariants = cva(\n \"group/collapsible-header flex w-full items-center text-left transition-colors outline-none focus-visible:ring-2 focus-visible:ring-ring/40 disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n variant: {\n nav: \"gap-2.25 rounded-[7px] px-2 py-1.75 text-[13px] font-normal text-foreground/80 hover:bg-foreground/6 hover:text-foreground pointer-coarse:min-h-11 pointer-coarse:gap-2.5 pointer-coarse:rounded-lg pointer-coarse:px-2.5 pointer-coarse:text-[14px]\",\n section:\n \"min-h-11 gap-2 rounded-[10px] px-3 text-[13px] font-medium text-foreground\",\n },\n },\n defaultVariants: { variant: \"nav\" },\n }\n)\n\nfunction CollapsibleHeader({\n icon: Icon,\n variant = \"nav\",\n className,\n children,\n ...props\n}: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger> & {\n icon?: LucideIcon\n variant?: \"nav\" | \"section\"\n}) {\n return (\n <CollapsiblePrimitive.CollapsibleTrigger\n data-slot=\"collapsible-header\"\n data-variant={variant}\n className={cn(collapsibleHeaderVariants({ variant }), className)}\n {...props}\n >\n {Icon && (\n <Icon\n className=\"size-4 shrink-0 text-muted-foreground pointer-coarse:size-4.5\"\n strokeWidth={1.75}\n />\n )}\n <span className=\"min-w-0 flex-1 text-left\">{children}</span>\n {variant === \"nav\" ? (\n <ChevronRight\n aria-hidden={true}\n className=\"size-3.5 shrink-0 text-muted-foreground transition-transform group-aria-expanded/collapsible-header:rotate-90 pointer-coarse:size-4\"\n strokeWidth={1.75}\n />\n ) : (\n <ChevronDown\n aria-hidden={true}\n className=\"size-4 shrink-0 text-muted-foreground transition-transform group-aria-expanded/collapsible-header:rotate-180\"\n />\n )}\n </CollapsiblePrimitive.CollapsibleTrigger>\n )\n}\n\nexport { CollapsibleHeader, collapsibleHeaderVariants }\n"]}
1
+ {"version":3,"sources":["../src/collapsible-header.tsx"],"names":["cva","jsxs","CollapsiblePrimitive","cn","jsx","ChevronRight","ChevronDown"],"mappings":";;;;;;;;AAmBA,IAAM,yBAAA,GAA4BA,0BAAA;AAAA,EAChC,6LAAA;AAAA,EACA;AAAA,IACE,QAAA,EAAU;AAAA,MACR,OAAA,EAAS;AAAA,QACP,GAAA,EAAK,sPAAA;AAAA,QACL,OAAA,EACE;AAAA,OACJ;AAAA,MACA,IAAA,EAAM;AAAA,QACJ,OAAA,EAAS,EAAA;AAAA,QACT,EAAA,EAAI;AAAA;AACN,KACF;AAAA,IACA,gBAAA,EAAkB;AAAA,MAChB,EAAE,OAAA,EAAS,SAAA,EAAW,IAAA,EAAM,IAAA,EAAM,WAAW,qCAAA;AAAsC,KACrF;AAAA,IACA,eAAA,EAAiB,EAAE,OAAA,EAAS,KAAA,EAAO,MAAM,SAAA;AAAU;AAEvD;AAEA,SAAS,iBAAA,CAAkB;AAAA,EACzB,IAAA,EAAM,IAAA;AAAA,EACN,OAAA,GAAU,KAAA;AAAA,EACV,IAAA,GAAO,SAAA;AAAA,EACP,SAAA;AAAA,EACA,QAAA;AAAA,EACA,GAAG;AACL,CAAA,EAKG;AACD,EAAA,uBACEC,eAAA;AAAA,IAACC,mBAAA,CAAqB,kBAAA;AAAA,IAArB;AAAA,MACC,WAAA,EAAU,oBAAA;AAAA,MACV,cAAA,EAAc,OAAA;AAAA,MACd,SAAA,EAAWC,qBAAG,yBAAA,CAA0B,EAAE,SAAS,IAAA,EAAM,GAAG,SAAS,CAAA;AAAA,MACpE,GAAG,KAAA;AAAA,MAEH,QAAA,EAAA;AAAA,QAAA,IAAA,oBACCC,cAAA;AAAA,UAAC,IAAA;AAAA,UAAA;AAAA,YACC,SAAA,EAAU,+DAAA;AAAA,YACV,WAAA,EAAa;AAAA;AAAA,SACf;AAAA,wBAEFA,cAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,0BAAA,EAA4B,QAAA,EAAS,CAAA;AAAA,QACpD,YAAY,KAAA,mBACXA,cAAA;AAAA,UAACC,wBAAA;AAAA,UAAA;AAAA,YACC,aAAA,EAAa,IAAA;AAAA,YACb,SAAA,EAAU,qIAAA;AAAA,YACV,WAAA,EAAa;AAAA;AAAA,SACf,mBAEAD,cAAA;AAAA,UAACE,uBAAA;AAAA,UAAA;AAAA,YACC,aAAA,EAAa,IAAA;AAAA,YACb,SAAA,EAAWH,oBAAA;AAAA,cACT,uGAAA;AAAA,cACA,IAAA,KAAS,OAAO,UAAA,GAAa;AAAA;AAC/B;AAAA;AACF;AAAA;AAAA,GAEJ;AAEJ","file":"collapsible-header.cjs","sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { cva } from \"class-variance-authority\"\nimport { Collapsible as CollapsiblePrimitive } from \"radix-ui\"\nimport { ChevronDown, ChevronRight, type LucideIcon } from \"lucide-react\"\n\nimport { cn } from \"./lib/utils\"\n\n// The Work console's two collapsible headers, as a styled CollapsibleTrigger\n// (put it inside a `Collapsible`, above its `CollapsibleContent`):\n// nav — a group in a list of rows (\"Sessions\" under an expanded agent):\n// the row's own shape, a right chevron that turns down when open.\n// section — a disclosure on a settings page (\"What the agent knows about\n// them\"): a 44px 13px header with a down chevron that flips.\n// Sits in a bordered box (`rounded-[10px] border\n// border-foreground/[0.08]`) whose content has a top rule. `sm`\n// is the compact one a card in a thread or a strip above the\n// composer takes: 32px with a mouse, still 44px on touch.\nconst collapsibleHeaderVariants = cva(\n \"group/collapsible-header flex w-full items-center text-left transition-colors outline-none focus-visible:ring-2 focus-visible:ring-ring/40 disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n variant: {\n nav: \"gap-2.25 rounded-[7px] px-2 py-1.75 text-[13px] font-normal text-foreground/80 hover:bg-foreground/6 hover:text-foreground pointer-coarse:min-h-11 pointer-coarse:gap-2.5 pointer-coarse:rounded-lg pointer-coarse:px-2.5 pointer-coarse:text-[14px]\",\n section:\n \"min-h-11 gap-2 rounded-[10px] px-3 text-[13px] font-medium text-foreground\",\n },\n size: {\n default: \"\",\n sm: \"\",\n },\n },\n compoundVariants: [\n { variant: \"section\", size: \"sm\", className: \"gap-1.5 px-2.5 pointer-fine:min-h-8\" },\n ],\n defaultVariants: { variant: \"nav\", size: \"default\" },\n }\n)\n\nfunction CollapsibleHeader({\n icon: Icon,\n variant = \"nav\",\n size = \"default\",\n className,\n children,\n ...props\n}: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger> & {\n icon?: LucideIcon\n variant?: \"nav\" | \"section\"\n /** `section` only: the compact header. */\n size?: \"default\" | \"sm\"\n}) {\n return (\n <CollapsiblePrimitive.CollapsibleTrigger\n data-slot=\"collapsible-header\"\n data-variant={variant}\n className={cn(collapsibleHeaderVariants({ variant, size }), className)}\n {...props}\n >\n {Icon && (\n <Icon\n className=\"size-4 shrink-0 text-muted-foreground pointer-coarse:size-4.5\"\n strokeWidth={1.75}\n />\n )}\n <span className=\"min-w-0 flex-1 text-left\">{children}</span>\n {variant === \"nav\" ? (\n <ChevronRight\n aria-hidden={true}\n className=\"size-3.5 shrink-0 text-muted-foreground transition-transform group-aria-expanded/collapsible-header:rotate-90 pointer-coarse:size-4\"\n strokeWidth={1.75}\n />\n ) : (\n <ChevronDown\n aria-hidden={true}\n className={cn(\n \"shrink-0 text-muted-foreground transition-transform group-aria-expanded/collapsible-header:rotate-180\",\n size === \"sm\" ? \"size-3.5\" : \"size-4\"\n )}\n />\n )}\n </CollapsiblePrimitive.CollapsibleTrigger>\n )\n}\n\nexport { CollapsibleHeader, collapsibleHeaderVariants }\n"]}
@@ -6,10 +6,13 @@ import { LucideIcon } from 'lucide-react';
6
6
 
7
7
  declare const collapsibleHeaderVariants: (props?: ({
8
8
  variant?: "nav" | "section" | null | undefined;
9
+ size?: "default" | "sm" | null | undefined;
9
10
  } & class_variance_authority_types.ClassProp) | undefined) => string;
10
- declare function CollapsibleHeader({ icon: Icon, variant, className, children, ...props }: React.ComponentProps<typeof Collapsible.CollapsibleTrigger> & {
11
+ declare function CollapsibleHeader({ icon: Icon, variant, size, className, children, ...props }: React.ComponentProps<typeof Collapsible.CollapsibleTrigger> & {
11
12
  icon?: LucideIcon;
12
13
  variant?: "nav" | "section";
14
+ /** `section` only: the compact header. */
15
+ size?: "default" | "sm";
13
16
  }): react_jsx_runtime.JSX.Element;
14
17
 
15
18
  export { CollapsibleHeader, collapsibleHeaderVariants };
@@ -6,10 +6,13 @@ import { LucideIcon } from 'lucide-react';
6
6
 
7
7
  declare const collapsibleHeaderVariants: (props?: ({
8
8
  variant?: "nav" | "section" | null | undefined;
9
+ size?: "default" | "sm" | null | undefined;
9
10
  } & class_variance_authority_types.ClassProp) | undefined) => string;
10
- declare function CollapsibleHeader({ icon: Icon, variant, className, children, ...props }: React.ComponentProps<typeof Collapsible.CollapsibleTrigger> & {
11
+ declare function CollapsibleHeader({ icon: Icon, variant, size, className, children, ...props }: React.ComponentProps<typeof Collapsible.CollapsibleTrigger> & {
11
12
  icon?: LucideIcon;
12
13
  variant?: "nav" | "section";
14
+ /** `section` only: the compact header. */
15
+ size?: "default" | "sm";
13
16
  }): react_jsx_runtime.JSX.Element;
14
17
 
15
18
  export { CollapsibleHeader, collapsibleHeaderVariants };
@@ -11,14 +11,22 @@ var collapsibleHeaderVariants = cva(
11
11
  variant: {
12
12
  nav: "gap-2.25 rounded-[7px] px-2 py-1.75 text-[13px] font-normal text-foreground/80 hover:bg-foreground/6 hover:text-foreground pointer-coarse:min-h-11 pointer-coarse:gap-2.5 pointer-coarse:rounded-lg pointer-coarse:px-2.5 pointer-coarse:text-[14px]",
13
13
  section: "min-h-11 gap-2 rounded-[10px] px-3 text-[13px] font-medium text-foreground"
14
+ },
15
+ size: {
16
+ default: "",
17
+ sm: ""
14
18
  }
15
19
  },
16
- defaultVariants: { variant: "nav" }
20
+ compoundVariants: [
21
+ { variant: "section", size: "sm", className: "gap-1.5 px-2.5 pointer-fine:min-h-8" }
22
+ ],
23
+ defaultVariants: { variant: "nav", size: "default" }
17
24
  }
18
25
  );
19
26
  function CollapsibleHeader({
20
27
  icon: Icon,
21
28
  variant = "nav",
29
+ size = "default",
22
30
  className,
23
31
  children,
24
32
  ...props
@@ -28,7 +36,7 @@ function CollapsibleHeader({
28
36
  {
29
37
  "data-slot": "collapsible-header",
30
38
  "data-variant": variant,
31
- className: cn(collapsibleHeaderVariants({ variant }), className),
39
+ className: cn(collapsibleHeaderVariants({ variant, size }), className),
32
40
  ...props,
33
41
  children: [
34
42
  Icon && /* @__PURE__ */ jsx(
@@ -50,7 +58,10 @@ function CollapsibleHeader({
50
58
  ChevronDown,
51
59
  {
52
60
  "aria-hidden": true,
53
- className: "size-4 shrink-0 text-muted-foreground transition-transform group-aria-expanded/collapsible-header:rotate-180"
61
+ className: cn(
62
+ "shrink-0 text-muted-foreground transition-transform group-aria-expanded/collapsible-header:rotate-180",
63
+ size === "sm" ? "size-3.5" : "size-4"
64
+ )
54
65
  }
55
66
  )
56
67
  ]
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/collapsible-header.tsx"],"names":["CollapsiblePrimitive"],"mappings":";;;;;;AAiBA,IAAM,yBAAA,GAA4B,GAAA;AAAA,EAChC,6LAAA;AAAA,EACA;AAAA,IACE,QAAA,EAAU;AAAA,MACR,OAAA,EAAS;AAAA,QACP,GAAA,EAAK,sPAAA;AAAA,QACL,OAAA,EACE;AAAA;AACJ,KACF;AAAA,IACA,eAAA,EAAiB,EAAE,OAAA,EAAS,KAAA;AAAM;AAEtC;AAEA,SAAS,iBAAA,CAAkB;AAAA,EACzB,IAAA,EAAM,IAAA;AAAA,EACN,OAAA,GAAU,KAAA;AAAA,EACV,SAAA;AAAA,EACA,QAAA;AAAA,EACA,GAAG;AACL,CAAA,EAGG;AACD,EAAA,uBACE,IAAA;AAAA,IAACA,WAAA,CAAqB,kBAAA;AAAA,IAArB;AAAA,MACC,WAAA,EAAU,oBAAA;AAAA,MACV,cAAA,EAAc,OAAA;AAAA,MACd,WAAW,EAAA,CAAG,yBAAA,CAA0B,EAAE,OAAA,EAAS,GAAG,SAAS,CAAA;AAAA,MAC9D,GAAG,KAAA;AAAA,MAEH,QAAA,EAAA;AAAA,QAAA,IAAA,oBACC,GAAA;AAAA,UAAC,IAAA;AAAA,UAAA;AAAA,YACC,SAAA,EAAU,+DAAA;AAAA,YACV,WAAA,EAAa;AAAA;AAAA,SACf;AAAA,wBAEF,GAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,0BAAA,EAA4B,QAAA,EAAS,CAAA;AAAA,QACpD,YAAY,KAAA,mBACX,GAAA;AAAA,UAAC,YAAA;AAAA,UAAA;AAAA,YACC,aAAA,EAAa,IAAA;AAAA,YACb,SAAA,EAAU,qIAAA;AAAA,YACV,WAAA,EAAa;AAAA;AAAA,SACf,mBAEA,GAAA;AAAA,UAAC,WAAA;AAAA,UAAA;AAAA,YACC,aAAA,EAAa,IAAA;AAAA,YACb,SAAA,EAAU;AAAA;AAAA;AACZ;AAAA;AAAA,GAEJ;AAEJ","file":"collapsible-header.js","sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { cva } from \"class-variance-authority\"\nimport { Collapsible as CollapsiblePrimitive } from \"radix-ui\"\nimport { ChevronDown, ChevronRight, type LucideIcon } from \"lucide-react\"\n\nimport { cn } from \"./lib/utils\"\n\n// The Work console's two collapsible headers, as a styled CollapsibleTrigger\n// (put it inside a `Collapsible`, above its `CollapsibleContent`):\n// nav — a group in a list of rows (\"Sessions\" under an expanded agent):\n// the row's own shape, a right chevron that turns down when open.\n// section — a disclosure on a settings page (\"What the agent knows about\n// them\"): a 44px 13px header with a down chevron that flips.\n// Sits in a bordered box (`rounded-[10px] border\n// border-foreground/[0.08]`) whose content has a top rule.\nconst collapsibleHeaderVariants = cva(\n \"group/collapsible-header flex w-full items-center text-left transition-colors outline-none focus-visible:ring-2 focus-visible:ring-ring/40 disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n variant: {\n nav: \"gap-2.25 rounded-[7px] px-2 py-1.75 text-[13px] font-normal text-foreground/80 hover:bg-foreground/6 hover:text-foreground pointer-coarse:min-h-11 pointer-coarse:gap-2.5 pointer-coarse:rounded-lg pointer-coarse:px-2.5 pointer-coarse:text-[14px]\",\n section:\n \"min-h-11 gap-2 rounded-[10px] px-3 text-[13px] font-medium text-foreground\",\n },\n },\n defaultVariants: { variant: \"nav\" },\n }\n)\n\nfunction CollapsibleHeader({\n icon: Icon,\n variant = \"nav\",\n className,\n children,\n ...props\n}: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger> & {\n icon?: LucideIcon\n variant?: \"nav\" | \"section\"\n}) {\n return (\n <CollapsiblePrimitive.CollapsibleTrigger\n data-slot=\"collapsible-header\"\n data-variant={variant}\n className={cn(collapsibleHeaderVariants({ variant }), className)}\n {...props}\n >\n {Icon && (\n <Icon\n className=\"size-4 shrink-0 text-muted-foreground pointer-coarse:size-4.5\"\n strokeWidth={1.75}\n />\n )}\n <span className=\"min-w-0 flex-1 text-left\">{children}</span>\n {variant === \"nav\" ? (\n <ChevronRight\n aria-hidden={true}\n className=\"size-3.5 shrink-0 text-muted-foreground transition-transform group-aria-expanded/collapsible-header:rotate-90 pointer-coarse:size-4\"\n strokeWidth={1.75}\n />\n ) : (\n <ChevronDown\n aria-hidden={true}\n className=\"size-4 shrink-0 text-muted-foreground transition-transform group-aria-expanded/collapsible-header:rotate-180\"\n />\n )}\n </CollapsiblePrimitive.CollapsibleTrigger>\n )\n}\n\nexport { CollapsibleHeader, collapsibleHeaderVariants }\n"]}
1
+ {"version":3,"sources":["../src/collapsible-header.tsx"],"names":["CollapsiblePrimitive"],"mappings":";;;;;;AAmBA,IAAM,yBAAA,GAA4B,GAAA;AAAA,EAChC,6LAAA;AAAA,EACA;AAAA,IACE,QAAA,EAAU;AAAA,MACR,OAAA,EAAS;AAAA,QACP,GAAA,EAAK,sPAAA;AAAA,QACL,OAAA,EACE;AAAA,OACJ;AAAA,MACA,IAAA,EAAM;AAAA,QACJ,OAAA,EAAS,EAAA;AAAA,QACT,EAAA,EAAI;AAAA;AACN,KACF;AAAA,IACA,gBAAA,EAAkB;AAAA,MAChB,EAAE,OAAA,EAAS,SAAA,EAAW,IAAA,EAAM,IAAA,EAAM,WAAW,qCAAA;AAAsC,KACrF;AAAA,IACA,eAAA,EAAiB,EAAE,OAAA,EAAS,KAAA,EAAO,MAAM,SAAA;AAAU;AAEvD;AAEA,SAAS,iBAAA,CAAkB;AAAA,EACzB,IAAA,EAAM,IAAA;AAAA,EACN,OAAA,GAAU,KAAA;AAAA,EACV,IAAA,GAAO,SAAA;AAAA,EACP,SAAA;AAAA,EACA,QAAA;AAAA,EACA,GAAG;AACL,CAAA,EAKG;AACD,EAAA,uBACE,IAAA;AAAA,IAACA,WAAA,CAAqB,kBAAA;AAAA,IAArB;AAAA,MACC,WAAA,EAAU,oBAAA;AAAA,MACV,cAAA,EAAc,OAAA;AAAA,MACd,SAAA,EAAW,GAAG,yBAAA,CAA0B,EAAE,SAAS,IAAA,EAAM,GAAG,SAAS,CAAA;AAAA,MACpE,GAAG,KAAA;AAAA,MAEH,QAAA,EAAA;AAAA,QAAA,IAAA,oBACC,GAAA;AAAA,UAAC,IAAA;AAAA,UAAA;AAAA,YACC,SAAA,EAAU,+DAAA;AAAA,YACV,WAAA,EAAa;AAAA;AAAA,SACf;AAAA,wBAEF,GAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,0BAAA,EAA4B,QAAA,EAAS,CAAA;AAAA,QACpD,YAAY,KAAA,mBACX,GAAA;AAAA,UAAC,YAAA;AAAA,UAAA;AAAA,YACC,aAAA,EAAa,IAAA;AAAA,YACb,SAAA,EAAU,qIAAA;AAAA,YACV,WAAA,EAAa;AAAA;AAAA,SACf,mBAEA,GAAA;AAAA,UAAC,WAAA;AAAA,UAAA;AAAA,YACC,aAAA,EAAa,IAAA;AAAA,YACb,SAAA,EAAW,EAAA;AAAA,cACT,uGAAA;AAAA,cACA,IAAA,KAAS,OAAO,UAAA,GAAa;AAAA;AAC/B;AAAA;AACF;AAAA;AAAA,GAEJ;AAEJ","file":"collapsible-header.js","sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { cva } from \"class-variance-authority\"\nimport { Collapsible as CollapsiblePrimitive } from \"radix-ui\"\nimport { ChevronDown, ChevronRight, type LucideIcon } from \"lucide-react\"\n\nimport { cn } from \"./lib/utils\"\n\n// The Work console's two collapsible headers, as a styled CollapsibleTrigger\n// (put it inside a `Collapsible`, above its `CollapsibleContent`):\n// nav — a group in a list of rows (\"Sessions\" under an expanded agent):\n// the row's own shape, a right chevron that turns down when open.\n// section — a disclosure on a settings page (\"What the agent knows about\n// them\"): a 44px 13px header with a down chevron that flips.\n// Sits in a bordered box (`rounded-[10px] border\n// border-foreground/[0.08]`) whose content has a top rule. `sm`\n// is the compact one a card in a thread or a strip above the\n// composer takes: 32px with a mouse, still 44px on touch.\nconst collapsibleHeaderVariants = cva(\n \"group/collapsible-header flex w-full items-center text-left transition-colors outline-none focus-visible:ring-2 focus-visible:ring-ring/40 disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n variant: {\n nav: \"gap-2.25 rounded-[7px] px-2 py-1.75 text-[13px] font-normal text-foreground/80 hover:bg-foreground/6 hover:text-foreground pointer-coarse:min-h-11 pointer-coarse:gap-2.5 pointer-coarse:rounded-lg pointer-coarse:px-2.5 pointer-coarse:text-[14px]\",\n section:\n \"min-h-11 gap-2 rounded-[10px] px-3 text-[13px] font-medium text-foreground\",\n },\n size: {\n default: \"\",\n sm: \"\",\n },\n },\n compoundVariants: [\n { variant: \"section\", size: \"sm\", className: \"gap-1.5 px-2.5 pointer-fine:min-h-8\" },\n ],\n defaultVariants: { variant: \"nav\", size: \"default\" },\n }\n)\n\nfunction CollapsibleHeader({\n icon: Icon,\n variant = \"nav\",\n size = \"default\",\n className,\n children,\n ...props\n}: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger> & {\n icon?: LucideIcon\n variant?: \"nav\" | \"section\"\n /** `section` only: the compact header. */\n size?: \"default\" | \"sm\"\n}) {\n return (\n <CollapsiblePrimitive.CollapsibleTrigger\n data-slot=\"collapsible-header\"\n data-variant={variant}\n className={cn(collapsibleHeaderVariants({ variant, size }), className)}\n {...props}\n >\n {Icon && (\n <Icon\n className=\"size-4 shrink-0 text-muted-foreground pointer-coarse:size-4.5\"\n strokeWidth={1.75}\n />\n )}\n <span className=\"min-w-0 flex-1 text-left\">{children}</span>\n {variant === \"nav\" ? (\n <ChevronRight\n aria-hidden={true}\n className=\"size-3.5 shrink-0 text-muted-foreground transition-transform group-aria-expanded/collapsible-header:rotate-90 pointer-coarse:size-4\"\n strokeWidth={1.75}\n />\n ) : (\n <ChevronDown\n aria-hidden={true}\n className={cn(\n \"shrink-0 text-muted-foreground transition-transform group-aria-expanded/collapsible-header:rotate-180\",\n size === \"sm\" ? \"size-3.5\" : \"size-4\"\n )}\n />\n )}\n </CollapsiblePrimitive.CollapsibleTrigger>\n )\n}\n\nexport { CollapsibleHeader, collapsibleHeaderVariants }\n"]}