@fpkit/acss 6.3.0 → 6.4.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.
- package/libs/components/alert/alert.css +1 -1
- package/libs/components/alert/alert.css.map +1 -1
- package/libs/components/alert/alert.min.css +2 -2
- package/libs/components/buttons/icon-button.css +1 -1
- package/libs/components/buttons/icon-button.css.map +1 -1
- package/libs/components/buttons/icon-button.min.css +2 -2
- package/libs/components/dialog/dialog.css +1 -1
- package/libs/components/dialog/dialog.css.map +1 -1
- package/libs/components/dialog/dialog.min.css +2 -2
- package/libs/components/icons/icon.d.cts +1 -1
- package/libs/components/icons/icon.d.ts +1 -1
- package/libs/{icons-2c09535c.d.ts → icons-48788561.d.ts} +32 -32
- package/libs/icons.d.cts +1 -1
- package/libs/icons.d.ts +1 -1
- package/libs/index.cjs.map +1 -1
- package/libs/index.css +1 -1
- package/libs/index.css.map +1 -1
- package/libs/index.d.cts +11 -8
- package/libs/index.d.ts +11 -8
- package/libs/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/alert/alert.scss +0 -13
- package/src/components/buttons/icon-button.mdx +204 -0
- package/src/components/buttons/icon-button.scss +64 -26
- package/src/components/buttons/icon-button.tsx +9 -6
- package/src/components/dialog/dialog-modal.stories.tsx +71 -0
- package/src/components/dialog/dialog-modal.tsx +29 -3
- package/src/components/dialog/dialog.scss +1 -0
- package/src/components/dialog/dialog.test.tsx +119 -0
- package/src/components/dialog/dialog.types.ts +8 -1
- package/src/sass/utilities/_display.scss +156 -0
- package/src/sass/utilities/_index.scss +3 -0
- package/src/sass/utilities/display.mdx +203 -0
- package/src/sass/utilities/display.stories.tsx +141 -0
- package/src/styles/alert/alert.css +0 -13
- package/src/styles/alert/alert.css.map +1 -1
- package/src/styles/buttons/icon-button.css +55 -16
- package/src/styles/buttons/icon-button.css.map +1 -1
- package/src/styles/dialog/dialog.css +1 -0
- package/src/styles/dialog/dialog.css.map +1 -1
- package/src/styles/index.css +136 -13
- package/src/styles/index.css.map +1 -1
package/libs/index.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { ButtonProps } from './components/button.js';
|
|
|
2
2
|
export { Button } from './components/button.js';
|
|
3
3
|
import React$1, { ReactNode } from 'react';
|
|
4
4
|
export { Card, Content as CardContent, Footer as CardFooter, CardProps, Title as CardTitle } from './components/card.js';
|
|
5
|
-
import { I as IconProps } from './icons-
|
|
6
|
-
export { a as Icon, b as IconProps } from './icons-
|
|
5
|
+
import { I as IconProps } from './icons-48788561.js';
|
|
6
|
+
export { a as Icon, b as IconProps } from './icons-48788561.js';
|
|
7
7
|
export { default as Field, FieldProps } from './components/form/fields.js';
|
|
8
8
|
export { default as Input } from './components/form/inputs.js';
|
|
9
9
|
import { I as InputProps } from './form.types-d25ebfac.js';
|
|
@@ -41,11 +41,13 @@ type IconButtonProps = Omit<ButtonProps, "children"> & (WithAriaLabel | WithAria
|
|
|
41
41
|
icon: React$1.ReactNode;
|
|
42
42
|
/**
|
|
43
43
|
* Optional text shown alongside the icon at desktop widths.
|
|
44
|
-
*
|
|
45
|
-
*
|
|
44
|
+
* Visually hidden below the `$icon-label-bp` SCSS breakpoint (default 48rem / 768px)
|
|
45
|
+
* via a media query on `[data-icon-label]`, but always present in the accessibility
|
|
46
|
+
* tree — screen readers announce it at every viewport size.
|
|
46
47
|
*
|
|
47
|
-
* NOTE: When `label` is
|
|
48
|
-
*
|
|
48
|
+
* NOTE: When `label` is provided, the default `variant="icon"` removes padding.
|
|
49
|
+
* Use `variant="outline"` (or another padded variant) to restore layout padding
|
|
50
|
+
* alongside the label.
|
|
49
51
|
*/
|
|
50
52
|
label?: string;
|
|
51
53
|
/** Button type: button, submit, or reset. Required. */
|
|
@@ -54,15 +56,16 @@ type IconButtonProps = Omit<ButtonProps, "children"> & (WithAriaLabel | WithAria
|
|
|
54
56
|
/**
|
|
55
57
|
* Accessible icon button component. Wraps `Button` with:
|
|
56
58
|
* - Required accessible label via `aria-label` or `aria-labelledby` (XOR enforced)
|
|
57
|
-
* - Optional
|
|
59
|
+
* - Optional `label` text hidden on mobile (< 48rem), visible on desktop — always in a11y tree
|
|
58
60
|
* - `variant="icon"` default (square, no padding)
|
|
61
|
+
* - Fixed `3rem × 3rem` tap target (48px at default root font size — WCAG 2.5.5 AAA)
|
|
59
62
|
*
|
|
60
63
|
* @example
|
|
61
64
|
* // Icon only
|
|
62
65
|
* <IconButton type="button" aria-label="Close menu" icon={<CloseIcon />} />
|
|
63
66
|
*
|
|
64
67
|
* @example
|
|
65
|
-
* // Icon + label (label hides on mobile)
|
|
68
|
+
* // Icon + label (label hides on mobile, visible at >= 48rem / 768px)
|
|
66
69
|
* <IconButton
|
|
67
70
|
* type="button"
|
|
68
71
|
* aria-label="Settings"
|