@scattered-light/loomiere 0.8.0 → 0.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.
@@ -345,8 +345,8 @@ function brandBook({ theme, brand, byPath, cssName, usageOf, tokens, tiers, styl
345
345
  '',
346
346
  '`window.Loomiere` holds two kinds of component:',
347
347
  '',
348
- `- **Wrappers** put their own classes on, so use them bare: ${['Button', 'Input', 'Field', 'Fieldset', 'Form', 'NavigationMenu', 'Select', 'NumberField', 'OTPField', 'Autocomplete', 'Combobox', 'Checkbox', 'Radio', 'CheckboxGroup', 'Toggle', 'ToggleGroup', 'Dialog', 'AlertDialog', 'Meter', 'Progress', 'Slider', 'Menu', 'ContextMenu', 'Menubar', 'Popover', 'PreviewCard', 'Tooltip', 'Drawer', 'Accordion', 'Collapsible', 'Tabs', 'Switch', 'Toast', 'Avatar', 'Toolbar', 'ScrollArea', 'Separator', 'Badge', 'DatePicker', 'MoneyField', 'Splitter', 'ListDetail', 'EmptyState', 'DataTable', 'DataList', 'CollectionToolbar', 'CollectionPagination', 'EditableList', 'Sheet', 'StatFigure', 'DescriptionList'].filter(has).map((n) => `\`Loomiere.${n}\``).join(', ')}. \`Loomiere.Button\` also takes \`emphasis\` (\`bold|standard|subtle|quiet\`) and \`palette\` props, and a Button holding only an icon draws itself square (it sets \`data-icon-only\`). Wrapped parts that are buttons (\`Dialog.Trigger\`, \`Menu.Trigger\`, \`Toolbar.Button\`, \`Drawer.Close\`...) take the same \`emphasis\` and \`palette\` props and draw square the same way. \`Popover.Trigger\`, \`Tooltip.Trigger\`, \`Select.Trigger\` and \`Dialog.Close\` become Buttons only when they set \`emphasis\`, \`palette\` or \`className="Button"\`. A plain \`.Button\` on a bare part is drawn square when it has an \`aria-label\` and a single icon inside, or when you set \`data-icon-only\` on it. \`Loomiere.Badge\` takes the same \`emphasis\` and \`palette\` props, plus \`status\`, \`size\` and \`dot\`.`,
349
- '- **Table, Badge, DatePicker, MoneyField, Splitter, ListDetail, EmptyState, DataTable, DataList, CollectionToolbar, CollectionPagination, EditableList, Sheet, StatFigure and DescriptionList are Loomiere components**, not Base UI parts. Table is plain HTML for a static table or a report: use the classes in its stylesheet. Badge is `Loomiere.Badge`. DatePicker is `Loomiere.DatePicker`; `Loomiere.Calendar` is the month grid on its own and `Loomiere.DatePresets` is the quick-selection list. MoneyField is `Loomiere.MoneyField`: an amount of money, stored as minor units. Splitter is `Loomiere.Splitter`. ListDetail is `Loomiere.ListDetail`. EmptyState is `Loomiere.EmptyState`. DataTable, DataList, CollectionToolbar and CollectionPagination come from `@scattered-light/loomiere-base-ui/custom/collection` and need `@tanstack/react-table` installed. EditableList, Sheet, StatFigure and DescriptionList (with `Loomiere.DescriptionItem`) come from the package root or `./custom`.',
348
+ `- **Wrappers** put their own classes on, so use them bare: ${['Button', 'Input', 'Field', 'Fieldset', 'Form', 'NavigationMenu', 'Select', 'NumberField', 'OTPField', 'Autocomplete', 'Combobox', 'Checkbox', 'Radio', 'CheckboxGroup', 'Toggle', 'ToggleGroup', 'Dialog', 'AlertDialog', 'Meter', 'Progress', 'Slider', 'Menu', 'ContextMenu', 'Menubar', 'Popover', 'PreviewCard', 'Tooltip', 'Drawer', 'Accordion', 'Collapsible', 'Tabs', 'Switch', 'Toast', 'Avatar', 'Toolbar', 'ScrollArea', 'Separator', 'Badge', 'DatePicker', 'MoneyField', 'Splitter', 'ListDetail', 'EmptyState', 'DataTable', 'DataList', 'CollectionToolbar', 'CollectionPagination', 'EditableList', 'Sheet', 'StatFigure', 'DescriptionList', 'AppBar', 'PickerButton', 'SideNav'].filter(has).map((n) => `\`Loomiere.${n}\``).join(', ')}. \`Loomiere.Button\` also takes \`emphasis\` (\`bold|standard|subtle|quiet\`) and \`palette\` props, and a Button holding only an icon draws itself square (it sets \`data-icon-only\`). Wrapped parts that are buttons (\`Dialog.Trigger\`, \`Menu.Trigger\`, \`Toolbar.Button\`, \`Drawer.Close\`...) take the same \`emphasis\` and \`palette\` props and draw square the same way. \`Popover.Trigger\`, \`Tooltip.Trigger\`, \`Select.Trigger\` and \`Dialog.Close\` become Buttons only when they set \`emphasis\`, \`palette\` or \`className="Button"\`. A plain \`.Button\` on a bare part is drawn square when it has an \`aria-label\` and a single icon inside, or when you set \`data-icon-only\` on it. \`Loomiere.Badge\` takes the same \`emphasis\` and \`palette\` props, plus \`status\`, \`size\` and \`dot\`.`,
349
+ '- **Table, Badge, DatePicker, MoneyField, Splitter, ListDetail, EmptyState, DataTable, DataList, CollectionToolbar, CollectionPagination, EditableList, Sheet, StatFigure, DescriptionList, AppBar, PickerButton and SideNav are Loomiere components**, not Base UI parts. Table is plain HTML for a static table or a report: use the classes in its stylesheet. Badge is `Loomiere.Badge`. DatePicker is `Loomiere.DatePicker`; `Loomiere.Calendar` is the month grid on its own and `Loomiere.DatePresets` is the quick-selection list. MoneyField is `Loomiere.MoneyField`: an amount of money, stored as minor units. Splitter is `Loomiere.Splitter`. ListDetail is `Loomiere.ListDetail`. EmptyState is `Loomiere.EmptyState`. DataTable, DataList, CollectionToolbar and CollectionPagination come from `@scattered-light/loomiere-base-ui/custom/collection` and need `@tanstack/react-table` installed. EditableList, Sheet, StatFigure, DescriptionList (with `Loomiere.DescriptionItem`), AppBar (with `Loomiere.AppBarSpacer`), PickerButton and SideNav (with `Loomiere.SideNavItem`, `Loomiere.SideNavGroup` and `Loomiere.SideNavToggle`) come from the package root or `./custom`.',
350
350
  '',
