@jirawatpyk/aura-react 5.24.0 → 5.25.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/README.md +4 -0
- package/dist/aura.bundle.js +16 -2
- package/dist/cjs/index.cjs +16 -2
- package/dist/esm/Tag.js +16 -2
- package/dist/index.d.cts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/styles.css +2 -1
- package/dist/styles.layer.css +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -186,6 +186,10 @@ DataTable with sort and page in the URL (4.17): `onStateChange={({ sort, page })
|
|
|
186
186
|
- **Time zone**: `timeZone` on AuraProvider, DatePicker, DateRangePicker and Calendar decides "today" (the marker, `min`/`max="today"`, the first month shown); or pass `today` as an ISO date. `todayIn('Asia/Bangkok')` is exported from the root and `/server`.
|
|
187
187
|
- **Toasts** queue past three instead of dropping: six in a row all show, in order, three at a time.
|
|
188
188
|
|
|
189
|
+
## 5.25 — Chamber-OS addendum 27
|
|
190
|
+
|
|
191
|
+
- **Toggle `Tag` takes `touchHeight`** (item 124): a selectable Tag (`selected` / `onClick`) with `touchHeight` is at least 44px tall below 640px and wherever the primary pointer is coarse, the same rule as Button's (5.24) — filter chips tapped with a finger. The pill grows rather than keeping 32px with a larger invisible hit area, so it lines up with 44px buttons on the same row and a tap lands where it looks. With a mouse from 640px up it stays 32px. A plain or removable Tag ignores the prop, and the remove button is unchanged; the prop is never written to the DOM. In a flex row with the default `align-items: stretch`, other items stretch to the chips' 44px; put them in their own row or set `align-items: center` if they should keep their size.
|
|
192
|
+
|
|
189
193
|
## 5.24 — Chamber-OS addendum 26
|
|
190
194
|
|
|
191
195
|
- **`touchHeight` follows the pointer, not only the width** (item 123): Button, IconButton and the ActionBar Clear are 44px wherever the primary pointer is coarse — a tablet in portrait (768px) or landscape (1024–1366px) — as well as below 640px. With a mouse (`pointer: fine`) from 640px up nothing changes. Visible on tablets for every control that already passes `touchHeight`. A touch laptop reports its trackpad as the primary pointer (`pointer: fine`), so it keeps the compact size, as AURA's other touch rules do.
|
package/dist/aura.bundle.js
CHANGED
|
@@ -4242,7 +4242,16 @@ window.Aura = (() => {
|
|
|
4242
4242
|
var Tag = React25.forwardRef(function Tag2(props, ref) {
|
|
4243
4243
|
const t = useStrings();
|
|
4244
4244
|
const selectable = props.onClick != null || props.selected != null;
|
|
4245
|
-
const rest = omit(props, [
|
|
4245
|
+
const rest = omit(props, [
|
|
4246
|
+
"onRemove",
|
|
4247
|
+
"selected",
|
|
4248
|
+
"icon",
|
|
4249
|
+
"className",
|
|
4250
|
+
"children",
|
|
4251
|
+
"disabled",
|
|
4252
|
+
"removeLabel",
|
|
4253
|
+
"touchHeight"
|
|
4254
|
+
]);
|
|
4246
4255
|
const inner = [
|
|
4247
4256
|
props.icon ? /* @__PURE__ */ React25.createElement(Icon, { key: "i", name: props.icon, size: 14 }) : null,
|
|
4248
4257
|
/* @__PURE__ */ React25.createElement("span", { key: "t", className: "aura-tag__text" }, props.children)
|
|
@@ -4256,7 +4265,12 @@ window.Aura = (() => {
|
|
|
4256
4265
|
type: "button",
|
|
4257
4266
|
"aria-pressed": !!props.selected,
|
|
4258
4267
|
disabled: props.disabled,
|
|
4259
|
-
className: cx(
|
|
4268
|
+
className: cx(
|
|
4269
|
+
"aura-tag is-selectable",
|
|
4270
|
+
props.selected && "is-selected",
|
|
4271
|
+
props.touchHeight && "aura-tag--touch",
|
|
4272
|
+
props.className
|
|
4273
|
+
)
|
|
4260
4274
|
},
|
|
4261
4275
|
props.selected ? /* @__PURE__ */ React25.createElement(Icon, { name: /* @__PURE__ */ React25.createElement(IconCheck, null), size: 14 }) : inner[0],
|
|
4262
4276
|
inner[1]
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -4224,7 +4224,16 @@ function textOf2(node) {
|
|
|
4224
4224
|
var Tag = React25.forwardRef(function Tag2(props, ref) {
|
|
4225
4225
|
const t = useStrings();
|
|
4226
4226
|
const selectable = props.onClick != null || props.selected != null;
|
|
4227
|
-
const rest = omit(props, [
|
|
4227
|
+
const rest = omit(props, [
|
|
4228
|
+
"onRemove",
|
|
4229
|
+
"selected",
|
|
4230
|
+
"icon",
|
|
4231
|
+
"className",
|
|
4232
|
+
"children",
|
|
4233
|
+
"disabled",
|
|
4234
|
+
"removeLabel",
|
|
4235
|
+
"touchHeight"
|
|
4236
|
+
]);
|
|
4228
4237
|
const inner = [
|
|
4229
4238
|
props.icon ? /* @__PURE__ */ React25.createElement(Icon, { key: "i", name: props.icon, size: 14 }) : null,
|
|
4230
4239
|
/* @__PURE__ */ React25.createElement("span", { key: "t", className: "aura-tag__text" }, props.children)
|
|
@@ -4238,7 +4247,12 @@ var Tag = React25.forwardRef(function Tag2(props, ref) {
|
|
|
4238
4247
|
type: "button",
|
|
4239
4248
|
"aria-pressed": !!props.selected,
|
|
4240
4249
|
disabled: props.disabled,
|
|
4241
|
-
className: cx(
|
|
4250
|
+
className: cx(
|
|
4251
|
+
"aura-tag is-selectable",
|
|
4252
|
+
props.selected && "is-selected",
|
|
4253
|
+
props.touchHeight && "aura-tag--touch",
|
|
4254
|
+
props.className
|
|
4255
|
+
)
|
|
4242
4256
|
},
|
|
4243
4257
|
props.selected ? /* @__PURE__ */ React25.createElement(Icon, { name: /* @__PURE__ */ React25.createElement(IconCheck, null), size: 14 }) : inner[0],
|
|
4244
4258
|
inner[1]
|
package/dist/esm/Tag.js
CHANGED
|
@@ -17,7 +17,16 @@ function textOf(node) {
|
|
|
17
17
|
const Tag = React.forwardRef(function Tag2(props, ref) {
|
|
18
18
|
const t = useStrings();
|
|
19
19
|
const selectable = props.onClick != null || props.selected != null;
|
|
20
|
-
const rest = omit(props, [
|
|
20
|
+
const rest = omit(props, [
|
|
21
|
+
"onRemove",
|
|
22
|
+
"selected",
|
|
23
|
+
"icon",
|
|
24
|
+
"className",
|
|
25
|
+
"children",
|
|
26
|
+
"disabled",
|
|
27
|
+
"removeLabel",
|
|
28
|
+
"touchHeight"
|
|
29
|
+
]);
|
|
21
30
|
const inner = [
|
|
22
31
|
props.icon ? /* @__PURE__ */ React.createElement(Icon, { key: "i", name: props.icon, size: 14 }) : null,
|
|
23
32
|
/* @__PURE__ */ React.createElement("span", { key: "t", className: "aura-tag__text" }, props.children)
|
|
@@ -31,7 +40,12 @@ const Tag = React.forwardRef(function Tag2(props, ref) {
|
|
|
31
40
|
type: "button",
|
|
32
41
|
"aria-pressed": !!props.selected,
|
|
33
42
|
disabled: props.disabled,
|
|
34
|
-
className: cx(
|
|
43
|
+
className: cx(
|
|
44
|
+
"aura-tag is-selectable",
|
|
45
|
+
props.selected && "is-selected",
|
|
46
|
+
props.touchHeight && "aura-tag--touch",
|
|
47
|
+
props.className
|
|
48
|
+
)
|
|
35
49
|
},
|
|
36
50
|
props.selected ? /* @__PURE__ */ React.createElement(Icon, { name: /* @__PURE__ */ React.createElement(IconCheck, null), size: 14 }) : inner[0],
|
|
37
51
|
inner[1]
|
package/dist/index.d.cts
CHANGED
|
@@ -1350,6 +1350,10 @@ export interface TagProps extends Omit<React$1.HTMLAttributes<HTMLElement>, "onC
|
|
|
1350
1350
|
selected?: boolean | undefined;
|
|
1351
1351
|
onClick?: ((e: React$1.MouseEvent<HTMLButtonElement>) => void) | undefined;
|
|
1352
1352
|
disabled?: boolean | undefined;
|
|
1353
|
+
/** A toggle chip (`selected` / `onClick`) at least 44px tall below 640px or wherever the primary pointer is coarse
|
|
1354
|
+
* — filter chips tapped with a finger (5.25, Chamber-OS 124); with a mouse from 640px up it keeps 32px, as Button's
|
|
1355
|
+
* `touchHeight`. A plain or removable Tag ignores it. */
|
|
1356
|
+
touchHeight?: boolean | undefined;
|
|
1353
1357
|
}
|
|
1354
1358
|
export interface ProgressProps {
|
|
1355
1359
|
/** Omit for indeterminate. */
|
package/dist/index.d.ts
CHANGED
|
@@ -1350,6 +1350,10 @@ export interface TagProps extends Omit<React$1.HTMLAttributes<HTMLElement>, "onC
|
|
|
1350
1350
|
selected?: boolean | undefined;
|
|
1351
1351
|
onClick?: ((e: React$1.MouseEvent<HTMLButtonElement>) => void) | undefined;
|
|
1352
1352
|
disabled?: boolean | undefined;
|
|
1353
|
+
/** A toggle chip (`selected` / `onClick`) at least 44px tall below 640px or wherever the primary pointer is coarse
|
|
1354
|
+
* — filter chips tapped with a finger (5.25, Chamber-OS 124); with a mouse from 640px up it keeps 32px, as Button's
|
|
1355
|
+
* `touchHeight`. A plain or removable Tag ignores it. */
|
|
1356
|
+
touchHeight?: boolean | undefined;
|
|
1353
1357
|
}
|
|
1354
1358
|
export interface ProgressProps {
|
|
1355
1359
|
/** Omit for indeterminate. */
|
package/dist/styles.css
CHANGED
|
@@ -314,11 +314,12 @@ a.aura-icon-btn { text-decoration: none; }
|
|
|
314
314
|
.aura-icon-btn:focus-visible { outline: var(--aura-focus-ring-width) solid var(--aura-focus-ring); outline-offset: var(--aura-focus-ring-offset); }
|
|
315
315
|
/* 5.15 (Chamber-OS 100): touchHeight — visibly 44px on phones, for buttons and icon buttons a phone design wants full size.
|
|
316
316
|
* 5.24 (Chamber-OS 123): also wherever the primary pointer is coarse — a tablet at 768–1366px is a finger, not a mouse.
|
|
317
|
-
* A mouse on a wide screen (pointer: fine) keeps the compact size. */
|
|
317
|
+
* A mouse on a wide screen (pointer: fine) keeps the compact size. 5.25 (Chamber-OS 124): toggle Tags too. */
|
|
318
318
|
@media (max-width: 639.98px), (pointer: coarse) {
|
|
319
319
|
.aura-btn.aura-btn--touch { height: var(--aura-touch-target); }
|
|
320
320
|
.aura-btn.aura-btn--touch.aura-btn--full { height: auto; min-height: var(--aura-touch-target); }
|
|
321
321
|
.aura-icon-btn.aura-icon-btn--touch { width: var(--aura-touch-target); height: var(--aura-touch-target); }
|
|
322
|
+
.aura-tag.aura-tag--touch { min-height: var(--aura-touch-target); }
|
|
322
323
|
}
|
|
323
324
|
/* Touch: same 32px look, a 44px hit area around it (WCAG 2.5.5). */
|
|
324
325
|
@media (pointer: coarse) {
|
package/dist/styles.layer.css
CHANGED
|
@@ -316,11 +316,12 @@ a.aura-icon-btn { text-decoration: none; }
|
|
|
316
316
|
.aura-icon-btn:focus-visible { outline: var(--aura-focus-ring-width) solid var(--aura-focus-ring); outline-offset: var(--aura-focus-ring-offset); }
|
|
317
317
|
/* 5.15 (Chamber-OS 100): touchHeight — visibly 44px on phones, for buttons and icon buttons a phone design wants full size.
|
|
318
318
|
* 5.24 (Chamber-OS 123): also wherever the primary pointer is coarse — a tablet at 768–1366px is a finger, not a mouse.
|
|
319
|
-
* A mouse on a wide screen (pointer: fine) keeps the compact size. */
|
|
319
|
+
* A mouse on a wide screen (pointer: fine) keeps the compact size. 5.25 (Chamber-OS 124): toggle Tags too. */
|
|
320
320
|
@media (max-width: 639.98px), (pointer: coarse) {
|
|
321
321
|
.aura-btn.aura-btn--touch { height: var(--aura-touch-target); }
|
|
322
322
|
.aura-btn.aura-btn--touch.aura-btn--full { height: auto; min-height: var(--aura-touch-target); }
|
|
323
323
|
.aura-icon-btn.aura-icon-btn--touch { width: var(--aura-touch-target); height: var(--aura-touch-target); }
|
|
324
|
+
.aura-tag.aura-tag--touch { min-height: var(--aura-touch-target); }
|
|
324
325
|
}
|
|
325
326
|
/* Touch: same 32px look, a 44px hit area around it (WCAG 2.5.5). */
|
|
326
327
|
@media (pointer: coarse) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jirawatpyk/aura-react",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.25.0",
|
|
4
4
|
"description": "AURA Design System — React components (Enterprise Standard, Human Creative). Thai-first: Buddhist-era dates, Thai collation.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|