toku-ui 4.3.1 → 4.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.
@@ -0,0 +1,16 @@
1
+ import type { Meta, StoryObj } from '@storybook/vue3-vite';
2
+ import TCardButton from './TCardButton.vue';
3
+ declare const meta: Meta<typeof TCardButton>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof TCardButton>;
6
+ export declare const playground: Story;
7
+ export declare const withImage: Story;
8
+ export declare const withTag: Story;
9
+ export declare const borderless: Story;
10
+ export declare const titleOnly: Story;
11
+ export declare const disabled: Story;
12
+ export declare const hover: Story;
13
+ export declare const focus: Story;
14
+ export declare const iconWinsOverImage: Story;
15
+ export declare const clickFlow: Story;
16
+ //# sourceMappingURL=TCardButton.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TCardButton.stories.d.ts","sourceRoot":"","sources":["../../../src/components/TCardButton/TCardButton.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAG3D,OAAO,WAAW,MAAM,mBAAmB,CAAC;AAI5C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,WAAW,CAMC,CAAC;AAErC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,WAAW,CAAC,CAAC;AAE1C,eAAO,MAAM,UAAU,EAAE,KAcxB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAcvB,CAAC;AASF,eAAO,MAAM,OAAO,EAAE,KAerB,CAAC;AASF,eAAO,MAAM,UAAU,EAAE,KAexB,CAAC;AASF,eAAO,MAAM,SAAS,EAAE,KAcvB,CAAC;AASF,eAAO,MAAM,QAAQ,EAAE,KAetB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAcnB,CAAC;AAYF,eAAO,MAAM,KAAK,EAAE,KAcnB,CAAC;AAYF,eAAO,MAAM,iBAAiB,EAAE,KAiB/B,CAAC;AAWF,eAAO,MAAM,SAAS,EAAE,KAuBvB,CAAC"}
@@ -0,0 +1,58 @@
1
+ import type { TTagProps } from '../TTag';
2
+ /**
3
+ * Props for the `TCardButton` component.
4
+ *
5
+ * `TCardButton` is a card-shaped button for choosing an option from a list
6
+ * (e.g. a payment method). It is action-agnostic: it renders a native
7
+ * `<button>` and exposes no custom events — attach a plain `@click` (it falls
8
+ * through to the root) and handle navigation, tracking or selection on the
9
+ * consumer side.
10
+ *
11
+ * Height is content-driven: with only `title` the card compacts naturally.
12
+ */
13
+ export interface TCardButtonProps {
14
+ /** Main label. Replace its rendering via the `title` slot when richer content is needed (e.g. a logo image). */
15
+ title: string;
16
+ /** Supporting text under the title. */
17
+ subtitle?: string;
18
+ /**
19
+ * Text for the `TTag` badge. Position depends on `borderless`: floating on
20
+ * the top-right corner on the default bordered card, inline before the
21
+ * trailing icon when borderless.
22
+ */
23
+ tag?: string;
24
+ /**
25
+ * Variant forwarded to the internal `TTag`.
26
+ * @defaultValue 'default'
27
+ */
28
+ tagVariant?: TTagProps['variant'];
29
+ /** Removes the card border. Also decides the `tag` position (see `tag`). */
30
+ borderless?: boolean;
31
+ /** Disables the underlying `<button>`, blocking clicks natively. */
32
+ disabled?: boolean;
33
+ }
34
+ /**
35
+ * Slots exposed by `TCardButton`. `icon` and `image` are mutually exclusive
36
+ * treatments of the 36×36 media square; when both are provided, `icon` wins.
37
+ */
38
+ export interface TCardButtonSlots {
39
+ /** Rendered 16×16, centered inside the media square over its subtle background. Has priority over `image`. */
40
+ icon?: () => unknown;
41
+ /** Fills the whole media square, clipped by its border radius. Ignored when `icon` is provided. */
42
+ image?: () => unknown;
43
+ /** Overrides the `title` prop rendering. */
44
+ title?: () => unknown;
45
+ /** Overrides the internally rendered `TTag`. */
46
+ tag?: () => unknown;
47
+ /** Overrides the default chevron-right icon on the right edge. */
48
+ trailing?: () => unknown;
49
+ }
50
+ declare const _default: typeof __VLS_export;
51
+ export default _default;
52
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<TCardButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TCardButtonProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, TCardButtonSlots>;
53
+ type __VLS_WithSlots<T, S> = T & {
54
+ new (): {
55
+ $slots: S;
56
+ };
57
+ };
58
+ //# sourceMappingURL=TCardButton.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TCardButton.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TCardButton/TCardButton.vue"],"names":[],"mappings":"AA2OA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC;;;;;;;;;;GAUG;AACH,MAAM,WAAW,gBAAgB;IAC/B,gHAAgH;IAChH,KAAK,EAAE,MAAM,CAAC;IACd,uCAAuC;IACvC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAClC,4EAA4E;IAC5E,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,oEAAoE;IACpE,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,8GAA8G;IAC9G,IAAI,CAAC,EAAE,MAAM,OAAO,CAAC;IACrB,mGAAmG;IACnG,KAAK,CAAC,EAAE,MAAM,OAAO,CAAC;IACtB,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,OAAO,CAAC;IACtB,gDAAgD;IAChD,GAAG,CAAC,EAAE,MAAM,OAAO,CAAC;IACpB,kEAAkE;IAClE,QAAQ,CAAC,EAAE,MAAM,OAAO,CAAC;CAC1B;wBACoB,OAAO,YAAY;AAAxC,wBAAyC;AACzC,QAAA,MAAM,YAAY,+UAkId,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 TCardButton } from './TCardButton.vue';
2
+ export type { TCardButtonProps, TCardButtonSlots } from './TCardButton.vue';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/TCardButton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC3D,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC"}
@@ -22,7 +22,7 @@ export default meta;
22
22
  type Story = StoryObj<typeof TThemeProvider>;
23
23
  /**
24
24
  * Default — no theme prop passed. Vars inherit from `:root` in toku-ui/tokens.css.
25
- * Brand resolves to Toku purple (#5C0087).
25
+ * Brand resolves to Toku purple (#3C1053).
26
26
  */
27
27
  export declare const Default: Story;
28
28
  /**
@@ -1,6 +1,7 @@
1
1
  import TChip from './TChip/TChip.vue';
2
2
  export { TChip };
3
3
  export * from './TButton';
4
+ export * from './TCardButton';
4
5
  export * from './TCheckbox';
5
6
  export * from './TCombobox';
6
7
  export * from './TDialog';
@@ -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,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAA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