@bonprix-ds/react-step-navi 1.1.0 → 1.1.2
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/src/StepNaviStep.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "react";
|
|
2
2
|
import { tv as e } from "tailwind-variants";
|
|
3
|
-
import t from "@bonprix-ds/react-icon";
|
|
3
|
+
import { CheckBoldIcon as t } from "@bonprix-ds/react-icon/icons";
|
|
4
4
|
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
5
5
|
//#region src/StepNaviStep.tsx
|
|
6
6
|
var i = e({
|
|
@@ -31,10 +31,7 @@ var i = e({
|
|
|
31
31
|
"aria-disabled": c ? "true" : "false",
|
|
32
32
|
"data-bpds-completed": s,
|
|
33
33
|
children: [
|
|
34
|
-
/* @__PURE__ */ n(t, {
|
|
35
|
-
variant: "check-bold",
|
|
36
|
-
className: u()
|
|
37
|
-
}),
|
|
34
|
+
/* @__PURE__ */ n(t, { className: u() }),
|
|
38
35
|
/* @__PURE__ */ n("div", { className: d() }),
|
|
39
36
|
/* @__PURE__ */ r("div", {
|
|
40
37
|
className: f(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StepNaviStep.js","names":["
|
|
1
|
+
{"version":3,"file":"StepNaviStep.js","names":["generateClasses","tv","StepNaviStep","disabled","href","container","active","completed","CheckBoldIcon","icon","bar","labelSlot","children"],"sources":["../../src/StepNaviStep.tsx"],"sourcesContent":["import React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\n// inspired by https://a11y-guidelines.orange.com/en/articles/disable-elements/#disable-a-link\nimport { CheckBoldIcon } from \"@bonprix-ds/react-icon/icons\";\n\nconst generateClasses = tv({\n slots: {\n container: \"preflight group flex w-full flex-col items-center gap-1.5 focus:outline-none l:items-start xl:items-start\",\n icon: \"invisible h-5 w-5 fill-clr-fg-success\",\n bar: \"h-1 w-full bg-clr-bg-disabled\",\n labelSlot: [\n \"typography-input-helper-text break-all px-1 text-center text-clr-primary l:text-left xl:text-left\",\n \"rounded-sm outline-2 outline-offset-2 outline-clr-primary group-focus-visible:outline\",\n ],\n },\n variants: {\n active: {\n true: {\n bar: \"bg-clr-primary\",\n },\n },\n completed: {\n true: { icon: \"visible\" },\n },\n disabled: {\n true: {\n labelSlot: \"text-clr-disabled\",\n },\n false: {\n bar: \"group-hover:bg-clr-primary\",\n },\n },\n },\n});\n\n/** @deprecated [step-navi-component] No replacement, build the step navigation in your application. */\nexport interface StepNaviStepProps {\n /** The name of the step. */\n children: string;\n /** The href attribute for the step link. */\n href?: string;\n}\n\n/**\n * `StepNavi` derives these for each of its steps and passes them in. They are not meant to be set\n * from the outside, so each one is tagged internal and left out of the generated API table.\n */\nexport interface StepNaviStepInternalProps {\n /** @internal */\n active?: boolean;\n /** @internal */\n completed?: boolean;\n /** @internal */\n disabled?: boolean;\n}\n\n/** @deprecated [step-navi-component] No replacement, build the step navigation in your application. */\nconst StepNaviStep = ({ children, href, active, completed, disabled }: StepNaviStepProps & StepNaviStepInternalProps) => {\n const { container, icon, bar, labelSlot } = generateClasses({ active, completed, disabled });\n return (\n <a\n href={disabled ? undefined : href}\n className={container()}\n aria-current={active ? \"step\" : \"false\"}\n aria-disabled={disabled ? \"true\" : \"false\"}\n data-bpds-completed={completed}\n >\n <CheckBoldIcon className={icon()} />\n <div className={bar()}></div>\n <div className={labelSlot()}>\n {children}\n {completed && <span className=\"sr-only\"> erfüllter schritt</span>}\n </div>\n </a>\n );\n};\n\nStepNaviStep.displayName = \"StepNavi.Step\";\n\nexport default StepNaviStep;\n"],"mappings":";;;;;AAMA,IAAMA,IAAkBC,EAAG;CACzB,OAAO;EACL,WAAW;EACX,MAAM;EACN,KAAK;EACL,WAAW,CACT,qGACA,uFACF;CACF;CACA,UAAU;EACR,QAAQ,EACN,MAAM,EACJ,KAAK,iBACP,EACF;EACA,WAAW,EACT,MAAM,EAAE,MAAM,UAAU,EAC1B;EACA,UAAU;GACR,MAAM,EACJ,WAAW,oBACb;GACA,OAAO,EACL,KAAK,6BACP;EACF;CACF;AACF,CAAC,GAwBKC,KAAgB,EAAE,aAAU,SAAM,WAAQ,cAAW,kBAA8D;CACvH,IAAM,EAAE,cAAW,SAAM,QAAK,iBAAcF,EAAgB;EAAE;EAAQ;EAAW;CAAS,CAAC;CAC3F,OACE,kBAAC,KAAD;EACE,MAAMG,IAAW,KAAA,IAAYC;EAC7B,WAAWC,EAAU;EACrB,gBAAcC,IAAS,SAAS;EAChC,iBAAeH,IAAW,SAAS;EACnC,uBAAqBI;EALvB,UAAA;GAOE,kBAACC,GAAD,EAAe,WAAWC,EAAK,EAAI,CAAA;GACnC,kBAAC,OAAD,EAAK,WAAWC,EAAI,EAAQ,CAAA;GAC5B,kBAAC,OAAD;IAAK,WAAWC,EAAU;IAA1B,UAAA,CACGC,GACAL,KAAa,kBAAC,QAAD;KAAM,WAAU;KAAU,UAAA;IAAwB,CAAA,CAC7D;;EACJ;;AAEP;AAEA,EAAa,cAAc"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bonprix-ds/react-step-navi",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "StepNavi component, implemented in React, for the Bonprix Design System.",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"provenance": true
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@bonprix-ds/react-icon": "1.
|
|
36
|
-
"@bonprix-ds/utils": "0.
|
|
35
|
+
"@bonprix-ds/react-icon": "1.3.1",
|
|
36
|
+
"@bonprix-ds/utils": "0.5.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@types/react": "19.3.0",
|