@pathscale/ui 1.1.45 → 1.1.46

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.
@@ -183,22 +183,10 @@
183
183
  }
184
184
 
185
185
  /* -------------------------------------------------------------------------------------------------
186
- * Dialog — semantic prop: bg (background variant)
186
+ * Dialog — semantic prop: bg (any CSS color via custom property)
187
187
  * -----------------------------------------------------------------------------------------------*/
188
- .drawer__dialog--bg-base {
189
- background-color: var(--color-base-100);
190
- }
191
-
192
- .drawer__dialog--bg-surface-1 {
193
- background-color: var(--nf-surface-1, var(--color-base-100));
194
- }
195
-
196
- .drawer__dialog--bg-surface-2 {
197
- background-color: var(--nf-surface-2, var(--color-base-200));
198
- }
199
-
200
- .drawer__dialog--bg-surface-3 {
201
- background-color: var(--nf-surface-3, var(--color-base-300));
188
+ .drawer__dialog--custom-bg {
189
+ background-color: var(--drawer-dialog-bg, var(--color-base-100));
202
190
  }
203
191
 
204
192
  /* Slide transitions — open state */
@@ -22,13 +22,12 @@ export type DrawerContentProps = Omit<JSX.HTMLAttributes<HTMLDivElement>, "child
22
22
  placement?: DrawerPlacement;
23
23
  };
24
24
  export type DrawerDialogSide = "left" | "right";
25
- export type DrawerDialogBg = "base" | "surface-1" | "surface-2" | "surface-3";
26
25
  export type DrawerDialogProps = Omit<JSX.HTMLAttributes<HTMLDivElement>, "children"> & IComponentBaseProps & {
27
26
  children: JSX.Element;
28
27
  side?: DrawerDialogSide;
29
28
  width?: string;
30
29
  maxWidth?: string;
31
- bg?: DrawerDialogBg;
30
+ bg?: string;
32
31
  padding?: string;
33
32
  };
34
33
  export type DrawerHeaderProps = Omit<JSX.HTMLAttributes<HTMLDivElement>, "children"> & IComponentBaseProps & {
@@ -228,12 +228,6 @@ const DrawerContent = (props)=>{
228
228
  }
229
229
  });
230
230
  };
