@tcn/ui 0.8.0 → 0.9.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/dist/{Color-6BZIO3FS-CWWwv-fq.js → Color-6BZIO3FS-C9xkPWgz.js} +2 -2
- package/dist/{Color-6BZIO3FS-CWWwv-fq.js.map → Color-6BZIO3FS-C9xkPWgz.js.map} +1 -1
- package/dist/{WithTooltip-65CFNBJE-DvcUZizH.js → WithTooltip-65CFNBJE-DEnh547F.js} +2 -2
- package/dist/{WithTooltip-65CFNBJE-DvcUZizH.js.map → WithTooltip-65CFNBJE-DEnh547F.js.map} +1 -1
- package/dist/actions/__docs__/components/showcase.js +1 -1
- package/dist/actions/index.d.ts +1 -0
- package/dist/actions/index.d.ts.map +1 -1
- package/dist/actions/index.js +8 -6
- package/dist/actions/index.js.map +1 -1
- package/dist/body.css +1 -0
- package/dist/feedback/progress/progress_bar.js +13 -13
- package/dist/form/field/common/field_description.js +7 -8
- package/dist/form/field/common/field_description.js.map +1 -1
- package/dist/form/field/common/field_error.js +6 -6
- package/dist/form/field/common/field_label.js +7 -8
- package/dist/form/field/common/field_label.js.map +1 -1
- package/dist/form/field_set/field_set.js +7 -7
- package/dist/formatter-EIJCOSYU-DWmgEY3b.js +6 -0
- package/dist/{formatter-EIJCOSYU-D6nmx63h.js.map → formatter-EIJCOSYU-DWmgEY3b.js.map} +1 -1
- package/dist/inputs/color_input/color_input.js +10 -9
- package/dist/inputs/color_input/color_input.js.map +1 -1
- package/dist/inputs/date_picker/date_picker_date.js +6 -6
- package/dist/inputs/date_picker/date_picker_day.js +6 -6
- package/dist/inputs/date_picker/date_picker_header.js +7 -6
- package/dist/inputs/date_picker/date_picker_header.js.map +1 -1
- package/dist/inputs/date_picker/date_picker_input.js +3 -2
- package/dist/inputs/date_picker/date_picker_input.js.map +1 -1
- package/dist/inputs/date_picker/date_picker_time_selector.js +8 -7
- package/dist/inputs/date_picker/date_picker_time_selector.js.map +1 -1
- package/dist/inputs/date_picker/date_picker_year_input.js +6 -5
- package/dist/inputs/date_picker/date_picker_year_input.js.map +1 -1
- package/dist/inputs/date_picker/date_picker_year_selector.js +8 -7
- package/dist/inputs/date_picker/date_picker_year_selector.js.map +1 -1
- package/dist/inputs/multiselect/multiselect_inline_values.js +8 -7
- package/dist/inputs/multiselect/multiselect_inline_values.js.map +1 -1
- package/dist/inputs/multiselect/multiselect_values.js +3 -2
- package/dist/inputs/multiselect/multiselect_values.js.map +1 -1
- package/dist/inputs/phone_number_input/phone_number_input.js +44 -43
- package/dist/inputs/phone_number_input/phone_number_input.js.map +1 -1
- package/dist/inputs/select/select.js +3 -2
- package/dist/inputs/select/select.js.map +1 -1
- package/dist/inputs/suggestions/suggestion_list.js +9 -8
- package/dist/inputs/suggestions/suggestion_list.js.map +1 -1
- package/dist/layouts/body/body.d.ts +6 -0
- package/dist/layouts/body/body.d.ts.map +1 -0
- package/dist/layouts/body/body.js +21 -0
- package/dist/layouts/body/body.js.map +1 -0
- package/dist/layouts/index.d.ts +7 -0
- package/dist/layouts/index.d.ts.map +1 -1
- package/dist/layouts/index.js +42 -22
- package/dist/layouts/index.js.map +1 -1
- package/dist/layouts/rail/main/main.d.ts +6 -0
- package/dist/layouts/rail/main/main.d.ts.map +1 -0
- package/dist/layouts/rail/main/main.js +21 -0
- package/dist/layouts/rail/main/main.js.map +1 -0
- package/dist/layouts/rail/rail.d.ts +9 -0
- package/dist/layouts/rail/rail.d.ts.map +1 -0
- package/dist/layouts/rail/rail.js +55 -0
- package/dist/layouts/rail/rail.js.map +1 -0
- package/dist/layouts/rail/side/side.d.ts +6 -0
- package/dist/layouts/rail/side/side.d.ts.map +1 -0
- package/dist/layouts/rail/side/side.js +21 -0
- package/dist/layouts/rail/side/side.js.map +1 -0
- package/dist/layouts/rail/utility_strip/utility_strip.d.ts +9 -0
- package/dist/layouts/rail/utility_strip/utility_strip.d.ts.map +1 -0
- package/dist/layouts/rail/utility_strip/utility_strip.js +32 -0
- package/dist/layouts/rail/utility_strip/utility_strip.js.map +1 -0
- package/dist/layouts/responsive/breakpoint.d.ts +11 -0
- package/dist/layouts/responsive/breakpoint.d.ts.map +1 -0
- package/dist/layouts/responsive/breakpoint.js +15 -0
- package/dist/layouts/responsive/breakpoint.js.map +1 -0
- package/dist/layouts/responsive/responsive.d.ts +7 -0
- package/dist/layouts/responsive/responsive.d.ts.map +1 -0
- package/dist/layouts/responsive/responsive.js +11 -0
- package/dist/layouts/responsive/responsive.js.map +1 -0
- package/dist/layouts/responsive/responsive_container.d.ts +7 -0
- package/dist/layouts/responsive/responsive_container.d.ts.map +1 -0
- package/dist/layouts/responsive/responsive_container.js +30 -0
- package/dist/layouts/responsive/responsive_container.js.map +1 -0
- package/dist/layouts/responsive/responsive_viewport.d.ts +7 -0
- package/dist/layouts/responsive/responsive_viewport.d.ts.map +1 -0
- package/dist/layouts/responsive/responsive_viewport.js +12 -0
- package/dist/layouts/responsive/responsive_viewport.js.map +1 -0
- package/dist/layouts/scaffold/scaffold.js +31 -31
- package/dist/layouts/scaffold/scaffold.js.map +1 -1
- package/dist/layouts/table/table.d.ts +27 -0
- package/dist/layouts/table/table.d.ts.map +1 -0
- package/dist/layouts/table/table.js +70 -0
- package/dist/layouts/table/table.js.map +1 -0
- package/dist/main.css +1 -0
- package/dist/rail.css +1 -0
- package/dist/scaffold.css +1 -1
- package/dist/{showcase-DK557szS.js → showcase-y9D3_Y8T.js} +3413 -3396
- package/dist/showcase-y9D3_Y8T.js.map +1 -0
- package/dist/side.css +1 -0
- package/dist/stacks/box/box.d.ts +2 -2
- package/dist/stacks/box/box.d.ts.map +1 -1
- package/dist/stacks/box/box.js.map +1 -1
- package/dist/stacks/story_components/style_box.d.ts +1 -1
- package/dist/stacks/story_components/style_box.d.ts.map +1 -1
- package/dist/surfaces/alert/alert.js +3 -2
- package/dist/surfaces/alert/alert.js.map +1 -1
- package/dist/surfaces/confirm/confirm.js +5 -5
- package/dist/surfaces/pop_confirm/pop_confirm.js +14 -2
- package/dist/surfaces/pop_confirm/pop_confirm.js.map +1 -1
- package/dist/{syntaxhighlighter-ED5Y7EFY-DaMS-2cF.js → syntaxhighlighter-ED5Y7EFY-CqInEOwQ.js} +2 -2
- package/dist/{syntaxhighlighter-ED5Y7EFY-DaMS-2cF.js.map → syntaxhighlighter-ED5Y7EFY-CqInEOwQ.js.map} +1 -1
- package/dist/table.css +1 -0
- package/dist/table.module-BtSxOntS.js +5 -0
- package/dist/table.module-BtSxOntS.js.map +1 -0
- package/dist/themes/themes/ergo/ergo_theme.css +1 -1
- package/dist/themes/themes/ergo/ergo_theme.js +174 -43
- package/dist/themes/themes/ergo/ergo_theme.js.map +1 -1
- package/dist/typography/body_text/body_text.d.ts +2 -1
- package/dist/typography/body_text/body_text.d.ts.map +1 -1
- package/dist/typography/body_text/body_text.js +24 -23
- package/dist/typography/body_text/body_text.js.map +1 -1
- package/dist/typography/callout/callout.d.ts +2 -1
- package/dist/typography/callout/callout.d.ts.map +1 -1
- package/dist/typography/callout/callout.js +28 -27
- package/dist/typography/callout/callout.js.map +1 -1
- package/dist/typography/caption/caption.d.ts +2 -1
- package/dist/typography/caption/caption.d.ts.map +1 -1
- package/dist/typography/caption/caption.js +18 -17
- package/dist/typography/caption/caption.js.map +1 -1
- package/dist/typography/footnote/footnote.d.ts +2 -1
- package/dist/typography/footnote/footnote.d.ts.map +1 -1
- package/dist/typography/footnote/footnote.js +25 -24
- package/dist/typography/footnote/footnote.js.map +1 -1
- package/dist/typography/headline/headline.d.ts +2 -1
- package/dist/typography/headline/headline.d.ts.map +1 -1
- package/dist/typography/headline/headline.js +36 -33
- package/dist/typography/headline/headline.js.map +1 -1
- package/dist/typography/subheadline/subheadline.d.ts +2 -1
- package/dist/typography/subheadline/subheadline.d.ts.map +1 -1
- package/dist/typography/subheadline/subheadline.js +35 -32
- package/dist/typography/subheadline/subheadline.js.map +1 -1
- package/dist/utility_strip.css +1 -0
- package/dist/utils/dnd/context.d.ts.map +1 -1
- package/dist/utils/dnd/context.js +9 -7
- package/dist/utils/dnd/context.js.map +1 -1
- package/dist/utils/dnd/hooks/use_drag_container.d.ts.map +1 -1
- package/dist/utils/dnd/hooks/use_drag_container.js +29 -15
- package/dist/utils/dnd/hooks/use_drag_container.js.map +1 -1
- package/dist/utils/dnd/types.d.ts +3 -4
- package/dist/utils/dnd/types.d.ts.map +1 -1
- package/dist/utils/hooks/use_media_query.d.ts +5 -8
- package/dist/utils/hooks/use_media_query.d.ts.map +1 -1
- package/dist/utils/hooks/use_media_query.js +10 -11
- package/dist/utils/hooks/use_media_query.js.map +1 -1
- package/dist/utils/index.d.ts +1 -2
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +19 -21
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
- package/src/actions/index.ts +1 -0
- package/src/layouts/__stories__/composed.stories.tsx +113 -0
- package/src/layouts/__stories__/composed_stories.module.css +142 -0
- package/src/layouts/__stories__/utils.tsx +174 -0
- package/src/layouts/body/body.module.css +11 -0
- package/src/layouts/body/body.tsx +23 -0
- package/src/layouts/index.ts +12 -0
- package/src/layouts/rail/__stories__/rail.stories.tsx +64 -0
- package/src/layouts/rail/__stories__/rail_stories.module.css +25 -0
- package/src/layouts/rail/main/main.module.css +7 -0
- package/src/layouts/rail/main/main.tsx +26 -0
- package/src/layouts/rail/rail.module.css +10 -0
- package/src/layouts/rail/rail.tsx +62 -0
- package/src/layouts/rail/side/side.module.css +8 -0
- package/src/layouts/rail/side/side.tsx +25 -0
- package/src/layouts/rail/utility_strip/utility_strip.module.css +6 -0
- package/src/layouts/rail/utility_strip/utility_strip.tsx +40 -0
- package/src/layouts/responsive/breakpoint.tsx +29 -0
- package/src/layouts/responsive/responsive.stories.tsx +37 -0
- package/src/layouts/responsive/responsive.tsx +18 -0
- package/src/layouts/responsive/responsive_container.tsx +51 -0
- package/src/layouts/responsive/responsive_viewport.tsx +17 -0
- package/src/layouts/scaffold/__stories__/scaffold.stories.tsx +53 -0
- package/src/layouts/scaffold/__stories__/scaffold_stories.module.css +31 -0
- package/src/layouts/scaffold/scaffold.module.css +4 -0
- package/src/layouts/table/__stories__/mock_data.ts +420 -0
- package/src/layouts/table/__stories__/table.stories.tsx +326 -0
- package/src/layouts/table/__stories__/table_stories.module.css +30 -0
- package/src/layouts/table/table.module.css +37 -0
- package/src/layouts/table/table.tsx +132 -0
- package/src/stacks/box/box.tsx +1 -1
- package/src/surfaces/modal/__stories__/modal.stories.tsx +5 -5
- package/src/surfaces/panel/__stories__/panel.stories.tsx +114 -1
- package/src/surfaces/pop_confirm/pop_confirm.stories.tsx +4 -2
- package/src/themes/themes/ergo/ergo_theme.css +173 -42
- package/src/typography/body_text/body_text.tsx +21 -17
- package/src/typography/callout/callout.tsx +20 -16
- package/src/typography/caption/caption.tsx +20 -16
- package/src/typography/footnote/footnote.tsx +20 -16
- package/src/typography/headline/headline.tsx +60 -54
- package/src/typography/subheadline/subheadline.tsx +60 -54
- package/src/utils/dnd/__stories__/draggable.stories.tsx +34 -0
- package/src/utils/dnd/context.ts +1 -0
- package/src/utils/dnd/hooks/use_drag_container.ts +18 -1
- package/src/utils/dnd/types.ts +4 -1
- package/src/utils/hooks/use_media_query.ts +16 -27
- package/src/utils/index.ts +1 -3
- package/dist/body_text.module-h4XQE2pC.js +0 -5
- package/dist/body_text.module-h4XQE2pC.js.map +0 -1
- package/dist/callout.module-D8ECmxpO.js +0 -5
- package/dist/callout.module-D8ECmxpO.js.map +0 -1
- package/dist/caption.module-DDq0H4xZ.js +0 -5
- package/dist/caption.module-DDq0H4xZ.js.map +0 -1
- package/dist/footnote.module-DEyFuqOr.js +0 -5
- package/dist/footnote.module-DEyFuqOr.js.map +0 -1
- package/dist/formatter-EIJCOSYU-D6nmx63h.js +0 -6
- package/dist/headline.module-BiwHBtGf.js +0 -5
- package/dist/headline.module-BiwHBtGf.js.map +0 -1
- package/dist/showcase-DK557szS.js.map +0 -1
- package/dist/subheadline.module-C-v7zMkQ.js +0 -5
- package/dist/subheadline.module-C-v7zMkQ.js.map +0 -1
- package/dist/utils/responsive/responsive_renderer.d.ts +0 -21
- package/dist/utils/responsive/responsive_renderer.d.ts.map +0 -1
- package/dist/utils/responsive/responsive_renderer.js +0 -12
- package/dist/utils/responsive/responsive_renderer.js.map +0 -1
- package/src/utils/responsive/responsive_renderer.stories.tsx +0 -77
- package/src/utils/responsive/responsive_renderer.tsx +0 -31
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer tcn-system{:where(._utility-strip_23b31df){height:100%;min-width:0}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/utils/dnd/context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/utils/dnd/context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAUhD,eAAO,MAAM,oBAAoB,wCAA6C,CAAC;AAE/E,wBAAgB,gBAAgB,IAAI,aAAa,CAWhD"}
|
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
import { createContext as
|
|
2
|
-
const
|
|
1
|
+
import { createContext as n, useContext as o } from "react";
|
|
2
|
+
const t = {
|
|
3
3
|
registerHandle: () => {
|
|
4
4
|
},
|
|
5
5
|
unregisterHandle: () => {
|
|
6
6
|
},
|
|
7
7
|
isDragging: !1,
|
|
8
|
-
position: { x: 0, y: 0 }
|
|
9
|
-
|
|
8
|
+
position: { x: 0, y: 0 },
|
|
9
|
+
setPosition: () => {
|
|
10
|
+
}
|
|
11
|
+
}, r = n(t);
|
|
10
12
|
function i() {
|
|
11
|
-
const e = r
|
|
12
|
-
return e ===
|
|
13
|
+
const e = o(r);
|
|
14
|
+
return e === t && console.warn(
|
|
13
15
|
"useDragContainer: No DragContainerContext found. Handles may will not register or trigger drag events."
|
|
14
16
|
), e;
|
|
15
17
|
}
|
|
16
18
|
export {
|
|
17
|
-
|
|
19
|
+
r as DragContainerContext,
|
|
18
20
|
i as useDragContainer
|
|
19
21
|
};
|
|
20
22
|
//# sourceMappingURL=context.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sources":["../../../src/utils/dnd/context.ts"],"sourcesContent":["import { createContext, useContext } from 'react';\nimport type { DragContainer } from './types.js';\n\nconst defaultValue: DragContainer = {\n registerHandle: () => {},\n unregisterHandle: () => {},\n isDragging: false,\n position: { x: 0, y: 0 },\n};\n\nexport const DragContainerContext = createContext<DragContainer>(defaultValue);\n\nexport function useDragContainer(): DragContainer {\n const context = useContext(DragContainerContext);\n\n if (context === defaultValue) {\n // biome-ignore lint/suspicious/noConsole: Let devs know if they're not using the context correctly\n console.warn(\n 'useDragContainer: No DragContainerContext found. Handles may will not register or trigger drag events.'\n );\n }\n\n return context;\n}\n"],"names":["defaultValue","DragContainerContext","createContext","useDragContainer","context","useContext"],"mappings":";AAGA,MAAMA,IAA8B;AAAA,EAClC,gBAAgB,MAAM;AAAA,EAAC;AAAA,EACvB,kBAAkB,MAAM;AAAA,EAAC;AAAA,EACzB,YAAY;AAAA,EACZ,UAAU,EAAE,GAAG,GAAG,GAAG,EAAA;
|
|
1
|
+
{"version":3,"file":"context.js","sources":["../../../src/utils/dnd/context.ts"],"sourcesContent":["import { createContext, useContext } from 'react';\nimport type { DragContainer } from './types.js';\n\nconst defaultValue: DragContainer = {\n registerHandle: () => {},\n unregisterHandle: () => {},\n isDragging: false,\n position: { x: 0, y: 0 },\n setPosition: () => {},\n};\n\nexport const DragContainerContext = createContext<DragContainer>(defaultValue);\n\nexport function useDragContainer(): DragContainer {\n const context = useContext(DragContainerContext);\n\n if (context === defaultValue) {\n // biome-ignore lint/suspicious/noConsole: Let devs know if they're not using the context correctly\n console.warn(\n 'useDragContainer: No DragContainerContext found. Handles may will not register or trigger drag events.'\n );\n }\n\n return context;\n}\n"],"names":["defaultValue","DragContainerContext","createContext","useDragContainer","context","useContext"],"mappings":";AAGA,MAAMA,IAA8B;AAAA,EAClC,gBAAgB,MAAM;AAAA,EAAC;AAAA,EACvB,kBAAkB,MAAM;AAAA,EAAC;AAAA,EACzB,YAAY;AAAA,EACZ,UAAU,EAAE,GAAG,GAAG,GAAG,EAAA;AAAA,EACrB,aAAa,MAAM;AAAA,EAAC;AACtB,GAEaC,IAAuBC,EAA6BF,CAAY;AAEtE,SAASG,IAAkC;AAChD,QAAMC,IAAUC,EAAWJ,CAAoB;AAE/C,SAAIG,MAAYJ,KAEd,QAAQ;AAAA,IACN;AAAA,EAAA,GAIGI;AACT;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_drag_container.d.ts","sourceRoot":"","sources":["../../../../src/utils/dnd/hooks/use_drag_container.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,MAAM,WAAW,uBAAuB;IACtC,eAAe,CAAC,EAAE,QAAQ,CAAC;CAC5B;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,uBAAuB,GAAG,aAAa,
|
|
1
|
+
{"version":3,"file":"use_drag_container.d.ts","sourceRoot":"","sources":["../../../../src/utils/dnd/hooks/use_drag_container.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,MAAM,WAAW,uBAAuB;IACtC,eAAe,CAAC,EAAE,QAAQ,CAAC;CAC5B;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,uBAAuB,GAAG,aAAa,CAiDpF"}
|
|
@@ -1,28 +1,42 @@
|
|
|
1
|
-
import { useState as
|
|
1
|
+
import { useState as s, useRef as b, useCallback as o } from "react";
|
|
2
2
|
import { useDraggable as k } from "./use_draggable.js";
|
|
3
|
-
function m(
|
|
4
|
-
const [
|
|
3
|
+
function m(g) {
|
|
4
|
+
const [u, a] = s([]), n = b(g.initialPosition ?? { x: 0, y: 0 }), [i, c] = s(n.current), [f, l] = s(!1);
|
|
5
5
|
k({
|
|
6
|
-
handles:
|
|
6
|
+
handles: u,
|
|
7
7
|
startDragCallback: () => {
|
|
8
|
-
|
|
8
|
+
l(!0);
|
|
9
9
|
},
|
|
10
|
-
dragCallback: (
|
|
11
|
-
|
|
12
|
-
x:
|
|
13
|
-
y:
|
|
10
|
+
dragCallback: (t, e) => {
|
|
11
|
+
c({
|
|
12
|
+
x: n.current.x + t,
|
|
13
|
+
y: n.current.y + e
|
|
14
14
|
});
|
|
15
15
|
},
|
|
16
16
|
endDragCallback: () => {
|
|
17
|
-
|
|
17
|
+
l(!1), n.current = i;
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
const d = o(
|
|
21
|
+
(t) => {
|
|
22
|
+
c((e) => {
|
|
23
|
+
const r = typeof t == "function" ? t(e) : t;
|
|
24
|
+
return n.current = r, r;
|
|
25
|
+
});
|
|
26
|
+
},
|
|
27
|
+
[]
|
|
28
|
+
), p = o((t) => {
|
|
29
|
+
a((e) => [...e, t]);
|
|
30
|
+
}, []), D = o((t) => {
|
|
31
|
+
a((e) => e.filter((r) => r !== t));
|
|
24
32
|
}, []);
|
|
25
|
-
return {
|
|
33
|
+
return {
|
|
34
|
+
registerHandle: p,
|
|
35
|
+
unregisterHandle: D,
|
|
36
|
+
position: i,
|
|
37
|
+
isDragging: f,
|
|
38
|
+
setPosition: d
|
|
39
|
+
};
|
|
26
40
|
}
|
|
27
41
|
export {
|
|
28
42
|
m as useMakeDragContainer
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_drag_container.js","sources":["../../../../src/utils/dnd/hooks/use_drag_container.ts"],"sourcesContent":["import { useCallback, useRef, useState } from 'react';\nimport { useDraggable } from './use_draggable.js';\nimport type { Position } from '../../index.js';\nimport type { DragContainer } from '../types.js';\n\nexport interface UseDragContainerOptions {\n initialPosition?: Position;\n}\n\nexport function useMakeDragContainer(options: UseDragContainerOptions): DragContainer {\n const [handles, setHandles] = useState<React.RefObject<HTMLElement>[]>([]);\n const positionRef = useRef<Position>(options.initialPosition ?? { x: 0, y: 0 });\n const [position, setPosition] = useState(positionRef.current);\n const [isDragging, setIsDragging] = useState(false);\n\n useDraggable({\n handles: handles,\n startDragCallback: () => {\n setIsDragging(true);\n },\n dragCallback: (deltaX, deltaY) => {\n setPosition({\n x: positionRef.current.x + deltaX,\n y: positionRef.current.y + deltaY,\n });\n },\n endDragCallback: () => {\n setIsDragging(false);\n positionRef.current = position;\n },\n });\n\n const registerHandle = useCallback((handle: React.RefObject<HTMLElement>) => {\n setHandles(prev => [...prev, handle]);\n }, []);\n\n const unregisterHandle = useCallback((handle: React.RefObject<HTMLElement>) => {\n setHandles(prev => prev.filter(h => h !== handle));\n }, []);\n\n return {
|
|
1
|
+
{"version":3,"file":"use_drag_container.js","sources":["../../../../src/utils/dnd/hooks/use_drag_container.ts"],"sourcesContent":["import { useCallback, useRef, useState } from 'react';\nimport { useDraggable } from './use_draggable.js';\nimport type { Position } from '../../index.js';\nimport type { DragContainer } from '../types.js';\n\nexport interface UseDragContainerOptions {\n initialPosition?: Position;\n}\n\nexport function useMakeDragContainer(options: UseDragContainerOptions): DragContainer {\n const [handles, setHandles] = useState<React.RefObject<HTMLElement>[]>([]);\n const positionRef = useRef<Position>(options.initialPosition ?? { x: 0, y: 0 });\n const [position, setPosition] = useState(positionRef.current);\n const [isDragging, setIsDragging] = useState(false);\n\n useDraggable({\n handles: handles,\n startDragCallback: () => {\n setIsDragging(true);\n },\n dragCallback: (deltaX, deltaY) => {\n setPosition({\n x: positionRef.current.x + deltaX,\n y: positionRef.current.y + deltaY,\n });\n },\n endDragCallback: () => {\n setIsDragging(false);\n positionRef.current = position;\n },\n });\n\n const setPositionState = useCallback(\n (value: Position | ((prev: Position) => Position)) => {\n setPosition(prev => {\n const next = typeof value === 'function' ? value(prev) : value;\n positionRef.current = next;\n return next;\n });\n },\n []\n );\n\n const registerHandle = useCallback((handle: React.RefObject<HTMLElement>) => {\n setHandles(prev => [...prev, handle]);\n }, []);\n\n const unregisterHandle = useCallback((handle: React.RefObject<HTMLElement>) => {\n setHandles(prev => prev.filter(h => h !== handle));\n }, []);\n\n return {\n registerHandle,\n unregisterHandle,\n position,\n isDragging,\n setPosition: setPositionState,\n };\n}\n"],"names":["useMakeDragContainer","options","handles","setHandles","useState","positionRef","useRef","position","setPosition","isDragging","setIsDragging","useDraggable","deltaX","deltaY","setPositionState","useCallback","value","prev","next","registerHandle","handle","unregisterHandle","h"],"mappings":";;AASO,SAASA,EAAqBC,GAAiD;AACpF,QAAM,CAACC,GAASC,CAAU,IAAIC,EAAyC,CAAA,CAAE,GACnEC,IAAcC,EAAiBL,EAAQ,mBAAmB,EAAE,GAAG,GAAG,GAAG,GAAG,GACxE,CAACM,GAAUC,CAAW,IAAIJ,EAASC,EAAY,OAAO,GACtD,CAACI,GAAYC,CAAa,IAAIN,EAAS,EAAK;AAElD,EAAAO,EAAa;AAAA,IACX,SAAAT;AAAA,IACA,mBAAmB,MAAM;AACvB,MAAAQ,EAAc,EAAI;AAAA,IACpB;AAAA,IACA,cAAc,CAACE,GAAQC,MAAW;AAChC,MAAAL,EAAY;AAAA,QACV,GAAGH,EAAY,QAAQ,IAAIO;AAAA,QAC3B,GAAGP,EAAY,QAAQ,IAAIQ;AAAA,MAAA,CAC5B;AAAA,IACH;AAAA,IACA,iBAAiB,MAAM;AACrB,MAAAH,EAAc,EAAK,GACnBL,EAAY,UAAUE;AAAA,IACxB;AAAA,EAAA,CACD;AAED,QAAMO,IAAmBC;AAAA,IACvB,CAACC,MAAqD;AACpD,MAAAR,EAAY,CAAAS,MAAQ;AAClB,cAAMC,IAAO,OAAOF,KAAU,aAAaA,EAAMC,CAAI,IAAID;AACzD,eAAAX,EAAY,UAAUa,GACfA;AAAA,MACT,CAAC;AAAA,IACH;AAAA,IACA,CAAA;AAAA,EAAC,GAGGC,IAAiBJ,EAAY,CAACK,MAAyC;AAC3E,IAAAjB,EAAW,CAAAc,MAAQ,CAAC,GAAGA,GAAMG,CAAM,CAAC;AAAA,EACtC,GAAG,CAAA,CAAE,GAECC,IAAmBN,EAAY,CAACK,MAAyC;AAC7E,IAAAjB,EAAW,OAAQc,EAAK,OAAO,CAAAK,MAAKA,MAAMF,CAAM,CAAC;AAAA,EACnD,GAAG,CAAA,CAAE;AAEL,SAAO;AAAA,IACL,gBAAAD;AAAA,IACA,kBAAAE;AAAA,IACA,UAAAd;AAAA,IACA,YAAAE;AAAA,IACA,aAAaK;AAAA,EAAA;AAEjB;"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
+
import { Position } from '../types/dimensions.js';
|
|
1
2
|
export interface DragContainer {
|
|
2
3
|
registerHandle: (handle: React.RefObject<HTMLElement>) => void;
|
|
3
4
|
unregisterHandle: (handle: React.RefObject<HTMLElement>) => void;
|
|
4
5
|
isDragging: boolean;
|
|
5
|
-
position:
|
|
6
|
-
|
|
7
|
-
y: number;
|
|
8
|
-
};
|
|
6
|
+
position: Position;
|
|
7
|
+
setPosition: (value: Position | ((prev: Position) => Position)) => void;
|
|
9
8
|
}
|
|
10
9
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/utils/dnd/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,cAAc,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IAC/D,gBAAgB,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IACjE,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/utils/dnd/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAEvD,MAAM,WAAW,aAAa;IAC5B,cAAc,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IAC/D,gBAAgB,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IACjE,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,QAAQ,CAAC;IACnB,WAAW,EAAE,CAAC,KAAK,EAAE,QAAQ,GAAG,CAAC,CAAC,IAAI,EAAE,QAAQ,KAAK,QAAQ,CAAC,KAAK,IAAI,CAAC;CACzE"}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
* @returns boolean indicating if the media query matches
|
|
7
|
-
*/
|
|
8
|
-
export declare function useMediaQuery(query: string): boolean;
|
|
1
|
+
export interface ViewportSize {
|
|
2
|
+
width: number;
|
|
3
|
+
height: number;
|
|
4
|
+
}
|
|
5
|
+
export declare function useMediaQuery(): ViewportSize;
|
|
9
6
|
//# sourceMappingURL=use_media_query.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_media_query.d.ts","sourceRoot":"","sources":["../../../src/utils/hooks/use_media_query.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use_media_query.d.ts","sourceRoot":"","sources":["../../../src/utils/hooks/use_media_query.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,aAAa,IAAI,YAAY,CAY5C"}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}, [t]), c;
|
|
1
|
+
import { useState as i, useLayoutEffect as u } from "react";
|
|
2
|
+
import { useResizeObserver as n } from "./use_resize_observer.js";
|
|
3
|
+
function d() {
|
|
4
|
+
const [o, s] = i({ width: 0, height: 0 }), t = n((e, r) => {
|
|
5
|
+
s({ width: e, height: r });
|
|
6
|
+
});
|
|
7
|
+
return u(() => {
|
|
8
|
+
const e = document.body;
|
|
9
|
+
t(e);
|
|
10
|
+
}, [t]), o;
|
|
12
11
|
}
|
|
13
12
|
export {
|
|
14
13
|
d as useMediaQuery
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_media_query.js","sources":["../../../src/utils/hooks/use_media_query.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"use_media_query.js","sources":["../../../src/utils/hooks/use_media_query.ts"],"sourcesContent":["import { useLayoutEffect, useState } from 'react';\nimport { useResizeObserver } from './use_resize_observer.js';\n\nexport interface ViewportSize {\n width: number;\n height: number;\n}\n\nexport function useMediaQuery(): ViewportSize {\n const [size, setSize] = useState<ViewportSize>({ width: 0, height: 0 });\n const resizeRef = useResizeObserver((width, height) => {\n setSize({ width, height });\n });\n\n useLayoutEffect(() => {\n const body = document.body;\n resizeRef(body);\n }, [resizeRef]);\n\n return size;\n}\n"],"names":["useMediaQuery","size","setSize","useState","resizeRef","useResizeObserver","width","height","useLayoutEffect","body"],"mappings":";;AAQO,SAASA,IAA8B;AAC5C,QAAM,CAACC,GAAMC,CAAO,IAAIC,EAAuB,EAAE,OAAO,GAAG,QAAQ,GAAG,GAChEC,IAAYC,EAAkB,CAACC,GAAOC,MAAW;AACrD,IAAAL,EAAQ,EAAE,OAAAI,GAAO,QAAAC,GAAQ;AAAA,EAC3B,CAAC;AAED,SAAAC,EAAgB,MAAM;AACpB,UAAMC,IAAO,SAAS;AACtB,IAAAL,EAAUK,CAAI;AAAA,EAChB,GAAG,CAACL,CAAS,CAAC,GAEPH;AACT;"}
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ export * from './scroll_away_listener.js';
|
|
|
4
4
|
export * from './dnd/hooks/use_draggable.js';
|
|
5
5
|
export * from './hooks/make_context_hook.js';
|
|
6
6
|
export * from './hooks/use_fork_ref.js';
|
|
7
|
-
export * from './hooks/use_media_query.js';
|
|
8
7
|
export * from './hooks/use_resize_observer.js';
|
|
8
|
+
export * from './hooks/use_media_query.js';
|
|
9
9
|
export * from './default_value.js';
|
|
10
10
|
export * from './calendar/calendar_date.js';
|
|
11
11
|
export * from './calendar/calendar_dates_generator.js';
|
|
@@ -14,7 +14,6 @@ export * from './calendar/get_months_of_year.js';
|
|
|
14
14
|
export * from './calendar/month.js';
|
|
15
15
|
export * from './types/dimensions.js';
|
|
16
16
|
export * from './types/variations.js';
|
|
17
|
-
export * from './responsive/responsive_renderer.js';
|
|
18
17
|
export * from './dnd/draggable/draggable.js';
|
|
19
18
|
export * from './dnd/handle.js';
|
|
20
19
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAE1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAE1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC;AAE3C,cAAc,oBAAoB,CAAC;AAEnC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wCAAwC,CAAC;AACvD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kCAAkC,CAAC;AACjD,cAAc,qBAAqB,CAAC;AAEpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AAEtC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,iBAAiB,CAAC"}
|
package/dist/utils/index.js
CHANGED
|
@@ -1,37 +1,35 @@
|
|
|
1
1
|
import { ClickAwayListener as o, isEventWithinElement as t } from "./click_away_listener.js";
|
|
2
2
|
import { FocusRedirect as a } from "./focus_redirect.js";
|
|
3
|
-
import { ScrollAwayListener as
|
|
3
|
+
import { ScrollAwayListener as x } from "./scroll_away_listener.js";
|
|
4
4
|
import { useDraggable as s } from "./dnd/hooks/use_draggable.js";
|
|
5
5
|
import { makeContextHook as i } from "./hooks/make_context_hook.js";
|
|
6
6
|
import { useForkRef as l } from "./hooks/use_fork_ref.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { defaultValue as
|
|
10
|
-
import { CalendarDatesGenerator as
|
|
11
|
-
import { getDaysOfWeek as
|
|
12
|
-
import { getMonthsOfYear as
|
|
7
|
+
import { TriggerConfig as d, useResizeObserver as k } from "./hooks/use_resize_observer.js";
|
|
8
|
+
import { useMediaQuery as c } from "./hooks/use_media_query.js";
|
|
9
|
+
import { defaultValue as C } from "./default_value.js";
|
|
10
|
+
import { CalendarDatesGenerator as h } from "./calendar/calendar_dates_generator.js";
|
|
11
|
+
import { getDaysOfWeek as O } from "./calendar/get_days_of_week.js";
|
|
12
|
+
import { getMonthsOfYear as v } from "./calendar/get_months_of_year.js";
|
|
13
13
|
import { Month as A } from "./calendar/month.js";
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { DragHandle as z } from "./dnd/handle.js";
|
|
14
|
+
import { Draggable as F } from "./dnd/draggable/draggable.js";
|
|
15
|
+
import { DragHandle as L } from "./dnd/handle.js";
|
|
17
16
|
export {
|
|
18
|
-
|
|
17
|
+
h as CalendarDatesGenerator,
|
|
19
18
|
o as ClickAwayListener,
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
L as DragHandle,
|
|
20
|
+
F as Draggable,
|
|
22
21
|
a as FocusRedirect,
|
|
23
22
|
A as Month,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
v as
|
|
29
|
-
O as getMonthsOfYear,
|
|
23
|
+
x as ScrollAwayListener,
|
|
24
|
+
d as TriggerConfig,
|
|
25
|
+
C as defaultValue,
|
|
26
|
+
O as getDaysOfWeek,
|
|
27
|
+
v as getMonthsOfYear,
|
|
30
28
|
t as isEventWithinElement,
|
|
31
29
|
i as makeContextHook,
|
|
32
30
|
s as useDraggable,
|
|
33
31
|
l as useForkRef,
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
c as useMediaQuery,
|
|
33
|
+
k as useResizeObserver
|
|
36
34
|
};
|
|
37
35
|
//# sourceMappingURL=index.js.map
|
package/dist/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
package/src/actions/index.ts
CHANGED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { VStack } from '../../stacks/v_stack.js';
|
|
3
|
+
import { SBNestedScaffold, SBContent, SBNestedRail } from './utils.js';
|
|
4
|
+
|
|
5
|
+
import styles from './composed_stories.module.css';
|
|
6
|
+
import clsx from 'clsx';
|
|
7
|
+
import { Body } from '../body/body.js';
|
|
8
|
+
|
|
9
|
+
const meta: Meta = {
|
|
10
|
+
title: 'Layouts/Composed',
|
|
11
|
+
component: () => <></>,
|
|
12
|
+
tags: ['autodocs'],
|
|
13
|
+
parameters: {
|
|
14
|
+
docs: {
|
|
15
|
+
description: {
|
|
16
|
+
component: 'Examples of nested layout compositions.',
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export default meta;
|
|
23
|
+
|
|
24
|
+
type Story = StoryObj;
|
|
25
|
+
|
|
26
|
+
const SBContainer = ({ children }: { children: React.ReactNode }) => {
|
|
27
|
+
return (
|
|
28
|
+
<VStack height="100vh" width="100%" padding="16px" className={styles.sbContainer}>
|
|
29
|
+
{children}
|
|
30
|
+
</VStack>
|
|
31
|
+
);
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export const Baseline: Story = {
|
|
35
|
+
render: () => (
|
|
36
|
+
<SBContainer>
|
|
37
|
+
<SBNestedScaffold depth={1}>
|
|
38
|
+
<SBNestedRail depth={2}>
|
|
39
|
+
<SBContent />
|
|
40
|
+
<SBContent />
|
|
41
|
+
<SBContent />
|
|
42
|
+
</SBNestedRail>
|
|
43
|
+
</SBNestedScaffold>
|
|
44
|
+
</SBContainer>
|
|
45
|
+
),
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export const ScaffoldWithBody: Story = {
|
|
49
|
+
render: () => (
|
|
50
|
+
<SBContainer>
|
|
51
|
+
<SBNestedScaffold depth={1}>
|
|
52
|
+
<SBContent />
|
|
53
|
+
<SBContent />
|
|
54
|
+
<SBContent />
|
|
55
|
+
</SBNestedScaffold>
|
|
56
|
+
</SBContainer>
|
|
57
|
+
),
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export const ScaffoldWithMain: Story = {
|
|
61
|
+
render: () => (
|
|
62
|
+
<SBContainer>
|
|
63
|
+
<SBNestedScaffold depth={1}>
|
|
64
|
+
<SBNestedRail depth={2} side={false} utilityStrip={false} scaffold={false}>
|
|
65
|
+
<SBContent />
|
|
66
|
+
<SBContent />
|
|
67
|
+
<SBContent />
|
|
68
|
+
</SBNestedRail>
|
|
69
|
+
</SBNestedScaffold>
|
|
70
|
+
</SBContainer>
|
|
71
|
+
),
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
export const RailWithMain: Story = {
|
|
75
|
+
render: () => (
|
|
76
|
+
<SBContainer>
|
|
77
|
+
<SBNestedRail depth={1} scaffold={false}>
|
|
78
|
+
<SBContent />
|
|
79
|
+
<SBContent />
|
|
80
|
+
<SBContent />
|
|
81
|
+
</SBNestedRail>
|
|
82
|
+
</SBContainer>
|
|
83
|
+
),
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
export const RailWithBody: Story = {
|
|
87
|
+
render: () => (
|
|
88
|
+
<SBContainer>
|
|
89
|
+
<SBNestedRail depth={1} scaffold={false}>
|
|
90
|
+
<Body className={clsx(styles.body, styles.secondary)}>
|
|
91
|
+
Body
|
|
92
|
+
<SBContent />
|
|
93
|
+
<SBContent />
|
|
94
|
+
<SBContent />
|
|
95
|
+
</Body>
|
|
96
|
+
</SBNestedRail>
|
|
97
|
+
</SBContainer>
|
|
98
|
+
),
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
export const WithColumns: Story = {
|
|
102
|
+
render: () => (
|
|
103
|
+
<SBContainer>
|
|
104
|
+
<SBNestedScaffold depth={1} utilityBar={false} body={false} footer={false}>
|
|
105
|
+
<SBNestedRail depth={2} scaffold={false}>
|
|
106
|
+
<SBContent />
|
|
107
|
+
<SBContent />
|
|
108
|
+
<SBContent />
|
|
109
|
+
</SBNestedRail>
|
|
110
|
+
</SBNestedScaffold>
|
|
111
|
+
</SBContainer>
|
|
112
|
+
),
|
|
113
|
+
};
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
/* Pastel Color Palette */
|
|
2
|
+
.sb-container {
|
|
3
|
+
/* Forest (5) - Greens & teals */
|
|
4
|
+
--pastel-forest-bg: #e8f5e9;
|
|
5
|
+
--pastel-forest-1: #a5d6a7;
|
|
6
|
+
--pastel-forest-2: #81c784;
|
|
7
|
+
--pastel-forest-3: #66bb6a;
|
|
8
|
+
--pastel-forest-4: #4caf50;
|
|
9
|
+
|
|
10
|
+
/* Sunset (5) - Warm peaches, corals & yellows */
|
|
11
|
+
--pastel-sunset-bg: #fff7e3;
|
|
12
|
+
--pastel-sunset-1: #f5c6a0;
|
|
13
|
+
--pastel-sunset-2: #eba985;
|
|
14
|
+
--pastel-sunset-3: #e08f6a;
|
|
15
|
+
--pastel-sunset-4: #d47550;
|
|
16
|
+
|
|
17
|
+
/* Berry (5) - Purples, lavenders & pinks */
|
|
18
|
+
--pastel-berry-bg: #f5eafa;
|
|
19
|
+
--pastel-berry-1: #e8d5f2;
|
|
20
|
+
--pastel-berry-2: #d4b8e8;
|
|
21
|
+
--pastel-berry-3: #c9a7e0;
|
|
22
|
+
--pastel-berry-4: #b78ed4;
|
|
23
|
+
|
|
24
|
+
color: white;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.secondary {
|
|
28
|
+
padding: 8px 16px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.primary {
|
|
32
|
+
padding: 8px;
|
|
33
|
+
&[data-depth="1"] {
|
|
34
|
+
--bg: var(--pastel-sunset-bg);
|
|
35
|
+
--bg-1: var(--pastel-sunset-1);
|
|
36
|
+
--bg-2: var(--pastel-sunset-2);
|
|
37
|
+
--bg-3: var(--pastel-sunset-3);
|
|
38
|
+
--bg-4: var(--pastel-sunset-4);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&[data-depth="2"] {
|
|
42
|
+
--bg: var(--pastel-berry-bg);
|
|
43
|
+
--bg-1: var(--pastel-berry-1);
|
|
44
|
+
--bg-2: var(--pastel-berry-2);
|
|
45
|
+
--bg-3: var(--pastel-berry-3);
|
|
46
|
+
--bg-4: var(--pastel-berry-4);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&[data-depth="3"] {
|
|
50
|
+
--bg: var(--pastel-forest-bg);
|
|
51
|
+
--bg-1: var(--pastel-forest-1);
|
|
52
|
+
--bg-2: var(--pastel-forest-2);
|
|
53
|
+
--bg-3: var(--pastel-forest-3);
|
|
54
|
+
--bg-4: var(--pastel-forest-4);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* Vertical Layouts */
|
|
59
|
+
|
|
60
|
+
.scaffold,
|
|
61
|
+
.rail {
|
|
62
|
+
background: var(--bg);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.header {
|
|
66
|
+
background: var(--bg-1);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.utilityBar {
|
|
70
|
+
background: var(--bg-2);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.footer {
|
|
74
|
+
background: var(--bg-3);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.body {
|
|
78
|
+
background: var(--bg-4);
|
|
79
|
+
gap: 8px;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/* Horizontal Layouts */
|
|
83
|
+
.utilityStrip {
|
|
84
|
+
background: var(--bg-1);
|
|
85
|
+
gap: 8px;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.side {
|
|
89
|
+
background: var(--bg-2);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.main {
|
|
93
|
+
background: var(--bg-3);
|
|
94
|
+
gap: 8px;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.content {
|
|
98
|
+
background: rgba(0, 0, 0, 0.25);
|
|
99
|
+
display: flex;
|
|
100
|
+
align-items: center;
|
|
101
|
+
justify-content: center;
|
|
102
|
+
height: 100%;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.action-box {
|
|
106
|
+
width: 16px;
|
|
107
|
+
height: 16px;
|
|
108
|
+
border: 2px solid rgba(0, 0, 0, 0.25);
|
|
109
|
+
padding: 4px;
|
|
110
|
+
display: flex;
|
|
111
|
+
align-items: center;
|
|
112
|
+
justify-content: center;
|
|
113
|
+
border-radius: 4px;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.floating-label {
|
|
117
|
+
height: 0;
|
|
118
|
+
z-index: 2;
|
|
119
|
+
overflow: visible;
|
|
120
|
+
color: var(--font-color);
|
|
121
|
+
position: absolute;
|
|
122
|
+
top: 0;
|
|
123
|
+
left: 50%;
|
|
124
|
+
transform: translateX(-50%);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.floating-label-chip {
|
|
128
|
+
padding: 4px;
|
|
129
|
+
border-radius: 4px;
|
|
130
|
+
/* 100% bg at top → 75% opacity of bg at bottom so overlapping content shows through */
|
|
131
|
+
background: linear-gradient(
|
|
132
|
+
to bottom,
|
|
133
|
+
var(--bg) 0%,
|
|
134
|
+
color-mix(in srgb, var(--bg) 75%, transparent) 100%
|
|
135
|
+
);
|
|
136
|
+
color: var(--font-color);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.vertical-label {
|
|
140
|
+
writing-mode: vertical-rl;
|
|
141
|
+
text-orientation: mixed;
|
|
142
|
+
}
|