@misoto22/kioku-ui 0.0.0 → 0.1.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 (111) hide show
  1. package/package.json +1 -1
  2. package/dist/components/Alert.d.ts +0 -7
  3. package/dist/components/Alert.doc.d.ts +0 -11
  4. package/dist/components/Alert.doc.js +0 -15
  5. package/dist/components/Alert.js +0 -149
  6. package/dist/components/AsyncState.d.ts +0 -30
  7. package/dist/components/AsyncState.doc.d.ts +0 -16
  8. package/dist/components/AsyncState.doc.js +0 -16
  9. package/dist/components/AsyncState.js +0 -36
  10. package/dist/components/Badge.d.ts +0 -10
  11. package/dist/components/Badge.doc.d.ts +0 -11
  12. package/dist/components/Badge.doc.js +0 -12
  13. package/dist/components/Badge.js +0 -58
  14. package/dist/components/Button.d.ts +0 -18
  15. package/dist/components/Button.doc.d.ts +0 -11
  16. package/dist/components/Button.doc.js +0 -18
  17. package/dist/components/Button.js +0 -151
  18. package/dist/components/Card.d.ts +0 -6
  19. package/dist/components/Card.doc.d.ts +0 -11
  20. package/dist/components/Card.doc.js +0 -15
  21. package/dist/components/Card.js +0 -41
  22. package/dist/components/CardFooter.d.ts +0 -3
  23. package/dist/components/CardFooter.doc.d.ts +0 -11
  24. package/dist/components/CardFooter.doc.js +0 -12
  25. package/dist/components/CardFooter.js +0 -16
  26. package/dist/components/CardHeader.d.ts +0 -3
  27. package/dist/components/CardHeader.doc.d.ts +0 -11
  28. package/dist/components/CardHeader.doc.js +0 -12
  29. package/dist/components/CardHeader.js +0 -16
  30. package/dist/components/Center.d.ts +0 -3
  31. package/dist/components/Center.doc.d.ts +0 -11
  32. package/dist/components/Center.doc.js +0 -12
  33. package/dist/components/Center.js +0 -15
  34. package/dist/components/Divider.d.ts +0 -3
  35. package/dist/components/Divider.doc.d.ts +0 -11
  36. package/dist/components/Divider.doc.js +0 -12
  37. package/dist/components/Divider.js +0 -12
  38. package/dist/components/EmptyState.d.ts +0 -11
  39. package/dist/components/EmptyState.doc.d.ts +0 -16
  40. package/dist/components/EmptyState.doc.js +0 -25
  41. package/dist/components/EmptyState.js +0 -55
  42. package/dist/components/Field.d.ts +0 -21
  43. package/dist/components/Field.doc.d.ts +0 -16
  44. package/dist/components/Field.doc.js +0 -28
  45. package/dist/components/Field.js +0 -117
  46. package/dist/components/Grid.d.ts +0 -7
  47. package/dist/components/Grid.doc.d.ts +0 -11
  48. package/dist/components/Grid.doc.js +0 -15
  49. package/dist/components/Grid.js +0 -76
  50. package/dist/components/Heading.d.ts +0 -293
  51. package/dist/components/Heading.doc.d.ts +0 -16
  52. package/dist/components/Heading.doc.js +0 -19
  53. package/dist/components/Heading.js +0 -46
  54. package/dist/components/IconButton.d.ts +0 -9
  55. package/dist/components/IconButton.doc.d.ts +0 -16
  56. package/dist/components/IconButton.doc.js +0 -22
  57. package/dist/components/IconButton.js +0 -11
  58. package/dist/components/MetricGrid.d.ts +0 -10
  59. package/dist/components/MetricGrid.doc.d.ts +0 -12
  60. package/dist/components/MetricGrid.doc.js +0 -13
  61. package/dist/components/MetricGrid.js +0 -37
  62. package/dist/components/Section.d.ts +0 -6
  63. package/dist/components/Section.doc.d.ts +0 -11
  64. package/dist/components/Section.doc.js +0 -12
  65. package/dist/components/Section.js +0 -49
  66. package/dist/components/SegmentedControl.d.ts +0 -31
  67. package/dist/components/SegmentedControl.doc.d.ts +0 -16
  68. package/dist/components/SegmentedControl.doc.js +0 -34
  69. package/dist/components/SegmentedControl.js +0 -108
  70. package/dist/components/Skeleton.d.ts +0 -5
  71. package/dist/components/Skeleton.doc.d.ts +0 -11
  72. package/dist/components/Skeleton.doc.js +0 -12
  73. package/dist/components/Skeleton.js +0 -20
  74. package/dist/components/Spinner.d.ts +0 -6
  75. package/dist/components/Spinner.doc.d.ts +0 -12
  76. package/dist/components/Spinner.doc.js +0 -13
  77. package/dist/components/Spinner.js +0 -25
  78. package/dist/components/Stack.d.ts +0 -7
  79. package/dist/components/Stack.doc.d.ts +0 -11
  80. package/dist/components/Stack.doc.js +0 -15
  81. package/dist/components/Stack.js +0 -77
  82. package/dist/components/StatusDot.d.ts +0 -8
  83. package/dist/components/StatusDot.doc.d.ts +0 -16
  84. package/dist/components/StatusDot.doc.js +0 -16
  85. package/dist/components/StatusDot.js +0 -46
  86. package/dist/components/Table.d.ts +0 -20
  87. package/dist/components/Table.doc.d.ts +0 -92
  88. package/dist/components/Table.doc.js +0 -94
  89. package/dist/components/Table.js +0 -205
  90. package/dist/components/Text.d.ts +0 -7
  91. package/dist/components/Text.doc.d.ts +0 -11
  92. package/dist/components/Text.doc.js +0 -15
  93. package/dist/components/Text.js +0 -50
  94. package/dist/components/TextArea.d.ts +0 -16
  95. package/dist/components/TextArea.doc.d.ts +0 -11
  96. package/dist/components/TextArea.doc.js +0 -30
  97. package/dist/components/TextArea.js +0 -47
  98. package/dist/components/TextInput.d.ts +0 -16
  99. package/dist/components/TextInput.doc.d.ts +0 -11
  100. package/dist/components/TextInput.doc.js +0 -30
  101. package/dist/components/TextInput.js +0 -49
  102. package/dist/components/Toggle.d.ts +0 -16
  103. package/dist/components/Toggle.doc.d.ts +0 -11
  104. package/dist/components/Toggle.doc.js +0 -21
  105. package/dist/components/Toggle.js +0 -64
  106. package/dist/components/VisuallyHidden.d.ts +0 -3
  107. package/dist/components/VisuallyHidden.doc.d.ts +0 -11
  108. package/dist/components/VisuallyHidden.doc.js +0 -12
  109. package/dist/components/VisuallyHidden.js +0 -15
  110. package/dist/components/index.d.ts +0 -27
  111. package/dist/components/index.js +0 -28
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@misoto22/kioku-ui",
3
- "version": "0.0.0",
3
+ "version": "0.1.0",
4
4
  "description": "Product-neutral React design system foundations.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -1,7 +0,0 @@
