neba 1.9.0 → 1.10.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/dist/components/checkbox/Checkbox.d.ts +13 -1
- package/dist/components/checkbox/Checkbox.js +1 -1
- package/dist/components/combobox/Combobox.d.ts +17 -2
- package/dist/components/combobox/Combobox.js +1 -1
- package/dist/components/command-palette/CommandPalette.d.ts +19 -2
- package/dist/components/command-palette/CommandPalette.js +1 -1
- package/dist/components/dialog/Dialog.d.ts +19 -2
- package/dist/components/dialog/Dialog.js +1 -1
- package/dist/components/number-field/NumberField.d.ts +17 -2
- package/dist/components/number-field/NumberField.js +1 -1
- package/dist/components/radio-group/RadioGroup.d.ts +22 -1
- package/dist/components/radio-group/RadioGroup.js +1 -1
- package/dist/components/select/Select.d.ts +16 -1
- package/dist/components/select/Select.js +1 -1
- package/dist/components/switch/Switch.d.ts +13 -1
- package/dist/components/switch/Switch.js +1 -1
- package/dist/components/table/Table.d.ts +21 -2
- package/dist/components/table/Table.js +1 -1
- package/dist/components/text-field/TextField.d.ts +16 -1
- package/dist/components/text-field/TextField.js +1 -1
- package/dist/components/toast/Toast.d.ts +17 -2
- package/dist/components/toast/Toast.js +1 -1
- package/dist/components/tour/Tour.d.ts +17 -2
- package/dist/components/tour/Tour.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/types.d.ts +39 -0
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -482,3 +482,42 @@ export interface NebaStyleProps {
|
|
|
482
482
|
/** @default 'default' */
|
|
483
483
|
density?: NebaDensity;
|
|
484
484
|
}
|
|
485
|
+
/**
|
|
486
|
+
* Class names for the parts of a component that its `className` cannot reach.
|
|
487
|
+
*
|
|
488
|
+
* A component that draws one element needs none of this: `className` lands on
|
|
489
|
+
* that element and there is nothing else to say. A component that draws six —
|
|
490
|
+
* a field with a label, a shell, a control and two lines of text under it — has
|
|
491
|
+
* five parts a caller can see, can want to change, and has no way to name. That
|
|
492
|
+
* is what this is for, and it is the whole of what it is for.
|
|
493
|
+
*
|
|
494
|
+
* **There is never a `root` key.** `className` is the root, on every component
|
|
495
|
+
* in the library, and a `classNames.root` beside it would be a second spelling
|
|
496
|
+
* of an idea that already has one. The rule that keeps `size` meaning one thing
|
|
497
|
+
* applies here too.
|
|
498
|
+
*
|
|
499
|
+
* A slot name is a promise about the element behind it, so the union each
|
|
500
|
+
* component declares is deliberately short. Only parts that are *structurally*
|
|
501
|
+
* there — a label is a label whatever the field is — get a name; the wrappers
|
|
502
|
+
* that exist to hold a flex direction do not, because naming one freezes a
|
|
503
|
+
* layout decision into the public API.
|
|
504
|
+
*/
|
|
505
|
+
export type NebaSlots<Slot extends string> = Partial<Record<Slot, string>>;
|
|
506
|
+
/**
|
|
507
|
+
* The parts every field-shaped component draws, and the reason they are one
|
|
508
|
+
* type: a `classNames.label` has to mean the label on a TextField, a Select, a
|
|
509
|
+
* Checkbox and a RadioGroup alike, exactly as a `size` of `md` means one height
|
|
510
|
+
* everywhere.
|
|
511
|
+
*
|
|
512
|
+
* - `label` — the field's own name, above it or beside it.
|
|
513
|
+
* - `control` — the thing the reader actually operates: the `<input>`, the
|
|
514
|
+
* trigger, the tick, the track.
|
|
515
|
+
* - `description` — the helper line under it.
|
|
516
|
+
* - `error` — the message that replaces it when the field is invalid.
|
|
517
|
+
*
|
|
518
|
+
* Four rather than more, because these four are the ones that exist on all of
|
|
519
|
+
* them. A shell around the control, a popup, a chip — those are real parts, but
|
|
520
|
+
* only some fields have them, and a slot offered on a component that cannot
|
|
521
|
+
* draw it is a slot that does nothing.
|
|
522
|
+
*/
|
|
523
|
+
export type NebaFieldSlot = 'label' | 'control' | 'description' | 'error';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "neba",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.0",
|
|
4
4
|
"description": "A comprehensive React UI component library — buttons, fields, menus, dialogs, tables and much more — accessible and themeable, sharing one prop vocabulary and a translucent acrylic design language. ESM only, types included, dark mode built in.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "dist/index.d.ts",
|