@clicoh/orion-library 1.2.0-beta.20 → 1.2.0-beta.22

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 (93) hide show
  1. package/assets/avatares/caja-chispa.png +0 -0
  2. package/assets/avatares/caja.png +0 -0
  3. package/assets/avatares/cohete.png +0 -0
  4. package/assets/avatares/dino.png +0 -0
  5. package/assets/avatares/pulpo-lentes.png +0 -0
  6. package/assets/avatares/pulpo-verde.png +0 -0
  7. package/assets/avatares/pulpo.png +0 -0
  8. package/assets/cifras/alerta.png +0 -0
  9. package/assets/cifras/duda.png +0 -0
  10. package/assets/cifras/error.png +0 -0
  11. package/assets/cifras/monedas.png +0 -0
  12. package/assets/cifras/reloj.png +0 -0
  13. package/assets/cifras/visto.png +0 -0
  14. package/assets/css/expresivo.css +111 -10
  15. package/dist/components/02-molecules/ImageViewer/ImageViewer.d.ts +35 -3
  16. package/dist/components/02-molecules/ImageViewer/ImageViewer.d.ts.map +1 -1
  17. package/dist/components/02-molecules/ImageViewer/ImageViewer.jsx +193 -31
  18. package/dist/components/02-molecules/ImageViewer/ImageViewer.jsx.map +1 -1
  19. package/dist/components/02-molecules/ImageViewer/ImageViewerDocument.d.ts +52 -0
  20. package/dist/components/02-molecules/ImageViewer/ImageViewerDocument.d.ts.map +1 -0
  21. package/dist/components/02-molecules/ImageViewer/ImageViewerDocument.jsx +78 -0
  22. package/dist/components/02-molecules/ImageViewer/ImageViewerDocument.jsx.map +1 -0
  23. package/dist/components/02-molecules/ImageViewer/ImageViewerImage.d.ts +8 -2
  24. package/dist/components/02-molecules/ImageViewer/ImageViewerImage.d.ts.map +1 -1
  25. package/dist/components/02-molecules/ImageViewer/ImageViewerImage.jsx +10 -4
  26. package/dist/components/02-molecules/ImageViewer/ImageViewerImage.jsx.map +1 -1
  27. package/dist/components/02-molecules/ImageViewer/usePdfPages.d.ts +20 -0
  28. package/dist/components/02-molecules/ImageViewer/usePdfPages.d.ts.map +1 -0
  29. package/dist/components/02-molecules/ImageViewer/usePdfPages.js +113 -0
  30. package/dist/components/02-molecules/ImageViewer/usePdfPages.js.map +1 -0
  31. package/dist/components/03-organisms/DataTable/DataTable.d.ts.map +1 -1
  32. package/dist/components/03-organisms/DataTable/DataTable.jsx +1 -1
  33. package/dist/components/03-organisms/DataTable/DataTable.jsx.map +1 -1
  34. package/expresivo/ExpChip/ExpChip.d.ts +15 -5
  35. package/expresivo/ExpChip/ExpChip.d.ts.map +1 -1
  36. package/expresivo/ExpChip/ExpChip.jsx +25 -4
  37. package/expresivo/ExpChip/ExpChip.jsx.map +1 -1
  38. package/expresivo/ExpJourneyTrack/ExpJourneyTrack.d.ts +4 -0
  39. package/expresivo/ExpJourneyTrack/ExpJourneyTrack.d.ts.map +1 -1
  40. package/expresivo/ExpJourneyTrack/ExpJourneyTrack.jsx +6 -2
  41. package/expresivo/ExpJourneyTrack/ExpJourneyTrack.jsx.map +1 -1
  42. package/expresivo/ExpLadder/ExpLadder.d.ts +42 -0
  43. package/expresivo/ExpLadder/ExpLadder.d.ts.map +1 -0
  44. package/expresivo/ExpLadder/ExpLadder.jsx +82 -0
  45. package/expresivo/ExpLadder/ExpLadder.jsx.map +1 -0
  46. package/expresivo/ExpLadder/index.d.ts +3 -0
  47. package/expresivo/ExpLadder/index.d.ts.map +1 -0
  48. package/expresivo/ExpLadder/index.js +2 -0
  49. package/expresivo/ExpLadder/index.js.map +1 -0
  50. package/expresivo/ExpPageHero/ExpPageHero.d.ts +3 -3
  51. package/expresivo/ExpPageHero/ExpPageHero.jsx +4 -4
  52. package/expresivo/ExpPageHero/ExpPageHero.jsx.map +1 -1
  53. package/expresivo/ExpPillButton/ExpPillButton.d.ts +4 -1
  54. package/expresivo/ExpPillButton/ExpPillButton.d.ts.map +1 -1
  55. package/expresivo/ExpPillButton/ExpPillButton.jsx +6 -4
  56. package/expresivo/ExpPillButton/ExpPillButton.jsx.map +1 -1
  57. package/expresivo/ExpRepoAvatar/ExpRepoAvatar.d.ts +28 -0
  58. package/expresivo/ExpRepoAvatar/ExpRepoAvatar.d.ts.map +1 -0
  59. package/expresivo/ExpRepoAvatar/ExpRepoAvatar.jsx +32 -0
  60. package/expresivo/ExpRepoAvatar/ExpRepoAvatar.jsx.map +1 -0
  61. package/expresivo/ExpRepoAvatar/catalog.d.ts +6 -0
  62. package/expresivo/ExpRepoAvatar/catalog.d.ts.map +1 -0
  63. package/expresivo/ExpRepoAvatar/catalog.js +18 -0
  64. package/expresivo/ExpRepoAvatar/catalog.js.map +1 -0
  65. package/expresivo/ExpRepoAvatar/index.d.ts +4 -0
  66. package/expresivo/ExpRepoAvatar/index.d.ts.map +1 -0
  67. package/expresivo/ExpRepoAvatar/index.js +2 -0
  68. package/expresivo/ExpRepoAvatar/index.js.map +1 -0
  69. package/expresivo/ExpSearchField/ExpSearchField.d.ts +49 -0
  70. package/expresivo/ExpSearchField/ExpSearchField.d.ts.map +1 -0
  71. package/expresivo/ExpSearchField/ExpSearchField.jsx +81 -0
  72. package/expresivo/ExpSearchField/ExpSearchField.jsx.map +1 -0
  73. package/expresivo/ExpSearchField/index.d.ts +3 -0
  74. package/expresivo/ExpSearchField/index.d.ts.map +1 -0
  75. package/expresivo/ExpSearchField/index.js +2 -0
  76. package/expresivo/ExpSearchField/index.js.map +1 -0
  77. package/expresivo/ExpStatIcon/ExpStatIcon.d.ts +25 -0
  78. package/expresivo/ExpStatIcon/ExpStatIcon.d.ts.map +1 -0
  79. package/expresivo/ExpStatIcon/ExpStatIcon.jsx +29 -0
  80. package/expresivo/ExpStatIcon/ExpStatIcon.jsx.map +1 -0
  81. package/expresivo/ExpStatIcon/catalog.d.ts +6 -0
  82. package/expresivo/ExpStatIcon/catalog.d.ts.map +1 -0
  83. package/expresivo/ExpStatIcon/catalog.js +16 -0
  84. package/expresivo/ExpStatIcon/catalog.js.map +1 -0
  85. package/expresivo/ExpStatIcon/index.d.ts +4 -0
  86. package/expresivo/ExpStatIcon/index.d.ts.map +1 -0
  87. package/expresivo/ExpStatIcon/index.js +2 -0
  88. package/expresivo/ExpStatIcon/index.js.map +1 -0
  89. package/expresivo/index.d.ts +4 -0
  90. package/expresivo/index.d.ts.map +1 -1
  91. package/expresivo/index.js +4 -0
  92. package/expresivo/index.js.map +1 -1
  93. package/package.json +2 -1
