@julseb-lib/react 0.1.70 → 0.1.72
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.cjs +29 -39
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -12
- package/dist/index.d.ts +15 -12
- package/dist/index.js +29 -39
- package/dist/index.js.map +1 -1
- package/dist/types/components-props.d.cts +2 -0
- package/dist/types/components-props.d.ts +2 -0
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -2005,9 +2005,23 @@ declare const ListGroupTitle: FC$1<ILibListGroupTitle>;
|
|
|
2005
2005
|
declare const ListGroupItem: FC$1<ILibListGroupItem>;
|
|
2006
2006
|
|
|
2007
2007
|
/**
|
|
2008
|
-
* Breadcrumbs component for displaying navigational breadcrumb trails
|
|
2008
|
+
* Breadcrumbs component for displaying navigational breadcrumb trails.
|
|
2009
|
+
*
|
|
2010
|
+
* Renders a customizable container (default: div) with children as breadcrumb items,
|
|
2011
|
+
* separated by a customizable separator (string or React node).
|
|
2012
|
+
* Supports accent and text color theming, and additional class names.
|
|
2009
2013
|
*
|
|
2010
2014
|
* @component
|
|
2015
|
+
* @param {ILibBreadcrumbs} props - Breadcrumbs props.
|
|
2016
|
+
* @param {string} [props.className] - Additional CSS classes for the container.
|
|
2017
|
+
* @param {React.ElementType} [props.element="div"] - Container element type.
|
|
2018
|
+
* @param {React.Ref<HTMLDivElement>} [props.ref] - Ref to the container element.
|
|
2019
|
+
* @param {React.ReactNode} [props.children] - Breadcrumb items.
|
|
2020
|
+
* @param {string|React.ReactNode} [props.separator="/"] - Separator between items.
|
|
2021
|
+
* @param {"primary"|"secondary"|"success"|"danger"|"warning"|"gray"|"white"} [props.accentColor="primary"] - Accent color.
|
|
2022
|
+
* @param {Any color from the library} [props.textColor="font"] - Text color.
|
|
2023
|
+
* @param {any} [props.rest] - Additional props for the container.
|
|
2024
|
+
* @returns {JSX.Element} Breadcrumbs component.
|
|
2011
2025
|
*
|
|
2012
2026
|
* @example
|
|
2013
2027
|
* <Breadcrumbs separator=">">
|
|
@@ -2016,17 +2030,6 @@ declare const ListGroupItem: FC$1<ILibListGroupItem>;
|
|
|
2016
2030
|
* <Text>Current Page</Text>
|
|
2017
2031
|
* </Breadcrumbs>
|
|
2018
2032
|
*
|
|
2019
|
-
* @extends HTMLDivElement
|
|
2020
|
-
*
|
|
2021
|
-
* @prop {string} [props.className] - Additional CSS classes to apply to the breadcrumbs container.
|
|
2022
|
-
* @prop {React.ElementType} [props.element="div"] - HTML element type to render as the container.
|
|
2023
|
-
* @prop {React.Ref<HTMLDivElement>} [props.ref] - Ref to the breadcrumbs container element.
|
|
2024
|
-
* @prop {React.ReactNode} [props.children] - Navigation items to display in the breadcrumb trail.
|
|
2025
|
-
* @prop {string | React.ReactNode} [props.separator="/"] - Separator to display between breadcrumb items.
|
|
2026
|
-
* @prop {any} [props.rest] - Additional props spread to the container element.
|
|
2027
|
-
*
|
|
2028
|
-
* @returns {JSX.Element} The rendered Breadcrumbs component.
|
|
2029
|
-
*
|
|
2030
2033
|
* @see https://doc-julseb-lib-react.vercel.app/components/breadcrumbs
|
|
2031
2034
|
*/
|
|
2032
2035
|
declare const Breadcrumbs: FC$1<ILibBreadcrumbs>;
|
package/dist/index.d.ts
CHANGED
|
@@ -2005,9 +2005,23 @@ declare const ListGroupTitle: FC$1<ILibListGroupTitle>;
|
|
|
2005
2005
|
declare const ListGroupItem: FC$1<ILibListGroupItem>;
|
|
2006
2006
|
|
|
2007
2007
|
/**
|
|
2008
|
-
* Breadcrumbs component for displaying navigational breadcrumb trails
|
|
2008
|
+
* Breadcrumbs component for displaying navigational breadcrumb trails.
|
|
2009
|
+
*
|
|
2010
|
+
* Renders a customizable container (default: div) with children as breadcrumb items,
|
|
2011
|
+
* separated by a customizable separator (string or React node).
|
|
2012
|
+
* Supports accent and text color theming, and additional class names.
|
|
2009
2013
|
*
|
|
2010
2014
|
* @component
|
|
2015
|
+
* @param {ILibBreadcrumbs} props - Breadcrumbs props.
|
|
2016
|
+
* @param {string} [props.className] - Additional CSS classes for the container.
|
|
2017
|
+
* @param {React.ElementType} [props.element="div"] - Container element type.
|
|
2018
|
+
* @param {React.Ref<HTMLDivElement>} [props.ref] - Ref to the container element.
|
|
2019
|
+
* @param {React.ReactNode} [props.children] - Breadcrumb items.
|
|
2020
|
+
* @param {string|React.ReactNode} [props.separator="/"] - Separator between items.
|
|
2021
|
+
* @param {"primary"|"secondary"|"success"|"danger"|"warning"|"gray"|"white"} [props.accentColor="primary"] - Accent color.
|
|
2022
|
+
* @param {Any color from the library} [props.textColor="font"] - Text color.
|
|
2023
|
+
* @param {any} [props.rest] - Additional props for the container.
|
|
2024
|
+
* @returns {JSX.Element} Breadcrumbs component.
|
|
2011
2025
|
*
|
|
2012
2026
|
* @example
|
|
2013
2027
|
* <Breadcrumbs separator=">">
|
|
@@ -2016,17 +2030,6 @@ declare const ListGroupItem: FC$1<ILibListGroupItem>;
|
|
|
2016
2030
|
* <Text>Current Page</Text>
|
|
2017
2031
|
* </Breadcrumbs>
|
|
2018
2032
|
*
|
|
2019
|
-
* @extends HTMLDivElement
|
|
2020
|
-
*
|
|
2021
|
-
* @prop {string} [props.className] - Additional CSS classes to apply to the breadcrumbs container.
|
|
2022
|
-
* @prop {React.ElementType} [props.element="div"] - HTML element type to render as the container.
|
|
2023
|
-
* @prop {React.Ref<HTMLDivElement>} [props.ref] - Ref to the breadcrumbs container element.
|
|
2024
|
-
* @prop {React.ReactNode} [props.children] - Navigation items to display in the breadcrumb trail.
|
|
2025
|
-
* @prop {string | React.ReactNode} [props.separator="/"] - Separator to display between breadcrumb items.
|
|
2026
|
-
* @prop {any} [props.rest] - Additional props spread to the container element.
|
|
2027
|
-
*
|
|
2028
|
-
* @returns {JSX.Element} The rendered Breadcrumbs component.
|
|
2029
|
-
*
|
|
2030
2033
|
* @see https://doc-julseb-lib-react.vercel.app/components/breadcrumbs
|
|
2031
2034
|
*/
|
|
2032
2035
|
declare const Breadcrumbs: FC$1<ILibBreadcrumbs>;
|
package/dist/index.js
CHANGED
|
@@ -66717,6 +66717,8 @@ var Breadcrumbs = ({
|
|
|
66717
66717
|
ref,
|
|
66718
66718
|
children,
|
|
66719
66719
|
separator = "/",
|
|
66720
|
+
accentColor = "primary",
|
|
66721
|
+
textColor = "font",
|
|
66720
66722
|
...rest
|
|
66721
66723
|
}) => {
|
|
66722
66724
|
const Element = element;
|
|
@@ -66727,6 +66729,8 @@ var Breadcrumbs = ({
|
|
|
66727
66729
|
ref,
|
|
66728
66730
|
className: clsx(
|
|
66729
66731
|
"flex flex-wrap items-center gap-2",
|
|
66732
|
+
genLinkColor[accentColor],
|
|
66733
|
+
genTextAllColor[textColor],
|
|
66730
66734
|
"breadcrumbs",
|
|
66731
66735
|
className
|
|
66732
66736
|
),
|
|
@@ -66828,7 +66832,7 @@ var AccordionContent = ({
|
|
|
66828
66832
|
className: clsx(
|
|
66829
66833
|
"overflow-hidden transition-all duration-200 ease",
|
|
66830
66834
|
"py-0 max-h-0 opacity-0",
|
|
66831
|
-
variant === "rounded" && "px-2",
|
|
66835
|
+
variant === "rounded" && "px-2 bg-background",
|
|
66832
66836
|
isOpen && "open py-2 max-h-auto opacity-100",
|
|
66833
66837
|
"accordion-content",
|
|
66834
66838
|
className
|
|
@@ -66998,12 +67002,15 @@ import "react";
|
|
|
66998
67002
|
import { BiX as BiX3 } from "react-icons/bi";
|
|
66999
67003
|
|
|
67000
67004
|
// src/lib/components/Toast/utils.ts
|
|
67001
|
-
var genToastColors = {
|
|
67002
|
-
|
|
67003
|
-
|
|
67004
|
-
|
|
67005
|
-
|
|
67006
|
-
|
|
67005
|
+
var genToastColors = (theme) => {
|
|
67006
|
+
const colors = {
|
|
67007
|
+
success: theme === "dark" ? "border-success-500 bg-success-950" : "border-success-500 bg-success-50",
|
|
67008
|
+
error: theme === "dark" ? "border-danger-500 bg-danger-950" : "border-danger-500 bg-danger-50",
|
|
67009
|
+
warning: theme === "dark" ? "border-warning-500 bg-warning-950" : "border-warning-500 bg-warning-50",
|
|
67010
|
+
info: theme === "dark" ? "border-primary-500 bg-primary-950" : "border-primary-500 bg-primary-50",
|
|
67011
|
+
loading: theme === "dark" ? "border-gray-500 bg-gray-950" : "border-gray-500 bg-gray-50"
|
|
67012
|
+
};
|
|
67013
|
+
return colors;
|
|
67007
67014
|
};
|
|
67008
67015
|
|
|
67009
67016
|
// src/lib/components/Toast/Toast.tsx
|
|
@@ -67022,13 +67029,14 @@ var Toast = ({
|
|
|
67022
67029
|
...rest
|
|
67023
67030
|
}) => {
|
|
67024
67031
|
const Element = element;
|
|
67032
|
+
const { theme } = useLibTheme();
|
|
67025
67033
|
return /* @__PURE__ */ jsxs278(
|
|
67026
67034
|
Element,
|
|
67027
67035
|
{
|
|
67028
67036
|
ref,
|
|
67029
67037
|
className: clsx(
|
|
67030
|
-
"relative p-3 border rounded-lg w-full max-w-[400px] overflow-hidden text-
|
|
67031
|
-
genToastColors[status],
|
|
67038
|
+
"relative p-3 border rounded-lg w-full max-w-[400px] overflow-hidden text-font",
|
|
67039
|
+
genToastColors(theme)[status],
|
|
67032
67040
|
"toast",
|
|
67033
67041
|
className
|
|
67034
67042
|
),
|
|
@@ -67081,6 +67089,13 @@ var ToastContainer = ({
|
|
|
67081
67089
|
// src/lib/components/Toast/ToastFn.tsx
|
|
67082
67090
|
import { toast as toastFn } from "react-toastify";
|
|
67083
67091
|
import { jsx as jsx334 } from "react/jsx-runtime";
|
|
67092
|
+
var COMMON_STYLES = {
|
|
67093
|
+
padding: 0,
|
|
67094
|
+
height: "unset",
|
|
67095
|
+
minHeight: "unset",
|
|
67096
|
+
overflow: "hidden",
|
|
67097
|
+
borderRadius: "var(--radius-lg)"
|
|
67098
|
+
};
|
|
67084
67099
|
var toast = {
|
|
67085
67100
|
success: (title, options) => toastFn.success(
|
|
67086
67101
|
({ closeToast }) => /* @__PURE__ */ jsx334(
|
|
@@ -67097,12 +67112,7 @@ var toast = {
|
|
|
67097
67112
|
...options,
|
|
67098
67113
|
icon: false,
|
|
67099
67114
|
closeButton: false,
|
|
67100
|
-
style:
|
|
67101
|
-
padding: 0,
|
|
67102
|
-
height: "unset",
|
|
67103
|
-
minHeight: "unset",
|
|
67104
|
-
overflow: "hidden"
|
|
67105
|
-
},
|
|
67115
|
+
style: COMMON_STYLES,
|
|
67106
67116
|
autoClose: options?.duration,
|
|
67107
67117
|
className: "!relative !overflow-hidden",
|
|
67108
67118
|
progressClassName: "!bg-success-500 absolute !left-0 !bottom-0"
|
|
@@ -67123,12 +67133,7 @@ var toast = {
|
|
|
67123
67133
|
...options,
|
|
67124
67134
|
icon: false,
|
|
67125
67135
|
closeButton: false,
|
|
67126
|
-
style:
|
|
67127
|
-
padding: 0,
|
|
67128
|
-
height: "unset",
|
|
67129
|
-
minHeight: "unset",
|
|
67130
|
-
overflow: "hidden"
|
|
67131
|
-
},
|
|
67136
|
+
style: COMMON_STYLES,
|
|
67132
67137
|
hideProgressBar: false,
|
|
67133
67138
|
autoClose: options?.duration,
|
|
67134
67139
|
className: "!relative !overflow-hidden",
|
|
@@ -67150,12 +67155,7 @@ var toast = {
|
|
|
67150
67155
|
...options,
|
|
67151
67156
|
icon: false,
|
|
67152
67157
|
closeButton: false,
|
|
67153
|
-
style:
|
|
67154
|
-
padding: 0,
|
|
67155
|
-
height: "unset",
|
|
67156
|
-
minHeight: "unset",
|
|
67157
|
-
overflow: "hidden"
|
|
67158
|
-
},
|
|
67158
|
+
style: COMMON_STYLES,
|
|
67159
67159
|
hideProgressBar: false,
|
|
67160
67160
|
autoClose: options?.duration,
|
|
67161
67161
|
className: "!relative !overflow-hidden",
|
|
@@ -67177,12 +67177,7 @@ var toast = {
|
|
|
67177
67177
|
...options,
|
|
67178
67178
|
icon: false,
|
|
67179
67179
|
closeButton: false,
|
|
67180
|
-
style:
|
|
67181
|
-
padding: 0,
|
|
67182
|
-
height: "unset",
|
|
67183
|
-
minHeight: "unset",
|
|
67184
|
-
overflow: "hidden"
|
|
67185
|
-
},
|
|
67180
|
+
style: COMMON_STYLES,
|
|
67186
67181
|
hideProgressBar: false,
|
|
67187
67182
|
autoClose: options?.duration,
|
|
67188
67183
|
className: "!relative !overflow-hidden",
|
|
@@ -67205,12 +67200,7 @@ var toast = {
|
|
|
67205
67200
|
...options,
|
|
67206
67201
|
icon: false,
|
|
67207
67202
|
closeButton: false,
|
|
67208
|
-
style:
|
|
67209
|
-
padding: 0,
|
|
67210
|
-
height: "unset",
|
|
67211
|
-
minHeight: "unset",
|
|
67212
|
-
overflow: "hidden"
|
|
67213
|
-
},
|
|
67203
|
+
style: COMMON_STYLES,
|
|
67214
67204
|
hideProgressBar: false,
|
|
67215
67205
|
autoClose: options?.duration,
|
|
67216
67206
|
className: "!relative !overflow-hidden",
|