toku-ui 4.5.0 → 4.6.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.
@@ -0,0 +1,15 @@
1
+ import type { Meta, StoryObj } from '@storybook/vue3-vite';
2
+ import TLoadingDots from './TLoadingDots.vue';
3
+ declare const meta: Meta<typeof TLoadingDots>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof TLoadingDots>;
6
+ export declare const playground: Story;
7
+ export declare const shortText: Story;
8
+ export declare const longText: Story;
9
+ export declare const withoutHint: Story;
10
+ export declare const dotsOnly: Story;
11
+ export declare const unbrokenText: Story;
12
+ export declare const inCard: Story;
13
+ export declare const noLayoutShift: Story;
14
+ export declare const hintReveal: Story;
15
+ //# sourceMappingURL=TLoadingDots.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TLoadingDots.stories.d.ts","sourceRoot":"","sources":["../../../src/components/TLoadingDots/TLoadingDots.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,YAAY,MAAM,oBAAoB,CAAC;AAO9C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,YAAY,CAgBC,CAAC;AAEtC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,YAAY,CAAC,CAAC;AAE3C,eAAO,MAAM,UAAU,EAAE,KAAU,CAAC;AAEpC,eAAO,MAAM,SAAS,EAAE,KAAU,CAAC;AASnC,eAAO,MAAM,QAAQ,EAAE,KAEtB,CAAC;AAWF,eAAO,MAAM,WAAW,EAAE,KAEzB,CAAC;AASF,eAAO,MAAM,QAAQ,EAAE,KAEtB,CAAC;AAYF,eAAO,MAAM,YAAY,EAAE,KAK1B,CAAC;AAWF,eAAO,MAAM,MAAM,EAAE,KAoBpB,CAAC;AAWF,eAAO,MAAM,aAAa,EAAE,KA2C3B,CAAC;AAYF,eAAO,MAAM,UAAU,EAAE,KA6CxB,CAAC"}
@@ -0,0 +1,76 @@
1
+ import type { AsTag } from 'reka-ui';
2
+ /**
3
+ * Three pulsing dots over a status message, with a secondary line that appears
4
+ * only once the wait has gone on long enough to be worth explaining.
5
+ *
6
+ * Use it for waits the user is actively staring at — a payment being processed,
7
+ * a bank redirect being prepared. For a plain indeterminate spinner with no
8
+ * message, use `TSpinner`; for the legacy full-page overlay, `TLoading`.
9
+ *
10
+ * ## Layout is the consumer's job
11
+ *
12
+ * The component paints dots and centered text and nothing else — no backdrop, no
13
+ * `position`, no `z-index`. Center it in a card or stretch it over a screen from
14
+ * the outside. That is deliberate: the design renders identically inside a
15
+ * desktop card and on a full-screen phone, so the surface belongs to whoever
16
+ * mounts it.
17
+ *
18
+ * ## Announcements
19
+ *
20
+ * The root is a `role='status'` live region, so `message` is announced politely
21
+ * and the dots are hidden from assistive tech.
22
+ *
23
+ * `hint` is deliberately announced too — "this is taking a while" is information a
24
+ * screen reader user cannot get from watching the dots. Getting that *and* a
25
+ * shift-free reveal takes some care: the line is in the DOM from mount so its box is
26
+ * reserved, but while pending it is `aria-hidden` and `visibility: hidden`, so it is
27
+ * silent and invisible. On reveal it is re-inserted as a fresh node (hence the `key`),
28
+ * because a DOM insertion into a live region is the announcement trigger that
29
+ * assistive tech supports most consistently — a visibility-only flip is not.
30
+ *
31
+ * Used bare, with no `message`, the region has nothing to announce: the dots are
32
+ * decoration and hidden from assistive tech, so the loader is silent. That is fine
33
+ * when something nearby already says what is happening; when it does not, pass an
34
+ * `aria-label` — it falls through to the element carrying the role.
35
+ */
36
+ export interface TLoadingDotsProps {
37
+ /** Primary line under the dots. Also what the live region announces. */
38
+ message?: string;
39
+ /**
40
+ * Secondary line, revealed after `hintDelay`. Meant for reassurance on a slow
41
+ * wait ("Esto puede tardar unos segundos…"), not for status that must be read
42
+ * immediately — anything urgent belongs in `message`.
43
+ */
44
+ hint?: string;
45
+ /**
46
+ * Milliseconds to wait before revealing `hint`. `0` shows it right away;
47
+ * `false` never reveals it, which keeps `hint` addressable by a parent that
48
+ * decides on its own when the wait became long.
49
+ * @defaultValue 5000
50
+ */
51
+ hintDelay?: number | false;
52
+ /**
53
+ * Element the wrapper renders as. `'div'` suits a block of page; `'output'`
54
+ * is worth considering when the loader reports the result of a form the user
55
+ * just submitted. Every element this component renders inside the wrapper is
56
+ * phrasing content, so `'output'` and other phrasing-only tags stay valid —
57
+ * keep that in mind before swapping one for a block element in the slots.
58
+ * @defaultValue 'div'
59
+ */
60
+ as?: AsTag;
61
+ }
62
+ export interface TLoadingDotsSlots {
63
+ /** Replaces the `message` line — for rich content such as an inline amount. */
64
+ message?: () => unknown;
65
+ /** Replaces the `hint` line. Still governed by `hintDelay`. */
66
+ hint?: () => unknown;
67
+ }
68
+ declare const _default: typeof __VLS_export;
69
+ export default _default;
70
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<TLoadingDotsProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TLoadingDotsProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, TLoadingDotsSlots>;
71
+ type __VLS_WithSlots<T, S> = T & {
72
+ new (): {
73
+ $slots: S;
74
+ };
75
+ };
76
+ //# sourceMappingURL=TLoadingDots.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TLoadingDots.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TLoadingDots/TLoadingDots.vue"],"names":[],"mappings":"AAyTA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAM,WAAW,iBAAiB;IAChC,wEAAwE;IACxE,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IAE3B;;;;;;;OAOG;IACH,EAAE,CAAC,EAAE,KAAK,CAAC;CACZ;AAED,MAAM,WAAW,iBAAiB;IAChC,+EAA+E;IAC/E,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC;IACxB,+DAA+D;IAC/D,IAAI,CAAC,EAAE,MAAM,OAAO,CAAC;CACtB;wBACoB,OAAO,YAAY;AAAxC,wBAAyC;AACzC,QAAA,MAAM,YAAY,kVAwJd,CAAC;AACL,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { default as TLoadingDots } from './TLoadingDots.vue';
2
+ export type { TLoadingDotsProps, TLoadingDotsSlots } from './TLoadingDots.vue';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/TLoadingDots/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC7D,YAAY,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC"}
@@ -11,6 +11,7 @@ export * from './TIcon';
11
11
  export * from './TIconButton';
12
12
  export * from './TLink';
13
13
  export * from './TLoading';
14
+ export * from './TLoadingDots';
14
15
  export * from './TModal';
15
16
  export * from './TRadio';
16
17
  export * from './TSelect';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,mBAAmB,CAAC;AAEtC,OAAO,EAAE,KAAK,EAAE,CAAC;AACjB,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,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