@@ -0,0 +1,81 @@
1
+ 'use client';
2
+ import { Input, Paragraph } from '@clicoh/orion-library';
3
+ import clsx from 'clsx';
4
+ import { useId, } from 'react';
5
+ import { FiSearch } from 'react-icons/fi';
6
+ import { useExpScope } from '../ExpScope/ExpScope';
7
+ import { ExpPillButton } from '../ExpPillButton/ExpPillButton';
8
+ /**
9
+ * Search field drawn as a white pill with a soft relief, a lens on the left
10
+ * and its action inside, on the right. On hover it lifts with a lavender
11
+ * halo; on focus the ring turns lavender. Enter runs the action.
12
+ *
13
+ * Outside an `ExpScope` it falls back to the core `Input`, with a search
14
+ * icon, and a `Button` `second` next to it.
15
+ *
16
+ * @component
17
+ * @example
18
+ * <ExpSearchField
19
+ * label="Ticket number"
20
+ * placeholder="Search in Flow"
21
+ * input={{ value, onChange: (event) => setValue(event.target.value) }}
22
+ * action={{ label: 'Search', onClick: search, busy: isSearching }}
23
+ * />
24
+ *
25
+ * @param {ExpSearchFieldProps} props - The properties of the ExpSearchField component.
26
+ * @param {string} props.label - Accessible name of the field.
27
+ * @param {Object} props.input - Properties of the input element, except `type` and `placeholder`.
28
+ * @param {string} [props.placeholder] - Placeholder shown inside the field.
29
+ * @param {string} [props.helperText] - Text under the field.
30
+ * @param {string} [props.error] - Error under the field; marks the field invalid.
31
+ * @param {ExpSearchFieldAction} props.action - The action inside the field: `label`, `onClick`, `busy`, `busyLabel`, `disabled`.
32
+ *
33
+ * @returns {ReactNode} The search field, or a core `Input` and `Button` outside an `ExpScope`.
34
+ */
35
+ export function ExpSearchField({ label, input, placeholder, helperText, error, action, }) {
36
+ const inScope = useExpScope();
37
+ const generatedId = useId();
38
+ const id = input.id ?? generatedId;
39
+ const descriptionId = error || helperText ? `${id}-description` : undefined;
40
+ const actionOff = !!action.disabled || !!action.busy;
41
+ const handleKeyDown = (event) => {
42
+ input.onKeyDown?.(event);
43
+ if (event.defaultPrevented || event.key !== 'Enter')
44
+ return;
45
+ event.preventDefault();
46
+ if (!actionOff)
47
+ action.onClick();
48
+ };
49
+ const button = (<ExpPillButton type="button" tone="soft" flush={inScope} busy={action.busy} busyLabel={action.busyLabel} disabled={action.disabled} onClick={action.onClick}>
50
+ {action.label}
51
+ </ExpPillButton>);
52
+ if (!inScope) {
53
+ return (<div className="flex items-start gap-3">
54
+ <div className="min-w-0 flex-1">
55
+ <Input label={label} hideLabel placeholder={placeholder} helperText={helperText} error={error} iconL={<FiSearch />} input={{ ...input, id, type: 'text', onKeyDown: handleKeyDown }}/>
56
+ </div>
57
+ {button}
58
+ </div>);
59
+ }
60
+ return (<div className="w-full max-w-[520px]">
61
+ <div data-state={input.disabled ? 'disabled' : 'idle'} data-invalid={error ? '' : undefined} className="exp-search flex h-11 overflow-hidden rounded-full">
62
+ <label className="flex min-w-0 flex-1 cursor-text items-center gap-3 pl-5">
63
+ <span className="sr-only">{label}</span>
64
+ <svg aria-hidden="true" width={22} height={22} viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={2.4} strokeLinecap="round" className="exp-search-lens shrink-0">
65
+ <circle cx={10.5} cy={10.5} r={6.5}/>
66
+ <path d="M15.5 15.5 21 21"/>
67
+ </svg>
68
+ <input {...input} id={id} type="text" placeholder={placeholder} aria-invalid={error ? true : input['aria-invalid']} aria-describedby={[input['aria-describedby'], descriptionId]
69
+ .filter(Boolean)
70
+ .join(' ') || undefined} onKeyDown={handleKeyDown} className={clsx('exp-search-input placeholder:text-gray-2 min-w-0 flex-1 bg-transparent text-base leading-6 outline-0 disabled:cursor-not-allowed', input.className)}/>
71
+ </label>
72
+ <span className="flex shrink-0">{button}</span>
73
+ </div>
74
+ {!!descriptionId && (<Paragraph id={descriptionId} size="body-2" className={clsx('pt-1.5 pl-5', error
75
+ ? 'text-error dark:text-error-dark'
76
+ : 'text-gray-1 dark:text-gray-2')}>
77
+ {error ?? helperText}
78
+ </Paragraph>)}
79
+ </div>);
80
+ }
81
+ //# sourceMappingURL=ExpSearchField.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpSearchField.jsx","sourceRoot":"","sources":["../../src/expresivo/ExpSearchField/ExpSearchField.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAIL,KAAK,GACN,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAuB/D;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,UAAU,cAAc,CAAC,EAC7B,KAAK,EACL,KAAK,EACL,WAAW,EACX,UAAU,EACV,KAAK,EACL,MAAM,GACc;IACpB,MAAM,OAAO,GAAG,WAAW,EAAE,CAAC;IAC9B,MAAM,WAAW,GAAG,KAAK,EAAE,CAAC;IAC5B,MAAM,EAAE,GAAG,KAAK,CAAC,EAAE,IAAI,WAAW,CAAC;IACnC,MAAM,aAAa,GAAG,KAAK,IAAI,UAAU,CAAC,CAAC,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC,CAAC,SAAS,CAAC;IAC5E,MAAM,SAAS,GAAG,CAAC,CAAC,MAAM,CAAC,QAAQ,IAAI,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC;IAErD,MAAM,aAAa,GAAG,CAAC,KAAsC,EAAQ,EAAE;QACrE,KAAK,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,CAAC;QACzB,IAAI,KAAK,CAAC,gBAAgB,IAAI,KAAK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C,aAAa,CAAC,CACzB,SAAS,CAAC,CAAC,IAAI,CACb,kIAAkI,EAClI,KAAK,CAAC,SAAS,CAChB,CAAC,EAEN;QAAA,EAAE,KAAK,CACP;QAAA,CAAC,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,CAChD;MAAA,EAAE,GAAG,CACL;MAAA,CAAC,CAAC,CAAC,aAAa,IAAI,CAClB,CAAC,SAAS,CACR,EAAE,CAAC,CAAC,aAAa,CAAC,CAClB,IAAI,CAAC,QAAQ,CACb,SAAS,CAAC,CAAC,IAAI,CACb,aAAa,EACb,KAAK;gBACH,CAAC,CAAC,iCAAiC;gBACnC,CAAC,CAAC,8BAA8B,CACnC,CAAC,CAEF;UAAA,CAAC,KAAK,IAAI,UAAU,CACtB;QAAA,EAAE,SAAS,CAAC,CACb,CACH;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { ExpSearchField } from './ExpSearchField';
2
+ export type { ExpSearchFieldAction, ExpSearchFieldProps, } from './ExpSearchField';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/expresivo/ExpSearchField/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EACV,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { ExpSearchField } from './ExpSearchField';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/expresivo/ExpSearchField/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,25 @@
1
+ import type { HTMLAttributes, ReactNode } from 'react';
2
+ import { type ExpStatIconName } from './catalog';
3
+ export type ExpStatIconProps = {
4
+ name: ExpStatIconName;
5
+ /** Width and height on screen, in pixels. */
6
+ size?: number;
7
+ } & Omit<HTMLAttributes<HTMLSpanElement>, 'children'>;
8
+ /**
9
+ * Colored line icon for the `icon` slot of the core `Stat`. Decorative:
10
+ * always `aria-hidden`, so the label of the stat carries the meaning.
11
+ *
12
+ * Outside an `ExpScope` it renders nothing, and the `Stat` goes without icon.
13
+ *
14
+ * @component
15
+ * @example
16
+ * <Stat label="Failures" value="1" tone="error" icon={<ExpStatIcon name="error" />} />
17
+ *
18
+ * @param {ExpStatIconProps} props - The properties of the ExpStatIcon component.
19
+ * @param {ExpStatIconName} props.name - Icon from the catalog.
20
+ * @param {number} [props.size=28] - Width and height on screen, in pixels.
21
+ *
22
+ * @returns {ReactNode} The icon, or nothing outside an `ExpScope`.
23
+ */
24
+ export declare function ExpStatIcon({ name, size, ...restProps }: ExpStatIconProps): ReactNode;
25
+ //# sourceMappingURL=ExpStatIcon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpStatIcon.d.ts","sourceRoot":"","sources":["../../src/expresivo/ExpStatIcon/ExpStatIcon.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,EAAE,KAAK,eAAe,EAAmB,MAAM,WAAW,CAAC;AAElE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,eAAe,CAAC;IACtB,6CAA6C;IAC7C,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,GAAG,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE,UAAU,CAAC,CAAC;AAEtD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,IAAS,EACT,GAAG,SAAS,EACb,EAAE,gBAAgB,GAAG,SAAS,CAqB9B"}
@@ -0,0 +1,29 @@
1
+ 'use client';
2
+ import clsx from 'clsx';
3
+ import { useExpScope } from '../ExpScope/ExpScope';
4
+ import { statIconCatalog } from './catalog';
5
+ /**
6
+ * Colored line icon for the `icon` slot of the core `Stat`. Decorative:
7
+ * always `aria-hidden`, so the label of the stat carries the meaning.
8
+ *
9
+ * Outside an `ExpScope` it renders nothing, and the `Stat` goes without icon.
10
+ *
11
+ * @component
12
+ * @example
13
+ * <Stat label="Failures" value="1" tone="error" icon={<ExpStatIcon name="error" />} />
14
+ *
15
+ * @param {ExpStatIconProps} props - The properties of the ExpStatIcon component.
16
+ * @param {ExpStatIconName} props.name - Icon from the catalog.
17
+ * @param {number} [props.size=28] - Width and height on screen, in pixels.
18
+ *
19
+ * @returns {ReactNode} The icon, or nothing outside an `ExpScope`.
20
+ */
21
+ export function ExpStatIcon({ name, size = 28, ...restProps }) {
22
+ const inScope = useExpScope();
23
+ if (!inScope)
24
+ return null;
25
+ return (<span {...restProps} aria-hidden="true" className={clsx('inline-flex shrink-0', restProps.className)}>
26
+ <img src={statIconCatalog[name].src} alt="" width={size} height={size} draggable={false} className="block object-contain"/>
27
+ </span>);
28
+ }
29
+ //# sourceMappingURL=ExpStatIcon.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpStatIcon.jsx","sourceRoot":"","sources":["../../src/expresivo/ExpStatIcon/ExpStatIcon.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAwB,eAAe,EAAE,MAAM,WAAW,CAAC;AAQlE;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,WAAW,CAAC,EAC1B,IAAI,EACJ,IAAI,GAAG,EAAE,EACT,GAAG,SAAS,EACK;IACjB,MAAM,OAAO,GAAG,WAAW,EAAE,CAAC;IAE9B,IAAI,CAAC,OAAO;QAAE,OAAO,IAAI,CAAC;IAE1B,OAAO,CACL,CAAC,IAAI,CACH,IAAI,SAAS,CAAC,CACd,WAAW,CAAC,MAAM,CAClB,SAAS,CAAC,CAAC,IAAI,CAAC,sBAAsB,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,CAE7D;MAAA,CAAC,GAAG,CACF,GAAG,CAAC,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAC/B,GAAG,CAAC,EAAE,CACN,KAAK,CAAC,CAAC,IAAI,CAAC,CACZ,MAAM,CAAC,CAAC,IAAI,CAAC,CACb,SAAS,CAAC,CAAC,KAAK,CAAC,CACjB,SAAS,CAAC,sBAAsB,EAEpC;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { StaticImageData } from 'next/image';
2
+ /** Stat icons, named after the drawing like their files. Which figure gets which one is the consumer's call. */
3
+ export type ExpStatIconName = 'duda' | 'visto' | 'alerta' | 'error' | 'reloj' | 'monedas';
4
+ /** PNGs 39px wide: sharp up to about 20px on high-density screens, and soft but legible at 28px. */
5
+ export declare const statIconCatalog: Record<ExpStatIconName, StaticImageData>;
6
+ //# sourceMappingURL=catalog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../src/expresivo/ExpStatIcon/catalog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAQlD,gHAAgH;AAChH,MAAM,MAAM,eAAe,GACvB,MAAM,GACN,OAAO,GACP,QAAQ,GACR,OAAO,GACP,OAAO,GACP,SAAS,CAAC;AAEd,oGAAoG;AACpG,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,eAAe,EAAE,eAAe,CAOpE,CAAC"}
@@ -0,0 +1,16 @@
1
+ import alerta from '@clicoh/orion-library/assets/cifras/alerta.png';
2
+ import duda from '@clicoh/orion-library/assets/cifras/duda.png';
3
+ import error from '@clicoh/orion-library/assets/cifras/error.png';
4
+ import monedas from '@clicoh/orion-library/assets/cifras/monedas.png';
5
+ import reloj from '@clicoh/orion-library/assets/cifras/reloj.png';
6
+ import visto from '@clicoh/orion-library/assets/cifras/visto.png';
7
+ /** PNGs 39px wide: sharp up to about 20px on high-density screens, and soft but legible at 28px. */
8
+ export const statIconCatalog = {
9
+ duda,
10
+ visto,
11
+ alerta,
12
+ error,
13
+ reloj,
14
+ monedas,
15
+ };
16
+ //# sourceMappingURL=catalog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalog.js","sourceRoot":"","sources":["../../src/expresivo/ExpStatIcon/catalog.ts"],"names":[],"mappings":"AACA,OAAO,MAAM,MAAM,gDAAgD,CAAC;AACpE,OAAO,IAAI,MAAM,8CAA8C,CAAC;AAChE,OAAO,KAAK,MAAM,+CAA+C,CAAC;AAClE,OAAO,OAAO,MAAM,iDAAiD,CAAC;AACtE,OAAO,KAAK,MAAM,+CAA+C,CAAC;AAClE,OAAO,KAAK,MAAM,+CAA+C,CAAC;AAWlE,oGAAoG;AACpG,MAAM,CAAC,MAAM,eAAe,GAA6C;IACvE,IAAI;IACJ,KAAK;IACL,MAAM;IACN,KAAK;IACL,KAAK;IACL,OAAO;CACR,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { ExpStatIcon } from './ExpStatIcon';
2
+ export type { ExpStatIconProps } from './ExpStatIcon';
3
+ export type { ExpStatIconName } from './catalog';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/expresivo/ExpStatIcon/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,YAAY,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { ExpStatIcon } from './ExpStatIcon';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/expresivo/ExpStatIcon/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
@@ -15,4 +15,8 @@ export * from './ExpCollapseToggle';
15
15
  export * from './ExpPageHero';
