@spark-ui/components 10.17.13 → 10.18.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.
@@ -1,230 +1,164 @@
1
- import {
2
- Input,
3
- InputGroup
4
- } from "../chunk-QAUHPTZ2.mjs";
5
- import {
6
- IconButton
7
- } from "../chunk-XYK6V3JF.mjs";
8
1
  import {
9
2
  Icon
10
3
  } from "../chunk-UMUMFMFB.mjs";
11
- import "../chunk-HEKSVWYW.mjs";
12
- import "../chunk-GAK4SC2F.mjs";
13
4
  import "../chunk-KEGAAGJW.mjs";
14
- import "../chunk-6QCEPQ3U.mjs";
15
-
16
- // src/stepper/Stepper.tsx
17
- import { useFormFieldControl } from "@spark-ui/components/form-field";
18
- import { createContext, useContext, useRef } from "react";
5
+ import {
6
+ Slot
7
+ } from "../chunk-6QCEPQ3U.mjs";
19
8
 
20
- // src/stepper/useStepper.ts
21
- import { useNumberField } from "@react-aria/numberfield";
22
- import { useNumberFieldState } from "@react-stately/numberfield";
23
- var useStepper = ({
24
- inputRef,
25
- locale = "fr",
26
- ...rest
27
- }) => {
28
- const state = useNumberFieldState({
29
- ...rest,
30
- isDisabled: rest.disabled,
31
- isReadOnly: rest.readOnly,
32
- isRequired: rest.required,
33
- locale
34
- });
35
- const { groupProps, inputProps, incrementButtonProps, decrementButtonProps } = useNumberField(
36
- {
37
- isWheelDisabled: false,
38
- ...rest,
39
- isDisabled: rest.disabled,
40
- isReadOnly: rest.readOnly,
41
- isRequired: rest.required
42
- },
43
- state,
44
- inputRef
45
- );
46
- return {
47
- groupProps,
48
- inputProps,
49
- incrementButtonProps,
50
- decrementButtonProps
51
- };
52
- };
9
+ // src/stepper/Buttons.tsx
10
+ import { NumberField } from "@base-ui-components/react/number-field";
11
+ import { Minus } from "@spark-ui/icons/Minus";
12
+ import { Plus } from "@spark-ui/icons/Plus";
13
+ import { cva } from "class-variance-authority";
53
14
 
54
- // src/stepper/Stepper.tsx
15
+ // src/stepper/useRenderSlot.tsx
55
16
  import { jsx } from "react/jsx-runtime";
