@bcrumbs.net/bc-ui 0.0.14 → 0.0.15
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/index.esm.d.ts +1 -1
- package/index.esm.js +580 -31821
- package/package.json +5 -2
- package/src/index.d.ts +2 -0
- package/src/lib/coloredTag/ColoredTag.d.ts +15 -0
- package/src/lib/coloredTag/getDynamicTagColors.d.ts +13 -0
- package/src/lib/icon/bcicon.d.ts +5 -0
- package/src/lib/multiSelector/MutliSelector.d.ts +0 -5
package/package.json
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bcrumbs.net/bc-ui",
|
|
3
3
|
"description": "The UI components of Bread Crumbs portals",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.15",
|
|
5
5
|
"keyword": [
|
|
6
6
|
"bcrumbs",
|
|
7
7
|
"bc-ui"
|
|
8
8
|
],
|
|
9
9
|
"peerDependencies": {
|
|
10
|
-
"react": "18.
|
|
10
|
+
"react": "^18.0.0",
|
|
11
|
+
"react-dom": "^18.0.0",
|
|
12
|
+
"i18next": "^21.0.0",
|
|
13
|
+
"react-i18next": "^11.0.0",
|
|
11
14
|
"@emotion/react": "11.5.0",
|
|
12
15
|
"@emotion/styled": "11.3.0",
|
|
13
16
|
"@radix-ui/themes": "^3.1.5",
|
package/src/index.d.ts
CHANGED
|
@@ -41,6 +41,8 @@ export * from './lib/dateRangePicker';
|
|
|
41
41
|
export * from './lib/InputWithSuggestions';
|
|
42
42
|
export * from './lib/textArea';
|
|
43
43
|
export * from './lib/tagDisplay/TagDisplay';
|
|
44
|
+
export * from './lib/coloredTag/getDynamicTagColors';
|
|
45
|
+
export * from './lib/coloredTag/ColoredTag';
|
|
44
46
|
export * from './lib/styledFormInput/StyledFormInput';
|
|
45
47
|
export * from './lib/newComponents/BCNewTable/BCNewTable';
|
|
46
48
|
export * from './lib/newComponents/BCNewDropdown/BCNewDropdown';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type ColoredTagProps = {
|
|
2
|
+
/** Text shown inside the tag; also drives the derived color. */
|
|
3
|
+
label: string;
|
|
4
|
+
/** Renders larger sizing for mobile layouts. */
|
|
5
|
+
isMobile?: boolean;
|
|
6
|
+
/** When provided, shows a remove (×) button and calls this on click. */
|
|
7
|
+
onRemove?: () => void;
|
|
8
|
+
/** Accessible title/tooltip for the remove button. */
|
|
9
|
+
removeTitle?: string;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Generic tag chip with a stable, near-unique color derived from its label.
|
|
13
|
+
* Same label always yields the same color across renders.
|
|
14
|
+
*/
|
|
15
|
+
export declare const ColoredTag: ({ label, isMobile, onRemove, removeTitle }: ColoredTagProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type DynamicTagColors = {
|
|
2
|
+
color: string;
|
|
3
|
+
backgroundColor: string;
|
|
4
|
+
borderColor: string;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Derives a stable, near-unique color set for an arbitrary tag string.
|
|
8
|
+
*
|
|
9
|
+
* Unlike the predefined state maps, this hashes the full tag text into an HSL
|
|
10
|
+
* hue so every distinct tag gets its own color while staying consistent across
|
|
11
|
+
* renders (same tag -> same color).
|
|
12
|
+
*/
|
|
13
|
+
export declare const getDynamicTagColors: (tag: string) => DynamicTagColors;
|
package/src/lib/icon/bcicon.d.ts
CHANGED
|
@@ -461,4 +461,9 @@ export declare const BCIcons: {
|
|
|
461
461
|
height?: number | undefined;
|
|
462
462
|
fill?: string | undefined;
|
|
463
463
|
}) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
464
|
+
Clock2: ({ width, height, fill }: {
|
|
465
|
+
width?: number | undefined;
|
|
466
|
+
height?: number | undefined;
|
|
467
|
+
fill?: string | undefined;
|
|
468
|
+
}) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
464
469
|
};
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { BCDropListOptionsType } from '../constants/Droplist';
|
|
3
|
-
export declare const TagContainer: import("@emotion/styled").StyledComponent<{
|
|
4
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
5
|
-
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
6
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
7
2
|
export interface MultiSelectorProps {
|
|
8
3
|
onSelect: (value: string | undefined) => void;
|
|
9
4
|
options: BCDropListOptionsType[];
|