@bookers/ui 0.7.0 → 0.8.0

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/index.d.ts CHANGED
@@ -156,8 +156,12 @@ export declare type CalendarProps = DayPickerProps;
156
156
 
157
157
  export declare const Checkbox: React_2.ForwardRefExoticComponent<CheckboxProps & React_2.RefAttributes<HTMLInputElement>>;
158
158
 
159
- export declare interface CheckboxProps extends Omit<React_2.InputHTMLAttributes<HTMLInputElement>, "size" | "type">, VariantProps<typeof checkboxVariants> {
159
+ export declare interface CheckboxProps extends Omit<React_2.InputHTMLAttributes<HTMLInputElement>, "size" | "type" | "className">, VariantProps<typeof checkboxVariants> {
160
160
  isError?: boolean;
161
+ /** Layout and positioning on the root wrapper (e.g. `mt-1`, `self-start`). */
162
+ className?: string;
163
+ /** Visual overrides on the native checkbox input. */
164
+ inputClassName?: string;
161
165
  }
162
166
 
163
167
  export declare const checkboxVariants: (props?: ({
@@ -737,8 +741,12 @@ export declare const radioGroupVariants: (props?: ({
737
741
  orientation?: "horizontal" | "vertical" | null | undefined;
738
742
  } & ClassProp) | undefined) => string;
739
743
 
740
- export declare interface RadioProps extends Omit<React_2.InputHTMLAttributes<HTMLInputElement>, "size" | "type">, VariantProps<typeof radioVariants> {
744
+ export declare interface RadioProps extends Omit<React_2.InputHTMLAttributes<HTMLInputElement>, "size" | "type" | "className">, VariantProps<typeof radioVariants> {
741
745
  isError?: boolean;
746
+ /** Layout and positioning on the root wrapper (e.g. `mt-1`, `self-start`). */
747
+ className?: string;
748
+ /** Visual overrides on the native radio input. */
749
+ inputClassName?: string;
742
750
  }
743
751
 
744
752
  export declare const radioVariants: (props?: ({
@@ -814,8 +822,12 @@ export declare interface StringColumnFilterState {
814
822
 
815
823
  export declare const Switch: React_2.ForwardRefExoticComponent<SwitchProps & React_2.RefAttributes<HTMLInputElement>>;
816
824
 
817
- export declare interface SwitchProps extends Omit<React_2.InputHTMLAttributes<HTMLInputElement>, "size" | "type">, VariantProps<typeof switchTrackVariants> {
825
+ export declare interface SwitchProps extends Omit<React_2.InputHTMLAttributes<HTMLInputElement>, "size" | "type" | "className">, VariantProps<typeof switchTrackVariants> {
818
826
  isError?: boolean;
827
+ /** Layout and positioning on the root wrapper (e.g. `mt-1`, `self-start`). */
828
+ className?: string;
829
+ /** Classes on the native switch input overlay (hit area). */
830
+ inputClassName?: string;
819
831
  }
820
832
 
821
833
  export declare const switchTrackVariants: (props?: ({
package/dist/index.js CHANGED
@@ -3931,46 +3931,55 @@ const Sv = ye(
3931
3931
  md: "size-3",
3932
3932
  lg: "size-3.5"
3933
3933
  }, kv = u.forwardRef(
3934
- ({ className: e, size: t, isError: n, ...r }, o) => {
3935
- const a = Nv[t ?? "md"];
3936
- return /* @__PURE__ */ O("span", { className: "relative inline-flex shrink-0 items-center justify-center", children: [
3937
- /* @__PURE__ */ f(
3938
- "input",
3939
- {
3940
- type: "checkbox",
3941
- ref: o,
3942
- className: R(
3943
- Sv({ size: t }),
3944
- n && "border-destructive",
3945
- e
3934
+ ({ className: e, inputClassName: t, size: n, isError: r, ...o }, a) => {
3935
+ const s = Nv[n ?? "md"];
3936
+ return /* @__PURE__ */ O(
3937
+ "span",
3938
+ {
3939
+ className: R(
3940
+ "relative inline-flex shrink-0 items-center justify-center",
3941
+ e
3942
+ ),
3943
+ children: [
3944
+ /* @__PURE__ */ f(
3945
+ "input",
3946
+ {
3947
+ type: "checkbox",
3948
+ ref: a,
3949
+ className: R(
3950
+ Sv({ size: n }),
3951
+ r && "border-destructive",
3952
+ t
3953
+ ),
3954
+ "aria-invalid": r || void 0,
3955
+ ...o
3956
+ }
3946
3957
  ),
3947
- "aria-invalid": n || void 0,
3948
- ...r
3949
- }
3950
- ),
3951
- /* @__PURE__ */ f(
3952
- gn,
3953
- {
3954
- "aria-hidden": "true",
3955
- className: R(
3956
- "pointer-events-none absolute text-primary-foreground opacity-0 transition-opacity",
3957
- "peer-checked:opacity-100 peer-disabled:opacity-30",
3958
- a
3959
- )
3960
- }
3961
- ),
3962
- /* @__PURE__ */ f(
3963
- Tc,
3964
- {
3965
- "aria-hidden": "true",
3966
- className: R(
3967
- "pointer-events-none absolute text-primary-foreground opacity-0 transition-opacity",
3968
- "peer-indeterminate:opacity-100 peer-disabled:opacity-30",
3969
- a
3958
+ /* @__PURE__ */ f(
3959
+ gn,
3960
+ {
3961
+ "aria-hidden": "true",
3962
+ className: R(
3963
+ "pointer-events-none absolute text-primary-foreground opacity-0 transition-opacity",
3964
+ "peer-checked:opacity-100 peer-disabled:opacity-30",
3965
+ s
3966
+ )
3967
+ }
3968
+ ),
3969
+ /* @__PURE__ */ f(
3970
+ Tc,
3971
+ {
3972
+ "aria-hidden": "true",
3973
+ className: R(
3974
+ "pointer-events-none absolute text-primary-foreground opacity-0 transition-opacity",
3975
+ "peer-indeterminate:opacity-100 peer-disabled:opacity-30",
3976
+ s
3977
+ )
3978
+ }
3970
3979
  )
3971
- }
3972
- )
3973
- ] });
3980
+ ]
3981
+ }
3982
+ );
3974
3983
  }
3975
3984
  );
3976
3985
  kv.displayName = "Checkbox";
@@ -15109,26 +15118,35 @@ const lm = u.createContext({}), CN = ye(
15109
15118
  }
15110
15119
  }
15111
15120
  ), NN = u.forwardRef(
15112
- ({ className: e, size: t, isError: n, name: r, ...o }, a) => {
15113
- const s = u.use(lm);
15114
- return /* @__PURE__ */ O("span", { className: "relative inline-flex shrink-0 items-center justify-center", children: [
15115
- /* @__PURE__ */ f(
15116
- "input",
15117
- {
15118
- type: "radio",
15119
- ref: a,
15120
- name: r ?? s.name,
15121
- className: R(
15122
- CN({ size: t }),
15123
- n && "border-destructive",
15124
- e
15121
+ ({ className: e, inputClassName: t, size: n, isError: r, name: o, ...a }, s) => {
15122
+ const i = u.use(lm);
15123
+ return /* @__PURE__ */ O(
15124
+ "span",
15125
+ {
15126
+ className: R(
15127
+ "relative inline-flex shrink-0 items-center justify-center",
15128
+ e
15129
+ ),
15130
+ children: [
15131
+ /* @__PURE__ */ f(
15132
+ "input",
15133
+ {
15134
+ type: "radio",
15135
+ ref: s,
15136
+ name: o ?? i.name,
15137
+ className: R(
15138
+ CN({ size: n }),
15139
+ r && "border-destructive",
15140
+ t
15141
+ ),
15142
+ "aria-invalid": r || void 0,
15143
+ ...a
15144
+ }
15125
15145
  ),
15126
- "aria-invalid": n || void 0,
15127
- ...o
15128
- }
15129
- ),
15130
- /* @__PURE__ */ f("span", { "aria-hidden": "true", className: SN({ size: t }) })
15131
- ] });
15146
+ /* @__PURE__ */ f("span", { "aria-hidden": "true", className: SN({ size: n }) })
15147
+ ]
15148
+ }
15149
+ );
15132
15150
  }
15133
15151
  );
15134
15152
  NN.displayName = "Radio";
@@ -15210,35 +15228,44 @@ const DN = ye(
15210
15228
  }
15211
15229
  }
15212
15230
  ), TN = u.forwardRef(
15213
- ({ className: e, size: t, isError: n, ...r }, o) => /* @__PURE__ */ O("span", { className: "relative inline-flex shrink-0 items-center", children: [
15214
- /* @__PURE__ */ f(
15215
- "input",
15216
- {
15217
- type: "checkbox",
15218
- role: "switch",
15219
- ref: o,
15220
- className: R(
15221
- "peer absolute inset-0 z-10 cursor-pointer opacity-0",
15222
- "disabled:cursor-not-allowed",
15223
- e
15231
+ ({ className: e, inputClassName: t, size: n, isError: r, ...o }, a) => /* @__PURE__ */ O(
15232
+ "span",
15233
+ {
15234
+ className: R(
15235
+ "relative inline-flex shrink-0 items-center",
15236
+ e
15237
+ ),
15238
+ children: [
15239
+ /* @__PURE__ */ f(
15240
+ "input",
15241
+ {
15242
+ type: "checkbox",
15243
+ role: "switch",
15244
+ ref: a,
15245
+ className: R(
15246
+ "peer absolute inset-0 z-10 cursor-pointer opacity-0",
15247
+ "disabled:cursor-not-allowed",
15248
+ t
15249
+ ),
15250
+ "aria-invalid": r || void 0,
15251
+ ...o
15252
+ }
15224
15253
  ),
15225
- "aria-invalid": n || void 0,
15226
- ...r
15227
- }
15228
- ),
15229
- /* @__PURE__ */ f(
15230
- "span",
15231
- {
15232
- "aria-hidden": "true",
15233
- className: R(
15234
- DN({ size: t }),
15235
- n && "ring-2 ring-destructive ring-offset-2 ring-offset-background",
15236
- n && "peer-focus-visible:ring-destructive"
15237
- )
15238
- }
15239
- ),
15240
- /* @__PURE__ */ f("span", { "aria-hidden": "true", className: RN({ size: t }) })
15241
- ] })
15254
+ /* @__PURE__ */ f(
15255
+ "span",
15256
+ {
15257
+ "aria-hidden": "true",
15258
+ className: R(
15259
+ DN({ size: n }),
15260
+ r && "ring-2 ring-destructive ring-offset-2 ring-offset-background",
15261
+ r && "peer-focus-visible:ring-destructive"
15262
+ )
15263
+ }
15264
+ ),
15265
+ /* @__PURE__ */ f("span", { "aria-hidden": "true", className: RN({ size: n }) })
15266
+ ]
15267
+ }
15268
+ )
15242
15269
  );
15243
15270
  TN.displayName = "Switch";
15244
15271
  var Jo = "Tabs", [PN] = rt(Jo, [