@slotted/angular 0.1.0-beta.12 → 0.1.0-beta.14
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/docs/action-bar.json +1 -0
- package/docs/action-bar.md +1 -1
- package/docs/action-sheet.json +391 -64
- package/docs/action-sheet.md +259 -0
- package/docs/alert.json +1 -1
- package/docs/alert.md +1 -1
- package/docs/combobox.json +1 -0
- package/docs/combobox.md +1 -1
- package/docs/data-grid.json +1 -1
- package/docs/date-picker.json +1 -0
- package/docs/date-picker.md +1 -1
- package/docs/drawer.json +1 -0
- package/docs/drawer.md +1 -1
- package/docs/entity-picker.json +1 -0
- package/docs/entity-picker.md +1 -1
- package/docs/inline-message.json +1 -1
- package/docs/inline-message.md +1 -1
- package/docs/kbd.json +3 -0
- package/docs/kbd.md +1 -1
- package/docs/menu.json +1 -0
- package/docs/menu.md +1 -1
- package/docs/popover.json +1 -0
- package/docs/popover.md +1 -1
- package/docs/scroll-area.json +266 -64
- package/docs/scroll-area.md +188 -0
- package/docs/section.json +11 -1
- package/docs/section.md +13 -12
- package/docs/select.json +1 -0
- package/docs/select.md +1 -1
- package/docs/skills/theme-app/SKILL.md +18 -4
- package/docs/splitter.json +279 -64
- package/docs/splitter.md +215 -0
- package/docs/status-indicator.json +16 -5
- package/docs/status-indicator.md +3 -1
- package/docs/table-of-contents.json +2 -1
- package/docs/table-of-contents.md +2 -2
- package/docs/tooltip.json +1 -0
- package/docs/tooltip.md +1 -1
- package/fesm2022/slotted-angular-action-bar.mjs +2 -2
- package/fesm2022/slotted-angular-action-bar.mjs.map +1 -1
- package/fesm2022/slotted-angular-alert.mjs +7 -7
- package/fesm2022/slotted-angular-alert.mjs.map +1 -1
- package/fesm2022/slotted-angular-chart.mjs +2 -2
- package/fesm2022/slotted-angular-chart.mjs.map +1 -1
- package/fesm2022/slotted-angular-combobox.mjs +2 -2
- package/fesm2022/slotted-angular-combobox.mjs.map +1 -1
- package/fesm2022/slotted-angular-date-picker.mjs +2 -2
- package/fesm2022/slotted-angular-date-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-dialog.mjs +8 -8
- package/fesm2022/slotted-angular-dialog.mjs.map +1 -1
- package/fesm2022/slotted-angular-drawer.mjs +172 -51
- package/fesm2022/slotted-angular-drawer.mjs.map +1 -1
- package/fesm2022/slotted-angular-entity-picker.mjs +2 -2
- package/fesm2022/slotted-angular-entity-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-icon.mjs +185 -87
- package/fesm2022/slotted-angular-icon.mjs.map +1 -1
- package/fesm2022/slotted-angular-inline-message.mjs +7 -7
- package/fesm2022/slotted-angular-inline-message.mjs.map +1 -1
- package/fesm2022/slotted-angular-kbd.mjs +4 -4
- package/fesm2022/slotted-angular-kbd.mjs.map +1 -1
- package/fesm2022/slotted-angular-menu.mjs +2 -2
- package/fesm2022/slotted-angular-menu.mjs.map +1 -1
- package/fesm2022/slotted-angular-multi-select.mjs +2 -2
- package/fesm2022/slotted-angular-multi-select.mjs.map +1 -1
- package/fesm2022/slotted-angular-popover.mjs +2 -2
- package/fesm2022/slotted-angular-popover.mjs.map +1 -1
- package/fesm2022/slotted-angular-section.mjs +30 -3
- package/fesm2022/slotted-angular-section.mjs.map +1 -1
- package/fesm2022/slotted-angular-select.mjs +2 -2
- package/fesm2022/slotted-angular-select.mjs.map +1 -1
- package/fesm2022/slotted-angular-status-indicator.mjs +30 -13
- package/fesm2022/slotted-angular-status-indicator.mjs.map +1 -1
- package/fesm2022/slotted-angular-table-of-contents.mjs +2 -2
- package/fesm2022/slotted-angular-table-of-contents.mjs.map +1 -1
- package/fesm2022/slotted-angular-theme.mjs +6 -3
- package/fesm2022/slotted-angular-theme.mjs.map +1 -1
- package/fesm2022/slotted-angular-toast.mjs +8 -8
- package/fesm2022/slotted-angular-toast.mjs.map +1 -1
- package/fesm2022/slotted-angular-tooltip.mjs +2 -2
- package/fesm2022/slotted-angular-tooltip.mjs.map +1 -1
- package/package.json +3 -3
- package/types/slotted-angular-alert.d.ts +2 -1
- package/types/slotted-angular-alert.d.ts.map +1 -1
- package/types/slotted-angular-attachment.d.ts +2 -1
- package/types/slotted-angular-attachment.d.ts.map +1 -1
- package/types/slotted-angular-code-block.d.ts +2 -1
- package/types/slotted-angular-code-block.d.ts.map +1 -1
- package/types/slotted-angular-collapsible.d.ts +2 -1
- package/types/slotted-angular-collapsible.d.ts.map +1 -1
- package/types/slotted-angular-combobox.d.ts +2 -1
- package/types/slotted-angular-combobox.d.ts.map +1 -1
- package/types/slotted-angular-dialog.d.ts +2 -1
- package/types/slotted-angular-dialog.d.ts.map +1 -1
- package/types/slotted-angular-drawer.d.ts +17 -0
- package/types/slotted-angular-drawer.d.ts.map +1 -1
- package/types/slotted-angular-icon.d.ts +12 -2
- package/types/slotted-angular-icon.d.ts.map +1 -1
- package/types/slotted-angular-inline-message.d.ts +3 -2
- package/types/slotted-angular-inline-message.d.ts.map +1 -1
- package/types/slotted-angular-multi-select.d.ts +2 -1
- package/types/slotted-angular-multi-select.d.ts.map +1 -1
- package/types/slotted-angular-section.d.ts +3 -1
- package/types/slotted-angular-section.d.ts.map +1 -1
- package/types/slotted-angular-select.d.ts +2 -1
- package/types/slotted-angular-select.d.ts.map +1 -1
- package/types/slotted-angular-status-indicator.d.ts +13 -3
- package/types/slotted-angular-status-indicator.d.ts.map +1 -1
- package/types/slotted-angular-stepper.d.ts +2 -1
- package/types/slotted-angular-stepper.d.ts.map +1 -1
- package/types/slotted-angular-theme.d.ts +6 -4
- package/types/slotted-angular-theme.d.ts.map +1 -1
- package/types/slotted-angular-toast.d.ts +4 -2
- package/types/slotted-angular-toast.d.ts.map +1 -1
- package/types/slotted-angular-upload.d.ts +4 -2
- package/types/slotted-angular-upload.d.ts.map +1 -1
package/docs/section.md
CHANGED
|
@@ -26,17 +26,17 @@ Excerpt — not a complete module
|
|
|
26
26
|
|
|
27
27
|
## Anatomy
|
|
28
28
|
|
|
29
|
-
| Part | Element | Required |
|
|
30
|
-
| --- | --- | --- |
|
|
31
|
-
| `root` | the section carrying slSection | yes |
|
|
32
|
-
| `header` | the element carrying slSectionHeader | no |
|
|
33
|
-
| `title` | the element carrying slSectionTitle | no |
|
|
34
|
-
| `eyebrow` | the element carrying slSectionEyebrow | no |
|
|
35
|
-
| `heading` | the h1 to h6 carrying slSectionHeading, or any element, which then gets role="heading" | no |
|
|
36
|
-
| `tags` | the element carrying slSectionTags | no |
|
|
37
|
-
| `description` | the p carrying slSectionDescription | no |
|
|
38
|
-
| `actions` | the element carrying slSectionActions | no |
|
|
39
|
-
| `body` | the element carrying slSectionBody | yes |
|
|
29
|
+
| Part | Parent | Element | Required |
|
|
30
|
+
| --- | --- | --- | --- |
|
|
31
|
+
| `root` | — | the section carrying slSection | yes |
|
|
32
|
+
| `header` | `root` | the element carrying slSectionHeader | no |
|
|
33
|
+
| `title` | `header` | the element carrying slSectionTitle | no |
|
|
34
|
+
| `eyebrow` | `title` | the element carrying slSectionEyebrow | no |
|
|
35
|
+
| `heading` | `title` | the h1 to h6 carrying slSectionHeading, or any element, which then gets role="heading" | no |
|
|
36
|
+
| `tags` | `title` | the element carrying slSectionTags | no |
|
|
37
|
+
| `description` | `title` | the p carrying slSectionDescription | no |
|
|
38
|
+
| `actions` | `header` | the element carrying slSectionActions | no |
|
|
39
|
+
| `body` | `root` | the element carrying slSectionBody | yes |
|
|
40
40
|
|
|
41
41
|
## Props
|
|
42
42
|
|
|
@@ -66,6 +66,7 @@ Excerpt — not a complete module
|
|
|
66
66
|
|
|
67
67
|
## Rules
|
|
68
68
|
|
|
69
|
+
- A description outside slSectionTitle is not styled: the stylesheet reaches it as a child of the title, so slSectionDescription is written inside slSectionTitle and nowhere else.
|
|
69
70
|
- The practice is the WAI-ARIA APG’s Landmark Regions (w3.org/WAI/ARIA/apg/practices/landmark-regions/): a section element with an accessible name is a region landmark. The root is aria-labelledby its heading once one is rendered, so a section with a heading appears in the landmark list under the heading’s words, and one without a heading is a plain section that clutters nothing.
|
|
70
71
|
- The rank is real and the element is the consumer’s. Write h2 and the directive adds nothing; write a div or a link and it gets role="heading" and aria-level from the outline typography keeps — 2 directly in a page body, one deeper inside another section’s body — or from level.
|
|
71
72
|
- The body carries slHeadingLevel as a host directive, which is what keeps a nested section, a collapsible or a table caption at the right rank without either family reading the other. The HTML Standard requires each heading to be at most one deeper than the one before, and stepping by exactly one is the only way to hold that in a tree assembled from components.
|
|
@@ -74,7 +75,7 @@ Excerpt — not a complete module
|
|
|
74
75
|
|
|
75
76
|
## Tokens
|
|
76
77
|
|
|
77
|
-
`--slotted-border-subtle`, `--slotted-border-width-thin`, `--slotted-control-gap-md`, `--slotted-font-family-heading`, `--slotted-font-family-sans`, `--slotted-font-size-lg`, `--slotted-font-size-md`, `--slotted-font-size-sm`, `--slotted-font-size-xs`, `--slotted-font-weight-semibold`, `--slotted-line-height-lg`, `--slotted-line-height-md`, `--slotted-line-height-sm`, `--slotted-line-height-xs`, `--slotted-page-ground`, `--slotted-radius-lg`, `--slotted-section-border`, `--slotted-section-description-measure`, `--slotted-section-gap`, `--slotted-section-heading-size-lg`, `--slotted-section-heading-size-md`, `--slotted-section-heading-size-sm`, `--slotted-section-inset`, `--slotted-section-radius`, `--slotted-section-spacing`, `--slotted-section-subheading-size-lg`, `--slotted-section-subheading-size-md`, `--slotted-section-subheading-size-sm`, `--slotted-section-subsection-spacing`, `--slotted-section-surface`, `--slotted-space-1`, `--slotted-space-3`, `--slotted-space-4`, `--slotted-space-5`, `--slotted-space-6`, `--slotted-space-7`, `--slotted-space-9`, `--slotted-surface`, `--slotted-surface-raised`, `--slotted-text`, `--slotted-text-muted`, `--slotted-z-index-sticky`
|
|
78
|
+
`--slotted-border-subtle`, `--slotted-border-width-thin`, `--slotted-control-gap-md`, `--slotted-font-family-heading`, `--slotted-font-family-sans`, `--slotted-font-size-lg`, `--slotted-font-size-md`, `--slotted-font-size-sm`, `--slotted-font-size-xs`, `--slotted-font-weight-semibold`, `--slotted-line-height-lg`, `--slotted-line-height-md`, `--slotted-line-height-sm`, `--slotted-line-height-xs`, `--slotted-page-ground`, `--slotted-radius-lg`, `--slotted-section-border`, `--slotted-section-description-measure`, `--slotted-section-gap`, `--slotted-section-header-background`, `--slotted-section-heading-size-lg`, `--slotted-section-heading-size-md`, `--slotted-section-heading-size-sm`, `--slotted-section-inset`, `--slotted-section-radius`, `--slotted-section-spacing`, `--slotted-section-subheading-size-lg`, `--slotted-section-subheading-size-md`, `--slotted-section-subheading-size-sm`, `--slotted-section-subsection-spacing`, `--slotted-section-surface`, `--slotted-space-1`, `--slotted-space-3`, `--slotted-space-4`, `--slotted-space-5`, `--slotted-space-6`, `--slotted-space-7`, `--slotted-space-9`, `--slotted-surface`, `--slotted-surface-raised`, `--slotted-text`, `--slotted-text-muted`, `--slotted-z-index-sticky`
|
|
78
79
|
|
|
79
80
|
## Examples
|
|
80
81
|
|
package/docs/select.json
CHANGED
|
@@ -884,6 +884,7 @@
|
|
|
884
884
|
"--slotted-select-background",
|
|
885
885
|
"--slotted-select-border-color",
|
|
886
886
|
"--slotted-select-color",
|
|
887
|
+
"--slotted-select-content-backdrop-filter",
|
|
887
888
|
"--slotted-select-content-border-color",
|
|
888
889
|
"--slotted-select-content-padding-block",
|
|
889
890
|
"--slotted-select-content-padding-inline",
|
package/docs/select.md
CHANGED
|
@@ -192,7 +192,7 @@ export class SelectBasic {
|
|
|
192
192
|
|
|
193
193
|
## Tokens
|
|
194
194
|
|
|
195
|
-
`--slotted-border-subtle`, `--slotted-border-width-thin`, `--slotted-control-border-color`, `--slotted-control-border-width`, `--slotted-control-focus-ring-offset`, `--slotted-control-font-family`, `--slotted-control-font-size-lg`, `--slotted-control-font-size-md`, `--slotted-control-font-size-sm`, `--slotted-control-gap-lg`, `--slotted-control-gap-md`, `--slotted-control-gap-sm`, `--slotted-control-height-lg`, `--slotted-control-height-md`, `--slotted-control-height-sm`, `--slotted-control-icon-size-lg`, `--slotted-control-icon-size-md`, `--slotted-control-icon-size-sm`, `--slotted-control-inner-size-lg`, `--slotted-control-inner-size-md`, `--slotted-control-inner-size-sm`, `--slotted-control-invalid-edge-width`, `--slotted-control-padding-inline-lg`, `--slotted-control-padding-inline-md`, `--slotted-control-padding-inline-sm`, `--slotted-control-radius`, `--slotted-control-shadow`, `--slotted-control-shadow-focus-geometry`, `--slotted-control-surface`, `--slotted-control-transition-duration`, `--slotted-control-transition-easing`, `--slotted-disabled-background`, `--slotted-disabled-border`, `--slotted-disabled-foreground`, `--slotted-duration-medium`, `--slotted-duration-short`, `--slotted-easing-enter`, `--slotted-easing-exit`, `--slotted-easing-standard`, `--slotted-focus-ring-color`, `--slotted-focus-ring-color-invalid`, `--slotted-focus-ring-offset`, `--slotted-focus-ring-width`, `--slotted-font-family-sans`, `--slotted-font-size-xs`, `--slotted-font-weight-medium`, `--slotted-font-weight-semibold`, `--slotted-line-height-md`, `--slotted-line-height-sm`, `--slotted-radius-lg`, `--slotted-radius-none`, `--slotted-select-action-active-background`, `--slotted-select-action-color`, `--slotted-select-action-hover-background`, `--slotted-select-action-size`, `--slotted-select-arrow-color`, `--slotted-select-background`, `--slotted-select-border-color`, `--slotted-select-color`, `--slotted-select-content-border-color`, `--slotted-select-content-padding-block`, `--slotted-select-content-padding-inline`, `--slotted-select-content-radius`, `--slotted-select-content-shadow`, `--slotted-select-content-text`, `--slotted-select-content-text-muted`, `--slotted-select-disabled-background`, `--slotted-select-disabled-border-color`, `--slotted-select-disabled-color`, `--slotted-select-highlight`, `--slotted-select-highlight-active`, `--slotted-select-highlight-ring`, `--slotted-select-hover-border-color`, `--slotted-select-icon-size-min`, `--slotted-select-invalid-border-color`, `--slotted-select-invalid-edge-width`, `--slotted-select-invalid-focus-ring-color`, `--slotted-select-item-radius`, `--slotted-select-measure`, `--slotted-select-open-border-color`, `--slotted-select-placeholder-color`, `--slotted-select-plain-hover-background`, `--slotted-select-radius`, `--slotted-select-readonly-background`, `--slotted-select-search-icon-color`, `--slotted-select-selected-color`, `--slotted-select-separator-color`, `--slotted-select-shadow`, `--slotted-select-subtle-background`, `--slotted-select-subtle-border-color`, `--slotted-select-subtle-hover-background`, `--slotted-select-surface`, `--slotted-shadow-md`, `--slotted-space-1`, `--slotted-space-2`, `--slotted-space-5`, `--slotted-surface-raised`, `--slotted-surface-sunken`, `--slotted-target-comfortable`, `--slotted-target-min`, `--slotted-text`, `--slotted-text-muted`, `--slotted-tone-accent-border`, `--slotted-tone-accent-surface`, `--slotted-tone-accent-text`, `--slotted-tone-danger-border`, `--slotted-tone-secondary-subtle-active`, `--slotted-tone-secondary-subtle-hover`, `--slotted-z-index-popover`
|
|
195
|
+
`--slotted-border-subtle`, `--slotted-border-width-thin`, `--slotted-control-border-color`, `--slotted-control-border-width`, `--slotted-control-focus-ring-offset`, `--slotted-control-font-family`, `--slotted-control-font-size-lg`, `--slotted-control-font-size-md`, `--slotted-control-font-size-sm`, `--slotted-control-gap-lg`, `--slotted-control-gap-md`, `--slotted-control-gap-sm`, `--slotted-control-height-lg`, `--slotted-control-height-md`, `--slotted-control-height-sm`, `--slotted-control-icon-size-lg`, `--slotted-control-icon-size-md`, `--slotted-control-icon-size-sm`, `--slotted-control-inner-size-lg`, `--slotted-control-inner-size-md`, `--slotted-control-inner-size-sm`, `--slotted-control-invalid-edge-width`, `--slotted-control-padding-inline-lg`, `--slotted-control-padding-inline-md`, `--slotted-control-padding-inline-sm`, `--slotted-control-radius`, `--slotted-control-shadow`, `--slotted-control-shadow-focus-geometry`, `--slotted-control-surface`, `--slotted-control-transition-duration`, `--slotted-control-transition-easing`, `--slotted-disabled-background`, `--slotted-disabled-border`, `--slotted-disabled-foreground`, `--slotted-duration-medium`, `--slotted-duration-short`, `--slotted-easing-enter`, `--slotted-easing-exit`, `--slotted-easing-standard`, `--slotted-focus-ring-color`, `--slotted-focus-ring-color-invalid`, `--slotted-focus-ring-offset`, `--slotted-focus-ring-width`, `--slotted-font-family-sans`, `--slotted-font-size-xs`, `--slotted-font-weight-medium`, `--slotted-font-weight-semibold`, `--slotted-line-height-md`, `--slotted-line-height-sm`, `--slotted-radius-lg`, `--slotted-radius-none`, `--slotted-select-action-active-background`, `--slotted-select-action-color`, `--slotted-select-action-hover-background`, `--slotted-select-action-size`, `--slotted-select-arrow-color`, `--slotted-select-background`, `--slotted-select-border-color`, `--slotted-select-color`, `--slotted-select-content-backdrop-filter`, `--slotted-select-content-border-color`, `--slotted-select-content-padding-block`, `--slotted-select-content-padding-inline`, `--slotted-select-content-radius`, `--slotted-select-content-shadow`, `--slotted-select-content-text`, `--slotted-select-content-text-muted`, `--slotted-select-disabled-background`, `--slotted-select-disabled-border-color`, `--slotted-select-disabled-color`, `--slotted-select-highlight`, `--slotted-select-highlight-active`, `--slotted-select-highlight-ring`, `--slotted-select-hover-border-color`, `--slotted-select-icon-size-min`, `--slotted-select-invalid-border-color`, `--slotted-select-invalid-edge-width`, `--slotted-select-invalid-focus-ring-color`, `--slotted-select-item-radius`, `--slotted-select-measure`, `--slotted-select-open-border-color`, `--slotted-select-placeholder-color`, `--slotted-select-plain-hover-background`, `--slotted-select-radius`, `--slotted-select-readonly-background`, `--slotted-select-search-icon-color`, `--slotted-select-selected-color`, `--slotted-select-separator-color`, `--slotted-select-shadow`, `--slotted-select-subtle-background`, `--slotted-select-subtle-border-color`, `--slotted-select-subtle-hover-background`, `--slotted-select-surface`, `--slotted-shadow-md`, `--slotted-space-1`, `--slotted-space-2`, `--slotted-space-5`, `--slotted-surface-raised`, `--slotted-surface-sunken`, `--slotted-target-comfortable`, `--slotted-target-min`, `--slotted-text`, `--slotted-text-muted`, `--slotted-tone-accent-border`, `--slotted-tone-accent-surface`, `--slotted-tone-accent-text`, `--slotted-tone-danger-border`, `--slotted-tone-secondary-subtle-active`, `--slotted-tone-secondary-subtle-hover`, `--slotted-z-index-popover`
|
|
196
196
|
|
|
197
197
|
## Examples
|
|
198
198
|
|
|
@@ -17,6 +17,7 @@ Take the first row that reaches the change.
|
|
|
17
17
|
| The brand colour, or the colour of one intent | a seed: `--slotted-seed-accent` or another name of `SEED_NAMES` | the theme's `seeds`, or a scope |
|
|
18
18
|
| Light, dark, high contrast, or the system's preference | the scheme: `light`, `dark`, `high-contrast`, `system` | `data-slotted-scheme`, or the scheme of the `slThemeScope` directive from `@slotted/angular/theme` |
|
|
19
19
|
| How tight controls and rows are | the density: `comfortable`, `compact`, `dense` | `data-slotted-density`, or the density of the `slThemeScope` directive from `@slotted/angular/theme` |
|
|
20
|
+
| How round corners are, chosen by the reader | the corners: `square`, `soft`, `standard`, `round` | `data-slotted-corners`, or the corners of the `slThemeScope` directive from `@slotted/angular/theme`; the theme's `corners` holds each radius scale |
|
|
20
21
|
| How deep a scheme's grounds sit, or how far each layer steps from the one below | the recipe: one derivation per token per scheme | the theme's `recipe`, spread from the base theme's, as below; `themeConformance` still checks every contrast |
|
|
21
22
|
| Spacing, corners, type, lines, shadows or motion | a token of a group in `../../tokens.md` | the theme's `base`; `schemes` for a value per scheme; `densities` per density |
|
|
22
23
|
| One family's look | a token the family's page lists under Tokens | the theme's `components` |
|
|
@@ -54,9 +55,10 @@ has.
|
|
|
54
55
|
|
|
55
56
|
## 3. One region
|
|
56
57
|
|
|
57
|
-
1. A scheme
|
|
58
|
-
an overlay opened inside it, or the `data-slotted-scheme
|
|
59
|
-
`data-slotted-density` attributes on the
|
|
58
|
+
1. A scheme, a density or corners for a subtree: the `slThemeScope` directive from `@slotted/angular/theme`, which carries
|
|
59
|
+
them to an overlay opened inside it, or the `data-slotted-scheme`,
|
|
60
|
+
`data-slotted-density` and `data-slotted-corners` attributes on the
|
|
61
|
+
subtree's root.
|
|
60
62
|
2. A seed for a subtree: the seed property on an element that also carries
|
|
61
63
|
`data-slotted-seeds`, or the seeds of the `slThemeScope` directive from `@slotted/angular/theme`. Every colour under it
|
|
62
64
|
derives again from that seed.
|
|
@@ -88,7 +90,19 @@ has.
|
|
|
88
90
|
3. Else a theme rule. It lives in `slotted.theme-rules`, selects only
|
|
89
91
|
`data-ui`, `data-part`, the attributes a family writes and the theme's
|
|
90
92
|
attributes, and reads only tokens; the compiler names the file, the line
|
|
91
|
-
and the selector of a rule it refuses.
|
|
93
|
+
and the selector of a rule it refuses. A rule for one scheme begins with
|
|
94
|
+
the nesting selector, which names the theme root that carries the scheme.
|
|
95
|
+
The same selector without it asks for a descendant of the root and is
|
|
96
|
+
refused:
|
|
97
|
+
|
|
98
|
+
```css
|
|
99
|
+
&[data-slotted-scheme='dark'] [data-ui='card'] {
|
|
100
|
+
/* accepted */
|
|
101
|
+
}
|
|
102
|
+
[data-slotted-scheme='dark'] [data-ui='card'] {
|
|
103
|
+
/* refused */
|
|
104
|
+
}
|
|
105
|
+
```
|
|
92
106
|
|
|
93
107
|
## 5. Done
|
|
94
108
|
|
package/docs/splitter.json
CHANGED
|
@@ -49,69 +49,171 @@
|
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
51
|
"docs": {
|
|
52
|
-
"
|
|
53
|
-
"imports":
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
"
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
"
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
52
|
+
"splitter": {
|
|
53
|
+
"imports": {
|
|
54
|
+
"source": "import { SlSplitter, provideSplitterDefaults } from '@slotted/angular/splitter';",
|
|
55
|
+
"selector": "[slSplitter]",
|
|
56
|
+
"exportAs": "slSplitter"
|
|
57
|
+
},
|
|
58
|
+
"anatomy": [
|
|
59
|
+
{
|
|
60
|
+
"part": "root",
|
|
61
|
+
"element": "the consumer’s own element, with role=separator and tabindex=0",
|
|
62
|
+
"required": true,
|
|
63
|
+
"purpose": "The bar. A directive rather than a tag of its own, because the boundary sits inside a layout the consumer wrote and the element it should be is theirs to choose."
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"part": "line",
|
|
67
|
+
"element": "span",
|
|
68
|
+
"required": true,
|
|
69
|
+
"purpose": "A hairline each side of the grip, fading out away from it. Runs the whole track under the hand and under a drag."
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"part": "grip",
|
|
73
|
+
"element": "span[aria-hidden]",
|
|
74
|
+
"required": true,
|
|
75
|
+
"purpose": "The mark in the middle, so a resizable boundary is one a reader can see before touching it. Hidden from the accessibility tree: the bar around it is already named and already valued."
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
"api": [
|
|
79
|
+
{
|
|
80
|
+
"name": "orientation",
|
|
81
|
+
"type": "'vertical' | 'horizontal'",
|
|
82
|
+
"defaultValue": "vertical",
|
|
83
|
+
"appliesTo": "slSplitter",
|
|
84
|
+
"description": "Which way the bar’s own line runs. A vertical line divides two regions side by side"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"name": "for",
|
|
88
|
+
"type": "HTMLElement",
|
|
89
|
+
"defaultValue": "the previous element sibling",
|
|
90
|
+
"appliesTo": "slSplitter",
|
|
91
|
+
"description": "The element the bar sizes, announces and writes the fraction on, as a template reference"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"name": "value",
|
|
95
|
+
"type": "model<number>",
|
|
96
|
+
"defaultValue": "0.5",
|
|
97
|
+
"appliesTo": "slSplitter",
|
|
98
|
+
"description": "The fraction of the container taken by the region before the bar, in [0, 1]"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"name": "min",
|
|
102
|
+
"type": "number | string",
|
|
103
|
+
"defaultValue": "0",
|
|
104
|
+
"appliesTo": "slSplitter",
|
|
105
|
+
"description": "A fraction, or any CSS length resolved against the container — \"200px\", \"18rem\", \"25%\""
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"name": "max",
|
|
109
|
+
"type": "number | string",
|
|
110
|
+
"defaultValue": "1",
|
|
111
|
+
"appliesTo": "slSplitter",
|
|
112
|
+
"description": "The ceiling, in either unit"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"name": "defaultValue",
|
|
116
|
+
"type": "number",
|
|
117
|
+
"defaultValue": "0.5",
|
|
118
|
+
"appliesTo": "slSplitter",
|
|
119
|
+
"description": "Where reset() and a double click return the bar, brought inside min and max. An input of its own and not the model’s first value: the value bound on arrival is where the reader left the bar, restored from storage, and never where a reset should go"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"name": "snapPoints",
|
|
123
|
+
"type": "readonly number[]",
|
|
124
|
+
"defaultValue": "",
|
|
125
|
+
"appliesTo": "slSplitter",
|
|
126
|
+
"description": "Stops a released drag lands on and an arrow steps between. Empty is a continuous range"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"name": "collapsible",
|
|
130
|
+
"type": "boolean",
|
|
131
|
+
"defaultValue": "false",
|
|
132
|
+
"appliesTo": "slSplitter",
|
|
133
|
+
"description": "Whether Enter collapses the region before the bar"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"name": "collapsedValue",
|
|
137
|
+
"type": "number",
|
|
138
|
+
"defaultValue": "0",
|
|
139
|
+
"appliesTo": "slSplitter",
|
|
140
|
+
"description": "Where a collapse lands"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"name": "collapsed",
|
|
144
|
+
"type": "model<boolean>",
|
|
145
|
+
"defaultValue": "false",
|
|
146
|
+
"appliesTo": "slSplitter",
|
|
147
|
+
"description": "Whether the region is collapsed"
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"name": "disabled",
|
|
151
|
+
"type": "boolean",
|
|
152
|
+
"defaultValue": "false",
|
|
153
|
+
"appliesTo": "slSplitter",
|
|
154
|
+
"description": "Stops the bar moving. It keeps the tab stop, so the value stays readable"
|
|
155
|
+
}
|
|
156
|
+
],
|
|
157
|
+
"composition": [
|
|
158
|
+
{
|
|
159
|
+
"name": "provideSplitterDefaults",
|
|
160
|
+
"type": "{ orientation, min, max, collapsedValue }",
|
|
161
|
+
"defaultValue": "—",
|
|
162
|
+
"appliesTo": "Providers",
|
|
163
|
+
"description": "An application states its floor once rather than on every bar in it"
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"name": "exportAs",
|
|
167
|
+
"type": "'slSplitter'",
|
|
168
|
+
"defaultValue": "—",
|
|
169
|
+
"appliesTo": "slSplitter",
|
|
170
|
+
"description": "collapse(), expand(), reset() and focus(), reachable from the template"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"name": "the host element",
|
|
174
|
+
"type": "any element",
|
|
175
|
+
"defaultValue": "—",
|
|
176
|
+
"appliesTo": "slSplitter",
|
|
177
|
+
"description": "A directive, so the bar is whatever element the consumer’s layout wanted there"
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"name": "--slotted-splitter-value",
|
|
181
|
+
"type": "number",
|
|
182
|
+
"defaultValue": "—",
|
|
183
|
+
"appliesTo": "the element [for] names",
|
|
184
|
+
"description": "The fraction, published where CSS can read it, so the common case needs no component state at all"
|
|
185
|
+
}
|
|
186
|
+
],
|
|
187
|
+
"events": [
|
|
188
|
+
{
|
|
189
|
+
"name": "valueChange",
|
|
190
|
+
"payload": "number",
|
|
191
|
+
"when": "After the position moves. The two-way form of the model, for a template that binds [(value)]."
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"name": "valueChangeRequest",
|
|
195
|
+
"payload": "SplitterValueRequest",
|
|
196
|
+
"when": "Before the position moves, on every step of a drag and on every key press. Call cancel() on it to refuse; reason is pointer, keyboard or programmatic."
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"name": "collapsedChangeRequest",
|
|
200
|
+
"payload": "SplitterCollapsedRequest",
|
|
201
|
+
"when": "Before Enter collapses the region or brings it back. Refusing it leaves both the state and the measure where they were."
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
"name": "resizeEnd",
|
|
205
|
+
"payload": "number",
|
|
206
|
+
"when": "Once, when a drag settles. The value moves throughout one, so a consumer saving a layout saves here rather than sixty times there."
|
|
207
|
+
}
|
|
208
|
+
],
|
|
209
|
+
"accessibility": [
|
|
210
|
+
"The bar has no default accessible name: the family cannot know which region it sizes. Name it with aria-labelledby pointing at the heading of the element `for` names, or with aria-label.",
|
|
211
|
+
"The bar is role=\"separator\" with tabindex=\"0\", which is the focusable widget form the role takes in the WAI-ARIA Window Splitter pattern; aria-valuenow, aria-valuemin and aria-valuemax are the fraction times a hundred, and the value reported is the clamped one, so the announcement and the layout cannot disagree.",
|
|
212
|
+
"aria-orientation is written only for the vertical bar, because horizontal is the attribute’s own default on role=\"separator\" and a family writes the departure from an element’s semantics rather than the agreement with it.",
|
|
213
|
+
"aria-controls names the element [for] hands the bar — the same element that carries --slotted-splitter-value and the same one the bar sizes, so what a reader hears and what a reader sees are one region rather than two that can drift; the family writes that element an id when it has none.",
|
|
214
|
+
"A role, a tabindex or an aria-controls the consumer wrote on the element is read with HostAttributeToken before the host bindings run, and kept: a binding that resolves to null removes an attribute rather than leaving the author’s value in place.",
|
|
215
|
+
"A disabled bar keeps its tab stop and its announcement. A reader who cannot move a separator can still read the value it holds."
|
|
216
|
+
]
|
|
115
217
|
}
|
|
116
218
|
},
|
|
117
219
|
"tokens": [
|
|
@@ -138,5 +240,118 @@
|
|
|
138
240
|
"--slotted-target-min",
|
|
139
241
|
"--slotted-text-muted"
|
|
140
242
|
],
|
|
141
|
-
"examples": [
|
|
243
|
+
"examples": [
|
|
244
|
+
{
|
|
245
|
+
"id": "playground",
|
|
246
|
+
"title": "A workspace with a movable boundary",
|
|
247
|
+
"note": "Drag the bar, or Tab to it and use the arrows. The number announced and the measure applied are the same number, and the region beside it takes whatever is left.",
|
|
248
|
+
"language": "html",
|
|
249
|
+
"source": "<div class=\"workspace\">\n <aside>…</aside>\n <div slSplitter [(value)]=\"width\"></div>\n <main>…</main>\n</div>\n",
|
|
250
|
+
"verdict": "excerpt"
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
"id": "orientation",
|
|
254
|
+
"title": "Both axes, and the arrows each one answers",
|
|
255
|
+
"note": "A vertical bar divides two regions side by side and answers Left and Right; a horizontal bar divides two stacked regions and answers Up and Down. The other pair is left to the page, so a document that scrolls still scrolls.",
|
|
256
|
+
"language": "html",
|
|
257
|
+
"source": "<div slSplitter orientation=\"vertical\"></div>\n<div slSplitter orientation=\"horizontal\"></div>\n",
|
|
258
|
+
"verdict": "excerpt"
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"id": "value",
|
|
262
|
+
"title": "Two-way, and the fraction published to CSS",
|
|
263
|
+
"note": "The left pair holds no value at all and is driven by the custom property; the right pair binds [(value)] and prints the number beside it. Both regions are sized by one CSS rule, never by a style attribute.",
|
|
264
|
+
"language": "html",
|
|
265
|
+
"source": "<!-- aside { inline-size: calc(var(--slotted-splitter-value, 0.34) * 100%) } -->\n<div slSplitter></div>\n\n<div slSplitter [(value)]=\"width\"></div>\n",
|
|
266
|
+
"verdict": "excerpt"
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
"id": "limits",
|
|
270
|
+
"title": "A floor in pixels beside a ceiling in per cent",
|
|
271
|
+
"note": "Drag both bars to their ends. The first stops at two hundred pixels however narrow the window gets; the second stops at sixty per cent of it. Not one of the seven surveyed implementations can state the first — Zag says outright that it takes percentages only.",
|
|
272
|
+
"language": "html",
|
|
273
|
+
"source": "<div slSplitter min=\"200px\" [max]=\"0.6\"></div>\n",
|
|
274
|
+
"verdict": "excerpt"
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
"id": "collapse",
|
|
278
|
+
"title": "Enter collapses the region, and Enter brings it back",
|
|
279
|
+
"note": "The pattern’s own key. Collapsing stores the fraction the region had and expanding returns it, so a restored region comes back where it was rather than at some small size indistinguishable from a collapse.",
|
|
280
|
+
"language": "html",
|
|
281
|
+
"source": "<div slSplitter collapsible [collapsedValue]=\"0.06\" [(value)]=\"width\"></div>\n",
|
|
282
|
+
"verdict": "excerpt"
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
"id": "snapPoints",
|
|
286
|
+
"title": "Three stops a released drag lands on",
|
|
287
|
+
"note": "Drag past a stop and let go: the bar takes the nearest one. It snaps on release and never during the drag, because a bar that snapped on every move would fight the hand rather than help it. The arrows step between the same stops.",
|
|
288
|
+
"language": "html",
|
|
289
|
+
"source": "<div slSplitter [snapPoints]=\"[0.2, 0.34, 0.5]\"></div>\n",
|
|
290
|
+
"verdict": "excerpt"
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
"id": "reset",
|
|
294
|
+
"title": "Double click puts it back at defaultValue",
|
|
295
|
+
"note": "Move the bar anywhere, then double click it: it returns to defaultValue, inside min and max. The pattern assigns double click nothing, and every surveyed implementation that ships a reset puts it there; the same action is on the instance as reset().",
|
|
296
|
+
"language": "html",
|
|
297
|
+
"source": "<div slSplitter #bar=\"slSplitter\" [defaultValue]=\"0.34\" [(value)]=\"width\"></div>\n<button (click)=\"bar.reset()\">Repor</button>\n",
|
|
298
|
+
"verdict": "excerpt"
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
"id": "disabled",
|
|
302
|
+
"title": "Frozen, and still readable",
|
|
303
|
+
"note": "The bar keeps its tab stop and its three ARIA values, and the lines drop to the disabled step. Hover and press are held back for it. A reader who cannot move a separator can still be told where it is.",
|
|
304
|
+
"language": "html",
|
|
305
|
+
"source": "<div slSplitter disabled [value]=\"0.34\"></div>\n",
|
|
306
|
+
"verdict": "excerpt"
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
"id": "keyboard",
|
|
310
|
+
"title": "Every key the pattern lists",
|
|
311
|
+
"note": "Tab to the bar: arrows move sixteen pixels and sixty-four with Shift, Home and End go to the limits, Enter collapses and restores. Watch aria-valuenow in the row beneath as each one lands.",
|
|
312
|
+
"language": "html",
|
|
313
|
+
"source": "<div slSplitter collapsible [min]=\"0.15\" [max]=\"0.75\" [(value)]=\"width\"></div>\n",
|
|
314
|
+
"verdict": "excerpt"
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
"id": "twoBars",
|
|
318
|
+
"title": "Two bars in series, each clamping alone",
|
|
319
|
+
"note": "The shape the SAP Help Portal uses. The family holds no panels, so the consumer owns the layout and therefore the policy: each bar clamps against its own limits and neither negotiates with the other.",
|
|
320
|
+
"language": "html",
|
|
321
|
+
"source": "<div class=\"workspace\">\n <aside #toc>…</aside>\n <div slSplitter [for]=\"toc\" min=\"180px\" [max]=\"0.4\"></div>\n <main #doc>…</main>\n <div slSplitter [for]=\"doc\" [min]=\"0.4\" [max]=\"0.85\"></div>\n <aside>…</aside>\n</div>\n",
|
|
322
|
+
"verdict": "excerpt"
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
"id": "persistence",
|
|
326
|
+
"title": "A layout that survives a reload",
|
|
327
|
+
"note": "Drag the bar: the moving number changes every frame and the saved one changes once, on release. The family never touches storage — which storage, and whether a layout crosses a login, are the application’s decisions.",
|
|
328
|
+
"language": "html",
|
|
329
|
+
"source": "<div slSplitter [(value)]=\"width\" (resizeEnd)=\"save($event)\"></div>\n",
|
|
330
|
+
"verdict": "excerpt"
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
"id": "composition",
|
|
334
|
+
"title": "The instance a template reaches, and a host the consumer chose",
|
|
335
|
+
"note": "The bar is a directive, so it is written on whatever element the layout wanted there. The buttons drive the instance through exportAs; the second bar refuses every keyboard move from its own handler.",
|
|
336
|
+
"language": "html",
|
|
337
|
+
"source": "<section slSplitter #bar=\"slSplitter\" collapsible></section>\n<button (click)=\"bar.collapse()\">collapse()</button>\n",
|
|
338
|
+
"verdict": "excerpt"
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
"id": "defaults",
|
|
342
|
+
"title": "One floor, stated once for the application",
|
|
343
|
+
"note": "Both bars inherit a two-hundred-pixel floor from the provider; the second states its own and wins, because an explicit consumer value always does. None of the seven surveyed implementations has an equivalent.",
|
|
344
|
+
"language": "ts",
|
|
345
|
+
"source": "bootstrapApplication(App, {\n providers: [provideSplitterDefaults({ min: '200px' })],\n});\n",
|
|
346
|
+
"verdict": "excerpt"
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
"id": "accessibility",
|
|
350
|
+
"title": "What a screen reader is told",
|
|
351
|
+
"note": "The bar names the region through aria-controls and takes its name from that region’s own heading, which is the pattern’s rule: a separator is named for the region it sizes. The row beneath prints the four attributes as they stand in the DOM.",
|
|
352
|
+
"language": "html",
|
|
353
|
+
"source": "<aside #region>\n <h3 id=\"contas-heading\">Contas a receber</h3>\n</aside>\n<div slSplitter [for]=\"region\" aria-labelledby=\"contas-heading\"></div>\n",
|
|
354
|
+
"verdict": "excerpt"
|
|
355
|
+
}
|
|
356
|
+
]
|
|
142
357
|
}
|