@pathscale/ui 1.1.63 → 1.1.65
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/components/_shared/index.d.ts +1 -0
- package/dist/components/_shared/index.js +3 -0
- package/dist/components/_shared/overlayPosition.d.ts +19 -0
- package/dist/components/_shared/overlayPosition.js +115 -0
- package/dist/components/dropdown/Dropdown.css +36 -7
- package/dist/components/dropdown/Dropdown.d.ts +7 -1
- package/dist/components/dropdown/Dropdown.js +84 -40
- package/dist/components/dropdown/index.d.ts +1 -1
- package/dist/components/popover/Popover.css +10 -18
- package/dist/components/popover/Popover.d.ts +3 -1
- package/dist/components/popover/Popover.js +70 -37
- package/dist/components/select/Select.css +38 -4
- package/dist/components/select/Select.d.ts +4 -0
- package/dist/components/select/Select.js +75 -20
- package/dist/components/select/index.d.ts +1 -1
- package/dist/components/table/Table.css +6 -0
- package/dist/components/theme-color-picker/ThemeColorPicker.classes.d.ts +1 -1
- package/dist/components/theme-color-picker/ThemeColorPicker.classes.js +1 -1
- package/dist/components/theme-color-picker/ThemeColorPicker.d.ts +12 -0
- package/dist/components/theme-color-picker/ThemeColorPicker.js +76 -49
- package/dist/components/theme-color-picker/index.d.ts +1 -1
- package/dist/purge-manifest.json +375 -385
- package/package.json +2 -2
|
@@ -2,6 +2,7 @@ import * as __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__ from "solid-js/web
|
|
|
2
2
|
import "./Popover.css";
|
|
3
3
|
import * as __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__ from "solid-js";
|
|
4
4
|
import * as __WEBPACK_EXTERNAL_MODULE_tailwind_merge_e05e3e95__ from "tailwind-merge";
|
|
5
|
+
import * as __WEBPACK_EXTERNAL_MODULE__shared_overlayPosition_js_ab299723__ from "../_shared/overlayPosition.js";
|
|
5
6
|
import * as __WEBPACK_EXTERNAL_MODULE__Popover_classes_js_917d7621__ from "./Popover.classes.js";
|
|
6
7
|
var _tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<div>"), _tmpl$2 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)('<svg aria-hidden=true data-slot=popover-arrow-svg height=12 viewBox="0 0 12 12"width=12 xmlns=http://www.w3.org/2000/svg><path d="M0 0C5.48483 8 6.5 8 12 0Z"fill=currentColor>'), _tmpl$3 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<span>"), _tmpl$4 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<h3>");
|
|
7
8
|
const PopoverContext = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createContext)();
|
|
@@ -21,6 +22,7 @@ const PopoverRoot = (props)=>{
|
|
|
21
22
|
"defaultOpen",
|
|
22
23
|
"onOpenChange",
|
|
23
24
|
"placement",
|
|
25
|
+
"autoFlip",
|
|
24
26
|
"offset",
|
|
25
27
|
"closeOnOutsideClick",
|
|
26
28
|
"closeOnEscape",
|
|
@@ -31,6 +33,7 @@ const PopoverRoot = (props)=>{
|
|
|
31
33
|
const [contentRef, setContentRef] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createSignal)();
|
|
32
34
|
const [triggerId] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createSignal)(`popover-trigger-${Math.random().toString(36).slice(2, 8)}`);
|
|
33
35
|
const [contentId] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createSignal)(`popover-content-${Math.random().toString(36).slice(2, 8)}`);
|
|
36
|
+
const [resolvedPlacement, setResolvedPlacement] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createSignal)(local.placement ?? "bottom");
|
|
34
37
|
const isControlled = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>void 0 !== local.isOpen);
|
|
35
38
|
const isOpen = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>isControlled() ? Boolean(local.isOpen) : internalOpen());
|
|
36
39
|
const setIsOpen = (next, options)=>{
|
|
@@ -38,8 +41,10 @@ const PopoverRoot = (props)=>{
|
|
|
38
41
|
if (isOpen() !== next) local.onOpenChange?.(next);
|
|
39
42
|
if (!next && options?.focusTrigger) triggerRef()?.focus();
|
|
40
43
|
};
|
|
41
|
-
const
|
|
44
|
+
const preferredPlacement = ()=>local.placement ?? "bottom";
|
|
45
|
+
const placement = ()=>resolvedPlacement();
|
|
42
46
|
const offset = ()=>local.offset ?? 8;
|
|
47
|
+
const autoFlip = ()=>local.autoFlip ?? true;
|
|
43
48
|
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.onMount)(()=>{
|
|
44
49
|
const handlePointerDown = (event)=>{
|
|
45
50
|
if (!isOpen()) return;
|
|
@@ -72,7 +77,10 @@ const PopoverRoot = (props)=>{
|
|
|
72
77
|
const ctx = {
|
|
73
78
|
isOpen,
|
|
74
79
|
setIsOpen,
|
|
80
|
+
preferredPlacement,
|
|
75
81
|
placement,
|
|
82
|
+
setPlacement: setResolvedPlacement,
|
|
83
|
+
autoFlip,
|
|
76
84
|
triggerRef,
|
|
77
85
|
setTriggerRef,
|
|
78
86
|
contentRef,
|
|
@@ -175,47 +183,72 @@ const PopoverContent = (props)=>{
|
|
|
175
183
|
"sideOffset"
|
|
176
184
|
]);
|
|
177
185
|
const ctx = usePopoverContext();
|
|
186
|
+
const overlayPosition = (0, __WEBPACK_EXTERNAL_MODULE__shared_overlayPosition_js_ab299723__.createOverlayPosition)({
|
|
187
|
+
open: ctx.isOpen,
|
|
188
|
+
triggerRef: ctx.triggerRef,
|
|
189
|
+
overlayRef: ctx.contentRef,
|
|
190
|
+
placement: ctx.preferredPlacement,
|
|
191
|
+
offset: ()=>local.sideOffset ?? ctx.offset(),
|
|
192
|
+
autoFlip: ctx.autoFlip,
|
|
193
|
+
align: ()=>"center"
|
|
194
|
+
});
|
|
195
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createEffect)(()=>{
|
|
196
|
+
ctx.setPlacement(overlayPosition.placement());
|
|
197
|
+
});
|
|
178
198
|
const style = ()=>{
|
|
179
|
-
|
|
199
|
+
const overlayStyle = overlayPosition.style();
|
|
200
|
+
if ("string" == typeof local.style) return [
|
|
201
|
+
local.style,
|
|
202
|
+
Object.entries(overlayStyle).map(([key, value])=>`${key}: ${String(value)}`).join("; ")
|
|
203
|
+
].filter(Boolean).join("; ");
|
|
180
204
|
return {
|
|
181
205
|
...local.style ?? {},
|
|
182
|
-
|
|
206
|
+
...overlayStyle
|
|
183
207
|
};
|
|
184
208
|
};
|
|
185
|
-
return ((
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
209
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(__WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.Show, {
|
|
210
|
+
get when () {
|
|
211
|
+
return ctx.isOpen();
|
|
212
|
+
},
|
|
213
|
+
get children () {
|
|
214
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(__WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.Portal, {
|
|
215
|
+
get children () {
|
|
216
|
+
var _el$3 = _tmpl$();
|
|
217
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.use)((el)=>ctx.setContentRef(el), _el$3);
|
|
218
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.spread)(_el$3, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)(others, {
|
|
219
|
+
get id () {
|
|
220
|
+
return ctx.contentId();
|
|
221
|
+
},
|
|
222
|
+
role: "dialog"
|
|
223
|
+
}, ()=>({
|
|
224
|
+
class: (0, __WEBPACK_EXTERNAL_MODULE_tailwind_merge_e05e3e95__.twMerge)(__WEBPACK_EXTERNAL_MODULE__Popover_classes_js_917d7621__.CLASSES.base, local.class, local.className)
|
|
225
|
+
}), {
|
|
226
|
+
"data-slot": "popover-content",
|
|
227
|
+
get ["data-open"] () {
|
|
228
|
+
return ctx.isOpen() ? "true" : "false";
|
|
229
|
+
},
|
|
230
|
+
get ["data-placement"] () {
|
|
231
|
+
return ctx.placement();
|
|
232
|
+
},
|
|
233
|
+
get ["data-theme"] () {
|
|
234
|
+
return local.dataTheme;
|
|
235
|
+
},
|
|
236
|
+
get style () {
|
|
237
|
+
return style();
|
|
238
|
+
},
|
|
239
|
+
get ["aria-labelledby"] () {
|
|
240
|
+
return ctx.triggerId();
|
|
241
|
+
},
|
|
242
|
+
get ["aria-hidden"] () {
|
|
243
|
+
return ctx.isOpen() ? "false" : "true";
|
|
244
|
+
}
|
|
245
|
+
}), false, true);
|
|
246
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$3, ()=>local.children);
|
|
247
|
+
return _el$3;
|
|
248
|
+
}
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
});
|
|
219
252
|
};
|
|
220
253
|
const PopoverDialog = (props)=>{
|
|
221
254
|
const [local, others] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
|
|
@@ -132,10 +132,8 @@
|
|
|
132
132
|
|
|
133
133
|
.ui-select__popover {
|
|
134
134
|
display: none;
|
|
135
|
-
position:
|
|
135
|
+
position: fixed;
|
|
136
136
|
z-index: 80;
|
|
137
|
-
top: calc(100% + 0.375rem);
|
|
138
|
-
inset-inline-start: 0;
|
|
139
137
|
min-width: max(100%, 14rem);
|
|
140
138
|
max-width: min(30rem, calc(100vw - 2rem));
|
|
141
139
|
max-height: min(24rem, 70vh);
|
|
@@ -162,10 +160,46 @@
|
|
|
162
160
|
display: block;
|
|
163
161
|
visibility: visible;
|
|
164
162
|
opacity: 1;
|
|
165
|
-
transform:
|
|
163
|
+
transform: scale(1);
|
|
166
164
|
pointer-events: auto;
|
|
167
165
|
}
|
|
168
166
|
|
|
167
|
+
.ui-select__popover[data-placement="top"] {
|
|
168
|
+
transform: translateY(4px) scale(0.98);
|
|
169
|
+
transform-origin: bottom;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.ui-select__popover[data-placement="top"][data-open="true"] {
|
|
173
|
+
transform: translateY(0) scale(1);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.ui-select__popover[data-placement="bottom"] {
|
|
177
|
+
transform: translateY(-4px) scale(0.98);
|
|
178
|
+
transform-origin: top;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.ui-select__popover[data-placement="bottom"][data-open="true"] {
|
|
182
|
+
transform: translateY(0) scale(1);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.ui-select__popover[data-placement="left"] {
|
|
186
|
+
transform: translateX(4px) scale(0.98);
|
|
187
|
+
transform-origin: right;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.ui-select__popover[data-placement="left"][data-open="true"] {
|
|
191
|
+
transform: translateX(0) scale(1);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.ui-select__popover[data-placement="right"] {
|
|
195
|
+
transform: translateX(-4px) scale(0.98);
|
|
196
|
+
transform-origin: left;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.ui-select__popover[data-placement="right"][data-open="true"] {
|
|
200
|
+
transform: translateX(0) scale(1);
|
|
201
|
+
}
|
|
202
|
+
|
|
169
203
|
.ui-select__listbox {
|
|
170
204
|
display: flex;
|
|
171
205
|
flex-direction: column;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import "./Select.css";
|
|
2
2
|
import { type Component, type JSX } from "solid-js";
|
|
3
|
+
import { type OverlayPlacement } from "../_shared/overlayPosition";
|
|
3
4
|
import type { IComponentBaseProps } from "../types";
|
|
4
5
|
type SelectKey = string | number;
|
|
5
6
|
export type SelectValueType = SelectKey | SelectKey[] | null;
|
|
6
7
|
export type SelectVariant = "primary" | "secondary";
|
|
7
8
|
export type SelectSelectionMode = "single" | "multiple";
|
|
9
|
+
export type SelectPlacement = OverlayPlacement;
|
|
8
10
|
export type SelectRootProps = Omit<JSX.HTMLAttributes<HTMLDivElement>, "onChange"> & IComponentBaseProps & {
|
|
9
11
|
children: JSX.Element;
|
|
10
12
|
placeholder?: string;
|
|
@@ -19,6 +21,8 @@ export type SelectRootProps = Omit<JSX.HTMLAttributes<HTMLDivElement>, "onChange
|
|
|
19
21
|
fullWidth?: boolean;
|
|
20
22
|
variant?: SelectVariant;
|
|
21
23
|
selectionMode?: SelectSelectionMode;
|
|
24
|
+
placement?: SelectPlacement;
|
|
25
|
+
autoFlip?: boolean;
|
|
22
26
|
isOpen?: boolean;
|
|
23
27
|
defaultOpen?: boolean;
|
|
24
28
|
onOpenChange?: (open: boolean) => void;
|
|
@@ -2,6 +2,7 @@ import * as __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__ from "solid-js/web
|
|
|
2
2
|
import "./Select.css";
|
|
3
3
|
import * as __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__ from "solid-js";
|
|
4
4
|
import * as __WEBPACK_EXTERNAL_MODULE_tailwind_merge_e05e3e95__ from "tailwind-merge";
|
|
5
|
+
import * as __WEBPACK_EXTERNAL_MODULE__shared_overlayPosition_js_ab299723__ from "../_shared/overlayPosition.js";
|
|
5
6
|
import * as __WEBPACK_EXTERNAL_MODULE__Select_classes_js_98857364__ from "./Select.classes.js";
|
|
6
7
|
var _tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<div>"), _tmpl$2 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<button>"), _tmpl$3 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<span>"), _tmpl$4 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<span><span>"), _tmpl$5 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<button><span>");
|
|
7
8
|
const SelectContext = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createContext)();
|
|
@@ -50,6 +51,8 @@ const SelectRoot = (props)=>{
|
|
|
50
51
|
"fullWidth",
|
|
51
52
|
"variant",
|
|
52
53
|
"selectionMode",
|
|
54
|
+
"placement",
|
|
55
|
+
"autoFlip",
|
|
53
56
|
"isOpen",
|
|
54
57
|
"defaultOpen",
|
|
55
58
|
"onOpenChange",
|
|
@@ -69,8 +72,11 @@ const SelectRoot = (props)=>{
|
|
|
69
72
|
const [focusedKey, setFocusedKey] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createSignal)();
|
|
70
73
|
const [focusRequest, setFocusRequest] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createSignal)(null);
|
|
71
74
|
const [triggerRef, setTriggerRefSignal] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createSignal)();
|
|
75
|
+
const [popoverRef, setPopoverRefSignal] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createSignal)();
|
|
72
76
|
const [rootRef, setRootRefSignal] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createSignal)();
|
|
73
77
|
const open = ()=>void 0 !== local.isOpen ? Boolean(local.isOpen) : internalOpen();
|
|
78
|
+
const placement = ()=>local.placement ?? "bottom";
|
|
79
|
+
const autoFlip = ()=>local.autoFlip ?? true;
|
|
74
80
|
const selectedKeys = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>{
|
|
75
81
|
const controlledValue = void 0 !== local.selectedKeys ? local.selectedKeys : local.value;
|
|
76
82
|
if (void 0 !== controlledValue) return normalizeSelection(selectionMode(), controlledValue);
|
|
@@ -162,6 +168,9 @@ const SelectRoot = (props)=>{
|
|
|
162
168
|
const setTriggerRef = (el)=>{
|
|
163
169
|
setTriggerRefSignal(el);
|
|
164
170
|
};
|
|
171
|
+
const setPopoverRef = (el)=>{
|
|
172
|
+
setPopoverRefSignal(el);
|
|
173
|
+
};
|
|
165
174
|
const setRootRef = (el)=>{
|
|
166
175
|
setRootRefSignal(el);
|
|
167
176
|
if ("function" == typeof local.ref) local.ref(el);
|
|
@@ -185,9 +194,10 @@ const SelectRoot = (props)=>{
|
|
|
185
194
|
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.onMount)(()=>{
|
|
186
195
|
const handlePointerDown = (event)=>{
|
|
187
196
|
if (!open()) return;
|
|
188
|
-
const
|
|
189
|
-
if (
|
|
190
|
-
if (
|
|
197
|
+
const target = event.target;
|
|
198
|
+
if (rootRef()?.contains(target)) return;
|
|
199
|
+
if (popoverRef()?.contains(target)) return;
|
|
200
|
+
if (triggerRef()?.contains(target)) return;
|
|
191
201
|
setOpen(false);
|
|
192
202
|
};
|
|
193
203
|
document.addEventListener("pointerdown", handlePointerDown);
|
|
@@ -205,6 +215,10 @@ const SelectRoot = (props)=>{
|
|
|
205
215
|
placeholder: ()=>local.placeholder ?? "Select an option",
|
|
206
216
|
triggerId,
|
|
207
217
|
listboxId,
|
|
218
|
+
placement,
|
|
219
|
+
autoFlip,
|
|
220
|
+
triggerRef,
|
|
221
|
+
popoverRef,
|
|
208
222
|
selectedKeys,
|
|
209
223
|
selectedText,
|
|
210
224
|
focusedKey,
|
|
@@ -219,6 +233,7 @@ const SelectRoot = (props)=>{
|
|
|
219
233
|
registerOption,
|
|
220
234
|
unregisterOption,
|
|
221
235
|
setTriggerRef,
|
|
236
|
+
setPopoverRef,
|
|
222
237
|
setRootRef
|
|
223
238
|
},
|
|
224
239
|
get children () {
|
|
@@ -497,24 +512,64 @@ const SelectPopover = (props)=>{
|
|
|
497
512
|
"children",
|
|
498
513
|
"class",
|
|
499
514
|
"className",
|
|
500
|
-
"dataTheme"
|
|
515
|
+
"dataTheme",
|
|
516
|
+
"style"
|
|
501
517
|
]);
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
(
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
+
const overlayPosition = (0, __WEBPACK_EXTERNAL_MODULE__shared_overlayPosition_js_ab299723__.createOverlayPosition)({
|
|
519
|
+
open: ()=>ctx?.open() ?? false,
|
|
520
|
+
triggerRef: ()=>ctx?.triggerRef(),
|
|
521
|
+
overlayRef: ()=>ctx?.popoverRef(),
|
|
522
|
+
placement: ()=>ctx?.placement() ?? "bottom",
|
|
523
|
+
offset: ()=>6,
|
|
524
|
+
autoFlip: ()=>ctx?.autoFlip() ?? true,
|
|
525
|
+
align: ()=>"start",
|
|
526
|
+
matchTriggerWidth: ()=>true,
|
|
527
|
+
minWidth: ()=>224
|
|
528
|
+
});
|
|
529
|
+
const popoverStyle = ()=>{
|
|
530
|
+
const overlayStyle = overlayPosition.style();
|
|
531
|
+
if ("string" == typeof local.style) return [
|
|
532
|
+
local.style,
|
|
533
|
+
Object.entries(overlayStyle).map(([key, value])=>`${key}: ${String(value)}`).join("; ")
|
|
534
|
+
].filter(Boolean).join("; ");
|
|
535
|
+
return {
|
|
536
|
+
...local.style ?? {},
|
|
537
|
+
...overlayStyle
|
|
538
|
+
};
|
|
539
|
+
};
|
|
540
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(__WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.Show, {
|
|
541
|
+
get when () {
|
|
542
|
+
return ctx?.open();
|
|
543
|
+
},
|
|
544
|
+
get children () {
|
|
545
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(__WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.Portal, {
|
|
546
|
+
get children () {
|
|
547
|
+
var _el$10 = _tmpl$();
|
|
548
|
+
var _ref$ = ctx?.setPopoverRef;
|
|
549
|
+
"function" == typeof _ref$ && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.use)(_ref$, _el$10);
|
|
550
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.spread)(_el$10, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)(others, ()=>({
|
|
551
|
+
class: (0, __WEBPACK_EXTERNAL_MODULE_tailwind_merge_e05e3e95__.twMerge)(__WEBPACK_EXTERNAL_MODULE__Select_classes_js_98857364__.CLASSES.slot.popover, local.class, local.className)
|
|
552
|
+
}), {
|
|
553
|
+
get ["data-theme"] () {
|
|
554
|
+
return local.dataTheme;
|
|
555
|
+
},
|
|
556
|
+
"data-slot": "ui-select-popover",
|
|
557
|
+
get ["data-open"] () {
|
|
558
|
+
return ctx?.open() ? "true" : "false";
|
|
559
|
+
},
|
|
560
|
+
get ["data-placement"] () {
|
|
561
|
+
return overlayPosition.placement();
|
|
562
|
+
},
|
|
563
|
+
get style () {
|
|
564
|
+
return popoverStyle();
|
|
565
|
+
}
|
|
566
|
+
}), false, true);
|
|
567
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$10, ()=>local.children);
|
|
568
|
+
return _el$10;
|
|
569
|
+
}
|
|
570
|
+
});
|
|
571
|
+
}
|
|
572
|
+
});
|
|
518
573
|
};
|
|
519
574
|
const SelectListbox = (props)=>{
|
|
520
575
|
const ctx = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.useContext)(SelectContext);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default } from "./Select";
|
|
2
|
-
export type { SelectProps, SelectRootProps, SelectValueType, SelectVariant, SelectSelectionMode, SelectTriggerProps, SelectValueProps, SelectIndicatorProps, SelectPopoverProps, SelectListboxProps, SelectOptionProps, } from "./Select";
|
|
2
|
+
export type { SelectProps, SelectRootProps, SelectPlacement, SelectValueType, SelectVariant, SelectSelectionMode, SelectTriggerProps, SelectValueProps, SelectIndicatorProps, SelectPopoverProps, SelectListboxProps, SelectOptionProps, } from "./Select";
|
|
@@ -149,6 +149,7 @@
|
|
|
149
149
|
-------------------------------------------------------------------------- */
|
|
150
150
|
.table__column {
|
|
151
151
|
position: relative;
|
|
152
|
+
overflow: hidden;
|
|
152
153
|
padding-inline: 1rem;
|
|
153
154
|
padding-block: 0.625rem;
|
|
154
155
|
text-align: left;
|
|
@@ -158,6 +159,11 @@
|
|
|
158
159
|
vertical-align: middle;
|
|
159
160
|
}
|
|
160
161
|
|
|
162
|
+
.table__column > * {
|
|
163
|
+
min-width: 0;
|
|
164
|
+
max-width: 100%;
|
|
165
|
+
}
|
|
166
|
+
|
|
161
167
|
@supports (color: color-mix(in lab, red, red)) {
|
|
162
168
|
.table__column {
|
|
163
169
|
color: color-mix(in oklab, var(--color-base-content) 60%, transparent);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const CLASSES: {
|
|
2
2
|
readonly base: "relative";
|
|
3
3
|
readonly iconActive: "text-primary";
|
|
4
|
-
readonly popover: "
|
|
4
|
+
readonly popover: "fixed z-50 rounded-lg bg-base-200/80 p-4 shadow-xl backdrop-blur-sm";
|
|
5
5
|
readonly popoverAlignStart: "left-0";
|
|
6
6
|
readonly popoverAlignEnd: "right-0";
|
|
7
7
|
readonly row: "flex items-center gap-3";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const CLASSES = {
|
|
2
2
|
base: "relative",
|
|
3
3
|
iconActive: "text-primary",
|
|
4
|
-
popover: "
|
|
4
|
+
popover: "fixed z-50 rounded-lg bg-base-200/80 p-4 shadow-xl backdrop-blur-sm",
|
|
5
5
|
popoverAlignStart: "left-0",
|
|
6
6
|
popoverAlignEnd: "right-0",
|
|
7
7
|
row: "flex items-center gap-3",
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { type Component, type JSX } from "solid-js";
|
|
2
2
|
import type { IComponentBaseProps } from "../types";
|
|
3
|
+
import { type OverlayPlacement } from "../_shared/overlayPosition";
|
|
3
4
|
export type ThemeColorPickerAlign = "start" | "end";
|
|
5
|
+
export type ThemeColorPickerPlacement = OverlayPlacement;
|
|
4
6
|
export interface ThemeColorPickerProps extends IComponentBaseProps {
|
|
5
7
|
/**
|
|
6
8
|
* Prefix for localStorage keys (e.g., "myapp" becomes "myapp_theme_color")
|
|
@@ -28,6 +30,16 @@ export interface ThemeColorPickerProps extends IComponentBaseProps {
|
|
|
28
30
|
* @default "end"
|
|
29
31
|
*/
|
|
30
32
|
align?: ThemeColorPickerAlign;
|
|
33
|
+
/**
|
|
34
|
+
* Preferred popover placement.
|
|
35
|
+
* @default "bottom"
|
|
36
|
+
*/
|
|
37
|
+
placement?: ThemeColorPickerPlacement;
|
|
38
|
+
/**
|
|
39
|
+
* Automatically flip the popover when there is insufficient viewport space.
|
|
40
|
+
* @default true
|
|
41
|
+
*/
|
|
42
|
+
autoFlip?: boolean;
|
|
31
43
|
/**
|
|
32
44
|
* Custom button content (defaults to palette icon)
|
|
33
45
|
*/
|