@cscfi/csc-ui 4.0.0-alpha.29 → 4.0.0-alpha.30
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/csc-ui.js +7630 -7170
- package/dist/custom-elements.json +245 -0
- package/dist/docs/c-breadcrumb/usage.md +104 -0
- package/dist/docs/c-breadcrumb-item/usage.md +1 -0
- package/dist/styles/css/tokens.css +2 -0
- package/dist/vscode.css-custom-data.json +37 -0
- package/dist/vscode.html-custom-data.json +23 -0
- package/dist/web-types.json +109 -1
- package/dist-types/components/c-autocomplete/CAutocomplete.vue.d.ts +7 -7
- package/dist-types/components/c-breadcrumb/CBreadcrumb.vue.d.ts +35 -0
- package/dist-types/components/c-breadcrumb/fit.d.ts +29 -0
- package/dist-types/components/c-breadcrumb-item/CBreadcrumbItem.vue.d.ts +31 -0
- package/dist-types/components/c-button/CButton.vue.d.ts +4 -4
- package/dist-types/components/c-button-group/CButtonGroup.vue.d.ts +2 -2
- package/dist-types/components/c-checkbox/CCheckbox.vue.d.ts +2 -2
- package/dist-types/components/c-data-table/CDataTable.vue.d.ts +1 -1
- package/dist-types/components/c-date-picker/CDatePicker.vue.d.ts +10 -10
- package/dist-types/components/c-dropdown/CDropdown.vue.d.ts +2 -2
- package/dist-types/components/c-icon-button/CIconButton.vue.d.ts +1 -1
- package/dist-types/components/c-input/CInput.vue.d.ts +4 -4
- package/dist-types/components/c-list-item/CListItem.vue.d.ts +1 -1
- package/dist-types/components/c-menu/CMenu.vue.d.ts +1 -1
- package/dist-types/components/c-number-field/CNumberField.vue.d.ts +11 -11
- package/dist-types/components/c-otp-input/COtpInput.vue.d.ts +2 -2
- package/dist-types/components/c-popover/CPopover.vue.d.ts +1 -1
- package/dist-types/components/c-radio-group/CRadioGroup.vue.d.ts +3 -3
- package/dist-types/components/c-select/CSelect.vue.d.ts +7 -7
- package/dist-types/components/c-side-navigation-item/CSideNavigationItem.vue.d.ts +1 -1
- package/dist-types/components/c-slider/CSlider.vue.d.ts +2 -2
- package/dist-types/components/c-sub-navigation-item/CSubNavigationItem.vue.d.ts +1 -1
- package/dist-types/components/c-switch/CSwitch.vue.d.ts +1 -1
- package/dist-types/components/c-tab-buttons/CTabButtons.vue.d.ts +1 -1
- package/dist-types/components/c-tags/CTags.vue.d.ts +1 -1
- package/dist-types/components/c-text-field/CTextField.vue.d.ts +8 -8
- package/dist-types/components/c-time-picker/CTimePicker.vue.d.ts +8 -8
- package/dist-types/components/c-toasts/CToasts.vue.d.ts +1 -1
- package/dist-types/components/c-tooltip/CTooltip.vue.d.ts +1 -1
- package/dist-types/components/c-tree-select/CTreeSelect.vue.d.ts +7 -7
- package/dist-types/index.d.ts +2 -0
- package/dist-types/shared/FieldMessage.vue.d.ts +1 -1
- package/dist-types/shared/popoverChain.d.ts +4 -4
- package/dist-types/tag-name-map.d.ts +24 -0
- package/package.json +3 -2
|
@@ -95,6 +95,27 @@
|
|
|
95
95
|
"name": "CAutocompleteValue",
|
|
96
96
|
"owner": "c-autocomplete"
|
|
97
97
|
},
|
|
98
|
+
{
|
|
99
|
+
"declaration": "export interface CBreadcrumbProps {\n /**\n * UI text overrides (i18n), merged over the English defaults. Objects have\n * no attribute form — set it as a property\n *\n * @defaultable {}\n */\n texts?: CBreadcrumbTexts;\n}",
|
|
100
|
+
"description": "",
|
|
101
|
+
"kind": "interface",
|
|
102
|
+
"name": "CBreadcrumbProps",
|
|
103
|
+
"owner": "c-breadcrumb"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"declaration": "export interface CBreadcrumbTexts {\n /** Accessible name of the breadcrumb navigation. */\n breadcrumb?: string;\n /** Accessible name of the fold button; receives the number of folded crumbs. */\n fold?: (count: number) => string;\n}",
|
|
107
|
+
"description": "UI texts of `c-breadcrumb`, shallow-merged over the English defaults.\nStatic labels are strings; interpolated ones are functions.",
|
|
108
|
+
"kind": "interface",
|
|
109
|
+
"name": "CBreadcrumbTexts",
|
|
110
|
+
"owner": "c-breadcrumb"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"declaration": "export interface CBreadcrumbItemProps {\n /**\n * URL of the page the crumb leads to. Ignored on the current crumb (the\n * last one); a crumb without it names a level that has no page and renders\n * as plain text\n *\n * @freeform any URL\n */\n href?: string;\n /**\n * Browsing context the link opens in; the same tab when unset\n *\n * @freeform any browsing-context name (e.g. _blank, _self)\n */\n target?: string;\n}",
|
|
114
|
+
"description": "",
|
|
115
|
+
"kind": "interface",
|
|
116
|
+
"name": "CBreadcrumbItemProps",
|
|
117
|
+
"owner": "c-breadcrumb-item"
|
|
118
|
+
},
|
|
98
119
|
{
|
|
99
120
|
"declaration": "export interface CButtonProps {\n /**\n * Pressed (toggle) state — renders the selected look and sets\n * `aria-pressed`. Leave unset for regular action buttons: only a\n * true/false value marks the button as a toggle. Driven by\n * `c-button-group` on its slotted buttons.\n */\n active?: boolean;\n /**\n * Danger variant style\n *\n * @seeded from csc-ui — verify\n */\n danger?: boolean;\n /**\n * Disable the button\n *\n * @seeded from csc-ui — verify\n */\n disabled?: boolean;\n /**\n * Fit width to containing element\n *\n * @seeded from csc-ui — verify\n */\n fit?: boolean;\n /**\n * Light button background\n *\n * @seeded from csc-ui — verify\n */\n ghost?: boolean;\n /**\n * Id of the button\n *\n * @seeded from csc-ui — verify\n * @freeform\n */\n hostId?: string;\n /**\n * Hyperlink url\n *\n * @seeded from csc-ui — verify\n * @freeform any URL\n */\n href?: string;\n /**\n * Inverted button style for dark backgrounds\n *\n * @seeded from csc-ui — verify\n */\n inverted?: boolean;\n /**\n * Display loader on the button\n *\n * @seeded from csc-ui — verify\n */\n loading?: boolean;\n /**\n * Remove the default border radius\n *\n * @seeded from csc-ui — verify\n */\n noRadius?: boolean;\n /** Suppress the click ripple (e.g. when a wrapper owns the press feedback). */\n noRipple?: boolean;\n /**\n * Outlined button style\n *\n * @seeded from csc-ui — verify\n */\n outlined?: boolean;\n /**\n * Size of the button\n *\n * @seeded from csc-ui — verify\n */\n size?: CButtonSize;\n /**\n * Hyperlink target\n *\n * @seeded from csc-ui — verify\n * @freeform any browsing-context name (e.g. _blank, _self)\n */\n target?: string;\n /**\n * Transparent button background\n *\n * @seeded from csc-ui — verify\n */\n text?: boolean;\n /**\n * Button type\n *\n * @seeded from csc-ui — verify\n */\n type?: CButtonType;\n /**\n * Value for the button\n * - for use in the c-button-group\n *\n * @seeded from csc-ui — verify\n */\n value?: number | string;\n}",
|
|
100
121
|
"description": "",
|
|
@@ -1828,6 +1849,230 @@
|
|
|
1828
1849
|
"kind": "javascript-module",
|
|
1829
1850
|
"path": "src/components/c-badge/CBadge.vue"
|
|
1830
1851
|
},
|
|
1852
|
+
{
|
|
1853
|
+
"declarations": [
|
|
1854
|
+
{
|
|
1855
|
+
"customElement": true,
|
|
1856
|
+
"kind": "class",
|
|
1857
|
+
"name": "CBreadcrumb",
|
|
1858
|
+
"tagName": "c-breadcrumb",
|
|
1859
|
+
"description": "A navigation aid naming where the current page sits in a site's hierarchy: one line of crumbs from the top of the hierarchy down to the current page, the middle ones folding behind a \"…\" button when the line runs out of room.",
|
|
1860
|
+
"csc": {
|
|
1861
|
+
"usage": "docs/c-breadcrumb/usage.md",
|
|
1862
|
+
"subcomponents": [
|
|
1863
|
+
"c-breadcrumb-item"
|
|
1864
|
+
]
|
|
1865
|
+
},
|
|
1866
|
+
"attributes": [],
|
|
1867
|
+
"cssParts": [
|
|
1868
|
+
{
|
|
1869
|
+
"name": "root",
|
|
1870
|
+
"description": "The `<nav>` landmark; it takes the full width it is given and folds the crumbs to fit it"
|
|
1871
|
+
},
|
|
1872
|
+
{
|
|
1873
|
+
"name": "list",
|
|
1874
|
+
"description": "The one-line list of crumbs"
|
|
1875
|
+
},
|
|
1876
|
+
{
|
|
1877
|
+
"name": "separator",
|
|
1878
|
+
"description": "The chevron before the fold button"
|
|
1879
|
+
},
|
|
1880
|
+
{
|
|
1881
|
+
"name": "fold-button",
|
|
1882
|
+
"description": "The \"…\" button standing in for the folded crumbs"
|
|
1883
|
+
},
|
|
1884
|
+
{
|
|
1885
|
+
"name": "panel",
|
|
1886
|
+
"description": "The top-layer popover holding the fold panel, anchored below the fold button"
|
|
1887
|
+
},
|
|
1888
|
+
{
|
|
1889
|
+
"name": "panel-list",
|
|
1890
|
+
"description": "The fold panel's list surface holding the folded crumbs"
|
|
1891
|
+
}
|
|
1892
|
+
],
|
|
1893
|
+
"cssProperties": [],
|
|
1894
|
+
"cssStates": [],
|
|
1895
|
+
"events": [],
|
|
1896
|
+
"members": [
|
|
1897
|
+
{
|
|
1898
|
+
"kind": "field",
|
|
1899
|
+
"name": "texts",
|
|
1900
|
+
"privacy": "public",
|
|
1901
|
+
"description": "UI text overrides (i18n), merged over the English defaults. Objects have\nno attribute form — set it as a property",
|
|
1902
|
+
"type": {
|
|
1903
|
+
"text": "CBreadcrumbTexts"
|
|
1904
|
+
},
|
|
1905
|
+
"default": "{}",
|
|
1906
|
+
"csc": {
|
|
1907
|
+
"defaultable": true
|
|
1908
|
+
}
|
|
1909
|
+
}
|
|
1910
|
+
],
|
|
1911
|
+
"slots": [
|
|
1912
|
+
{
|
|
1913
|
+
"name": "default",
|
|
1914
|
+
"description": "The crumbs (`c-breadcrumb-item`), from the top of the hierarchy down to the current page"
|
|
1915
|
+
},
|
|
1916
|
+
{
|
|
1917
|
+
"name": "first",
|
|
1918
|
+
"description": "Assigned by the breadcrumb to its first crumb; never set `slot` on a crumb"
|
|
1919
|
+
},
|
|
1920
|
+
{
|
|
1921
|
+
"name": "folded",
|
|
1922
|
+
"description": "Assigned by the breadcrumb to the crumbs it folds into the fold panel; never set `slot` on a crumb"
|
|
1923
|
+
}
|
|
1924
|
+
]
|
|
1925
|
+
}
|
|
1926
|
+
],
|
|
1927
|
+
"exports": [
|
|
1928
|
+
{
|
|
1929
|
+
"declaration": {
|
|
1930
|
+
"module": "src/components/c-breadcrumb/CBreadcrumb.vue",
|
|
1931
|
+
"name": "CBreadcrumb"
|
|
1932
|
+
},
|
|
1933
|
+
"kind": "js",
|
|
1934
|
+
"name": "CBreadcrumb"
|
|
1935
|
+
},
|
|
1936
|
+
{
|
|
1937
|
+
"declaration": {
|
|
1938
|
+
"module": "src/components/c-breadcrumb/CBreadcrumb.vue",
|
|
1939
|
+
"name": "CBreadcrumb"
|
|
1940
|
+
},
|
|
1941
|
+
"kind": "custom-element-definition",
|
|
1942
|
+
"name": "c-breadcrumb"
|
|
1943
|
+
}
|
|
1944
|
+
],
|
|
1945
|
+
"kind": "javascript-module",
|
|
1946
|
+
"path": "src/components/c-breadcrumb/CBreadcrumb.vue"
|
|
1947
|
+
},
|
|
1948
|
+
{
|
|
1949
|
+
"declarations": [
|
|
1950
|
+
{
|
|
1951
|
+
"customElement": true,
|
|
1952
|
+
"kind": "class",
|
|
1953
|
+
"name": "CBreadcrumbItem",
|
|
1954
|
+
"tagName": "c-breadcrumb-item",
|
|
1955
|
+
"description": "One crumb in a `c-breadcrumb`: a link to a level of the hierarchy, or, as the last crumb, the current page.",
|
|
1956
|
+
"csc": {
|
|
1957
|
+
"usage": "docs/c-breadcrumb-item/usage.md"
|
|
1958
|
+
},
|
|
1959
|
+
"attributes": [
|
|
1960
|
+
{
|
|
1961
|
+
"fieldName": "href",
|
|
1962
|
+
"name": "href",
|
|
1963
|
+
"description": "URL of the page the crumb leads to. Ignored on the current crumb (the\nlast one); a crumb without it names a level that has no page and renders\nas plain text",
|
|
1964
|
+
"type": {
|
|
1965
|
+
"text": "string"
|
|
1966
|
+
},
|
|
1967
|
+
"default": "''",
|
|
1968
|
+
"csc": {
|
|
1969
|
+
"freeform": "any URL"
|
|
1970
|
+
}
|
|
1971
|
+
},
|
|
1972
|
+
{
|
|
1973
|
+
"fieldName": "target",
|
|
1974
|
+
"name": "target",
|
|
1975
|
+
"description": "Browsing context the link opens in; the same tab when unset",
|
|
1976
|
+
"type": {
|
|
1977
|
+
"text": "string"
|
|
1978
|
+
},
|
|
1979
|
+
"default": "''",
|
|
1980
|
+
"csc": {
|
|
1981
|
+
"freeform": "any browsing-context name (e.g. _blank, _self)"
|
|
1982
|
+
}
|
|
1983
|
+
}
|
|
1984
|
+
],
|
|
1985
|
+
"cssParts": [
|
|
1986
|
+
{
|
|
1987
|
+
"name": "root",
|
|
1988
|
+
"description": "The list item holding the separator and the crumb; in the fold panel, the row"
|
|
1989
|
+
},
|
|
1990
|
+
{
|
|
1991
|
+
"name": "separator",
|
|
1992
|
+
"description": "The chevron before every crumb but the first, hidden in the fold panel"
|
|
1993
|
+
},
|
|
1994
|
+
{
|
|
1995
|
+
"name": "content",
|
|
1996
|
+
"description": "The link (or, without `href` and on the current crumb, the text) holding the icon and label"
|
|
1997
|
+
},
|
|
1998
|
+
{
|
|
1999
|
+
"name": "label",
|
|
2000
|
+
"description": "The label text, truncated with an ellipsis when the breadcrumb runs out of room"
|
|
2001
|
+
}
|
|
2002
|
+
],
|
|
2003
|
+
"cssProperties": [],
|
|
2004
|
+
"cssStates": [
|
|
2005
|
+
{
|
|
2006
|
+
"name": "current",
|
|
2007
|
+
"description": "Present on the current crumb (the last one)"
|
|
2008
|
+
},
|
|
2009
|
+
{
|
|
2010
|
+
"name": "folded",
|
|
2011
|
+
"description": "Present while the crumb is folded into the breadcrumb's fold panel"
|
|
2012
|
+
}
|
|
2013
|
+
],
|
|
2014
|
+
"events": [],
|
|
2015
|
+
"members": [
|
|
2016
|
+
{
|
|
2017
|
+
"kind": "field",
|
|
2018
|
+
"name": "href",
|
|
2019
|
+
"privacy": "public",
|
|
2020
|
+
"description": "URL of the page the crumb leads to. Ignored on the current crumb (the\nlast one); a crumb without it names a level that has no page and renders\nas plain text",
|
|
2021
|
+
"type": {
|
|
2022
|
+
"text": "string"
|
|
2023
|
+
},
|
|
2024
|
+
"default": "''",
|
|
2025
|
+
"csc": {
|
|
2026
|
+
"freeform": "any URL"
|
|
2027
|
+
}
|
|
2028
|
+
},
|
|
2029
|
+
{
|
|
2030
|
+
"kind": "field",
|
|
2031
|
+
"name": "target",
|
|
2032
|
+
"privacy": "public",
|
|
2033
|
+
"description": "Browsing context the link opens in; the same tab when unset",
|
|
2034
|
+
"type": {
|
|
2035
|
+
"text": "string"
|
|
2036
|
+
},
|
|
2037
|
+
"default": "''",
|
|
2038
|
+
"csc": {
|
|
2039
|
+
"freeform": "any browsing-context name (e.g. _blank, _self)"
|
|
2040
|
+
}
|
|
2041
|
+
}
|
|
2042
|
+
],
|
|
2043
|
+
"slots": [
|
|
2044
|
+
{
|
|
2045
|
+
"name": "default",
|
|
2046
|
+
"description": "The crumb's label"
|
|
2047
|
+
},
|
|
2048
|
+
{
|
|
2049
|
+
"name": "icon",
|
|
2050
|
+
"description": "An icon shown before the label (e.g. a `c-icon`); give an icon-only crumb an `aria-label`"
|
|
2051
|
+
}
|
|
2052
|
+
]
|
|
2053
|
+
}
|
|
2054
|
+
],
|
|
2055
|
+
"exports": [
|
|
2056
|
+
{
|
|
2057
|
+
"declaration": {
|
|
2058
|
+
"module": "src/components/c-breadcrumb-item/CBreadcrumbItem.vue",
|
|
2059
|
+
"name": "CBreadcrumbItem"
|
|
2060
|
+
},
|
|
2061
|
+
"kind": "js",
|
|
2062
|
+
"name": "CBreadcrumbItem"
|
|
2063
|
+
},
|
|
2064
|
+
{
|
|
2065
|
+
"declaration": {
|
|
2066
|
+
"module": "src/components/c-breadcrumb-item/CBreadcrumbItem.vue",
|
|
2067
|
+
"name": "CBreadcrumbItem"
|
|
2068
|
+
},
|
|
2069
|
+
"kind": "custom-element-definition",
|
|
2070
|
+
"name": "c-breadcrumb-item"
|
|
2071
|
+
}
|
|
2072
|
+
],
|
|
2073
|
+
"kind": "javascript-module",
|
|
2074
|
+
"path": "src/components/c-breadcrumb-item/CBreadcrumbItem.vue"
|
|
2075
|
+
},
|
|
1831
2076
|
{
|
|
1832
2077
|
"declarations": [
|
|
1833
2078
|
{
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
A navigation aid naming where the current page sits in a site's hierarchy: one line of crumbs from the top of the hierarchy down to the current page, the middle ones folding behind a "…" button when the line runs out of room.
|
|
2
|
+
|
|
3
|
+
## Crumbs
|
|
4
|
+
|
|
5
|
+
Each `c-breadcrumb-item` is a crumb, written in order from the top of the
|
|
6
|
+
hierarchy down. A crumb with an `href` is a link; the last crumb is always the
|
|
7
|
+
current page — shown as plain text and announced as the current page, with no
|
|
8
|
+
attribute to set — and a crumb without an `href` names a level that has no page
|
|
9
|
+
of its own. An icon goes in a crumb's `icon` slot; give an icon-only crumb an
|
|
10
|
+
`aria-label`, which names its link:
|
|
11
|
+
|
|
12
|
+
```vue
|
|
13
|
+
<c-breadcrumb>
|
|
14
|
+
<c-breadcrumb-item aria-label="Home" href="/">
|
|
15
|
+
<c-icon slot="icon" :path="mdiHome" />
|
|
16
|
+
</c-breadcrumb-item>
|
|
17
|
+
|
|
18
|
+
<c-breadcrumb-item href="/projects">Projects</c-breadcrumb-item>
|
|
19
|
+
|
|
20
|
+
<c-breadcrumb-item>Project #1</c-breadcrumb-item>
|
|
21
|
+
</c-breadcrumb>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
The chevron between crumbs is drawn by the breadcrumb and is not configurable.
|
|
25
|
+
|
|
26
|
+
## Folding
|
|
27
|
+
|
|
28
|
+
The breadcrumb is always one line, as wide as the space it is given. When its
|
|
29
|
+
crumbs do not fit, the middle ones fold behind a "…" button, the crumb nearest
|
|
30
|
+
the first one first; the first crumb and the current crumb never fold. The
|
|
31
|
+
button opens a panel listing the folded crumbs as links: Tab or the up and
|
|
32
|
+
down arrow keys move through them, Home and End jump to the first and the last,
|
|
33
|
+
and Escape or a press outside closes it. The down or up arrow on the button
|
|
34
|
+
opens the panel straight onto its first or last crumb. Once nothing more can
|
|
35
|
+
fold, the current crumb's label shortens with an ellipsis, then the first
|
|
36
|
+
crumb's; a shortened crumb shows its full label as a tooltip.
|
|
37
|
+
|
|
38
|
+
The breadcrumb assigns its crumbs to slots to fold them — never set `slot` on a
|
|
39
|
+
crumb yourself. In a flex row, let the breadcrumb take the remaining space so
|
|
40
|
+
it can unfold again when the row grows:
|
|
41
|
+
|
|
42
|
+
```css
|
|
43
|
+
c-breadcrumb::part(root) {
|
|
44
|
+
flex: 1;
|
|
45
|
+
min-width: 0;
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Single-page apps
|
|
50
|
+
|
|
51
|
+
A crumb is a real link, so it opens in a new tab and can be copied. To route
|
|
52
|
+
inside a single-page app, keep the `href` and intercept the crumb's click — it
|
|
53
|
+
also fires for Enter, and for a crumb in the fold panel:
|
|
54
|
+
|
|
55
|
+
```vue
|
|
56
|
+
<c-breadcrumb-item
|
|
57
|
+
href="/projects"
|
|
58
|
+
@click.exact.prevent="router.push('/projects')"
|
|
59
|
+
>
|
|
60
|
+
Projects
|
|
61
|
+
</c-breadcrumb-item>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
The `.exact` modifier leaves Ctrl-, Cmd- and Shift-clicks to the browser.
|
|
65
|
+
|
|
66
|
+
## Texts
|
|
67
|
+
|
|
68
|
+
The navigation's accessible name and the "…" button's label can be replaced
|
|
69
|
+
for another language through the `texts` object, merged over the English
|
|
70
|
+
defaults. The button's label is a function of the number of folded crumbs, so
|
|
71
|
+
the object must be bound as a DOM property:
|
|
72
|
+
|
|
73
|
+
```vue
|
|
74
|
+
<c-breadcrumb
|
|
75
|
+
:texts="{
|
|
76
|
+
breadcrumb: 'Murupolku',
|
|
77
|
+
fold: (count) => `Näytä ${count} lisää`,
|
|
78
|
+
}"
|
|
79
|
+
/>
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
To translate every breadcrumb at once, set `texts` app-wide with
|
|
83
|
+
`applyDefaults({ 'c-breadcrumb': { texts } })` (Customization → App-wide prop
|
|
84
|
+
defaults); a per-instance `texts` still wins key by key.
|
|
85
|
+
|
|
86
|
+
## Customization
|
|
87
|
+
|
|
88
|
+
Crumbs expose the `current` and `folded` custom states, so a crumb can be
|
|
89
|
+
restyled per state:
|
|
90
|
+
|
|
91
|
+
```css
|
|
92
|
+
c-breadcrumb-item:state(current)::part(content) {
|
|
93
|
+
font-weight: 400;
|
|
94
|
+
}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
The fold panel hides its scrollbar and ends on a half-visible crumb when it
|
|
98
|
+
overflows. To bring the native scrollbar back:
|
|
99
|
+
|
|
100
|
+
```css
|
|
101
|
+
c-breadcrumb::part(panel-list) {
|
|
102
|
+
scrollbar-width: auto;
|
|
103
|
+
}
|
|
104
|
+
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
One crumb in a `c-breadcrumb`: a link to a level of the hierarchy, or, as the last crumb, the current page.
|
|
@@ -876,6 +876,8 @@ c-accordion-item:not(:defined),
|
|
|
876
876
|
c-alert:not(:defined),
|
|
877
877
|
c-autocomplete:not(:defined),
|
|
878
878
|
c-badge:not(:defined),
|
|
879
|
+
c-breadcrumb:not(:defined),
|
|
880
|
+
c-breadcrumb-item:not(:defined),
|
|
879
881
|
c-button:not(:defined),
|
|
880
882
|
c-button-group:not(:defined),
|
|
881
883
|
c-card:not(:defined),
|
|
@@ -113,6 +113,43 @@
|
|
|
113
113
|
"name": "::part(root)",
|
|
114
114
|
"description": "The badge pill itself, absolutely positioned at the top right corner of its parent"
|
|
115
115
|
},
|
|
116
|
+
{
|
|
117
|
+
"name": "::part(root)",
|
|
118
|
+
"description": "The `<nav>` landmark; it takes the full width it is given and folds the crumbs to fit it"
|
|
119
|
+
},
|
|
120
|
+
{ "name": "::part(list)", "description": "The one-line list of crumbs" },
|
|
121
|
+
{
|
|
122
|
+
"name": "::part(separator)",
|
|
123
|
+
"description": "The chevron before the fold button"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"name": "::part(fold-button)",
|
|
127
|
+
"description": "The \"…\" button standing in for the folded crumbs"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"name": "::part(panel)",
|
|
131
|
+
"description": "The top-layer popover holding the fold panel, anchored below the fold button"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"name": "::part(panel-list)",
|
|
135
|
+
"description": "The fold panel's list surface holding the folded crumbs"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"name": "::part(root)",
|
|
139
|
+
"description": "The list item holding the separator and the crumb; in the fold panel, the row"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"name": "::part(separator)",
|
|
143
|
+
"description": "The chevron before every crumb but the first, hidden in the fold panel"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"name": "::part(content)",
|
|
147
|
+
"description": "The link (or, without `href` and on the current crumb, the text) holding the icon and label"
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"name": "::part(label)",
|
|
151
|
+
"description": "The label text, truncated with an ellipsis when the breadcrumb runs out of room"
|
|
152
|
+
},
|
|
116
153
|
{
|
|
117
154
|
"name": "::part(root)",
|
|
118
155
|
"description": "The native `<button>` / `<a>` element carrying the visual styling."
|
|
@@ -186,6 +186,29 @@
|
|
|
186
186
|
"attributes": [],
|
|
187
187
|
"references": []
|
|
188
188
|
},
|
|
189
|
+
{
|
|
190
|
+
"name": "c-breadcrumb",
|
|
191
|
+
"description": "A navigation aid naming where the current page sits in a site's hierarchy: one line of crumbs from the top of the hierarchy down to the current page, the middle ones folding behind a \"…\" button when the line runs out of room.\n---\n\n\n### **Slots:**\n - **default** - The crumbs (`c-breadcrumb-item`), from the top of the hierarchy down to the current page\n- **first** - Assigned by the breadcrumb to its first crumb; never set `slot` on a crumb\n- **folded** - Assigned by the breadcrumb to the crumbs it folds into the fold panel; never set `slot` on a crumb\n\n### **CSS Parts:**\n - **root** - The `<nav>` landmark; it takes the full width it is given and folds the crumbs to fit it\n- **list** - The one-line list of crumbs\n- **separator** - The chevron before the fold button\n- **fold-button** - The \"…\" button standing in for the folded crumbs\n- **panel** - The top-layer popover holding the fold panel, anchored below the fold button\n- **panel-list** - The fold panel's list surface holding the folded crumbs",
|
|
192
|
+
"attributes": [],
|
|
193
|
+
"references": []
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"name": "c-breadcrumb-item",
|
|
197
|
+
"description": "One crumb in a `c-breadcrumb`: a link to a level of the hierarchy, or, as the last crumb, the current page.\n---\n\n\n### **Slots:**\n - **default** - The crumb's label\n- **icon** - An icon shown before the label (e.g. a `c-icon`); give an icon-only crumb an `aria-label`\n\n### **CSS Parts:**\n - **root** - The list item holding the separator and the crumb; in the fold panel, the row\n- **separator** - The chevron before every crumb but the first, hidden in the fold panel\n- **content** - The link (or, without `href` and on the current crumb, the text) holding the icon and label\n- **label** - The label text, truncated with an ellipsis when the breadcrumb runs out of room",
|
|
198
|
+
"attributes": [
|
|
199
|
+
{
|
|
200
|
+
"name": "href",
|
|
201
|
+
"description": "URL of the page the crumb leads to. Ignored on the current crumb (the\nlast one); a crumb without it names a level that has no page and renders\nas plain text",
|
|
202
|
+
"values": []
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"name": "target",
|
|
206
|
+
"description": "Browsing context the link opens in; the same tab when unset",
|
|
207
|
+
"values": []
|
|
208
|
+
}
|
|
209
|
+
],
|
|
210
|
+
"references": []
|
|
211
|
+
},
|
|
189
212
|
{
|
|
190
213
|
"name": "c-button",
|
|
191
214
|
"description": "Buttons trigger actions — submitting a form, opening a modal, confirming a choice. Use one primary (default appearance) button per view; secondary actions use the `outlined`, `ghost` or `text` appearances.\n---\n\n\n### **Slots:**\n - **default** - Button label content.\n- **icon** - Leading icon, vertically centered before the label.\n- **description** - Secondary text rendered below the label.\n\n### **CSS Properties:**\n - **--c-font-family** - Font stack applied to the label (native buttons do not inherit it). _(default: undefined)_\n\n### **CSS Parts:**\n - **root** - The native `<button>` / `<a>` element carrying the visual styling.\n- **content** - Layout wrapper for the label, icon and description.\n- **description** - Wrapper of the `description` slot.",
|
package/dist/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"name": "@cscfi/csc-ui",
|
|
4
|
-
"version": "4.0.0-alpha.
|
|
4
|
+
"version": "4.0.0-alpha.30",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -573,6 +573,77 @@
|
|
|
573
573
|
"events": [],
|
|
574
574
|
"js": { "properties": [], "events": [] }
|
|
575
575
|
},
|
|
576
|
+
{
|
|
577
|
+
"name": "c-breadcrumb",
|
|
578
|
+
"description": "A navigation aid naming where the current page sits in a site's hierarchy: one line of crumbs from the top of the hierarchy down to the current page, the middle ones folding behind a \"…\" button when the line runs out of room.\n---\n\n\n### **Slots:**\n - **default** - The crumbs (`c-breadcrumb-item`), from the top of the hierarchy down to the current page\n- **first** - Assigned by the breadcrumb to its first crumb; never set `slot` on a crumb\n- **folded** - Assigned by the breadcrumb to the crumbs it folds into the fold panel; never set `slot` on a crumb\n\n### **CSS Parts:**\n - **root** - The `<nav>` landmark; it takes the full width it is given and folds the crumbs to fit it\n- **list** - The one-line list of crumbs\n- **separator** - The chevron before the fold button\n- **fold-button** - The \"…\" button standing in for the folded crumbs\n- **panel** - The top-layer popover holding the fold panel, anchored below the fold button\n- **panel-list** - The fold panel's list surface holding the folded crumbs",
|
|
579
|
+
"doc-url": "",
|
|
580
|
+
"attributes": [],
|
|
581
|
+
"slots": [
|
|
582
|
+
{
|
|
583
|
+
"name": "default",
|
|
584
|
+
"description": "The crumbs (`c-breadcrumb-item`), from the top of the hierarchy down to the current page"
|
|
585
|
+
},
|
|
586
|
+
{
|
|
587
|
+
"name": "first",
|
|
588
|
+
"description": "Assigned by the breadcrumb to its first crumb; never set `slot` on a crumb"
|
|
589
|
+
},
|
|
590
|
+
{
|
|
591
|
+
"name": "folded",
|
|
592
|
+
"description": "Assigned by the breadcrumb to the crumbs it folds into the fold panel; never set `slot` on a crumb"
|
|
593
|
+
}
|
|
594
|
+
],
|
|
595
|
+
"events": [],
|
|
596
|
+
"js": {
|
|
597
|
+
"properties": [
|
|
598
|
+
{
|
|
599
|
+
"name": "texts",
|
|
600
|
+
"description": "UI text overrides (i18n), merged over the English defaults. Objects have\nno attribute form — set it as a property",
|
|
601
|
+
"type": "CBreadcrumbTexts"
|
|
602
|
+
}
|
|
603
|
+
],
|
|
604
|
+
"events": []
|
|
605
|
+
}
|
|
606
|
+
},
|
|
607
|
+
{
|
|
608
|
+
"name": "c-breadcrumb-item",
|
|
609
|
+
"description": "One crumb in a `c-breadcrumb`: a link to a level of the hierarchy, or, as the last crumb, the current page.\n---\n\n\n### **Slots:**\n - **default** - The crumb's label\n- **icon** - An icon shown before the label (e.g. a `c-icon`); give an icon-only crumb an `aria-label`\n\n### **CSS Parts:**\n - **root** - The list item holding the separator and the crumb; in the fold panel, the row\n- **separator** - The chevron before every crumb but the first, hidden in the fold panel\n- **content** - The link (or, without `href` and on the current crumb, the text) holding the icon and label\n- **label** - The label text, truncated with an ellipsis when the breadcrumb runs out of room",
|
|
610
|
+
"doc-url": "",
|
|
611
|
+
"attributes": [
|
|
612
|
+
{
|
|
613
|
+
"name": "href",
|
|
614
|
+
"description": "URL of the page the crumb leads to. Ignored on the current crumb (the\nlast one); a crumb without it names a level that has no page and renders\nas plain text",
|
|
615
|
+
"value": { "type": "string", "default": "''" }
|
|
616
|
+
},
|
|
617
|
+
{
|
|
618
|
+
"name": "target",
|
|
619
|
+
"description": "Browsing context the link opens in; the same tab when unset",
|
|
620
|
+
"value": { "type": "string", "default": "''" }
|
|
621
|
+
}
|
|
622
|
+
],
|
|
623
|
+
"slots": [
|
|
624
|
+
{ "name": "default", "description": "The crumb's label" },
|
|
625
|
+
{
|
|
626
|
+
"name": "icon",
|
|
627
|
+
"description": "An icon shown before the label (e.g. a `c-icon`); give an icon-only crumb an `aria-label`"
|
|
628
|
+
}
|
|
629
|
+
],
|
|
630
|
+
"events": [],
|
|
631
|
+
"js": {
|
|
632
|
+
"properties": [
|
|
633
|
+
{
|
|
634
|
+
"name": "href",
|
|
635
|
+
"description": "URL of the page the crumb leads to. Ignored on the current crumb (the\nlast one); a crumb without it names a level that has no page and renders\nas plain text",
|
|
636
|
+
"type": "string"
|
|
637
|
+
},
|
|
638
|
+
{
|
|
639
|
+
"name": "target",
|
|
640
|
+
"description": "Browsing context the link opens in; the same tab when unset",
|
|
641
|
+
"type": "string"
|
|
642
|
+
}
|
|
643
|
+
],
|
|
644
|
+
"events": []
|
|
645
|
+
}
|
|
646
|
+
},
|
|
576
647
|
{
|
|
577
648
|
"name": "c-button",
|
|
578
649
|
"description": "Buttons trigger actions — submitting a form, opening a modal, confirming a choice. Use one primary (default appearance) button per view; secondary actions use the `outlined`, `ghost` or `text` appearances.\n---\n\n\n### **Slots:**\n - **default** - Button label content.\n- **icon** - Leading icon, vertically centered before the label.\n- **description** - Secondary text rendered below the label.\n\n### **CSS Properties:**\n - **--c-font-family** - Font stack applied to the label (native buttons do not inherit it). _(default: undefined)_\n\n### **CSS Parts:**\n - **root** - The native `<button>` / `<a>` element carrying the visual styling.\n- **content** - Layout wrapper for the label, icon and description.\n- **description** - Wrapper of the `description` slot.",
|
|
@@ -6860,6 +6931,43 @@
|
|
|
6860
6931
|
"name": "part(root)",
|
|
6861
6932
|
"description": "The badge pill itself, absolutely positioned at the top right corner of its parent"
|
|
6862
6933
|
},
|
|
6934
|
+
{
|
|
6935
|
+
"name": "part(root)",
|
|
6936
|
+
"description": "The `<nav>` landmark; it takes the full width it is given and folds the crumbs to fit it"
|
|
6937
|
+
},
|
|
6938
|
+
{ "name": "part(list)", "description": "The one-line list of crumbs" },
|
|
6939
|
+
{
|
|
6940
|
+
"name": "part(separator)",
|
|
6941
|
+
"description": "The chevron before the fold button"
|
|
6942
|
+
},
|
|
6943
|
+
{
|
|
6944
|
+
"name": "part(fold-button)",
|
|
6945
|
+
"description": "The \"…\" button standing in for the folded crumbs"
|
|
6946
|
+
},
|
|
6947
|
+
{
|
|
6948
|
+
"name": "part(panel)",
|
|
6949
|
+
"description": "The top-layer popover holding the fold panel, anchored below the fold button"
|
|
6950
|
+
},
|
|
6951
|
+
{
|
|
6952
|
+
"name": "part(panel-list)",
|
|
6953
|
+
"description": "The fold panel's list surface holding the folded crumbs"
|
|
6954
|
+
},
|
|
6955
|
+
{
|
|
6956
|
+
"name": "part(root)",
|
|
6957
|
+
"description": "The list item holding the separator and the crumb; in the fold panel, the row"
|
|
6958
|
+
},
|
|
6959
|
+
{
|
|
6960
|
+
"name": "part(separator)",
|
|
6961
|
+
"description": "The chevron before every crumb but the first, hidden in the fold panel"
|
|
6962
|
+
},
|
|
6963
|
+
{
|
|
6964
|
+
"name": "part(content)",
|
|
6965
|
+
"description": "The link (or, without `href` and on the current crumb, the text) holding the icon and label"
|
|
6966
|
+
},
|
|
6967
|
+
{
|
|
6968
|
+
"name": "part(label)",
|
|
6969
|
+
"description": "The label text, truncated with an ellipsis when the breadcrumb runs out of room"
|
|
6970
|
+
},
|
|
6863
6971
|
{
|
|
6864
6972
|
"name": "part(root)",
|
|
6865
6973
|
"description": "The native `<button>` / `<a>` element carrying the visual styling."
|
|
@@ -204,25 +204,25 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CAutoc
|
|
|
204
204
|
value: CAutocompleteValue;
|
|
205
205
|
name: string;
|
|
206
206
|
multiple: boolean;
|
|
207
|
-
|
|
208
|
-
disabled: boolean;
|
|
207
|
+
itemsPerPage: number;
|
|
209
208
|
size: CFieldSize;
|
|
209
|
+
texts: CAutocompleteTexts;
|
|
210
|
+
hideDetails: boolean;
|
|
211
|
+
labelOnTop: boolean;
|
|
212
|
+
shadow: boolean;
|
|
210
213
|
clearable: boolean;
|
|
214
|
+
disabled: boolean;
|
|
211
215
|
errorMessage: string;
|
|
212
216
|
external: boolean;
|
|
213
|
-
hideDetails: boolean;
|
|
214
217
|
hint: string;
|
|
215
218
|
hostId: string;
|
|
216
219
|
items: CAutocompleteItem[];
|
|
217
|
-
itemsPerPage: number;
|
|
218
|
-
labelOnTop: boolean;
|
|
219
220
|
loading: boolean;
|
|
220
221
|
maxTags: number;
|
|
221
222
|
placeholder: string;
|
|
223
|
+
required: boolean;
|
|
222
224
|
returnObject: boolean;
|
|
223
225
|
selectAll: boolean;
|
|
224
|
-
shadow: boolean;
|
|
225
|
-
texts: CAutocompleteTexts;
|
|
226
226
|
valid: boolean;
|
|
227
227
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
228
228
|
pre?: (props: {}) => any;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export interface CBreadcrumbProps {
|
|
2
|
+
/**
|
|
3
|
+
* UI text overrides (i18n), merged over the English defaults. Objects have
|
|
4
|
+
* no attribute form — set it as a property
|
|
5
|
+
*
|
|
6
|
+
* @defaultable {}
|
|
7
|
+
*/
|
|
8
|
+
texts?: CBreadcrumbTexts;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* UI texts of `c-breadcrumb`, shallow-merged over the English defaults.
|
|
12
|
+
* Static labels are strings; interpolated ones are functions.
|
|
13
|
+
*/
|
|
14
|
+
export interface CBreadcrumbTexts {
|
|
15
|
+
/** Accessible name of the breadcrumb navigation. */
|
|
16
|
+
breadcrumb?: string;
|
|
17
|
+
/** Accessible name of the fold button; receives the number of folded crumbs. */
|
|
18
|
+
fold?: (count: number) => string;
|
|
19
|
+
}
|
|
20
|
+
declare const _default: typeof __VLS_export;
|
|
21
|
+
export default _default;
|
|
22
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CBreadcrumbProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CBreadcrumbProps> & Readonly<{}>, {
|
|
23
|
+
texts: CBreadcrumbTexts;
|
|
24
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
25
|
+
first?: (props: {}) => any;
|
|
26
|
+
} & {
|
|
27
|
+
folded?: (props: {}) => any;
|
|
28
|
+
} & {
|
|
29
|
+
default?: (props: {}) => any;
|
|
30
|
+
}>;
|
|
31
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
32
|
+
new (): {
|
|
33
|
+
$slots: S;
|
|
34
|
+
};
|
|
35
|
+
};
|