mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 03:26:36 +00:00
Strip out RadioTileGroup
This commit is contained in:
parent
480337f9af
commit
c37d7b3760
9 changed files with 10 additions and 123 deletions
|
@ -1,6 +1,6 @@
|
||||||
# Component Index
|
# Component Index
|
||||||
|
|
||||||
> 157 components exported from carbon-components-svelte@0.25.1.
|
> 156 components exported from carbon-components-svelte@0.25.1.
|
||||||
|
|
||||||
## Components
|
## Components
|
||||||
|
|
||||||
|
@ -97,7 +97,6 @@
|
||||||
- [`RadioButtonGroup`](#radiobuttongroup)
|
- [`RadioButtonGroup`](#radiobuttongroup)
|
||||||
- [`RadioButtonSkeleton`](#radiobuttonskeleton)
|
- [`RadioButtonSkeleton`](#radiobuttonskeleton)
|
||||||
- [`RadioTile`](#radiotile)
|
- [`RadioTile`](#radiotile)
|
||||||
- [`RadioTileGroup`](#radiotilegroup)
|
|
||||||
- [`Row`](#row)
|
- [`Row`](#row)
|
||||||
- [`Search`](#search)
|
- [`Search`](#search)
|
||||||
- [`SearchSkeleton`](#searchskeleton)
|
- [`SearchSkeleton`](#searchskeleton)
|
||||||
|
@ -2723,28 +2722,6 @@ None.
|
||||||
| mouseenter | forwarded | -- |
|
| mouseenter | forwarded | -- |
|
||||||
| mouseleave | forwarded | -- |
|
| mouseleave | forwarded | -- |
|
||||||
|
|
||||||
## `RadioTileGroup`
|
|
||||||
|
|
||||||
### Props
|
|
||||||
|
|
||||||
| Prop name | Kind | Reactive | Type | Default value | Description |
|
|
||||||
| :------------ | :--------------- | :------- | :------------------- | ------------------ | --------------------------------------- |
|
|
||||||
| selectedValue | <code>let</code> | Yes | <code>any</code> | -- | Specify the selected tile value |
|
|
||||||
| disabled | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to disable the tile group |
|
|
||||||
| legend | <code>let</code> | No | <code>string</code> | <code>""</code> | Specify the legend text |
|
|
||||||
|
|
||||||
### Slots
|
|
||||||
|
|
||||||
| Slot name | Default | Props | Fallback |
|
|
||||||
| :-------- | :------ | :---- | :------- |
|
|
||||||
| -- | Yes | -- | -- |
|
|
||||||
|
|
||||||
### Events
|
|
||||||
|
|
||||||
| Event name | Type | Detail |
|
|
||||||
| :--------- | :--------- | :----- |
|
|
||||||
| select | dispatched | -- |
|
|
||||||
|
|
||||||
## `Row`
|
## `Row`
|
||||||
|
|
||||||
### Props
|
### Props
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"total": 157,
|
"total": 156,
|
||||||
"components": [
|
"components": [
|
||||||
{
|
{
|
||||||
"moduleName": "SkeletonText",
|
"moduleName": "SkeletonText",
|
||||||
|
@ -8764,45 +8764,6 @@
|
||||||
"typedefs": [],
|
"typedefs": [],
|
||||||
"rest_props": { "type": "Element", "name": "fieldset" }
|
"rest_props": { "type": "Element", "name": "fieldset" }
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"moduleName": "RadioTileGroup",
|
|
||||||
"filePath": "/src/Tile/RadioTileGroup.svelte",
|
|
||||||
"props": [
|
|
||||||
{
|
|
||||||
"name": "selectedValue",
|
|
||||||
"kind": "let",
|
|
||||||
"description": "Specify the selected tile value",
|
|
||||||
"type": "any",
|
|
||||||
"isFunction": false,
|
|
||||||
"constant": false,
|
|
||||||
"reactive": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "disabled",
|
|
||||||
"kind": "let",
|
|
||||||
"description": "Set to `true` to disable the tile group",
|
|
||||||
"type": "boolean",
|
|
||||||
"value": "false",
|
|
||||||
"isFunction": false,
|
|
||||||
"constant": false,
|
|
||||||
"reactive": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "legend",
|
|
||||||
"kind": "let",
|
|
||||||
"description": "Specify the legend text",
|
|
||||||
"type": "string",
|
|
||||||
"value": "\"\"",
|
|
||||||
"isFunction": false,
|
|
||||||
"constant": false,
|
|
||||||
"reactive": false
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"slots": [{ "name": "__default__", "default": true, "slot_props": "{}" }],
|
|
||||||
"events": [{ "type": "dispatched", "name": "select" }],
|
|
||||||
"typedefs": [],
|
|
||||||
"rest_props": { "type": "Element", "name": "fieldset" }
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"moduleName": "SelectableTileGroup",
|
"moduleName": "SelectableTileGroup",
|
||||||
"filePath": "/src/Tile/SelectableTileGroup.svelte",
|
"filePath": "/src/Tile/SelectableTileGroup.svelte",
|
||||||
|
|
|
@ -1,21 +1,16 @@
|
||||||
---
|
---
|
||||||
components: ["RadioTileGroup", "RadioTile"]
|
components: ["TileGroup", "RadioTile"]
|
||||||
---
|
---
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { RadioTileGroup, RadioTile, InlineNotification } from "carbon-components-svelte";
|
import { TileGroup, RadioTile } from "carbon-components-svelte";
|
||||||
import Preview from "../../components/Preview.svelte";
|
import Preview from "../../components/Preview.svelte";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<InlineNotification svx-ignore title="Deprecation warning:" kind="warning" hideCloseButton>
|
|
||||||
<div>
|
|
||||||
The TileGroup component will be removed in favour of the RadioTileGroup component in the next major release.
|
|
||||||
</div>
|
|
||||||
</InlineNotification>
|
|
||||||
|
|
||||||
### Default
|
### Default
|
||||||
|
|
||||||
<RadioTileGroup legend="Service pricing tiers">
|
<TileGroup legend="Service pricing tiers">
|
||||||
<RadioTile value="0" checked>
|
<RadioTile value="0" checked>
|
||||||
Lite plan
|
Lite plan
|
||||||
</RadioTile>
|
</RadioTile>
|
||||||
|
@ -25,11 +20,11 @@ components: ["RadioTileGroup", "RadioTile"]
|
||||||
<RadioTile value="2">
|
<RadioTile value="2">
|
||||||
Plus plan
|
Plus plan
|
||||||
</RadioTile>
|
</RadioTile>
|
||||||
</RadioTileGroup>
|
</TileGroup>
|
||||||
|
|
||||||
### Light variant
|
### Light variant
|
||||||
|
|
||||||
<RadioTileGroup legend="Service pricing tiers">
|
<TileGroup legend="Service pricing tiers">
|
||||||
<RadioTile light value="0" checked>
|
<RadioTile light value="0" checked>
|
||||||
Lite plan
|
Lite plan
|
||||||
</RadioTile>
|
</RadioTile>
|
||||||
|
@ -39,4 +34,4 @@ components: ["RadioTileGroup", "RadioTile"]
|
||||||
<RadioTile light value="2">
|
<RadioTile light value="2">
|
||||||
Plus plan
|
Plus plan
|
||||||
</RadioTile>
|
</RadioTile>
|
||||||
</RadioTileGroup>
|
</TileGroup>
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
import { getContext } from "svelte";
|
import { getContext } from "svelte";
|
||||||
import CheckmarkFilled16 from "carbon-icons-svelte/lib/CheckmarkFilled16";
|
import CheckmarkFilled16 from "carbon-icons-svelte/lib/CheckmarkFilled16";
|
||||||
|
|
||||||
const { add, update, selectedValue } = getContext("RadioTileGroup");
|
const { add, update, selectedValue } = getContext("TileGroup");
|
||||||
|
|
||||||
add({ value, checked });
|
add({ value, checked });
|
||||||
|
|
||||||
|
|
|
@ -1,43 +0,0 @@
|
||||||
<script>
|
|
||||||
/**
|
|
||||||
* Specify the selected tile value
|
|
||||||
* @type {any}
|
|
||||||
*/
|
|
||||||
export let selectedValue = undefined;
|
|
||||||
|
|
||||||
/** Set to `true` to disable the tile group */
|
|
||||||
export let disabled = false;
|
|
||||||
|
|
||||||
/** Specify the legend text */
|
|
||||||
export let legend = "";
|
|
||||||
|
|
||||||
import { createEventDispatcher, setContext } from "svelte";
|
|
||||||
import { writable } from "svelte/store";
|
|
||||||
|
|
||||||
const dispatch = createEventDispatcher();
|
|
||||||
const _selectedValue = writable(selectedValue);
|
|
||||||
|
|
||||||
setContext("RadioTileGroup", {
|
|
||||||
selectedValue: _selectedValue,
|
|
||||||
add: ({ checked, value }) => {
|
|
||||||
if (checked) {
|
|
||||||
_selectedValue.set(value);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
update: (value) => {
|
|
||||||
_selectedValue.set(value);
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
$: selectedValue = $_selectedValue;
|
|
||||||
$: dispatch("select", $_selectedValue);
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<fieldset disabled="{disabled}" class:bx--tile-group="{true}" {...$$restProps}>
|
|
||||||
{#if legend}
|
|
||||||
<legend class:bx--label="{true}">{legend}</legend>
|
|
||||||
{/if}
|
|
||||||
<div>
|
|
||||||
<slot />
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
|
@ -17,7 +17,7 @@
|
||||||
const dispatch = createEventDispatcher();
|
const dispatch = createEventDispatcher();
|
||||||
const selectedValue = writable(selected);
|
const selectedValue = writable(selected);
|
||||||
|
|
||||||
setContext("RadioTileGroup", {
|
setContext("TileGroup", {
|
||||||
selectedValue,
|
selectedValue,
|
||||||
add: ({ checked, value }) => {
|
add: ({ checked, value }) => {
|
||||||
if (checked) {
|
if (checked) {
|
||||||
|
|
|
@ -4,5 +4,4 @@ export { default as ExpandableTile } from "./ExpandableTile.svelte";
|
||||||
export { default as SelectableTile } from "./SelectableTile.svelte";
|
export { default as SelectableTile } from "./SelectableTile.svelte";
|
||||||
export { default as RadioTile } from "./RadioTile.svelte";
|
export { default as RadioTile } from "./RadioTile.svelte";
|
||||||
export { default as TileGroup } from "./TileGroup.svelte";
|
export { default as TileGroup } from "./TileGroup.svelte";
|
||||||
export { default as RadioTileGroup } from "./RadioTileGroup.svelte";
|
|
||||||
export { default as SelectableTileGroup } from "./SelectableTileGroup.svelte";
|
export { default as SelectableTileGroup } from "./SelectableTileGroup.svelte";
|
||||||
|
|
|
@ -107,7 +107,6 @@ export {
|
||||||
SelectableTile,
|
SelectableTile,
|
||||||
RadioTile,
|
RadioTile,
|
||||||
TileGroup,
|
TileGroup,
|
||||||
RadioTileGroup,
|
|
||||||
SelectableTileGroup,
|
SelectableTileGroup,
|
||||||
} from "./Tile";
|
} from "./Tile";
|
||||||
export { TimePicker, TimePickerSelect } from "./TimePicker";
|
export { TimePicker, TimePickerSelect } from "./TimePicker";
|
||||||
|
|
1
types/index.d.ts
vendored
1
types/index.d.ts
vendored
|
@ -123,7 +123,6 @@ export { default as ExpandableTile } from "./Tile/ExpandableTile";
|
||||||
export { default as SelectableTile } from "./Tile/SelectableTile";
|
export { default as SelectableTile } from "./Tile/SelectableTile";
|
||||||
export { default as RadioTile } from "./Tile/RadioTile";
|
export { default as RadioTile } from "./Tile/RadioTile";
|
||||||
export { default as TileGroup } from "./Tile/TileGroup";
|
export { default as TileGroup } from "./Tile/TileGroup";
|
||||||
export { default as RadioTileGroup } from "./Tile/RadioTileGroup";
|
|
||||||
export { default as SelectableTileGroup } from "./Tile/SelectableTileGroup";
|
export { default as SelectableTileGroup } from "./Tile/SelectableTileGroup";
|
||||||
export { default as TimePicker } from "./TimePicker/TimePicker";
|
export { default as TimePicker } from "./TimePicker/TimePicker";
|
||||||
export { default as TimePickerSelect } from "./TimePicker/TimePickerSelect";
|
export { default as TimePickerSelect } from "./TimePicker/TimePickerSelect";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue