allaw-ui 4.7.5 → 4.7.7

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.
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ export interface InlineTagProps {
3
+ text: string;
4
+ size?: "14" | "12";
5
+ weight?: "medium" | "semiBold" | "bold";
6
+ backgroundColor?: "bleu-allaw" | "actions-error" | "actions-valid" | "actions-warning" | "mid-grey";
7
+ startIcon?: string;
8
+ }
9
+ declare const InlineTag: React.FC<InlineTagProps>;
10
+ export default InlineTag;
@@ -0,0 +1,20 @@
1
+ "use client";
2
+ import React from "react";
3
+ import TinyInfo from "../typography/TinyInfo";
4
+ import styles from "./inlineTag.module.css";
5
+ var InlineTag = function (_a) {
6
+ var text = _a.text, _b = _a.size, size = _b === void 0 ? "14" : _b, _c = _a.weight, weight = _c === void 0 ? "medium" : _c, _d = _a.backgroundColor, backgroundColor = _d === void 0 ? "bleu-allaw" : _d, startIcon = _a.startIcon;
7
+ var variant;
8
+ if (weight === "bold") {
9
+ variant = "bold".concat(size);
10
+ }
11
+ else if (weight === "semiBold" && size === "14") {
12
+ variant = "semiBold14";
13
+ }
14
+ else {
15
+ variant = "".concat(weight).concat(size);
16
+ }
17
+ return (React.createElement("div", { className: "".concat(styles.inlineTag, " ").concat(styles["bg-".concat(backgroundColor)]) },
18
+ React.createElement(TinyInfo, { text: text, variant: variant, color: "pure-white", startIcon: startIcon })));
19
+ };
20
+ export default InlineTag;
@@ -0,0 +1,82 @@
1
+ declare namespace _default {
2
+ export let title: string;
3
+ export { InlineTag as component };
4
+ export namespace argTypes {
5
+ namespace text {
6
+ namespace control {
7
+ let type: string;
8
+ }
9
+ let description: string;
10
+ }
11
+ namespace size {
12
+ export namespace control_1 {
13
+ let type_1: string;
14
+ export { type_1 as type };
15
+ }
16
+ export { control_1 as control };
17
+ export let options: string[];
18
+ let description_1: string;
19
+ export { description_1 as description };
20
+ }
21
+ namespace weight {
22
+ export namespace control_2 {
23
+ let type_2: string;
24
+ export { type_2 as type };
25
+ }
26
+ export { control_2 as control };
27
+ let options_1: string[];
28
+ export { options_1 as options };
29
+ let description_2: string;
30
+ export { description_2 as description };
31
+ }
32
+ namespace backgroundColor {
33
+ export namespace control_3 {
34
+ let type_3: string;
35
+ export { type_3 as type };
36
+ }
37
+ export { control_3 as control };
38
+ let options_2: string[];
39
+ export { options_2 as options };
40
+ let description_3: string;
41
+ export { description_3 as description };
42
+ }
43
+ namespace startIcon {
44
+ export namespace control_4 {
45
+ let type_4: string;
46
+ export { type_4 as type };
47
+ }
48
+ export { control_4 as control };
49
+ let description_4: string;
50
+ export { description_4 as description };
51
+ }
52
+ }
53
+ export namespace parameters {
54
+ namespace docs {
55
+ export namespace description_5 {
56
+ let component: string;
57
+ }
58
+ export { description_5 as description };
59
+ }
60
+ }
61
+ }
62
+ export default _default;
63
+ export const Default: any;
64
+ export const WithIcon: any;
65
+ export const Error: any;
66
+ export const Warning: any;
67
+ export const Small: any;
68
+ export function AllVariants(): React.JSX.Element;
69
+ export namespace AllVariants {
70
+ export namespace parameters_1 {
71
+ export namespace docs_1 {
72
+ export namespace description_6 {
73
+ let story: string;
74
+ }
75
+ export { description_6 as description };
76
+ }
77
+ export { docs_1 as docs };
78
+ }
79
+ export { parameters_1 as parameters };
80
+ }
81
+ import InlineTag from "./InlineTag";
82
+ import React from "react";
@@ -0,0 +1,116 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import React from "react";
13
+ import { Meta, StoryFn } from "@storybook/react";
14
+ import InlineTag, { InlineTagProps } from "./InlineTag";
15
+ export default {
16
+ title: "Components/Atoms/Tags/InlineTag",
17
+ component: InlineTag,
18
+ argTypes: {
19
+ text: {
20
+ control: { type: "text" },
21
+ description: "Texte à afficher dans le tag",
22
+ },
23
+ size: {
24
+ control: { type: "select" },
25
+ options: ["14", "12"],
26
+ description: "Taille du texte",
27
+ },
28
+ weight: {
29
+ control: { type: "select" },
30
+ options: ["medium", "semiBold", "bold"],
31
+ description: "Graisse du texte",
32
+ },
33
+ backgroundColor: {
34
+ control: { type: "select" },
35
+ options: [
36
+ "bleu-allaw",
37
+ "actions-error",
38
+ "actions-valid",
39
+ "actions-warning",
40
+ "mid-grey",
41
+ ],
42
+ description: "Couleur de fond du tag",
43
+ },
44
+ startIcon: {
45
+ control: { type: "text" },
46
+ description: "Icône à afficher au début (classe CSS)",
47
+ },
48
+ },
49
+ parameters: {
50
+ docs: {
51
+ description: {
52
+ component: "Composant InlineTag - Tag personnalisable avec TinyInfo, couleurs et icônes.",
53
+ },
54
+ },
55
+ },
56
+ };
57
+ var Template = function (args) { return React.createElement(InlineTag, __assign({}, args)); };
58
+ export var Default = Template.bind({});
59
+ Default.args = {
60
+ text: "Tag par défaut",
61
+ size: "14",
62
+ weight: "medium",
63
+ backgroundColor: "bleu-allaw",
64
+ };
65
+ export var WithIcon = Template.bind({});
66
+ WithIcon.args = {
67
+ text: "Certifié",
68
+ size: "14",
69
+ weight: "semiBold",
70
+ backgroundColor: "actions-valid",
71
+ startIcon: "allaw-icon-check",
72
+ };
73
+ export var Error = Template.bind({});
74
+ Error.args = {
75
+ text: "Erreur",
76
+ size: "12",
77
+ weight: "medium",
78
+ backgroundColor: "actions-error",
79
+ startIcon: "allaw-icon-alert",
80
+ };
81
+ export var Warning = Template.bind({});
82
+ Warning.args = {
83
+ text: "Attention",
84
+ size: "14",
85
+ weight: "bold",
86
+ backgroundColor: "actions-warning",
87
+ startIcon: "allaw-icon-warning",
88
+ };
89
+ export var Small = Template.bind({});
90
+ Small.args = {
91
+ text: "Petit",
92
+ size: "12",
93
+ weight: "medium",
94
+ backgroundColor: "mid-grey",
95
+ };
96
+ export var AllVariants = function () { return (React.createElement("div", { style: {
97
+ display: "flex",
98
+ flexWrap: "wrap",
99
+ gap: "12px",
100
+ alignItems: "center",
101
+ } },
102
+ React.createElement(InlineTag, { text: "Bleu Allaw", backgroundColor: "bleu-allaw" }),
103
+ React.createElement(InlineTag, { text: "Succ\u00E8s", backgroundColor: "actions-valid", startIcon: "allaw-icon-check" }),
104
+ React.createElement(InlineTag, { text: "Erreur", backgroundColor: "actions-error", startIcon: "allaw-icon-alert" }),
105
+ React.createElement(InlineTag, { text: "Attention", backgroundColor: "actions-warning", startIcon: "allaw-icon-warning" }),
106
+ React.createElement(InlineTag, { text: "Neutre", backgroundColor: "mid-grey" }),
107
+ React.createElement(InlineTag, { text: "Petit 12px", size: "12", backgroundColor: "bleu-allaw" }),
108
+ React.createElement(InlineTag, { text: "Gras", weight: "bold", backgroundColor: "actions-valid" }),
109
+ React.createElement(InlineTag, { text: "Semi-Bold", weight: "semiBold", backgroundColor: "bleu-allaw" }))); };
110
+ AllVariants.parameters = {
111
+ docs: {
112
+ description: {
113
+ story: "Toutes les variantes du composant InlineTag avec différentes couleurs, tailles et styles.",
114
+ },
115
+ },
116
+ };
@@ -1,6 +1,8 @@
1
1
  export { default as AppointementStatusTag } from "./AppointementStatusTag";
