bonprix-design-system 0.69.1 → 0.69.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.
@@ -54,7 +54,7 @@ var u = o({ slots: {
54
54
  })
55
55
  });
56
56
  };
57
- d.displayName = "Dialog", d.Title = f, f.displayName = "Dialog.Title", d.Content = p, p.displayName = "Dialog.Content", d.PrimaryButton = r, d.SecondaryButton = i;
57
+ d.displayName = "Dialog", d.Title = f, f.displayName = "Dialog.Title", d.Content = p, p.displayName = "Dialog.Content", d.PrimaryButton = r, Object.assign(r, { displayName: "Dialog.PrimaryButton" }), d.SecondaryButton = i, Object.assign(i, { displayName: "Dialog.SecondaryButton" });
58
58
  //#endregion
59
59
  export { d as default };
60
60
 
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.js","names":[],"sources":["../../../src/components/Dialog/Dialog.tsx"],"sourcesContent":["\"use client\";\n\nimport React, { FC, ReactNode } from \"react\";\nimport { tv } from \"tailwind-variants\";\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\n\nimport Overlay from \"@components/Overlay\";\nimport { useInnerOpen, useSubcomponent } from \"@hooks\";\n\nimport ButtonsSection from \"../ButtonsSection\";\nimport PrimaryButton from \"../ButtonsSection/PrimaryButton\";\nimport SecondaryButton from \"../ButtonsSection/SecondaryButton\";\n\nconst generateClasses = tv({\n slots: {\n title: \"typography-bonprix-h4 text-clr-primary px-10\",\n wrapper: \"flex flex-col gap-5 h-full\",\n scrollArea: \"px-10 h-full scroll-area relative\",\n contentWrapper: \"flex flex-col overflow-hidden\",\n buttonSection: \"px-10\",\n },\n});\n\ninterface Subcomponents {\n Title: typeof Title;\n Content: typeof Content;\n PrimaryButton: typeof PrimaryButton;\n SecondaryButton: typeof SecondaryButton;\n}\nexport interface Props {\n /** Controls the visibility of the dialog. Should be used in conjunction with `onClose`. */\n isOpen: boolean;\n /** Here, all of the subcomponents should be placed. */\n children: ReactNode;\n /** Callback function that is called when the dialog is supposed to be closed. Should be used in conjunction with `isOpen` property. */\n onClose: () => void;\n /** The z-index of the dialog. */\n zIndex?: number;\n}\n\ntype SubcomponentList = Record<keyof Subcomponents, ReactNode>;\n\nconst Dialog: FC<Props> & Subcomponents = ({ isOpen, onClose, zIndex, children }: Props) => {\n const { getSubcomponents, printBadConstructionMessage } = useSubcomponent(children);\n const { Title, Content, PrimaryButton, SecondaryButton } = getSubcomponents() as SubcomponentList;\n const { wrapper, buttonSection } = generateClasses();\n\n const { innerOpen } = useInnerOpen(isOpen);\n\n if (!Title || !Content) {\n printBadConstructionMessage(\"Dialog\");\n return null;\n }\n\n return (\n <Overlay isOpen={innerOpen} onClose={onClose} zIndex={zIndex} isDialog componentName=\"dialog\">\n <div className={wrapper()}>\n {Title}\n {Content}\n {PrimaryButton && <ButtonsSection owner=\"Dialog\" primary={PrimaryButton} secondary={SecondaryButton} classes={buttonSection()} />}\n </div>\n </Overlay>\n );\n};\n\ninterface TitleProps {\n /** The title to display in the dialog */\n children: string;\n}\n\nconst Title: FC<TitleProps> = ({ children }) => {\n const { title } = generateClasses();\n return <DialogPrimitive.Title className={title()}>{children}</DialogPrimitive.Title>;\n};\n\ninterface ContentProps {\n /** The content to display in the dialog */\n children: ReactNode;\n}\n\nconst Content: FC<ContentProps> = ({ children }) => {\n const { scrollArea, contentWrapper } = generateClasses();\n return (\n <div className={scrollArea()}>\n <div className={contentWrapper()}>{children}</div>\n </div>\n );\n};\n\nDialog.displayName = \"Dialog\";\n\nDialog.Title = Title;\nTitle.displayName = \"Dialog.Title\";\n\nDialog.Content = Content;\nContent.displayName = \"Dialog.Content\";\n\nDialog.PrimaryButton = PrimaryButton;\nDialog.SecondaryButton = SecondaryButton;\n\nexport default Dialog;\n"],"mappings":";;;;;;;;;;;;AAaA,IAAM,IAAkB,EAAG,EACzB,OAAO;CACL,OAAO;CACP,SAAS;CACT,YAAY;CACZ,gBAAgB;CAChB,eAAe;AACjB,EACF,CAAC,GAqBK,KAAqC,EAAE,WAAQ,YAAS,WAAQ,kBAAsB;CAC1F,IAAM,EAAE,qBAAkB,mCAAgC,EAAgB,CAAQ,GAC5E,EAAE,UAAO,YAAS,kBAAe,uBAAoB,EAAiB,GACtE,EAAE,YAAS,qBAAkB,EAAgB,GAE7C,EAAE,iBAAc,EAAa,CAAM;CAOzC,OALI,CAAC,KAAS,CAAC,KACb,EAA4B,QAAQ,GAC7B,QAIP,kBAAC,GAAD;EAAS,QAAQ;EAAoB;EAAiB;EAAQ,UAAA;EAAS,eAAc;EACnF,UAAA,kBAAC,OAAD;GAAK,WAAW,EAAQ;GAAxB,UAAA;IACG;IACA;IACA,KAAiB,kBAAC,GAAD;KAAgB,OAAM;KAAS,SAAS;KAAe,WAAW;KAAiB,SAAS,EAAc;IAAI,CAAA;GAC7H;;CACE,CAAA;AAEb,GAOM,KAAyB,EAAE,kBAAe;CAC9C,IAAM,EAAE,aAAU,EAAgB;CAClC,OAAO,kBAAC,EAAgB,OAAjB;EAAuB,WAAW,EAAM;EAAI;CAAgC,CAAA;AACrF,GAOM,KAA6B,EAAE,kBAAe;CAClD,IAAM,EAAE,eAAY,sBAAmB,EAAgB;CACvD,OACE,kBAAC,OAAD;EAAK,WAAW,EAAW;EACzB,UAAA,kBAAC,OAAD;GAAK,WAAW,EAAe;GAAI;EAAc,CAAA;CAC9C,CAAA;AAET;AAEA,EAAO,cAAc,UAErB,EAAO,QAAQ,GACf,EAAM,cAAc,gBAEpB,EAAO,UAAU,GACjB,EAAQ,cAAc,kBAEtB,EAAO,gBAAgB,GACvB,EAAO,kBAAkB"}
1
+ {"version":3,"file":"Dialog.js","names":[],"sources":["../../../src/components/Dialog/Dialog.tsx"],"sourcesContent":["\"use client\";\n\nimport React, { FC, FunctionComponent, ReactNode } from \"react\";\nimport { tv } from \"tailwind-variants\";\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\n\nimport Overlay from \"@components/Overlay\";\nimport { useInnerOpen, useSubcomponent } from \"@hooks\";\n\nimport ButtonsSection from \"../ButtonsSection\";\nimport PrimaryButton from \"../ButtonsSection/PrimaryButton\";\nimport SecondaryButton from \"../ButtonsSection/SecondaryButton\";\n\nconst generateClasses = tv({\n slots: {\n title: \"typography-bonprix-h4 text-clr-primary px-10\",\n wrapper: \"flex flex-col gap-5 h-full\",\n scrollArea: \"px-10 h-full scroll-area relative\",\n contentWrapper: \"flex flex-col overflow-hidden\",\n buttonSection: \"px-10\",\n },\n});\n\ninterface Subcomponents {\n Title: typeof Title;\n Content: typeof Content;\n PrimaryButton: typeof PrimaryButton;\n SecondaryButton: typeof SecondaryButton;\n}\nexport interface Props {\n /** Controls the visibility of the dialog. Should be used in conjunction with `onClose`. */\n isOpen: boolean;\n /** Here, all of the subcomponents should be placed. */\n children: ReactNode;\n /** Callback function that is called when the dialog is supposed to be closed. Should be used in conjunction with `isOpen` property. */\n onClose: () => void;\n /** The z-index of the dialog. */\n zIndex?: number;\n}\n\ntype SubcomponentList = Record<keyof Subcomponents, ReactNode>;\n\nconst Dialog: FC<Props> & Subcomponents = ({ isOpen, onClose, zIndex, children }: Props) => {\n const { getSubcomponents, printBadConstructionMessage } = useSubcomponent(children);\n const { Title, Content, PrimaryButton, SecondaryButton } = getSubcomponents() as SubcomponentList;\n const { wrapper, buttonSection } = generateClasses();\n\n const { innerOpen } = useInnerOpen(isOpen);\n\n if (!Title || !Content) {\n printBadConstructionMessage(\"Dialog\");\n return null;\n }\n\n return (\n <Overlay isOpen={innerOpen} onClose={onClose} zIndex={zIndex} isDialog componentName=\"dialog\">\n <div className={wrapper()}>\n {Title}\n {Content}\n {PrimaryButton && <ButtonsSection owner=\"Dialog\" primary={PrimaryButton} secondary={SecondaryButton} classes={buttonSection()} />}\n </div>\n </Overlay>\n );\n};\n\ninterface TitleProps {\n /** The title to display in the dialog */\n children: string;\n}\n\nconst Title: FC<TitleProps> = ({ children }) => {\n const { title } = generateClasses();\n return <DialogPrimitive.Title className={title()}>{children}</DialogPrimitive.Title>;\n};\n\ninterface ContentProps {\n /** The content to display in the dialog */\n children: ReactNode;\n}\n\nconst Content: FC<ContentProps> = ({ children }) => {\n const { scrollArea, contentWrapper } = generateClasses();\n return (\n <div className={scrollArea()}>\n <div className={contentWrapper()}>{children}</div>\n </div>\n );\n};\n\nDialog.displayName = \"Dialog\";\n\nDialog.Title = Title;\nTitle.displayName = \"Dialog.Title\";\n\nDialog.Content = Content;\nContent.displayName = \"Dialog.Content\";\n\nDialog.PrimaryButton = PrimaryButton;\nObject.assign(PrimaryButton, {\n displayName: \"Dialog.PrimaryButton\",\n} satisfies Pick<FunctionComponent, \"displayName\">);\n\nDialog.SecondaryButton = SecondaryButton;\nObject.assign(SecondaryButton, {\n displayName: \"Dialog.SecondaryButton\",\n} satisfies Pick<FunctionComponent, \"displayName\">);\n\nexport default Dialog;\n"],"mappings":";;;;;;;;;;;;AAaA,IAAM,IAAkB,EAAG,EACzB,OAAO;CACL,OAAO;CACP,SAAS;CACT,YAAY;CACZ,gBAAgB;CAChB,eAAe;AACjB,EACF,CAAC,GAqBK,KAAqC,EAAE,WAAQ,YAAS,WAAQ,kBAAsB;CAC1F,IAAM,EAAE,qBAAkB,mCAAgC,EAAgB,CAAQ,GAC5E,EAAE,UAAO,YAAS,kBAAe,uBAAoB,EAAiB,GACtE,EAAE,YAAS,qBAAkB,EAAgB,GAE7C,EAAE,iBAAc,EAAa,CAAM;CAOzC,OALI,CAAC,KAAS,CAAC,KACb,EAA4B,QAAQ,GAC7B,QAIP,kBAAC,GAAD;EAAS,QAAQ;EAAoB;EAAiB;EAAQ,UAAA;EAAS,eAAc;EACnF,UAAA,kBAAC,OAAD;GAAK,WAAW,EAAQ;GAAxB,UAAA;IACG;IACA;IACA,KAAiB,kBAAC,GAAD;KAAgB,OAAM;KAAS,SAAS;KAAe,WAAW;KAAiB,SAAS,EAAc;IAAI,CAAA;GAC7H;;CACE,CAAA;AAEb,GAOM,KAAyB,EAAE,kBAAe;CAC9C,IAAM,EAAE,aAAU,EAAgB;CAClC,OAAO,kBAAC,EAAgB,OAAjB;EAAuB,WAAW,EAAM;EAAI;CAAgC,CAAA;AACrF,GAOM,KAA6B,EAAE,kBAAe;CAClD,IAAM,EAAE,eAAY,sBAAmB,EAAgB;CACvD,OACE,kBAAC,OAAD;EAAK,WAAW,EAAW;EACzB,UAAA,kBAAC,OAAD;GAAK,WAAW,EAAe;GAAI;EAAc,CAAA;CAC9C,CAAA;AAET;AAEA,EAAO,cAAc,UAErB,EAAO,QAAQ,GACf,EAAM,cAAc,gBAEpB,EAAO,UAAU,GACjB,EAAQ,cAAc,kBAEtB,EAAO,gBAAgB,GACvB,OAAO,OAAO,GAAe,EAC3B,aAAa,uBACf,CAAkD,GAElD,EAAO,kBAAkB,GACzB,OAAO,OAAO,GAAiB,EAC7B,aAAa,yBACf,CAAkD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bonprix-design-system",
3
- "version": "0.69.1",
3
+ "version": "0.69.2",
4
4
  "description": "Design System of bonprix",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -52,15 +52,14 @@
52
52
  "@bonprix-ds/react-accordion": "1.0.3",
53
53
  "@bonprix-ds/react-alert": "1.0.2",
54
54
  "@bonprix-ds/react-availability": "1.0.2",
55
- "@bonprix-ds/react-benefit-tag": "1.1.3",
56
55
  "@bonprix-ds/react-checkbox": "1.0.2",
57
56
  "@bonprix-ds/react-checkbox-group": "1.0.2",
58
57
  "@bonprix-ds/react-collapsible": "1.0.3",
59
- "@bonprix-ds/react-container": "1.0.2",
60
58
  "@bonprix-ds/react-figurine": "1.0.3",
61
59
  "@bonprix-ds/react-grid": "1.0.2",
62
60
  "@bonprix-ds/react-icon": "1.1.1",
63
61
  "@bonprix-ds/react-icon-button": "1.1.1",
62
+ "@bonprix-ds/react-benefit-tag": "1.1.3",
64
63
  "@bonprix-ds/react-illustration": "1.0.3",
65
64
  "@bonprix-ds/react-list": "1.1.2",
66
65
  "@bonprix-ds/react-logo": "1.0.3",
@@ -68,14 +67,15 @@
68
67
  "@bonprix-ds/react-price": "1.0.3",
69
68
  "@bonprix-ds/react-price-stacked": "1.0.2",
70
69
  "@bonprix-ds/react-radio-group": "1.0.2",
71
- "@bonprix-ds/react-rating": "1.0.2",
70
+ "@bonprix-ds/react-container": "1.0.2",
72
71
  "@bonprix-ds/react-select": "1.0.2",
73
72
  "@bonprix-ds/react-spinner": "1.0.2",
74
73
  "@bonprix-ds/react-step-navi": "1.0.2",
75
74
  "@bonprix-ds/react-switch": "1.0.2",
76
75
  "@bonprix-ds/react-tooltip": "1.0.2",
77
76
  "@bonprix-ds/react-typography": "1.0.2",
78
- "@bonprix-ds/utils": "0.1.2"
77
+ "@bonprix-ds/utils": "0.1.2",
78
+ "@bonprix-ds/react-rating": "1.0.2"
79
79
  },
80
80
  "peerDependencies": {
81
81
  "lit": "^3.3.1",