@usableapp/cardds 0.7.161 → 0.7.162
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/CHANGELOG.md +32 -0
- package/css/actions.css +27 -45
- package/css/base.css +8 -5
- package/css/card.css +5 -5
- package/css/journey.css +5 -7
- package/css/layover.css +0 -1
- package/css/lists.css +2 -2
- package/css/media.css +5 -0
- package/css/numbers.css +1 -1
- package/css/palette.css +1 -1
- package/css/parts.css +73 -55
- package/css/sheet.css +1 -1
- package/css/stack.css +13 -5
- package/css/stamp.css +30 -30
- package/css/tokens.css +37 -4
- package/dist/actions/Btn.d.ts +59 -28
- package/dist/actions/Btn.js +17 -5
- package/dist/actions/BtnGroup.d.ts +3 -3
- package/dist/actions/BtnGroup.js +2 -2
- package/dist/actions/BtnRow.d.ts +2 -2
- package/dist/actions/BtnRow.js +1 -1
- package/dist/actions/Chip.d.ts +1 -1
- package/dist/actions/Fab.d.ts +11 -7
- package/dist/actions/Fab.js +6 -5
- package/dist/actions/LinkBlock.d.ts +2 -1
- package/dist/actions/LinkBlock.js +2 -1
- package/dist/cardds.css +208 -162
- package/dist/cards/CardParts.d.ts +1 -1
- package/dist/cards/CardParts.js +1 -1
- package/dist/catalog.json +1 -1
- package/dist/choice/Calendar.js +2 -2
- package/dist/forms/Composer.d.ts +2 -2
- package/dist/forms/Field.d.ts +1 -1
- package/dist/forms/Field.js +1 -1
- package/dist/forms/FileBtn.d.ts +8 -7
- package/dist/forms/FileBtn.js +3 -3
- package/dist/forms/MessageBar.d.ts +2 -2
- package/dist/forms/MessageBar.js +4 -4
- package/dist/forms/Pin.js +2 -3
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/journey/JourneyBadge.d.ts +7 -4
- package/dist/journey/JourneyBadge.js +3 -3
- package/dist/lists/Bubble.d.ts +6 -6
- package/dist/media/Postcard.d.ts +1 -1
- package/dist/media/Postcard.js +2 -2
- package/dist/media/Tile.d.ts +4 -6
- package/dist/media/Tile.js +2 -2
- package/dist/parts/End.d.ts +1 -1
- package/dist/parts/End.js +1 -1
- package/dist/parts/Foot.d.ts +3 -3
- package/dist/parts/Foot.js +1 -1
- package/dist/parts/Head.d.ts +3 -2
- package/dist/parts/Head.js +3 -2
- package/dist/parts/Words.d.ts +3 -2
- package/dist/parts/Words.js +11 -6
- package/dist/parts/endRoom.d.ts +6 -4
- package/dist/parts/endRoom.js +13 -8
- package/dist/post/PostDesk.js +2 -3
- package/dist/post/PostLetter.js +2 -2
- package/dist/scaffold/ActionBar.d.ts +4 -4
- package/dist/scaffold/ActionBar.js +3 -3
- package/dist/scaffold/AppBar.d.ts +1 -1
- package/dist/scaffold/FloatBar.d.ts +1 -1
- package/dist/scaffold/TopBar.d.ts +2 -2
- package/dist/sheets/Modal.d.ts +2 -2
- package/dist/sheets/Modal.js +2 -2
- package/dist/sheets/Sheet.d.ts +1 -1
- package/dist/sheets/Sheet.js +1 -1
- package/dist/sheets/SheetStack.js +3 -4
- package/dist/sheets/StackBack.d.ts +1 -1
- package/dist/sheets/StackBack.js +2 -3
- package/dist/sheets/StackSheet.d.ts +1 -1
- package/dist/sheets/StackSheet.js +2 -3
- package/dist/sheets/sheetDrag.js +2 -2
- package/dist/sheets/stackCard.js +5 -6
- package/dist/stamp/Stamp.d.ts +4 -2
- package/dist/stamp/Stamp.js +2 -2
- package/dist/state.d.ts +2 -0
- package/dist/state.js +9 -0
- package/dist/sticky/Sticky.d.ts +1 -1
- package/dist/sticky/StickyAnswer.d.ts +1 -1
- package/dist/sticky/StickyHeading.d.ts +2 -2
- package/dist/templates/CallSheet.js +1 -1
- package/dist/templates/Walkthrough.js +2 -2
- package/dist/type/Icon.d.ts +1 -1
- package/dist/type/Icon.js +1 -1
- package/dist/type/textScale.d.ts +4 -3
- package/dist/type/textScale.js +4 -3
- package/docs/reference.md +45 -25
- package/lint/rules.mjs +7 -7
- package/package.json +3 -1
- package/scripts/codemod-parts.mjs +1 -1
- package/dist/actions/IconBtn.d.ts +0 -326
- package/dist/actions/IconBtn.js +0 -19
package/dist/actions/IconBtn.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { createElement } from 'react';
|
|
3
|
-
import { cx } from '../cx.js';
|
|
4
|
-
import { warnOnce } from '../state.js';
|
|
5
|
-
import { Icon } from '../type/Icon.js';
|
|
6
|
-
import { useSendOut } from './useSendOut.js';
|
|
7
|
-
/** IconBtn — the round icon button: `sm` in heads and bars, full size in rows and composers, `invert` for the one filled move, `primary` for the
|
|
8
|
-
* primary fill. `size="lg"` / `"xl"` are the big rounds (the foot of a few round answers: `<Foot round>`); a short WORD may stand in one
|
|
9
|
-
* as its child (`<IconBtn size="xl" primary label="ช่วยเหลือ">ช่วย</IconBtn>`): it grows with the member's text size up to the circle's share.
|
|
10
|
-
* It is a button and nothing more: to open a Menu, give it the platform's `popoverTarget={the Menu's id}` and render that `<Menu popover actions id>`
|
|
11
|
-
* wherever you like — the panel anchors to the button that opened it. To open anything else, `onClick`. */
|
|
12
|
-
export function IconBtn({ label, icon, sm, size, invert, primary, href, sending, onSent, onAnimationEnd, className, type, children, ...rest }) {
|
|
13
|
-
const ended = useSendOut(sending, onSent, onAnimationEnd);
|
|
14
|
-
if (invert && primary)
|
|
15
|
-
warnOnce('icon-btn-fill', 'cardds IconBtn: `invert` and `primary` together — two fills for one button; `primary` is drawn');
|
|
16
|
-
const step = size ?? (sm ? 'sm' : undefined);
|
|
17
|
-
const btn = createElement(href ? 'a' : 'button', { href, type: href ? undefined : type ?? 'button', 'aria-label': label, onAnimationEnd: ended, className: cx('icon-btn', step && `icon-btn--${step}`, invert && 'icon-btn--invert', primary && 'icon-btn--primary', sending && 'is-sending', className), ...rest }, icon ? _jsx(Icon, { name: icon, size: step === 'sm' ? 'sm' : 'md' }) : children);
|
|
18
|
-
return btn;
|
|
19
|
-
}
|