16
16
  export * from './ExpStepBadge';
17
17
  export * from './ExpChip';
18
+ export * from './ExpSearchField';
19
+ export * from './ExpLadder';
20
+ export * from './ExpRepoAvatar';
21
+ export * from './ExpStatIcon';
18
22
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/expresivo/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/expresivo/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC"}
@@ -15,4 +15,8 @@ export * from './ExpCollapseToggle';
15
15
  export * from './ExpPageHero';
16
16
  export * from './ExpStepBadge';
17
17
  export * from './ExpChip';
18
+ export * from './ExpSearchField';
19
+ export * from './ExpLadder';
20
+ export * from './ExpRepoAvatar';
21
+ export * from './ExpStatIcon';
18
22
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/expresivo/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/expresivo/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC"}
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@clicoh/orion-library",
3
- "version": "1.2.0-beta.20",
3
+ "version": "1.2.0-beta.22",
4
4
  "main": "index.js",
5
5
  "dependencies": {
6
6
  "@floating-ui/react": "0.26.19",
7
7
  "clsx": "2.1.1",
8
8
  "leaflet": "^1.9.4",
9
9
  "next": "16.3.8",
10
+ "pdfjs-dist": "6.4.299",
10
11
  "react": "19.2.6",
11
12
  "react-dom": "19.2.6",
12
13
  "react-icons": "5.2.1",