@proyecto-viviana/ui 0.4.1 → 0.5.0

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.
Files changed (105) hide show
  1. package/dist/styles.css +0 -3
  2. package/dist/viviana-tokens.css +240 -171
  3. package/package.json +3 -57
  4. package/src/viviana-tokens.css +240 -171
  5. package/dist/CalendarCard.d.ts +0 -2
  6. package/dist/CalendarCard.d.ts.map +0 -1
  7. package/dist/CalendarCard.js +0 -96
  8. package/dist/CalendarCard.js.map +0 -1
  9. package/dist/CalendarCard.jsx +0 -50
  10. package/dist/CalendarCard.jsx.map +0 -1
  11. package/dist/Chip.d.ts +0 -2
  12. package/dist/Chip.d.ts.map +0 -1
  13. package/dist/Chip.js +0 -2
  14. package/dist/Chip.jsx +0 -2
  15. package/dist/Conversation.d.ts +0 -2
  16. package/dist/Conversation.d.ts.map +0 -1
  17. package/dist/Conversation.js +0 -176
  18. package/dist/Conversation.js.map +0 -1
  19. package/dist/Conversation.jsx +0 -106
  20. package/dist/Conversation.jsx.map +0 -1
  21. package/dist/EventCard.d.ts +0 -2
  22. package/dist/EventCard.d.ts.map +0 -1
  23. package/dist/EventCard.js +0 -171
  24. package/dist/EventCard.js.map +0 -1
  25. package/dist/EventCard.jsx +0 -94
  26. package/dist/EventCard.jsx.map +0 -1
  27. package/dist/Logo.d.ts +0 -2
  28. package/dist/Logo.d.ts.map +0 -1
  29. package/dist/Logo.js +0 -116
  30. package/dist/Logo.js.map +0 -1
  31. package/dist/Logo.jsx +0 -101
  32. package/dist/Logo.jsx.map +0 -1
  33. package/dist/PageLayout.d.ts +0 -2
  34. package/dist/PageLayout.d.ts.map +0 -1
  35. package/dist/PageLayout.js +0 -31
  36. package/dist/PageLayout.js.map +0 -1
  37. package/dist/PageLayout.jsx +0 -23
  38. package/dist/PageLayout.jsx.map +0 -1
  39. package/dist/ProfileCard.d.ts +0 -2
  40. package/dist/ProfileCard.d.ts.map +0 -1
  41. package/dist/ProfileCard.js +0 -77
  42. package/dist/ProfileCard.js.map +0 -1
  43. package/dist/ProfileCard.jsx +0 -52
  44. package/dist/ProfileCard.jsx.map +0 -1
  45. package/dist/ProjectCard.d.ts +0 -2
  46. package/dist/ProjectCard.d.ts.map +0 -1
  47. package/dist/ProjectCard.js +0 -162
  48. package/dist/ProjectCard.js.map +0 -1
  49. package/dist/ProjectCard.jsx +0 -131
  50. package/dist/ProjectCard.jsx.map +0 -1
  51. package/dist/TimelineItem.d.ts +0 -2
  52. package/dist/TimelineItem.d.ts.map +0 -1
  53. package/dist/TimelineItem.js +0 -137
  54. package/dist/TimelineItem.js.map +0 -1
  55. package/dist/TimelineItem.jsx +0 -70
  56. package/dist/TimelineItem.jsx.map +0 -1
  57. package/dist/chip2.js +0 -82
  58. package/dist/chip2.js.map +0 -1
  59. package/dist/chip2.jsx +0 -68
  60. package/dist/chip2.jsx.map +0 -1
  61. package/dist/custom/calendar-card/index.d.ts +0 -12
  62. package/dist/custom/calendar-card/index.d.ts.map +0 -1
  63. package/dist/custom/chip/index.d.ts +0 -16
  64. package/dist/custom/chip/index.d.ts.map +0 -1
  65. package/dist/custom/conversation/index.d.ts +0 -32
  66. package/dist/custom/conversation/index.d.ts.map +0 -1
  67. package/dist/custom/event-card/index.d.ts +0 -30
  68. package/dist/custom/event-card/index.d.ts.map +0 -1
  69. package/dist/custom/header/index.d.ts +0 -12
  70. package/dist/custom/header/index.d.ts.map +0 -1
  71. package/dist/custom/lateral-nav/index.d.ts +0 -32
  72. package/dist/custom/lateral-nav/index.d.ts.map +0 -1
  73. package/dist/custom/logo/index.d.ts +0 -11
  74. package/dist/custom/logo/index.d.ts.map +0 -1
  75. package/dist/custom/nav-header/index.d.ts +0 -13
  76. package/dist/custom/nav-header/index.d.ts.map +0 -1
  77. package/dist/custom/page-layout/index.d.ts +0 -7
  78. package/dist/custom/page-layout/index.d.ts.map +0 -1
  79. package/dist/custom/profile-card/index.d.ts +0 -16
  80. package/dist/custom/profile-card/index.d.ts.map +0 -1
  81. package/dist/custom/project-card/index.d.ts +0 -13
  82. package/dist/custom/project-card/index.d.ts.map +0 -1
  83. package/dist/custom/timeline-item/index.d.ts +0 -28
  84. package/dist/custom/timeline-item/index.d.ts.map +0 -1
  85. package/src/CalendarCard.ts +0 -1
  86. package/src/Chip.ts +0 -1
  87. package/src/Conversation.ts +0 -1
  88. package/src/EventCard.ts +0 -1
  89. package/src/Logo.ts +0 -1
  90. package/src/PageLayout.ts +0 -1
  91. package/src/ProfileCard.ts +0 -1
  92. package/src/ProjectCard.ts +0 -1
  93. package/src/TimelineItem.ts +0 -1
  94. package/src/custom/calendar-card/index.tsx +0 -124
  95. package/src/custom/chip/index.tsx +0 -82
  96. package/src/custom/conversation/index.tsx +0 -216
  97. package/src/custom/event-card/index.tsx +0 -253
  98. package/src/custom/header/index.tsx +0 -64
  99. package/src/custom/lateral-nav/index.tsx +0 -143
  100. package/src/custom/logo/index.tsx +0 -60
  101. package/src/custom/nav-header/index.tsx +0 -106
  102. package/src/custom/page-layout/index.tsx +0 -33
  103. package/src/custom/profile-card/index.tsx +0 -123
  104. package/src/custom/project-card/index.tsx +0 -76
  105. package/src/custom/timeline-item/index.tsx +0 -148