1
- import type { HTMLAttributes, ReactNode } from 'react';
2
- import type { StatusTone } from './Badge.js';
3
- export interface AlertProps extends Omit<HTMLAttributes<HTMLDivElement>, 'className' | 'role'> {
4
- readonly icon?: ReactNode;
5
- readonly tone?: StatusTone;
6
- }
7
- export declare function Alert({ children, icon, tone, ...props }: AlertProps): import("react").JSX.Element;
@@ -1,11 +0,0 @@
1
- export declare const alertDoc: {
2
- name: string;
3
- description: string;
4
- props: {
5
- name: string;
6
- description: string;
7
- }[];
8
- inheritedProps: string[];
9
- example: string;
10
- storyId: string;
11
- };
@@ -1,15 +0,0 @@
1
- import "../styles/stylex.css";
2
- export const alertDoc = {
3
- name: 'Alert',
4
- description: 'Announces feedback with a quiet status boundary and polite or assertive live semantics.',
5
- props: [{
6
- name: 'icon',
7
- description: 'Overrides the tone-specific decorative status icon without adding an announcement.'
8
- }, {
9
- name: 'tone',
10
- description: 'Selects the semantic status tone and live behavior.'
11
- }],
12
- inheritedProps: ['HTMLAttributes<HTMLDivElement> except className and role'],
13
- example: '<Alert tone="danger">Unable to save.</Alert>',
14
- storyId: 'core-alert--default'
15
- };
@@ -1,149 +0,0 @@
1
- import * as stylex from '@stylexjs/stylex';
2
- import { semanticTokens } from '../authoring.stylex.js';
3
- import "../styles/stylex.css";
4
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
5
- const styles = {
6
- base: {
7
- kGNEyG: "x1cy8zhl",
8
- kaIpWk: "x8kq9my",
9
- ksu8eU: "x1jnjmdy",
10
- kMzoRj: "xpxnlqs",
11
- k1xSpc: "x78zum5",
12
- kMv6JI: "xj0sio9",
13
- kGuDYH: "x1ti3rys",
14
- kOIVth: "xtl099x",
15
- kLWn49: "x1ezks3f",
16
- kmVPX3: "x14rluyd",
17
- $$css: true
18
- },
19
- info: {
20
- kWkggS: "x1760qql",
21
- kVAM5u: "x124ze02",
22
- kMwMTN: "x1ursi0k",
23
- $$css: true
24
- },
25
- success: {
26
- kWkggS: "xjdu3ya",
27
- kVAM5u: "x86rt86",
28
- kMwMTN: "xw2tli",
29
- $$css: true
30
- },
31
- warning: {
32
- kWkggS: "xqpqlc7",
33
- kVAM5u: "xkfpxyo",
34
- kMwMTN: "x6rqny5",
35
- $$css: true
36
- },
37
- danger: {
38
- kWkggS: "x12uiudv",
39
- kVAM5u: "xcf5wgx",
40
- kMwMTN: "x8bm3zx",
41
- $$css: true
42
- },
43
- icon: {
44
- kGNEyG: "x6s0dn4",
45
- k1xSpc: "x78zum5",
46
- kmuXW: "x2lah0s",
47
- kZKoxP: "x7s8d8b",
48
- kjj79g: "xl56j7k",
49
- kzqmXN: "x1psh5v9",
50
- $$css: true
51
- },
52
- content: {
53
- kUk6DE: "x98rzlu",
54
- k7Eaqz: "xeuugli",
55
- $$css: true
56
- }
57
- };
58
- function DefaultAlertIcon({
59
- tone
60
- }) {
61
- const sharedProps = {
62
- fill: 'none',
63
- height: '100%',
64
- stroke: 'currentColor',
65
- strokeLinecap: 'round',
66
- strokeLinejoin: 'round',
67
- strokeWidth: 2,
68
- viewBox: '0 0 20 20',
69
- width: '100%'
70
- };
71
- if (tone === 'success') {
72
- return /*#__PURE__*/_jsxs("svg", {
73
- ...sharedProps,
74
- children: [/*#__PURE__*/_jsx("circle", {
75
- cx: "10",
76
- cy: "10",
77
- r: "8"
78
- }), /*#__PURE__*/_jsx("path", {
79
- d: "m6.5 10 2.2 2.2 4.8-5"
80
- })]
81
- });
82
- }
83
- if (tone === 'warning') {
84
- return /*#__PURE__*/_jsxs("svg", {
85
- ...sharedProps,
86
- children: [/*#__PURE__*/_jsx("path", {
87
- d: "M10 2.5 18 17H2L10 2.5Z"
88
- }), /*#__PURE__*/_jsx("path", {
89
- d: "M10 7v4"
90
- }), /*#__PURE__*/_jsx("path", {
91
- d: "M10 14h.01"
92
- })]
93
- });
94
- }
95
- if (tone === 'danger') {
96
- return /*#__PURE__*/_jsxs("svg", {
97
- ...sharedProps,
98
- children: [/*#__PURE__*/_jsx("circle", {
99
- cx: "10",
100
- cy: "10",
101
- r: "8"
102
- }), /*#__PURE__*/_jsx("path", {
103
- d: "m7 7 6 6M13 7l-6 6"
104
- })]
105
- });
106
- }
107
- return /*#__PURE__*/_jsxs("svg", {
108
- ...sharedProps,
109
- children: [/*#__PURE__*/_jsx("circle", {
110
- cx: "10",
111
- cy: "10",
112
- r: "8"
113
- }), /*#__PURE__*/_jsx("path", {
114
- d: "M10 9v5"
115
- }), /*#__PURE__*/_jsx("path", {
116
- d: "M10 6h.01"
117
- })]
118
- });
119
- }
120
- export function Alert({
121
- children,
122
- icon,
123
- tone = 'info',
124
- ...props
125
- }) {
126
- const isDanger = tone === 'danger';
127
- const hasCustomIcon = icon !== undefined && icon !== null && icon !== false;
128
- return /*#__PURE__*/_jsxs("div", {
129
- ...props,
130
- "aria-live": isDanger ? 'assertive' : 'polite',
131
- role: isDanger ? 'alert' : 'status',
132
- ...stylex.props(styles.base, styles[tone]),
133
- children: [/*#__PURE__*/_jsx("span", {
134
- "aria-hidden": "true",
135
- "data-alert-icon": hasCustomIcon ? 'custom' : tone,
136
- ...{
137
- className: "x6s0dn4 x78zum5 x2lah0s x7s8d8b xl56j7k x1psh5v9"
138
- },
139
- children: hasCustomIcon ? icon : /*#__PURE__*/_jsx(DefaultAlertIcon, {
140
- tone: tone
141
- })
142
- }), /*#__PURE__*/_jsx("div", {
143
- ...{
144
- className: "x98rzlu xeuugli"
145
- },
146
- children: children
147
- })]
148
- });
149
- }
@@ -1,30 +0,0 @@
1
- import type { ReactNode } from 'react';
2
- export type AsyncStateValue<T> = {
3
- readonly kind: 'loading';
4
- readonly label?: string;
5
- } | {
6
- readonly kind: 'empty';
7
- readonly title: ReactNode;
8
- readonly detail?: ReactNode;
9
- readonly action?: ReactNode;
10
- } | {
11
- readonly kind: 'error';
12
- readonly title: ReactNode;
13
- readonly detail?: ReactNode;
14
- readonly retry?: ReactNode;
15
- } | {
16
- readonly kind: 'ready';
17
- readonly data: T;
18
- };
19
- type PendingAsyncStateValue<T> = Exclude<AsyncStateValue<T>, {
20
- kind: 'ready';
21
- }>;
22
- export type AsyncStateProps<T> = {
23
- readonly children: (data: T) => ReactNode;
24
- readonly state: AsyncStateValue<T>;
25
- } | {
26
- readonly children?: never;
27
- readonly state: PendingAsyncStateValue<T>;
28
- };
29
- export declare function AsyncState<T>({ children, state }: AsyncStateProps<T>): import("react").JSX.Element;
30
- export {};
@@ -1,16 +0,0 @@
1
- export declare const asyncStateDoc: {
2
- name: string;
3
- description: string;
4
- props: ({
5
- name: string;
6
- description: string;
7
- required?: undefined;
8
- } | {
9
- name: string;
10
- description: string;
11
- required: true;
12
- })[];
13
- inheritedProps: string[];
14
- example: string;
15
- storyId: string;
16
- };
@@ -1,16 +0,0 @@
1
- import "../styles/stylex.css";
2
- export const asyncStateDoc = {
3
- name: 'AsyncState',
4
- description: 'Renders distinct loading, empty, error, and ready states.',
5
- props: [{
6
- name: 'children',
7
- description: 'Renders ready data and is required for the ready state.'
8
- }, {
9
- name: 'state',
10
- description: 'Provides the current discriminated async state.',
11
- required: true
12
- }],
13
- inheritedProps: ['No inherited DOM attributes'],
14
- example: '<AsyncState state={{kind: "ready", data}}>{renderData}</AsyncState>',
15
- storyId: 'core-async-state--default'
16
- };
@@ -1,36 +0,0 @@
1
- import { Alert } from './Alert.js';
2
- import { EmptyStateContent } from './EmptyState.js';
3
- import { SpinnerVisual } from './Spinner.js';
4
- import "../styles/stylex.css";
5
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
6
- export function AsyncState({
7
- children,
8
- state
9
- }) {
10
- if (state.kind === 'ready' && !children) {
11
- throw new Error('AsyncState requires a renderer for ready data');
12
- }
13
- const loadingLabel = state.kind === 'loading' ? state.label ?? 'Loading' : undefined;
14
- const statusContent = state.kind === 'loading' ? /*#__PURE__*/_jsx(SpinnerVisual, {}) : state.kind === 'empty' ? /*#__PURE__*/_jsx(EmptyStateContent, {
15
- action: state.action,
16
- detail: state.detail,
17
- title: state.title
18
- }) : state.kind === 'ready' ? children(state.data) : null;
19
- return /*#__PURE__*/_jsxs(_Fragment, {
20
- children: [/*#__PURE__*/_jsx("div", {
21
- "aria-atomic": "true",
22
- "aria-busy": state.kind === 'loading',
23
- "aria-label": loadingLabel,
24
- "aria-live": "polite",
25
- role: "status",
26
- children: statusContent
27
- }), state.kind === 'error' ? /*#__PURE__*/_jsxs(Alert, {
28
- tone: "danger",
29
- children: [/*#__PURE__*/_jsx("div", {
30
- children: state.title
31
- }), state.detail ? /*#__PURE__*/_jsx("div", {
32
- children: state.detail
33
- }) : null, state.retry]
34
- }) : null]
35
- });
36
- }
@@ -1,10 +0,0 @@
1
- import type { HTMLAttributes } from 'react';
2
- /** Semantic feedback tones shared by status components. */
3
- export type StatusTone = 'info' | 'success' | 'warning' | 'danger';
4
- /** Compact badge tones, including a non-status neutral treatment. */
5
- export type BadgeTone = 'neutral' | StatusTone;
6
- /** Props for compact status or category text. */
7
- export interface BadgeProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'className'> {
8
- readonly tone?: BadgeTone;
9
- }
10
- export declare function Badge({ children, tone, ...props }: BadgeProps): import("react").JSX.Element;
@@ -1,11 +0,0 @@
1
- export declare const badgeDoc: {
2
- name: string;
3
- description: string;
4
- props: {
5
- name: string;
6
- description: string;
7
- }[];
8
- inheritedProps: string[];
9
- example: string;
10
- storyId: string;
11
- };
@@ -1,12 +0,0 @@
1
- import "../styles/stylex.css";
2
- export const badgeDoc = {
3
- name: 'Badge',
4
- description: 'Displays compact, non-live status or category text.',
5
- props: [{
6
- name: 'tone',
7
- description: 'Selects the neutral default or a semantic status tone.'
8
- }],
9
- inheritedProps: ['HTMLAttributes<HTMLSpanElement> except className'],
10
- example: '<Badge tone="success">Available</Badge>',
11
- storyId: 'core-badge--default'
12
- };
@@ -1,58 +0,0 @@
1
- import * as stylex from '@stylexjs/stylex';
2
- import { semanticTokens } from '../authoring.stylex.js';
3
-
4
- /** Semantic feedback tones shared by status components. */
5
- import "../styles/stylex.css";
6
- /** Compact badge tones, including a non-status neutral treatment. */
7
- import { jsx as _jsx } from "react/jsx-runtime";
8
- const styles = {
9
- base: {
10
- kaIpWk: "xnpwncj",
11
- k1xSpc: "x3nfvp2",
12
- kMv6JI: "xj0sio9",
13
- kGuDYH: "xltg2ad",
14
- k63SB2: "x1m30uz7",
15
- k8WAf4: "x10y07nz",
16
- kg3NbH: "x1qtbwip",
17
- $$css: true
18
- },
19
- neutral: {
20
- kWkggS: "xavu78a",
21
- kMwMTN: "x17y7oyd",
22
- $$css: true
23
- },
24
- info: {
25
- kWkggS: "x1760qql",
26
- kMwMTN: "x1ursi0k",
27
- $$css: true
28
- },
29
- success: {
30
- kWkggS: "xjdu3ya",
31
- kMwMTN: "xw2tli",
32
- $$css: true
33
- },
34
- warning: {
35
- kWkggS: "xqpqlc7",
36
- kMwMTN: "x6rqny5",
37
- $$css: true
38
- },
39
- danger: {
40
- kWkggS: "x12uiudv",
41
- kMwMTN: "x8bm3zx",
42
- $$css: true
43
- }
44
- };
45
-
46
- /** Props for compact status or category text. */
47
-
48
- export function Badge({
49
- children,
50
- tone = 'neutral',
51
- ...props
52
- }) {
53
- return /*#__PURE__*/_jsx("span", {
54
- ...props,
55
- ...stylex.props(styles.base, styles[tone]),
56
- children: children
57
- });
58
- }
@@ -1,18 +0,0 @@
1
- import type { ButtonHTMLAttributes } from 'react';
2
- /** Visual sizes shared by native action controls. */
3
- export type ControlSize = 'sm' | 'md' | 'lg';
4
- /** Semantic emphasis variants shared by native action controls. */
5
- export type ButtonVariant = 'primary' | 'secondary' | 'ghost' | 'destructive';
6
- /** Props for a text-labelled native action button. */
7
- export interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'className'> {
8
- readonly loading?: boolean;
9
- readonly size?: ControlSize;
10
- readonly variant?: ButtonVariant;
11
- }
12
- interface ActionControlProps extends ButtonProps {
13
- readonly iconOnly?: boolean;
14
- }
15
- /** @internal Shared native implementation for Button and IconButton. */
16
- export declare function ActionControl({ 'aria-busy': ariaBusy, children, disabled, iconOnly, loading, size, type, variant, ...props }: ActionControlProps): import("react").JSX.Element;
17
- export declare function Button(props: ButtonProps): import("react").JSX.Element;
18
- export {};
@@ -1,11 +0,0 @@
1
- export declare const buttonDoc: {
2
- name: string;
3
- description: string;
4
- props: {
5
- name: string;
6
- description: string;
7
- }[];
8
- inheritedProps: string[];
9
- example: string;
10
- storyId: string;
11
- };
@@ -1,18 +0,0 @@
1
- import "../styles/stylex.css";
2
- export const buttonDoc = {
3
- name: 'Button',
4
- description: 'Triggers an action through native button semantics.',
5
- props: [{
6
- name: 'loading',
7
- description: 'Shows progress and disables native activation.'
8
- }, {
9
- name: 'size',
10
- description: 'Selects the fixed control height.'
11
- }, {
12
- name: 'variant',
13
- description: 'Selects a semantic visual emphasis.'
14
- }],
15
- inheritedProps: ['ButtonHTMLAttributes<HTMLButtonElement> except className'],
16
- example: '<Button onClick={save}>Save</Button>',
17
- storyId: 'core-button--default'
18
- };
@@ -1,151 +0,0 @@
1
- import * as stylex from '@stylexjs/stylex';
2
- import { semanticTokens } from '../authoring.stylex.js';
3
- import { SpinnerVisual } from './Spinner.js';
4
- import "../styles/stylex.css";
5
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
- const styles = {
7
- base: {
8
- kGNEyG: "x6s0dn4",
9
- kB7OPa: "x9f619",
10
- kaIpWk: "x8kq9my",
11
- ksu8eU: "x1jnjmdy",
12
- kMzoRj: "xpxnlqs",
13
- k1xSpc: "x3nfvp2",
14
- kMv6JI: "xj0sio9",
15
- k63SB2: "x1m30uz7",
16
- kOIVth: "x1ap6kct",
17
- kjj79g: "xl56j7k",
18
- kLWn49: "x1ezks3f",
19
- kVAEAm: "x1n2onr6",
20
- kD2jPA: "x48zea8",
21
- kdODIN: "x1oulntk",
22
- kWC4TW: "x609gy3",
23
- kZs9gx: "x15meki4",
24
- kiEn40: "xz32tfx",
25
- k7shQP: "x1p22nma",
26
- kPJHz1: "x17lds6u",
27
- $$css: true
28
- },
29
- sm: {
30
- kGuDYH: "xltg2ad",
31
- kZKoxP: "x1vbl8lt",
32
- kg3NbH: "x1qtbwip",
33
- $$css: true
34
- },
35
- md: {
36
- kGuDYH: "x1ti3rys",
37
- kZKoxP: "xr8hsnb",
38
- kg3NbH: "x1wkw8jr",
39
- $$css: true
40
- },
41
- lg: {
42
- kGuDYH: "x1ti3rys",
43
- kZKoxP: "xscltuj",
44
- kg3NbH: "x1q83fih",
45
- $$css: true
46
- },
47
- primary: {
48
- kWkggS: "x1j40q36",
49
- kVAM5u: "x10ghty7",
50
- kMwMTN: "x8ect3v",
51
- ktLb98: "xahjstz",
52
- ksVfMn: "xx21tl2",
53
- kDKVdO: "xzpaccd",
54
- kRIasW: "x6v1che",
55
- $$css: true
56
- },
57
- secondary: {
58
- kWkggS: "x1ixvsy6",
59
- kVAM5u: "x1wxkff4",
60
- kMwMTN: "x1y4yzzg",
61
- ktLb98: "x1975ut4",
62
- ksVfMn: "x1be0cy8",
63
- kDKVdO: "xbo0ryh",
64
- kRIasW: "x1u44if6",
65
- $$css: true
66
- },
67
- ghost: {
68
- kWkggS: "xjbqb8w",
69
- kVAM5u: "x9r1u3d",
70
- kMwMTN: "x1y4yzzg",
71
- ktLb98: "x1975ut4",
72
- kDKVdO: "xbo0ryh",
73
- $$css: true
74
- },
75
- destructive: {
76
- kWkggS: "x12uiudv",
77
- kVAM5u: "xcf5wgx",
78
- kMwMTN: "x8bm3zx",
79
- k90Bq6: "xuc1b5w",
80
- kFepIV: "x1pg383a",
81
- $$css: true
82
- },
83
- loading: {
84
- kkrTdU: "x19v85br",
85
- $$css: true
86
- },
87
- iconOnly: {
88
- kg3NbH: "xnjsko4",
89
- $$css: true
90
- },
91
- iconSm: {
92
- kzqmXN: "x9mi25i",
93
- $$css: true
94
- },
95
- iconMd: {
96
- kzqmXN: "x4ml2zf",
97
- $$css: true
98
- },
99
- iconLg: {
100
- kzqmXN: "x1089um4",
101
- $$css: true
102
- },
103
- iconHitTarget: {
104
- kgeoSG: "x1cpjm7i",
105
- kgzTxl: "x17f96yv",
106
- k96MEf: "x1knuo7r",
107
- kSJ0CW: "xfbisj7",
108
- kEoFBp: "x1hmns74",
109
- kcTAPf: "xbnewub",
110
- kOlAkY: "x1o8qpxl",
111
- $$css: true
112
- }
113
- };
114
- const iconSizes = {
115
- sm: styles.iconSm,
116
- md: styles.iconMd,
117
- lg: styles.iconLg
118
- };
119
-
120
- /** Visual sizes shared by native action controls. */
121
-
122
- /** Semantic emphasis variants shared by native action controls. */
123
-
124
- /** Props for a text-labelled native action button. */
125
-
126
- /** @internal Shared native implementation for Button and IconButton. */
127
- export function ActionControl({
128
- 'aria-busy': ariaBusy,
129
- children,
130
- disabled,
131
- iconOnly = false,
132
- loading = false,
133
- size = 'md',
134
- type = 'button',
135
- variant = 'primary',
136
- ...props
137
- }) {
138
- return /*#__PURE__*/_jsxs("button", {
139
- ...props,
140
- "aria-busy": loading ? 'true' : ariaBusy,
141
- disabled: disabled || loading,
142
- ...stylex.props(styles.base, styles[size], styles[variant], loading && styles.loading, iconOnly && styles.iconOnly, iconOnly && iconSizes[size], iconOnly && styles.iconHitTarget),
143
- type: type,
144
- children: [loading ? /*#__PURE__*/_jsx(SpinnerVisual, {}) : null, iconOnly && loading ? null : children]
145
- });
146
- }
147
- export function Button(props) {
148
- return /*#__PURE__*/_jsx(ActionControl, {
149
- ...props
150
- });
151
- }
@@ -1,6 +0,0 @@
1
- import type { HTMLAttributes } from 'react';
2
- export type CardElevation = 'none' | 'low' | 'medium';
3
- export interface CardProps extends Omit<HTMLAttributes<HTMLElement>, 'className'> {
4
- readonly elevation?: CardElevation;
5
- }
6
- export declare function Card({ children, elevation, ...props }: CardProps): import("react").JSX.Element;
@@ -1,11 +0,0 @@
1
- export declare const cardDoc: {
2
- name: string;
3
- description: string;
4
- props: {
5
- name: string;
6
- description: string;
7
- }[];
8
- inheritedProps: string[];
9
- example: string;
10
- storyId: string;
11
- };
@@ -1,15 +0,0 @@
1
- import "../styles/stylex.css";
2
- export const cardDoc = {
3
- name: 'Card',
4
- description: 'Groups self-contained content in a token-backed article surface.',
5
- props: [{
6
- name: 'children',
7
- description: 'The self-contained article content.'
8
- }, {
9
- name: 'elevation',
10
- description: 'Optional boundary treatment: "none" uses a border; "low" and "medium" use only the matching elevation.'
11
- }],
12
- inheritedProps: ['HTMLAttributes<HTMLElement> except className and children'],
13
- example: '<Card aria-label="Summary" elevation="none"><Text>Content</Text></Card>',
14
- storyId: 'core-card--default'
15
- };
@@ -1,41 +0,0 @@
1
- import * as stylex from '@stylexjs/stylex';
2
- import { semanticTokens } from '../authoring.stylex.js';
3
- import "../styles/stylex.css";
4
- import { jsx as _jsx } from "react/jsx-runtime";
5
- const styles = {
6
- base: {
7
- kWkggS: "x1ixvsy6",
8
- kaIpWk: "x7xrhi9",
9
- kMwMTN: "x1y4yzzg",
10
- kmVPX3: "x167l562",
11
- $$css: true
12
- },
13
- none: {
14
- kVAM5u: "xilcjya",
15
- ksu8eU: "x1jnjmdy",
16
- kMzoRj: "xpxnlqs",
17
- kGVxlE: "x1gnnqk1",
18
- $$css: true
19
- },
20
- low: {
21
- ksu8eU: "xng3xce",
22
- kGVxlE: "x1elh21b",
23
- $$css: true
24
- },
25
- medium: {
26
- ksu8eU: "xng3xce",
27
- kGVxlE: "x165nt33",
28
- $$css: true
29
- }
30
- };
31
- export function Card({
32
- children,
33
- elevation = 'none',
34
- ...props
35
- }) {
36
- return /*#__PURE__*/_jsx("article", {
37
- ...props,
38
- ...stylex.props(styles.base, styles[elevation]),
39
- children: children
40
- });
41
- }
@@ -1,3 +0,0 @@
1
- import type { HTMLAttributes } from 'react';
2
- export type CardFooterProps = Omit<HTMLAttributes<HTMLElement>, 'className'>;
3
- export declare function CardFooter({ children, ...props }: CardFooterProps): import("react").JSX.Element;