From 23f657da30a78bd725c36c4f59fbeec228e437e4 Mon Sep 17 00:00:00 2001 From: eliza Date: Fri, 28 Jun 2024 14:38:41 -0700 Subject: [PATCH 01/14] temporary html setup for testing panel flow in popover and shell-panel --- .../calcite-components/src/components.d.ts | 98 ++++ .../src/demos/shell-panel.html | 420 +++++++----------- 2 files changed, 258 insertions(+), 260 deletions(-) diff --git a/packages/calcite-components/src/components.d.ts b/packages/calcite-components/src/components.d.ts index c5ada57ac20..3a76eb679f5 100644 --- a/packages/calcite-components/src/components.d.ts +++ b/packages/calcite-components/src/components.d.ts @@ -8,86 +8,184 @@ import { HTMLStencilElement, JSXBase } from "@stencil/core/internal"; import { Alignment, Appearance, CollapseDirection, FlipContext, IconType, Kind, Layout, LogicalFlowPosition, Position, Scale, SelectionAppearance as SelectionAppearance1, SelectionMode, Status, Width } from "./components/interfaces"; import { RequestedItem } from "./components/accordion/interfaces"; import { RequestedItem as RequestedItem1 } from "./components/accordion-item/interfaces"; +import { ActionMessages } from "./components/action/assets/action/t9n"; import { FlipPlacement, LogicalPlacement, MenuPlacement, OverlayPositioning, ReferenceElement } from "./utils/floating-ui"; +import { ActionBarMessages } from "./components/action-bar/assets/action-bar/t9n"; import { Columns } from "./components/action-group/interfaces"; +import { ActionGroupMessages } from "./components/action-group/assets/action-group/t9n"; +import { ActionPadMessages } from "./components/action-pad/assets/action-pad/t9n"; import { AlertDuration, Sync } from "./components/alert/interfaces"; import { NumberingSystem } from "./utils/locale"; +import { AlertMessages } from "./components/alert/assets/alert/t9n"; import { HeadingLevel } from "./components/functional/Heading"; +import { BlockMessages } from "./components/block/assets/block/t9n"; import { BlockSectionToggleDisplay } from "./components/block-section/interfaces"; +import { BlockSectionMessages } from "./components/block-section/assets/block-section/t9n"; import { ButtonAlignment, DropdownIconType } from "./components/button/interfaces"; +import { ButtonMessages } from "./components/button/assets/button/t9n"; +import { CardMessages } from "./components/card/assets/card/t9n"; import { ArrowType, AutoplayType } from "./components/carousel/interfaces"; +import { CarouselMessages } from "./components/carousel/assets/carousel/t9n"; import { MutableValidityState } from "./utils/form"; +import { ChipMessages } from "./components/chip/assets/chip/t9n"; import { ColorValue, InternalColor } from "./components/color-picker/interfaces"; import { Format } from "./components/color-picker/utils"; +import { ColorPickerMessages } from "./components/color-picker/assets/color-picker/t9n"; import { ComboboxChildElement, SelectionDisplay } from "./components/combobox/interfaces"; +import { ComboboxMessages } from "./components/combobox/assets/combobox/t9n"; +import { DatePickerMessages } from "./components/date-picker/assets/date-picker/t9n"; import { DateLocaleData } from "./components/date-picker/utils"; import { HoverRange } from "./utils/date"; import { RequestedItem as RequestedItem2 } from "./components/dropdown-group/interfaces"; import { ItemKeyboardEvent } from "./components/dropdown/interfaces"; +import { FilterMessages } from "./components/filter/assets/filter/t9n"; import { FlowItemLikeElement } from "./components/flow/interfaces"; +import { FlowItemMessages } from "./components/flow-item/assets/flow-item/t9n"; import { ColorStop, DataSeries } from "./components/graph/interfaces"; +import { HandleMessages } from "./components/handle/assets/handle/t9n"; import { HandleChange, HandleNudge } from "./components/handle/interfaces"; +import { InlineEditableMessages } from "./components/inline-editable/assets/inline-editable/t9n"; import { InputPlacement } from "./components/input/interfaces"; +import { InputMessages } from "./components/input/assets/input/t9n"; +import { InputDatePickerMessages } from "./components/input-date-picker/assets/input-date-picker/t9n"; +import { InputNumberMessages } from "./components/input-number/assets/input-number/t9n"; +import { InputTextMessages } from "./components/input-text/assets/input-text/t9n"; +import { InputTimePickerMessages } from "./components/input-time-picker/assets/input-time-picker/t9n"; +import { TimePickerMessages } from "./components/time-picker/assets/time-picker/t9n"; +import { InputTimeZoneMessages } from "./components/input-time-zone/assets/input-time-zone/t9n"; import { OffsetStyle, TimeZoneMode } from "./components/input-time-zone/interfaces"; import { ListDragDetail } from "./components/list/interfaces"; import { ItemData } from "./components/list-item/interfaces"; +import { ListMessages } from "./components/list/assets/list/t9n"; import { SelectionAppearance } from "./components/list/resources"; +import { ListItemMessages } from "./components/list-item/assets/list-item/t9n"; +import { MenuMessages } from "./components/menu/assets/menu/t9n"; +import { MenuItemMessages } from "./components/menu-item/assets/menu-item/t9n"; import { MenuItemCustomEvent } from "./components/menu-item/interfaces"; import { MeterFillType, MeterLabelType } from "./components/meter/interfaces"; +import { ModalMessages } from "./components/modal/assets/modal/t9n"; +import { NoticeMessages } from "./components/notice/assets/notice/t9n"; +import { PaginationMessages } from "./components/pagination/assets/pagination/t9n"; +import { PanelMessages } from "./components/panel/assets/panel/t9n"; import { ItemData as ItemData1, ListFocusId } from "./components/pick-list/shared-list-logic"; import { ICON_TYPES } from "./components/pick-list/resources"; +import { PickListItemMessages } from "./components/pick-list-item/assets/pick-list-item/t9n"; +import { PopoverMessages } from "./components/popover/assets/popover/t9n"; +import { RatingMessages } from "./components/rating/assets/rating/t9n"; +import { ScrimMessages } from "./components/scrim/assets/scrim/t9n"; import { DisplayMode } from "./components/sheet/interfaces"; import { DisplayMode as DisplayMode1 } from "./components/shell-panel/interfaces"; +import { ShellPanelMessages } from "./components/shell-panel/assets/shell-panel/t9n"; import { DragDetail } from "./utils/sortableComponent"; import { StepperItemChangeEventDetail, StepperItemEventDetail, StepperItemKeyEventDetail, StepperLayout } from "./components/stepper/interfaces"; +import { StepperMessages } from "./components/stepper/assets/stepper/t9n"; +import { StepperItemMessages } from "./components/stepper-item/assets/stepper-item/t9n"; import { TabID, TabLayout, TabPosition } from "./components/tabs/interfaces"; +import { TabNavMessages } from "./components/tab-nav/assets/tab-nav/t9n"; import { TabChangeEventDetail, TabCloseEventDetail } from "./components/tab/interfaces"; +import { TabTitleMessages } from "./components/tab-title/assets/tab-title/t9n"; import { RowType, TableInteractionMode, TableLayout, TableRowFocusEvent, TableSelectionDisplay } from "./components/table/interfaces"; +import { TableMessages } from "./components/table/assets/table/t9n"; +import { TableCellMessages } from "./components/table-cell/assets/table-cell/t9n"; +import { TableHeaderMessages } from "./components/table-header/assets/table-header/t9n"; +import { TextAreaMessages } from "./components/text-area/assets/text-area/t9n"; import { TileSelectType } from "./components/tile-select/interfaces"; import { TileSelectGroupLayout } from "./components/tile-select-group/interfaces"; +import { TipMessages } from "./components/tip/assets/tip/t9n"; +import { TipManagerMessages } from "./components/tip-manager/assets/tip-manager/t9n"; import { TreeItemSelectDetail } from "./components/tree-item/interfaces"; +import { ValueListMessages } from "./components/value-list/assets/value-list/t9n"; import { ListItemAndHandle } from "./components/value-list-item/interfaces"; export { Alignment, Appearance, CollapseDirection, FlipContext, IconType, Kind, Layout, LogicalFlowPosition, Position, Scale, SelectionAppearance as SelectionAppearance1, SelectionMode, Status, Width } from "./components/interfaces"; export { RequestedItem } from "./components/accordion/interfaces"; export { RequestedItem as RequestedItem1 } from "./components/accordion-item/interfaces"; +export { ActionMessages } from "./components/action/assets/action/t9n"; export { FlipPlacement, LogicalPlacement, MenuPlacement, OverlayPositioning, ReferenceElement } from "./utils/floating-ui"; +export { ActionBarMessages } from "./components/action-bar/assets/action-bar/t9n"; export { Columns } from "./components/action-group/interfaces"; +export { ActionGroupMessages } from "./components/action-group/assets/action-group/t9n"; +export { ActionPadMessages } from "./components/action-pad/assets/action-pad/t9n"; export { AlertDuration, Sync } from "./components/alert/interfaces"; export { NumberingSystem } from "./utils/locale"; +export { AlertMessages } from "./components/alert/assets/alert/t9n"; export { HeadingLevel } from "./components/functional/Heading"; +export { BlockMessages } from "./components/block/assets/block/t9n"; export { BlockSectionToggleDisplay } from "./components/block-section/interfaces"; +export { BlockSectionMessages } from "./components/block-section/assets/block-section/t9n"; export { ButtonAlignment, DropdownIconType } from "./components/button/interfaces"; +export { ButtonMessages } from "./components/button/assets/button/t9n"; +export { CardMessages } from "./components/card/assets/card/t9n"; export { ArrowType, AutoplayType } from "./components/carousel/interfaces"; +export { CarouselMessages } from "./components/carousel/assets/carousel/t9n"; export { MutableValidityState } from "./utils/form"; +export { ChipMessages } from "./components/chip/assets/chip/t9n"; export { ColorValue, InternalColor } from "./components/color-picker/interfaces"; export { Format } from "./components/color-picker/utils"; +export { ColorPickerMessages } from "./components/color-picker/assets/color-picker/t9n"; export { ComboboxChildElement, SelectionDisplay } from "./components/combobox/interfaces"; +export { ComboboxMessages } from "./components/combobox/assets/combobox/t9n"; +export { DatePickerMessages } from "./components/date-picker/assets/date-picker/t9n"; export { DateLocaleData } from "./components/date-picker/utils"; export { HoverRange } from "./utils/date"; export { RequestedItem as RequestedItem2 } from "./components/dropdown-group/interfaces"; export { ItemKeyboardEvent } from "./components/dropdown/interfaces"; +export { FilterMessages } from "./components/filter/assets/filter/t9n"; export { FlowItemLikeElement } from "./components/flow/interfaces"; +export { FlowItemMessages } from "./components/flow-item/assets/flow-item/t9n"; export { ColorStop, DataSeries } from "./components/graph/interfaces"; +export { HandleMessages } from "./components/handle/assets/handle/t9n"; export { HandleChange, HandleNudge } from "./components/handle/interfaces"; +export { InlineEditableMessages } from "./components/inline-editable/assets/inline-editable/t9n"; export { InputPlacement } from "./components/input/interfaces"; +export { InputMessages } from "./components/input/assets/input/t9n"; +export { InputDatePickerMessages } from "./components/input-date-picker/assets/input-date-picker/t9n"; +export { InputNumberMessages } from "./components/input-number/assets/input-number/t9n"; +export { InputTextMessages } from "./components/input-text/assets/input-text/t9n"; +export { InputTimePickerMessages } from "./components/input-time-picker/assets/input-time-picker/t9n"; +export { TimePickerMessages } from "./components/time-picker/assets/time-picker/t9n"; +export { InputTimeZoneMessages } from "./components/input-time-zone/assets/input-time-zone/t9n"; export { OffsetStyle, TimeZoneMode } from "./components/input-time-zone/interfaces"; export { ListDragDetail } from "./components/list/interfaces"; export { ItemData } from "./components/list-item/interfaces"; +export { ListMessages } from "./components/list/assets/list/t9n"; export { SelectionAppearance } from "./components/list/resources"; +export { ListItemMessages } from "./components/list-item/assets/list-item/t9n"; +export { MenuMessages } from "./components/menu/assets/menu/t9n"; +export { MenuItemMessages } from "./components/menu-item/assets/menu-item/t9n"; export { MenuItemCustomEvent } from "./components/menu-item/interfaces"; export { MeterFillType, MeterLabelType } from "./components/meter/interfaces"; +export { ModalMessages } from "./components/modal/assets/modal/t9n"; +export { NoticeMessages } from "./components/notice/assets/notice/t9n"; +export { PaginationMessages } from "./components/pagination/assets/pagination/t9n"; +export { PanelMessages } from "./components/panel/assets/panel/t9n"; export { ItemData as ItemData1, ListFocusId } from "./components/pick-list/shared-list-logic"; export { ICON_TYPES } from "./components/pick-list/resources"; +export { PickListItemMessages } from "./components/pick-list-item/assets/pick-list-item/t9n"; +export { PopoverMessages } from "./components/popover/assets/popover/t9n"; +export { RatingMessages } from "./components/rating/assets/rating/t9n"; +export { ScrimMessages } from "./components/scrim/assets/scrim/t9n"; export { DisplayMode } from "./components/sheet/interfaces"; export { DisplayMode as DisplayMode1 } from "./components/shell-panel/interfaces"; +export { ShellPanelMessages } from "./components/shell-panel/assets/shell-panel/t9n"; export { DragDetail } from "./utils/sortableComponent"; export { StepperItemChangeEventDetail, StepperItemEventDetail, StepperItemKeyEventDetail, StepperLayout } from "./components/stepper/interfaces"; +export { StepperMessages } from "./components/stepper/assets/stepper/t9n"; +export { StepperItemMessages } from "./components/stepper-item/assets/stepper-item/t9n"; export { TabID, TabLayout, TabPosition } from "./components/tabs/interfaces"; +export { TabNavMessages } from "./components/tab-nav/assets/tab-nav/t9n"; export { TabChangeEventDetail, TabCloseEventDetail } from "./components/tab/interfaces"; +export { TabTitleMessages } from "./components/tab-title/assets/tab-title/t9n"; export { RowType, TableInteractionMode, TableLayout, TableRowFocusEvent, TableSelectionDisplay } from "./components/table/interfaces"; +export { TableMessages } from "./components/table/assets/table/t9n"; +export { TableCellMessages } from "./components/table-cell/assets/table-cell/t9n"; +export { TableHeaderMessages } from "./components/table-header/assets/table-header/t9n"; +export { TextAreaMessages } from "./components/text-area/assets/text-area/t9n"; export { TileSelectType } from "./components/tile-select/interfaces"; export { TileSelectGroupLayout } from "./components/tile-select-group/interfaces"; +export { TipMessages } from "./components/tip/assets/tip/t9n"; +export { TipManagerMessages } from "./components/tip-manager/assets/tip-manager/t9n"; export { TreeItemSelectDetail } from "./components/tree-item/interfaces"; +export { ValueListMessages } from "./components/value-list/assets/value-list/t9n"; export { ListItemAndHandle } from "./components/value-list-item/interfaces"; export namespace Components { interface CalciteAccordion { diff --git a/packages/calcite-components/src/demos/shell-panel.html b/packages/calcite-components/src/demos/shell-panel.html index fe241d016af..dbb3dfe4074 100644 --- a/packages/calcite-components/src/demos/shell-panel.html +++ b/packages/calcite-components/src/demos/shell-panel.html @@ -25,288 +25,116 @@ width: 100%; height: 100%; } - - #viewDiv { - padding: 0; - margin: 0; - height: 100%; - width: 100%; - overflow: hidden; - } - - calcite-notice { - margin-block: 1rem; - } - - .gnav { - display: flex; - flex-direction: row; - padding: 1rem; - justify-content: space-between; - } - - .tall-content-example { - display: block; - margin: 1rem 0; - background: var(--calcite-color-foreground-2); - height: 100rem; - overflow: scroll; - } - -
-
+
-
- - - Not content behind - - Content behind - - - - Not tall content - - Tall content - - - - Not resizable - - Resizable - -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - dock - float - overlay - - - - - - - - - Add layers - - - - - - - - - - - - - - - - - - - - - - - - - - - - - dock - float - overlay - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - dock - float - overlay - - - - - - +
Shell Content
- - - - - - - - - - - - - - - - - - - + + Clickable popover - - - - dock - float - overlay - - - - + + +
Slot for a content-top.
+ +
Content bottom!
+
Footer!
+
+ +
Slot for a content-top.
+ +
Content bottom!
+
Footer!
+
+ +
Slot for a content-top.
+ +
Content bottom!
+ + +
+
Footer
+ + +
Hello! I am some popover content!
+ + +
Slot for a content-top.
+ +
Content bottom!
+
Footer!
+
+ +
Slot for a content-top.
+ +
Content bottom!
+
Footer!
+
+ +
Slot for a content-top.
+ +
Content bottom!
+ +
+ + +
+
+
+
+
From c585a0850a0443bbaf0f657b82350d7a204bd7cd Mon Sep 17 00:00:00 2001 From: eliza Date: Fri, 28 Jun 2024 15:47:36 -0700 Subject: [PATCH 02/14] panelFlowScaleInPopoverAndInShellPanel story --- .../calcite-components/src/components.d.ts | 8 ++ .../src/components/panel/panel.stories.ts | 86 +++++++++++++++++++ 2 files changed, 94 insertions(+) diff --git a/packages/calcite-components/src/components.d.ts b/packages/calcite-components/src/components.d.ts index 3a76eb679f5..58f76549e4b 100644 --- a/packages/calcite-components/src/components.d.ts +++ b/packages/calcite-components/src/components.d.ts @@ -3722,6 +3722,10 @@ export namespace Components { * Determines the type of positioning to use for the overlaid content. Using `"absolute"` will work for most cases. The component will be positioned inside of overflowing parent containers and will affect the container's layout. `"fixed"` should be used to escape an overflowing parent container, or when the reference element's `position` CSS property is `"fixed"`. */ "overlayPositioning": OverlayPositioning; + /** + * Specifies the size of the component. + */ + "scale": Scale; /** * Scrolls the component's content to a specified set of coordinates. * @example myCalciteFlowItem.scrollContentTo({ left: 0, // Specifies the number of pixels along the X axis to scroll the window or element. top: 0, // Specifies the number of pixels along the Y axis to scroll the window or element behavior: "auto" // Specifies whether the scrolling should animate smoothly (smooth), or happen instantly in a single jump (auto, the default value). }); @@ -11684,6 +11688,10 @@ declare namespace LocalJSX { * Determines the type of positioning to use for the overlaid content. Using `"absolute"` will work for most cases. The component will be positioned inside of overflowing parent containers and will affect the container's layout. `"fixed"` should be used to escape an overflowing parent container, or when the reference element's `position` CSS property is `"fixed"`. */ "overlayPositioning"?: OverlayPositioning; + /** + * Specifies the size of the component. + */ + "scale"?: Scale; } /** * @deprecated Use the `calcite-list` component instead. diff --git a/packages/calcite-components/src/components/panel/panel.stories.ts b/packages/calcite-components/src/components/panel/panel.stories.ts index ea0af7aa81e..2b99037c270 100644 --- a/packages/calcite-components/src/components/panel/panel.stories.ts +++ b/packages/calcite-components/src/components/panel/panel.stories.ts @@ -431,3 +431,89 @@ export const footerSlotPrecedence = (): string => html` ${footerHTML} `; + +export const panelFlowScaleInPopoverAndInShellPanel = (): string => html` +
+ +
Shell Content
+ + + + Clickable popover + + + +
Slot for a content-top.
+ +
Content bottom!
+
Footer!
+
+ +
Slot for a content-top.
+ +
Content bottom!
+
Footer!
+
+ +
Slot for a content-top.
+ +
Content bottom!
+ + +
+
+
+
Footer
+
+
+ +
Hello! I am some popover content!
+ + +
Slot for a content-top.
+ +
Content bottom!
+
Footer!
+
+ +
Slot for a content-top.
+ +
Content bottom!
+
Footer!
+
+ +
Slot for a content-top.
+ +
Content bottom!
+ +
+
+
+`; From f4656022f5a0beac76e4c67c1f48e62ec26baa0a Mon Sep 17 00:00:00 2001 From: eliza Date: Mon, 1 Jul 2024 12:12:36 -0700 Subject: [PATCH 03/14] add scale to panel and flow --- packages/calcite-components/src/components.d.ts | 8 ++++++++ .../src/components/flow-item/flow-item.tsx | 5 +++++ .../src/components/panel/panel.tsx | 7 +++++++ .../calcite-components/src/demos/shell-panel.html | 15 +++------------ 4 files changed, 23 insertions(+), 12 deletions(-) diff --git a/packages/calcite-components/src/components.d.ts b/packages/calcite-components/src/components.d.ts index 58f76549e4b..c0a6852bd0e 100644 --- a/packages/calcite-components/src/components.d.ts +++ b/packages/calcite-components/src/components.d.ts @@ -1930,6 +1930,10 @@ export namespace Components { * Determines the type of positioning to use for the overlaid content. Using `"absolute"` will work for most cases. The component will be positioned inside of overflowing parent containers and will affect the container's layout. `"fixed"` should be used to escape an overflowing parent container, or when the reference element's `position` CSS property is `"fixed"`. */ "overlayPositioning": OverlayPositioning; + /** + * Specifies the size of the component. + */ + "scale": Scale; /** * Scrolls the component's content to a specified set of coordinates. * @example myCalciteFlowItem.scrollContentTo({ left: 0, // Specifies the number of pixels along the X axis to scroll the window or element. top: 0, // Specifies the number of pixels along the Y axis to scroll the window or element behavior: "auto" // Specifies whether the scrolling should animate smoothly (smooth), or happen instantly in a single jump (auto, the default value). }); @@ -9799,6 +9803,10 @@ declare namespace LocalJSX { * Determines the type of positioning to use for the overlaid content. Using `"absolute"` will work for most cases. The component will be positioned inside of overflowing parent containers and will affect the container's layout. `"fixed"` should be used to escape an overflowing parent container, or when the reference element's `position` CSS property is `"fixed"`. */ "overlayPositioning"?: OverlayPositioning; + /** + * Specifies the size of the component. + */ + "scale"?: Scale; /** * When `true`, displays a back button in the component's header. */ diff --git a/packages/calcite-components/src/components/flow-item/flow-item.tsx b/packages/calcite-components/src/components/flow-item/flow-item.tsx index 9d87efa0715..6ddfe096888 100644 --- a/packages/calcite-components/src/components/flow-item/flow-item.tsx +++ b/packages/calcite-components/src/components/flow-item/flow-item.tsx @@ -37,6 +37,7 @@ import { HeadingLevel } from "../functional/Heading"; import { SLOTS as PANEL_SLOTS } from "../panel/resources"; import { OverlayPositioning } from "../../utils/floating-ui"; import { CollapseDirection } from "../interfaces"; +import { Scale } from "../interfaces"; import { FlowItemMessages } from "./assets/flow-item/t9n"; import { CSS, ICONS, SLOTS } from "./resources"; @@ -155,6 +156,9 @@ export class FlowItem */ @Prop({ reflect: true }) overlayPositioning: OverlayPositioning = "absolute"; + /** Specifies the size of the component. */ + @Prop({ reflect: true }) scale: Scale = "m"; + /** * When `true`, displays a back button in the component's header. * @@ -382,6 +386,7 @@ export class FlowItem onCalcitePanelToggle={this.handlePanelToggle} overlayPositioning={overlayPositioning} ref={this.setContainerRef} + scale={this.scale} > {this.renderBackButton()} diff --git a/packages/calcite-components/src/components/panel/panel.tsx b/packages/calcite-components/src/components/panel/panel.tsx index f23e41871bc..1e63dc7ac15 100644 --- a/packages/calcite-components/src/components/panel/panel.tsx +++ b/packages/calcite-components/src/components/panel/panel.tsx @@ -43,6 +43,7 @@ import { } from "../../utils/t9n"; import { OverlayPositioning } from "../../utils/floating-ui"; import { CollapseDirection } from "../interfaces"; +import { Scale } from "../interfaces"; import { PanelMessages } from "./assets/panel/t9n"; import { CSS, ICONS, SLOTS } from "./resources"; @@ -156,6 +157,9 @@ export class Panel */ @Prop({ reflect: true }) overlayPositioning: OverlayPositioning = "absolute"; + /** Specifies the size of the component. */ + @Prop({ reflect: true }) scale: Scale = "m"; + //-------------------------------------------------------------------------- // // Lifecycle @@ -471,6 +475,7 @@ export class Panel data-test="collapse" icon={collapsed ? icons[0] : icons[1]} onClick={this.collapse} + scale={this.scale} text={collapse} title={collapsed ? expand : collapse} /> @@ -482,6 +487,7 @@ export class Panel data-test="close" icon={ICONS.close} onClick={this.close} + scale={this.scale} text={close} title={close} /> @@ -522,6 +528,7 @@ export class Panel > diff --git a/packages/calcite-components/src/demos/shell-panel.html b/packages/calcite-components/src/demos/shell-panel.html index dbb3dfe4074..d1c810c2d4f 100644 --- a/packages/calcite-components/src/demos/shell-panel.html +++ b/packages/calcite-components/src/demos/shell-panel.html @@ -61,10 +61,8 @@ appearance="outline" type="button" slot="footer-start" - kind="neutral" scale="s" icon-start="check" - id="card-icon-test-1" width="full" > @@ -110,17 +106,12 @@
Content bottom!
-
- - -
From 64f1bbb0901fdc906ac5167c07e58a69306c802d Mon Sep 17 00:00:00 2001 From: eliza Date: Tue, 2 Jul 2024 15:26:55 -0700 Subject: [PATCH 04/14] heading and description scales --- .../src/components/panel/panel.scss | 39 ++++++++++++++++++- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/packages/calcite-components/src/components/panel/panel.scss b/packages/calcite-components/src/components/panel/panel.scss index d588d8d2b85..dcbe62d90ad 100644 --- a/packages/calcite-components/src/components/panel/panel.scss +++ b/packages/calcite-components/src/components/panel/panel.scss @@ -23,6 +23,16 @@ .content-bottom { padding: var(--calcite-spacing-sm); } + + .header-content { + .heading { + font-size: theme("fontSize.n1h"); + } + + .description { + font-size: theme("fontSize.n2h"); + } + } } :host([scale="m"]) { @@ -30,6 +40,16 @@ .content-bottom { padding: var(--calcite-spacing-md); } + + .header-content { + .heading { + font-size: theme("fontSize.0h"); + } + + .description { + font-size: theme("fontSize.n1h"); + } + } } :host([scale="l"]) { @@ -37,6 +57,16 @@ .content-bottom { padding: var(--calcite-spacing-xl); } + + .header-content { + .heading { + font-size: theme("fontSize.1h"); + } + + .description { + font-size: theme("fontSize.0h"); + } + } } .content-top, @@ -90,21 +120,26 @@ overflow-hidden px-3 py-3.5; + margin-inline-end: auto; + .heading, .description { @apply block break-words p-0; } + .heading { - @apply text-0h mx-0 mt-0 mb-1 font-medium; + @apply mx-0 mt-0 mb-1 font-medium text-color-1; + &:only-child { @apply mb-0; } } + .description { - @apply text-color-2 text-n1h; + @apply text-color-2; } } From aa1a77f3b0b88b2fdfee41eddd59e90dca7ea5a3 Mon Sep 17 00:00:00 2001 From: eliza Date: Tue, 2 Jul 2024 16:24:57 -0700 Subject: [PATCH 05/14] custom flow support and scales --- .../calcite-components/src/demos/flow.html | 44 ++++++++++++++++--- 1 file changed, 37 insertions(+), 7 deletions(-) diff --git a/packages/calcite-components/src/demos/flow.html b/packages/calcite-components/src/demos/flow.html index f0f4dceefd0..866f9ca53bc 100644 --- a/packages/calcite-components/src/demos/flow.html +++ b/packages/calcite-components/src/demos/flow.html @@ -39,19 +39,19 @@
- +
Slot for a content-top.
Content bottom!
Footer!
- +
Slot for a content-top.
Content bottom!
Footer!
- +
Slot for a content-top.
Content bottom!
@@ -64,10 +64,6 @@ icon-start="check" >
- - - - @@ -103,8 +99,15 @@ connectedCallback() { this.flowItemEl.setAttribute("heading", this.getAttribute("heading")); + this.flowItemEl.setAttribute("description", this.getAttribute("description")); this.flowItemEl.setAttribute("show-back-button", this.getAttribute("show-back-button")); this.flowItemEl.setAttribute("menu-open", this.getAttribute("menu-open")); + + // Inherit scale from parent calcite-flow + const parentCalciteFlow = this.closest("calcite-flow"); + if (parentCalciteFlow && parentCalciteFlow.getAttribute("scale")) { + this.flowItemEl.setAttribute("scale", parentCalciteFlow.getAttribute("scale")); + } } get heading() { @@ -155,6 +158,33 @@
+ +
+
scale small
+
+ + + +
+
+ +
+
scale medium
+
+ + + +
+
+ +
+
scale large
+
+ + + +
+
From ee25373d6d83f8e6da42d1a788be1d0d6ce98c48 Mon Sep 17 00:00:00 2001 From: eliza Date: Tue, 2 Jul 2024 16:38:53 -0700 Subject: [PATCH 06/14] WIP --- packages/calcite-components/src/demos/flow.html | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/packages/calcite-components/src/demos/flow.html b/packages/calcite-components/src/demos/flow.html index 866f9ca53bc..d7db12ba504 100644 --- a/packages/calcite-components/src/demos/flow.html +++ b/packages/calcite-components/src/demos/flow.html @@ -39,19 +39,19 @@
- +
Slot for a content-top.
Content bottom!
Footer!
- +
Slot for a content-top.
Content bottom!
Footer!
- +
Slot for a content-top.
Content bottom!
@@ -100,14 +100,9 @@ connectedCallback() { this.flowItemEl.setAttribute("heading", this.getAttribute("heading")); this.flowItemEl.setAttribute("description", this.getAttribute("description")); + this.flowItemEl.setAttribute("scale", this.getAttribute("scale")); this.flowItemEl.setAttribute("show-back-button", this.getAttribute("show-back-button")); this.flowItemEl.setAttribute("menu-open", this.getAttribute("menu-open")); - - // Inherit scale from parent calcite-flow - const parentCalciteFlow = this.closest("calcite-flow"); - if (parentCalciteFlow && parentCalciteFlow.getAttribute("scale")) { - this.flowItemEl.setAttribute("scale", parentCalciteFlow.getAttribute("scale")); - } } get heading() { From 7fc091c0d2b547274b8a7eb29e327c9149652263 Mon Sep 17 00:00:00 2001 From: eliza Date: Tue, 2 Jul 2024 16:51:18 -0700 Subject: [PATCH 07/14] WIP --- .../calcite-components/src/demos/flow.html | 6 +++--- .../src/demos/shell-panel.html | 20 +++++++++++-------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/packages/calcite-components/src/demos/flow.html b/packages/calcite-components/src/demos/flow.html index d7db12ba504..ae88887f75e 100644 --- a/packages/calcite-components/src/demos/flow.html +++ b/packages/calcite-components/src/demos/flow.html @@ -39,19 +39,19 @@
- +
Slot for a content-top.
Content bottom!
Footer!
- +
Slot for a content-top.
Content bottom!
Footer!
- +
Slot for a content-top.
Content bottom!
diff --git a/packages/calcite-components/src/demos/shell-panel.html b/packages/calcite-components/src/demos/shell-panel.html index d1c810c2d4f..b2c9f8568a0 100644 --- a/packages/calcite-components/src/demos/shell-panel.html +++ b/packages/calcite-components/src/demos/shell-panel.html @@ -41,19 +41,23 @@ > - +
Slot for a content-top.
Content bottom!
Footer!
- +
Slot for a content-top.
Content bottom!
Footer!
- +
Slot for a content-top.
Content bottom!
@@ -89,19 +93,19 @@ >
Hello! I am some popover content!
- +
Slot for a content-top.
Content bottom!
Footer!
- +
Slot for a content-top.
Content bottom!
Footer!
- +
Slot for a content-top.
Content bottom!
@@ -119,9 +123,7 @@
- -
-
scale small
-
- - - -
-
- -
-
scale medium
-
- - - -
-
- -
-
scale large
-
- - - -
-
From b4d49f2841a2b831f3f68ff12263bec034f4efa2 Mon Sep 17 00:00:00 2001 From: eliza Date: Wed, 3 Jul 2024 10:47:02 -0700 Subject: [PATCH 09/14] revert changes to shell-panel demo --- .../src/demos/shell-panel.html | 419 +++++++++++------- 1 file changed, 261 insertions(+), 158 deletions(-) diff --git a/packages/calcite-components/src/demos/shell-panel.html b/packages/calcite-components/src/demos/shell-panel.html index b2c9f8568a0..ccbce45df27 100644 --- a/packages/calcite-components/src/demos/shell-panel.html +++ b/packages/calcite-components/src/demos/shell-panel.html @@ -3,9 +3,7 @@ - Shell Panel -
-
+
-
Shell Content
+
+ + + Not content behind + + Content behind + + + + Not tall content + + Tall content + + + + Not resizable + + Resizable + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + dock + float + overlay + + + + + + + + + Add layers + + + + + + + + + + + + + + + + + + + + + + + + + + + + + dock + float + overlay + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + dock + float + overlay + + + + + + - - Clickable popover + + + + + + + + + + + + + + + + + + + - - -
Slot for a content-top.
- -
Content bottom!
-
Footer!
-
- -
Slot for a content-top.
- -
Content bottom!
-
Footer!
-
- -
Slot for a content-top.
- -
Content bottom!
- - -
-
+ + + + dock + float + overlay + + + +
Footer
- - -
Hello! I am some popover content!
- - -
Slot for a content-top.
- -
Content bottom!
-
Footer!
-
- -
Slot for a content-top.
- -
Content bottom!
-
Footer!
-
- -
Slot for a content-top.
- -
Content bottom!
- -
-
-
-
From a5084fdf1dc60602dbcad1736e1e8e1624ccb390 Mon Sep 17 00:00:00 2001 From: eliza Date: Wed, 3 Jul 2024 10:48:17 -0700 Subject: [PATCH 10/14] WIP --- packages/calcite-components/src/demos/shell-panel.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/calcite-components/src/demos/shell-panel.html b/packages/calcite-components/src/demos/shell-panel.html index ccbce45df27..fe241d016af 100644 --- a/packages/calcite-components/src/demos/shell-panel.html +++ b/packages/calcite-components/src/demos/shell-panel.html @@ -3,7 +3,9 @@ + Shell Panel +