@@ -1,162 +0,0 @@
1
- import { className, effect, getNextElement, insert, setAttribute, template } from "solid-js/web";
2
- //#region src/custom/project-card/index.tsx
3
- var _tmpl$ = /*#__PURE__*/ template(`<img class=" Za151 fa151 _Ha151 oa151 na151 ka151 ja151">`), _tmpl$2 = /*#__PURE__*/ template(`<span>`), _tmpl$3 = /*#__PURE__*/ template(`<a target=_blank rel="noopener noreferrer">`), _tmpl$4 = /*#__PURE__*/ template(`<div>`);
4
- const card = function anonymous(props) {
5
- let rules = " ";
6
- rules += " sd151";
7
- rules += " _ta151";
8
- rules += " eb151";
9
- rules += " Ue151";
10
- rules += " qe151";
11
- rules += " Za151";
12
- rules += " oc151";
13
- rules += " nc151";
14
- rules += " kc151";
15
- rules += " jc151";
16
- rules += " _kb151";
17
- rules += " hb151";
18
- rules += " mb151";
19
- rules += " lb151";
20
- rules += " _jf151";
21
- rules += " izfTM5151";
22
- rules += " gDE5VE151";
23
- rules += " pXDQpyb151";
24
- rules += " _Xa151";
25
- if (props.size === "lg") rules += " Tg151";
26
- else if (props.size === "md") rules += " Tf151";
27
- else if (props.size === "sm") rules += " Te151";
28
- if (props.size === "lg") rules += " Qg151";
29
- else if (props.size === "md") rules += " Qf151";
30
- else if (props.size === "sm") rules += " Qe151";
31
- if (props.size === "lg") rules += " Sg151";
32
- else if (props.size === "md") rules += " Sf151";
33
- else if (props.size === "sm") rules += " Se151";
34
- if (props.size === "lg") rules += " Rg151";
35
- else if (props.size === "md") rules += " Rf151";
36
- else if (props.size === "sm") rules += " Re151";
37
- if (props.isInactive) rules += " _IqmMfn151";
38
- else rules += " _Ib151";
39
- return rules;
40
- };
41
- const caption = function anonymous(props) {
42
- let rules = " ";
43
- rules += " Za151";
44
- rules += " _Wa151";
45
- rules += " _Nc151";
46
- rules += " Pc151";
47
- rules += " _Yb151";
48
- rules += " _7c151";
49
- if (props.size === "lg") {
50
- rules += " uk151";
51
- rules += " ucJ9TBTb151";
52
- rules += " ud3Euai151";
53
- rules += " uea151";
54
- rules += " ugb151";
55
- rules += " uhd151";
56
- rules += " uje151";
57
- rules += " u2NhKxcl151";
58
- rules += " uic151";
59
- } else if (props.size === "md") {
60
- rules += " uk151";
61
- rules += " ucJ9TBTb151";
62
- rules += " ud3Euai151";
63
- rules += " uea151";
64
- rules += " ugb151";
65
- rules += " uhd151";
66
- rules += " uje151";
67
- rules += " u2NhKxcl151";
68
- rules += " uic151";
69
- } else if (props.size === "sm") {
70
- rules += " uk151";
71
- rules += " ucJ9TBTb151";
72
- rules += " ud3Euai151";
73
- rules += " uea151";
74
- rules += " ugb151";
75
- rules += " uhd151";
76
- rules += " uje151";
77
- rules += " u2NhKxcl151";
78
- rules += " uic151";
79
- }
80
- if (props.size === "lg") {
81
- rules += " -_6BNtrc-d151";
82
- rules += " vx151";
83
- } else if (props.size === "md") {
84
- rules += " -_6BNtrc-c151";
85
- rules += " vx151";
86
- } else if (props.size === "sm") {
87
- rules += " -_6BNtrc-b151";
88
- rules += " vx151";
89
- }
90
- if (props.size === "lg") {
91
- rules += " xb151";
92
- rules += " _xa151";
93
- } else if (props.size === "md") {
94
- rules += " xb151";
95
- rules += " _xa151";
96
- } else if (props.size === "sm") {
97
- rules += " xb151";
98
- rules += " _xa151";
99
- }
100
- if (props.size === "lg") {
101
- rules += " _Fd151";
102
- rules += " _FnuYUweb151";
103
- } else if (props.size === "md") {
104
- rules += " _Fd151";
105
- rules += " _FnuYUweb151";
106
- } else if (props.size === "sm") {
107
- rules += " _Fd151";
108
- rules += " _FnuYUweb151";
109
- }
110
- rules += " pAZZpyb151";
111
- return rules;
112
- };
113
- function ProjectCard(props) {
114
- const size = () => props.size ?? "sm";
115
- const inactive = () => props.inactive ?? false;
116
- const cardContent = () => [(() => {
117
- var _el$ = getNextElement(_tmpl$);
118
- effect((_p$) => {
119
- var _v$ = props.imageSrc, _v$2 = props.imageAlt ?? props.name;
120
- _v$ !== _p$.e && setAttribute(_el$, "src", _p$.e = _v$);
121
- _v$2 !== _p$.t && setAttribute(_el$, "alt", _p$.t = _v$2);
122
- return _p$;
123
- }, {
124
- e: void 0,
125
- t: void 0
126
- });
127
- return _el$;
128
- })(), (() => {
129
- var _el$2 = getNextElement(_tmpl$2);
130
- insert(_el$2, () => props.name);
131
- effect(() => className(_el$2, caption({ size: size() })));
132
- return _el$2;
133
- })()];
134
- const classes = () => `${card({
135
- size: size(),
136
- isInactive: inactive()
137
- })} ${props.class ?? ""}`;
138
- if (props.href) return (() => {
139
- var _el$3 = getNextElement(_tmpl$3);
140
- insert(_el$3, cardContent);
141
- effect((_p$) => {
142
- var _v$3 = props.href, _v$4 = classes();
143
- _v$3 !== _p$.e && setAttribute(_el$3, "href", _p$.e = _v$3);
144
- _v$4 !== _p$.t && className(_el$3, _p$.t = _v$4);
145
- return _p$;
146
- }, {
147
- e: void 0,
148
- t: void 0
149
- });
150
- return _el$3;
151
- })();
152
- return (() => {
153
- var _el$4 = getNextElement(_tmpl$4);
154
- insert(_el$4, cardContent);
155
- effect(() => className(_el$4, classes()));
156
- return _el$4;
157
- })();
158
- }
159
- //#endregion
160
- export { ProjectCard };
161
-
162
- //# sourceMappingURL=ProjectCard.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ProjectCard.js","names":[],"sources":["../src/custom/project-card/index.tsx"],"sourcesContent":["import type { JSX } from \"solid-js\";\n// Styled via the S2 style() macro through viviana's own seam (../../style →\n// src/style.ts). A square logo/preview tile with a caption, sized by the S2\n// spacing + type ramps and painted in Silapse colors. `inactive` dims it;\n// `href` turns the whole card into a link.\nimport { style } from \"../../style\" with { type: \"macro\" };\n\nexport type ProjectCardSize = \"sm\" | \"md\" | \"lg\";\n\nexport interface ProjectCardProps {\n name: string;\n imageSrc: string;\n imageAlt?: string;\n href?: string;\n size?: ProjectCardSize;\n inactive?: boolean;\n class?: string;\n}\n\nconst card = style<{ size: ProjectCardSize; isInactive: boolean }>({\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n gap: 8,\n width: \"full\",\n borderRadius: \"lg\",\n borderWidth: 1,\n borderStyle: \"solid\",\n borderColor: \"[var(--color-border)]\",\n backgroundColor: \"[var(--color-bg-200)]\",\n color: \"[var(--color-primary-100)]\",\n textDecoration: \"none\",\n padding: { size: { sm: 12, md: 16, lg: 20 } },\n opacity: { default: 1, isInactive: 0.5 },\n});\n\nconst image = style({\n width: \"full\",\n aspectRatio: \"square\",\n objectFit: \"contain\",\n borderRadius: \"sm\",\n});\n\nconst caption = style<{ size: ProjectCardSize }>({\n width: \"full\",\n textAlign: \"center\",\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\",\n font: { size: { sm: \"ui-sm\", md: \"ui\", lg: \"ui-lg\" } },\n color: \"[var(--color-primary-200)]\",\n});\n\nexport function ProjectCard(props: ProjectCardProps): JSX.Element {\n const size = () => props.size ?? \"sm\";\n const inactive = () => props.inactive ?? false;\n\n const cardContent = () => (\n <>\n <img class={image} src={props.imageSrc} alt={props.imageAlt ?? props.name} />\n <span class={caption({ size: size() })}>{props.name}</span>\n </>\n );\n\n const classes = () => `${card({ size: size(), isInactive: inactive() })} ${props.class ?? \"\"}`;\n\n if (props.href) {\n return (\n <a href={props.href} target=\"_blank\" rel=\"noopener noreferrer\" class={classes()}>\n {cardContent()}\n </a>\n );\n }\n\n return <div class={classes()}>{cardContent()}</div>;\n}\n"],"mappings":";;;AAmBA,MAAM,OAAA,SAAA,UAAA,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBN,MAAM,UAAA,SAAA,UAAA,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUN,SAAgB,YAAY,OAA8B;CACxD,MAAM,aAAa,MAAM,QAAQ;CACjC,MAAM,iBAAiB,MAAM,YAAY;CAEzC,MAAM,oBAAc,QAAA;EAAA,IAAA,OAAA,eAAA,MAAA;EAAA,QAAA,QAAA;GAAA,IAAA,MAEQ,MAAM,UAAQ,OAAO,MAAM,YAAY,MAAM;GAAI,QAAA,IAAA,KAAA,aAAA,MAAA,OAAA,IAAA,IAAA,GAAA;GAAA,SAAA,IAAA,KAAA,aAAA,MAAA,OAAA,IAAA,IAAA,IAAA;GAAA,OAAA;EAAA,GAAA;GAAA,GAAA,KAAA;GAAA,GAAA,KAAA;EAAA,CAAA;EAAA,OAAA;CAAA,GAAA,UAAA;EAAA,IAAA,QAAA,eAAA,OAAA;EAAA,OAAA,aAChC,MAAM,IAAI;EAAA,aAAA,UAAA,OAAtC,QAAQ,EAAE,MAAM,KAAA,EAAO,CAAA,CAAA,CAAA;EAAA,OAAA;CAAA,GAAA,CAAA;CAIxC,MAAM,gBAAgB,GAAG,KAAK;EAAE,MAAM,KAAA;EAAQ,YAAY,SAAA;CAAW,CAAA,EAAA,GAAM,MAAM,SAAS;CAE1F,IAAI,MAAM,MACR,cAAA;EAAA,IAAA,QAAA,eAAA,OAAA;EAAA,OAAA,OAEK,WAAA;EAAA,QAAA,QAAA;GAAA,IAAA,OADM,MAAM,MAAI,OAAmD,QAAA;GAAA,SAAA,IAAA,KAAA,aAAA,OAAA,QAAA,IAAA,IAAA,IAAA;GAAA,SAAA,IAAA,KAAA,UAAA,OAAA,IAAA,IAAA,IAAA;GAAA,OAAA;EAAA,GAAA;GAAA,GAAA,KAAA;GAAA,GAAA,KAAA;EAAA,CAAA;EAAA,OAAA;CAAA,GAAA;CAM1E,cAAA;EAAA,IAAA,QAAA,eAAA,OAAA;EAAA,OAAA,OAA+B,WAAA;EAAA,aAAA,UAAA,OAAZ,QAAA,CAAA,CAAA;EAAA,OAAA;CAAA,GAAA;AACrB"}
@@ -1,131 +0,0 @@
1
- //#region src/custom/project-card/index.tsx
2
- const card = function anonymous(props) {
3
- let rules = " ";
4
- rules += " sd151";
5
- rules += " _ta151";
6
- rules += " eb151";
7
- rules += " Ue151";
8
- rules += " qe151";
9
- rules += " Za151";
10
- rules += " oc151";
11
- rules += " nc151";
12
- rules += " kc151";
13
- rules += " jc151";
14
- rules += " _kb151";
15
- rules += " hb151";
16
- rules += " mb151";
17
- rules += " lb151";
18
- rules += " _jf151";
19
- rules += " izfTM5151";
20
- rules += " gDE5VE151";
21
- rules += " pXDQpyb151";
22
- rules += " _Xa151";
23
- if (props.size === "lg") rules += " Tg151";
24
- else if (props.size === "md") rules += " Tf151";
25
- else if (props.size === "sm") rules += " Te151";
26
- if (props.size === "lg") rules += " Qg151";
27
- else if (props.size === "md") rules += " Qf151";
28
- else if (props.size === "sm") rules += " Qe151";
29
- if (props.size === "lg") rules += " Sg151";
30
- else if (props.size === "md") rules += " Sf151";
31
- else if (props.size === "sm") rules += " Se151";
32
- if (props.size === "lg") rules += " Rg151";
33
- else if (props.size === "md") rules += " Rf151";
34
- else if (props.size === "sm") rules += " Re151";
35
- if (props.isInactive) rules += " _IqmMfn151";
36
- else rules += " _Ib151";
37
- return rules;
38
- };
39
- const image = " Za151 fa151 _Ha151 oa151 na151 ka151 ja151";
40
- const caption = function anonymous(props) {
41
- let rules = " ";
42
- rules += " Za151";
43
- rules += " _Wa151";
44
- rules += " _Nc151";
45
- rules += " Pc151";
46
- rules += " _Yb151";
47
- rules += " _7c151";
48
- if (props.size === "lg") {
49
- rules += " uk151";
50
- rules += " ucJ9TBTb151";
51
- rules += " ud3Euai151";
52
- rules += " uea151";
53
- rules += " ugb151";
54
- rules += " uhd151";
55
- rules += " uje151";
56
- rules += " u2NhKxcl151";
57
- rules += " uic151";
58
- } else if (props.size === "md") {
59
- rules += " uk151";
60
- rules += " ucJ9TBTb151";
61
- rules += " ud3Euai151";
62
- rules += " uea151";
63
- rules += " ugb151";
64
- rules += " uhd151";
65
- rules += " uje151";
66
- rules += " u2NhKxcl151";
67
- rules += " uic151";
68
- } else if (props.size === "sm") {
69
- rules += " uk151";
70
- rules += " ucJ9TBTb151";
71
- rules += " ud3Euai151";
72
- rules += " uea151";
73
- rules += " ugb151";
74
- rules += " uhd151";
75
- rules += " uje151";
76
- rules += " u2NhKxcl151";
77
- rules += " uic151";
78
- }
79
- if (props.size === "lg") {
80
- rules += " -_6BNtrc-d151";
81
- rules += " vx151";
82
- } else if (props.size === "md") {
83
- rules += " -_6BNtrc-c151";
84
- rules += " vx151";
85
- } else if (props.size === "sm") {
86
- rules += " -_6BNtrc-b151";
87
- rules += " vx151";
88
- }
89
- if (props.size === "lg") {
90
- rules += " xb151";
91
- rules += " _xa151";
92
- } else if (props.size === "md") {
93
- rules += " xb151";
94
- rules += " _xa151";
95
- } else if (props.size === "sm") {
96
- rules += " xb151";
97
- rules += " _xa151";
98
- }
99
- if (props.size === "lg") {
100
- rules += " _Fd151";
101
- rules += " _FnuYUweb151";
102
- } else if (props.size === "md") {
103
- rules += " _Fd151";
104
- rules += " _FnuYUweb151";
105
- } else if (props.size === "sm") {
106
- rules += " _Fd151";
107
- rules += " _FnuYUweb151";
108
- }
109
- rules += " pAZZpyb151";
110
- return rules;
111
- };
112
- function ProjectCard(props) {
113
- const size = () => props.size ?? "sm";
114
- const inactive = () => props.inactive ?? false;
115
- const cardContent = () => <>
116
- <img class={image} src={props.imageSrc} alt={props.imageAlt ?? props.name} />
117
- <span class={caption({ size: size() })}>{props.name}</span>
118
- </>;
119
- const classes = () => `${card({
120
- size: size(),
121
- isInactive: inactive()
122
- })} ${props.class ?? ""}`;
123
- if (props.href) return <a href={props.href} target="_blank" rel="noopener noreferrer" class={classes()}>
124
- {cardContent()}
125
- </a>;
126
- return <div class={classes()}>{cardContent()}</div>;
127
- }
128
- //#endregion
129
- export { ProjectCard };
130
-
131
- //# sourceMappingURL=ProjectCard.jsx.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ProjectCard.jsx","names":[],"sources":["../src/custom/project-card/index.tsx"],"sourcesContent":["import type { JSX } from \"solid-js\";\n// Styled via the S2 style() macro through viviana's own seam (../../style →\n// src/style.ts). A square logo/preview tile with a caption, sized by the S2\n// spacing + type ramps and painted in Silapse colors. `inactive` dims it;\n// `href` turns the whole card into a link.\nimport { style } from \"../../style\" with { type: \"macro\" };\n\nexport type ProjectCardSize = \"sm\" | \"md\" | \"lg\";\n\nexport interface ProjectCardProps {\n name: string;\n imageSrc: string;\n imageAlt?: string;\n href?: string;\n size?: ProjectCardSize;\n inactive?: boolean;\n class?: string;\n}\n\nconst card = style<{ size: ProjectCardSize; isInactive: boolean }>({\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n gap: 8,\n width: \"full\",\n borderRadius: \"lg\",\n borderWidth: 1,\n borderStyle: \"solid\",\n borderColor: \"[var(--color-border)]\",\n backgroundColor: \"[var(--color-bg-200)]\",\n color: \"[var(--color-primary-100)]\",\n textDecoration: \"none\",\n padding: { size: { sm: 12, md: 16, lg: 20 } },\n opacity: { default: 1, isInactive: 0.5 },\n});\n\nconst image = style({\n width: \"full\",\n aspectRatio: \"square\",\n objectFit: \"contain\",\n borderRadius: \"sm\",\n});\n\nconst caption = style<{ size: ProjectCardSize }>({\n width: \"full\",\n textAlign: \"center\",\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\",\n font: { size: { sm: \"ui-sm\", md: \"ui\", lg: \"ui-lg\" } },\n color: \"[var(--color-primary-200)]\",\n});\n\nexport function ProjectCard(props: ProjectCardProps): JSX.Element {\n const size = () => props.size ?? \"sm\";\n const inactive = () => props.inactive ?? false;\n\n const cardContent = () => (\n <>\n <img class={image} src={props.imageSrc} alt={props.imageAlt ?? props.name} />\n <span class={caption({ size: size() })}>{props.name}</span>\n </>\n );\n\n const classes = () => `${card({ size: size(), isInactive: inactive() })} ${props.class ?? \"\"}`;\n\n if (props.href) {\n return (\n <a href={props.href} target=\"_blank\" rel=\"noopener noreferrer\" class={classes()}>\n {cardContent()}\n </a>\n );\n }\n\n return <div class={classes()}>{cardContent()}</div>;\n}\n"],"mappings":";AAmBA,MAAM,OAAA,SAAA,UAAA,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBN,MAAM,QAAA;AAON,MAAM,UAAA,SAAA,UAAA,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUN,SAAgB,YAAY,OAA8B;CACxD,MAAM,aAAa,MAAM,QAAQ;CACjC,MAAM,iBAAiB,MAAM,YAAY;CAEzC,MAAM,oBAAoB,EACtB;MACA,CAAC,IAAI,OAAO,OAAO,KAAK,MAAM,UAAU,KAAK,MAAM,YAAY,MAAM,QAAQ;MAC7E,CAAC,KAAK,OAAO,QAAQ,EAAE,MAAM,KAAA,EAAO,CAAA,IAAK,MAAM,KAAI,EAAG,KAAK;IAC7D;CAGF,MAAM,gBAAgB,GAAG,KAAK;EAAE,MAAM,KAAA;EAAQ,YAAY,SAAA;CAAW,CAAA,EAAG,GAAG,MAAM,SAAS;CAE1F,IAAI,MAAM,MACR,OAAO,CACJ,EAAE,MAAM,MAAM,MAAM,gBAAgB,0BAA0B,OAAO,QAAA,GAAW;SAC9E,YAAA,EAAc;MACjB,EAAE;CAIN,OAAA,CAAQ,IAAI,OAAO,QAAA,IAAY,YAAA,EAAA,EAAgB;AACjD"}
@@ -1,2 +0,0 @@
1
- export * from "./custom/timeline-item";
2
- //# sourceMappingURL=TimelineItem.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TimelineItem.d.ts","sourceRoot":"","sources":["../src/TimelineItem.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC"}
@@ -1,137 +0,0 @@
1
- /* empty css */
2
- import { Avatar } from "@proyecto-viviana/solid-spectrum";
3
- import { className, createComponent, effect, getNextElement, getNextMarker, insert, template } from "solid-js/web";
4
- import { Show } from "solid-js";
5
- //#region src/custom/timeline-item/index.tsx
6
- var _tmpl$ = /*#__PURE__*/ template(`<span class=" xd151 _xa151 xX0cczbc151 _xX0cczba151 pO550xe151">`), _tmpl$2 = /*#__PURE__*/ template(`<div><div class=" sd151 eb151 _Ca151 Ug151 qg151"><!$><!/><!$><!/><!$><!/></div><div class=" sd151 eb151 _Ca151 _Wa151 uk151 ucJ9TBTb151 ud3Euai151 uea151 ugb151 uhd151 uje151 u2NhKxcl151 uic151 -_6BNtrc-c151 vx151 xb151 _xa151 _Fd151 _FnuYUweb151 pO550xe151"><span>`);
7
- const eventMessages = {
8
- follow: (left, right) => [
9
- (() => {
10
- var _el$ = getNextElement(_tmpl$);
11
- insert(_el$, left);
12
- return _el$;
13
- })(),
14
- " ha empezado a seguir a ",
15
- (() => {
16
- var _el$2 = getNextElement(_tmpl$);
17
- insert(_el$2, right);
18
- return _el$2;
19
- })()
20
- ],
21
- like: (left, right) => [
22
- (() => {
23
- var _el$3 = getNextElement(_tmpl$);
24
- insert(_el$3, left);
25
- return _el$3;
26
- })(),
27
- " le ha dado like a ",
28
- (() => {
29
- var _el$4 = getNextElement(_tmpl$);
30
- insert(_el$4, right);
31
- return _el$4;
32
- })()
33
- ],
34
- comment: (left, right) => [
35
- (() => {
36
- var _el$5 = getNextElement(_tmpl$);
37
- insert(_el$5, left);
38
- return _el$5;
39
- })(),
40
- " ha comentado en ",
41
- (() => {
42
- var _el$6 = getNextElement(_tmpl$);
43
- insert(_el$6, right);
44
- return _el$6;
45
- })()
46
- ],
47
- event: (left, right) => [
48
- (() => {
49
- var _el$7 = getNextElement(_tmpl$);
50
- insert(_el$7, left);
51
- return _el$7;
52
- })(),
53
- " asistirá al evento de ",
54
- (() => {
55
- var _el$8 = getNextElement(_tmpl$);
56
- insert(_el$8, right);
57
- return _el$8;
58
- })()
59
- ],
60
- custom: () => null
61
- };
62
- const card = " sh151 _ta151 Ui151 qi151 Tg151 Qg151 Sg151 Rg151 oe151 ne151 ke151 je151 _kb151 hb151 mb151 lb151 _jf151 iJJKqyb151 gDE5VE151";
63
- function TimelineItem(props) {
64
- const type = () => props.type ?? "follow";
65
- const leftName = () => props.leftUser?.name ?? "";
66
- const rightName = () => props.rightUser?.name ?? "";
67
- const renderIcon = () => {
68
- const icon = props.icon;
69
- if (!icon) return null;
70
- if (typeof icon === "string") return icon;
71
- return icon();
72
- };
73
- const renderMessage = () => {
74
- const message = props.message;
75
- if (!message) return null;
76
- if (typeof message === "string") return message;
77
- return message();
78
- };
79
- return (() => {
80
- var _el$9 = getNextElement(_tmpl$2), _el$0 = _el$9.firstChild, _el$1 = _el$0.firstChild, [_el$10, _co$] = getNextMarker(_el$1.nextSibling), _el$11 = _el$10.nextSibling, [_el$12, _co$2] = getNextMarker(_el$11.nextSibling), _el$13 = _el$12.nextSibling, [_el$14, _co$3] = getNextMarker(_el$13.nextSibling), _el$16 = _el$0.nextSibling.firstChild;
81
- insert(_el$0, createComponent(Show, {
82
- get when() {
83
- return props.leftUser;
84
- },
85
- get children() {
86
- return createComponent(Avatar, {
87
- get src() {
88
- return props.leftUser.avatar;
89
- },
90
- get alt() {
91
- return props.leftUser.name;
92
- }
93
- });
94
- }
95
- }), _el$10, _co$);
96
- insert(_el$0, createComponent(Show, {
97
- get when() {
98
- return props.icon;
99
- },
100
- get children() {
101
- return renderIcon();
102
- }
103
- }), _el$12, _co$2);
104
- insert(_el$0, createComponent(Show, {
105
- get when() {
106
- return props.rightUser;
107
- },
108
- get children() {
109
- return createComponent(Avatar, {
110
- get src() {
111
- return props.rightUser.avatar;
112
- },
113
- get alt() {
114
- return props.rightUser.name;
115
- }
116
- });
117
- }
118
- }), _el$14, _co$3);
119
- insert(_el$16, createComponent(Show, {
120
- get when() {
121
- return props.message;
122
- },
123
- get fallback() {
124
- return eventMessages[type()](leftName(), rightName());
125
- },
126
- get children() {
127
- return renderMessage();
128
- }
129
- }));
130
- effect(() => className(_el$9, `${card} ${props.class ?? ""}`));
131
- return _el$9;
132
- })();
133
- }
134
- //#endregion
135
- export { TimelineItem };
136
-
137
- //# sourceMappingURL=TimelineItem.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TimelineItem.js","names":[],"sources":["../src/custom/timeline-item/index.tsx"],"sourcesContent":["import type { JSX } from \"solid-js\";\nimport { Show } from \"solid-js\";\nimport { Avatar } from \"@proyecto-viviana/solid-spectrum\";\n// Styled via the S2 style() macro through viviana's own seam (../../style →\n// src/style.ts). A social timeline event card (two avatars + icon + message)\n// on the S2 spacing/radius ramps in Silapse colors.\nimport { style } from \"../../style\" with { type: \"macro\" };\n\nexport type TimelineEventType = \"follow\" | \"like\" | \"comment\" | \"event\" | \"custom\";\n\nexport interface TimelineItemProps {\n type?: TimelineEventType;\n /**\n * Icon to display between the two avatars.\n * Use a function returning JSX for SSR compatibility: `icon={() => <MyIcon />}`\n * Or pass a simple string for text-based icons: `icon=\"👋\"`\n */\n icon?: string | (() => JSX.Element);\n leftUser?: {\n name: string;\n avatar?: string;\n };\n rightUser?: {\n name: string;\n avatar?: string;\n };\n /**\n * Custom message content.\n * Use a function returning JSX for SSR compatibility: `message={() => <span>...</span>}`\n * Or pass a simple string.\n */\n message?: string | (() => JSX.Element);\n class?: string;\n}\n\nconst nameEmph = style({\n fontWeight: \"bold\",\n // Emphasis via weight, not color: `--color-accent` (#df5c9a) fails AA on the\n // `--color-bg-200` card (~1.9:1 light, ~4.48:1 dark) and no accent shade clears\n // 4.5:1 in BOTH themes. The flipping `--color-text` does (7.53 light / 15.33\n // dark); the `bold` weight sets the names apart from the message body.\n color: \"[var(--color-text)]\",\n});\n\nconst eventMessages: Record<TimelineEventType, (left: string, right: string) => JSX.Element> = {\n follow: (left, right) => (\n <>\n <span class={nameEmph}>{left}</span>\n {\" ha empezado a seguir a \"}\n <span class={nameEmph}>{right}</span>\n </>\n ),\n like: (left, right) => (\n <>\n <span class={nameEmph}>{left}</span>\n {\" le ha dado like a \"}\n <span class={nameEmph}>{right}</span>\n </>\n ),\n comment: (left, right) => (\n <>\n <span class={nameEmph}>{left}</span>\n {\" ha comentado en \"}\n <span class={nameEmph}>{right}</span>\n </>\n ),\n event: (left, right) => (\n <>\n <span class={nameEmph}>{left}</span>\n {\" asistirá al evento de \"}\n <span class={nameEmph}>{right}</span>\n </>\n ),\n custom: () => null,\n};\n\nconst card = style({\n display: \"inline-flex\",\n flexDirection: \"column\",\n gap: 20,\n padding: 20,\n borderRadius: \"xl\",\n borderWidth: 1,\n borderStyle: \"solid\",\n borderColor: \"[var(--color-primary-700)]\",\n backgroundColor: \"[var(--color-bg-200)]\",\n});\n\nconst avatarsRow = style({\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n gap: 12,\n});\n\nconst messageRow = style({\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n textAlign: \"center\",\n font: \"ui\",\n // `--color-text-secondary` renders 3.84:1 on the light `--color-bg-200` card\n // (fails the 4.5:1 small-text floor); the flipping `--color-text` clears it in\n // both themes. `color` stays after `font` (the S2 macro font-shorthand default\n // color would otherwise win on source order).\n color: \"[var(--color-text)]\",\n});\n\nexport function TimelineItem(props: TimelineItemProps) {\n const type = () => props.type ?? \"follow\";\n const leftName = () => props.leftUser?.name ?? \"\";\n const rightName = () => props.rightUser?.name ?? \"\";\n\n const renderIcon = () => {\n const icon = props.icon;\n if (!icon) return null;\n if (typeof icon === \"string\") return icon;\n return icon();\n };\n\n const renderMessage = () => {\n const message = props.message;\n if (!message) return null;\n if (typeof message === \"string\") return message;\n return message();\n };\n\n return (\n <div class={`${card} ${props.class ?? \"\"}`}>\n <div class={avatarsRow}>\n <Show when={props.leftUser}>\n <Avatar src={props.leftUser!.avatar} alt={props.leftUser!.name} />\n </Show>\n <Show when={props.icon}>{renderIcon()}</Show>\n <Show when={props.rightUser}>\n <Avatar src={props.rightUser!.avatar} alt={props.rightUser!.name} />\n </Show>\n </div>\n <div class={messageRow}>\n <span>\n <Show when={props.message} fallback={eventMessages[type()](leftName(), rightName())}>\n {renderMessage()}\n </Show>\n </span>\n </div>\n </div>\n );\n}\n"],"mappings":"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"}
@@ -1,70 +0,0 @@
1
- /* empty css */
2
- import { Avatar } from "@proyecto-viviana/solid-spectrum";
3
- import { Show } from "solid-js";
4
- //#region src/custom/timeline-item/index.tsx
5
- const nameEmph = " xd151 _xa151 xX0cczbc151 _xX0cczba151 pO550xe151";
6
- const eventMessages = {
7
- follow: (left, right) => <>
8
- <span class={nameEmph}>{left}</span>
9
- {" ha empezado a seguir a "}
10
- <span class={nameEmph}>{right}</span>
11
- </>,
12
- like: (left, right) => <>
13
- <span class={nameEmph}>{left}</span>
14
- {" le ha dado like a "}
15
- <span class={nameEmph}>{right}</span>
16
- </>,
17
- comment: (left, right) => <>
18
- <span class={nameEmph}>{left}</span>
19
- {" ha comentado en "}
20
- <span class={nameEmph}>{right}</span>
21
- </>,
22
- event: (left, right) => <>
23
- <span class={nameEmph}>{left}</span>
24
- {" asistirá al evento de "}
25
- <span class={nameEmph}>{right}</span>
26
- </>,
27
- custom: () => null
28
- };
29
- const card = " sh151 _ta151 Ui151 qi151 Tg151 Qg151 Sg151 Rg151 oe151 ne151 ke151 je151 _kb151 hb151 mb151 lb151 _jf151 iJJKqyb151 gDE5VE151";
30
- const avatarsRow = " sd151 eb151 _Ca151 Ug151 qg151";
31
- const messageRow = " sd151 eb151 _Ca151 _Wa151 uk151 ucJ9TBTb151 ud3Euai151 uea151 ugb151 uhd151 uje151 u2NhKxcl151 uic151 -_6BNtrc-c151 vx151 xb151 _xa151 _Fd151 _FnuYUweb151 pO550xe151";
32
- function TimelineItem(props) {
33
- const type = () => props.type ?? "follow";
34
- const leftName = () => props.leftUser?.name ?? "";
35
- const rightName = () => props.rightUser?.name ?? "";
36
- const renderIcon = () => {
37
- const icon = props.icon;
38
- if (!icon) return null;
39
- if (typeof icon === "string") return icon;
40
- return icon();
41
- };
42
- const renderMessage = () => {
43
- const message = props.message;
44
- if (!message) return null;
45
- if (typeof message === "string") return message;
46
- return message();
47
- };
48
- return <div class={`${card} ${props.class ?? ""}`}>
49
- <div class={avatarsRow}>
50
- <Show when={props.leftUser}>
51
- <Avatar src={props.leftUser.avatar} alt={props.leftUser.name} />
52
- </Show>
53
- <Show when={props.icon}>{renderIcon()}</Show>
54
- <Show when={props.rightUser}>
55
- <Avatar src={props.rightUser.avatar} alt={props.rightUser.name} />
56
- </Show>
57
- </div>
58
- <div class={messageRow}>
59
- <span>
60
- <Show when={props.message} fallback={eventMessages[type()](leftName(), rightName())}>
61
- {renderMessage()}
62
- </Show>
63
- </span>
64
- </div>
65
- </div>;
66
- }
67
- //#endregion
68
- export { TimelineItem };
69
-
70
- //# sourceMappingURL=TimelineItem.jsx.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TimelineItem.jsx","names":[],"sources":["../src/custom/timeline-item/index.tsx"],"sourcesContent":["import type { JSX } from \"solid-js\";\nimport { Show } from \"solid-js\";\nimport { Avatar } from \"@proyecto-viviana/solid-spectrum\";\n// Styled via the S2 style() macro through viviana's own seam (../../style →\n// src/style.ts). A social timeline event card (two avatars + icon + message)\n// on the S2 spacing/radius ramps in Silapse colors.\nimport { style } from \"../../style\" with { type: \"macro\" };\n\nexport type TimelineEventType = \"follow\" | \"like\" | \"comment\" | \"event\" | \"custom\";\n\nexport interface TimelineItemProps {\n type?: TimelineEventType;\n /**\n * Icon to display between the two avatars.\n * Use a function returning JSX for SSR compatibility: `icon={() => <MyIcon />}`\n * Or pass a simple string for text-based icons: `icon=\"👋\"`\n */\n icon?: string | (() => JSX.Element);\n leftUser?: {\n name: string;\n avatar?: string;\n };\n rightUser?: {\n name: string;\n avatar?: string;\n };\n /**\n * Custom message content.\n * Use a function returning JSX for SSR compatibility: `message={() => <span>...</span>}`\n * Or pass a simple string.\n */\n message?: string | (() => JSX.Element);\n class?: string;\n}\n\nconst nameEmph = style({\n fontWeight: \"bold\",\n // Emphasis via weight, not color: `--color-accent` (#df5c9a) fails AA on the\n // `--color-bg-200` card (~1.9:1 light, ~4.48:1 dark) and no accent shade clears\n // 4.5:1 in BOTH themes. The flipping `--color-text` does (7.53 light / 15.33\n // dark); the `bold` weight sets the names apart from the message body.\n color: \"[var(--color-text)]\",\n});\n\nconst eventMessages: Record<TimelineEventType, (left: string, right: string) => JSX.Element> = {\n follow: (left, right) => (\n <>\n <span class={nameEmph}>{left}</span>\n {\" ha empezado a seguir a \"}\n <span class={nameEmph}>{right}</span>\n </>\n ),\n like: (left, right) => (\n <>\n <span class={nameEmph}>{left}</span>\n {\" le ha dado like a \"}\n <span class={nameEmph}>{right}</span>\n </>\n ),\n comment: (left, right) => (\n <>\n <span class={nameEmph}>{left}</span>\n {\" ha comentado en \"}\n <span class={nameEmph}>{right}</span>\n </>\n ),\n event: (left, right) => (\n <>\n <span class={nameEmph}>{left}</span>\n {\" asistirá al evento de \"}\n <span class={nameEmph}>{right}</span>\n </>\n ),\n custom: () => null,\n};\n\nconst card = style({\n display: \"inline-flex\",\n flexDirection: \"column\",\n gap: 20,\n padding: 20,\n borderRadius: \"xl\",\n borderWidth: 1,\n borderStyle: \"solid\",\n borderColor: \"[var(--color-primary-700)]\",\n backgroundColor: \"[var(--color-bg-200)]\",\n});\n\nconst avatarsRow = style({\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n gap: 12,\n});\n\nconst messageRow = style({\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n textAlign: \"center\",\n font: \"ui\",\n // `--color-text-secondary` renders 3.84:1 on the light `--color-bg-200` card\n // (fails the 4.5:1 small-text floor); the flipping `--color-text` clears it in\n // both themes. `color` stays after `font` (the S2 macro font-shorthand default\n // color would otherwise win on source order).\n color: \"[var(--color-text)]\",\n});\n\nexport function TimelineItem(props: TimelineItemProps) {\n const type = () => props.type ?? \"follow\";\n const leftName = () => props.leftUser?.name ?? \"\";\n const rightName = () => props.rightUser?.name ?? \"\";\n\n const renderIcon = () => {\n const icon = props.icon;\n if (!icon) return null;\n if (typeof icon === \"string\") return icon;\n return icon();\n };\n\n const renderMessage = () => {\n const message = props.message;\n if (!message) return null;\n if (typeof message === \"string\") return message;\n return message();\n };\n\n return (\n <div class={`${card} ${props.class ?? \"\"}`}>\n <div class={avatarsRow}>\n <Show when={props.leftUser}>\n <Avatar src={props.leftUser!.avatar} alt={props.leftUser!.name} />\n </Show>\n <Show when={props.icon}>{renderIcon()}</Show>\n <Show when={props.rightUser}>\n <Avatar src={props.rightUser!.avatar} alt={props.rightUser!.name} />\n </Show>\n </div>\n <div class={messageRow}>\n <span>\n <Show when={props.message} fallback={eventMessages[type()](leftName(), rightName())}>\n {renderMessage()}\n </Show>\n </span>\n </div>\n </div>\n );\n}\n"],"mappings":";;;;AAmCA,MAAM,WAAA;AASN,MAAM,gBAAyF;CAC7F,SAAS,MAAM,UAAU,EACrB;MACA,CAAC,KAAK,OAAO,WAAW,KAAA,EAAO,KAAK;OACnC,2BAA2B;MAC5B,CAAC,KAAK,OAAO,WAAW,MAAA,EAAQ,KAAK;IACvC;CAEF,OAAO,MAAM,UAAU,EACnB;MACA,CAAC,KAAK,OAAO,WAAW,KAAA,EAAO,KAAK;OACnC,sBAAsB;MACvB,CAAC,KAAK,OAAO,WAAW,MAAA,EAAQ,KAAK;IACvC;CAEF,UAAU,MAAM,UAAU,EACtB;MACA,CAAC,KAAK,OAAO,WAAW,KAAA,EAAO,KAAK;OACnC,oBAAoB;MACrB,CAAC,KAAK,OAAO,WAAW,MAAA,EAAQ,KAAK;IACvC;CAEF,QAAQ,MAAM,UAAU,EACpB;MACA,CAAC,KAAK,OAAO,WAAW,KAAA,EAAO,KAAK;OACnC,0BAA0B;MAC3B,CAAC,KAAK,OAAO,WAAW,MAAA,EAAQ,KAAK;IACvC;CAEF,cAAc;AAChB;AAEA,MAAM,OAAA;AAYN,MAAM,aAAA;AAON,MAAM,aAAA;AAaN,SAAgB,aAAa,OAAwB;CACnD,MAAM,aAAa,MAAM,QAAQ;CACjC,MAAM,iBAAiB,MAAM,UAAU,QAAQ;CAC/C,MAAM,kBAAkB,MAAM,WAAW,QAAQ;CAEjD,MAAM,mBAAa;EACjB,MAAM,OAAO,MAAM;EACnB,IAAI,CAAC,MAAM,OAAO;EAClB,IAAI,OAAO,SAAS,UAAU,OAAO;EACrC,OAAO,KAAA;CACT;CAEA,MAAM,sBAAgB;EACpB,MAAM,UAAU,MAAM;EACtB,IAAI,CAAC,SAAS,OAAO;EACrB,IAAI,OAAO,YAAY,UAAU,OAAO;EACxC,OAAO,QAAA;CACT;CAEA,OAAO,CACJ,IAAI,OAAO,GAAG,KAAK,GAAG,MAAM,SAAS,MAAM;MAC1C,CAAC,IAAI,OAAO,YAAY;QACtB,CAAC,KAAK,MAAM,MAAM,UAAU;UAC1B,CAAC,OAAO,KAAK,MAAM,SAAU,QAAQ,KAAK,MAAM,SAAU,QAAQ;QACpE,EAAE,KAAK;QACP,CAAC,KAAK,MAAM,MAAM,OAAO,WAAA,EAAA,EAAe,KAAK;QAC7C,CAAC,KAAK,MAAM,MAAM,WAAW;UAC3B,CAAC,OAAO,KAAK,MAAM,UAAW,QAAQ,KAAK,MAAM,UAAW,QAAQ;QACtE,EAAE,KAAK;MACT,EAAE,IAAI;MACN,CAAC,IAAI,OAAO,YAAY;QACtB,CAAC,KAAK;UACJ,CAAC,KAAK,MAAM,MAAM,SAAS,UAAU,cAAc,KAAA,GAAQ,SAAA,GAAY,UAAA,CAAA,GAAc;aAClF,cAAA,EAAgB;UACnB,EAAE,KAAK;QACT,EAAE,KAAK;MACT,EAAE,IAAI;IACR,EAAE;AAEN"}
package/dist/chip2.js DELETED
@@ -1,82 +0,0 @@
1
- import { createComponent, getNextElement, insert, memo, template } from "solid-js/web";
2
- import { Show } from "solid-js";
3
- import { Button } from "@proyecto-viviana/solidaria-components";
4
- //#region src/custom/chip/index.tsx
5
- var _tmpl$ = /*#__PURE__*/ template(`<span>`);
6
- const chip = function anonymous(props) {
7
- let rules = " ";
8
- rules += " sh151";
9
- rules += " eb151";
10
- rules += " _Ca151";
11
- rules += " qc151";
12
- rules += " qsd151";
13
- rules += " Mg151";
14
- rules += " ZJ151";
15
- rules += " Se151";
16
- rules += " Re151";
17
- rules += " og151";
18
- rules += " ng151";
19
- rules += " kg151";
20
- rules += " jg151";
21
- rules += " _jf151";
22
- rules += " _kc151";
23
- rules += " hc151";
24
- rules += " mc151";
25
- rules += " lc151";
26
- rules += " uk151";
27
- rules += " ucJ9TBTb151";
28
- rules += " ud3Euai151";
29
- rules += " uea151";
30
- rules += " ugb151";
31
- rules += " uhd151";
32
- rules += " uje151";
33
- rules += " u2NhKxcl151";
34
- rules += " uic151";
35
- rules += " -_6BNtrc-b151";
36
- rules += " vx151";
37
- rules += " xb151";
38
- rules += " _xa151";
39
- rules += " _Fd151";
40
- rules += " _FnuYUweb151";
41
- if (props.variant === "outline") rules += " pAZZpyb151";
42
- else if (props.variant === "accent") rules += " padAQ7151";
43
- else if (props.variant === "secondary") rules += " pAZZpyb151";
44
- else if (props.variant === "primary") rules += " pXDQpyb151";
45
- if (props.variant === "outline") rules += " i6nBqyb151";
46
- else rules += " iA151";
47
- if (props.variant === "outline") rules += " g9151";
48
- else if (props.variant === "accent") rules += " gj1j4Pd151";
49
- else if (props.variant === "secondary") rules += " g0iWVE151";
50
- else if (props.variant === "primary") rules += " gJJKqyb151";
51
- return rules;
52
- };
53
- function Chip(props) {
54
- const renderIcon = () => {
55
- const icon = props.icon;
56
- if (!icon) return null;
57
- if (typeof icon === "string") return icon;
58
- return icon();
59
- };
60
- return createComponent(Button, {
61
- get ["class"]() {
62
- return `${chip({ variant: props.variant ?? "primary" })} ${props.class ?? ""}`;
63
- },
64
- onPress: () => props.onClick?.(),
65
- get children() {
66
- return [createComponent(Show, {
67
- get when() {
68
- return props.icon;
69
- },
70
- get children() {
71
- var _el$ = getNextElement(_tmpl$);
72
- insert(_el$, renderIcon);
73
- return _el$;
74
- }
75
- }), memo(() => props.text)];
76
- }
77
- });
78
- }
79
- //#endregion
80
- export { Chip as t };
81
-
82
- //# sourceMappingURL=chip2.js.map
package/dist/chip2.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"chip2.js","names":[],"sources":["../src/custom/chip/index.tsx"],"sourcesContent":["import type { JSX } from \"solid-js\";\nimport { Show } from \"solid-js\";\nimport { Button as HeadlessButton } from \"@proyecto-viviana/solidaria-components\";\n// Styled via the S2 style() macro through viviana's own seam (../../style →\n// src/style.ts). S2 named tokens carry the shape (mirrors Badge's size-S\n// control: minHeight 24, 2px border, ui-sm font, pill radius); Silapse colors\n// ride in as arbitrary `[var(--color-*)]` values.\nimport { style } from \"../../style\" with { type: \"macro\" };\n\nexport type ChipVariant = \"primary\" | \"secondary\" | \"accent\" | \"outline\";\n\nexport interface ChipProps {\n text: string;\n variant?: ChipVariant;\n onClick?: () => void;\n /**\n * Icon to display before the text.\n * Use a function returning JSX for SSR compatibility: `icon={() => <MyIcon />}`\n * Or pass a simple string for text-based icons: `icon=\"★\"`\n */\n icon?: string | (() => JSX.Element);\n class?: string;\n}\n\nconst chip = style<{ variant: ChipVariant }>({\n display: \"inline-flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n columnGap: \"text-to-visual\",\n minHeight: 24,\n width: \"fit\",\n paddingX: 12,\n borderRadius: \"full\",\n borderStyle: \"solid\",\n borderWidth: 2,\n font: \"ui-sm\",\n borderColor: {\n default: \"transparent\",\n variant: { outline: \"[var(--color-primary-600)]\" },\n },\n backgroundColor: {\n variant: {\n primary: \"[var(--color-primary-700)]\",\n secondary: \"[var(--color-bg-100)]\",\n accent: \"[var(--color-accent)]\",\n outline: \"transparent\",\n },\n },\n color: {\n variant: {\n primary: \"[var(--color-primary-100)]\",\n secondary: \"[var(--color-primary-200)]\",\n // WCAG AA fix: accent text on the pink accent fill. The near-white\n // `--color-bg-400` gave only 2.74:1 in light mode (fail); the darkest\n // grey token reaches 5.24:1 light / 6.14:1 dark — the smallest existing-\n // token change that clears the 4.5:1 floor for this ui-sm label.\n accent: \"[var(--color-grey-900)]\",\n outline: \"[var(--color-primary-200)]\",\n },\n },\n});\n\nexport function Chip(props: ChipProps) {\n const renderIcon = () => {\n const icon = props.icon;\n if (!icon) return null;\n if (typeof icon === \"string\") return icon;\n return icon();\n };\n\n return (\n <HeadlessButton\n class={`${chip({ variant: props.variant ?? \"primary\" })} ${props.class ?? \"\"}`}\n onPress={() => props.onClick?.()}\n >\n <Show when={props.icon}>\n <span>{renderIcon()}</span>\n </Show>\n {props.text}\n </HeadlessButton>\n );\n}\n"],"mappings":";;;;;AAwBA,MAAM,OAAA,SAAA,UAAA,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCN,SAAgB,KAAK,OAAgB;CACnC,MAAM,mBAAa;EACjB,MAAM,OAAO,MAAM;EACnB,IAAI,CAAC,MAAM,OAAO;EAClB,IAAI,OAAO,SAAS,UAAU,OAAO;EACrC,OAAO,KAAA;CACT;CAEA,OAAA,gBACG,QAAA;EAAA,KAAA,WAAA;GAAA,OACQ,GAAG,KAAK,EAAE,SAAS,MAAM,WAAW,UAAU,CAAA,EAAA,GAAM,MAAM,SAAS;EAAI;EAC9E,eAAe,MAAM,UAAO;EAAA,IAAA,WAAA;GAAA,OAAA,CAAA,gBAE3B,MAAA;IAAA,IAAK,OAAA;KAAA,OAAM,MAAM;IAAI;IAAA,IAAA,WAAA;KAAA,IAAA,OAAA,eAAA,MAAA;KAAA,OAAA,MACb,UAAA;KAAA,OAAA;IAAA;GAAA,CAAA,GAAA,WAER,MAAM,IAAI,CAAA;EAAA;CAAA,CAAA;AAGjB"}