@vector-business-services/cristal-ds-web 0.7.0 → 0.8.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/index.d.cts CHANGED
@@ -149,6 +149,11 @@ type DrawerSide = 'right' | 'left';
149
149
  * corpo rola).
150
150
  */
151
151
  type DrawerBehavior = 'full' | 'fixed';
152
+ /**
153
+ * Largura da gaveta. O Figma só tem a de 340px (small); medium (480px), large (720px) e full (a
154
+ * tela toda) são do Cristal, nas faixas usuais de drawer.
155
+ */
156
+ type DrawerSize = 'small' | 'medium' | 'large' | 'full';
152
157
  interface DrawerProps {
153
158
  visible: boolean;
154
159
  /** Pedido para fechar (X, Esc ou clique no overlay). */
@@ -161,6 +166,8 @@ interface DrawerProps {
161
166
  side?: DrawerSide;
162
167
  /** Padrão: full. */
163
168
  behavior?: DrawerBehavior;
169
+ /** Padrão: small (340px, a do Figma). */
170
+ size?: DrawerSize;
164
171
  /**
165
172
  * Com overlay (padrão): a gaveta é modal, a página atrás fica bloqueada e o clique no overlay
166
173
  * fecha. Sem overlay (`false`): a página continua rolando e clicável, e só o X e o Esc fecham.
@@ -176,7 +183,7 @@ interface DrawerProps {
176
183
  id?: string;
177
184
  className?: string;
178
185
  }
179
- declare function Drawer({ visible, onHide, title, subtitle, side, behavior, modal, onBack, backLabel, closeLabel, footer, children, id, className, }: DrawerProps): react.JSX.Element;
186
+ declare function Drawer({ visible, onHide, title, subtitle, side, behavior, size, modal, onBack, backLabel, closeLabel, footer, children, id, className, }: DrawerProps): react.JSX.Element;
180
187
 
181
188
  /**
182
189
  * Hierarchy no Figma: Primary (Filled), Secondary (Tonal), Tertiary (Outlined) e Other (Icon),
@@ -607,4 +614,4 @@ interface TooltipProps {
607
614
  declare function Tooltip({ target, content, type, position, event, showDelay, hideDelay, disabled, id, className, }: TooltipProps): react.JSX.Element;
608
615
 
609
616
  export { AutoComplete, Badge, Button, Card, Checkbox, Chip, Divider, Drawer, IconButton, Input, Menu, MenuPrincipal, Menubar, Modal, MultiSelect, Panel, Radio, ScrollPanel, SegmentControl, Select, Switch, TabPanel, Tabs, Tag, Tooltip };
610
- export type { AutoCompleteProps, AutoCompleteSize, AutoCompleteVariant, BadgeProps, BadgeSize, BadgeVariant, ButtonProps, ButtonSize, ButtonVariant, CardPadding, CardProps, CheckboxLabelSize, CheckboxPosition, CheckboxProps, ChipProps, ChipSize, ChipVariant, DividerOrientation, DividerProps, DividerVariant, DrawerBehavior, DrawerProps, DrawerSide, IconButtonProps, IconButtonSize, IconButtonVariant, InputProps, InputSize, InputVariant, MenuDensity, MenuHandle, MenuItem, MenuPrincipalEntry, MenuPrincipalGroup, MenuPrincipalHandle, MenuPrincipalItem, MenuPrincipalProps, MenuProps, MenubarProps, MenubarTool, MenubarUser, ModalProps, ModalSize, MultiSelectDensity, MultiSelectProps, MultiSelectSize, MultiSelectVariant, PanelProps, RadioLabelSize, RadioProps, ScrollPanelProps, SegmentControlOption, SegmentControlProps, SegmentControlVariant, SelectProps, SelectSize, SelectVariant, SwitchLabelPosition, SwitchProps, SwitchSize, TabPanelProps, TabsProps, TagProps, TagSize, TagVariant, TooltipPosition, TooltipProps, TooltipType };
617
+ export type { AutoCompleteProps, AutoCompleteSize, AutoCompleteVariant, BadgeProps, BadgeSize, BadgeVariant, ButtonProps, ButtonSize, ButtonVariant, CardPadding, CardProps, CheckboxLabelSize, CheckboxPosition, CheckboxProps, ChipProps, ChipSize, ChipVariant, DividerOrientation, DividerProps, DividerVariant, DrawerBehavior, DrawerProps, DrawerSide, DrawerSize, IconButtonProps, IconButtonSize, IconButtonVariant, InputProps, InputSize, InputVariant, MenuDensity, MenuHandle, MenuItem, MenuPrincipalEntry, MenuPrincipalGroup, MenuPrincipalHandle, MenuPrincipalItem, MenuPrincipalProps, MenuProps, MenubarProps, MenubarTool, MenubarUser, ModalProps, ModalSize, MultiSelectDensity, MultiSelectProps, MultiSelectSize, MultiSelectVariant, PanelProps, RadioLabelSize, RadioProps, ScrollPanelProps, SegmentControlOption, SegmentControlProps, SegmentControlVariant, SelectProps, SelectSize, SelectVariant, SwitchLabelPosition, SwitchProps, SwitchSize, TabPanelProps, TabsProps, TagProps, TagSize, TagVariant, TooltipPosition, TooltipProps, TooltipType };
package/dist/index.d.ts CHANGED
@@ -149,6 +149,11 @@ type DrawerSide = 'right' | 'left';
149
149
  * corpo rola).
150
150
  */
151
151
  type DrawerBehavior = 'full' | 'fixed';
152
+ /**
153
+ * Largura da gaveta. O Figma só tem a de 340px (small); medium (480px), large (720px) e full (a
154
+ * tela toda) são do Cristal, nas faixas usuais de drawer.
155
+ */
156
+ type DrawerSize = 'small' | 'medium' | 'large' | 'full';
152
157
  interface DrawerProps {
153
158
  visible: boolean;
154
159
  /** Pedido para fechar (X, Esc ou clique no overlay). */
@@ -161,6 +166,8 @@ interface DrawerProps {
161
166
  side?: DrawerSide;
162
167
  /** Padrão: full. */
163
168
  behavior?: DrawerBehavior;
169
+ /** Padrão: small (340px, a do Figma). */
170
+ size?: DrawerSize;
164
171
  /**
165
172
  * Com overlay (padrão): a gaveta é modal, a página atrás fica bloqueada e o clique no overlay
166
173
  * fecha. Sem overlay (`false`): a página continua rolando e clicável, e só o X e o Esc fecham.
@@ -176,7 +183,7 @@ interface DrawerProps {
176
183
  id?: string;
177
184
  className?: string;
178
185
  }
179
- declare function Drawer({ visible, onHide, title, subtitle, side, behavior, modal, onBack, backLabel, closeLabel, footer, children, id, className, }: DrawerProps): react.JSX.Element;
186
+ declare function Drawer({ visible, onHide, title, subtitle, side, behavior, size, modal, onBack, backLabel, closeLabel, footer, children, id, className, }: DrawerProps): react.JSX.Element;
180
187
 
181
188
  /**
182
189
  * Hierarchy no Figma: Primary (Filled), Secondary (Tonal), Tertiary (Outlined) e Other (Icon),
@@ -607,4 +614,4 @@ interface TooltipProps {
607
614
  declare function Tooltip({ target, content, type, position, event, showDelay, hideDelay, disabled, id, className, }: TooltipProps): react.JSX.Element;
608
615
 
609
616
  export { AutoComplete, Badge, Button, Card, Checkbox, Chip, Divider, Drawer, IconButton, Input, Menu, MenuPrincipal, Menubar, Modal, MultiSelect, Panel, Radio, ScrollPanel, SegmentControl, Select, Switch, TabPanel, Tabs, Tag, Tooltip };
610
- export type { AutoCompleteProps, AutoCompleteSize, AutoCompleteVariant, BadgeProps, BadgeSize, BadgeVariant, ButtonProps, ButtonSize, ButtonVariant, CardPadding, CardProps, CheckboxLabelSize, CheckboxPosition, CheckboxProps, ChipProps, ChipSize, ChipVariant, DividerOrientation, DividerProps, DividerVariant, DrawerBehavior, DrawerProps, DrawerSide, IconButtonProps, IconButtonSize, IconButtonVariant, InputProps, InputSize, InputVariant, MenuDensity, MenuHandle, MenuItem, MenuPrincipalEntry, MenuPrincipalGroup, MenuPrincipalHandle, MenuPrincipalItem, MenuPrincipalProps, MenuProps, MenubarProps, MenubarTool, MenubarUser, ModalProps, ModalSize, MultiSelectDensity, MultiSelectProps, MultiSelectSize, MultiSelectVariant, PanelProps, RadioLabelSize, RadioProps, ScrollPanelProps, SegmentControlOption, SegmentControlProps, SegmentControlVariant, SelectProps, SelectSize, SelectVariant, SwitchLabelPosition, SwitchProps, SwitchSize, TabPanelProps, TabsProps, TagProps, TagSize, TagVariant, TooltipPosition, TooltipProps, TooltipType };
617
+ export type { AutoCompleteProps, AutoCompleteSize, AutoCompleteVariant, BadgeProps, BadgeSize, BadgeVariant, ButtonProps, ButtonSize, ButtonVariant, CardPadding, CardProps, CheckboxLabelSize, CheckboxPosition, CheckboxProps, ChipProps, ChipSize, ChipVariant, DividerOrientation, DividerProps, DividerVariant, DrawerBehavior, DrawerProps, DrawerSide, DrawerSize, IconButtonProps, IconButtonSize, IconButtonVariant, InputProps, InputSize, InputVariant, MenuDensity, MenuHandle, MenuItem, MenuPrincipalEntry, MenuPrincipalGroup, MenuPrincipalHandle, MenuPrincipalItem, MenuPrincipalProps, MenuProps, MenubarProps, MenubarTool, MenubarUser, ModalProps, ModalSize, MultiSelectDensity, MultiSelectProps, MultiSelectSize, MultiSelectVariant, PanelProps, RadioLabelSize, RadioProps, ScrollPanelProps, SegmentControlOption, SegmentControlProps, SegmentControlVariant, SelectProps, SelectSize, SelectVariant, SwitchLabelPosition, SwitchProps, SwitchSize, TabPanelProps, TabsProps, TagProps, TagSize, TagVariant, TooltipPosition, TooltipProps, TooltipType };
package/dist/index.js CHANGED
@@ -319,6 +319,7 @@ function Drawer({
319
319
  subtitle,
320
320
  side = "right",
321
321
  behavior = "full",
322
+ size = "small",
322
323
  modal = true,
323
324
  onBack,
324
325
  backLabel = "Voltar",
@@ -366,7 +367,13 @@ function Drawer({
366
367
  primeiro.focus();
367
368
  }
368
369
  };
369
- const classes = ["cr-drawer", `cr-drawer--${side}`, `cr-drawer--${behavior}`, className].filter(Boolean).join(" ");
370
+ const classes = [
371
+ "cr-drawer",
372
+ `cr-drawer--${side}`,
373
+ `cr-drawer--${behavior}`,
374
+ `cr-drawer--size-${size}`,
375
+ className
376
+ ].filter(Boolean).join(" ");
370
377
  return /* @__PURE__ */ jsx(
371
378
  Sidebar,
372
379
  {