@rarui/components 1.16.0 → 1.17.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/CHANGELOG.md +6 -0
- package/custom-elements.json +109 -1
- package/dist/index.d.ts +111 -0
- package/dist/index.js +204 -128
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
`@rarui/components` components is a component library built with [Lit](https://lit.dev/).
|
|
4
4
|
|
|
5
|
+
## 2025-07-03 `1.17.0`
|
|
6
|
+
|
|
7
|
+
#### 🎉 New features
|
|
8
|
+
|
|
9
|
+
- Added new surface `Modal` component. ([#125](https://git.rarolabs.com.br/frontend/rarui/-/merge_requests/125) by [@junior](https://git.rarolabs.com.br/junior))
|
|
10
|
+
|
|
5
11
|
## 2025-06-30 `1.16.0`
|
|
6
12
|
|
|
7
13
|
#### 🎉 New features
|
package/custom-elements.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.
|
|
2
|
+
"version": "1.16.0",
|
|
3
3
|
"tags": [
|
|
4
4
|
{
|
|
5
5
|
"name": "rarui-avatar",
|
|
@@ -7186,6 +7186,114 @@
|
|
|
7186
7186
|
"type": "string"
|
|
7187
7187
|
}
|
|
7188
7188
|
]
|
|
7189
|
+
},
|
|
7190
|
+
{
|
|
7191
|
+
"name": "rarui-modal",
|
|
7192
|
+
"description": "## Rarui Modal\n---\nThe modal component provides a base for popovers, suspended forms, tutorials, or any other content above the UI main surface.\n\nSee [a complete document](https://rarui.rarolabs.com.br/docs/components-web-components/surface/modal) for more details.",
|
|
7193
|
+
"attributes": [
|
|
7194
|
+
{
|
|
7195
|
+
"name": "padding",
|
|
7196
|
+
"default": "base",
|
|
7197
|
+
"description": "Padding properties are used to generate space around the content area of an Accordion.Body..\n\n- base\n- none",
|
|
7198
|
+
"type": "string",
|
|
7199
|
+
"values": [
|
|
7200
|
+
{
|
|
7201
|
+
"name": "base",
|
|
7202
|
+
"description": "(default)"
|
|
7203
|
+
},
|
|
7204
|
+
{
|
|
7205
|
+
"name": "none"
|
|
7206
|
+
}
|
|
7207
|
+
]
|
|
7208
|
+
},
|
|
7209
|
+
{
|
|
7210
|
+
"name": "max-width",
|
|
7211
|
+
"description": "The **`max-width`** CSS property sets the maximum width of an element. It prevents the used value of the `width` property from becoming larger than the value specified by `max-width`. It is also possible to pass a specific value.\n\n\n**Initial value**: `none`\n\nThis property supports responsive values. You can pass a single value like `\"fit-content\"`.\n\n Or an object like:\n \n ```\n{\n \"xs\": \"fit-content\",\n \"md\": \"intrinsic\",\n \"lg\": \"max-content\",\n \"xl\": \"min-content\"\n}\n```\n\n- fit-content\n- intrinsic\n- max-content\n- min-content\n- none\n- stretch",
|
|
7212
|
+
"values": [
|
|
7213
|
+
{
|
|
7214
|
+
"name": "fit-content"
|
|
7215
|
+
},
|
|
7216
|
+
{
|
|
7217
|
+
"name": "intrinsic"
|
|
7218
|
+
},
|
|
7219
|
+
{
|
|
7220
|
+
"name": "max-content"
|
|
7221
|
+
},
|
|
7222
|
+
{
|
|
7223
|
+
"name": "min-content"
|
|
7224
|
+
},
|
|
7225
|
+
{
|
|
7226
|
+
"name": "none"
|
|
7227
|
+
},
|
|
7228
|
+
{
|
|
7229
|
+
"name": "stretch"
|
|
7230
|
+
}
|
|
7231
|
+
]
|
|
7232
|
+
},
|
|
7233
|
+
{
|
|
7234
|
+
"name": "open",
|
|
7235
|
+
"description": "Whether the modal is open or not.",
|
|
7236
|
+
"type": "boolean"
|
|
7237
|
+
},
|
|
7238
|
+
{
|
|
7239
|
+
"name": "portal-id",
|
|
7240
|
+
"description": "Specifies the ID of the portal element where the modal should be rendered.\nThis can be useful for rendering the modal in a different part of the DOM, such as a modal or overlay.",
|
|
7241
|
+
"type": "string"
|
|
7242
|
+
},
|
|
7243
|
+
{
|
|
7244
|
+
"name": "z-index",
|
|
7245
|
+
"description": "The zIndex property specifies the stack order of the box.\n\nThis property supports responsive values. You can pass a single value like `\"$100\"`.\n\n Or an object like:\n \n ```\n{\n \"xs\": \"$100\",\n \"md\": \"$200\",\n \"lg\": \"$300\",\n \"xl\": \"$400\"\n}\n```\n\n- $100\n- $200\n- $300\n- $400\n- $500\n- $600\n- $700\n- $800\n- $900",
|
|
7246
|
+
"values": [
|
|
7247
|
+
{
|
|
7248
|
+
"name": "$100"
|
|
7249
|
+
},
|
|
7250
|
+
{
|
|
7251
|
+
"name": "$200"
|
|
7252
|
+
},
|
|
7253
|
+
{
|
|
7254
|
+
"name": "$300"
|
|
7255
|
+
},
|
|
7256
|
+
{
|
|
7257
|
+
"name": "$400"
|
|
7258
|
+
},
|
|
7259
|
+
{
|
|
7260
|
+
"name": "$500"
|
|
7261
|
+
},
|
|
7262
|
+
{
|
|
7263
|
+
"name": "$600"
|
|
7264
|
+
},
|
|
7265
|
+
{
|
|
7266
|
+
"name": "$700"
|
|
7267
|
+
},
|
|
7268
|
+
{
|
|
7269
|
+
"name": "$800"
|
|
7270
|
+
},
|
|
7271
|
+
{
|
|
7272
|
+
"name": "$900"
|
|
7273
|
+
}
|
|
7274
|
+
]
|
|
7275
|
+
}
|
|
7276
|
+
]
|
|
7277
|
+
},
|
|
7278
|
+
{
|
|
7279
|
+
"name": "rarui-modal-footer",
|
|
7280
|
+
"description": "## Rarui Modal Footer\n---\nThe modal component provides a base for popovers, suspended forms, tutorials, or any other content above the UI main surface.\n\nSee [a complete document](https://rarui.rarolabs.com.br/docs/components-web-components/surface/modal) for more details.",
|
|
7281
|
+
"attributes": []
|
|
7282
|
+
},
|
|
7283
|
+
{
|
|
7284
|
+
"name": "rarui-modal-header",
|
|
7285
|
+
"attributes": [
|
|
7286
|
+
{
|
|
7287
|
+
"name": "title",
|
|
7288
|
+
"description": "The title to display in the Modal header.",
|
|
7289
|
+
"type": "string"
|
|
7290
|
+
},
|
|
7291
|
+
{
|
|
7292
|
+
"name": "subtitle",
|
|
7293
|
+
"description": "The subtitle to display in the Modal header.",
|
|
7294
|
+
"type": "string"
|
|
7295
|
+
}
|
|
7296
|
+
]
|
|
7189
7297
|
}
|
|
7190
7298
|
]
|
|
7191
7299
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -17377,6 +17377,33 @@ interface CardSprinkle {
|
|
|
17377
17377
|
backgroundColor?: AddDollar<keyof typeof cardBackgroundColorProperties> | Conditions<AddDollar<keyof typeof cardBackgroundColorProperties>>;
|
|
17378
17378
|
}
|
|
17379
17379
|
|
|
17380
|
+
declare const modalStyles: {
|
|
17381
|
+
modal: RuntimeFn<{
|
|
17382
|
+
/**
|
|
17383
|
+
* Padding properties are used to generate space around the content area of an Accordion.Body..
|
|
17384
|
+
* @default base
|
|
17385
|
+
*/
|
|
17386
|
+
padding: {
|
|
17387
|
+
base: {
|
|
17388
|
+
padding: `var(--${string}) var(--${string})` | `var(--${string}) var(--${string}, ${string})` | `var(--${string}, ${string}) var(--${string})` | `var(--${string}, ${string}) var(--${string}, ${string})`;
|
|
17389
|
+
};
|
|
17390
|
+
none: {
|
|
17391
|
+
padding: number;
|
|
17392
|
+
};
|
|
17393
|
+
};
|
|
17394
|
+
}>;
|
|
17395
|
+
overlay: string;
|
|
17396
|
+
};
|
|
17397
|
+
|
|
17398
|
+
type ModalVariants = Omit<NonNullable<RecipeVariants<typeof modalStyles.modal>>, "selected">;
|
|
17399
|
+
type ModalDynamicProperties = Pick<StandardLonghandProperties, "maxWidth">;
|
|
17400
|
+
interface ModalSprinkle extends ModalDynamicProperties {
|
|
17401
|
+
/**
|
|
17402
|
+
* The zIndex property specifies the stack order of the box.
|
|
17403
|
+
*/
|
|
17404
|
+
zIndex?: AddDollar<keyof typeof zIndexProperties> | Conditions<AddDollar<keyof typeof zIndexProperties>>;
|
|
17405
|
+
}
|
|
17406
|
+
|
|
17380
17407
|
declare const paginationStyles: {
|
|
17381
17408
|
container: RuntimeFn<{
|
|
17382
17409
|
size: {
|
|
@@ -17801,6 +17828,36 @@ interface CardHeaderProps {
|
|
|
17801
17828
|
description?: string;
|
|
17802
17829
|
}
|
|
17803
17830
|
|
|
17831
|
+
interface ModalTyping {
|
|
17832
|
+
/**
|
|
17833
|
+
* Whether the modal is open or not.
|
|
17834
|
+
*/
|
|
17835
|
+
open: boolean;
|
|
17836
|
+
/**
|
|
17837
|
+
* Specifies the ID of the portal element where the modal should be rendered.
|
|
17838
|
+
* This can be useful for rendering the modal in a different part of the DOM, such as a modal or overlay.
|
|
17839
|
+
*/
|
|
17840
|
+
portalId?: string;
|
|
17841
|
+
/**
|
|
17842
|
+
* Callback fired when the component requests to be closed.
|
|
17843
|
+
* @TJS-type (open: boolean) => void;
|
|
17844
|
+
*/
|
|
17845
|
+
onDismiss: (open: boolean) => void;
|
|
17846
|
+
}
|
|
17847
|
+
type ModalProps = ModalTyping & ModalSprinkle & ModalVariants;
|
|
17848
|
+
|
|
17849
|
+
interface ModalHeaderTypings {
|
|
17850
|
+
/**
|
|
17851
|
+
* The title to display in the Modal header.
|
|
17852
|
+
*/
|
|
17853
|
+
title?: string;
|
|
17854
|
+
/**
|
|
17855
|
+
* The subtitle to display in the Modal header.
|
|
17856
|
+
*/
|
|
17857
|
+
subtitle?: string;
|
|
17858
|
+
}
|
|
17859
|
+
type ModalHeaderProps = ModalHeaderTypings;
|
|
17860
|
+
|
|
17804
17861
|
type LinkProps = LinkVariants;
|
|
17805
17862
|
|
|
17806
17863
|
interface PaginationTyping {
|
|
@@ -18651,3 +18708,57 @@ declare class RaruiCard extends LitElement {
|
|
|
18651
18708
|
static styles: CSSResult;
|
|
18652
18709
|
render(): TemplateResult<1>;
|
|
18653
18710
|
}
|
|
18711
|
+
|
|
18712
|
+
declare global {
|
|
18713
|
+
interface HTMLElementTagNameMap {
|
|
18714
|
+
"rarui-modal": RaruiModal;
|
|
18715
|
+
}
|
|
18716
|
+
}
|
|
18717
|
+
/**
|
|
18718
|
+
* ## Rarui Modal
|
|
18719
|
+
* ---
|
|
18720
|
+
* The modal component provides a base for popovers, suspended forms, tutorials, or any other content above the UI main surface.
|
|
18721
|
+
*
|
|
18722
|
+
See [a complete document](https://rarui.rarolabs.com.br/docs/components-web-components/surface/modal) for more details.
|
|
18723
|
+
*/
|
|
18724
|
+
type ModalProperties = Omit<Partial<ModalProps>, "onDismiss">;
|
|
18725
|
+
|
|
18726
|
+
declare class RaruiModal extends LitElement {
|
|
18727
|
+
sprinkleAttrs: Record<string, string>;
|
|
18728
|
+
padding: ModalProperties["padding"];
|
|
18729
|
+
portalId: ModalProperties["portalId"];
|
|
18730
|
+
open: ModalProperties["open"];
|
|
18731
|
+
maxWidth: ModalProperties["maxWidth"];
|
|
18732
|
+
dialog: HTMLElement;
|
|
18733
|
+
static styles: CSSResult;
|
|
18734
|
+
cleanupAutoUpdate?: () => void;
|
|
18735
|
+
connectedCallback(): void;
|
|
18736
|
+
disconnectedCallback(): void;
|
|
18737
|
+
firstUpdated(): void;
|
|
18738
|
+
updated(changed: Map<string, any>): void;
|
|
18739
|
+
private getPortalRoot;
|
|
18740
|
+
private handleKeyDown;
|
|
18741
|
+
private dismiss;
|
|
18742
|
+
render(): TemplateResult<1>;
|
|
18743
|
+
}
|
|
18744
|
+
|
|
18745
|
+
declare global {
|
|
18746
|
+
interface HTMLElementTagNameMap {
|
|
18747
|
+
"rarui-modal-header": RaruiModalHeader;
|
|
18748
|
+
}
|
|
18749
|
+
}
|
|
18750
|
+
/**
|
|
18751
|
+
* ## Rarui Modal Header
|
|
18752
|
+
* ---
|
|
18753
|
+
* The modal component provides a base for popovers, suspended forms, tutorials, or any other content above the UI main surface.
|
|
18754
|
+
*
|
|
18755
|
+
See [a complete document](https://rarui.rarolabs.com.br/docs/components-web-components/surface/modal) for more details.
|
|
18756
|
+
*/
|
|
18757
|
+
type ModalHeaderProperties = ModalHeaderProps;
|
|
18758
|
+
|
|
18759
|
+
declare class RaruiModalHeader extends LitElement {
|
|
18760
|
+
title: string;
|
|
18761
|
+
subtitle: ModalHeaderProperties["subtitle"];
|
|
18762
|
+
private handleClose;
|
|
18763
|
+
render(): TemplateResult<1>;
|
|
18764
|
+
}
|