@canonical/react-ds-global 0.37.0 → 0.38.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/README.md +72 -0
- package/dist/esm/lib/_work_in_progress/Announcement/styles.css +51 -47
- package/dist/esm/lib/_work_in_progress/CategoriesSection/common/Category/styles.css +21 -17
- package/dist/esm/lib/_work_in_progress/CategoriesSection/styles.css +16 -12
- package/dist/esm/lib/_work_in_progress/ChatSection/styles.css +22 -18
- package/dist/esm/lib/_work_in_progress/DescriptionSection/styles.css +14 -10
- package/dist/esm/lib/_work_in_progress/IconSection/styles.css +18 -14
- package/dist/esm/lib/_work_in_progress/Label/styles.css +36 -32
- package/dist/esm/lib/_work_in_progress/Link/styles.css +32 -28
- package/dist/esm/lib/_work_in_progress/Rule/styles.css +21 -14
- package/dist/esm/lib/_work_in_progress/Section/styles.css +66 -62
- package/dist/esm/lib/_work_in_progress/SkipLink/styles.css +35 -32
- package/dist/esm/lib/_work_in_progress/TSection/styles.css +26 -22
- package/dist/esm/lib/_work_in_progress/grid/ApplicationLayout/ApplicationLayout.js +4 -1
- package/dist/esm/lib/_work_in_progress/grid/ApplicationLayout/ApplicationLayout.js.map +1 -1
- package/dist/esm/lib/_work_in_progress/grid/ApplicationLayout/styles.css +21 -17
- package/dist/esm/lib/_work_in_progress/grid/GridCard/GridCard.js +4 -1
- package/dist/esm/lib/_work_in_progress/grid/GridCard/GridCard.js.map +1 -1
- package/dist/esm/lib/_work_in_progress/grid/GridCard/styles.css +8 -4
- package/dist/esm/lib/_work_in_progress/grid/InnerGridDemo/styles.css +38 -33
- package/dist/esm/lib/_work_in_progress/grid/SettingsView/SettingsView.js +4 -1
- package/dist/esm/lib/_work_in_progress/grid/SettingsView/SettingsView.js.map +1 -1
- package/dist/esm/lib/_work_in_progress/grid/SettingsView/styles.css +23 -19
- package/dist/esm/lib/component/Accordion/common/Item/styles.css +305 -299
- package/dist/esm/lib/component/Accordion/styles.css +35 -31
- package/dist/esm/lib/component/Badge/hooks/useBadge.js +1 -1
- package/dist/esm/lib/component/Badge/hooks/useBadge.js.map +1 -1
- package/dist/esm/lib/component/Badge/styles.css +45 -41
- package/dist/esm/lib/component/Breadcrumbs/Breadcrumbs.js +1 -1
- package/dist/esm/lib/component/Breadcrumbs/Breadcrumbs.js.map +1 -1
- package/dist/esm/lib/component/Breadcrumbs/common/Item/styles.css +69 -65
- package/dist/esm/lib/component/Breadcrumbs/styles.css +30 -26
- package/dist/esm/lib/component/Button/styles.css +293 -260
- package/dist/esm/lib/component/Card/common/Content/styles.css +27 -23
- package/dist/esm/lib/component/Card/common/Footer/styles.css +30 -26
- package/dist/esm/lib/component/Card/common/Header/styles.css +25 -21
- package/dist/esm/lib/component/Card/common/Image/styles.css +8 -4
- package/dist/esm/lib/component/Card/styles.css +77 -73
- package/dist/esm/lib/component/Chip/Chip.js.map +1 -1
- package/dist/esm/lib/component/Chip/styles.css +105 -101
- package/dist/esm/lib/component/ContextualMenu/ContextualMenu.js +29 -20
- package/dist/esm/lib/component/ContextualMenu/ContextualMenu.js.map +1 -1
- package/dist/esm/lib/component/ContextualMenu/common/Item/Item.js +25 -2
- package/dist/esm/lib/component/ContextualMenu/common/Item/Item.js.map +1 -1
- package/dist/esm/lib/component/ContextualMenu/common/Item/styles.css +116 -106
- package/dist/esm/lib/component/ContextualMenu/common/SubMenu/SubMenu.js +29 -9
- package/dist/esm/lib/component/ContextualMenu/common/SubMenu/SubMenu.js.map +1 -1
- package/dist/esm/lib/component/ContextualMenu/styles.css +74 -72
- package/dist/esm/lib/component/Icon/styles.css +24 -20
- package/dist/esm/lib/component/InlineCode/styles.css +19 -15
- package/dist/esm/lib/component/KeyboardKey/styles.css +44 -40
- package/dist/esm/lib/component/Popover/Popover.js.map +1 -1
- package/dist/esm/lib/component/Popover/styles.css +59 -52
- package/dist/esm/lib/component/Tabs/common/Item/styles.css +80 -76
- package/dist/esm/lib/component/Tabs/styles.css +36 -32
- package/dist/esm/lib/component/Tile/common/Content/styles.css +28 -24
- package/dist/esm/lib/component/Tile/common/Header/styles.css +28 -24
- package/dist/esm/lib/component/Tile/styles.css +31 -27
- package/dist/esm/lib/component/Tooltip/styles.css +213 -208
- package/dist/esm/lib/group/Cards/styles.css +26 -22
- package/dist/esm/lib/group/KeyboardKeys/styles.css +14 -10
- package/dist/esm/lib/hooks/useContextualMenu/index.js +1 -0
- package/dist/esm/lib/hooks/useContextualMenu/index.js.map +1 -1
- package/dist/esm/lib/hooks/useContextualMenu/isMenuSeparator.js +11 -0
- package/dist/esm/lib/hooks/useContextualMenu/isMenuSeparator.js.map +1 -0
- package/dist/esm/lib/hooks/useContextualMenu/useContextualMenu.js +54 -34
- package/dist/esm/lib/hooks/useContextualMenu/useContextualMenu.js.map +1 -1
- package/dist/esm/lib/hooks/useDisclosure/useDisclosure.js.map +1 -1
- package/dist/esm/lib/hooks/useWindowDimensions/useWindowDimensions.js +1 -1
- package/dist/esm/lib/hooks/useWindowDimensions/useWindowDimensions.js.map +1 -1
- package/dist/esm/lib/hooks/useWindowFitment/useWindowFitment.js +3 -0
- package/dist/esm/lib/hooks/useWindowFitment/useWindowFitment.js.map +1 -1
- package/dist/esm/lib/index.css +79 -0
- package/dist/esm/lib/pattern/Modal/Context.js +10 -0
- package/dist/esm/lib/pattern/Modal/Context.js.map +1 -0
- package/dist/esm/lib/pattern/Modal/Provider.js +103 -0
- package/dist/esm/lib/pattern/Modal/Provider.js.map +1 -0
- package/dist/esm/lib/pattern/Modal/common/Content/Content.js +15 -0
- package/dist/esm/lib/pattern/Modal/common/Content/Content.js.map +1 -0
- package/dist/esm/lib/pattern/Modal/common/Content/index.js +3 -0
- package/dist/esm/lib/pattern/Modal/common/Content/index.js.map +1 -0
- package/dist/esm/lib/pattern/Modal/common/Content/styles.css +37 -0
- package/dist/esm/lib/pattern/Modal/common/Content/types.js +2 -0
- package/dist/esm/lib/pattern/Modal/common/Content/types.js.map +1 -0
- package/dist/esm/lib/pattern/Modal/common/Footer/Footer.js +16 -0
- package/dist/esm/lib/pattern/Modal/common/Footer/Footer.js.map +1 -0
- package/dist/esm/lib/pattern/Modal/common/Footer/index.js +3 -0
- package/dist/esm/lib/pattern/Modal/common/Footer/index.js.map +1 -0
- package/dist/esm/lib/pattern/Modal/common/Footer/styles.css +57 -0
- package/dist/esm/lib/pattern/Modal/common/Footer/types.js +2 -0
- package/dist/esm/lib/pattern/Modal/common/Footer/types.js.map +1 -0
- package/dist/esm/lib/pattern/Modal/common/Header/Header.js +27 -0
- package/dist/esm/lib/pattern/Modal/common/Header/Header.js.map +1 -0
- package/dist/esm/lib/pattern/Modal/common/Header/index.js +3 -0
- package/dist/esm/lib/pattern/Modal/common/Header/index.js.map +1 -0
- package/dist/esm/lib/pattern/Modal/common/Header/styles.css +79 -0
- package/dist/esm/lib/pattern/Modal/common/Header/types.js +2 -0
- package/dist/esm/lib/pattern/Modal/common/Header/types.js.map +1 -0
- package/dist/esm/lib/pattern/Modal/common/index.js +5 -0
- package/dist/esm/lib/pattern/Modal/common/index.js.map +1 -0
- package/dist/esm/lib/pattern/Modal/hooks/useModalContext.js +11 -0
- package/dist/esm/lib/pattern/Modal/hooks/useModalContext.js.map +1 -0
- package/dist/esm/lib/pattern/Modal/hooks/useModalState.js +15 -0
- package/dist/esm/lib/pattern/Modal/hooks/useModalState.js.map +1 -0
- package/dist/esm/lib/pattern/Modal/index.js +4 -0
- package/dist/esm/lib/pattern/Modal/index.js.map +1 -0
- package/dist/esm/lib/pattern/Modal/styles.css +119 -0
- package/dist/esm/lib/pattern/Modal/types.js +2 -0
- package/dist/esm/lib/pattern/Modal/types.js.map +1 -0
- package/dist/esm/lib/pattern/Modal/withModal.js +102 -0
- package/dist/esm/lib/pattern/Modal/withModal.js.map +1 -0
- package/dist/esm/lib/pattern/Timeline/common/Content/styles.css +16 -12
- package/dist/esm/lib/pattern/Timeline/common/Event/styles.css +116 -112
- package/dist/esm/lib/pattern/Timeline/styles.css +16 -12
- package/dist/esm/lib/pattern/index.js +1 -0
- package/dist/esm/lib/pattern/index.js.map +1 -1
- package/dist/esm/lib/subcomponent/Spinner/styles.css +38 -34
- package/dist/types/lib/_work_in_progress/grid/ApplicationLayout/ApplicationLayout.d.ts.map +1 -1
- package/dist/types/lib/_work_in_progress/grid/GridCard/GridCard.d.ts.map +1 -1
- package/dist/types/lib/_work_in_progress/grid/SettingsView/SettingsView.d.ts.map +1 -1
- package/dist/types/lib/component/Badge/types.d.ts +1 -1
- package/dist/types/lib/component/Badge/types.d.ts.map +1 -1
- package/dist/types/lib/component/Breadcrumbs/types.d.ts +2 -2
- package/dist/types/lib/component/Breadcrumbs/types.d.ts.map +1 -1
- package/dist/types/lib/component/Chip/Chip.d.ts +2 -2
- package/dist/types/lib/component/Chip/Chip.d.ts.map +1 -1
- package/dist/types/lib/component/Chip/types.d.ts +10 -8
- package/dist/types/lib/component/Chip/types.d.ts.map +1 -1
- package/dist/types/lib/component/ContextualMenu/ContextualMenu.d.ts +4 -4
- package/dist/types/lib/component/ContextualMenu/ContextualMenu.d.ts.map +1 -1
- package/dist/types/lib/component/ContextualMenu/common/Item/Item.d.ts.map +1 -1
- package/dist/types/lib/component/ContextualMenu/common/MenuContext.d.ts +1 -1
- package/dist/types/lib/component/ContextualMenu/common/MenuContext.d.ts.map +1 -1
- package/dist/types/lib/component/ContextualMenu/common/SubMenu/SubMenu.d.ts +9 -7
- package/dist/types/lib/component/ContextualMenu/common/SubMenu/SubMenu.d.ts.map +1 -1
- package/dist/types/lib/component/ContextualMenu/types.d.ts +14 -6
- package/dist/types/lib/component/ContextualMenu/types.d.ts.map +1 -1
- package/dist/types/lib/component/Tabs/types.d.ts +2 -2
- package/dist/types/lib/component/Tabs/types.d.ts.map +1 -1
- package/dist/types/lib/hooks/useContextualMenu/index.d.ts +1 -0
- package/dist/types/lib/hooks/useContextualMenu/index.d.ts.map +1 -1
- package/dist/types/lib/hooks/useContextualMenu/isMenuSeparator.d.ts +13 -0
- package/dist/types/lib/hooks/useContextualMenu/isMenuSeparator.d.ts.map +1 -0
- package/dist/types/lib/hooks/useContextualMenu/types.d.ts +45 -15
- package/dist/types/lib/hooks/useContextualMenu/types.d.ts.map +1 -1
- package/dist/types/lib/hooks/useContextualMenu/useContextualMenu.d.ts +5 -6
- package/dist/types/lib/hooks/useContextualMenu/useContextualMenu.d.ts.map +1 -1
- package/dist/types/lib/hooks/useDisclosure/types.d.ts +7 -2
- package/dist/types/lib/hooks/useDisclosure/types.d.ts.map +1 -1
- package/dist/types/lib/hooks/useDisclosure/useDisclosure.d.ts +1 -1
- package/dist/types/lib/hooks/useDisclosure/useDisclosure.d.ts.map +1 -1
- package/dist/types/lib/hooks/useWindowFitment/types.d.ts +12 -3
- package/dist/types/lib/hooks/useWindowFitment/types.d.ts.map +1 -1
- package/dist/types/lib/hooks/useWindowFitment/useWindowFitment.d.ts +1 -1
- package/dist/types/lib/hooks/useWindowFitment/useWindowFitment.d.ts.map +1 -1
- package/dist/types/lib/pattern/Modal/Context.d.ts +10 -0
- package/dist/types/lib/pattern/Modal/Context.d.ts.map +1 -0
- package/dist/types/lib/pattern/Modal/Provider.d.ts +63 -0
- package/dist/types/lib/pattern/Modal/Provider.d.ts.map +1 -0
- package/dist/types/lib/pattern/Modal/common/Content/Content.d.ts +17 -0
- package/dist/types/lib/pattern/Modal/common/Content/Content.d.ts.map +1 -0
- package/dist/types/lib/pattern/Modal/common/Content/index.d.ts +3 -0
- package/dist/types/lib/pattern/Modal/common/Content/index.d.ts.map +1 -0
- package/dist/types/lib/pattern/Modal/common/Content/types.d.ts +15 -0
- package/dist/types/lib/pattern/Modal/common/Content/types.d.ts.map +1 -0
- package/dist/types/lib/pattern/Modal/common/Footer/Footer.d.ts +18 -0
- package/dist/types/lib/pattern/Modal/common/Footer/Footer.d.ts.map +1 -0
- package/dist/types/lib/pattern/Modal/common/Footer/index.d.ts +3 -0
- package/dist/types/lib/pattern/Modal/common/Footer/index.d.ts.map +1 -0
- package/dist/types/lib/pattern/Modal/common/Footer/types.d.ts +16 -0
- package/dist/types/lib/pattern/Modal/common/Footer/types.d.ts.map +1 -0
- package/dist/types/lib/pattern/Modal/common/Header/Header.d.ts +24 -0
- package/dist/types/lib/pattern/Modal/common/Header/Header.d.ts.map +1 -0
- package/dist/types/lib/pattern/Modal/common/Header/index.d.ts +3 -0
- package/dist/types/lib/pattern/Modal/common/Header/index.d.ts.map +1 -0
- package/dist/types/lib/pattern/Modal/common/Header/types.d.ts +36 -0
- package/dist/types/lib/pattern/Modal/common/Header/types.d.ts.map +1 -0
- package/dist/types/lib/pattern/Modal/common/index.d.ts +4 -0
- package/dist/types/lib/pattern/Modal/common/index.d.ts.map +1 -0
- package/dist/types/lib/pattern/Modal/hooks/useModalContext.d.ts +4 -0
- package/dist/types/lib/pattern/Modal/hooks/useModalContext.d.ts.map +1 -0
- package/dist/types/lib/pattern/Modal/hooks/useModalState.d.ts +10 -0
- package/dist/types/lib/pattern/Modal/hooks/useModalState.d.ts.map +1 -0
- package/dist/types/lib/pattern/Modal/index.d.ts +4 -0
- package/dist/types/lib/pattern/Modal/index.d.ts.map +1 -0
- package/dist/types/lib/pattern/Modal/types.d.ts +122 -0
- package/dist/types/lib/pattern/Modal/types.d.ts.map +1 -0
- package/dist/types/lib/pattern/Modal/withModal.d.ts +74 -0
- package/dist/types/lib/pattern/Modal/withModal.d.ts.map +1 -0
- package/dist/types/lib/pattern/index.d.ts +1 -0
- package/dist/types/lib/pattern/index.d.ts.map +1 -1
- package/package.json +28 -18
|
@@ -1,71 +1,75 @@
|
|
|
1
|
-
/*
|
|
2
|
-
:root {
|
|
3
|
-
--section-padding-bottom-spacing-shallow: var(--dimension-300);
|
|
4
|
-
--section-padding-bottom-spacing-default: var(--dimension-400);
|
|
5
|
-
--section-padding-bottom-spacing-deep: var(--dimension-800);
|
|
6
|
-
--section-padding-bottom-spacing-hero: var(
|
|
7
|
-
--section-padding-bottom-spacing-default
|
|
8
|
-
);
|
|
9
|
-
--section-padding-top-spacing-default: 0px;
|
|
10
|
-
--section-padding-top-bordered-default: 0px;
|
|
11
|
-
--section-padding-top-bordered-true: calc(
|
|
12
|
-
var(--section-border-start-width-with-padding) -
|
|
13
|
-
var(--section-border-start-width)
|
|
14
|
-
);
|
|
15
|
-
--section-padding-top-spacing-shallow: 0px;
|
|
16
|
-
--section-padding-top-spacing-deep: 0px;
|
|
17
|
-
--section-padding-top-spacing-hero: var(--dimension-200);
|
|
18
|
-
--section-border-start-color: var(--color-border-muted);
|
|
19
|
-
--section-border-start-style: solid;
|
|
20
|
-
--section-border-start-width: var(--rule-height);
|
|
21
|
-
--section-border-start-width-with-padding: var(--dimension-100);
|
|
22
|
-
}
|
|
1
|
+
/* Layer: ds.components.global (@canonical/styles README, "Cascade layers"). */
|
|
23
2
|
|
|
24
|
-
|
|
25
|
-
|
|
3
|
+
@layer ds.components.global {
|
|
4
|
+
/* Component tokens — sourced from @canonical/design-tokens */
|
|
5
|
+
:root {
|
|
6
|
+
--section-padding-bottom-spacing-shallow: var(--dimension-300);
|
|
7
|
+
--section-padding-bottom-spacing-default: var(--dimension-400);
|
|
8
|
+
--section-padding-bottom-spacing-deep: var(--dimension-800);
|
|
9
|
+
--section-padding-bottom-spacing-hero: var(
|
|
10
|
+
--section-padding-bottom-spacing-default
|
|
11
|
+
);
|
|
12
|
+
--section-padding-top-spacing-default: 0px;
|
|
13
|
+
--section-padding-top-bordered-default: 0px;
|
|
14
|
+
--section-padding-top-bordered-true: calc(
|
|
15
|
+
var(--section-border-start-width-with-padding) -
|
|
16
|
+
var(--section-border-start-width)
|
|
17
|
+
);
|
|
18
|
+
--section-padding-top-spacing-shallow: 0px;
|
|
19
|
+
--section-padding-top-spacing-deep: 0px;
|
|
20
|
+
--section-padding-top-spacing-hero: var(--dimension-200);
|
|
21
|
+
--section-border-start-color: var(--color-border-muted);
|
|
22
|
+
--section-border-start-style: solid;
|
|
23
|
+
--section-border-start-width: var(--rule-height);
|
|
24
|
+
--section-border-start-width-with-padding: var(--dimension-100);
|
|
25
|
+
}
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
We namespace each padding type, then add them together in the final padding-top declaration.
|
|
30
|
-
*/
|
|
31
|
-
--section-padding-top-spacing: var(--section-padding-top-spacing-default);
|
|
32
|
-
--section-padding-top-bordered: var(--section-padding-top-bordered-default);
|
|
27
|
+
.ds.section {
|
|
28
|
+
--section-padding-bottom: var(--section-padding-bottom-spacing-default);
|
|
33
29
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
30
|
+
/*
|
|
31
|
+
Section top padding is the sum of padding applied by two props - `spacing` and `bordered`.
|
|
32
|
+
We namespace each padding type, then add them together in the final padding-top declaration.
|
|
33
|
+
*/
|
|
34
|
+
--section-padding-top-spacing: var(--section-padding-top-spacing-default);
|
|
35
|
+
--section-padding-top-bordered: var(--section-padding-top-bordered-default);
|
|
41
36
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
--section-padding-top-spacing: var(--section-padding-top-spacing-shallow);
|
|
50
|
-
}
|
|
37
|
+
&.bordered {
|
|
38
|
+
/* Top padding subtracts border height */
|
|
39
|
+
--section-padding-top-bordered: var(--section-padding-top-bordered-true);
|
|
40
|
+
border-top-color: var(--section-border-start-color);
|
|
41
|
+
border-top-style: var(--section-border-start-style);
|
|
42
|
+
border-top-width: var(--section-border-start-width);
|
|
43
|
+
}
|
|
51
44
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
45
|
+
/*
|
|
46
|
+
Spacing variants
|
|
47
|
+
Note that top padding is only defined for the hero variant in our core setup.
|
|
48
|
+
The top padding is still bound here in case users customize their tokens.
|
|
49
|
+
*/
|
|
50
|
+
&.shallow {
|
|
51
|
+
--section-padding-bottom: var(--section-padding-bottom-spacing-shallow);
|
|
52
|
+
--section-padding-top-spacing: var(--section-padding-top-spacing-shallow);
|
|
53
|
+
}
|
|
57
54
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
55
|
+
&.deep {
|
|
56
|
+
--section-padding-bottom: var(--section-padding-bottom-spacing-deep);
|
|
57
|
+
--section-padding-top-spacing: var(--section-padding-top-spacing-deep);
|
|
58
|
+
/* TODO add responsiveness https://github.com/canonical/vanilla-framework/blob/6af35433368f82d76d8deb7effebca47b434ee76/scss/_patterns_section.scss#L16-L18 */
|
|
59
|
+
}
|
|
61
60
|
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
&.hero {
|
|
62
|
+
--section-padding-bottom: var(--section-padding-bottom-spacing-hero);
|
|
63
|
+
--section-padding-top-spacing: var(--section-padding-top-spacing-hero);
|
|
64
64
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
var(--section-padding-
|
|
69
|
-
|
|
70
|
-
|
|
65
|
+
/* TODO add responsiveness https://github.com/canonical/vanilla-framework/blob/6af35433368f82d76d8deb7effebca47b434ee76/scss/_patterns_section.scss#L32-L34 */
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
padding-bottom: var(--section-padding-bottom);
|
|
69
|
+
/* Padding-top is applied by both the `spacing` prop and the `bordered` props */
|
|
70
|
+
padding-top: calc(
|
|
71
|
+
var(--section-padding-top-spacing) +
|
|
72
|
+
var(--section-padding-top-bordered)
|
|
73
|
+
);
|
|
74
|
+
}
|
|
71
75
|
}
|
|
@@ -1,37 +1,40 @@
|
|
|
1
|
-
/* Component tokens - sourced from @canonical/design-tokens
|
|
1
|
+
/* Component tokens - sourced from @canonical/design-tokens
|
|
2
|
+
* Layer: ds.components.global (@canonical/styles README, "Cascade layers"). */
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
4
|
+
@layer ds.components.global {
|
|
5
|
+
:root {
|
|
6
|
+
--skip-link-background: var(--color-background-layer2);
|
|
7
|
+
--skip-link-color: var(--color-text-link);
|
|
8
|
+
--skip-link-inset-inline-start: -999px;
|
|
9
|
+
--skip-link-top: -999px;
|
|
10
|
+
--skip-link-outline-offset: calc(
|
|
11
|
+
-1 *
|
|
12
|
+
var(--dimension-stroke-thickness-large)
|
|
13
|
+
);
|
|
14
|
+
--skip-link-focus-inset-inline-start: var(--space-100);
|
|
15
|
+
--skip-link-focus-padding-block: var(--space-200);
|
|
16
|
+
--skip-link-focus-padding-inline: var(--space-200);
|
|
17
|
+
--skip-link-focus-top: var(--space-100);
|
|
18
|
+
--skip-link-focus-z-index: 999999;
|
|
19
|
+
}
|
|
18
20
|
|
|
19
|
-
.ds.skip-link {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
.ds.skip-link {
|
|
22
|
+
background: var(--skip-link-background);
|
|
23
|
+
color: var(--skip-link-color);
|
|
24
|
+
display: block;
|
|
25
|
+
inset-inline-start: var(--skip-link-inset-inline-start);
|
|
26
|
+
position: absolute;
|
|
27
|
+
top: var(--skip-link-top);
|
|
26
28
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
29
|
+
&:focus,
|
|
30
|
+
&:focus-visible {
|
|
31
|
+
inset-inline-start: var(--skip-link-focus-inset-inline-start);
|
|
32
|
+
outline-offset: var(--skip-link-outline-offset);
|
|
33
|
+
padding-block: var(--skip-link-focus-padding-block);
|
|
34
|
+
padding-inline: var(--skip-link-focus-padding-inline);
|
|
35
|
+
position: fixed;
|
|
36
|
+
top: var(--skip-link-focus-top);
|
|
37
|
+
z-index: var(--skip-link-focus-z-index);
|
|
38
|
+
}
|
|
36
39
|
}
|
|
37
40
|
}
|
|
@@ -1,27 +1,31 @@
|
|
|
1
|
-
/*
|
|
2
|
-
/* Generated by @canonical/summon:component-react v0.1.0 */
|
|
1
|
+
/* Layer: ds.components.global (@canonical/styles README, "Cascade layers"). */
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
3
|
+
@layer ds.components.global {
|
|
4
|
+
/* Generated by component/react v0.1.0 */
|
|
5
|
+
/* Generated by @canonical/summon:component-react v0.1.0 */
|
|
6
|
+
|
|
7
|
+
.ds.section {
|
|
8
|
+
h2 {
|
|
9
|
+
padding-top: var(--space-100);
|
|
10
|
+
font-size: var(--typography-heading-h2-font-size, 2rem);
|
|
11
|
+
margin-bottom: var(--space-200);
|
|
12
|
+
/* Heading styles */
|
|
13
|
+
}
|
|
14
|
+
> .title {
|
|
15
|
+
background: #fefedd;
|
|
16
|
+
max-width: initial;
|
|
17
|
+
border: 1px solid green;
|
|
18
|
+
}
|
|
19
|
+
.payload {
|
|
20
|
+
grid-column: 1 / -1;
|
|
21
|
+
border: 1px solid green;
|
|
22
|
+
}
|
|
17
23
|
grid-column: 1 / -1;
|
|
18
|
-
border: 1px solid green;
|
|
19
|
-
}
|
|
20
|
-
grid-column: 1 / -1;
|
|
21
24
|
|
|
22
|
-
|
|
23
|
-
|
|
25
|
+
display: grid;
|
|
26
|
+
grid-template-columns: subgrid;
|
|
24
27
|
|
|
25
|
-
|
|
26
|
-
|
|
28
|
+
background: #dedede;
|
|
29
|
+
/* Component styles */
|
|
30
|
+
}
|
|
27
31
|
}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import "./styles.css";
|
|
3
3
|
import { InnerGridDemo } from "../InnerGridDemo/index.js";
|
|
4
|
+
// Pragma territory is the subtree under an element carrying `ds`, so every
|
|
5
|
+
// component root declares it (cs:css.selectors.namespace).
|
|
6
|
+
const componentCssClassName = "ds application-layout";
|
|
4
7
|
/**
|
|
5
8
|
* ApplicationLayout component
|
|
6
9
|
*/
|
|
7
10
|
export const ApplicationLayout = ({ className, children, ...props }) => {
|
|
8
|
-
return (_jsxs("div", { className:
|
|
11
|
+
return (_jsxs("div", { className: [componentCssClassName, className].filter(Boolean).join(" "), ...props, children: [_jsx("aside", { className: "sidebar", children: "Sidebar content" }), _jsx(InnerGridDemo, { className: "content", children: children }), _jsx("aside", { className: "pane", children: "pane" })] }));
|
|
9
12
|
};
|
|
10
13
|
//# sourceMappingURL=ApplicationLayout.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApplicationLayout.js","sourceRoot":"","sources":["../../../../../../src/lib/_work_in_progress/grid/ApplicationLayout/ApplicationLayout.tsx"],"names":[],"mappings":";AAKA,OAAO,cAAc,CAAC;AACtB,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1D;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,EAChC,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACe,EAAmB,EAAE;IAC5C,OAAO,CACL,eACE,SAAS,EAAE,qBAAqB,SAAS,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"ApplicationLayout.js","sourceRoot":"","sources":["../../../../../../src/lib/_work_in_progress/grid/ApplicationLayout/ApplicationLayout.tsx"],"names":[],"mappings":";AAKA,OAAO,cAAc,CAAC;AACtB,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1D,2EAA2E;AAC3E,2DAA2D;AAC3D,MAAM,qBAAqB,GAAG,uBAAuB,CAAC;AAEtD;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,EAChC,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACe,EAAmB,EAAE;IAC5C,OAAO,CACL,eACE,SAAS,EAAE,CAAC,qBAAqB,EAAE,SAAS,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,KACnE,KAAK,aAET,gBAAO,SAAS,EAAC,SAAS,gCAAwB,EAClD,KAAC,aAAa,IAAC,SAAS,EAAC,SAAS,YAAE,QAAQ,GAAiB,EAC7D,gBAAO,SAAS,EAAC,MAAM,qBAAa,IAChC,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,20 +1,24 @@
|
|
|
1
|
-
/*
|
|
2
|
-
/* Generated by @canonical/summon:component-react v0.1.0 */
|
|
1
|
+
/* Layer: ds.components.global (@canonical/styles README, "Cascade layers"). */
|
|
3
2
|
|
|
4
|
-
.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
3
|
+
@layer ds.components.global {
|
|
4
|
+
/* Generated by component/react v0.1.0 */
|
|
5
|
+
/* Generated by @canonical/summon:component-react v0.1.0 */
|
|
6
|
+
|
|
7
|
+
.application-layout {
|
|
8
|
+
display: grid;
|
|
9
|
+
height: 100%;
|
|
10
|
+
gap: var(--container-gap-default);
|
|
11
|
+
grid-template-columns: min-content 1fr min-content;
|
|
12
|
+
grid-template-rows: auto;
|
|
13
|
+
& > .sidebar {
|
|
14
|
+
background: black;
|
|
15
|
+
}
|
|
16
|
+
& > .content {
|
|
17
|
+
grid-column: 2 / -2;
|
|
18
|
+
}
|
|
19
|
+
& > .pane {
|
|
20
|
+
background: lightgray;
|
|
21
|
+
}
|
|
22
|
+
/* Component styles */
|
|
18
23
|
}
|
|
19
|
-
/* Component styles */
|
|
20
24
|
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import "./styles.css";
|
|
3
|
+
// Pragma territory is the subtree under an element carrying `ds`, so every
|
|
4
|
+
// component root declares it (cs:css.selectors.namespace).
|
|
5
|
+
const componentCssClassName = "ds grid-card";
|
|
3
6
|
/**
|
|
4
7
|
* GridCard component
|
|
5
8
|
*/
|
|
6
9
|
export const GridCard = ({ className, children, ...props }) => {
|
|
7
|
-
return (_jsx("div", { className:
|
|
10
|
+
return (_jsx("div", { className: [componentCssClassName, className].filter(Boolean).join(" "), ...props, children: "Represents a card within the grid" }));
|
|
8
11
|
};
|
|
9
12
|
//# sourceMappingURL=GridCard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GridCard.js","sourceRoot":"","sources":["../../../../../../src/lib/_work_in_progress/grid/GridCard/GridCard.tsx"],"names":[],"mappings":";AAKA,OAAO,cAAc,CAAC;AAEtB;;GAEG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,EACvB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACM,EAAmB,EAAE;IACnC,OAAO,CACL,
|
|
1
|
+
{"version":3,"file":"GridCard.js","sourceRoot":"","sources":["../../../../../../src/lib/_work_in_progress/grid/GridCard/GridCard.tsx"],"names":[],"mappings":";AAKA,OAAO,cAAc,CAAC;AAEtB,2EAA2E;AAC3E,2DAA2D;AAC3D,MAAM,qBAAqB,GAAG,cAAc,CAAC;AAE7C;;GAEG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,EACvB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACM,EAAmB,EAAE;IACnC,OAAO,CACL,cACE,SAAS,EAAE,CAAC,qBAAqB,EAAE,SAAS,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,KACnE,KAAK,kDAGL,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
/*
|
|
2
|
-
/* Generated by @canonical/summon:component-react v0.1.0 */
|
|
1
|
+
/* Layer: ds.components.global (@canonical/styles README, "Cascade layers"). */
|
|
3
2
|
|
|
4
|
-
.
|
|
5
|
-
/*
|
|
3
|
+
@layer ds.components.global {
|
|
4
|
+
/* Generated by component/react v0.1.0 */
|
|
5
|
+
/* Generated by @canonical/summon:component-react v0.1.0 */
|
|
6
|
+
|
|
7
|
+
.grid-card {
|
|
8
|
+
/* Component styles */
|
|
9
|
+
}
|
|
6
10
|
}
|
|
@@ -1,40 +1,45 @@
|
|
|
1
|
-
/*
|
|
2
|
-
/* Generated by @canonical/summon:component-react v0.1.0 */
|
|
1
|
+
/* Layer: ds.components.global (@canonical/styles README, "Cascade layers"). */
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
auto-fit,
|
|
8
|
-
minmax(100px, 1fr) minmax(100px, 1fr) minmax(100px, 1fr) minmax(100px, 1fr)
|
|
9
|
-
);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
html,
|
|
13
|
-
body,
|
|
14
|
-
#storybook-root {
|
|
15
|
-
height: 100%;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.grid-demo {
|
|
19
|
-
display: grid;
|
|
20
|
-
gap: var(--container-gap-default);
|
|
21
|
-
grid-template-columns: var(--fluid-grid-template);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.grid-fixed {
|
|
25
|
-
display: grid;
|
|
26
|
-
grid-template-columns: var(--fixed-grid-template);
|
|
27
|
-
}
|
|
3
|
+
@layer ds.components.global {
|
|
4
|
+
/* Generated by component/react v0.1.0 */
|
|
5
|
+
/* Generated by @canonical/summon:component-react v0.1.0 */
|
|
28
6
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
auto-
|
|
7
|
+
:root {
|
|
8
|
+
--fixed-grid-template: repeat(8, 1fr);
|
|
9
|
+
--fluid-grid-template: repeat(
|
|
10
|
+
auto-fit,
|
|
33
11
|
minmax(100px, 1fr) minmax(100px, 1fr) minmax(100px, 1fr)
|
|
34
12
|
minmax(100px, 1fr)
|
|
35
13
|
);
|
|
36
|
-
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
html,
|
|
17
|
+
body,
|
|
18
|
+
#storybook-root {
|
|
19
|
+
height: 100%;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.grid-demo {
|
|
23
|
+
display: grid;
|
|
24
|
+
gap: var(--container-gap-default);
|
|
25
|
+
grid-template-columns: var(--fluid-grid-template);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.grid-fixed {
|
|
29
|
+
display: grid;
|
|
30
|
+
grid-template-columns: var(--fixed-grid-template);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.grid-fluid {
|
|
34
|
+
display: grid;
|
|
35
|
+
grid-template-columns: repeat(
|
|
36
|
+
auto-fill,
|
|
37
|
+
minmax(100px, 1fr) minmax(100px, 1fr) minmax(100px, 1fr)
|
|
38
|
+
minmax(100px, 1fr)
|
|
39
|
+
);
|
|
40
|
+
}
|
|
37
41
|
|
|
38
|
-
.grid-card {
|
|
39
|
-
|
|
42
|
+
.grid-card {
|
|
43
|
+
background: lightgray;
|
|
44
|
+
}
|
|
40
45
|
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import "./styles.css";
|
|
3
|
+
// Pragma territory is the subtree under an element carrying `ds`, so every
|
|
4
|
+
// component root declares it (cs:css.selectors.namespace).
|
|
5
|
+
const componentCssClassName = "ds settings-view";
|
|
3
6
|
/**
|
|
4
7
|
* SettingsView component
|
|
5
8
|
*/
|
|
6
9
|
export const SettingsView = ({ className, children, title, ...props }) => {
|
|
7
|
-
return (_jsxs("div", { className:
|
|
10
|
+
return (_jsxs("div", { className: [componentCssClassName, className].filter(Boolean).join(" "), ...props, children: [_jsx("h2", { children: title }), _jsxs("div", { className: "content", children: [children, _jsxs("div", { className: "setting", children: [_jsx("label", { htmlFor: "setting1", children: "Setting 1.0" }), _jsx("input", { type: "text", name: "setting1" })] }), _jsxs("div", { className: "setting", children: [_jsx("label", { htmlFor: "setting1", children: "Setting 1.0" }), _jsx("input", { type: "text", name: "setting1" })] })] })] }));
|
|
8
11
|
};
|
|
9
12
|
//# sourceMappingURL=SettingsView.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SettingsView.js","sourceRoot":"","sources":["../../../../../../src/lib/_work_in_progress/grid/SettingsView/SettingsView.tsx"],"names":[],"mappings":";AAKA,OAAO,cAAc,CAAC;AAEtB;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAC3B,SAAS,EACT,QAAQ,EACR,KAAK,EACL,GAAG,KAAK,EACU,EAAmB,EAAE;IACvC,OAAO,CACL,eACE,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"SettingsView.js","sourceRoot":"","sources":["../../../../../../src/lib/_work_in_progress/grid/SettingsView/SettingsView.tsx"],"names":[],"mappings":";AAKA,OAAO,cAAc,CAAC;AAEtB,2EAA2E;AAC3E,2DAA2D;AAC3D,MAAM,qBAAqB,GAAG,kBAAkB,CAAC;AAEjD;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAC3B,SAAS,EACT,QAAQ,EACR,KAAK,EACL,GAAG,KAAK,EACU,EAAmB,EAAE;IACvC,OAAO,CACL,eACE,SAAS,EAAE,CAAC,qBAAqB,EAAE,SAAS,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,KACnE,KAAK,aAET,uBAAK,KAAK,GAAM,EAChB,eAAK,SAAS,EAAC,SAAS,aACrB,QAAQ,EACT,eAAK,SAAS,EAAC,SAAS,aACtB,gBAAO,OAAO,EAAC,UAAU,4BAAoB,EAC7C,gBAAO,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,UAAU,GAAG,IACjC,EACN,eAAK,SAAS,EAAC,SAAS,aACtB,gBAAO,OAAO,EAAC,UAAU,4BAAoB,EAC7C,gBAAO,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,UAAU,GAAG,IACjC,IACF,IACF,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,32 +1,36 @@
|
|
|
1
|
-
/*
|
|
2
|
-
/* Generated by @canonical/summon:component-react v0.1.0 */
|
|
1
|
+
/* Layer: ds.components.global (@canonical/styles README, "Cascade layers"). */
|
|
3
2
|
|
|
4
|
-
.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
display: grid;
|
|
8
|
-
gap: var(--container-gap-default);
|
|
9
|
-
grid-template-columns: subgrid;
|
|
3
|
+
@layer ds.components.global {
|
|
4
|
+
/* Generated by component/react v0.1.0 */
|
|
5
|
+
/* Generated by @canonical/summon:component-react v0.1.0 */
|
|
10
6
|
|
|
11
|
-
|
|
12
|
-
grid-column:
|
|
7
|
+
.settings-view {
|
|
8
|
+
grid-column: 1 / -1;
|
|
9
|
+
background: #dedecc;
|
|
13
10
|
display: grid;
|
|
14
11
|
gap: var(--container-gap-default);
|
|
15
12
|
grid-template-columns: subgrid;
|
|
16
13
|
|
|
17
|
-
>
|
|
18
|
-
|
|
19
|
-
grid-column: 1 / -1;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.setting {
|
|
14
|
+
& > .content {
|
|
15
|
+
grid-column: 2 / -1;
|
|
23
16
|
display: grid;
|
|
17
|
+
gap: var(--container-gap-default);
|
|
24
18
|
grid-template-columns: subgrid;
|
|
25
19
|
|
|
26
|
-
|
|
27
|
-
|
|
20
|
+
> p,
|
|
21
|
+
.setting {
|
|
22
|
+
grid-column: 1 / -1;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.setting {
|
|
26
|
+
display: grid;
|
|
27
|
+
grid-template-columns: subgrid;
|
|
28
|
+
|
|
29
|
+
& > input {
|
|
30
|
+
grid-column-end: span 2;
|
|
31
|
+
}
|
|
28
32
|
}
|
|
29
33
|
}
|
|
34
|
+
/* Component styles */
|
|
30
35
|
}
|
|
31
|
-
/* Component styles */
|
|
32
36
|
}
|