56
- var StepperContext = createContext(null);
57
- var Stepper = ({
58
- children,
59
- formatOptions,
60
- minValue,
61
- maxValue,
62
- ref: forwardedRef,
63
- ...stepperProps
64
- }) => {
65
- const inputRef = useRef(null);
66
- const {
67
- groupProps,
68
- inputProps: _inputProps,
69
- incrementButtonProps: _incrementButtonProps,
70
- decrementButtonProps: _decrementButtonProps
71
- } = useStepper({
72
- ...{
73
- ...stepperProps,
74
- /**
75
- * To enable the possibility to init the stepper with empty (undefined) value,
76
- * we need to force the empty value to NaN.
77
- * Cf. https://github.com/adobe/react-spectrum/issues/5524
78
- */
79
- ..."value" in stepperProps && { value: stepperProps.value ?? NaN },
80
- onChange: stepperProps.onValueChange
81
- },
82
- formatOptions,
83
- minValue,
84
- maxValue,
85
- inputRef
86
- });
87
- const formFieldControlProps = useFormFieldControl();
88
- const isWrappedInFormField = !!formFieldControlProps.id;
89
- const incrementButtonProps = {
90
- ..._incrementButtonProps,
91
- ...isWrappedInFormField && { "aria-controls": formFieldControlProps.id }
92
- };
93
- const decrementButtonProps = {
94
- ..._decrementButtonProps,
95
- ...isWrappedInFormField && { "aria-controls": formFieldControlProps.id }
96
- };
97
- const inputProps = {
98
- ..._inputProps,
99
- ...isWrappedInFormField && {
100
- id: formFieldControlProps.id,
101
- required: formFieldControlProps.isRequired,
102
- "aria-invalid": formFieldControlProps.isInvalid ? true : void 0
17
+ function useRenderSlot(asChild, defaultTag) {
18
+ const Component = asChild ? Slot : defaultTag;
19
+ return asChild ? ({ ...props }) => /* @__PURE__ */ jsx(Component, { ...props }) : void 0;
20
+ }
21
+
22
+ // src/stepper/Buttons.tsx
23
+ import { jsx as jsx2 } from "react/jsx-runtime";
24
+ var styles = cva(
25
+ [
26
+ // Base styles
27
+ "border-outline border-sm min-w-sz-44 text-on-surface flex cursor-pointer items-center justify-center bg-clip-padding select-none",
28
+ "hover:bg-neutral/dim-5",
29
+ // Disabled and ReadOnly styles
30
+ "disabled:bg-on-surface/dim-5 disabled:text-on-surface/dim-3 disabled:cursor-not-allowed",
31
+ "data-[disabled]:bg-on-surface/dim-5 data-[disabled]:text-on-surface/dim-3 data-[disabled]:cursor-not-allowed",
32
+ "data-[readonly]:bg-on-surface/dim-5 data-[readonly]:text-on-surface/dim-3 data-[readonly]:cursor-not-allowed",
33
+ // State styles
34
+ "group-data-[field-state=error]:border-error",
35
+ "group-data-[field-state=alert]:border-alert",
36
+ "group-data-[field-state=success]:border-success"
37
+ ],
38
+ {
39
+ variants: {
40
+ placement: {
41
+ left: "rounded-l-lg",
42
+ right: "rounded-r-lg"
43
+ }
103
44
  }
104
- };
105
- const { onValueChange: _, ...remainingStepperProps } = stepperProps;
106
- return /* @__PURE__ */ jsx(
107
- StepperContext.Provider,
45
+ }
46
+ );
47
+ var Decrement = ({ children, className, asChild = false, ...props }) => {
48
+ const render = useRenderSlot(asChild, "div");
49
+ return /* @__PURE__ */ jsx2(
50
+ NumberField.Decrement,
108
51
  {
109
- value: { incrementButtonProps, decrementButtonProps, inputProps, inputRef },
110
- children: /* @__PURE__ */ jsx(
111
- InputGroup,
112
- {
113
- ...remainingStepperProps,
114
- ...groupProps,
115
- "data-spark-component": "stepper",
116
- ref: forwardedRef,
117
- children
118
- }
119
- )
52
+ "data-spark-component": "stepper-decrement-button",
53
+ className: styles({
54
+ placement: "left",
55
+ className
56
+ }),
57
+ render,
58
+ ...props,
59
+ children: children || /* @__PURE__ */ jsx2(Icon, { children: /* @__PURE__ */ jsx2(Minus, {}) })
120
60
  }
121
61
  );
122
62
  };
123
- Stepper.displayName = "Stepper";
124
- var useStepperContext = () => {
125
- const context = useContext(StepperContext);
126
- if (!context) {
127
- throw Error("useStepperContext must be used within a Stepper provider");
128
- }
129
- return context;
130
- };
131
-
132
- // src/stepper/StepperButton.tsx
133
- import { useButton } from "@react-aria/button";
134
- import { Minus } from "@spark-ui/icons/Minus";
135
- import { Plus } from "@spark-ui/icons/Plus";
136
- import { useRef as useRef2 } from "react";
137
- import { jsx as jsx2 } from "react/jsx-runtime";
138
- var IncrementButton = ({
139
- children,
140
- design = "ghost",
141
- intent = "neutral",
142
- className,
143
- ref: forwardedRef,
144
- ...rest
145
- }) => {
146
- const innerRef = useRef2(null);
147
- const ref = forwardedRef && typeof forwardedRef !== "function" ? forwardedRef : innerRef;
148
- const { incrementButtonProps } = useStepperContext();
149
- const { buttonProps } = useButton({ ...incrementButtonProps, ...rest }, ref);
150
- return /* @__PURE__ */ jsx2(InputGroup.TrailingAddon, { asChild: true, "data-spark-component": "stepper-increment-button", children: /* @__PURE__ */ jsx2(
151
- IconButton,
63
+ var Increment = ({ children, className, asChild = false, ...props }) => {
64
+ const render = useRenderSlot(asChild, "div");
65
+ return /* @__PURE__ */ jsx2(
66
+ NumberField.Increment,
152
67
  {
153
- ref,
154
- design,
155
- intent,
156
- className,
157
- "aria-label": buttonProps["aria-label"],
158
- ...buttonProps,
159
- disabled: rest.disabled || buttonProps.disabled,
68
+ "data-spark-component": "stepper-increment-button",
69
+ className: styles({
70
+ placement: "right",
71
+ className
72
+ }),
73
+ render,
74
+ ...props,
160
75
  children: children || /* @__PURE__ */ jsx2(Icon, { children: /* @__PURE__ */ jsx2(Plus, {}) })
161
76
  }
162
- ) });
77
+ );
163
78
  };
164
- var DecrementButton = ({
165
- children,
166
- design = "ghost",
167
- intent = "neutral",
168
- className,
169
- ref: forwardedRef,
170
- ...rest
171
- }) => {
172
- const innerRef = useRef2(null);
173
- const ref = forwardedRef && typeof forwardedRef !== "function" ? forwardedRef : innerRef;
174
- const { decrementButtonProps } = useStepperContext();
175
- const { buttonProps } = useButton({ ...decrementButtonProps, ...rest }, ref);
176
- return /* @__PURE__ */ jsx2(InputGroup.LeadingAddon, { asChild: true, "data-spark-component": "stepper-decrement-button", children: /* @__PURE__ */ jsx2(
177
- IconButton,
79
+ Decrement.displayName = "Stepper.DecrementButton";
80
+ Increment.displayName = "Stepper.IncrementButton";
81
+
82
+ // src/stepper/Input.tsx
83
+ import { NumberField as NumberField2 } from "@base-ui-components/react/number-field";
84
+ import { useFormFieldControl } from "@spark-ui/components/form-field";
85
+ import { cx } from "class-variance-authority";
86
+ import { jsx as jsx3 } from "react/jsx-runtime";
87
+ var Input = ({ className, ...props }) => {
88
+ const field = useFormFieldControl();
89
+ return /* @__PURE__ */ jsx3(
90
+ NumberField2.Input,
178
91
  {
179
- ref,
180
- design,
181
- intent,
182
- className,
183
- "aria-label": buttonProps["aria-label"],
184
- ...buttonProps,
185
- disabled: rest.disabled || buttonProps.disabled,
186
- children: children || /* @__PURE__ */ jsx2(Icon, { children: /* @__PURE__ */ jsx2(Minus, {}) })
92
+ "data-spark-component": "stepper-input",
93
+ className: cx(
94
+ // Base styles
95
+ "bg-surface text-on-surface h-sz-44 border-y-sm border-outline text-center",
96
+ // State styles
97
+ "group-data-[field-state=error]:border-error",
98
+ "group-data-[field-state=alert]:border-alert",
99
+ "group-data-[field-state=success]:border-success",
100
+ "",
101
+ // Disabled and ReadOnly styles
102
+ "data-[disabled]:bg-on-surface/dim-5 data-[disabled]:text-on-surface/dim-3 data-[disabled]:cursor-not-allowed",
103
+ "data-[readonly]:bg-on-surface/dim-5",
104
+ // Focus styles
105
+ "focus:outline-outline-high focus:z-raised focus:outline-2 focus:-outline-offset-1",
106
+ className
107
+ ),
108
+ ...field.description && { "aria-describedby": field.description },
109
+ ...field.isRequired && { required: true },
110
+ ...field.state === "error" && { "aria-invalid": true },
111
+ ...props
187
112
  }
188
- ) });
113
+ );
189
114
  };
190
- var StepperIncrementButton = Object.assign(IncrementButton, {
191
- id: "TrailingAddon"
192
- });
193
- var StepperDecrementButton = Object.assign(DecrementButton, {
194
- id: "LeadingAddon"
195
- });
196
- IncrementButton.displayName = "Stepper.DecrementButton";
197
- DecrementButton.displayName = "Stepper.DecrementButton";
115
+ Input.displayName = "Stepper.InputButton";
198
116
 
199
- // src/stepper/StepperInput.tsx
200
- import { useMergeRefs } from "@spark-ui/hooks/use-merge-refs";
201
- import { jsx as jsx3 } from "react/jsx-runtime";
202
- var Input2 = ({ ref: forwardedRef, ...props }) => {
203
- const { inputRef, inputProps } = useStepperContext();
204
- const ref = useMergeRefs(forwardedRef, inputRef);
205
- const { className = "", ...remainingProps } = props;
206
- return /* @__PURE__ */ jsx3(
207
- Input,
117
+ // src/stepper/Root.tsx
118
+ import { NumberField as NumberField3 } from "@base-ui-components/react/number-field";
119
+ import { useFormFieldControl as useFormFieldControl2 } from "@spark-ui/components/form-field";
120
+ import { cx as cx2 } from "class-variance-authority";
121
+ import { jsx as jsx4 } from "react/jsx-runtime";
122
+ var Root = ({
123
+ children,
124
+ allowWheelScrub = true,
125
+ state: stateProp,
126
+ minValue,
127
+ maxValue,
128
+ formatOptions,
129
+ step: stepProp,
130
+ className,
131
+ ...props
132
+ }) => {
133
+ const render = useRenderSlot(true, "div");
134
+ const field = useFormFieldControl2();
135
+ const state = field.state ?? stateProp;
136
+ const step = stepProp == null && formatOptions?.style === "percent" ? 0.01 : stepProp;
137
+ return /* @__PURE__ */ jsx4(
138
+ NumberField3.Root,
208
139
  {
209
- ref,
210
- ...remainingProps,
211
- ...inputProps,
212
- className: `min-w-sz-56 text-center ${className}`
140
+ "data-spark-component": "stepper",
141
+ allowWheelScrub,
142
+ render,
143
+ min: minValue,
144
+ max: maxValue,
145
+ format: formatOptions,
146
+ step,
147
+ ...field.id && { id: field.id },
148
+ ...props,
149
+ children: /* @__PURE__ */ jsx4(NumberField3.Group, { className: cx2("group flex", className), "data-field-state": state, children })
213
150
  }
214
151
  );
215
152
  };
216
- var StepperInput = Object.assign(Input2, {
217
- id: "Input"
218
- });
219
- Input2.displayName = "Stepper.Input";
153
+ Root.displayName = "Stepper";
220
154
 
221
155
  // src/stepper/index.ts
222
- var Stepper2 = Object.assign(Stepper, { IncrementButton: StepperIncrementButton, DecrementButton: StepperDecrementButton, Input: StepperInput });
223
- Stepper2.displayName = "Stepper";
224
- StepperIncrementButton.displayName = "Stepper.IncrementButton";
225
- StepperDecrementButton.displayName = "Stepper.DecrementButton";
226
- StepperInput.displayName = "Stepper.Input";
156
+ var Stepper = Object.assign(Root, { IncrementButton: Increment, DecrementButton: Decrement, Input });
157
+ Stepper.displayName = "Stepper";
158
+ Increment.displayName = "Stepper.IncrementButton";
159
+ Decrement.displayName = "Stepper.DecrementButton";
160
+ Input.displayName = "Stepper.Input";
227
161
  export {
228
- Stepper2 as Stepper
162
+ Stepper
229
163
  };
230
164
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/stepper/Stepper.tsx","../../src/stepper/useStepper.ts","../../src/stepper/StepperButton.tsx","../../src/stepper/StepperInput.tsx","../../src/stepper/index.ts"],"sourcesContent":["import { useFormFieldControl } from '@spark-ui/components/form-field'\nimport { createContext, type PropsWithChildren, RefObject, useContext, useRef } from 'react'\n\nimport { InputGroup } from '../input'\nimport type { StepperProps, UseStepperReturn } from './types'\nimport { useStepper } from './useStepper'\n\nconst StepperContext = createContext<\n (Omit<UseStepperReturn, 'groupProps'> & { inputRef: RefObject<HTMLInputElement | null> }) | null\n>(null)\n\nexport const Stepper = ({\n children,\n formatOptions,\n minValue,\n maxValue,\n ref: forwardedRef,\n ...stepperProps\n}: PropsWithChildren<StepperProps>) => {\n const inputRef = useRef<HTMLInputElement>(null)\n\n const {\n groupProps,\n inputProps: _inputProps,\n incrementButtonProps: _incrementButtonProps,\n decrementButtonProps: _decrementButtonProps,\n } = useStepper({\n ...{\n ...stepperProps,\n /**\n * To enable the possibility to init the stepper with empty (undefined) value,\n * we need to force the empty value to NaN.\n * Cf. https://github.com/adobe/react-spectrum/issues/5524\n */\n ...('value' in stepperProps && { value: stepperProps.value ?? NaN }),\n onChange: stepperProps.onValueChange,\n },\n formatOptions,\n minValue,\n maxValue,\n inputRef,\n })\n\n const formFieldControlProps = useFormFieldControl()\n const isWrappedInFormField = !!formFieldControlProps.id\n\n const incrementButtonProps = {\n ..._incrementButtonProps,\n ...(isWrappedInFormField && { 'aria-controls': formFieldControlProps.id }),\n }\n\n const decrementButtonProps = {\n ..._decrementButtonProps,\n ...(isWrappedInFormField && { 'aria-controls': formFieldControlProps.id }),\n }\n\n const inputProps = {\n ..._inputProps,\n ...(isWrappedInFormField && {\n id: formFieldControlProps.id,\n required: formFieldControlProps.isRequired,\n 'aria-invalid': formFieldControlProps.isInvalid ? true : undefined,\n }),\n }\n\n const { onValueChange: _, ...remainingStepperProps } = stepperProps\n\n return (\n <StepperContext.Provider\n value={{ incrementButtonProps, decrementButtonProps, inputProps, inputRef }}\n >\n <InputGroup\n {...remainingStepperProps}\n {...groupProps}\n data-spark-component=\"stepper\"\n ref={forwardedRef}\n >\n {children}\n </InputGroup>\n </StepperContext.Provider>\n )\n}\n\nStepper.displayName = 'Stepper'\n\nexport const useStepperContext = () => {\n const context = useContext(StepperContext)\n\n if (!context) {\n throw Error('useStepperContext must be used within a Stepper provider')\n }\n\n return context\n}\n","import { useNumberField } from '@react-aria/numberfield'\nimport { useNumberFieldState } from '@react-stately/numberfield'\n\nimport type { UseStepperArgs, UseStepperReturn } from './types'\n\nexport const useStepper = ({\n inputRef,\n locale = 'fr',\n ...rest\n}: UseStepperArgs): UseStepperReturn => {\n const state = useNumberFieldState({\n ...rest,\n isDisabled: rest.disabled,\n isReadOnly: rest.readOnly,\n isRequired: rest.required,\n locale,\n })\n\n const { groupProps, inputProps, incrementButtonProps, decrementButtonProps } = useNumberField(\n {\n isWheelDisabled: false,\n ...rest,\n isDisabled: rest.disabled,\n isReadOnly: rest.readOnly,\n isRequired: rest.required,\n },\n state,\n inputRef\n )\n\n return {\n groupProps,\n inputProps,\n incrementButtonProps,\n decrementButtonProps,\n }\n}\n","import { useButton } from '@react-aria/button'\nimport { Minus } from '@spark-ui/icons/Minus'\nimport { Plus } from '@spark-ui/icons/Plus'\nimport { type PropsWithChildren, useRef } from 'react'\n\nimport { Icon } from '../icon'\nimport { IconButton } from '../icon-button'\nimport { InputGroup } from '../input'\nimport { useStepperContext } from './Stepper'\nimport type { StepperButtonProps } from './types'\n\nconst IncrementButton = ({\n children,\n design = 'ghost',\n intent = 'neutral',\n className,\n ref: forwardedRef,\n ...rest\n}: PropsWithChildren<StepperButtonProps>) => {\n const innerRef = useRef<HTMLButtonElement>(null)\n const ref = forwardedRef && typeof forwardedRef !== 'function' ? forwardedRef : innerRef\n\n const { incrementButtonProps } = useStepperContext()\n const { buttonProps } = useButton({ ...incrementButtonProps, ...rest }, ref)\n\n return (\n <InputGroup.TrailingAddon asChild data-spark-component=\"stepper-increment-button\">\n <IconButton\n ref={ref}\n design={design}\n intent={intent}\n className={className}\n aria-label={buttonProps['aria-label'] as string}\n {...buttonProps}\n disabled={rest.disabled || buttonProps.disabled}\n >\n {children || (\n <Icon>\n <Plus />\n </Icon>\n )}\n </IconButton>\n </InputGroup.TrailingAddon>\n )\n}\n\nconst DecrementButton = ({\n children,\n design = 'ghost',\n intent = 'neutral',\n className,\n ref: forwardedRef,\n ...rest\n}: PropsWithChildren<StepperButtonProps>) => {\n const innerRef = useRef<HTMLButtonElement>(null)\n const ref = forwardedRef && typeof forwardedRef !== 'function' ? forwardedRef : innerRef\n\n const { decrementButtonProps } = useStepperContext()\n const { buttonProps } = useButton({ ...decrementButtonProps, ...rest }, ref)\n\n return (\n <InputGroup.LeadingAddon asChild data-spark-component=\"stepper-decrement-button\">\n <IconButton\n ref={ref}\n design={design}\n intent={intent}\n className={className}\n aria-label={buttonProps['aria-label'] as string}\n {...buttonProps}\n disabled={rest.disabled || buttonProps.disabled}\n >\n {children || (\n <Icon>\n <Minus />\n </Icon>\n )}\n </IconButton>\n </InputGroup.LeadingAddon>\n )\n}\n\nexport const StepperIncrementButton = Object.assign(IncrementButton, {\n id: 'TrailingAddon',\n})\n\nexport const StepperDecrementButton = Object.assign(DecrementButton, {\n id: 'LeadingAddon',\n})\n\nIncrementButton.displayName = 'Stepper.DecrementButton'\nDecrementButton.displayName = 'Stepper.DecrementButton'\n","import { useMergeRefs } from '@spark-ui/hooks/use-merge-refs'\n\nimport { Input as SparkInput } from '../input'\nimport { useStepperContext } from './Stepper'\nimport type { StepperInputProps } from './types'\n\nconst Input = ({ ref: forwardedRef, ...props }: StepperInputProps) => {\n const { inputRef, inputProps } = useStepperContext()\n const ref = useMergeRefs(forwardedRef, inputRef)\n const { className = '', ...remainingProps } = props\n\n return (\n <SparkInput\n ref={ref}\n {...remainingProps}\n {...inputProps}\n className={`min-w-sz-56 text-center ${className}`}\n />\n )\n}\n\nexport const StepperInput = Object.assign(Input, {\n id: 'Input',\n})\n\nInput.displayName = 'Stepper.Input'\n","import { Stepper as Root } from './Stepper'\nimport {\n StepperDecrementButton as DecrementButton,\n StepperIncrementButton as IncrementButton,\n} from './StepperButton'\nimport { StepperInput as Input } from './StepperInput'\n\nexport const Stepper: typeof Root & {\n IncrementButton: typeof IncrementButton\n DecrementButton: typeof DecrementButton\n Input: typeof Input\n} = Object.assign(Root, { IncrementButton, DecrementButton, Input })\n\nStepper.displayName = 'Stepper'\nIncrementButton.displayName = 'Stepper.IncrementButton'\nDecrementButton.displayName = 'Stepper.DecrementButton'\nInput.displayName = 'Stepper.Input'\n\nexport type { StepperProps, StepperButtonProps, StepperInputProps } from './types'\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,SAAS,2BAA2B;AACpC,SAAS,eAAkD,YAAY,cAAc;;;ACDrF,SAAS,sBAAsB;AAC/B,SAAS,2BAA2B;AAI7B,IAAM,aAAa,CAAC;AAAA,EACzB;AAAA,EACA,SAAS;AAAA,EACT,GAAG;AACL,MAAwC;AACtC,QAAM,QAAQ,oBAAoB;AAAA,IAChC,GAAG;AAAA,IACH,YAAY,KAAK;AAAA,IACjB,YAAY,KAAK;AAAA,IACjB,YAAY,KAAK;AAAA,IACjB;AAAA,EACF,CAAC;AAED,QAAM,EAAE,YAAY,YAAY,sBAAsB,qBAAqB,IAAI;AAAA,IAC7E;AAAA,MACE,iBAAiB;AAAA,MACjB,GAAG;AAAA,MACH,YAAY,KAAK;AAAA,MACjB,YAAY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AO,OAAO,SAAM,EAAE,yCAAiB,yCAAiB,oBAAM,CAAC;AAEnEA,SAAQ,cAAc;AACtB,uBAAgB,cAAc;AAC9B,uBAAgB,cAAc;AAC9B,aAAM,cAAc;","names":["useRef","jsx","useRef","jsx","Input","Stepper"]}
1
+ {"version":3,"sources":["../../src/stepper/Buttons.tsx","../../src/stepper/useRenderSlot.tsx","../../src/stepper/Input.tsx","../../src/stepper/Root.tsx","../../src/stepper/index.ts"],"sourcesContent":["import { NumberField } from '@base-ui-components/react/number-field'\nimport { Minus } from '@spark-ui/icons/Minus'\nimport { Plus } from '@spark-ui/icons/Plus'\nimport { cva } from 'class-variance-authority'\nimport { ComponentProps, ReactNode } from 'react'\n\nimport { Icon } from '../icon'\nimport { useRenderSlot } from './useRenderSlot'\n\nconst styles = cva(\n [\n // Base styles\n 'border-outline border-sm min-w-sz-44 text-on-surface flex cursor-pointer items-center justify-center bg-clip-padding select-none',\n 'hover:bg-neutral/dim-5',\n // Disabled and ReadOnly styles\n 'disabled:bg-on-surface/dim-5 disabled:text-on-surface/dim-3 disabled:cursor-not-allowed',\n 'data-[disabled]:bg-on-surface/dim-5 data-[disabled]:text-on-surface/dim-3 data-[disabled]:cursor-not-allowed',\n 'data-[readonly]:bg-on-surface/dim-5 data-[readonly]:text-on-surface/dim-3 data-[readonly]:cursor-not-allowed',\n // State styles\n 'group-data-[field-state=error]:border-error',\n 'group-data-[field-state=alert]:border-alert',\n 'group-data-[field-state=success]:border-success',\n ],\n {\n variants: {\n placement: {\n left: 'rounded-l-lg',\n right: 'rounded-r-lg',\n },\n },\n }\n)\n\ninterface DecrementProps extends Omit<ComponentProps<typeof NumberField.Decrement>, 'render'> {\n children?: ReactNode\n asChild?: boolean\n}\n\ninterface IncrementProps extends Omit<ComponentProps<typeof NumberField.Increment>, 'render'> {\n children?: ReactNode\n asChild?: boolean\n}\n\nexport const Decrement = ({ children, className, asChild = false, ...props }: DecrementProps) => {\n const render = useRenderSlot(asChild, 'div')\n\n return (\n <NumberField.Decrement\n data-spark-component=\"stepper-decrement-button\"\n className={styles({\n placement: 'left',\n className,\n })}\n render={render}\n {...props}\n >\n {children || (\n <Icon>\n <Minus />\n </Icon>\n )}\n </NumberField.Decrement>\n )\n}\n\nexport const Increment = ({ children, className, asChild = false, ...props }: IncrementProps) => {\n const render = useRenderSlot(asChild, 'div')\n\n return (\n <NumberField.Increment\n data-spark-component=\"stepper-increment-button\"\n className={styles({\n placement: 'right',\n className,\n })}\n render={render}\n {...props}\n >\n {children || (\n <Icon>\n <Plus />\n </Icon>\n )}\n </NumberField.Increment>\n )\n}\n\nDecrement.displayName = 'Stepper.DecrementButton'\nIncrement.displayName = 'Stepper.IncrementButton'\n","import { Slot } from '../slot'\n\nexport function useRenderSlot(asChild: boolean, defaultTag: string) {\n const Component = asChild ? Slot : defaultTag\n\n return asChild ? ({ ...props }) => <Component {...props} /> : undefined\n}\n","import { NumberField } from '@base-ui-components/react/number-field'\nimport { useFormFieldControl } from '@spark-ui/components/form-field'\nimport { cx } from 'class-variance-authority'\nimport { ComponentProps, ReactNode } from 'react'\n\ninterface Props extends Omit<ComponentProps<typeof NumberField.Input>, 'render'> {\n children?: ReactNode\n}\n\nexport const Input = ({ className, ...props }: Props) => {\n const field = useFormFieldControl()\n\n return (\n <NumberField.Input\n data-spark-component=\"stepper-input\"\n className={cx(\n // Base styles\n 'bg-surface text-on-surface h-sz-44 border-y-sm border-outline text-center',\n // State styles\n 'group-data-[field-state=error]:border-error',\n 'group-data-[field-state=alert]:border-alert',\n 'group-data-[field-state=success]:border-success',\n '',\n // Disabled and ReadOnly styles\n 'data-[disabled]:bg-on-surface/dim-5 data-[disabled]:text-on-surface/dim-3 data-[disabled]:cursor-not-allowed',\n 'data-[readonly]:bg-on-surface/dim-5',\n // Focus styles\n 'focus:outline-outline-high focus:z-raised focus:outline-2 focus:-outline-offset-1',\n className\n )}\n {...(field.description && { 'aria-describedby': field.description })}\n {...(field.isRequired && { required: true })}\n {...(field.state === 'error' && { 'aria-invalid': true })}\n {...props}\n />\n )\n}\n\nInput.displayName = 'Stepper.InputButton'\n","import { NumberField } from '@base-ui-components/react/number-field'\nimport { useFormFieldControl } from '@spark-ui/components/form-field'\nimport { cx } from 'class-variance-authority'\n\nimport { StepperProps } from './types'\nimport { useRenderSlot } from './useRenderSlot'\n\nexport const Root = ({\n children,\n allowWheelScrub = true,\n state: stateProp,\n minValue,\n maxValue,\n formatOptions,\n step: stepProp,\n className,\n ...props\n}: StepperProps) => {\n const render = useRenderSlot(true, 'div')\n\n const field = useFormFieldControl()\n const state = field.state ?? stateProp\n\n /**\n * By default, a percent format will increment in steps of 1 (100% on each increment)\n */\n const step = stepProp == null && formatOptions?.style === 'percent' ? 0.01 : stepProp\n\n return (\n <NumberField.Root\n data-spark-component=\"stepper\"\n allowWheelScrub={allowWheelScrub}\n render={render}\n min={minValue}\n max={maxValue}\n format={formatOptions}\n step={step}\n {...(field.id && { id: field.id })}\n {...props}\n >\n <NumberField.Group className={cx('group flex', className)} data-field-state={state}>\n {children}\n </NumberField.Group>\n </NumberField.Root>\n )\n}\n\nRoot.displayName = 'Stepper'\n","import { Decrement as DecrementButton, Increment as IncrementButton } from './Buttons'\nimport { Input } from './Input'\nimport { Root } from './Root'\n\nexport const Stepper: typeof Root & {\n IncrementButton: typeof IncrementButton\n DecrementButton: typeof DecrementButton\n Input: typeof Input\n} = Object.assign(Root, { IncrementButton, DecrementButton, Input })\n\nStepper.displayName = 'Stepper'\nIncrementButton.displayName = 'Stepper.IncrementButton'\nDecrementButton.displayName = 'Stepper.DecrementButton'\nInput.displayName = 'Stepper.Input'\n\nexport type { StepperProps, StepperButtonProps, StepperInputProps } from './types'\n"],"mappings":";;;;;;;;;AAAA,SAAS,mBAAmB;AAC5B,SAAS,aAAa;AACtB,SAAS,YAAY;AACrB,SAAS,WAAW;;;ACEiB;AAH9B,SAAS,cAAc,SAAkB,YAAoB;AAClE,QAAM,YAAY,UAAU,OAAO;AAEnC,SAAO,UAAU,CAAC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AAS,GAAG,oBAAkB,OAC1E,UACH;AAAA;AAAA,EACF;AAEJ;AAEA,KAAK,cAAc;;;AC3CZ,IAAM,UAIT,OAAO,OAAO,MAAM,EAAE,4BAAiB,4BAAiB,MAAM,CAAC;AAEnE,QAAQ,cAAc;AACtB,UAAgB,cAAc;AAC9B,UAAgB,cAAc;AAC9B,MAAM,cAAc;","names":["jsx","NumberField","jsx","NumberField","useFormFieldControl","cx","jsx","useFormFieldControl","NumberField","cx"]}
@@ -1,7 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { ComponentPropsWithoutRef, Ref, PropsWithChildren } from 'react';
3
- import { I as InputGroupProps, a as InputProps } from '../Input-N8AWWSmt.mjs';
4
- import { I as InputLeadingIconProps, a as InputTrailingIconProps } from '../InputTrailingIcon-BBp7sE6D.mjs';
3
+ import { I as InputGroupProps, a as InputLeadingIconProps, b as InputTrailingIconProps } from '../InputTrailingIcon-DzmwLGtX.mjs';
4
+ import { I as InputProps } from '../Input-g0LpWuv0.mjs';
5
5
  import 'class-variance-authority/types';
6
6
  import 'class-variance-authority';
7
7
  import '../icon/index.mjs';
@@ -1,7 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { ComponentPropsWithoutRef, Ref, PropsWithChildren } from 'react';
3
- import { I as InputGroupProps, a as InputProps } from '../Input-N8AWWSmt.js';
4
- import { I as InputLeadingIconProps, a as InputTrailingIconProps } from '../InputTrailingIcon-ZZx8PoJy.js';
3
+ import { I as InputGroupProps, a as InputLeadingIconProps, b as InputTrailingIconProps } from '../InputTrailingIcon-CZD9hydv.js';
4
+ import { I as InputProps } from '../Input-g0LpWuv0.js';
5
5
  import 'class-variance-authority/types';
6
6
  import 'class-variance-authority';
7
7
  import '../icon/index.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spark-ui/components",
3
- "version": "10.17.13",
3
+ "version": "10.18.0",
4
4
  "license": "MIT",
5
5
  "description": "Spark (Leboncoin design system) components.",
6
6
  "exports": {
@@ -49,13 +49,11 @@
49
49
  "dependencies": {
50
50
  "@base-ui-components/react": "^1.0.0-beta.3",
51
51
  "@react-aria/button": "3.13.0",
52
- "@react-aria/numberfield": "3.11.13",
53
52
  "@react-aria/toast": "^3.0.0-beta.18",
54
- "@react-stately/numberfield": "3.9.11",
55
53
  "@react-stately/toast": "^3.0.0-beta.7",
56
- "@spark-ui/hooks": "^10.17.13",
57
- "@spark-ui/icons": "^10.17.13",
58
- "@spark-ui/internal-utils": "^10.17.13",
54
+ "@spark-ui/hooks": "^10.18.0",
55
+ "@spark-ui/icons": "^10.18.0",
56
+ "@spark-ui/internal-utils": "^10.18.0",
59
57
  "@zag-js/pagination": "1.25.0",
60
58
  "@zag-js/react": "1.25.0",
61
59
  "class-variance-authority": "0.7.1",
@@ -82,5 +80,5 @@
82
80
  "url": "https://github.com/leboncoin/spark-web/issues?q=is%3Aopen+label%3A%22Component%3A+button%22"
83
81
  },
84
82
  "homepage": "https://sparkui.vercel.app",
85
- "gitHead": "b76422c5079d9e1827a446cc6fac4df7a0b45e29"
83
+ "gitHead": "d8749d130451b72b1a499f1f175c7a6457635614"
86
84
  }
@@ -1,20 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { IconProps } from './icon/index.mjs';
3
-
4
- type InputIconProps = IconProps;
5
-
6
- type InputLeadingIconProps = InputIconProps;
7
- declare const InputLeadingIcon: {
8
- ({ className, ...others }: InputLeadingIconProps): react_jsx_runtime.JSX.Element;
9
- id: string;
10
- displayName: string;
11
- };
12
-
13
- type InputTrailingIconProps = InputIconProps;
14
- declare const InputTrailingIcon: {
15
- ({ className, ...others }: InputTrailingIconProps): react_jsx_runtime.JSX.Element;
16
- id: string;
17
- displayName: string;
18
- };
19
-
20
- export { type InputLeadingIconProps as I, type InputTrailingIconProps as a, InputLeadingIcon as b, InputTrailingIcon as c };
@@ -1,20 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { IconProps } from './icon/index.js';
3
-
4
- type InputIconProps = IconProps;
5
-
6
- type InputLeadingIconProps = InputIconProps;
7
- declare const InputLeadingIcon: {
8
- ({ className, ...others }: InputLeadingIconProps): react_jsx_runtime.JSX.Element;
9
- id: string;
10
- displayName: string;
11
- };
12
-
13
- type InputTrailingIconProps = InputIconProps;
14
- declare const InputTrailingIcon: {
15
- ({ className, ...others }: InputTrailingIconProps): react_jsx_runtime.JSX.Element;
16
- id: string;
17
- displayName: string;
18
- };
19
-
20
- export { type InputLeadingIconProps as I, type InputTrailingIconProps as a, InputLeadingIcon as b, InputTrailingIcon as c };