@mks2508/mks-ui 0.6.3 → 0.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/react-ui/index.js +2 -2
- package/dist/react-ui/ui/Dialog/index.d.ts +9 -29
- package/dist/react-ui/ui/Dialog/index.d.ts.map +1 -1
- package/dist/react-ui/ui/Dialog/index.js +34 -57
- package/dist/react-ui/ui/DynamicToggle/{DynamicToggle-DJLwEkHr.css → DynamicToggle.module-D2yWn1ia.css} +1 -1
- package/dist/react-ui/ui/DynamicToggle/index.d.ts +1 -1
- package/dist/react-ui/ui/DynamicToggle/index.d.ts.map +1 -1
- package/dist/react-ui/ui/DynamicToggle/index.js +1 -1
- package/dist/react-ui/ui/index.js +1 -1
- package/package.json +4 -3
- package/dist/react-ui/ui/DynamicToggle/DynamicToggle.css +0 -368
- /package/dist/react-ui/ui/DynamicToggle/{DynamicToggle.js → DynamicToggle.module.js} +0 -0
package/dist/react-ui/index.js
CHANGED
|
@@ -37,7 +37,7 @@ import { AlertDialog, AlertDialogBackdrop, AlertDialogClose, AlertDialogDescript
|
|
|
37
37
|
import { checkboxStyles } from "./ui/Checkbox/Checkbox.styles.js";
|
|
38
38
|
import { Checkbox, CheckboxIndicator, useCheckbox } from "./ui/Checkbox/index.js";
|
|
39
39
|
import { dialogStyles } from "./ui/Dialog/Dialog.styles.js";
|
|
40
|
-
import { Dialog, DialogBackdrop, DialogClose, DialogDescription, DialogFooter, DialogHeader, DialogPopup, DialogPortal, DialogTitle, DialogTrigger,
|
|
40
|
+
import { Dialog, DialogBackdrop, DialogClose, DialogDescription, DialogFooter, DialogHeader, DialogPopup, DialogPortal, DialogTitle, DialogTrigger, useDialog } from "./ui/Dialog/index.js";
|
|
41
41
|
import { useDataState } from "./hooks/State/UseDataState.js";
|
|
42
42
|
import { Menu, MenuArrow, MenuCheckboxItem, MenuCheckboxItemIndicator, MenuGroup, MenuGroupLabel, MenuHighlight, MenuHighlightItem, MenuItem, MenuPopup, MenuPortal, MenuPositioner, MenuRadioGroup, MenuRadioItem, MenuRadioItemIndicator, MenuSeparator, MenuShortcut, MenuSubmenu, MenuSubmenuTrigger, MenuTrigger, useMenu, useMenuActiveValue } from "./ui/Menu/index.js";
|
|
43
43
|
import { popoverStyles } from "./ui/Popover/Popover.styles.js";
|
|
@@ -115,4 +115,4 @@ import { HugeIcons } from "./icons/index.js";
|
|
|
115
115
|
import { IconWrapper } from "./lib/icon-wrapper.js";
|
|
116
116
|
import "./lib/index.js";
|
|
117
117
|
|
|
118
|
-
export { ANIMATION_CONFIGS, ANIMATION_DEFAULTS, Accordion, AccordionHeader, AccordionItem, AccordionPanel, AccordionStyles, AccordionTrigger, ActivityIcon, AlertDialog, AlertDialogBackdrop, AlertDialogClose, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogPopup, AlertDialogPortal, AlertDialogStyles, AlertDialogTitle, AlertDialogTrigger, ArrowDownToLineIcon, ArrowUpIcon, AutoHeight, Badge, BellElectricIcon, BellIcon, BotIcon, BoxIcon, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Check, Checkbox, CheckboxIndicator, CircleCheckIcon, Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, CornerBracket, CountingNumber, DataCard, DataCardActions, DataCardBracket, DataCardLabel, DataCardToggle, DataCardValue, DeleteIcon, Dialog, DialogBackdrop, DialogClose, DialogDescription, DialogFooter, DialogHeader, DialogPopup, DialogPortal, DialogTitle, DialogTrigger,
|
|
118
|
+
export { ANIMATION_CONFIGS, ANIMATION_DEFAULTS, Accordion, AccordionHeader, AccordionItem, AccordionPanel, AccordionStyles, AccordionTrigger, ActivityIcon, AlertDialog, AlertDialogBackdrop, AlertDialogClose, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogPopup, AlertDialogPortal, AlertDialogStyles, AlertDialogTitle, AlertDialogTrigger, ArrowDownToLineIcon, ArrowUpIcon, AutoHeight, Badge, BellElectricIcon, BellIcon, BotIcon, BoxIcon, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Check, Checkbox, CheckboxIndicator, CircleCheckIcon, Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, CornerBracket, CountingNumber, DataCard, DataCardActions, DataCardBracket, DataCardLabel, DataCardToggle, DataCardValue, DeleteIcon, Dialog, DialogBackdrop, DialogClose, DialogDescription, DialogFooter, DialogHeader, DialogPopup, DialogPortal, DialogTitle, DialogTrigger, DownloadIcon, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, DynamicToggle, DynamicToggleGroup, DynamicToggleOption, EASINGS, EFFECTS, Edit2, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, GOOEY_DEFAULTS, Globe, GooeyCanvas, GooeyFilter, Highlight, HighlightItem, HomeIcon, HugeIcons, IconWrapper, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, Label, Layers, LayoutPanelTopIcon, ListIcon, Menu, MenuArrow, MenuCheckboxItem, MenuCheckboxItemIndicator, MenuGroup, MenuGroupLabel, MenuHighlight, MenuHighlightItem, MenuItem, MenuPopup, MenuPortal, MenuPositioner, MenuRadioGroup, MenuRadioItem, MenuRadioItemIndicator, MenuSeparator, MenuShortcut, MenuSubmenu, MenuSubmenuTrigger, MenuTrigger, Morph, MorphPath, MorphingPopover, MorphingPopoverWithTarget, PRESETS, Package, Palette, PlusIcon, Popover, PopoverArrow, PopoverBackdrop, PopoverClose, PopoverDescription, PopoverPopup, PopoverPortal, PopoverPositioner, PopoverTitle, PopoverTrigger, Progress, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue, RESPONSIVE_CONFIGS, RefreshCw, ReorderRoot as Reorder, Rocket, Save, SearchIcon, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, SettingsIcon, SlidingNumber, SlidingText, Slot, Switch, SwitchIcon, SwitchThumb, TIMING, TRANSFORMS, Tabs, TabsHighlight, TabsHighlightItem, TabsList, TabsPanel, TabsPanels, TabsTab, TerminalIcon, TextFlow, Textarea, Tooltip, TooltipArrow, TooltipPopup, TooltipPortal, TooltipPositioner, TooltipProvider, TooltipTrigger, Trash2, TrendingDownIcon, TrendingUpIcon, Type, Upload, XIcon, accordionVariants, badgeVariants, bracketVariants, buildColorMatrixValues, buildFilterString, buttonStateStyles, buttonVariants, calculateSeparatorCoordination, cardVariants, checkboxStyles, cn, computeBlur, dataCardStyles, dataCardVariants, dialogStyles, dynamicToggleStyles, dynamicToggleVariants, fieldVariants, getResponsiveDuration, getResponsiveStagger, getStrictContext, inputGroupAddonVariants, inputGroupButtonVariants, morphPathDown, morphPathUp, popoverStyles, progressStyles, shouldShowSeparator, switchStyles, tabsIndicatorVariants, tabsListVariants, tabsTabVariants, tooltipStyles, useAccordionItem, useAlertDialog, useAnimationOrchestrator, useAutoHeight, useCSSGridMorph, useCheckbox, useComboboxAnchor, useControlledState, useDataCard, useDataState, useDialog, useDynamicToggle, useElementRegistry, useFLIPAnimation, useFLIPClipPath, useHighlight, useIsInView, useListFormat, useMenu, useMenuActiveValue, useMorph, useMorphContext, useMorphPath, usePopover, usePositionCapture, useProgress, useReorder, useReorderPresence, useSwitch, useTooltip, useViewTransitions };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DialogContextType, IDialogProps, IDialogTriggerProps, IDialogPortalProps,
|
|
1
|
+
import type { DialogContextType, IDialogProps, IDialogTriggerProps, IDialogPortalProps, IDialogBackdropProps, IDialogPopupProps, IDialogCloseProps, IDialogHeaderProps, IDialogFooterProps, IDialogTitleProps, IDialogDescriptionProps } from './Dialog.types';
|
|
2
2
|
declare const useDialog: () => DialogContextType;
|
|
3
3
|
/**
|
|
4
4
|
* Root Dialog component.
|
|
@@ -54,29 +54,11 @@ declare function DialogPortal({ slots: _slots, ...props }: IDialogPortalProps):
|
|
|
54
54
|
* ```
|
|
55
55
|
*/
|
|
56
56
|
declare function DialogBackdrop({ slots, className, transition, ...props }: IDialogBackdropProps): import("react/jsx-runtime").JSX.Element;
|
|
57
|
-
/**
|
|
58
|
-
* Required viewport wrapper around DialogPopup.
|
|
59
|
-
* Base UI v1.x requires Dialog.Viewport as a direct child of Dialog.Portal
|
|
60
|
-
* and parent of Dialog.Popup.
|
|
61
|
-
*
|
|
62
|
-
* @param props - Viewport props forwarded to Base UI Dialog.Viewport
|
|
63
|
-
*
|
|
64
|
-
* @example
|
|
65
|
-
* ```tsx
|
|
66
|
-
* <DialogPortal>
|
|
67
|
-
* <DialogBackdrop />
|
|
68
|
-
* <DialogViewport>
|
|
69
|
-
* <DialogPopup>...</DialogPopup>
|
|
70
|
-
* </DialogViewport>
|
|
71
|
-
* </DialogPortal>
|
|
72
|
-
* ```
|
|
73
|
-
*/
|
|
74
|
-
declare function DialogViewport({ slots, className, ...props }: IDialogViewportProps): import("react/jsx-runtime").JSX.Element;
|
|
75
57
|
/**
|
|
76
58
|
* Main dialog content container with a perspective-flip entrance animation.
|
|
77
59
|
* The `from` prop controls the axis and direction of the 3D rotation.
|
|
78
|
-
*
|
|
79
|
-
*
|
|
60
|
+
*
|
|
61
|
+
* Internally wraps content in `Dialog.Viewport` as required by Base UI v1.x.
|
|
80
62
|
*
|
|
81
63
|
* @param props - Popup props including `from` direction and motion transition overrides
|
|
82
64
|
*
|
|
@@ -84,12 +66,10 @@ declare function DialogViewport({ slots, className, ...props }: IDialogViewportP
|
|
|
84
66
|
* ```tsx
|
|
85
67
|
* <DialogPortal>
|
|
86
68
|
* <DialogBackdrop />
|
|
87
|
-
* <
|
|
88
|
-
* <
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
* </DialogPopup>
|
|
92
|
-
* </DialogViewport>
|
|
69
|
+
* <DialogPopup from="bottom" className="max-w-md">
|
|
70
|
+
* <DialogTitle>Confirm</DialogTitle>
|
|
71
|
+
* <p>Are you sure?</p>
|
|
72
|
+
* </DialogPopup>
|
|
93
73
|
* </DialogPortal>
|
|
94
74
|
* ```
|
|
95
75
|
*/
|
|
@@ -157,7 +137,7 @@ declare function DialogTitle({ slots, className, ...props }: IDialogTitleProps):
|
|
|
157
137
|
* ```
|
|
158
138
|
*/
|
|
159
139
|
declare function DialogDescription({ slots, className, ...props }: IDialogDescriptionProps): import("react/jsx-runtime").JSX.Element;
|
|
160
|
-
export { Dialog, DialogPortal,
|
|
161
|
-
export type { IDialogProps, IDialogTriggerProps, IDialogPortalProps,
|
|
140
|
+
export { Dialog, DialogPortal, DialogBackdrop, DialogClose, DialogTrigger, DialogPopup, DialogHeader, DialogFooter, DialogTitle, DialogDescription, useDialog, };
|
|
141
|
+
export type { IDialogProps, IDialogTriggerProps, IDialogPortalProps, IDialogCloseProps, IDialogBackdropProps, IDialogPopupProps, IDialogHeaderProps, IDialogFooterProps, IDialogTitleProps, IDialogDescriptionProps, DialogContextType, DialogFlipDirection, DialogSlot, IDialogConfig, } from './Dialog.types';
|
|
162
142
|
export { dialogStyles } from './Dialog.styles';
|
|
163
143
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/react-ui/ui/Dialog/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/react-ui/ui/Dialog/index.tsx"],"names":[],"mappings":"AA4DA,OAAO,KAAK,EACV,iBAAiB,EAEjB,YAAY,EACZ,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,uBAAuB,EACxB,MAAM,gBAAgB,CAAC;AAMxB,QAAA,MAAuB,SAAS,yBACsB,CAAC;AAMvD;;;;;;;;;;;;GAYG;AACH,iBAAS,MAAM,CAAC,KAAK,EAAE,YAAY,2CAkBlC;AAMD;;;;;;;;;;;GAWG;AACH,iBAAS,aAAa,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,mBAAmB,2CAQzE;AAMD;;;;;;;;;;;;;GAaG;AACH,iBAAS,YAAY,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,2CAcpE;AAMD;;;;;;;;;;GAUG;AACH,iBAAS,cAAc,CAAC,EACtB,KAAK,EACL,SAAS,EACT,UAAiD,EACjD,GAAG,KAAK,EACT,EAAE,oBAAoB,2CAiBtB;AAOD;;;;;;;;;;;;;;;;;;GAkBG;AACH,iBAAS,WAAW,CAAC,EACnB,IAAY,EACZ,YAAY,EACZ,UAAU,EACV,KAAK,EACL,SAAS,EACT,UAA4D,EAC5D,GAAG,KAAK,EACT,EAAE,iBAAiB,2CAsCnB;AAMD;;;;;;;;;;;GAWG;AACH,iBAAS,WAAW,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,2CAQrE;AAMD;;;;;;;;;;;;GAYG;AACH,iBAAS,YAAY,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,2CAQvE;AAMD;;;;;;;;;;;;GAYG;AACH,iBAAS,YAAY,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,2CAQvE;AAMD;;;;;;;;;GASG;AACH,iBAAS,WAAW,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,2CAQrE;AAMD;;;;;;;;;GASG;AACH,iBAAS,iBAAiB,CAAC,EACzB,KAAK,EACL,SAAS,EACT,GAAG,KAAK,EACT,EAAE,uBAAuB,2CAQzB;AAMD,OAAO,EACL,MAAM,EACN,YAAY,EACZ,cAAc,EACd,WAAW,EACX,aAAa,EACb,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,SAAS,GACV,CAAC;AAGF,YAAY,EACV,YAAY,EACZ,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,uBAAuB,EACvB,iBAAiB,EACjB,mBAAmB,EACnB,UAAU,EACV,aAAa,GACd,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -121,34 +121,10 @@ function DialogBackdrop({ slots, className, transition = {
|
|
|
121
121
|
});
|
|
122
122
|
}
|
|
123
123
|
/**
|
|
124
|
-
* Required viewport wrapper around DialogPopup.
|
|
125
|
-
* Base UI v1.x requires Dialog.Viewport as a direct child of Dialog.Portal
|
|
126
|
-
* and parent of Dialog.Popup.
|
|
127
|
-
*
|
|
128
|
-
* @param props - Viewport props forwarded to Base UI Dialog.Viewport
|
|
129
|
-
*
|
|
130
|
-
* @example
|
|
131
|
-
* ```tsx
|
|
132
|
-
* <DialogPortal>
|
|
133
|
-
* <DialogBackdrop />
|
|
134
|
-
* <DialogViewport>
|
|
135
|
-
* <DialogPopup>...</DialogPopup>
|
|
136
|
-
* </DialogViewport>
|
|
137
|
-
* </DialogPortal>
|
|
138
|
-
* ```
|
|
139
|
-
*/
|
|
140
|
-
function DialogViewport({ slots, className, ...props }) {
|
|
141
|
-
return /* @__PURE__ */ jsx(Dialog.Viewport, {
|
|
142
|
-
"data-slot": "dialog-viewport",
|
|
143
|
-
className: cn(dialogStyles.viewport, slots?.viewport, className),
|
|
144
|
-
...props
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
|
-
/**
|
|
148
124
|
* Main dialog content container with a perspective-flip entrance animation.
|
|
149
125
|
* The `from` prop controls the axis and direction of the 3D rotation.
|
|
150
|
-
*
|
|
151
|
-
*
|
|
126
|
+
*
|
|
127
|
+
* Internally wraps content in `Dialog.Viewport` as required by Base UI v1.x.
|
|
152
128
|
*
|
|
153
129
|
* @param props - Popup props including `from` direction and motion transition overrides
|
|
154
130
|
*
|
|
@@ -156,12 +132,10 @@ function DialogViewport({ slots, className, ...props }) {
|
|
|
156
132
|
* ```tsx
|
|
157
133
|
* <DialogPortal>
|
|
158
134
|
* <DialogBackdrop />
|
|
159
|
-
* <
|
|
160
|
-
* <
|
|
161
|
-
*
|
|
162
|
-
*
|
|
163
|
-
* </DialogPopup>
|
|
164
|
-
* </DialogViewport>
|
|
135
|
+
* <DialogPopup from="bottom" className="max-w-md">
|
|
136
|
+
* <DialogTitle>Confirm</DialogTitle>
|
|
137
|
+
* <p>Are you sure?</p>
|
|
138
|
+
* </DialogPopup>
|
|
165
139
|
* </DialogPortal>
|
|
166
140
|
* ```
|
|
167
141
|
*/
|
|
@@ -172,30 +146,33 @@ function DialogPopup({ from = "top", initialFocus, finalFocus, slots, className,
|
|
|
172
146
|
}, ...props }) {
|
|
173
147
|
const initialRotation = from === "bottom" || from === "left" ? "20deg" : "-20deg";
|
|
174
148
|
const rotateAxis = from === "top" || from === "bottom" ? "rotateX" : "rotateY";
|
|
175
|
-
return /* @__PURE__ */ jsx(Dialog.
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
149
|
+
return /* @__PURE__ */ jsx(Dialog.Viewport, {
|
|
150
|
+
"data-slot": "dialog-viewport",
|
|
151
|
+
children: /* @__PURE__ */ jsx(Dialog.Popup, {
|
|
152
|
+
initialFocus,
|
|
153
|
+
finalFocus,
|
|
154
|
+
render: /* @__PURE__ */ jsx(motion.div, {
|
|
155
|
+
"data-slot": "dialog-popup",
|
|
156
|
+
className: cn(dialogStyles.popup, slots?.popup, className),
|
|
157
|
+
initial: {
|
|
158
|
+
opacity: 0,
|
|
159
|
+
filter: "blur(4px)",
|
|
160
|
+
transform: `perspective(500px) ${rotateAxis}(${initialRotation}) scale(0.8)`
|
|
161
|
+
},
|
|
162
|
+
animate: {
|
|
163
|
+
opacity: 1,
|
|
164
|
+
filter: "blur(0px)",
|
|
165
|
+
transform: `perspective(500px) ${rotateAxis}(0deg) scale(1)`
|
|
166
|
+
},
|
|
167
|
+
exit: {
|
|
168
|
+
opacity: 0,
|
|
169
|
+
filter: "blur(4px)",
|
|
170
|
+
transform: `perspective(500px) ${rotateAxis}(${initialRotation}) scale(0.8)`
|
|
171
|
+
},
|
|
172
|
+
transition,
|
|
173
|
+
...props
|
|
174
|
+
}, "dialog-popup")
|
|
175
|
+
})
|
|
199
176
|
});
|
|
200
177
|
}
|
|
201
178
|
/**
|
|
@@ -293,4 +270,4 @@ function DialogDescription({ slots, className, ...props }) {
|
|
|
293
270
|
}
|
|
294
271
|
|
|
295
272
|
//#endregion
|
|
296
|
-
export { Dialog$1 as Dialog, DialogBackdrop, DialogClose, DialogDescription, DialogFooter, DialogHeader, DialogPopup, DialogPortal, DialogTitle, DialogTrigger,
|
|
273
|
+
export { Dialog$1 as Dialog, DialogBackdrop, DialogClose, DialogDescription, DialogFooter, DialogHeader, DialogPopup, DialogPortal, DialogTitle, DialogTrigger, useDialog };
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Rules requiring :has(), container queries, clip-path, or pseudo-elements.
|
|
5
5
|
* Layout, colors, sizing in Tailwind (DynamicToggle.styles.ts).
|
|
6
6
|
*
|
|
7
|
-
* @import '@mks2508/mks-ui/
|
|
7
|
+
* @import '@mks2508/mks-ui/react/ui/DynamicToggle/DynamicToggle.module.css';
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/* ── Variables ── */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import './DynamicToggle.css';
|
|
1
|
+
import './DynamicToggle.module.css';
|
|
2
2
|
import { dynamicToggleVariants } from './DynamicToggle.styles';
|
|
3
3
|
import type { DynamicToggleContextType, IDynamicToggleProps, IDynamicToggleOptionProps, IDynamicToggleGroupProps } from './DynamicToggle.types';
|
|
4
4
|
declare const useDynamicToggle: () => DynamicToggleContextType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/react-ui/ui/DynamicToggle/index.tsx"],"names":[],"mappings":"AA8BA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/react-ui/ui/DynamicToggle/index.tsx"],"names":[],"mappings":"AA8BA,OAAO,4BAA4B,CAAC;AACpC,OAAO,EAAuB,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AACpF,OAAO,KAAK,EACV,wBAAwB,EAIxB,mBAAmB,EACnB,yBAAyB,EACzB,wBAAwB,EACzB,MAAM,uBAAuB,CAAC;AAM/B,QAAA,MAA8B,gBAAgB,gCACsB,CAAC;AAmCrE;;GAEG;AACH,iBAAS,aAAa,CAAC,EACrB,OAAO,EACP,IAAI,EACJ,KAAK,EACL,KAAK,EAAE,SAAS,EAChB,KAAK,EACL,MAAM,EACN,QAAgB,EAChB,SAAS,EACT,QAAQ,EACR,KAAK,EAAE,SAAS,EAChB,YAAY,EACZ,aAAa,EACb,GAAG,IAAI,EACR,EAAE,mBAAmB,2CAuGrB;kBArHQ,aAAa;;;AA2HtB;;GAEG;AACH,iBAAS,mBAAmB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,yBAAyB,2CA2BrF;kBA3BQ,mBAAmB;;;AAiC5B;;;GAGG;AACH,iBAAS,kBAAkB,CAAC,EAC1B,KAAK,EACL,MAAM,EACN,cAAsB,EACtB,aAAuB,EACvB,QAAQ,EACR,SAAS,GACV,EAAE,wBAAwB,2CA0C1B;kBAjDQ,kBAAkB;;;AA4D3B,2DAA2D;AAC3D,KAAK,qBAAqB,GAAG,OAAO,aAAa,GAAG;IAClD,MAAM,EAAE,OAAO,mBAAmB,CAAC;IACnC,KAAK,EAAE,OAAO,kBAAkB,CAAC;CAClC,CAAC;AASF,OAAO,EACL,aAAa,EACb,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EAChB,qBAAqB,GACtB,CAAC;AAEF,YAAY,EAAE,qBAAqB,EAAE,CAAC;AAEtC,YAAY,EACV,mBAAmB,EACnB,yBAAyB,EACzB,wBAAwB,EACxB,oBAAoB,EACpB,wBAAwB,EACxB,0BAA0B,EAC1B,2BAA2B,EAC3B,8BAA8B,GAC/B,MAAM,uBAAuB,CAAC;AAE/B,YAAY,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAC3F,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -4,7 +4,7 @@ import { cn } from "../../lib/utils.js";
|
|
|
4
4
|
import { GooeyCanvas } from "../../primitives/waapi/Gooey/GooeyCanvas.js";
|
|
5
5
|
import { getStrictContext } from "../../lib/get-strict-context.js";
|
|
6
6
|
import { useControlledState } from "../../hooks/State/UseControlledState.js";
|
|
7
|
-
import "./DynamicToggle.js";
|
|
7
|
+
import "./DynamicToggle.module.js";
|
|
8
8
|
import { dynamicToggleStyles, dynamicToggleVariants } from "./DynamicToggle.styles.js";
|
|
9
9
|
import * as React$1 from "react";
|
|
10
10
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -5,7 +5,7 @@ import { AlertDialog, AlertDialogBackdrop, AlertDialogClose, AlertDialogDescript
|
|
|
5
5
|
import { checkboxStyles } from "./Checkbox/Checkbox.styles.js";
|
|
6
6
|
import { Checkbox, CheckboxIndicator, useCheckbox } from "./Checkbox/index.js";
|
|
7
7
|
import { dialogStyles } from "./Dialog/Dialog.styles.js";
|
|
8
|
-
import { Dialog, DialogBackdrop, DialogClose, DialogDescription, DialogFooter, DialogHeader, DialogPopup, DialogPortal, DialogTitle, DialogTrigger,
|
|
8
|
+
import { Dialog, DialogBackdrop, DialogClose, DialogDescription, DialogFooter, DialogHeader, DialogPopup, DialogPortal, DialogTitle, DialogTrigger, useDialog } from "./Dialog/index.js";
|
|
9
9
|
import { Menu, MenuArrow, MenuCheckboxItem, MenuCheckboxItemIndicator, MenuGroup, MenuGroupLabel, MenuHighlight, MenuHighlightItem, MenuItem, MenuPopup, MenuPortal, MenuPositioner, MenuRadioGroup, MenuRadioItem, MenuRadioItemIndicator, MenuSeparator, MenuShortcut, MenuSubmenu, MenuSubmenuTrigger, MenuTrigger, useMenu, useMenuActiveValue } from "./Menu/index.js";
|
|
10
10
|
import { popoverStyles } from "./Popover/Popover.styles.js";
|
|
11
11
|
import { Popover, PopoverArrow, PopoverBackdrop, PopoverClose, PopoverDescription, PopoverPopup, PopoverPortal, PopoverPositioner, PopoverTitle, PopoverTrigger, usePopover } from "./Popover/index.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mks2508/mks-ui",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.5",
|
|
4
4
|
"description": "UI component library - Shadcn/Animate UI based with DevEnv components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -81,14 +81,15 @@
|
|
|
81
81
|
"types": "./dist/react-ui/blocks/Terminal/display.d.ts",
|
|
82
82
|
"import": "./dist/react-ui/blocks/Terminal/display.js",
|
|
83
83
|
"default": "./dist/react-ui/blocks/Terminal/display.js"
|
|
84
|
-
}
|
|
84
|
+
},
|
|
85
|
+
"./index.css": "./dist/index.css"
|
|
85
86
|
},
|
|
86
87
|
"files": [
|
|
87
88
|
"dist"
|
|
88
89
|
],
|
|
89
90
|
"scripts": {
|
|
90
91
|
"dev": "vite",
|
|
91
|
-
"build": "rm -rf dist && bunx rolldown --config rolldown.config.ts && bunx tsc --emitDeclarationOnly && bunx tsc-alias && cp src/index.css dist/index.css
|
|
92
|
+
"build": "rm -rf dist && bunx rolldown --config rolldown.config.ts && bunx tsc --emitDeclarationOnly && bunx tsc-alias && cp src/index.css dist/index.css",
|
|
92
93
|
"typecheck": "bunx tsc --noEmit",
|
|
93
94
|
"lint": "bunx oxlint .",
|
|
94
95
|
"preview": "vite preview",
|
|
@@ -1,368 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DynamicToggle v2 — CSS state transitions.
|
|
3
|
-
*
|
|
4
|
-
* Rules requiring :has(), container queries, clip-path, or pseudo-elements.
|
|
5
|
-
* Layout, colors, sizing in Tailwind (DynamicToggle.styles.ts).
|
|
6
|
-
*
|
|
7
|
-
* @import '@mks2508/mks-ui/dist/react-ui/ui/DynamicToggle/DynamicToggle.css';
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
/* ── Variables ── */
|
|
11
|
-
[data-slot="dt-root"] {
|
|
12
|
-
--dt-dur: 0.22s;
|
|
13
|
-
--dt-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
|
|
14
|
-
--dt-fade: 0.45;
|
|
15
|
-
--dt-indicator-dur: 0.3s;
|
|
16
|
-
--dt-indicator-ease: cubic-bezier(0.4, 0, 0.2, 1);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
/* ── Track: explicit row prevents h-full items from overflowing container ── */
|
|
20
|
-
[data-slot="dt-root"] [data-slot="dt-track"] {
|
|
21
|
-
grid-template-rows: minmax(0, 1fr);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/* ── Top-level option spans 2 grid cols ── */
|
|
25
|
-
[data-slot="dt-root"] [data-slot="dt-track"] > label {
|
|
26
|
-
grid-column: span 2;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
/* ── Primary option text ── */
|
|
30
|
-
[data-slot="dt-root"] [data-slot="dt-track"]:has(> input:checked) > label {
|
|
31
|
-
color: var(--accent-foreground);
|
|
32
|
-
z-index: 2;
|
|
33
|
-
}
|
|
34
|
-
[data-slot="dt-root"] [data-slot="dt-track"]:not(:has(> input:checked)) > label {
|
|
35
|
-
color: var(--foreground);
|
|
36
|
-
opacity: var(--dt-fade);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/* ── Group: container queries ── */
|
|
40
|
-
[data-slot="dt-root"] [data-slot="dt-group"] {
|
|
41
|
-
container-type: size;
|
|
42
|
-
overflow: hidden;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/* ══════════════════════════════════════════════════════════
|
|
46
|
-
* INDICATOR POSITIONING
|
|
47
|
-
*
|
|
48
|
-
* Modern: CSS Anchor Positioning — indicator follows active option
|
|
49
|
-
* Fallback: translate-based positioning for older browsers
|
|
50
|
-
* ══════════════════════════════════════════════════════════ */
|
|
51
|
-
|
|
52
|
-
/* ── Anchor-based indicator (requires full anchor API) ── */
|
|
53
|
-
@supports (anchor-scope: all) {
|
|
54
|
-
/* Scope anchors per toggle instance */
|
|
55
|
-
[data-slot="dt-root"]:not([data-indicator="translate"]) {
|
|
56
|
-
anchor-scope: --dt-active;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
/* Active option becomes the anchor via native :checked */
|
|
60
|
-
[data-slot="dt-root"]:not([data-indicator="translate"]) [data-slot="dt-track"] > label:has(+ input:checked) {
|
|
61
|
-
anchor-name: --dt-active;
|
|
62
|
-
}
|
|
63
|
-
[data-slot="dt-root"]:not([data-indicator="translate"]) [data-slot="dt-group"] > label:has(+ input:checked) {
|
|
64
|
-
anchor-name: --dt-active;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
/* Single unified indicator: morphs from full-width to half-width */
|
|
68
|
-
[data-slot="dt-root"]:not([data-indicator="translate"]) [data-slot="dt-indicator"] {
|
|
69
|
-
position-anchor: --dt-active;
|
|
70
|
-
top: anchor(top);
|
|
71
|
-
right: anchor(right);
|
|
72
|
-
bottom: anchor(bottom);
|
|
73
|
-
left: anchor(left);
|
|
74
|
-
translate: none;
|
|
75
|
-
width: auto;
|
|
76
|
-
transition:
|
|
77
|
-
top var(--dt-indicator-dur) var(--dt-indicator-ease),
|
|
78
|
-
right var(--dt-indicator-dur) var(--dt-indicator-ease),
|
|
79
|
-
bottom var(--dt-indicator-dur) var(--dt-indicator-ease),
|
|
80
|
-
left var(--dt-indicator-dur) var(--dt-indicator-ease);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
/* Hide the group indicator — unified indicator handles everything */
|
|
84
|
-
[data-slot="dt-root"]:not([data-indicator="translate"]) [data-slot="dt-group-indicator"] {
|
|
85
|
-
display: none;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/* ── Inset-based fallback (older browsers) — same morph as anchor but hardcoded ── */
|
|
90
|
-
@supports not (anchor-scope: all) {
|
|
91
|
-
/* Unified indicator: left/right transition morphs width + position */
|
|
92
|
-
[data-slot="dt-root"] [data-slot="dt-indicator"] {
|
|
93
|
-
left: 50%;
|
|
94
|
-
right: 0;
|
|
95
|
-
width: auto;
|
|
96
|
-
translate: none;
|
|
97
|
-
transition:
|
|
98
|
-
left var(--dt-indicator-dur) var(--dt-indicator-ease),
|
|
99
|
-
right var(--dt-indicator-dur) var(--dt-indicator-ease);
|
|
100
|
-
}
|
|
101
|
-
/* Top-level checked: indicator covers left half */
|
|
102
|
-
[data-slot="dt-root"] [data-slot="dt-track"]:has(> input:checked) [data-slot="dt-indicator"] {
|
|
103
|
-
left: 0;
|
|
104
|
-
right: 50%;
|
|
105
|
-
}
|
|
106
|
-
/* Group option 1 checked: indicator at 3rd quarter */
|
|
107
|
-
[data-slot="dt-root"] [data-slot="dt-group"]:has(input:nth-of-type(1):checked) ~ [data-slot="dt-indicator"],
|
|
108
|
-
[data-slot="dt-root"] [data-slot="dt-track"]:has([data-slot="dt-group"] input:nth-of-type(1):checked) [data-slot="dt-indicator"] {
|
|
109
|
-
left: 50%;
|
|
110
|
-
right: 25%;
|
|
111
|
-
}
|
|
112
|
-
/* Group option 2 checked: indicator at 4th quarter */
|
|
113
|
-
[data-slot="dt-root"] [data-slot="dt-group"]:has(input:nth-of-type(2):checked) ~ [data-slot="dt-indicator"],
|
|
114
|
-
[data-slot="dt-root"] [data-slot="dt-track"]:has([data-slot="dt-group"] input:nth-of-type(2):checked) [data-slot="dt-indicator"] {
|
|
115
|
-
left: 75%;
|
|
116
|
-
right: 0;
|
|
117
|
-
}
|
|
118
|
-
/* Hide group indicator — unified indicator handles everything */
|
|
119
|
-
[data-slot="dt-root"] [data-slot="dt-group-indicator"] {
|
|
120
|
-
display: none;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
/* ── Force inset mode via data-indicator="translate" (works regardless of @supports) ── */
|
|
125
|
-
[data-slot="dt-root"][data-indicator="translate"] [data-slot="dt-indicator"] {
|
|
126
|
-
left: 50%;
|
|
127
|
-
right: 0;
|
|
128
|
-
width: auto;
|
|
129
|
-
translate: none;
|
|
130
|
-
transition:
|
|
131
|
-
left var(--dt-indicator-dur) var(--dt-indicator-ease),
|
|
132
|
-
right var(--dt-indicator-dur) var(--dt-indicator-ease);
|
|
133
|
-
}
|
|
134
|
-
[data-slot="dt-root"][data-indicator="translate"] [data-slot="dt-track"]:has(> input:checked) [data-slot="dt-indicator"] {
|
|
135
|
-
left: 0;
|
|
136
|
-
right: 50%;
|
|
137
|
-
}
|
|
138
|
-
[data-slot="dt-root"][data-indicator="translate"] [data-slot="dt-track"]:has([data-slot="dt-group"] input:nth-of-type(1):checked) [data-slot="dt-indicator"] {
|
|
139
|
-
left: 50%;
|
|
140
|
-
right: 25%;
|
|
141
|
-
}
|
|
142
|
-
[data-slot="dt-root"][data-indicator="translate"] [data-slot="dt-track"]:has([data-slot="dt-group"] input:nth-of-type(2):checked) [data-slot="dt-indicator"] {
|
|
143
|
-
left: 75%;
|
|
144
|
-
right: 0;
|
|
145
|
-
}
|
|
146
|
-
[data-slot="dt-root"][data-indicator="translate"] [data-slot="dt-group-indicator"] {
|
|
147
|
-
display: none;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
/* ══════════════════════════════════════════════════════════
|
|
151
|
-
* GROUP COLLAPSED STATE
|
|
152
|
-
*
|
|
153
|
-
* ::before = title text (via data-label attr)
|
|
154
|
-
* ::after = combined opts text (via data-opts attr)
|
|
155
|
-
* <label>s = controlled by data-collapsed mode
|
|
156
|
-
*
|
|
157
|
-
* 3 modes: title | opts | title-opts (default)
|
|
158
|
-
* ══════════════════════════════════════════════════════════ */
|
|
159
|
-
|
|
160
|
-
/* ── ::before — group title ── */
|
|
161
|
-
[data-slot="dt-group"]::before {
|
|
162
|
-
content: attr(data-label);
|
|
163
|
-
position: absolute;
|
|
164
|
-
left: 50%;
|
|
165
|
-
top: 50%;
|
|
166
|
-
translate: -50% -80%;
|
|
167
|
-
color: var(--foreground);
|
|
168
|
-
font-size: inherit;
|
|
169
|
-
font-weight: 500;
|
|
170
|
-
z-index: 2;
|
|
171
|
-
white-space: nowrap;
|
|
172
|
-
pointer-events: none;
|
|
173
|
-
transition:
|
|
174
|
-
scale var(--dt-dur) var(--dt-ease),
|
|
175
|
-
translate var(--dt-dur) var(--dt-ease),
|
|
176
|
-
opacity var(--dt-dur) var(--dt-ease);
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
/* ── ::after — combined opts text ── */
|
|
180
|
-
[data-slot="dt-group"]::after {
|
|
181
|
-
content: attr(data-opts);
|
|
182
|
-
position: absolute;
|
|
183
|
-
left: 50%;
|
|
184
|
-
top: 50%;
|
|
185
|
-
translate: -50% 20%;
|
|
186
|
-
color: var(--muted-foreground);
|
|
187
|
-
font-size: 0.85em;
|
|
188
|
-
opacity: 0.6;
|
|
189
|
-
z-index: 2;
|
|
190
|
-
white-space: nowrap;
|
|
191
|
-
pointer-events: none;
|
|
192
|
-
transition: opacity var(--dt-dur) var(--dt-ease);
|
|
193
|
-
}
|
|
194
|
-
[data-slot="dt-group"]:not([data-opts])::after {
|
|
195
|
-
content: none;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
/* ── Group labels — transition props ── */
|
|
199
|
-
[data-slot="dt-root"] [data-slot="dt-group"] label {
|
|
200
|
-
color: var(--muted-foreground);
|
|
201
|
-
cursor: pointer;
|
|
202
|
-
z-index: 2;
|
|
203
|
-
transition:
|
|
204
|
-
color var(--dt-dur) var(--dt-ease),
|
|
205
|
-
opacity var(--dt-dur) var(--dt-ease),
|
|
206
|
-
translate var(--dt-dur) var(--dt-ease);
|
|
207
|
-
}
|
|
208
|
-
[data-slot="dt-root"] [data-slot="dt-group"] label span {
|
|
209
|
-
display: grid;
|
|
210
|
-
place-items: center;
|
|
211
|
-
height: 100%;
|
|
212
|
-
width: 100%;
|
|
213
|
-
border-radius: var(--dt-radius, 9999px);
|
|
214
|
-
transition: scale var(--dt-dur) var(--dt-ease);
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
/* ── Collapsed mode: "title" — only ::before, labels slide+scale out ── */
|
|
218
|
-
[data-slot="dt-group"][data-collapsed="title"]::before {
|
|
219
|
-
translate: -50% -50%;
|
|
220
|
-
}
|
|
221
|
-
[data-slot="dt-group"][data-collapsed="title"]::after {
|
|
222
|
-
display: none;
|
|
223
|
-
}
|
|
224
|
-
[data-slot="dt-group"][data-collapsed="title"]:not(:has(input:checked)) label {
|
|
225
|
-
opacity: 0;
|
|
226
|
-
translate: 0 30%;
|
|
227
|
-
}
|
|
228
|
-
[data-slot="dt-group"][data-collapsed="title"]:not(:has(input:checked)) label span {
|
|
229
|
-
scale: 0.5;
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
/* ── Collapsed mode: "opts" — only ::after, labels slide+scale out ── */
|
|
233
|
-
[data-slot="dt-group"][data-collapsed="opts"]::before {
|
|
234
|
-
display: none;
|
|
235
|
-
}
|
|
236
|
-
[data-slot="dt-group"][data-collapsed="opts"]::after {
|
|
237
|
-
translate: -50% -50%;
|
|
238
|
-
font-size: inherit;
|
|
239
|
-
opacity: 0.7;
|
|
240
|
-
}
|
|
241
|
-
[data-slot="dt-group"][data-collapsed="opts"]:not(:has(input:checked)) label {
|
|
242
|
-
opacity: 0;
|
|
243
|
-
translate: 0 30%;
|
|
244
|
-
}
|
|
245
|
-
[data-slot="dt-group"][data-collapsed="opts"]:not(:has(input:checked)) label span {
|
|
246
|
-
scale: 0.5;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
/* ── Collapsed mode: "title-opts" — WIP: disabled, falls back to "title" behavior ── */
|
|
250
|
-
/* TODO: title-opts needs a redesign — title (::before) and scaled labels overlap
|
|
251
|
-
at all container sizes. The codepen original morph relied on specific dimensions
|
|
252
|
-
that don't translate to the component's size variants. Needs a different approach
|
|
253
|
-
(e.g., crossfade, flex layout, or JS-measured positions). */
|
|
254
|
-
[data-slot="dt-group"][data-collapsed="title-opts"]::after {
|
|
255
|
-
content: none;
|
|
256
|
-
}
|
|
257
|
-
[data-slot="dt-group"][data-collapsed="title-opts"]::before {
|
|
258
|
-
translate: -50% -50%;
|
|
259
|
-
}
|
|
260
|
-
[data-slot="dt-group"][data-collapsed="title-opts"]:not(:has(input:checked)) label {
|
|
261
|
-
opacity: 0;
|
|
262
|
-
translate: 0 30%;
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
/* ── When group expanded ── */
|
|
266
|
-
[data-slot="dt-group"]:has(input:checked)::before {
|
|
267
|
-
translate: -50% -250%;
|
|
268
|
-
scale: 0.85;
|
|
269
|
-
}
|
|
270
|
-
[data-slot="dt-group"]:has(input:checked)::after {
|
|
271
|
-
opacity: 0;
|
|
272
|
-
}
|
|
273
|
-
[data-slot="dt-group"]:has(input:checked) label {
|
|
274
|
-
opacity: 0.75;
|
|
275
|
-
color: var(--muted-foreground);
|
|
276
|
-
translate: 0 0;
|
|
277
|
-
}
|
|
278
|
-
[data-slot="dt-group"]:has(input:checked) label span {
|
|
279
|
-
scale: 1;
|
|
280
|
-
}
|
|
281
|
-
[data-slot="dt-group"]:has(input:nth-of-type(1):checked) label:nth-of-type(1),
|
|
282
|
-
[data-slot="dt-group"]:has(input:nth-of-type(2):checked) label:nth-of-type(2) {
|
|
283
|
-
color: var(--foreground);
|
|
284
|
-
opacity: 1;
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
/* ══════════════════════════════════════════════════════════
|
|
288
|
-
* GROUP LABEL / BUBBLE (above or below the pill)
|
|
289
|
-
*
|
|
290
|
-
* Positioned via CSS. In filter/path morph modes, rendered with GooeyCanvas.
|
|
291
|
-
* In none mode, simple CSS-driven show/hide.
|
|
292
|
-
* bubblePosition: top | bottom (no left/right in v2)
|
|
293
|
-
* ══════════════════════════════════════════════════════════ */
|
|
294
|
-
|
|
295
|
-
[data-slot="dt-group-label"] {
|
|
296
|
-
display: grid;
|
|
297
|
-
grid-template-rows: 0fr;
|
|
298
|
-
left: 20%;
|
|
299
|
-
right: 20%;
|
|
300
|
-
transition:
|
|
301
|
-
grid-template-rows calc(var(--dt-dur) * 1.5) var(--dt-ease),
|
|
302
|
-
opacity var(--dt-dur) var(--dt-ease);
|
|
303
|
-
opacity: 0;
|
|
304
|
-
background: var(--card);
|
|
305
|
-
border: 1px solid var(--border);
|
|
306
|
-
z-index: 3;
|
|
307
|
-
transform: translateZ(0);
|
|
308
|
-
-webkit-transform: translateZ(0);
|
|
309
|
-
}
|
|
310
|
-
[data-slot="dt-group-label"] > span {
|
|
311
|
-
overflow: hidden;
|
|
312
|
-
min-height: 0;
|
|
313
|
-
display: flex;
|
|
314
|
-
align-items: center;
|
|
315
|
-
justify-content: center;
|
|
316
|
-
padding: 0 0.75em;
|
|
317
|
-
height: calc(var(--dt-h, 38px) * 0.4);
|
|
318
|
-
box-sizing: border-box;
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
/* Top position */
|
|
322
|
-
[data-slot="dt-group-label"][data-bubble-position="top"] {
|
|
323
|
-
bottom: 100%;
|
|
324
|
-
border-radius: calc(var(--dt-h, 38px) * 0.2) calc(var(--dt-h, 38px) * 0.2) 0 0;
|
|
325
|
-
border-bottom: none;
|
|
326
|
-
margin-bottom: -1px;
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
/* Bottom position */
|
|
330
|
-
[data-slot="dt-group-label"][data-bubble-position="bottom"] {
|
|
331
|
-
top: 100%;
|
|
332
|
-
border-radius: 0 0 calc(var(--dt-h, 38px) * 0.2) calc(var(--dt-h, 38px) * 0.2);
|
|
333
|
-
border-top: none;
|
|
334
|
-
margin-top: -1px;
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
/* When group active → group label grows (vertical: top/bottom) */
|
|
338
|
-
[data-slot="dt-root"]:not(:has([data-slot="dt-track"] > input:checked)) [data-slot="dt-group-label"][data-bubble-position="top"],
|
|
339
|
-
[data-slot="dt-root"]:not(:has([data-slot="dt-track"] > input:checked)) [data-slot="dt-group-label"][data-bubble-position="bottom"] {
|
|
340
|
-
grid-template-rows: 1fr;
|
|
341
|
-
opacity: 1;
|
|
342
|
-
}
|
|
343
|
-
[data-slot="dt-root"]:not(:has([data-slot="dt-track"] > input:checked)) [data-slot="dt-group-label"][data-bubble-position="top"] > span,
|
|
344
|
-
[data-slot="dt-root"]:not(:has([data-slot="dt-track"] > input:checked)) [data-slot="dt-group-label"][data-bubble-position="bottom"] > span {
|
|
345
|
-
padding: 0.35em 0.75em;
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
/* ── Filter morph mode ── */
|
|
349
|
-
[data-slot="dt-root"][data-morph="filter"] [data-slot="dt-group-label"] {
|
|
350
|
-
border: none;
|
|
351
|
-
}
|
|
352
|
-
[data-slot="dt-root"][data-morph="filter"] [data-slot="dt-track"] {
|
|
353
|
-
position: relative;
|
|
354
|
-
z-index: 1;
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
/* ── Filter morph: ::before hides on expand, gooey canvas handles junction ── */
|
|
358
|
-
[data-slot="dt-root"][data-morph="filter"] [data-slot="dt-group"]:has(input:checked)::before {
|
|
359
|
-
opacity: 0;
|
|
360
|
-
translate: -50% -80%;
|
|
361
|
-
scale: 1;
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
/* ── Path morph mode ── */
|
|
365
|
-
[data-slot="dt-root"][data-morph="path"] [data-slot="dt-track"] {
|
|
366
|
-
position: relative;
|
|
367
|
-
z-index: 1;
|
|
368
|
-
}
|
|
File without changes
|