2
2
  export { default as FolderStatusTag } from "./FolderStatusTag";
3
3
  export { default as OtherStatusTag } from "./OtherStatusTag";
4
+ export { default as InlineTag } from "./InlineTag";
4
5
  export type { AppointementStatusTagProps } from "./AppointementStatusTag";
5
6
  export type { FolderStatusTagProps } from "./FolderStatusTag";
6
7
  export type { OtherStatusTagProps } from "./OtherStatusTag";
8
+ export type { InlineTagProps } from "./InlineTag";
@@ -1,3 +1,4 @@
1
1
  export { default as AppointementStatusTag } from "./AppointementStatusTag";
2
2
  export { default as FolderStatusTag } from "./FolderStatusTag";
3
3
  export { default as OtherStatusTag } from "./OtherStatusTag";
4
+ export { default as InlineTag } from "./InlineTag";
@@ -0,0 +1,28 @@
1
+ .inlineTag {
2
+ display: inline-flex;
3
+ align-items: center;
4
+ justify-content: center;
5
+ padding: 5px 10px;
6
+ border-radius: 50px;
7
+ white-space: nowrap;
8
+ }
9
+
10
+ .bg-bleu-allaw {
11
+ background-color: #25beeb;
12
+ }
13
+
14
+ .bg-actions-error {
15
+ background-color: #e15151;
16
+ }
17
+
18
+ .bg-actions-valid {
19
+ background-color: #29a36a;
20
+ }
21
+
22
+ .bg-actions-warning {
23
+ background-color: #ffc857;
24
+ }
25
+
26
+ .bg-mid-grey {
27
+ background-color: #728ea7;
28
+ }
package/dist/index.d.ts CHANGED
@@ -40,6 +40,8 @@ export type { DatepickerFormProps } from "./components/molecules/datepickerForm/
40
40
  export { default as AppointementStatusTag } from "./components/atoms/tags/AppointementStatusTag";