351
351
  '`Loomiere.Base` holds the bare Base UI parts for the wrappers too (`Loomiere.Base.Button`), for when you need the part without its classes.',
352
352
  '',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scattered-light/loomiere",
3
- "version": "0.8.0",
3
+ "version": "0.10.0",
4
4
  "description": "Turns a small brand file into a full design token theme: OKLCH color ramps, a type scale, light, dark and high-contrast modes, plus Tailwind, MUI, Chakra, AG Grid and Figma exports.",
5
5
  "keywords": ["design-tokens", "theme", "style-dictionary", "dtcg", "oklch", "base-ui", "ag-grid", "tailwind"],
6
6
  "repository": {
@@ -0,0 +1,40 @@
1
+ {
2
+ "app-bar": {
3
+ "$description": "AppBar: the bar across the top of an app window. It holds the wordmark, context pickers, a module switch and icon actions in one row, and sits on a line in the rule color. With rule.width on, that line is the working-paper rule.",
4
+ "height": {
5
+ "$value": "{space.16}",
6
+ "$description": "Least height of the bar. It grows if its contents wrap."
7
+ },
8
+ "padding-inline": {
9
+ "$value": "{space.6}",
10
+ "$description": "Space at the bar's start and end."
11
+ },
12
+ "gap": {
13
+ "$value": "{space.2-5}",
14
+ "$description": "Space between the things in the bar."
15
+ },
16
+ "background": {
17
+ "$value": "{surface.raised}",
18
+ "$type": "color",
19
+ "$description": "The bar's fill: one step off the page, like a card, so the page reads as sitting under it."
20
+ },
21
+ "border-width": {
22
+ "$value": "{stroke.default}",
23
+ "$description": "The line under the bar while rule.width is 0. With rule.width on, the line takes the thicker of the two."
24
+ },
25
+ "border-color": {
26
+ "$value": "{rule.color}",
27
+ "$type": "color",
28
+ "$description": "The line under the bar, in the rule color, so an ink rule brand gets an ink line here too."
29
+ },
30
+ "divider-height": {
31
+ "$value": "{space.6}",
32
+ "$description": "Height of a vertical Separator between groups of actions in the bar."
33
+ },
34
+ "divider-color": {
35
+ "$value": "{border.strong}",
36
+ "$type": "color",
37
+ "$description": "Color of a vertical Separator in the bar."
38
+ }
39
+ }
40
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "picker-button": {
3
+ "$description": "PickerButton: a trigger that names what it picks with a caps label before the current choice (CLIENT Alpha Services). It has the field look of a Select trigger; only its own measures are here.",
4
+ "max-width": {
5
+ "$value": "18rem",
6
+ "$description": "Widest the button grows. A longer choice is cut with an ellipsis; the label never is."
7
+ },
8
+ "label-color": {
9
+ "$value": "{text.secondary}",
10
+ "$type": "color",
11
+ "$description": "The caps label, quieter than the choice it names."
12
+ }
13
+ }
14
+ }
@@ -0,0 +1,102 @@
1
+ {
2
+ "side-nav": {
3
+ "$description": "SideNav: the column of links down the side of a workspace. Rows are ruled apart like a ledger, the current row sits on the raised surface with a rule under it, counts are figures in the accent text color, and group headings are caps labels. Built from the surface, border and rule concepts; only its own measures are here.",
4
+ "background": {
5
+ "$value": "{surface.tray}",
6
+ "$type": "color",
7
+ "$description": "The column's fill: the tray surface, a step off the page, so the current row on the raised surface stands out from it."
8
+ },
9
+ "border-color": {
10
+ "$value": "{border.default}",
11
+ "$type": "color",
12
+ "$description": "The line between the column and the page."
13
+ },
14
+ "item-height": {
15
+ "$value": "{control.height-md}",
16
+ "$description": "Least height of a row: the regular control height, so a row is as tall as a button."
17
+ },
18
+ "item-padding-inline": {
19
+ "$value": "{space.5}",
20
+ "$description": "Space at each end of a row."
21
+ },
22
+ "item-gap": {
23
+ "$value": "{space.2}",
24
+ "$description": "Space between a row's label and its count."
25
+ },
26
+ "item-divider-color": {
27
+ "$value": "{border.subtle}",
28
+ "$type": "color",
29
+ "$description": "The hairline under each row."
30
+ },
31
+ "item-color": {
32
+ "$value": "{text.primary}",
33
+ "$type": "color",
34
+ "$description": "A row's text."
35
+ },
36
+ "item-color-disabled": {
37
+ "$value": "{text.secondary}",
38
+ "$type": "color",
39
+ "$description": "A row that is not available yet. Secondary text, not the faded disabled color, so its hint stays readable."
40
+ },
41
+ "item-background-hover": {
42
+ "$value": "{fill.subtle}",
43
+ "$type": "color",
44
+ "$description": "A row under the pointer."
45
+ },
46
+ "item-background-current": {
47
+ "$value": "{surface.raised}",
48
+ "$type": "color",
49
+ "$description": "The current row: the raised surface, so it reads as the open page."
50
+ },
51
+ "indicator-width": {
52
+ "$value": "{stroke.medium}",
53
+ "$description": "The line under the current row."
54
+ },
55
+ "indicator-color": {
56
+ "$value": "{rule.color}",
57
+ "$type": "color",
58
+ "$description": "The current row's line: the working-paper rule color, so the nav and the sheets share one ink."
59
+ },
60
+ "count-color": {
61
+ "$value": "{text.accent}",
62
+ "$type": "color",
63
+ "$description": "A count at the end of a row, such as items open. Accent text so it asks for attention."
64
+ },
65
+ "count-color-quiet": {
66
+ "$value": "{text.secondary}",
67
+ "$type": "color",
68
+ "$description": "A count that is only information (tone=\"quiet\"), such as a total."
69
+ },
70
+ "group-padding-top": {
71
+ "$value": "{space.5}",
72
+ "$description": "Space above a group heading."
73
+ },
74
+ "group-label-color": {
75
+ "$value": "{text.secondary}",
76
+ "$type": "color",
77
+ "$description": "A group heading's caps label."
78
+ },
79
+ "toggle-size": {
80
+ "$value": "{space.6}",
81
+ "$description": "The collapse button's width and height. It sits on the column's edge."
82
+ },
83
+ "toggle-offset": {
84
+ "$value": "{space.4}",
85
+ "$description": "Distance of the collapse button from the top of the column."
86
+ },
87
+ "toggle-background": {
88
+ "$value": "{surface.raised}",
89
+ "$type": "color",
90
+ "$description": "The collapse button's fill."
91
+ },
92
+ "toggle-border-color": {
93
+ "$value": "{border.strong}",
94
+ "$type": "color",
95
+ "$description": "The collapse button's outline."
96
+ },
97
+ "collapsed-width": {
98
+ "$value": "{space.11}",
99
+ "$description": "Width of the column when it is collapsed, wide enough for the collapse button."
100
+ }
101
+ }
102
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "toggle-group": {
3
+ "$description": "Toggle group's own decisions. The default strip is the bar concept; these are for variant=\"segmented\": joined toggles inside one outline, the pressed one filled solid, for switching between a few views or modules.",
4
+ "segmented-border-color": {
5
+ "$value": "{rule.color}",
6
+ "$type": "color",
7
+ "$description": "The outline around a segmented group and the line between its toggles. The rule color, so it is a control edge by default and ink with an ink rule."
8
+ },
9
+ "segmented-background": {
10
+ "$value": "{surface.raised}",
11
+ "$type": "color",
12
+ "$description": "Fill of a toggle that is not pressed."
13
+ },
14
+ "segmented-pressed-background": {
15
+ "$value": "{fill.inverse}",
16
+ "$type": "color",
17
+ "$description": "Fill of the pressed toggle: the solid chrome color, dark on light pages and light on dark ones."
18
+ },
19
+ "segmented-pressed-color": {
20
+ "$value": "{text.on-inverse}",
21
+ "$type": "color",
22
+ "$description": "Text on the pressed toggle."
23
+ }
24
+ }
25
+ }