231
- const BG_MAP = {
232
- base: "drawer__dialog--bg-base",
233
- "surface-1": "drawer__dialog--bg-surface-1",
234
- "surface-2": "drawer__dialog--bg-surface-2",
235
- "surface-3": "drawer__dialog--bg-surface-3"
236
- };
237
231
  const SIDE_MAP = {
238
232
  left: "drawer__dialog--side-left",
239
233
  right: "drawer__dialog--side-right"
@@ -257,18 +251,20 @@ const DrawerDialog = (props)=>{
257
251
  if ("object" == typeof local.style && local.style) Object.assign(s, local.style);
258
252
  if (local.width) s["--drawer-dialog-width"] = local.width;
259
253
  if (local.maxWidth) s["--drawer-dialog-max-width"] = local.maxWidth;
254
+ if (local.bg) s["--drawer-dialog-bg"] = local.bg;
260
255
  if (local.padding) s["--drawer-dialog-padding"] = local.padding;
261
256
  return s;
262
257
  };
263
258
  const hasCustomSize = ()=>Boolean(local.width || local.maxWidth);
264
259
  const hasCustomPadding = ()=>Boolean(local.padding);
260
+ const hasCustomBg = ()=>Boolean(local.bg);
265
261
  return (()=>{
266
262
  var _el$4 = _tmpl$2();
267
263
  spread(_el$4, mergeProps(others, {
268
264
  role: "dialog",
269
265
  "aria-modal": "true"
270
266
  }, ()=>({
271
- class: twMerge(CLASSES.slot.dialog, local.side ? SIDE_MAP[local.side] : void 0, local.bg ? BG_MAP[local.bg] : void 0, hasCustomSize() ? "drawer__dialog--custom-size" : void 0, hasCustomPadding() ? "drawer__dialog--custom-padding" : void 0, local.class, local.className)
267
+ class: twMerge(CLASSES.slot.dialog, local.side ? SIDE_MAP[local.side] : void 0, hasCustomBg() ? "drawer__dialog--custom-bg" : void 0, hasCustomSize() ? "drawer__dialog--custom-size" : void 0, hasCustomPadding() ? "drawer__dialog--custom-padding" : void 0, local.class, local.className)
272
268
  }), {
273
269
  "data-slot": "drawer-dialog",
274
270
  get ["data-placement"] () {
@@ -1 +1 @@
1
- export { default, DrawerRoot, DrawerTrigger, DrawerBackdrop, DrawerContent, DrawerDialog, DrawerHeader, DrawerHeading, DrawerBody, DrawerFooter, DrawerHandle, DrawerCloseTrigger, DrawerClose, type DrawerPlacement, type DrawerBackdropVariant, type DrawerDialogSide, type DrawerDialogBg, type DrawerRootProps, type DrawerTriggerProps, type DrawerBackdropProps, type DrawerContentProps, type DrawerDialogProps, type DrawerHeaderProps, type DrawerHeadingProps, type DrawerBodyProps, type DrawerFooterProps, type DrawerHandleProps, type DrawerCloseTriggerProps, type DrawerCloseProps, } from "./Drawer";
1
+ export { default, DrawerRoot, DrawerTrigger, DrawerBackdrop, DrawerContent, DrawerDialog, DrawerHeader, DrawerHeading, DrawerBody, DrawerFooter, DrawerHandle, DrawerCloseTrigger, DrawerClose, type DrawerPlacement, type DrawerBackdropVariant, type DrawerDialogSide, type DrawerRootProps, type DrawerTriggerProps, type DrawerBackdropProps, type DrawerContentProps, type DrawerDialogProps, type DrawerHeaderProps, type DrawerHeadingProps, type DrawerBodyProps, type DrawerFooterProps, type DrawerHandleProps, type DrawerCloseTriggerProps, type DrawerCloseProps, } from "./Drawer";
@@ -16,8 +16,7 @@ const Icon = (props)=>{
16
16
  ]);
17
17
  const width = local.width ?? 24;
18
18
  const height = local.height ?? 24;
19
- const name = local.name;
20
- const classes = createMemo(()=>twMerge(CLASSES.base, name, local.class, local.className));
19
+ const classes = createMemo(()=>twMerge(CLASSES.base, local.name, local.class, local.className));
21
20
  return (()=>{
22
21
  var _el$ = _tmpl$();
23
22
  spread(_el$, mergeProps(others, ()=>({
@@ -132,6 +132,10 @@
132
132
  pointer-events: none;
133
133
  }
134
134
 
135
+ .input__icon > :is(button, [role="button"], a, [tabindex]):not([tabindex="-1"]) {
136
+ pointer-events: auto;
137
+ }
138
+
135
139
  .input__icon > * {
136
140
  width: 1rem;
137
141
  height: 1rem;
@@ -14,6 +14,12 @@
14
14
  --switch-control-bg-pressed: var(--switch-control-bg-hover);
15
15
  --switch-control-bg-checked: var(--color-accent);
16
16
  --switch-control-bg-checked-hover: color-mix(in oklab, var(--switch-control-bg-checked), #000 8%);
17
+ --switch-control-border: color-mix(in oklab, var(--color-base-content) 24%, transparent);
18
+ --switch-control-border-checked: color-mix(
19
+ in oklab,
20
+ var(--switch-control-bg-checked) 74%,
21
+ var(--color-base-content)
22
+ );
17
23
  }
18
24
 
19
25
  .toggle__input {
@@ -37,9 +43,11 @@
37
43
  border-radius: 9999px;
38
44
  height: 1.25rem;
39
45
  width: 2.5rem;
46
+ border: 1px solid var(--switch-control-border);
40
47
  background-color: var(--switch-control-bg);
41
48
  transition:
42
49
  background-color 250ms ease,
50
+ border-color 250ms ease,
43
51
  box-shadow 150ms ease;
44
52
  }
45
53
 
@@ -109,6 +117,7 @@
109
117
 
110
118
  .toggle[data-selected="true"] .toggle__control {
111
119
  background-color: var(--switch-control-bg-checked);
120
+ border-color: var(--switch-control-border-checked);
112
121
  }
113
122
 
114
123
  .toggle[data-selected="true"] .toggle__thumb {
package/dist/index.d.ts CHANGED
@@ -45,7 +45,7 @@ export { default as DatePicker, type DatePickerProps, } from "./components/date-
45
45
  export { default as DateRangePicker, type DateRangePickerProps, type DateRangeValue, } from "./components/date-range-picker";
46
46
  export { default as RangeCalendar, type RangeCalendarProps, type RangeCalendarValue, } from "./components/range-calendar";
47
47
  export { default as Drawer, DrawerRoot, DrawerTrigger, DrawerBackdrop, DrawerContent, DrawerDialog, DrawerHeader, DrawerHeading, DrawerBody, DrawerFooter, DrawerHandle, DrawerCloseTrigger, DrawerClose, } from "./components/drawer";
48
- export type { DrawerPlacement, DrawerBackdropVariant, DrawerDialogSide, DrawerDialogBg, DrawerRootProps, DrawerTriggerProps, DrawerBackdropProps, DrawerContentProps, DrawerDialogProps, DrawerHeaderProps, DrawerHeadingProps, DrawerBodyProps, DrawerFooterProps, DrawerHandleProps, DrawerCloseTriggerProps, } from "./components/drawer";
48
+ export type { DrawerPlacement, DrawerBackdropVariant, DrawerDialogSide, DrawerRootProps, DrawerTriggerProps, DrawerBackdropProps, DrawerContentProps, DrawerDialogProps, DrawerHeaderProps, DrawerHeadingProps, DrawerBodyProps, DrawerFooterProps, DrawerHandleProps, DrawerCloseTriggerProps, } from "./components/drawer";
49
49
  export { default as Dropdown } from "./components/dropdown";
50
50
  export { default as Disclosure } from "./components/disclosure";
51
51
  export type { DisclosureProps, DisclosureRootProps, DisclosureHeadingProps, DisclosureTriggerProps, DisclosureContentProps, DisclosureBodyProps, DisclosureIndicatorProps, } from "./components/disclosure";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pathscale/ui",
3
- "version": "1.1.45",
3
+ "version": "1.1.46",
4
4
  "author": "pathscale",
5
5
  "repository": {
6
6
  "type": "git",