41
41
  export { default as FolderStatusTag } from "./components/atoms/tags/FolderStatusTag";
42
42
  export { default as OtherStatusTag } from "./components/atoms/tags/OtherStatusTag";
43
+ export { default as InlineTag } from "./components/atoms/tags/InlineTag";
44
+ export type { InlineTagProps } from "./components/atoms/tags/InlineTag";
43
45
  export { default as Heading } from "./components/atoms/typography/Heading";
44
46
  export { default as Link } from "./components/atoms/typography/Link";
45
47
  export { default as Paragraph } from "./components/atoms/typography/Paragraph";
package/dist/index.js CHANGED
@@ -41,6 +41,7 @@ export { default as DatepickerForm } from "./components/molecules/datepickerForm
41
41
  export { default as AppointementStatusTag } from "./components/atoms/tags/AppointementStatusTag";
42
42
  export { default as FolderStatusTag } from "./components/atoms/tags/FolderStatusTag";
43
43
  export { default as OtherStatusTag } from "./components/atoms/tags/OtherStatusTag";
44
+ export { default as InlineTag } from "./components/atoms/tags/InlineTag";
44
45
  // Typography
45
46
  export { default as Heading } from "./components/atoms/typography/Heading";
46
47
  export { default as Link } from "./components/atoms/typography/Link";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "allaw-ui",
3
- "version": "4.7.5",
3
+ "version": "4.7.7",
4
4
  "description": "Composants UI pour l'application Allaw",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",