@scalewing/react 1.30.0 → 1.32.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/CHANGELOG.md +43 -0
- package/README.md +23 -5
- package/dist/components/ActionMenu.d.ts +10 -1
- package/dist/components/ActionMenu.js +7 -2
- package/dist/components/AppHeader.d.ts +9 -1
- package/dist/components/AppHeader.js +6 -2
- package/dist/components/Box.d.ts +10 -2
- package/dist/components/Button.d.ts +27 -2
- package/dist/components/Button.js +5 -3
- package/dist/components/ButtonGroup.d.ts +9 -1
- package/dist/components/ButtonGroup.js +8 -2
- package/dist/components/Combobox.d.ts +14 -0
- package/dist/components/Combobox.js +125 -0
- package/dist/components/DateField.d.ts +9 -1
- package/dist/components/DateField.js +4 -3
- package/dist/components/DenominationGrid.d.ts +5 -3
- package/dist/components/DenominationGrid.js +21 -11
- package/dist/components/Dialog.d.ts +9 -1
- package/dist/components/Dialog.js +8 -4
- package/dist/components/Field.d.ts +25 -0
- package/dist/components/Field.js +56 -6
- package/dist/components/FieldLabelText.d.ts +21 -3
- package/dist/components/FieldLabelText.js +16 -4
- package/dist/components/FilterChips.d.ts +9 -1
- package/dist/components/FilterChips.js +4 -2
- package/dist/components/Nav.d.ts +14 -2
- package/dist/components/Nav.js +6 -2
- package/dist/components/SegmentedControl.d.ts +5 -2
- package/dist/components/SegmentedControl.js +2 -1
- package/dist/components/Select.d.ts +9 -1
- package/dist/components/Select.js +4 -3
- package/dist/components/Stepper.d.ts +13 -0
- package/dist/components/Stepper.js +8 -2
- package/dist/components/combobox/ComboboxPopup.d.ts +25 -0
- package/dist/components/combobox/ComboboxPopup.js +68 -0
- package/dist/components/combobox/entries.d.ts +18 -0
- package/dist/components/combobox/entries.js +34 -0
- package/dist/components/combobox/types.d.ts +71 -0
- package/dist/components/combobox/types.js +1 -0
- package/dist/components/combobox/validate.d.ts +3 -0
- package/dist/components/combobox/validate.js +44 -0
- package/dist/components/denomination-grid/DenominationStrip.d.ts +4 -2
- package/dist/components/denomination-grid/DenominationStrip.js +3 -2
- package/dist/components/denomination-grid/DenominationTiles.d.ts +1 -1
- package/dist/components/denomination-grid/EntryCell.js +1 -1
- package/dist/components/denomination-grid/StripRow.js +5 -2
- package/dist/components/denomination-grid/types.d.ts +35 -1
- package/dist/components/dialog/DialogTitle.d.ts +5 -3
- package/dist/components/dialog/DialogTitle.js +4 -4
- package/dist/components/field/SearchFrame.d.ts +16 -0
- package/dist/components/field/SearchFrame.js +32 -0
- package/dist/css/css-action-menu-trigger.d.ts +11 -0
- package/dist/css/css-action-menu-trigger.js +66 -0
- package/dist/css/css-action-menu.js +7 -2
- package/dist/css/css-app-header-bar.d.ts +10 -0
- package/dist/css/css-app-header-bar.js +26 -0
- package/dist/css/css-box-border.d.ts +6 -1
- package/dist/css/css-box-border.js +8 -4
- package/dist/css/css-button-group-attached.js +5 -2
- package/dist/css/css-button-group-track.d.ts +11 -0
- package/dist/css/css-button-group-track.js +48 -0
- package/dist/css/css-button.d.ts +19 -2
- package/dist/css/css-button.js +31 -1
- package/dist/css/css-chrome.js +14 -1
- package/dist/css/css-combobox.d.ts +2 -0
- package/dist/css/css-combobox.js +136 -0
- package/dist/css/css-components.js +6 -0
- package/dist/css/css-data.js +3 -2
- package/dist/css/css-date-field.js +2 -1
- package/dist/css/css-denomination-appearance.d.ts +21 -0
- package/dist/css/css-denomination-appearance.js +114 -0
- package/dist/css/css-denomination-cell-tones.d.ts +8 -0
- package/dist/css/css-denomination-cell-tones.js +20 -1
- package/dist/css/css-denomination-grid.js +4 -0
- package/dist/css/css-dialog-banded.d.ts +11 -0
- package/dist/css/css-dialog-banded.js +84 -0
- package/dist/css/css-field-search.d.ts +2 -0
- package/dist/css/css-field-search.js +118 -0
- package/dist/css/css-field.js +4 -0
- package/dist/css/css-multi-select.js +2 -1
- package/dist/css/css-nav-words.d.ts +13 -0
- package/dist/css/css-nav-words.js +51 -0
- package/dist/css/css-notice.d.ts +4 -11
- package/dist/css/css-notice.js +6 -22
- package/dist/css/css-segmented-raised.d.ts +3 -0
- package/dist/css/css-segmented-raised.js +72 -0
- package/dist/css/css-segmented.js +9 -3
- package/dist/css/css-select.js +2 -1
- package/dist/css/css-split.js +2 -1
- package/dist/css/css-stepper.js +7 -0
- package/dist/css/quiet-fill.d.ts +7 -0
- package/dist/css/quiet-fill.js +7 -0
- package/dist/css/stacking.js +6 -2
- package/dist/css/stylesheet.js +4 -0
- package/dist/css/tone-tint.d.ts +21 -0
- package/dist/css/tone-tint.js +23 -0
- package/dist/index.d.ts +13 -10
- package/dist/index.js +11 -8
- package/dist/styles.css +505 -12
- package/package.json +1 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The quiet grey fill: the muted color at 16 % over whatever is beneath
|
|
3
|
+
* (about #E8E8E9 on white). An open menu or list row, a held separator,
|
|
4
|
+
* today's calendar ring fill, a neutral button and a banded dialog's close
|
|
5
|
+
* button all take it, so they read as one grey.
|
|
6
|
+
*/
|
|
7
|
+
export const quietFill = 'color-mix(in srgb, var(--sw-color-muted) 16%, transparent)';
|
package/dist/css/stacking.js
CHANGED
|
@@ -13,11 +13,12 @@
|
|
|
13
13
|
* its popup can only paint as high as the surface does; lifting the surface
|
|
14
14
|
* over the ActionBar keeps an open list tappable where the bar would cover
|
|
15
15
|
* it, and over the next surface in the flow.
|
|
16
|
-
* 5. `topChrome`: the sticky AppHeader or sticky Tabs strip
|
|
16
|
+
* 5. `topChrome`: the sticky AppHeader or sticky Tabs strip (and a banded
|
|
17
|
+
* Dialog's title band, inside its dialog), over a lifted
|
|
17
18
|
* surface that scrolls up under it (the header is the page's way back, the
|
|
18
19
|
* strip its way between sections, and a popup opens downward).
|
|
19
20
|
* 6. `popup`: a popup outside any lifted surface (Select list, ActionMenu
|
|
20
|
-
* list, MultiSelect panel, Tooltip, the DateField and CalendarButton
|
|
21
|
+
* list, MultiSelect panel, Combobox list, Tooltip, the DateField and CalendarButton
|
|
21
22
|
* calendar) over everything in the page.
|
|
22
23
|
*
|
|
23
24
|
* Dialog and Toast sit on the browser's top layer, above all of these.
|
|
@@ -53,6 +54,9 @@ const openPopups = [
|
|
|
53
54
|
// MultiSelect's panel. Rendered only while open; on the top layer where
|
|
54
55
|
// the popover API exists.
|
|
55
56
|
'.sw-multi-select-panel',
|
|
57
|
+
// Combobox's list. Rendered only while open; on the top layer where the
|
|
58
|
+
// popover API exists.
|
|
59
|
+
'.sw-combobox-popup',
|
|
56
60
|
'.sw-tooltip:not([hidden])',
|
|
57
61
|
// DateField and CalendarButton share it. Rendered only while open; on the
|
|
58
62
|
// top layer where the popover API exists.
|
package/dist/css/stylesheet.js
CHANGED
|
@@ -36,9 +36,11 @@ import { tableClassCatalog } from './css-table.js';
|
|
|
36
36
|
import { chromeClassCatalog } from './css-chrome.js';
|
|
37
37
|
import { sectionNavClassCatalog } from './css-section-nav.js';
|
|
38
38
|
import { dialogClassCatalog } from './css-dialog.js';
|
|
39
|
+
import { dialogBandedClassCatalog } from './css-dialog-banded.js';
|
|
39
40
|
import { dialogFrameClassCatalog } from './css-dialog-frame.js';
|
|
40
41
|
import { selectClassCatalog } from './css-select.js';
|
|
41
42
|
import { multiSelectClassCatalog } from './css-multi-select.js';
|
|
43
|
+
import { comboboxClassCatalog } from './css-combobox.js';
|
|
42
44
|
import { splitClassCatalog } from './css-split.js';
|
|
43
45
|
import { toastClassCatalog } from './css-toast.js';
|
|
44
46
|
import { toastCardClassCatalog } from './css-toast-card.js';
|
|
@@ -70,10 +72,12 @@ export function utilityClassCatalog() {
|
|
|
70
72
|
...sectionNavClassCatalog(),
|
|
71
73
|
...dialogClassCatalog(),
|
|
72
74
|
...dialogFrameClassCatalog(),
|
|
75
|
+
...dialogBandedClassCatalog(),
|
|
73
76
|
...accordionClassCatalog(),
|
|
74
77
|
...selectClassCatalog(),
|
|
75
78
|
...actionMenuClassCatalog(),
|
|
76
79
|
...multiSelectClassCatalog(),
|
|
80
|
+
...comboboxClassCatalog(),
|
|
77
81
|
...actionBarClassCatalog(),
|
|
78
82
|
...switchClassCatalog(),
|
|
79
83
|
...dateFieldClassCatalog(),
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The semantic colors a tinted mark can be drawn from: a note's tone or a
|
|
3
|
+
* single count's.
|
|
4
|
+
*/
|
|
5
|
+
export type TintColor = 'accent' | 'success' | 'warning' | 'danger';
|
|
6
|
+
/**
|
|
7
|
+
* How much of a tone's color a tint mixes into the surface. The accent uses
|
|
8
|
+
* the derived accent tint instead (ADR 0011), which already keeps the accent
|
|
9
|
+
* readable on every palette.
|
|
10
|
+
*/
|
|
11
|
+
export declare const toneTintShare = 0.1;
|
|
12
|
+
/**
|
|
13
|
+
* How far a tint's words move from the tone's color toward the text color,
|
|
14
|
+
* so they read darker than the tone on a light fill (lighter on a dark one)
|
|
15
|
+
* and keep 4.5:1 on the tint (`notice.test.tsx`).
|
|
16
|
+
*/
|
|
17
|
+
export declare const toneInkTextShare = 0.3;
|
|
18
|
+
/** A tone's quiet fill: the tone mixed into the surface. */
|
|
19
|
+
export declare function toneTintFill(color: TintColor): string;
|
|
20
|
+
/** The words on that fill: the tone moved toward the text color. */
|
|
21
|
+
export declare function toneTintInk(color: TintColor): string;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How much of a tone's color a tint mixes into the surface. The accent uses
|
|
3
|
+
* the derived accent tint instead (ADR 0011), which already keeps the accent
|
|
4
|
+
* readable on every palette.
|
|
5
|
+
*/
|
|
6
|
+
export const toneTintShare = 0.1;
|
|
7
|
+
/**
|
|
8
|
+
* How far a tint's words move from the tone's color toward the text color,
|
|
9
|
+
* so they read darker than the tone on a light fill (lighter on a dark one)
|
|
10
|
+
* and keep 4.5:1 on the tint (`notice.test.tsx`).
|
|
11
|
+
*/
|
|
12
|
+
export const toneInkTextShare = 0.3;
|
|
13
|
+
/** A tone's quiet fill: the tone mixed into the surface. */
|
|
14
|
+
export function toneTintFill(color) {
|
|
15
|
+
if (color === 'accent')
|
|
16
|
+
return 'var(--sw-color-accentSubtle)';
|
|
17
|
+
return `color-mix(in srgb, var(--sw-color-${color}) ${toneTintShare * 100}%, var(--sw-color-surface))`;
|
|
18
|
+
}
|
|
19
|
+
/** The words on that fill: the tone moved toward the text color. */
|
|
20
|
+
export function toneTintInk(color) {
|
|
21
|
+
const toneShare = Math.round((1 - toneInkTextShare) * 100);
|
|
22
|
+
return `color-mix(in srgb, var(--sw-color-${color}) ${toneShare}%, var(--sw-color-text))`;
|
|
23
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { ActionMenu, type ActionMenuAlign, type ActionMenuItem, type ActionMenuProps, } from './components/ActionMenu.js';
|
|
1
|
+
export { ActionMenu, type ActionMenuAlign, type ActionMenuItem, type ActionMenuProps, actionMenuTriggerAppearances, type ActionMenuTriggerAppearance, } from './components/ActionMenu.js';
|
|
2
2
|
export { ActionBar, type ActionBarProps, type ActionBarSummary, type ActionBarSummaryTone, } from './components/ActionBar.js';
|
|
3
3
|
export { Accordion } from './components/Accordion.js';
|
|
4
4
|
export type { AccordionProps, AccordionSize } from './components/Accordion.js';
|
|
@@ -13,27 +13,30 @@ export { Progress, progressTones, type ProgressProps, type ProgressTone, } from
|
|
|
13
13
|
export { Tooltip, type TooltipProps, type TooltipRelationship, } from './components/Tooltip.js';
|
|
14
14
|
export { InfoTip, type InfoTipProps } from './components/InfoTip.js';
|
|
15
15
|
export { RadioGroup, type RadioGroupOption, type RadioGroupProps, } from './components/RadioGroup.js';
|
|
16
|
-
export { AppHeader, type AppHeaderProps } from './components/AppHeader.js';
|
|
16
|
+
export { AppHeader, appHeaderAppearances, type AppHeaderAppearance, type AppHeaderProps, } from './components/AppHeader.js';
|
|
17
17
|
export { Badge, type BadgeProps, type BadgeSize, type BadgeTone, badgeSizes, badgeTones, } from './components/Badge.js';
|
|
18
18
|
export { BarChart, type BarChartItem, type BarChartProps, type BarChartTone, barChartTones, } from './components/BarChart.js';
|
|
19
|
-
export { Button, type ButtonProps, type ButtonSize, type ButtonVariant, } from './components/Button.js';
|
|
19
|
+
export { Button, type ButtonDisabledAppearance, type ButtonProps, type ButtonSize, type ButtonVariant, } from './components/Button.js';
|
|
20
|
+
export { buttonDisabledAppearances, webButtonVariants, } from './css/css-button.js';
|
|
20
21
|
export { Box, type BoxBorder, type BoxElement, type BoxProps, } from './components/Box.js';
|
|
21
|
-
export { ButtonGroup, type ButtonGroupJustify, type ButtonGroupProps, } from './components/ButtonGroup.js';
|
|
22
|
+
export { ButtonGroup, buttonGroupAppearances, type ButtonGroupAppearance, type ButtonGroupJustify, type ButtonGroupProps, } from './components/ButtonGroup.js';
|
|
22
23
|
export { Card, type CardProps, type CardVariant } from './components/Card.js';
|
|
23
|
-
export { Dialog, dialogSizes, type DialogProps, type DialogRole, type DialogSize, type DialogTitleLevel, } from './components/Dialog.js';
|
|
24
|
+
export { Dialog, dialogAppearances, dialogSizes, type DialogAppearance, type DialogProps, type DialogRole, type DialogSize, type DialogTitleLevel, } from './components/Dialog.js';
|
|
24
25
|
export { StatTile, type StatTileEmphasis, type StatTileProps, type StatTileTone, statTileTones, } from './components/StatTile.js';
|
|
25
26
|
export { TabPanel, type TabItem, type TabPanelProps, Tabs, type TabsProps, tabId, tabPanelId, } from './components/Tabs.js';
|
|
26
27
|
export { Toast, toastPlacements, toastTones, type ToastAction, type ToastPlacement, } from './components/Toast.js';
|
|
27
28
|
export type { ToastProps, ToastTone } from './components/Toast.js';
|
|
28
|
-
export { Field, type FieldProps, type FieldSize } from './components/Field.js';
|
|
29
|
+
export { Field, fieldVariants, type FieldProps, type FieldSize, type FieldVariant, } from './components/Field.js';
|
|
30
|
+
export { requiredMarks, type RequiredMark, } from './components/FieldLabelText.js';
|
|
29
31
|
export { Step, type StepHeadingLevel, type StepProps, Steps, type StepsLabels, type StepsProps, type StepStatus, } from './components/Steps.js';
|
|
30
|
-
export { Stepper, type StepperProps, type StepperWidth, } from './components/Stepper.js';
|
|
32
|
+
export { Stepper, stepperLimitAppearances, type StepperLimitAppearance, type StepperProps, type StepperWidth, } from './components/Stepper.js';
|
|
31
33
|
export { Inline, type InlineProps } from './components/Inline.js';
|
|
32
34
|
export { Split } from './components/Split.js';
|
|
33
35
|
export type { SplitProps } from './components/Split.js';
|
|
34
|
-
export { Nav, type NavProps } from './components/Nav.js';
|
|
36
|
+
export { Nav, navAppearances, type NavAppearance, type NavProps, } from './components/Nav.js';
|
|
35
37
|
export { SectionNav, sectionNavAppearances, type SectionNavAppearance, type SectionNavItem, type SectionNavProps, } from './components/SectionNav.js';
|
|
36
38
|
export { SegmentedControl, type SegmentedControlProps, type SegmentedControlVariant, type SegmentedItem, } from './components/SegmentedControl.js';
|
|
39
|
+
export { Combobox, comboboxSizes, type ComboboxAction, type ComboboxBadge, type ComboboxGroup, type ComboboxOption, type ComboboxProps, type ComboboxSize, } from './components/Combobox.js';
|
|
37
40
|
export { Select } from './components/Select.js';
|
|
38
41
|
export type { SelectAction, SelectOption, SelectProps, SelectWidth, } from './components/Select.js';
|
|
39
42
|
export { MultiSelect, type MultiSelectAlign, type MultiSelectOption, type MultiSelectProps, } from './components/MultiSelect.js';
|
|
@@ -53,7 +56,7 @@ export { Grid } from './components/Grid.js';
|
|
|
53
56
|
export type { GridColumns, GridProps } from './components/Grid.js';
|
|
54
57
|
export type { GridColumnSpan } from './css/css-grid-span.js';
|
|
55
58
|
export type { ColumnSpanProps } from './column-span-classes.js';
|
|
56
|
-
export { DenominationGrid, denominationLabelAppearances, } from './components/DenominationGrid.js';
|
|
57
|
-
export type { DenominationGridColumn, DenominationGridEntry, DenominationGridLayout, DenominationGridProps, DenominationGridRow, DenominationGridRowEmphasis, DenominationGridRowRole, DenominationGridTone, DenominationLabelAppearance, DenominationLabelWidth, } from './components/DenominationGrid.js';
|
|
59
|
+
export { DenominationGrid, denominationCellToneAppearances, denominationGridFrames, denominationLabelAppearances, denominationTotalEmphases, } from './components/DenominationGrid.js';
|
|
60
|
+
export type { DenominationCellToneAppearance, DenominationGridColumn, DenominationGridEntry, DenominationGridFrame, DenominationGridLayout, DenominationGridProps, DenominationGridRow, DenominationGridRowEmphasis, DenominationGridRowRole, DenominationGridTone, DenominationLabelAppearance, DenominationLabelWidth, DenominationTotalEmphasis, } from './components/DenominationGrid.js';
|
|
58
61
|
export { FilterChips } from './components/FilterChips.js';
|
|
59
62
|
export type { FilterChipOption, FilterChipsProps, } from './components/FilterChips.js';
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { ActionMenu, } from './components/ActionMenu.js';
|
|
1
|
+
export { ActionMenu, actionMenuTriggerAppearances, } from './components/ActionMenu.js';
|
|
2
2
|
export { ActionBar, } from './components/ActionBar.js';
|
|
3
3
|
export { Accordion } from './components/Accordion.js';
|
|
4
4
|
export { Switch } from './components/Switch.js';
|
|
@@ -12,25 +12,28 @@ export { Progress, progressTones, } from './components/Progress.js';
|
|
|
12
12
|
export { Tooltip, } from './components/Tooltip.js';
|
|
13
13
|
export { InfoTip } from './components/InfoTip.js';
|
|
14
14
|
export { RadioGroup, } from './components/RadioGroup.js';
|
|
15
|
-
export { AppHeader } from './components/AppHeader.js';
|
|
15
|
+
export { AppHeader, appHeaderAppearances, } from './components/AppHeader.js';
|
|
16
16
|
export { Badge, badgeSizes, badgeTones, } from './components/Badge.js';
|
|
17
17
|
export { BarChart, barChartTones, } from './components/BarChart.js';
|
|
18
18
|
export { Button, } from './components/Button.js';
|
|
19
|
+
export { buttonDisabledAppearances, webButtonVariants, } from './css/css-button.js';
|
|
19
20
|
export { Box, } from './components/Box.js';
|
|
20
|
-
export { ButtonGroup, } from './components/ButtonGroup.js';
|
|
21
|
+
export { ButtonGroup, buttonGroupAppearances, } from './components/ButtonGroup.js';
|
|
21
22
|
export { Card } from './components/Card.js';
|
|
22
|
-
export { Dialog, dialogSizes, } from './components/Dialog.js';
|
|
23
|
+
export { Dialog, dialogAppearances, dialogSizes, } from './components/Dialog.js';
|
|
23
24
|
export { StatTile, statTileTones, } from './components/StatTile.js';
|
|
24
25
|
export { TabPanel, Tabs, tabId, tabPanelId, } from './components/Tabs.js';
|
|
25
26
|
export { Toast, toastPlacements, toastTones, } from './components/Toast.js';
|
|
26
|
-
export { Field } from './components/Field.js';
|
|
27
|
+
export { Field, fieldVariants, } from './components/Field.js';
|
|
28
|
+
export { requiredMarks, } from './components/FieldLabelText.js';
|
|
27
29
|
export { Step, Steps, } from './components/Steps.js';
|
|
28
|
-
export { Stepper, } from './components/Stepper.js';
|
|
30
|
+
export { Stepper, stepperLimitAppearances, } from './components/Stepper.js';
|
|
29
31
|
export { Inline } from './components/Inline.js';
|
|
30
32
|
export { Split } from './components/Split.js';
|
|
31
|
-
export { Nav } from './components/Nav.js';
|
|
33
|
+
export { Nav, navAppearances, } from './components/Nav.js';
|
|
32
34
|
export { SectionNav, sectionNavAppearances, } from './components/SectionNav.js';
|
|
33
35
|
export { SegmentedControl, } from './components/SegmentedControl.js';
|
|
36
|
+
export { Combobox, comboboxSizes, } from './components/Combobox.js';
|
|
34
37
|
export { Select } from './components/Select.js';
|
|
35
38
|
export { MultiSelect, } from './components/MultiSelect.js';
|
|
36
39
|
export { Stack, } from './components/Stack.js';
|
|
@@ -42,5 +45,5 @@ export { breakpointQuery } from './css/breakpoints.js';
|
|
|
42
45
|
export { Separator } from './components/Separator.js';
|
|
43
46
|
export { DescriptionItem, DescriptionList, } from './components/DescriptionList.js';
|
|
44
47
|
export { Grid } from './components/Grid.js';
|
|
45
|
-
export { DenominationGrid, denominationLabelAppearances, } from './components/DenominationGrid.js';
|
|
48
|
+
export { DenominationGrid, denominationCellToneAppearances, denominationGridFrames, denominationLabelAppearances, denominationTotalEmphases, } from './components/DenominationGrid.js';
|
|
46
49
|
export { FilterChips } from './components/FilterChips.js';
|