@bonprix-ds/react-radio-group 1.0.7 → 1.0.9
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 +2 -39
- package/dist/no-styles.js +1 -0
- package/dist/src/RadioGroup.css +4 -4
- package/dist/src/RadioGroup.d.ts +12 -0
- package/dist/src/RadioGroup.js.map +1 -1
- package/dist/src/RadioGroupContext.d.ts +6 -0
- package/dist/src/RadioGroupContext.js.map +1 -1
- package/dist/src/RadioGroupItem.d.ts +16 -0
- package/dist/src/RadioGroupItem.js +12 -12
- package/dist/src/RadioGroupItem.js.map +1 -1
- package/dist/src/RadioGroupRoot.d.ts +18 -0
- package/dist/src/RadioGroupRoot.js +1 -1
- package/dist/src/RadioGroupRoot.js.map +1 -1
- package/dist/src/useConsumeRadioGroup.d.ts +2 -0
- package/dist/src/useConsumeRadioGroup.js.map +1 -1
- package/dist/styles.js +1 -0
- package/package.json +37 -31
package/dist/index.d.ts
CHANGED
|
@@ -1,39 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { ReactNode } from 'react';
|
|
4
|
-
|
|
5
|
-
declare interface ControlledInputProps extends Omit<ControlGroupProps, "componentName"> {
|
|
6
|
-
value: string;
|
|
7
|
-
onChange: (value: string) => void;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
declare const RadioGroup: {
|
|
11
|
-
(props: RadioGroupProps): default_2.JSX.Element;
|
|
12
|
-
displayName: string;
|
|
13
|
-
Item: {
|
|
14
|
-
({ value, label, additional, suffix }: RadioGroupItemProps): default_2.JSX.Element;
|
|
15
|
-
displayName: string;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
export default RadioGroup;
|
|
19
|
-
|
|
20
|
-
declare interface RadioGroupItemProps {
|
|
21
|
-
/** The value of the radio button. */
|
|
22
|
-
value: string;
|
|
23
|
-
/** The label of the radio button. */
|
|
24
|
-
label: ReactNode;
|
|
25
|
-
/** Suffix that will be placed on the far right side inside the `<label>` to further visualize the item's value, e.g. with icon(s) or logo(s). Make sure to only include allowed children here to avoid irregular HTML markup. */
|
|
26
|
-
suffix?: ReactNode;
|
|
27
|
-
/** Additional content to be displayed when item is selected. */
|
|
28
|
-
additional?: ReactNode;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export declare type RadioGroupProps = ControlledInputProps | UncontrolledInputProps;
|
|
32
|
-
|
|
33
|
-
declare interface UncontrolledInputProps extends Omit<ControlGroupProps, "componentName"> {
|
|
34
|
-
value?: never;
|
|
35
|
-
defaultValue: string;
|
|
36
|
-
onChange?: (value: string) => void;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export { }
|
|
1
|
+
export { default } from "./src/RadioGroup";
|
|
2
|
+
export type { Props as RadioGroupProps } from "./src/RadioGroup";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/src/RadioGroup.css
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
[data-bpds-has-divider="true"] {
|
|
2
2
|
[role="radiogroup"] [data-bpds-radio-group-item]:not(:last-child)::after {
|
|
3
|
-
background-color: var(--color-bg-main-light);
|
|
4
|
-
block-size: var(--spacing-0-25);
|
|
3
|
+
background-color: var(--bpds-color-bg-main-light);
|
|
4
|
+
block-size: var(--bpds-spacing-0-25);
|
|
5
5
|
content: "";
|
|
6
6
|
display: block;
|
|
7
|
-
margin-block: var(--spacing-0-5);
|
|
7
|
+
margin-block: var(--bpds-spacing-0-5);
|
|
8
8
|
margin-inline: var(--divider-margin-inline, 0);
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
&[data-bpds-has-horizontal-padding="true"] {
|
|
12
|
-
--divider-margin-inline: calc(var(--spacing-3) * -1);
|
|
12
|
+
--divider-margin-inline: calc(var(--bpds-spacing-3) * -1);
|
|
13
13
|
}
|
|
14
14
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { type Props } from "./RadioGroupRoot";
|
|
3
|
+
export type { Props };
|
|
4
|
+
declare const RadioGroup: {
|
|
5
|
+
(props: Props): React.JSX.Element;
|
|
6
|
+
displayName: string;
|
|
7
|
+
Item: {
|
|
8
|
+
({ value, label, additional, suffix }: import("./RadioGroupItem").RadioGroupItemProps): React.JSX.Element;
|
|
9
|
+
displayName: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export default RadioGroup;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroup.js","names":[],"sources":["../../src/RadioGroup.tsx"],"sourcesContent":["import React from \"react\";\n\nimport RadioGroupItem from \"./RadioGroupItem\";\nimport RadioGroupRoot, { type Props } from \"./RadioGroupRoot\";\n\nexport type { Props };\n\nconst RadioGroup = (props: Props) => <RadioGroupRoot {...props} />;\n\nRadioGroup.displayName = \"RadioGroup\";\n\nRadioGroup.Item = RadioGroupItem;\n\nexport default RadioGroup;\n"],"mappings":";;;;;AAOA,
|
|
1
|
+
{"version":3,"file":"RadioGroup.js","names":["RadioGroupItem","RadioGroupRoot","RadioGroup","props"],"sources":["../../src/RadioGroup.tsx"],"sourcesContent":["import React from \"react\";\n\nimport RadioGroupItem from \"./RadioGroupItem\";\nimport RadioGroupRoot, { type Props } from \"./RadioGroupRoot\";\n\nexport type { Props };\n\nconst RadioGroup = (props: Props) => <RadioGroupRoot {...props} />;\n\nRadioGroup.displayName = \"RadioGroup\";\n\nRadioGroup.Item = RadioGroupItem;\n\nexport default RadioGroup;\n"],"mappings":";;;;;AAOA,IAAME,KAAc,MAAiB,kBAACD,GAAD,EAAgB,GAAIE,EAAQ,CAAA;AAEjE,EAAW,cAAc,cAEzB,EAAW,OAAOH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroupContext.js","names":[],"sources":["../../src/RadioGroupContext.ts"],"sourcesContent":["\"use client\";\n\nimport { createContext } from \"react\";\n\nexport interface RadioGroupContextProps {\n disabled: boolean;\n checkedValue: string;\n}\n\nconst RadioGroupContext = createContext<RadioGroupContextProps>({\n disabled: false,\n checkedValue: \"\",\n});\n\nexport default RadioGroupContext;\n"],"mappings":";;;AASA,
|
|
1
|
+
{"version":3,"file":"RadioGroupContext.js","names":["RadioGroupContext","createContext"],"sources":["../../src/RadioGroupContext.ts"],"sourcesContent":["\"use client\";\n\nimport { createContext } from \"react\";\n\nexport interface RadioGroupContextProps {\n disabled: boolean;\n checkedValue: string;\n}\n\nconst RadioGroupContext = createContext<RadioGroupContextProps>({\n disabled: false,\n checkedValue: \"\",\n});\n\nexport default RadioGroupContext;\n"],"mappings":";;;AASA,IAAMA,IAAoBC,EAAsC;CAC9D,UAAU;CACV,cAAc;AAChB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
|
+
export interface RadioGroupItemProps {
|
|
3
|
+
/** The value of the radio button. */
|
|
4
|
+
value: string;
|
|
5
|
+
/** The label of the radio button. */
|
|
6
|
+
label: ReactNode;
|
|
7
|
+
/** Suffix that will be placed on the far right side inside the `<label>` to further visualize the item's value, e.g. with icon(s) or logo(s). Make sure to only include allowed children here to avoid irregular HTML markup. */
|
|
8
|
+
suffix?: ReactNode;
|
|
9
|
+
/** Additional content to be displayed when item is selected. */
|
|
10
|
+
additional?: ReactNode;
|
|
11
|
+
}
|
|
12
|
+
declare const RadioGroupItem: {
|
|
13
|
+
({ value, label, additional, suffix }: RadioGroupItemProps): React.JSX.Element;
|
|
14
|
+
displayName: string;
|
|
15
|
+
};
|
|
16
|
+
export default RadioGroupItem;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import e from "./useConsumeRadioGroup.js";
|
|
3
3
|
import "react";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
4
|
+
import * as t from "@radix-ui/react-radio-group";
|
|
5
|
+
import { tv as n } from "tailwind-variants";
|
|
6
6
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
7
7
|
//#region src/RadioGroupItem.tsx
|
|
8
|
-
var a =
|
|
9
|
-
base: "preflight typography-input-text flex gap-2
|
|
8
|
+
var a = n({
|
|
9
|
+
base: "preflight typography-input-text flex justify-between gap-2 text-clr-primary",
|
|
10
10
|
slots: {
|
|
11
|
-
item: ["
|
|
12
|
-
indicatorAndLabel: "flex gap-2 py-3
|
|
13
|
-
indicator: ["flex
|
|
11
|
+
item: ["h-6 w-6 shrink-0 rounded-full border border-current text-inherit", "outline-2 outline-offset-2 outline-current focus-visible:outline"],
|
|
12
|
+
indicatorAndLabel: "flex flex-1 items-center gap-2 py-3",
|
|
13
|
+
indicator: ["relative flex h-full w-full items-center justify-center after:block after:w-2.5 after:content-['']", "after:h-2.5 after:rounded-[50%] after:bg-current"],
|
|
14
14
|
suffix: "h-12 flex-none"
|
|
15
15
|
},
|
|
16
16
|
variants: { disabled: {
|
|
@@ -20,8 +20,8 @@ var a = t({
|
|
|
20
20
|
},
|
|
21
21
|
false: { base: "hover:cursor-pointer hover:text-clr-on-bg-low" }
|
|
22
22
|
} }
|
|
23
|
-
}), o = ({ value:
|
|
24
|
-
let { disabled: l, checkedValue: u } = e(), { base: d, item: f, indicatorAndLabel: p, indicator: m, suffix: h } = a({ disabled: l }), g =
|
|
23
|
+
}), o = ({ value: n, label: o, additional: s, suffix: c }) => {
|
|
24
|
+
let { disabled: l, checkedValue: u } = e(), { base: d, item: f, indicatorAndLabel: p, indicator: m, suffix: h } = a({ disabled: l }), g = n === "" ? "hidden" : void 0, _ = n === u;
|
|
25
25
|
return /* @__PURE__ */ i("div", {
|
|
26
26
|
className: g,
|
|
27
27
|
"data-bpds-radio-group-item": "",
|
|
@@ -31,11 +31,11 @@ var a = t({
|
|
|
31
31
|
className: d(),
|
|
32
32
|
children: [/* @__PURE__ */ i("span", {
|
|
33
33
|
className: p(),
|
|
34
|
-
children: [/* @__PURE__ */ r(
|
|
35
|
-
value:
|
|
34
|
+
children: [/* @__PURE__ */ r(t.Item, {
|
|
35
|
+
value: n,
|
|
36
36
|
className: f(),
|
|
37
37
|
disabled: l,
|
|
38
|
-
children: /* @__PURE__ */ r(
|
|
38
|
+
children: /* @__PURE__ */ r(t.Indicator, { className: m() })
|
|
39
39
|
}), o]
|
|
40
40
|
}), c && /* @__PURE__ */ r("span", {
|
|
41
41
|
className: h(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroupItem.js","names":[],"sources":["../../src/RadioGroupItem.tsx"],"sourcesContent":["\"use client\";\n\nimport
|
|
1
|
+
{"version":3,"file":"RadioGroupItem.js","names":["useConsumeRadioGroup","RadioGroupPrimitive","generateClasses","tv","RadioGroupItem","suffixClasses","hidden","value","isChecked","checkedValue","suffix","additional","base","indicatorAndLabel","item","indicator","label"],"sources":["../../src/RadioGroupItem.tsx"],"sourcesContent":["\"use client\";\n\nimport * as RadioGroupPrimitive from \"@radix-ui/react-radio-group\";\nimport React, { ReactNode } from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport useConsumeRadioGroup from \"./useConsumeRadioGroup\";\n\nconst generateClasses = tv({\n base: \"preflight typography-input-text flex justify-between gap-2 text-clr-primary\",\n slots: {\n item: [\n \"h-6 w-6 shrink-0 rounded-full border border-current text-inherit\",\n \"outline-2 outline-offset-2 outline-current focus-visible:outline\",\n ],\n // py is used instead of h-8, because h-8 will make the item label vertically centered\n indicatorAndLabel: \"flex flex-1 items-center gap-2 py-3\",\n indicator: [\n \"relative flex h-full w-full items-center justify-center after:block after:w-2.5 after:content-['']\",\n \"after:h-2.5 after:rounded-[50%] after:bg-current\",\n ],\n // set height explicitly to prevent suffix from breaking layout and spacings\n suffix: \"h-12 flex-none\",\n },\n variants: {\n disabled: {\n true: {\n base: \"text-clr-disabled\",\n item: \"bg-clr-bg-disabled\",\n },\n false: {\n base: \"hover:cursor-pointer hover:text-clr-on-bg-low\",\n },\n },\n },\n});\n\nexport interface RadioGroupItemProps {\n /** The value of the radio button. */\n value: string;\n /** The label of the radio button. */\n label: ReactNode;\n /** Suffix that will be placed on the far right side inside the `<label>` to further visualize the item's value, e.g. with icon(s) or logo(s). Make sure to only include allowed children here to avoid irregular HTML markup. */\n suffix?: ReactNode;\n /** Additional content to be displayed when item is selected. */\n additional?: ReactNode;\n}\n\nconst RadioGroupItem = ({ value, label, additional, suffix }: RadioGroupItemProps) => {\n const { disabled, checkedValue } = useConsumeRadioGroup();\n const { base, item, indicatorAndLabel, indicator, suffix: suffixClasses } = generateClasses({ disabled });\n const hidden = value === \"\" ? \"hidden\" : undefined;\n\n const isChecked = value === checkedValue;\n\n return (\n <div className={hidden} data-bpds-radio-group-item=\"\" data-bpds-has-suffix={!!suffix} data-bpds-has-additional={!!additional}>\n <label className={base()}>\n <span className={indicatorAndLabel()}>\n <RadioGroupPrimitive.Item value={value} className={item()} disabled={disabled}>\n <RadioGroupPrimitive.Indicator className={indicator()} />\n </RadioGroupPrimitive.Item>\n {label}\n </span>\n {suffix && <span className={suffixClasses()}>{suffix}</span>}\n </label>\n {additional && isChecked && <div>{additional}</div>}\n </div>\n );\n};\n\nRadioGroupItem.displayName = \"RadioGroup.Item\";\n\nexport default RadioGroupItem;\n"],"mappings":";;;;;;;AAQA,IAAME,IAAkBC,EAAG;CACzB,MAAM;CACN,OAAO;EACL,MAAM,CACJ,oEACA,kEACF;EAEA,mBAAmB;EACnB,WAAW,CACT,sGACA,kDACF;EAEA,QAAQ;CACV;CACA,UAAU,EACR,UAAU;EACR,MAAM;GACJ,MAAM;GACN,MAAM;EACR;EACA,OAAO,EACL,MAAM,gDACR;CACF,EACF;AACF,CAAC,GAaKC,KAAkB,EAAE,UAAO,UAAO,eAAY,gBAAkC;CACpF,IAAM,EAAE,aAAU,oBAAiBJ,EAAqB,GAClD,EAAE,SAAM,SAAM,sBAAmB,cAAW,QAAQK,MAAkBH,EAAgB,EAAE,YAAS,CAAC,GAClGI,IAASC,MAAU,KAAK,WAAW,KAAA,GAEnCC,IAAYD,MAAUE;CAE5B,OACE,kBAAC,OAAD;EAAK,WAAWH;EAAQ,8BAA2B;EAAG,wBAAsB,CAAC,CAACI;EAAQ,4BAA0B,CAAC,CAACC;EAAlH,UAAA,CACE,kBAAC,SAAD;GAAO,WAAWC,EAAK;GAAvB,UAAA,CACE,kBAAC,QAAD;IAAM,WAAWC,EAAkB;IAAnC,UAAA,CACE,kBAACZ,EAAoB,MAArB;KAAiC;KAAO,WAAWa,EAAK;KAAa;KACnE,UAAA,kBAACb,EAAoB,WAArB,EAA+B,WAAWc,EAAU,EAAI,CAAA;IAChC,CAAA,GACzBC,CACG;GACL,CAAA,GAAAN,KAAU,kBAAC,QAAD;IAAM,WAAWL,EAAc;IAAI,UAAAK;GAAa,CAAA,CACtD;EACN,CAAA,GAAAC,KAAcH,KAAa,kBAAC,OAAD,EAAA,UAAMG,EAAgB,CAAA,CAC/C;;AAET;AAEA,EAAe,cAAc"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ControlGroupProps as RadioControlGroupProps } from "@bonprix-ds/utils";
|
|
3
|
+
import "./RadioGroup.css";
|
|
4
|
+
interface ControlledInputProps extends Omit<RadioControlGroupProps, "componentName"> {
|
|
5
|
+
value: string;
|
|
6
|
+
onChange: (value: string) => void;
|
|
7
|
+
}
|
|
8
|
+
interface UncontrolledInputProps extends Omit<RadioControlGroupProps, "componentName"> {
|
|
9
|
+
value?: never;
|
|
10
|
+
defaultValue: string;
|
|
11
|
+
onChange?: (value: string) => void;
|
|
12
|
+
}
|
|
13
|
+
export type Props = ControlledInputProps | UncontrolledInputProps;
|
|
14
|
+
declare const RadioGroupRoot: {
|
|
15
|
+
({ value, onChange, label, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, children, name, disabled, error, errorText, helperText, required, divider, horizontalPadding, ...unionProps }: Props): React.JSX.Element;
|
|
16
|
+
displayName: string;
|
|
17
|
+
};
|
|
18
|
+
export default RadioGroupRoot;
|
|
@@ -5,7 +5,7 @@ import { useState as n } from "react";
|
|
|
5
5
|
import * as r from "@radix-ui/react-radio-group";
|
|
6
6
|
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
7
7
|
import { SelectionControlGroup as o } from "@bonprix-ds/internal-components";
|
|
8
|
-
import "
|
|
8
|
+
import "#styles";
|
|
9
9
|
//#region src/RadioGroupRoot.tsx
|
|
10
10
|
var s = ({ value: s, onChange: c, label: l, "aria-label": u, "aria-labelledby": d, children: f, name: p, disabled: m = !1, error: h = !1, errorText: g = "", helperText: _, required: v = !1, divider: y = !1, horizontalPadding: b = !1, ...x }) => {
|
|
11
11
|
let S = "defaultValue" in x ? x.defaultValue : void 0, [C, w] = n(S ?? ""), T = s !== void 0, E = T ? s : C;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroupRoot.js","names":[],"sources":["../../src/RadioGroupRoot.tsx"],"sourcesContent":["\"use client\";\n\nimport
|
|
1
|
+
{"version":3,"file":"RadioGroupRoot.js","names":["RadioGroupContext","RadioGroupItem","RadioGroupPrimitive","RadioGroupRoot","ariaLabel","ariaLabelledBy","unionProps","defaultValue","internalValue","setInternalValue","useState","isControlled","value","checkedValue","SelectionControlGroup","newValue","onChange","children"],"sources":["../../src/RadioGroupRoot.tsx"],"sourcesContent":["\"use client\";\n\nimport * as RadioGroupPrimitive from \"@radix-ui/react-radio-group\";\nimport React, { useState } from \"react\";\n\nimport { SelectionControlGroup } from \"@bonprix-ds/internal-components\";\nimport { ControlGroupProps as RadioControlGroupProps } from \"@bonprix-ds/utils\";\n\nimport RadioGroupContext from \"./RadioGroupContext\";\nimport RadioGroupItem from \"./RadioGroupItem\";\n\nimport \"./RadioGroup.css\";\n\ninterface ControlledInputProps extends Omit<RadioControlGroupProps, \"componentName\"> {\n value: string;\n onChange: (value: string) => void;\n}\n\ninterface UncontrolledInputProps extends Omit<RadioControlGroupProps, \"componentName\"> {\n value?: never;\n defaultValue: string;\n onChange?: (value: string) => void;\n}\n\nexport type Props = ControlledInputProps | UncontrolledInputProps;\n\nconst RadioGroupRoot = ({\n value,\n onChange,\n label,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n children,\n name,\n disabled = false,\n error = false,\n errorText = \"\",\n helperText,\n required = false,\n divider = false,\n horizontalPadding = false,\n ...unionProps\n}: Props) => {\n const defaultValue = \"defaultValue\" in unionProps ? unionProps.defaultValue : undefined;\n\n // For the uncontrolled variant, track the checked value internally so the Context\n // (and therefore `isChecked` in `RadioGroup.Item`) stays up-to-date.\n const [internalValue, setInternalValue] = useState(defaultValue ?? \"\");\n const isControlled = value !== undefined;\n const checkedValue = isControlled ? value : internalValue;\n\n const handleValueChange = (newValue: string) => {\n if (!isControlled) setInternalValue(newValue);\n onChange?.(newValue);\n };\n\n return (\n <SelectionControlGroup\n label={label}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n name={name}\n disabled={disabled}\n helperText={helperText}\n error={error}\n errorText={errorText}\n required={required}\n componentName=\"radio-group\"\n divider={divider}\n horizontalPadding={horizontalPadding}\n >\n <RadioGroupPrimitive.Root\n name={name}\n value={value}\n onValueChange={handleValueChange}\n orientation=\"vertical\" // disable navigation via \"←\" and \"→\" keys, only \"↑\" and \"↓\" can be used\n disabled={disabled}\n required={required}\n defaultValue={defaultValue}\n >\n <RadioGroupContext value={{ disabled, checkedValue }}>\n {/* Creating a 'phantom' option is technically more correct for the case when we pass an empty string as a value (initially to not preselect any option in the group). */}\n <RadioGroupItem label=\"\" value=\"\" />\n {children}\n </RadioGroupContext>\n </RadioGroupPrimitive.Root>\n </SelectionControlGroup>\n );\n};\n\nRadioGroupRoot.displayName = \"RadioGroup\";\n\nexport default RadioGroupRoot;\n"],"mappings":";;;;;;;;;AA0BA,IAAMG,KAAkB,EACtB,UACA,aACA,UACA,cAAcC,GACd,mBAAmBC,GACnB,aACA,SACA,cAAW,IACX,WAAQ,IACR,eAAY,IACZ,eACA,cAAW,IACX,aAAU,IACV,uBAAoB,IACpB,GAAGC,QACQ;CACX,IAAMC,IAAe,kBAAkBD,IAAaA,EAAW,eAAe,KAAA,GAIxE,CAACE,GAAeC,KAAoBC,EAASH,KAAgB,EAAE,GAC/DI,IAAeC,MAAU,KAAA,GACzBC,IAAeF,IAAeC,IAAQJ;CAO5C,OACE,kBAACM,GAAD;EACS;EACP,cAAYV;EACZ,mBAAiBC;EACX;EACI;EACE;EACL;EACI;EACD;EACV,eAAc;EACL;EACU;EAEnB,UAAA,kBAACH,EAAoB,MAArB;GACQ;GACC;GACP,gBAvBqB,MAAqB;IAE9C,AADKS,KAAcF,EAAiBM,CAAQ,GAC5CC,IAAWD,CAAQ;GACrB;GAqBM,aAAY;GACF;GACA;GACI;GAEd,UAAA,kBAACf,GAAD;IAAmB,OAAO;KAAE;KAAU;IAAa;IAAnD,UAAA,CAEE,kBAACC,GAAD;KAAgB,OAAM;KAAG,OAAM;IAAI,CAAA,GAClCgB,CACgB;;EACK,CAAA;CACL,CAAA;AAE3B;AAEA,EAAe,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useConsumeRadioGroup.js","names":[],"sources":["../../src/useConsumeRadioGroup.ts"],"sourcesContent":["import { useContext } from \"react\";\n\nimport RadioGroupContext from \"./RadioGroupContext\";\n\nconst useConsumeRadioGroup = () => {\n return useContext(RadioGroupContext);\n};\n\nexport default useConsumeRadioGroup;\n"],"mappings":";;;AAIA,
|
|
1
|
+
{"version":3,"file":"useConsumeRadioGroup.js","names":["RadioGroupContext","useConsumeRadioGroup","useContext"],"sources":["../../src/useConsumeRadioGroup.ts"],"sourcesContent":["import { useContext } from \"react\";\n\nimport RadioGroupContext from \"./RadioGroupContext\";\n\nconst useConsumeRadioGroup = () => {\n return useContext(RadioGroupContext);\n};\n\nexport default useConsumeRadioGroup;\n"],"mappings":";;;AAIA,IAAMC,UACGC,EAAWF,CAAiB"}
|
package/dist/styles.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./src/RadioGroup.css";
|
package/package.json
CHANGED
|
@@ -1,16 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bonprix-ds/react-radio-group",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
4
4
|
"description": "RadioGroup component, implemented in React, for the Bonprix Design System.",
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
"keywords": [],
|
|
6
|
+
"license": "UNLICENSED",
|
|
7
|
+
"author": "",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/bonprix/design-system.git",
|
|
11
|
+
"directory": "packages/react/radio-group"
|
|
9
12
|
},
|
|
10
|
-
"
|
|
13
|
+
"files": [
|
|
14
|
+
"dist",
|
|
15
|
+
"!dist/tsconfig.tsbuildinfo",
|
|
16
|
+
"!dist/vite.config.d.ts",
|
|
17
|
+
"!dist/**/*.test.d.ts"
|
|
18
|
+
],
|
|
19
|
+
"type": "module",
|
|
11
20
|
"sideEffects": [
|
|
12
|
-
"**/*.css"
|
|
21
|
+
"**/*.css",
|
|
22
|
+
"./dist/styles.js"
|
|
13
23
|
],
|
|
24
|
+
"module": "./dist/index.js",
|
|
25
|
+
"types": "./dist/index.d.ts",
|
|
26
|
+
"imports": {
|
|
27
|
+
"#styles": {
|
|
28
|
+
"browser": "./dist/styles.js",
|
|
29
|
+
"default": "./dist/no-styles.js"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
14
32
|
"exports": {
|
|
15
33
|
".": {
|
|
16
34
|
"import": "./dist/index.js",
|
|
@@ -18,37 +36,25 @@
|
|
|
18
36
|
"default": "./dist/index.js"
|
|
19
37
|
}
|
|
20
38
|
},
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
"
|
|
24
|
-
],
|
|
25
|
-
"keywords": [],
|
|
26
|
-
"author": "",
|
|
27
|
-
"license": "UNLICENSED",
|
|
28
|
-
"repository": {
|
|
29
|
-
"type": "git",
|
|
30
|
-
"url": "git+https://github.com/bonprix/design-system.git",
|
|
31
|
-
"directory": "packages/react/radio-group"
|
|
39
|
+
"publishConfig": {
|
|
40
|
+
"access": "public",
|
|
41
|
+
"provenance": true
|
|
32
42
|
},
|
|
33
43
|
"dependencies": {
|
|
34
44
|
"@radix-ui/react-radio-group": "1.4.7",
|
|
35
|
-
"@bonprix-ds/internal-components": "0.2.
|
|
36
|
-
"@bonprix-ds/utils": "0.
|
|
37
|
-
},
|
|
38
|
-
"peerDependencies": {
|
|
39
|
-
"react": "^19.0.0",
|
|
40
|
-
"react-dom": "^19.0.0",
|
|
41
|
-
"tailwind-variants": "0.3.1"
|
|
45
|
+
"@bonprix-ds/internal-components": "0.2.2",
|
|
46
|
+
"@bonprix-ds/utils": "0.3.0"
|
|
42
47
|
},
|
|
43
48
|
"devDependencies": {
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"@vitejs/plugin-react": "6.1.1",
|
|
47
|
-
"rollup-preserve-directives": "1.1.3",
|
|
48
|
-
"unplugin-dts": "1.1.0",
|
|
49
|
-
"@microsoft/api-extractor": "7.59.1",
|
|
49
|
+
"@types/react": "19.3.0",
|
|
50
|
+
"vite": "8.3.2",
|
|
50
51
|
"@bonprix-ds/vite-config": "0.0.0"
|
|
51
52
|
},
|
|
53
|
+
"peerDependencies": {
|
|
54
|
+
"react": "^19",
|
|
55
|
+
"react-dom": "^19",
|
|
56
|
+
"tailwind-variants": "0.3.1"
|
|
57
|
+
},
|
|
52
58
|
"scripts": {
|
|
53
59
|
"build": "vite build"
|
|
54
60
|
}
|